query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the name of the argument.
public function getName() { return $this->_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getName()\n {\n return $this->arguments['name'];\n }", "public function getArg(){\n return (string)$this->arg;\n }", "public function getArgument(string $name);", "public function getNamedStringArgument($name);", "public function getParameterName(): string\n {\n return \\str_replace('-', '_', $this->parameter->parameter->__toString());\n }", "public function getParameterName();", "public function getName()\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "protected function getNameInput(): string\n {\n return trim($this->argument('name')) . $this->type;\n }", "protected function getNameInput()\n {\n return class_basename(trim($this->argument('name')));\n }", "public function getArgumentPrefix() {}", "public function getMigrationName()\n {\n return $this->argument('name');\n }", "protected function viewsName()\n {\n return $this->argument('name');\n }", "public function getArg($key)\n {\n return isset($this->args[$key]) ? $this->args[$key] : \"\";\n }", "public function getName()\n\t{\n\t\tif ($this->frozen) {\n\t\t\treturn $this->__call(__FUNCTION__, func_get_args());\n\t\t}\n\t\treturn $this->name;\n\t}", "public function getArgumentNames() {}", "public function getNamedTypeArgument($name);", "public function getNameInput()\n {\n return trim($this->argument('name'));\n }", "protected function getSetupName()\n {\n return strtolower($this->argument('name'));\n }", "protected function getNameInput()\n {\n return trim($this->argument('name'));\n }", "public function getNamedWidgetArgument($name);", "protected function getNameInput()\n {\n return preg_replace('/Endpoint$/', '', trim($this->argument('name'))) . \"Endpoint\";\n }", "public function Name()\n {\n return parent::CallMethod(__FUNCTION__, array(), func_get_args());\n }", "public function getNamedExpressionArgument($name);", "public function getParameterName()\n {\n return $this->parameterName;\n }", "public function getArgument()\n {\n return isset($this->argument) ? $this->argument : null;\n }", "protected function getNameInput()\n {\n $name = trim($this->argument('name'));\n\n $this->type = $this->qualifyClass($name);\n\n return $name;\n }", "protected function getNameInput()\n {\n $name = trim($this->argument('name'));\n $name = ends_with($name, config('adr.postfix.responders', '')) ? $name : $name . config('adr.postfix.responders', '');\n\n return $name;\n }", "public function getArgument($name)\n {\n $argument = null;\n if (isset($this->arguments[$name])) {\n $argument = $this->arguments[$name];\n }\n return $argument;\n }", "function macro_get_named_argument($name)\n{\n $data = getopt('', array($name . '::'));\n\n return isset($data[$name]) ? $data[$name] : null;\n}", "protected function getNameInput()\n {\n switch (trim($this->argument('name'))) {\n case 'repository':\n return 'Repository';\n break;\n case 'service':\n return 'Service';\n break;\n }\n }", "public function getArgument()\n {\n return 'help';\n }", "public function getName()\n {\n return $this->getParameter('name');\n }", "public function get_name() {\r\n\t\treturn $this->options['name'];\r\n\t}", "private function getNamedParam()\n {\n return self::BINDING_PREFIX . $this->getLetterBinding();\n }", "public function getArg($name = '')\n {\n if (!isset($this->parsedArgs[$name])) {\n throw new \\PhpCli\\Exception(self::ERR_NO_ARG_BY_NAME);\n }\n\n return $this->parsedArgs[$name];\n }", "protected function getNameInput(): string\n {\n $name = trim($this->argument('name'));\n\n if (! Str::endsWith($name, 'Filter')) {\n $name .= 'Filter';\n }\n\n $this->type = ucfirst($name);\n\n return $this->type;\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "protected function getInputName(){\n if($this->_name===null)\n $this->defineNameId();\n return $this->_name;\n }", "protected function getNameInput()\n {\n if ($this->option('r')) {\n $name = trim($this->argument('name'));\n } else {\n $explode = explode('.', trim($this->argument('name')));\n $name = $explode[count($explode) - 1];\n }\n return Str::slug($name);\n }", "public function argument(string $key) : ?string\n {\n return $this->input->getArgument($key) ;\n }", "private function getArgumentString()\n {\n if (!is_null($this->getArguments()))\n {\n return $this->getArguments();\n }\n $strOut = \"\";\n if (count($this->getChildArguments())) {\n foreach ($this->getChildArguments() as $key => $argument) {\n $strOut .= ($key == 0 ? \"\": \" , \") . \"\\\"\" . $argument . \"\\\"\";\n }\n }\n return $strOut;\n }", "public function getName() {\n return $this->commandName;\n }", "protected function getNameInput()\n {\n return trim($this->argument('name') . 'Controller');\n }", "public function getProductId()\n {\n return $this->argumentName;\n }", "public function getName(): string\n {\n return $this->requireString('name');\n }", "public function getArgument($name, $default = null);", "public function name()\n\t{\n\t\treturn $this->array['name'] ?? '';\n\t}", "public function getNamedArrayArgument($name);", "public function getBindingMemberName();", "protected function getNameInput()\n {\n return Str::singular(parent::getNameInput());\n }", "public static function get_name() : string ;", "public static function get_name() : string ;", "public function getName()\n {\n return $this->options['name'];\n }", "protected function getStringArgument($name)\n {\n return (string) $this->argument($name);\n }", "public function getFirstArgument()\n {\n $tokens = $this->getTokens();\n \n foreach ($tokens as $token) {\n if ($token && '-' === $token[0]) {\n continue;\n }\n \n return $token;\n }\n }", "public function name() {\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function name()\n\t{\n\t\treturn $this->name;\n\t}", "public function getName(){\n return $this->game->get_current_turn()->ReturnName();\n }", "function _get_argument($name, $default = null) {\n $values = $this->_get_arguments($name);\n $len = count($values);\n if ( 0 < $len ) {\n return $values[$len - 1];\n }\n if (null == $default) {\n die(\"Missing argument $name\");\n }\n return $default;\n}", "public function getPathParamName()\n {\n return $this->path_param_name;\n }", "public function getNamedExpressionBagArgument($name);", "public function name() {\n\t\t// @version 1.2.0 Use filename then fallback to path\n\t\t$path = $this->data('name') ?: $this->path();\n\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "public function name()\n\t{\n\t\treturn $this->_name;\n\t}", "public function name()\n {\n if (isset($this->attributes[self::NAME])) {\n return $this->attributes[self::NAME];\n }\n\n return $this->path();\n }", "public function getFirstArgument()\n {\n return $this->input->getFirstArgument();\n }", "public function name($name = null)\n {\n if (is_null($name)) {return $this->name;}\n if (!is_string($name) || is_int(substr($name, 0, 1)) || $name == \"\") {\n $this->setMessageAndValueState(false, \"Invalid function name\");\n } else { $this->name = $name;}\n }", "public function getArg($key = 0)\n {\n return array_key_exists($key, $this->arguments) ? $this->arguments[$key] : null;\n }", "public function getArgument(string $key)\n {\n if ($this->hasArgument($key)) {\n return $this->arguments[$key];\n }\n\n throw new \\InvalidArgumentException(sprintf('Argument \"%s\" not found.', $key));\n }", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function getArgument()\n {\n return 'monitor';\n }", "protected function getNameInput()\n {\n return trim($this->option('name'));\n }", "public function get_name();", "public function get_name();", "public function get_name();", "public function getName()\n {\n return $this->action['name'] ?? null;\n }", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function getName()\n {\n return $this->attributes->name;\n }", "public function get_name() {\n\n\t\treturn $this->name;\n\t}", "public function name()\n {\n return $this->getName();\n }", "public function name()\n {\n return $this->getName();\n }", "public function getArgumentValue ($name) {\n if ($this->_arguments === NULL) {\n $this->getArguments();\n }\n\n if (array_key_exists($name, $this->_arguments) == FALSE) {\n throw new Argument_Exception(\"Argument '{$name}' does not exist\");\n }\n\n return $this->_arguments[$name];\n }", "function getName(): string;", "function getName(): string;", "public function getExtensionName() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName()\n {\n return $this->get(self::_NAME);\n }", "public function getName() {\n\t\treturn ($this->name);\n\t}", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName(): string\n {\n return $this->getAttributes()['name'];\n }" ]
[ "0.8020499", "0.7528213", "0.7449299", "0.73812276", "0.7208482", "0.70220524", "0.70007765", "0.6911079", "0.6855003", "0.68295294", "0.6786731", "0.67709744", "0.6730184", "0.6708383", "0.6702774", "0.66907597", "0.66811085", "0.6675296", "0.66687405", "0.6653385", "0.6636125", "0.66307294", "0.66182405", "0.660616", "0.6596323", "0.654939", "0.65431976", "0.6530528", "0.6522085", "0.6497216", "0.64965993", "0.6467734", "0.64423007", "0.641183", "0.63605636", "0.63565505", "0.6335228", "0.63078254", "0.6306168", "0.6301871", "0.62439203", "0.6233177", "0.62020683", "0.6193178", "0.6190744", "0.6178351", "0.61657923", "0.6162658", "0.61471844", "0.61409056", "0.61374253", "0.61374253", "0.61192626", "0.6115625", "0.6101882", "0.61011696", "0.6091695", "0.6091695", "0.6091695", "0.6082513", "0.6080718", "0.6073951", "0.60619634", "0.60619307", "0.60581464", "0.6031414", "0.6022614", "0.60116404", "0.6002743", "0.6001788", "0.60003054", "0.5995229", "0.59854424", "0.59851474", "0.59851474", "0.59851474", "0.59542435", "0.5950566", "0.5950566", "0.5950566", "0.5950566", "0.5947605", "0.59415174", "0.59340876", "0.59340876", "0.59334934", "0.5932037", "0.5932037", "0.59303796", "0.5924348", "0.5924348", "0.5924348", "0.5924348", "0.5924348", "0.5924348", "0.5924348", "0.591707", "0.59113556", "0.59113556", "0.59113556", "0.5907201" ]
0.0
-1
Returns whether or not the argument is optional.
public function isOptional() { return $this->_optional; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOptional(): bool\n {\n return $this->is_optional;\n }", "public function isOptional(): bool\n\t{\n\t\treturn $this->is_optional;\n\t}", "public function isOptionalWithNoDefault(): bool\n {\n if (((string)$this->parameter['choice']) !== 'opt' && !$this->isVariadic()) {\n return false;\n }\n if (!$this->hasDefaultValue()) {\n return true;\n }\n\n $initializer = $this->getInitializer();\n // Some default value have weird values. For instance, first parameter of \"mb_internal_encoding\" has default value \"mb_internal_encoding()\"\n if ($initializer === 'null' || ($initializer !== 'array()' && strpos($initializer, '(') !== false)) {\n return true;\n }\n return false;\n }", "public function isOptional(): bool\n {\n return $this->isOptional;\n }", "public function isOptional() {\n\t\treturn $this->optional;\n\t}", "public function isOptional()\n {\n return $this->optional;\n }", "public function isOptional()\n {\n return false;\n }", "public function isOptional()\n {\n return true;\n }", "public function isOptional()\n {\n return true;\n }", "public function isOptional()\n {\n return true;\n }", "public function isOptional() {\n return $this->_reflect->isOptional();\n }", "public function isOptional()\n {\n // TODO: Implement isOptional() method.\n }", "public function hasOptionalParameters()\n {\n foreach ($this->parameters as $parameter) {\n if (!$parameter->isRequired()) {\n return true;\n }\n }\n\n return false;\n }", "public function hasNoNamedArguments(): bool;", "public function hasOptionalEmbeddedField()\n {\n return $this->get(self::OPTIONAL_EMBEDDED_FIELD) !== null;\n }", "public function has_option() {\n return false;\n }", "public function isSaveOptional()\n {\n if ($this->getMethod()) \n {\n $configData = $this->getMethod()->getConfigData('save_optional');\n return $configData;\n }\n return false;\n }", "public function isRequired()\n\t{\n\t\treturn $this->getOption('required', false);\n\t}", "public function isOptional($field) {\n return !$this->isRequired($field);\n }", "public function getIsSpeakerOptional()\n {\n if (array_key_exists(\"isSpeakerOptional\", $this->_propDict)) {\n return $this->_propDict[\"isSpeakerOptional\"];\n } else {\n return null;\n }\n }", "public function hasArgs(): bool\n {\n return !empty($this->meta[Cli::ARGS]);\n }", "public function optIn() {\n return !empty($this->args['send_optin']);\n }", "function getOptionalInputParams_() {\n return $this->__inOptionalParams;\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function isMandatory(): bool\n {\n return $this->isMandatory;\n }", "private function expectOptionalKeyword(string $value) : bool\n {\n }", "public function getOptionalMode()\n {\n return isset($this->optional_mode) ? $this->optional_mode : '';\n }", "public function hasOpts(): bool\n {\n return !empty($this->opts);\n }", "public function hasOptions();", "public function hasParams()\r\n\t{\r\n\t\treturn (is_array($this->pathParameters) && !empty($this->pathParameters));\r\n\t}", "public function isMandatory() {\n\t\t$this->getMandatory();\n\t}", "public function setOptionalMode($var)\n {\n GPBUtil::checkString($var, True);\n $this->optional_mode = $var;\n\n return $this;\n }", "public function test_phone_returns_false_when_optional_input_not_phone() {\n\t\t$optional = true;\n\t\t$result = self::$validator->validate('not a phone num', $optional);\n\t\t$this->assertFalse( $result );\n\t}", "public function hasRequiredParameters()\n {\n foreach ($this->parameters as $parameter) {\n if ($parameter->isRequired()) {\n return true;\n }\n }\n\n return false;\n }", "public function getIsCommunicationSpeakerOptional()\n {\n if (array_key_exists(\"isCommunicationSpeakerOptional\", $this->_propDict)) {\n return $this->_propDict[\"isCommunicationSpeakerOptional\"];\n } else {\n return null;\n }\n }", "public function hasParameters()\n {\n return !empty($this->params);\n }", "public function isOpenParameter()\n\t{\n\t\treturn $this->_value == '...';\n\t}", "public function test_phone_returns_false_when_not_optional_input_not_phone() {\n\t\t$optional = false;\n\t\t$result = self::$validator->validate('not a phone num', $optional);\n\t\t$this->assertFalse( $result );\n\t}", "function get_optional_param($param, $default = '')\n{\n global $params;\n\n if (empty($params[$param]))\n return $default;\n\n return $params[$param];\n}", "public function hasArguments(): bool;", "function required_params()\n {\n $params = func_get_args();\n foreach ($params as $value) {\n if (is_array($value)) {\n if (empty($value)) {\n return false;\n }\n } else {\n if ($value === null || strlen(trim($value)) == 0) {\n return false;\n }\n }\n }\n\n return true;\n }", "function checkMandatoryArguments()\n \t{\n \t\tif($this->mStrAdGUID == \"\" || $this->mStrAdGUID == null)\n \t\t\treturn false;\n \t\telse if($this->mStrQuantity == \"\" || $this->mStrQuantity == null)\n \t\t\treturn false;\n \t\telse\n \t\t\treturn true;\n \t}", "function getIsMandatory() {\n\t\treturn $this->bIsMandatory;\n\t}", "final public function getRequired()\n {\n return (bool)$this->getOption('data-required');\n }", "public function test_callback_returns_false_when_not_optional_and_input_null() {\n\t\t$optional = false;\n\t\t$params = ['is_string'];\n\n\t\t$result = self::$validator->validate( null, $optional, $params );\n\t\t$this->assertFalse( $result );\n\t}", "public function hasParameters(){\n return $this->_has(2);\n }", "public function getOptionalParameters();", "public function isMandatory()\n {\n if ($this->value == 'yes') {\n return true;\n } else {\n return false;\n }\n }", "public function hasOptions() {\n\t\treturn count( $this->options ) > 0 ? true : false;\n\t}", "public function testIsOptional()\n {\n $warmer = new CachedDomainsListWarmer();\n $this->assertTrue($warmer->isOptional());\n }", "public function hasDefaults(): bool;", "public function hasOptItem(){\n return $this->_has(2);\n }", "public function getIsRequired(): bool;", "public function isRequired() : bool;", "public function hasOptionalAutoLabel();", "public function isFlag()\n {\n return is_null($this->value);\n }", "public function isEmpty()\n {\n return (!is_array($this->params) || count($this->params) == 0);\n }", "public function isOptions(): bool {}", "public function hasArg($name)\n {\n return isset($this->args[$name]);\n }", "public function hasOption(){\n return $this->_has(35);\n }", "public function hasAttr(){\n return (is_array($this->attr) && !empty($this->attr));\n }", "public function hasDefaultValue(): bool;", "public function getMandatory() {\n return $this->__isMandatory;\n }", "public function hasParams(){\n return $this->_has(8);\n }", "function isRequired()\n {\n return $this->required;\n }", "public function required()\n {\n return (true == @$this->data[\"required\"]);\n }", "public function isRequired()\n\t{\n\t\treturn (bool)$this->_required;\n\t}", "public function isRequired(): bool\n {\n return $this->required;\n }", "public function isRequired()\n {\n return $this->required;\n }", "public function checkRequired() {\n\t\tif(!func_num_args()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$optArr = func_get_args();\n\t\tforeach($optArr as $val) {\n\t\t\t$flag = $val;\n\t\t\t$altFlag = false;\n\n\t\t\tif(is_array($val)) {\n\t\t\t\tlist($flag, $altFlag) = array_values($val);\n\t\t\t}\n\n\t\t\tif(!$this->isFlagSet($flag, $altFlag)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function test_callback_returns_true_when_optional_and_input_null() {\n\t\t$optional = true;\n\t\t$params = ['is_string'];\n\n\t\t$result = self::$validator->validate( null, $optional, $params );\n\t\t$this->assertTrue( $result );\n\t}", "public static function getIsRequired()\n {\n return (bool) self::get('is_required', false);\n }", "public function getOptBool(string $name, ?bool $default = null): ?bool;", "public function isRequired() {\n return $this->is_required;\n }", "public function getIsRequired()\n {\n if (array_key_exists(\"isRequired\", $this->_propDict)) {\n return $this->_propDict[\"isRequired\"];\n } else {\n return null;\n }\n }", "public function getIsRequired()\n {\n if (array_key_exists(\"isRequired\", $this->_propDict)) {\n return $this->_propDict[\"isRequired\"];\n } else {\n return null;\n }\n }", "public function isRequired() {\n return $this->required;\n }", "public function hasArgument($name): bool;", "public function hasOpt(string $name): bool\n {\n return isset($this->opts[$name]);\n }", "function isNullable(): bool;", "public function hasParameter($index)\n {\n return (\n isset($this->parameters[$index])\n && $this->parameters[$index] != ''\n );\n }", "public function hasParameters()\n {\n return isset($this->parameters) && count($this->parameters) > 0;\n }", "protected function has_parameter( $name ) {\n\t\treturn ! empty( $this->parameters[ $name ] );\n\t}", "public function isNullable(): ?bool;", "function getOptionalInputFields() {\n return $this->__inOptionalFields;\n }", "public function isRequired() : bool\n {\n return $this->isRequired;\n }", "public function is_required() {\n\t\treturn isset( $this->data['required'] ) && $this->data['required'];\n\t}", "public function getIsDefault();", "public function hasParameters()\n {\n return isset($this->parameters);\n }", "public function isRequired()\n {\n return (1 == $this->_required);\n }", "public function isRequired() {\n return $this->requirement->required;\n }", "public function IsRequired()\n {\n return $this->IsRequired;\n }", "function mOPTIONAL(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$OPTIONAL;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:196:3: ( 'optional' ) \n // Tokenizer11.g:197:3: 'optional' \n {\n $this->matchString(\"optional\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public static function isGet()\n {\n return !empty($_GET);\n }", "public function isMissing() {}", "public function getRequired(): bool;" ]
[ "0.7756063", "0.77464664", "0.770472", "0.7703611", "0.7614535", "0.7589106", "0.75804365", "0.7558385", "0.7558385", "0.7558385", "0.7545247", "0.7489644", "0.70863193", "0.6385253", "0.63750404", "0.6317782", "0.62666124", "0.6219994", "0.6182363", "0.61731285", "0.6128209", "0.60535794", "0.6023564", "0.60169435", "0.60169435", "0.60169435", "0.60169435", "0.60169435", "0.5948935", "0.59375405", "0.59271514", "0.5891201", "0.5857967", "0.5772419", "0.57619214", "0.57339543", "0.5732687", "0.57202077", "0.5701428", "0.5697968", "0.5695973", "0.56898844", "0.56825477", "0.5659278", "0.5639966", "0.56338644", "0.5623762", "0.55976814", "0.5586354", "0.5576708", "0.5568475", "0.5563076", "0.5555768", "0.5550326", "0.55413747", "0.55379647", "0.55354655", "0.5523598", "0.55223954", "0.5515566", "0.5504986", "0.55023164", "0.5501875", "0.54958826", "0.54846996", "0.5479917", "0.54733276", "0.54724205", "0.54529566", "0.54450893", "0.5428287", "0.54193246", "0.5416614", "0.54046065", "0.54042923", "0.54003584", "0.5399672", "0.53971106", "0.53936934", "0.53936934", "0.5387098", "0.5386163", "0.5383594", "0.5378027", "0.5377285", "0.5367954", "0.53623885", "0.5358561", "0.5354234", "0.5354058", "0.5351172", "0.5328474", "0.53249526", "0.53247285", "0.5306593", "0.5304812", "0.5294845", "0.52921224", "0.5291618", "0.5288202" ]
0.7556658
10
Returns the description of the argument.
public function getDescription() { return $this->_description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArgumentDescription(string $name)\n {\n return $this->arguments_infos[$name]['description'] ?? null;\n }", "public function getDesciption();", "public function getArgument()\n {\n return 'help';\n }", "public function description();", "public function description();", "function descriptor_def()\n {\n return \"[description]\";\n }", "public function getDescription()\n {\n return $this->getParameter('description');\n }", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "function getDescription()\n {\n return $this->command_description;\n }", "public function description(): string;", "public function description(): string;", "public static function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription(): string;", "public function getDescription(): string;", "public function getDescription(): string;", "public function getDescription(): string;", "public function getDescription(): string;", "public function getDescription(): string;", "public abstract function getDescription();", "public function getDescription():string;", "public function description()\r\n {\r\n }", "public function getDescription()\n {\n return 'Developer at Afrihost. Design Patterns acolyte. Dangerous sysadmin using \\'DevOps\\' as an excuse. I like '.\n 'long walks on the beach and craft beer.';\n }", "function getDescription() ;", "abstract public function getDescription();", "abstract public function getDescription();", "function defineDescription() {\n return 'List all available commands with a short description';\n }", "abstract function getDescription();", "function getDescription();", "public function commandDescription()\n {\n return 'DALI';\n }", "public static function getDescription(): string\n {\n }", "public static function getDescription(): string\n {\n }", "public function getDescription(): string\n {\n }", "public function get_field_description(array $args) : string\n {\n }", "public static function getDescription()\n {\n return self::$description;\n }", "public function description(): string\n {\n return $this->description;\n }", "public function getDescription(): string {\n return \"$this->description\";\n }", "public function description()\n\t{\n\t\treturn $this->description;\n\t}", "public function description() {\n return 'I am garlic sandwich';\n }", "public static function getDescription(): string\n {\n return static::$description;\n }", "abstract public function description(): string;", "public function getDescription(): string\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\n {\n return $this->description;\n }", "public function getDescription(): string\r\n {\r\n return $this->description;\r\n }", "public function description()\n {\n\n return static::$description;\n\n }", "public function getDescription()\n {\n return;\n }", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "function description( )\r\n {\r\n return $this->Description;\r\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function get_description()\n {\n if ( isset($this->description) )\n return $this->description;\n\n return \"Defines the {$this->name}\";\n }", "public function getDescription() : string\n {\n return $this->_description;\n }", "public function getDescription()\n { \n return $this->description;\n }", "public function getDescription() : string\n {\n return $this->description;\n }", "public function getDescription() : string\n {\n return $this->description;\n }", "public function getDescription() : string\n {\n return $this->description;\n }" ]
[ "0.7468813", "0.736365", "0.7134319", "0.71240115", "0.71240115", "0.7051037", "0.70207334", "0.70033085", "0.70033085", "0.70033085", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.70024264", "0.6997783", "0.699518", "0.699518", "0.6946803", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.69438255", "0.6932202", "0.6932202", "0.6932202", "0.6932202", "0.6932202", "0.6932202", "0.69091195", "0.6866344", "0.68288225", "0.6816873", "0.681159", "0.67905754", "0.67905754", "0.67878544", "0.67625016", "0.6752133", "0.67306083", "0.67291063", "0.67291063", "0.6723282", "0.6712625", "0.67012995", "0.669434", "0.6692895", "0.66851866", "0.66779757", "0.667302", "0.6664303", "0.66640335", "0.665235", "0.665235", "0.665235", "0.665235", "0.665235", "0.665235", "0.665235", "0.665235", "0.6648303", "0.6643514", "0.6620919", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.66000587", "0.6596083", "0.65948117", "0.65871376", "0.65836495", "0.65749514", "0.6570952", "0.6570952", "0.6570952" ]
0.0
-1
Run a where clause on the model
public function where($column, $operator, $value) { $this->model = $this->model->where($column, $operator, $value); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function user_where_clause() {}", "protected function getWhereClause() {}", "public function get_where()\n {\n }", "public function get_where()\n {\n }", "public function where()\n {\n return $this->query; \n }", "protected function getGeneralWhereClause() {}", "function dbWhereVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->where($this->model.'.'.$f,$this->$f);\n }\n\n }", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\t$expr = array_shift($args);\r\n\t\tarray_push($this->_wheres, '(' . $this->_parameterize($expr, $args) . ')');\r\n\t\t$this->_dirty = true;\r\n\t}", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $args);\r\n\t}", "static function where(){\r\n\t\t$arr = func_get_args();\r\n\t\t// tao ra lop static \r\n\t\t$model = new static();\r\n\t\t$tb = call_user_func_array(array($model->mask(), 'where'), $arr);\r\n\r\n\t\treturn $model;\r\n\t}", "protected function getWhereAttribute()\n {\n return $this->fetchData[self::WHERE_CLAUSE];\n }", "protected function getWhereClauseForEnabledFields() {}", "public function getWhereSQL()\n {\n return \" AND \" . $this->field_where_name . \" LIKE '%\" . $this->field_row->criteria . \"%' \";\n \n }", "public function getWhere()\n {\n return $this->where;\n }", "function getWhere() {\n return $this->where;\n }", "abstract public function where(array $where);", "public function getWhere() {\r\n return $this->_where;\r\n }", "public function where($clause, array $params);", "public function getTableWhere() {}", "public function getWhereClause()\n {\n return $this->where_clause;\n }", "public function where()\n {\n $args = func_get_args();\n $num_args = count($args);\n \n // Custom queries\n if ( $num_args == 2 && is_array($args[1]) )\n {\n $this->where = $args[0];\n $this->params = $args[1];\n }\n else\n {\n // AND equality condition\n if ( $num_args == 2 )\n {\n list($field, $value) = $args;\n $op = '=';\n }\n // AND with custom operation condition\n else\n {\n list($field, $op, $value) = $args;\n }\n $this->appendWhere('AND', $field, $op, $value); \n }\n return $this;\n }", "private function sql_where($filter, $structure) {\n\t\t$pool_class = $structure['class'] . 'Pool_Model';\n\t\t$visitor = new $this->sql_builder_visitor_class_name(array($pool_class, \"map_name_to_backend\"));\n\t\t$sql = \" WHERE \".$filter->visit($visitor, false);\n\t\treturn $sql;\n\t}", "public static function doCarModelWhere($query, $where = array())\n {\n if ($query) {\n if (count($where) > 0) {\n foreach ($where as $w_key => $w_value) {\n if (!is_null(trim($w_value))) {\n $query->where($w_key, $w_value);\n }\n }\n }\n }\n }", "public function getWhere() {\n return $this->_where ?: new Predicate(Predicate::ALSO);\n }", "protected function construct_where_clause() {\n\t\t\t$whereclause = $this->get_where_clause();\n\t\t\tif ( '' !== $whereclause ) {\n\t\t\t\t$this->where = '' === $this->where ? \" where ($whereclause) \" : \" {$this->where} and ($whereclause) \";\n\t\t\t}\n\t\t}", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "public function filter()\n {\n list($column, $operator, $value, $boolean) = func_get_args();\n empty($operator) && $operator = null;\n empty($value) && $value = null;\n empty($boolean) && $boolean = null;\n if($this->hasFilter) {\n $this->model = $this->model->where($column, $operator, $value, $boolean);\n } else {\n $this->model = $this->model->newQuery()->where($column, $operator, $value, $boolean);\n $this->hasFilter = true;\n }\n\n return $this;\n }", "private function sql_whereWiHits()\n {\n // Get WHERE statement\n $where = $this->pObj->objSqlInit->statements[ 'listView' ][ 'where' ] .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS();\n // Localise the WHERE statement\n $where = $this->sql_whereWiHitsLL( $where );\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "public function getWhere()\n\t{\n\t\tif(empty($this->sWhere))\n\t\t{\n\t\t\treturn 'TRUE';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->sWhere;\n\t\t}\n\t}", "public function where()\n {\n $bindings = func_get_args();\n $sql = array_shift($bindings);\n\n $this->addToBindings($bindings);\n $this->wheres[] = $sql;\n\n return $this;\n }", "public static function where($config)\n\t{\n\t\treturn self::new_instance_records()->where($config);\n\t}", "public function where($where, $data=null) {\n\t\treturn parent::where($where, $data);\n\t}", "public function where()\r\n {\r\n $arguments = func_get_args();\r\n $columnName = array_shift($arguments);\r\n $column = $this->getColName($columnName);\r\n if(isset($arguments[2]))\r\n {\r\n $namedCondition = $arguments[2];\r\n unset($arguments[2]);\r\n }\r\n else\r\n {\r\n $namedCondition = null;\r\n }\r\n list($value, $comparison) = self::getValueAndComparisonFromArguments($arguments);\r\n $this->addCondition('and', $column, $comparison, $value, $namedCondition);\r\n \r\n return $this;\r\n }", "public function whereComplex()\n {\n return $this->addComplexCondition('and', $this->conditions);\n }", "public static function where(array $where);", "public function getWhere($where, Database_Config $databaseConfig = NULL);", "public function Where()\n {\n return $this->where;\n }", "public function loadDefaultWhere()\n {\n if ($this->data) {\n if (static::$primaryKey === null) {\n return $this;\n }\n $primaryKey = is_array(static::$primaryKey) ? static::$primaryKey : [static::$primaryKey];\n $cond = '';\n $values = [];\n foreach ($primaryKey as $field) {\n $cond .= ($cond !== '' ? ' AND ' : '') . $field . ' = ?';\n $values[] = $this->data[$field] ?? null;\n }\n $this->where($cond, $values);\n }\n return $this;\n }", "public function where($cond){\n\t$this->where.=\"WHERE(\".$cond.\")\";\n\t\treturn $this;\n\t}", "public function where(): Where\n {\n if (!isset($this->where)){\n $this->where = new Query\\Where($this, $this->driver, $this->topQuery);\n }\n return $this->where; \n }", "public function where($table,$column,$data = \"\");", "public function find(array $where);", "public function where(array $params)\n {\n }", "protected function filter(&$query)\n {\n if (!empty($this->filterModel)) {\n if (isset($this->filterModel->status_id)) {\n $query->andWhere(['status' => $this->filterModel->status_id]);\n }\n }\n }", "function where($s)\n{\n\t$this->tryModify();\n\tif(!isset($this->query['where'])) $this->query['where'] = array();\n\t$this->query['where'][] = $this->setWhereParams($s, func_get_args(), 1);\n\treturn $this;\n}", "public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}", "public function hasWhere()\n {\n return $this->_has('_where');\n }", "abstract public function filterWhere(Builder $dataSource);", "public function where($sql)\n {\n $this->where[] = call_user_func_array('self::clause', func_get_args());\n return $this;\n }", "public function where($field, $value) {\n\t$this->parseQuery->where($field, $value);\n }", "function tck_admin_list_where($where) {\n if ( isset($_GET['custom_filter']) ) {\n $mode = $_GET['custom_filter'];\n \n if ( $mode == 1 ) $where .= ' AND `' . TCK_COLUMN . '` = 0';\n if ( $mode == 2 ) $where .= ' AND `' . TCK_COLUMN . '` = 1';\n }\n \n return $where;\n }", "public function sectionTableWhere() {}", "public function sectionTableWhere() {}", "function mWHERE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$WHERE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:156:3: ( 'where' ) \n // Tokenizer11.g:157:3: 'where' \n {\n $this->matchString(\"where\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function where($where=array())\n\t\t{\n\t\t\tif( is_array($where) && !empty($where)){\n\n\t\t\t\tforeach( $where as $k => $val ){\n\n\t\t\t\t\t// name = 'jack'\n\t\t\t\t\t// id > 1\n\t\t\t\t\t if( is_array($val) ){\n\n\t\t\t\t\t \t$type = $val[0];\n\n\t\t\t\t\t \tswitch($type){\n\t\t\t\t\t \t\tcase 'lt':\n\t\t\t\t\t \t\t\t$result[] = \"{$k} < {$val[1]} \";\n\t\t\t\t\t \t\t\tbreak;\n\t\t\t\t\t \t\tcase 'gt':\n\t\t\t\t\t \t\t\t$result[] = \"{$k} > {$val[1]} \";\n\t\t\t\t\t \t\t\tbreak;\n\t\t\t\t\t \t}\n\t\t\t\t\t \t\n\t\t\t\t\t }else{\n\n\t\t\t\t\t \t$result[] = \"{$k} = '{$val}'\";\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\t$this->where = 'where '.implode(' and ', $result);\n\t\t\t}\n\t\t\t\n\t\t\treturn $this;\n\t\t}", "public function whereWrap()\n {\n $where = $this->_dqlParts['where'];\n\n if (count($where) > 0)\n {\n array_unshift($where, '(');\n array_push($where, ')');\n\n $this->_dqlParts['where'] = $where;\n }\n\n return $this;\n }", "public function getWhereClause() {\n\n\tif (isset($this->filters) && !empty($this->filters)) {\n\t\t// $aClause = array();\n\t\t// $aOperators = array();\n\t\t$sClause = '';\n\t switch ($this->type) {\n\t\tcase 0:\n\t\tcase 4:\n\t\tdefault:\n\t\t \n\t\t $aWhere = $this->getFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where($key, $value);\n\t\t\t\t $sClause .= $key . ' = ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 1:\n\t\t $aWhere = $this->getLikeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_like($key, $value);\n\t\t\t\t $sClause .= $key . ' LIKE ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 2:\n\t\t $aWhere = $this->getRangeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 3:\n\t\t $aWhere = $this->getInFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t\t$sClause .= $key . ' IN (' . implode(',',$value) . ')' . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t // $this->model->where_in($key, $value);\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 5:\n\t\t $aWhere = $this->getInRawFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 6:\n\t\t $aWhere = $this->getDependendFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($value, array());\n\t\t\t\t $sClause .= $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t }\n\t}\n\treturn $sClause;\n\t// return $this->model;\n }", "public static function where($column, $value)\n {\n self::select(self::tableName(), $column .'='. $value);\n if (!self::$instance) {\n self::$instance = new AbstractModel();\n }\n return self::$instance;\n }", "protected function getWhere(): string\n {\n return ($this->where && !$this->where->isEmpty() ? \"\\r\\nWHERE \".$this->where : \"\");\n }", "public function sqlWhere()\n {\n if ($this->isMultilingualAttribute()) {\n $strWhere = 'IFNULL(translation.' . $this->arrConfig['attribute'] . ', ' . Product::getTable() . '.' . $this->arrConfig['attribute'] . ')';\n } else {\n $strWhere = Product::getTable() . '.' . $this->arrConfig['attribute'];\n }\n\n $strWhere .= ' ' . $this->getOperatorForSQL() . ' ?';\n\n return $strWhere;\n }", "public function beforeFind(EventInterface $event, Query $query, ArrayObject $options, $primary)\n\t{\n // $query->iterateClause(function($val) {\n // if($val->getField()){\n // dump($val->getField());\n // }\n \n // }); \n //dd($conds);\n // dd($query->clause('where'));\n $model = $this->_table->getAlias();\n\t $query->where([$model.'.listing_id' => \\Cake\\Core\\Configure::read('LISTING_ID')]);\n\t}", "public function findWhere(array $conditions);", "public function getWhere()\n\t\t{\n\t\t\treturn $this->hasWhere() ? (string)$this->where : '';\n\t\t}", "function where($sql, $params = []) {\n\t\tif (gettype($sql) == 'array') {\n\t\t\t$cols = array();\n\t\t\tforeach ($sql as $col => $val) {\n\t\t\t\t$cols[] = \"`$col` = ?\";\n\t\t\t\t$params[] = $val;\n\t\t\t}\n\t\t\t$sql = implode($cols, \" AND \");\n\t\t}\n\t\t\n\t\tisset($this->stmts['where']) ? $sql = \"AND $sql\" : $sql = \"WHERE $sql\";\n\t\treturn $this->appendStmt('where', $sql, $params);\n\t}", "protected abstract function getWhereClause(array $conditions);", "public function scopeQuery($query)\n {\n // $query->where();\n }", "public function findBy(array $where = []);", "public function apply(Builder $model) {\n // get table\n $table = $model->getModel()->getTable();\n\n // filter for status\n $model->where(\"$table.$this->field\", $this->value);\n\n return $model;\n }", "public function whereall() {\n\t\t\treturn 'id=id';\n\t\t}", "public function where($arr){//ex of $arr : ['name' => 'LIKE A%','email' => '= [email protected]']\n $c = \"\";\n $x = 0;\n foreach($arr as $key => $v){//for each param, translate to SQL language\n if($x != 0){\n $c .= \" AND\";\n }\n $x++;\n $c .= \" $key $v\";\n }\n $this->params[\"WHERE\"] = $c;//adding the conditions to the query\n return $this;\n }", "public function where($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);", "protected function _buildWhere(&$query)\n {\n\n return $query;\n }", "public function findOne(array $where);", "private function sql_whereAllItems()\n {\n $where = '1 ' .\n $this->sql_whereAnd_pidList() .\n $this->sql_whereAnd_enableFields() .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS() .\n $this->sql_whereAnd_sysLanguage();\n // Get WHERE statement\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "protected function applySiteConditions()\n {\n if ($this->site !== null) {\n $this->andWhere(Db::parseParam('siteId', $this->parseSiteValue($this->site)));\n }\n }", "public function where($whereClause = null)\r\n\t\t{\r\n\t\t\tif($whereClause != null and $whereClause != 'false'){\r\n\t\t\t\tif($this->_where != '') $this->_where .= ' ' . $whereClause;\r\n\t\t\t\telse $this->_where = ' WHERE ' . $whereClause;\r\n\t\t\t}\r\n\t\t\telse if($whereClause == 'false'){\r\n\t\t\t\t//this is used as a bypass on some methods\r\n\t\t\t\t$this->_where = 'false';\r\n\t\t\t}\r\n\t\t\treturn $this;\r\n\t\t}", "final public function whereTable()\n {\n $return = null;\n $attr = $this->attributes();\n\n if(is_array($attr) && array_key_exists('where',$attr))\n {\n $return = $attr['where'];\n\n if(!empty($return) && static::isCallable($return))\n $return = $return($this);\n }\n\n return $return;\n }", "abstract protected function getWhereForRow($data);", "private function appendWhere()\n\t{\n\t\t$whereCount = count($this->where);\n\n\t\tfor($i = 0; $i < $whereCount; $i++)\n\t\t{\n\t\t\t$where = $this->where[$i];\n\n\t\t\tif($i == 0)\n\t\t\t{\n\t\t\t\t$this->queryString .= self::WHERE;\n\t\t\t}\n\n\t\t\t$this->queryString .= $where->getCondition();\n\n\t\t\tif($i < $whereCount-1)\n\t\t\t{\n\t\t\t\t$this->queryString .= \" \" . $where->getOperator() . \" \";\n\t\t\t}\n\t\t}\n\t}", "public function where(callable $predicate);", "public function query(ActionDataTable $model)\n {\n //return $model->newQuery();\n $data = Action::select();\n return $this->applyScopes($data);\n }", "public abstract function getCriteriaWhere($criteria);", "private function sql_whereAnd_fromTS()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS value\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\n\n if ( !empty( $andWhere ) )\n {\n $andWhere = \" AND \" . $andWhere;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }", "protected function where(array $filter){\n if (array_key_exists(\"order\", $filter)){\n $order = $filter[\"order\"];\n unset($filter[\"order\"]);\n if (gettype($order) != \"array\")\n $order = [$order];\n }\n\n if (array_key_exists(\"limit\", $filter)){\n $limit = $filter[\"limit\"];\n unset($filter[\"limit\"]);\n if (gettype($limit) != \"integer\")\n throw new appException(\"This is off-limits, literally\");\n }\n\n if (!empty($filter)){\n $query = \" WHERE \";\n\n foreach ($filter as $k => $v){\n if (gettype($v) == \"array\"){\n $query .= $this->genTableVar($k) . \" IN ( \";\n $query .= join(\", \", array_fill(0, count($v), \"?\"));\n $query .= \") AND \";\n }\n else if (gettype($v) == \"object\" && get_class($v) == \"dbContains\"){\n $query .= $v->genSql($this->genTableVar($k)) . \" AND \";\n }\n else {\n $query .= $this->genTableVar($k) . \" = ? AND \";\n }\n $this->args[] = $v;\n }\n\n $query = substr($query, 0, -4);\n\n $this->query .= $query;\n }\n\n if (isset($order))\n $this->orderBy($order);\n\n if (isset($limit))\n $this->limit($limit);\n }", "public function whereRaw($field){\n return $this->model->whereRaw($field);\n }", "protected function checkIfWhere($where){\n\t\t\tif($where){//if this where is set, use it\n\t\t\t\t$this->where($where);\n\t\t\t}\n\t\t\tif(!$this->where){//check if where condition is set, use default if not\n\t\t\t\t$this->where(true);//Default where uses the id\n\t\t\t}\n\t\t}", "public function apply()\n {\n $condition = ($this->index) ? $this->condition : 'and';\n\n // Null value check\n if ($this->operator == 'null') {\n return $this->builder->whereNull($this->field, $condition);\n }\n\n // Add not null check\n if ($this->operator == 'not null') {\n return $this->builder->whereNotNull($this->field, $condition);\n }\n\n if ($this->operator == 'between') {\n return $this->builder->whereBetween($this->field, $this->value, $condition);\n }\n\n if ($this->operator == 'in') {\n return $this->builder->whereIn($this->field, $this->value, $condition);\n }\n\n if ($this->operator == 'not in') {\n return $this->builder->whereNotIn($this->field, $this->value, $condition);\n }\n\n if ($this->operator == 'contains') {\n return $this->builder->where($this->field, 'like', \"%{$this->value}%\", $condition);\n }\n\n if ($this->operator == 'has') {\n return $this->builder->has($this->field);\n }\n\n if ($this->operator == 'doesnt have') {\n return $this->builder->doesntHave($this->field);\n }\n\n return $this->builder->where($this->field, $this->operator, $this->value, $condition);\n }", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function andWhere() {\r\n\t\t$args = func_get_args();\r\n\t\t$statement = array_shift($args);\r\n\t\t//if ( (count($args) == 1) && (is_null($args[0])) ) {\r\n\t\t//\t$this->_wheres = array();\r\n\t\t//\treturn null;\r\n\t\t//}\r\n\t\t$criteria = new Dbi_Sql_Criteria($this, new Dbi_Sql_Expression($statement, $args));\r\n\t\t$this->_wheres[] = $criteria;\r\n\t\treturn $criteria;\r\n\t}", "public function whereClause(){\n try {\n // Sparql11query.g:117:3: ( ( WHERE )? groupGraphPattern ) \n // Sparql11query.g:118:3: ( WHERE )? groupGraphPattern \n {\n // Sparql11query.g:118:3: ( WHERE )? \n $alt15=2;\n $LA15_0 = $this->input->LA(1);\n\n if ( ($LA15_0==$this->getToken('WHERE')) ) {\n $alt15=1;\n }\n switch ($alt15) {\n case 1 :\n // Sparql11query.g:118:3: WHERE \n {\n $this->match($this->input,$this->getToken('WHERE'),self::$FOLLOW_WHERE_in_whereClause412); \n\n }\n break;\n\n }\n\n $this->pushFollow(self::$FOLLOW_groupGraphPattern_in_whereClause415);\n $this->groupGraphPattern();\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 }", "public function clearCondition(){\n\t\t$this->where=\"\";\n\t}", "function get_where($where = array(), $limit = NULL, $offset = NULL)\r\n\t{\r\n\t\t$this->where($where);\r\n\r\n\t\treturn $this->get($limit, $offset);\r\n\t}", "function get_where($data) {\n\t\t$query = $this->db->get_where('realisasi_skp',$data);\n\t\treturn $query->result();\t\t\n\t}", "public function newModelQuery();", "public function query(fornecedor $model)\n {\n if(method_exists($model, 'relationsName') && count($model->relationsName()) > 0){\n return $model->newQuery()->with($model->relationsName());\n }\n else {\n return $model->newQuery();\n }\n }", "public function andWhere($where): QueryBuilderInterface;", "function _where($key, $value = NULL, $type = 'AND ', $escape = NULL)\r\n\t{\r\n\t\tif ( ! is_array($key))\r\n\t\t{\r\n\t\t\t$key = array($key => $value);\r\n\t\t}\r\n\r\n\t\t// Check if this is a related object\r\n\t\tif ( ! empty($this->parent))\r\n\t\t{\r\n\t\t\tforeach ($key as $k => $v)\r\n\t\t\t{\r\n\t\t\t\t$key[$this->table . '.' . $k] = $v;\r\n\t\t\t\tunset($key[$k]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->db->_where($key, $value, $type, $escape);\r\n\r\n\t\t// For method chaining\r\n\t\treturn $this;\r\n\t}", "public function apply(ModelCriteria $query);", "public function where($field, $predicate): self;", "public function andWhere($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);" ]
[ "0.78998375", "0.7438508", "0.6932724", "0.6932724", "0.67543554", "0.67328036", "0.671743", "0.66543144", "0.66063064", "0.641732", "0.63887554", "0.63860345", "0.63859564", "0.6313233", "0.6309325", "0.62716174", "0.626954", "0.6208567", "0.62018794", "0.6199045", "0.61752945", "0.61730635", "0.6146563", "0.61318207", "0.6114578", "0.60980403", "0.6089188", "0.6081786", "0.6070637", "0.6026057", "0.602372", "0.6021783", "0.599711", "0.5995717", "0.5989413", "0.59849447", "0.5978801", "0.59774655", "0.5971527", "0.5968993", "0.5957332", "0.5952516", "0.5949167", "0.59450954", "0.59441924", "0.59407246", "0.58906627", "0.58705986", "0.58614385", "0.5842681", "0.5841472", "0.58275044", "0.58275044", "0.5820666", "0.5819035", "0.5816229", "0.58128065", "0.5812396", "0.5804342", "0.580254", "0.57806206", "0.5779761", "0.57479924", "0.5747295", "0.5740976", "0.5738731", "0.5738008", "0.5735419", "0.57263637", "0.572056", "0.5720299", "0.5719408", "0.56939936", "0.56905776", "0.56854755", "0.56851697", "0.56827164", "0.5673518", "0.5666608", "0.56584734", "0.5650518", "0.5639146", "0.56279945", "0.5624355", "0.5622363", "0.56221324", "0.561317", "0.5612678", "0.56105685", "0.5608246", "0.55956584", "0.5593047", "0.5592049", "0.5579888", "0.557668", "0.5575886", "0.55716294", "0.557142", "0.554596", "0.55366653", "0.5533803" ]
0.0
-1
Tun a where in clause on the model.
public function whereIn($column, $values, $boolean = 'and', $not = false) { $this->model = $this->model->whereIn($column, $values, $boolean, $not); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _in($model, $as_array = FALSE)\n\t{\n\t\t$result = Jelly::select($this->through['model'])\n\t\t\t\t->select($this->through['columns'][1])\n\t\t\t\t->where($this->through['columns'][0], '=', $model->id());\n\n\t\tif ($as_array)\n\t\t{\n\t\t\t$result = $result\n\t\t\t\t\t\t->execute(Jelly::meta($model)->db())\n\t\t\t\t\t\t->as_array(NULL, $this->through['columns'][1]);\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function user_where_clause() {}", "public function whereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHEREIN][$field] = [self::OPERATORS['in'] => $value];\n return $this;\n }", "public function whereIn($values);", "public function whereIn($column, $value)\n {\n }", "public function whereIn($field=null,$value=null,$model=null){\n if($this->model==null){\n $this->model=$value;\n }\n\n if(is_array($field) && array_key_exists(1,$field)){\n if(is_array($field[1])){\n $this->whereIn['field']=$field[0];\n $this->whereIn['operator']='=';\n $this->whereIn['value']=implode(\",\",$field[1]);\n }\n\n }\n else{\n if(is_array($value)){\n $this->whereIn['field']=$field;\n $this->whereIn['operator']='=';\n $this->whereIn['value']=implode(\",\",$value);\n }\n\n }\n\n return $this;\n }", "public function whereIn($column, $values);", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function orWhereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n if (!is_array($value)) {\n $value = [$value];\n }\n return $this->addOrWhereStack([$field => [self::OPERATORS['in'] => $value]]); \n }", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\t$expr = array_shift($args);\r\n\t\tarray_push($this->_wheres, '(' . $this->_parameterize($expr, $args) . ')');\r\n\t\t$this->_dirty = true;\r\n\t}", "abstract public function where(array $where);", "protected function getWhereClause() {}", "protected function whereIn(Builder $builder, $where): string\n {\n if (empty($where['values'])) return '0 = 1';\n \n return $this->wrap($where['column']).' in ('.$this->parameterize($where['values']).')';\n }", "function where_in($key = NULL, $values = NULL)\r\n\t{\r\n\t \treturn $this->_where_in($key, $values);\r\n\t}", "public function fetchIn( array $in, $condition = array(), $params = null )\n {\n\n if( !$params )\n $params = new TFlowFlag();\n\n $this->sourceSize = null;\n $db = $this->getDb();\n\n $criteria = $db->orm->newCriteria();\n\n $this->setCols( $criteria );\n $this->setTables( $criteria );\n\n\n $criteria->whereIn($in);\n $this->appendConditions( $criteria, $condition, $params );\n $this->checkLimitAndOrder( $criteria, $params );\n\n // Run Query und save the result\n $this->result = $db->orm->select( $criteria );\n $this->calcQuery = $criteria->count('count(project_task.'.Db::PK.') as '.Db::Q_SIZE);\n\n }", "public function whereIn(string $field, array $values, array $options = []);", "public function where_emp_in($emp) {\n\t\t$this->db->where_in('ID', $emp);\n\t}", "protected function whereInRaw(Builder $builder, $where): string\n {\n if (empty($where['values'])) return '0 = 1';\n \n return $this->wrap($where['column']).' in ('.implode(', ', $where['values']).')';\n }", "public static function where(array $where);", "public function in($column,$val);", "public static function whereIn($column, array $values);", "public function whereIn($key, $value = null) {\n if(!$this->where_in) {\n $this->where_in = array();\n }\n if(!is_array($key)) {\n $key = array($key => $value);\n }\n foreach($key as $k => $v) {\n $this->where_in[$k] = $v;\n }\n return $this;\n }", "public function modifyWhere(&$sql, $table = 'listings')\n {\n if (!$this->geo_filter_data['applied_location']\n || !$this->geo_filter_data['is_filtering']\n ) {\n return;\n }\n\n if (!$sql) {\n $sql = &$GLOBALS['sql'];\n }\n\n $data_key = $table == 'accounts' ? 'location_account_fields' : 'location_listing_fields';\n $data = $this->geo_filter_data[$data_key];\n\n // Return if location search already performed from the search form\n if (strpos($sql, key($this->geo_filter_data[$data_key]))) {\n return;\n }\n\n foreach ($data as $field => $value) {\n if ($value) {\n $sql .= \"AND `T1`.`{$field}` = '{$value}' \";\n }\n }\n }", "public function inValue(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_IN;\n\n return $this;\n\n }", "protected function whereIn(Builder $query, array $where)\n {\n if (!empty($where['values'])) {\n return $this->wrap($where['column']) . ' in (' . $this->parameterize($where['values']) . ')';\n }\n\n return '0 = 1';\n }", "static function where(){\r\n\t\t$arr = func_get_args();\r\n\t\t// tao ra lop static \r\n\t\t$model = new static();\r\n\t\t$tb = call_user_func_array(array($model->mask(), 'where'), $arr);\r\n\r\n\t\treturn $model;\r\n\t}", "function get_table_where_in_Q( $select_data, $where_data, $table){\n \n\t\t$this->db->select($select_data);\n\t\t$this->db->where_in('Q_id',$where_data);\n\t\t$query = $this->db->get($table); //--- Table name = User\n\t\t$result = $query->result_array(); \n\t\treturn $result;\t\n }", "public function whereIn($field, $data = array()){\n return $this->model->whereIn($field, $data);\n }", "public function apply($model, RepositoryInterface $repository)\n {\n return $model->whereIn($this->field,$this->data);\n }", "function dbWhereVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->where($this->model.'.'.$f,$this->$f);\n }\n\n }", "function jp_search_filter( $query ) {\n if ( $query->is_search && $query->is_main_query() ) {\n $query->set( 'post__not_in', array( 22,23,24,25 ) );\n }\n}", "protected function whereIn(Builder $query, $where)\n {\n $values = $this->valufy($where['values']);\n\n return $this->wrap($where['column']).' IN '.$values;\n }", "public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}", "private function _setFilter(UniqueObject $request, &$queryParams) {\n\t\t$i = 0;\n\t\t$clauseType = Clause::CONJUNCTION;\n\t\tif (isset($queryParams[self::CLAUSE])) {\n\t\t\t$clauseType = $queryParams[self::CLAUSE];\n\t\t\tunset($queryParams[self::CLAUSE]);\n\t\t}\n\t\t$clause = ModelManager::getInstance()->getInstanceModel('Comhon\\Logic\\Simple\\Clause')->getObjectInstance(false);\n\t\ttry {\n\t\t\t$clause->setValue('type', $clauseType);\n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new ImportException($e, self::CLAUSE);\n\t\t}\n\t\t$clause->setId($i++);\n\t\t$simpleCollection = $request->initValue('simple_collection');\n\t\t$elements = $clause->initValue('elements', false);\n\t\t\n\t\tforeach ($queryParams as $propertyName => $value) {\n\t\t\t$isArrayFilter = is_array($value);\n\t\t\t$property = $this->requestedModel->getProperty($propertyName, true);\n\t\t\t$literal = LiteralBinder::getLiteralInstance($property, $isArrayFilter);\n\t\t\t$propertyModel = $property->getLiteralModel();\n\t\t\tif (is_null($literal)) {\n\t\t\t\tthrow new NotAllowedLiteralException($this->requestedModel, $property);\n\t\t\t}\n\t\t\tif ($propertyModel instanceof StringCastableModelInterface) {\n\t\t\t\tif ($isArrayFilter) {\n\t\t\t\t\tforeach ($value as &$element) {\n\t\t\t\t\t\t$element = $propertyModel->castValue($element, $propertyName);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$value = $propertyModel->castValue($value, $propertyName);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($isArrayFilter) {\n\t\t\t\t$literal->setValue('operator', Literal::IN);\n\t\t\t\t$values = $literal->initValue('values', false);\n\t\t\t\tforeach ($value as $element) {\n\t\t\t\t\t$values->pushValue($element);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$literal->setValue('operator', Literal::EQUAL);\n\t\t\t\t$literal->setValue('value', $value);\n\t\t\t}\n\t\t\t$literal->setId($i++);\n\t\t\t$literal->setValue('node', $request->getValue('tree'));\n\t\t\t$literal->setValue('property', $propertyName);\n\t\t\t$elements->pushValue($literal);\n\t\t\t$simpleCollection->pushValue($literal);\n\t\t}\n\t\t\n\t\tif (count($elements->getValues()) == 1) {\n\t\t\t$request->setValue('filter', $elements->getValue(0));\n\t\t} elseif (count($elements->getValues()) > 1) {\n\t\t\t$simpleCollection->pushValue($clause);\n\t\t\t$request->setValue('filter', $clause);\n\t\t}\n\t}", "public function findAllWhereIn( array $value, $field, array $columns = ['*'] );", "protected function whereInSub(Builder $query, array $where)\n {\n return $this->wrap($where['column']) . ' in (' . $this->compileSelect($where['query']) . ')';\n }", "public function where_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n\t\treturn $this->_where_in($key, $values, FALSE, 'AND ', $escape);\n\t}", "function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ')\r\n\t{\r\n\t \t// Check if this is a related object\r\n\t\tif ( ! empty($this->parent))\r\n\t\t{\r\n\t\t\t$this->db->_where_in($this->table . '.' . $key, $values, $not, $type);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->db->_where_in($key, $values, $not, $type);\r\n\t\t}\r\n\r\n\t\t// For method chaining\r\n\t\treturn $this;\r\n\t}", "private function _set_where($params) {\n if (count($params) == 1) {\n if (!is_array($params[0]) && !strstr($params[0], \"'\")) {\n $this->db->where($this->primary_key, $params[0]); // 1.\n } else {\n $this->db->where($params[0]); // 2.\n }\n } elseif (count($params) == 2) {\n if (is_array($params[1])) {\n $this->db->where_in($params[0], $params[1]); // 4.\n } else {\n $this->db->where($params[0], $params[1]); // 3.\n }\n }\n }", "final public static function in($conditionField)\n {\n self::$where = false;\n //add the condition\n self::$query .= $conditionField . ' IN(';\n return (new static);\n }", "public function setWhereIndexes($Model)\n {\n // Get specific record\n $requestParameters = $this->Request->all();\n foreach ($this->indexes as $column) {\n list($tableName, $columnName) = explode(\".\", $column);\n $Model = $Model->where($columnName, '=', $requestParameters[$columnName]);\n }\n return $Model;\n }", "public function orIn($column,$val);", "public function sectionTableWhere() {}", "public function sectionTableWhere() {}", "public function getTableWhere() {}", "function get_all_in( $conds = array(), $limit = false, $offset = false ) {\n\n\t // where clause\n\t $this->db->where_in('id', $conds);\n\n\t // from table\n\t $this->db->from( $this->table_name );\n\n\t if ( $limit ) {\n\t // if there is limit, set the limit\n\t \n\t $this->db->limit($limit);\n\t }\n\t \n\t if ( $offset ) {\n\t // if there is offset, set the offset,\n\t \n\t $this->db->offset($offset);\n\t }\n\t \n\t return $this->db->get();\n\t //print_r($this->db->last_query());die;\n\t }", "public function baseWhereIn(Builder $query, array $where = [], array $allowedFields = []): Builder\n {\n foreach ($where as $column => $in) {\n if (!in_array($column, $allowedFields)) {\n throw new Exception(\"O indice '{$column}' não esta habilitado!\", 1);\n }\n $query->whereIn($column, explode(',', $in));\n }\n\n return $query;\n }", "public function updateWhere(Array $query, Array $data)\r\n {\r\n }", "public function where(array $constraints, $inClassName = null) {\n return $this->whereOperator('=', $constraints, $inClassName);\n }", "public function resetWhere()\n\t{\n\t\t$this->wheres = array();\n\t\t$this->bindings = array();\n\t}", "private function sql_whereWiHits()\n {\n // Get WHERE statement\n $where = $this->pObj->objSqlInit->statements[ 'listView' ][ 'where' ] .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS();\n // Localise the WHERE statement\n $where = $this->sql_whereWiHitsLL( $where );\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "public function scopeOrderByWhereIn(Builder $query, $data, $column = 'id');", "public function testInList()\n {\n $query = \\SortableEntity12Query::create()->inList(1);\n $expectedQuery = \\SortableEntity12Query::create()->add(\\Map\\SortableEntity12EntityMap::FIELD_MY_SCOPE_FIELD, 1, Criteria::EQUAL);\n $this->assertEquals($expectedQuery, $query, 'inList() filters the query by scope');\n $this->assertEquals(4, $query->count(), 'inList() filters the query by scope');\n $query = \\SortableEntity12Query::create()->inList(2);\n $expectedQuery = \\SortableEntity12Query::create()->add(\\Map\\SortableEntity12EntityMap::FIELD_MY_SCOPE_FIELD, 2, Criteria::EQUAL);\n $this->assertEquals($expectedQuery, $query, 'inList() filters the query by scope');\n $this->assertEquals(2, $query->count(), 'inList() filters the query by scope');\n }", "public function where_in($name, $vals)\n {\n if (is_object($vals))\n {\n $this->where[] = sprintf('%s in (%s)', self::quote_name($name), $vals->get_select());\n return $this;\n }\n $vals = static::ensure_array($vals);\n $this->where[] = !empty($vals)\n ? sprintf('%s in (%s)', self::quote_name($name), join(',', self::prepare($vals)))\n : sprintf('1 = 0 /* empty: %s IN() */', $name);\n return $this;\n }", "public function testWhereEqualsInArray()\n {\n $query = (new WhereBuilder($this->mockConnection))->where('field', '=', [1,2,3]);\n $array = $query->toArray();\n\n $this->assertInstanceOf(WhereBuilder::class, $query);\n $this->assertEquals([\n 'where' => [\n [\n 'column' => 'field',\n 'operator' => 'in',\n 'value' => [1,2,3],\n 'boolean' => 'and',\n ]\n ]\n ], $array);\n }", "public function beforeFind(EventInterface $event, Query $query, ArrayObject $options, $primary)\n\t{\n // $query->iterateClause(function($val) {\n // if($val->getField()){\n // dump($val->getField());\n // }\n \n // }); \n //dd($conds);\n // dd($query->clause('where'));\n $model = $this->_table->getAlias();\n\t $query->where([$model.'.listing_id' => \\Cake\\Core\\Configure::read('LISTING_ID')]);\n\t}", "public function whereInQuery($field, $className, $array) {\n\t$this->parseQuery->whereInQuery($field, $className, $array);\n }", "private static function whereInRule(array $params)\n {\n return [\n \"filter\" => [\n \"bool\" => [\n \"must\" => [\n [\n \"terms\" => [\n \"id\" => $params\n ]\n ]\n ]\n ]\n ]\n ];\n }", "protected function setWhereFilters() : ApiGetService\n {\n if(count($this->where_filters) === 0){\n return $this;\n }\n\n // Traverse prepared filters\n foreach($this->where_filters as $column => $value){\n // {column}:{operator} = {value}\n $column_operator = preg_split('/[:\\s]+/', $column);\n\n // Split value by \" , \"\n $splited_value = preg_split('/[,]+/', $value);\n\n //... and if {value} is not scalar\n if(count($splited_value) > 1){\n // ... we know that we will have SQL IN operator in WHERE\n $in_operator = true;\n }\n // ... else we are good with simple \" = \"\n else{\n $in_operator = false;\n }\n\n // Depending on $in_operator, we know if we are using IN or =\n $this->builder\n ->when($in_operator ,\n // If it is true, we are using IN\n function ($query) use($column_operator, $splited_value){\n if(isset($column_operator[1]) && $column_operator[1] == \"eq\"){\n\n return $query->whereIn($column_operator[0], $splited_value);\n\n }elseif(isset($column_operator[1]) && $column_operator[1] == \"ne\"){\n\n return $query->whereNotIn($column_operator[0], $splited_value);\n\n }else{\n\n return $query->whereIn($column_operator[0], $splited_value);\n }\n },\n // Else, we are using scalar operators...\n function ($query) use($column_operator, $splited_value) {\n\n return $query->where($column_operator[0],\n ((isset($column_operator[1]) && $column_operator[1] != \"\") ? $this->api_operators[$column_operator[1]] : \"=\"),\n $splited_value[0]);\n });\n }\n\n return $this;\n }", "public function whereall() {\n\t\t\treturn 'id=id';\n\t\t}", "protected function getGeneralWhereClause() {}", "public function testWhereInWithEmpty()\n {\n $connection = $this->getQueryBuilderConnection();\n\n $results = $connection\n ->select('id')\n ->from('querybuilder_tests')\n ->whereIn('id', [])\n ->get();\n\n $this->assertEquals([], $results);\n }", "function tck_admin_list_where($where) {\n if ( isset($_GET['custom_filter']) ) {\n $mode = $_GET['custom_filter'];\n \n if ( $mode == 1 ) $where .= ' AND `' . TCK_COLUMN . '` = 0';\n if ( $mode == 2 ) $where .= ' AND `' . TCK_COLUMN . '` = 1';\n }\n \n return $where;\n }", "function wherein(){\n\n $emails = ['[email protected]','[email protected]','[email protected]'];\n\n return $this->db->table('posts')\n ->groupStart()\n ->where(['post_id >'=> '25', 'post_created_at <' => '1990-01-01 00:00:00'])\n ->groupEnd()\n ->orWhereIn('email', $emails)\n ->join('users', 'posts.post_author=users.user_id')\n ->limit(5,4)\n ->get()\n ->getResult();\n }", "public function whereIn(string $column, $not, string $operator, $value, string $type, string $logic = null)\n {\n array_push($this->where, ['type' => $type, 'condition' => ['conjunction' => $logic, 'column' => $column, 'not' => $not, 'operator' => $operator, 'list' => $value]]);\n }", "function count($where=NULL,$in=NULL)\r\n\t{\r\n\t\tif(empty($in))\r\n\t\t{\r\n\t\t\t$notin_flag = false;\r\n\t\t\t$in = array(0);\r\n\t\t}else{\r\n\t\t\t$notin_flag = true;\r\n\t\t}\r\n\t\tif(empty($where))\r\n\t\t{\r\n\t\t\t$where = array('1=1');\r\n\t\t}\t\r\n\t\t$count = ORM::factory('comment')\r\n\t\t\t->where($where)\r\n\t\t\t->in('id',$in,$notin_flag)\r\n\t\t\t->count_all();\r\n\t\treturn $count;\r\n\t}", "public function whereArray($wheres){\r\n\t\tforeach($wheres as $k => $v){\r\n\t\t\t$this->where(\"`$k`=?\", $v);\r\n\t\t}\r\n\t}", "public function testSelectWithInCondition(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->where(\n ['id' => ['48298a29-81c0-4c26-a7fb-413140cf8569', '482b7756-8da0-419a-b21f-27da40cf8569']],\n ['id' => 'ordered_uuid[]']\n )\n ->orderBy('id')\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(2, $result);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n }", "public function where($where_col_array = NULL, $value = NULL)\n {\n if(isset($where_col_array))\n {\n if (!is_array($where_col_array) && is_null($value)) {\n $this->_database->where(array($this->table.'.'.$this->primary => $where_col_array));\n } elseif (isset($value) && !is_array($value)) {\n $this->_database->where($where_col_array, $value);\n }\n elseif (isset($value) && is_array($value))\n {\n $this->_database->where_in($where_col_array,$value);\n }\n elseif (is_array($where_col_array)) {\n $this->_database->where($where_col_array);\n }\n }\n if($this->soft_deletes===TRUE)\n {\n $this->_where_trashed();\n }\n return $this;\n }", "protected function getWhereClauseForEnabledFields() {}", "function paperselPredicate($papersel) {\n return \"ContactInfo.contactId\" . sql_in_numeric_set($papersel);\n}", "abstract protected function getWhereForRow($data);", "function Pluf_Model_InArray($model, $array) \n{\n if ($model->id == '') {\n return false;\n }\n foreach ($array as $modelin) {\n if ($modelin->_model == $model->_model \n and $modelin->id == $model->id) {\n return true;\n }\n }\n return false;\n}", "public function notInValue(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_NIN;\n\n return $this;\n\n }", "public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $args);\r\n\t}", "function setQuery($where, $limit, $orderBy, $varName, $allowOrderByOveride=true) {\n $this->query_where = $where;\n if($this->getSessionVariable(\"query\", \"where\") != $where) {\n $this->query_where_has_changed = true;\n $this->setSessionVariable(\"query\", \"where\", $where);\n }\n\n $this->query_limit = $limit;\n if(!$allowOrderByOveride) {\n $this->query_orderby = $orderBy;\n return;\n }\n $this->getOrderBy($varName, $orderBy);\n\n $this->setLocalSessionVariable($varName, \"QUERY_WHERE\", $where);\n}", "public function nonArray()\n {\n $inCriterion = new stubInCriterion('foo', 'bar');\n }", "private function sql_whereAllItems()\n {\n $where = '1 ' .\n $this->sql_whereAnd_pidList() .\n $this->sql_whereAnd_enableFields() .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS() .\n $this->sql_whereAnd_sysLanguage();\n // Get WHERE statement\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "protected function setFilterArray() {\n $primary_keys = getPrimaryKeys($this->table_name);\n foreach ($primary_keys as $pk) {\n if (isset($_GET[$pk])) {\n $this->filter[$pk] = Mysql::SQLValue($_GET[$pk]);\n }\n }\n }", "public function where($table,$column,$data = \"\");", "Private function where($tableName,array $conditions,array $options = array()){\n\t\tif(empty ($options))$options = array('prepend' => true ,'join' => ' AND ');\n\t\tif(!isset($options['join'])) $options['join'] = ' AND ';\n\t\t$ops = $this->_operators;\n\t\t$schema = $this->schema[$tableName];\n\t\t$conditions = $this->addSlashesDeep($conditions);\n\t\tswitch (true) {\n\t\t\tcase empty($conditions):\n\t\t\t\treturn '';\n\t\t\tcase is_string($conditions):\n\t\t\t\treturn ($options['prepend']) ? \" WHERE {$conditions}\" : $conditions;\n\t\t\tcase !is_array($conditions):\n\t\t\t\treturn '';\n\t\t}\n\t\t$result = array();\n\n if(count($conditions) > 0 && count($schema) > 0){\n foreach ($conditions as $key => $value) {\n $schema[$key] = isset($schema[$key]) ? $schema[$key] : array();\n switch (true) {\n case strtolower($key) == 'or':\n case strtolower($key) == 'and':\n $result[] = $this->where($tableName,$value,array('prepend' => FALSE,'join' => \" {$key} \"));\n break;\n case (is_numeric($key) && is_array($value)):\n $result[] = $this->where($tableName,$value,array('prepend' => FALSE));\n break;\n case (is_numeric($key) && is_string($value)):\n $result[] = $value;\n break;\n case (is_string($key) && is_array($value) && isset($ops[key($value)])):\n foreach ($value as $op => $val) {\n $result[] = $this->_operator($tableName,$key, array($op => $val), $schema[$key]);\n }\n break;\n case (is_string($key) && is_array($value)):\n $value = join(', ', $this->value($value, $schema[$key]));\n $result[] = \"{$tableName}.{$key} IN ({$value})\";\n break;\n case (is_string($key) && is_string($value) && strpos($value,'%') !== FALSE):\n if(array_key_exists ($key,$this->schema[$tableName])){\n $result[] = \"{$tableName}.{$key} LIKE '{$value}'\";\n }\n else{\n $result[] = \"{$key} LIKE '{$value}'\";\n }\n //$result[] = \"{$tableName}.{$key} LIKE '{$value}'\";\n break;\n default:\n $value = $this->value($value, $schema[$key]);\n $result[] = $tableName.\".\".$key.\" = \".$value;\n break;\n }\n }\n }\n\n\t\tif(count($result)>1){\n\t\t\t$result = \"(\".join($options['join'], $result).\")\";\n\t\t}else{\n\t\t\t$result = join($options['join'], $result);\n\t\t}\n\t\treturn ($options['prepend'] && !empty($result)) ? \"WHERE {$result}\" : $result;\n\t}", "function _add_where_clause($where_clauses, $join)\n {\n foreach ($where_clauses as $clause) {\n // $clause => array(\n // 'column' => 'ID',\n // 'value' =>\t1210,\n // 'compare' => '='\n // )\n // Determine where what the where clause is comparing\n switch ($clause['column']) {\n case 'author':\n case 'author_id':\n $this->object->_query_args['author'] = $clause['value'];\n break;\n case 'author_name':\n $this->object->_query_args['author_name'] = $clause['value'];\n break;\n case 'cat':\n case 'cat_id':\n case 'category_id':\n switch ($clause['compare']) {\n case '=':\n case 'BETWEEN':\n case 'IN':\n if (!isset($this->object->_query_args['category__in'])) {\n $this->object->_query_args['category__in'] = array();\n }\n $this->object->_query_args['category__in'][] = $clause['value'];\n break;\n case '!=':\n case 'NOT BETWEEN':\n case 'NOT IN':\n if (!isset($this->object->_query_args['category__not_in'])) {\n $this->object->_query_args['category__not_in'] = array();\n }\n $this->object->_query_args['category__not_in'][] = $clause['value'];\n break;\n }\n break;\n case 'category_name':\n $this->object->_query_args['category_name'] = $clause['value'];\n break;\n case 'post_id':\n case $this->object->get_primary_key_column():\n switch ($clause['compare']) {\n case '=':\n case 'IN':\n case 'BETWEEN':\n if (!isset($this->object->_query_args['post__in'])) {\n $this->object->_query_args['post__in'] = array();\n }\n $this->object->_query_args['post__in'][] = $clause['value'];\n break;\n default:\n if (!isset($this->object->_query_args['post__not_in'])) {\n $this->object->_query_args['post__not_in'] = array();\n }\n $this->object->_query_args['post__not_in'][] = $clause['value'];\n break;\n }\n break;\n case 'pagename':\n case 'postname':\n case 'page_name':\n case 'post_name':\n if ($clause['compare'] == 'LIKE') {\n $this->object->_query_args['page_name__like'] = $clause['value'];\n } elseif ($clause['compare'] == '=') {\n $this->object->_query_args['pagename'] = $clause['value'];\n } elseif ($clause['compare'] == 'IN') {\n $this->object->_query_args['page_name__in'] = $clause['value'];\n }\n break;\n case 'post_title':\n // Post title uses custom WHERE clause\n if ($clause['compare'] == 'LIKE') {\n $this->object->_query_args['post_title__like'] = $clause['value'];\n } else {\n $this->object->_query_args['post_title'] = $clause['value'];\n }\n break;\n default:\n // Must be metadata\n $clause['key'] = $clause['column'];\n unset($clause['column']);\n // Convert values to array, when required\n if (in_array($clause['compare'], array('IN', 'BETWEEN'))) {\n $clause['value'] = explode(',', $clause['value']);\n foreach ($clause['value'] as &$val) {\n if (!is_numeric($val)) {\n // In the _parse_where_clause() method, we\n // quote the strings and add slashes\n $val = stripslashes($val);\n $val = substr($val, 1, strlen($val) - 2);\n }\n }\n }\n if (!isset($this->object->_query_args['meta_query'])) {\n $this->object->_query_args['meta_query'] = array();\n }\n $this->object->_query_args['meta_query'][] = $clause;\n break;\n }\n }\n // If any where clauses have been added, specify how the conditions\n // will be conbined/joined\n if (isset($this->object->_query_args['meta_query'])) {\n $this->object->_query_args['meta_query']['relation'] = $join;\n }\n }", "public function whereIn($key, $values, $strict = false)\n {\n $values = $this->asArray($values);\n\n return $this->filter(function ($obj) use ($key, $values, $strict) {\n return in_array($obj[$key], $values, $strict);\n });\n }", "public function testWhereNotEqualsInArray()\n {\n $query = (new WhereBuilder($this->mockConnection))->where('field', '!=', [1,2,3]);\n $array = $query->toArray();\n\n $this->assertInstanceOf(WhereBuilder::class, $query);\n $this->assertEquals([\n 'where' => [\n [\n 'column' => 'field',\n 'operator' => 'not in',\n 'value' => [1,2,3],\n 'boolean' => 'and',\n ]\n ]\n ], $array);\n\n $query = (new WhereBuilder($this->mockConnection))->where('field', '<>', [1,2,3]);\n $array = $query->toArray();\n\n $this->assertInstanceOf(WhereBuilder::class, $query);\n $this->assertEquals([\n 'where' => [\n [\n 'column' => 'field',\n 'operator' => 'not in',\n 'value' => [1,2,3],\n 'boolean' => 'and',\n ]\n ]\n ], $array);\n }", "public function clearCondition(){\n\t\t$this->where=\"\";\n\t}", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function filterIsApproved(Builder $query, $method, $clauseOperator, $value, $in)\n {\n if ($value) {\n $query->whereIn('approved', [$value]);\n }\n }", "protected function prepareWhereInStatement(\n $field = null,\n $values = null,\n $not = false,\n $type = 'AND ',\n $escape = null\n ) {\n if ($field === null OR $values === null) {\n return $this;\n }\n\n is_bool($escape) || $escape = $this->conn->protectIdentifiers;\n\n $fieldKey = $field;\n\n if (is_string($values) || is_numeric($values)) {\n $values = [$values];\n }\n\n $not = ($not)\n ? ' NOT'\n : '';\n\n $prefix = (count($this->builderCache->where) === 0)\n ? $this->getBracketType('')\n : $this->getBracketType($type);\n\n if (is_array($values)) {\n $fieldValue = array_values($values);\n $fieldBind = $this->bind($fieldKey, $fieldValue);\n\n if ($escape === true) {\n $fieldKey = $this->conn->protectIdentifiers($field);\n }\n\n $whereIn = [\n 'condition' => $prefix . $fieldKey . $not . ' IN (:' . $fieldBind . ')',\n 'escape' => false,\n ];\n\n } elseif ($values instanceof AbstractQueryBuilder) {\n\n if ($escape === true) {\n $fieldKey = $this->conn->protectIdentifiers($field);\n }\n\n $importBindsPattern = [];\n $importBindsReplacement = [];\n foreach ($values->builderCache->binds as $bindKey => $bindValue) {\n $importBindKey = $this->bind($bindKey, $bindValue);\n\n $importBindsPattern[] = ':' . $bindKey;\n $importBindsReplacement[] = ':' . $importBindKey;\n }\n\n $sqlStatement = $values->getSqlStatement();\n $sqlStatement = str_replace($importBindsPattern, $importBindsReplacement, $sqlStatement);\n\n $whereIn = [\n 'condition' => $prefix . $fieldKey . $not . ' IN (' . $sqlStatement . ')',\n 'escape' => false,\n ];\n }\n\n if (isset($whereIn)) {\n $this->builderCache->where[] = $whereIn;\n }\n\n return $this;\n }", "public function find(array $where);", "public function where()\n {\n $args = func_get_args();\n $count = count($args);\n \n if ($count == 1) {\n if (is_array($args[0])) {\n # This is expected to be a column => value associated array.\n # In this case, the array is stored as is.\n $this->where[] = $args[0];\n } else {\n # This is expected to be a string.\n $this->where[] = $args[0];\n }\n } elseif ($count) {\n # Case: $query->where(\"foo\", true, \"bar_baz\", $bar);\n if ($count >= 2 && is_int($count / 2) && (!is_array($args[1]) || Toolbox\\ArrayTools::isIndexed($args[1])) && is_bool(strpos($args[0], ' '))) {\n $where = [];\n foreach ($args as $key => $value) {\n $key++;\n if ($key && !($key % 2)) {\n $where[$next_key] = $value;\n } else {\n $next_key = $value;\n }\n }\n $this->where[] = $where;\n } else {\n $this->where[] = array_shift($args);\n \n # Case: $query->where('foo => :foo', ['foo' => $foo]);\n if ($count == 2 && is_array($args[0]) && !Toolbox\\ArrayTools::isIndexed($args[0]))\n $args = $args[0];\n \n if ($args)\n $this->where_params = array_merge($this->where_params, $args);\n }\n }\n return $this;\n }", "public function createWhereSQL($playlists=NULL, $field_name='id', $use_where_in=TRUE)\n\t{\n\t\t# Set the Database instance to a variable.\n\t\t$db=DB::get_instance();\n\t\t# Set the Validator instance to a variable.\n\t\t$validator=Validator::getInstance();\n\n\t\t# Check if the passed value was empty.\n\t\tif(!empty($playlists))\n\t\t{\n\t\t\t# If not an array, turn it into an array.\n\t\t\tif(!is_array($playlists))\n\t\t\t{\n\t\t\t\t# Check if $playlists equals \"all\".\n\t\t\t\tif(strtolower($playlists)=='all')\n\t\t\t\t{\n\t\t\t\t\t# Chenage $playlists into an empty array.\n\t\t\t\t\t$playlists=array();\n\t\t\t\t\t# Get all the playlists.\n\t\t\t\t\t$this->getPlaylists();\n\t\t\t\t\t# Set the results to a variable.\n\t\t\t\t\t$results=$this->getAllPlaylists();\n\t\t\t\t\tif($results)\n\t\t\t\t\t{\n\t\t\t\t\t\t# Loop through the playlists.\n\t\t\t\t\t\tforeach($results as $row)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# Set the playlist id to the $playlists array.\n\t\t\t\t\t\t\t$playlists[]=$row->id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t# Trim any dashes(-) off the ends of the string.\n\t\t\t\t\t$playlists=trim($playlists, '-');\n\t\t\t\t\t# Create an array of the playlists.\n\t\t\t\t\t$playlists=explode('-', $playlists);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($use_where_in===TRUE)\n\t\t\t{\n\t\t\t\t# Turn array into comma-separated-values.\n\t\t\t\t$csv_playlists=implode(',', $playlists);\n\t\t\t\t$playlists='`'.$field_name.'` IN ('.$csv_playlists.')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Create an empty array to hold the \"OR\" sql strings.\n\t\t\t\t$playlist_or=array();\n\t\t\t\t# Create an empty array to hold the \"AND\" sql strings.\n\t\t\t\t$playlist_and=array();\n\t\t\t\tif(!empty($playlists))\n\t\t\t\t{\n\t\t\t\t\tforeach($playlists as $playlist)\n\t\t\t\t\t{\n\t\t\t\t\t\t# Clean it up.\n\t\t\t\t\t\t$playlist=trim($playlist);\n\t\t\t\t\t\t# Get the first character of the string.\n\t\t\t\t\t\t$top=substr($playlist, 0, 1);\n\t\t\t\t\t\t# Check if the first character was an \"!\".\n\t\t\t\t\t\tif($top=='!')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# Remove the \"!\" from the front of the string.\n\t\t\t\t\t\t\t$playlist=ltrim($playlist, '!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t# Check if $playlist is not an integer.\n\t\t\t\t\t\tif($validator->isInt($playlist)!==TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# Get the category data that cooresponds to the passed $playlist name.\n\t\t\t\t\t\t\t$this->getThisPlaylist($playlist, FALSE);\n\t\t\t\t\t\t\t$playlist=$this->getID();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t# Check if the first character was an \"!\".\n\t\t\t\t\t\tif($top!='!')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# Set the newly created sql string to the $playlist_or array.\n\t\t\t\t\t\t\t$playlist_or[]='`'.$field_name.'` REGEXP '.$db->quote('-'.$playlist.'-');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# Set the newly created sql string to the $playlist_and array.\n\t\t\t\t\t\t\t$playlist_and[]='`'.$field_name.'` NOT REGEXP '.$db->quote('-'.$playlist.'-');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t# Implode the $playlist_or array into one complete sql string.\n\t\t\t\t\t$ors=implode(' OR ', $playlist_or);\n\t\t\t\t\t# Implode the $playlist_and array into one complete sql string.\n\t\t\t\t\t$ands=implode(' AND ', $playlist_and);\n\t\t\t\t\t# Concatenate the $ands and $ors together.\n\t\t\t\t\t$playlists=(((!empty($ors)) ? '('.$ors.')' : '').((!empty($ors) && !empty($ands)) ? ' AND ' : '').((!empty($ands)) ? '('.$ands.')' : ''));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t# Explicitly set playlists to NULL.\n\t\t\t\t\t$playlists=NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Explicitly set playlists to NULL.\n\t\t\t$playlists=NULL;\n\t\t}\n\t\t# Check if the $playlists array is empty.\n\t\tif(!empty($playlists))\n\t\t{\n\t\t\t# Set the sql string to the data member.\n\t\t\t$this->setWhereSQL($playlists);\n\t\t}\n\t}", "public function apply($model, RepositoryInterface $repository)\n {\n return $model->whereIn('novelties.employee_id', $this->employeeIds);\n }", "public function deleteWhere(Array $query)\r\n {\r\n }", "abstract public function filterWhere(Builder $dataSource);", "public function whereIn($field, $values = [], $escape = null)\n {\n return $this->prepareWhereInStatement($field, $values, false, 'AND ', $escape);\n }", "function mWHERE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$WHERE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:156:3: ( 'where' ) \n // Tokenizer11.g:157:3: 'where' \n {\n $this->matchString(\"where\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "protected function where(array $filter){\n if (array_key_exists(\"order\", $filter)){\n $order = $filter[\"order\"];\n unset($filter[\"order\"]);\n if (gettype($order) != \"array\")\n $order = [$order];\n }\n\n if (array_key_exists(\"limit\", $filter)){\n $limit = $filter[\"limit\"];\n unset($filter[\"limit\"]);\n if (gettype($limit) != \"integer\")\n throw new appException(\"This is off-limits, literally\");\n }\n\n if (!empty($filter)){\n $query = \" WHERE \";\n\n foreach ($filter as $k => $v){\n if (gettype($v) == \"array\"){\n $query .= $this->genTableVar($k) . \" IN ( \";\n $query .= join(\", \", array_fill(0, count($v), \"?\"));\n $query .= \") AND \";\n }\n else if (gettype($v) == \"object\" && get_class($v) == \"dbContains\"){\n $query .= $v->genSql($this->genTableVar($k)) . \" AND \";\n }\n else {\n $query .= $this->genTableVar($k) . \" = ? AND \";\n }\n $this->args[] = $v;\n }\n\n $query = substr($query, 0, -4);\n\n $this->query .= $query;\n }\n\n if (isset($order))\n $this->orderBy($order);\n\n if (isset($limit))\n $this->limit($limit);\n }", "public function whereIn($field, array $value, string $boolean = 'must'): self\n\t{\n\t\t$this->wheres[$boolean][] = [\n\t\t\t'terms' => [\n\t\t\t\t$field => $value,\n\t\t\t],\n\t\t];\n\n\t\treturn $this;\n\t}", "public function one()\n {\n $inCriterion = new stubInCriterion('foo', array('bar'));\n $this->assertEquals(\"`foo` IN ('bar')\", $inCriterion->toSQL());\n $inCriterion = new stubInCriterion('foo', array('bar'), 'baz');\n $this->assertEquals(\"`baz`.`foo` IN ('bar')\", $inCriterion->toSQL());\n }", "function update_table_where( $update_data, $where_data, $table){\t\n\t$this->db->where($where_data);\n\t$this->db->update($table, $update_data);\n\t\n\t\n }", "function setWhereArray() {\t\t\n\t\tif(isset($_GET['searchSubmit']) || empty(session()->get('warray'))) {\n\t\t\t$this->addToWhereArray('searchLoc','city','like');\n\t\t\t$this->addToWhereArray('searchSizeMin','size','>');\n\t\t\t$this->addToWhereArray('searchSizeMax','size','<');\n\t\t\t$this->addToWhereArray('rentOrSell','rentOrSell','=');\n\n\t\t\tsession()->put('warray',$this->whereArray);\t\t\n\t\t} else {\t\t\t\t\n\t\t\t$this->whereArray = session()->get('warray');\n\t\t}\n\t}" ]
[ "0.6058926", "0.6039015", "0.6035005", "0.5945052", "0.5847943", "0.5727735", "0.55799526", "0.55356055", "0.55279446", "0.5491309", "0.5425805", "0.5377522", "0.5371578", "0.53484726", "0.53454673", "0.5319568", "0.5310164", "0.5300646", "0.5297218", "0.5258514", "0.524041", "0.52359563", "0.5219056", "0.5215191", "0.52050996", "0.5180204", "0.5173079", "0.51673156", "0.5154181", "0.51460034", "0.5144229", "0.5139045", "0.5130406", "0.51298165", "0.51287615", "0.51073897", "0.5100464", "0.50934", "0.5090469", "0.5087615", "0.50844455", "0.507126", "0.50478655", "0.50478655", "0.50007516", "0.49908584", "0.49874616", "0.49565652", "0.49399492", "0.49347144", "0.49311507", "0.4910741", "0.4895778", "0.48721182", "0.48677891", "0.4861826", "0.48585916", "0.48566982", "0.48514473", "0.48501477", "0.48424786", "0.48361653", "0.48357397", "0.47999847", "0.47920597", "0.4781891", "0.47791457", "0.475702", "0.47456294", "0.47446778", "0.47435406", "0.47418863", "0.47354916", "0.4721446", "0.4718662", "0.4713336", "0.47081217", "0.4702853", "0.46753314", "0.46743387", "0.46556863", "0.46431398", "0.46409166", "0.46321157", "0.4630617", "0.46297002", "0.4622476", "0.4618919", "0.46143958", "0.46124274", "0.46112183", "0.4607532", "0.45932454", "0.45829383", "0.45823753", "0.45786962", "0.4578421", "0.45781562", "0.4571271", "0.45345983", "0.45308462" ]
0.0
-1
Set the columns to be selected
public function select(array $columns) { $this->select = $columns; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setColumns($columns = \"*\")\n {\n //$sql = '';\n if ($columns == \"*\") {\n $this->select_list = '*';\n } elseif (!empty($columns)) {\n foreach ($columns as $item) {\n\n $this->select_list .= $item . ',';\n }\n $this->select_list = rtrim($this->select_list, ',');\n }\n// echo \"column set to \".$this->getColumns(); die;\n\n }", "private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n }", "public function select($columns);", "public function setColumns($columns)\n {\n parent::setColumns($columns);\n\n if (is_array($this->selectColumns)) {\n $this->selectColumns = array_unique(array_merge($this->selectColumns, $this->keys));\n }\n\n return $this;\n }", "public function select(array $columns)\n {\n $this->select = $columns;\n }", "public function select($columns = array('*'));", "public function setColumns(array $columns);", "public function select($cols = null);", "public function get_selectable_columns()\n\t{\n\t\treturn array();\n\t}", "public function set_columns($cols) { $this->cols = $cols + 0; }", "public function setColumns(array $columns);", "public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}", "private function toggle_master_view_select_columns(){\n\n // Check if the table has list_table_visible_columns not empty\n $master_table_visible_columns = $this->feature_model_master_table_visible_columns();\n $lookup_tables = $this->CI->grants->lookup_tables();\n\n $get_all_table_fields = $this->CI->grants_model->get_all_table_fields();\n\n\n foreach ($get_all_table_fields as $get_all_table_field) {\n //Unset foreign keys columns\n if( substr($get_all_table_field,0,3) == 'fk_'){\n unset($get_all_table_fields[array_search($get_all_table_field,$get_all_table_fields)]);\n }\n }\n\n $visible_columns = $get_all_table_fields;\n $lookup_columns = array();\n\n if(is_array($master_table_visible_columns) && count($master_table_visible_columns) > 0 ){\n $visible_columns = $master_table_visible_columns;\n\n if(is_array($lookup_tables) && count($lookup_tables) > 0 ){\n foreach ($lookup_tables as $lookup_table) {\n \n // Add primary_keys for the lookup tables in the visible columns array\n $lookup_table_fields_data = $this->CI->grants_model->table_fields_metadata($lookup_table);\n \n foreach($lookup_table_fields_data as $field_data){\n if($field_data->primary_key == 1){\n array_push($visible_columns,$field_data->name);\n }\n }\n\n //$visible_columns = $this->CI->grants->default_unset_columns($visible_columns,array($lookup_table.'_id'));\n }\n } \n\n }elseif(is_array($lookup_tables) && count($lookup_tables) > 0 ){\n $visible_columns = $this->add_lookup_name_fields_to_visible_columns($visible_columns, $lookup_tables);\n }\n\n //$default_unset_columns = $this->CI->grants->default_unset_columns($visible_columns,array($this->CI->controller.'_deleted_at'));\n\n // Add created_by and last_modified_by fields if not exists in columns selected\n $history_tracking_fields = $this->insert_history_tracking_fields_to_master_view($visible_columns);\n\n //Check if controller is not approval and find if status field is present and \n //it has status in the lookup table\n $status_column = $this->insert_status_column_to_master_view($history_tracking_fields);\n \n // Unset deleted at field\n $unset_fields = [$this->CI->grants->history_tracking_field($this->controller,'deleted_at')];\n $this->CI->grants->default_unset_columns($status_column,$unset_fields);\n\n //Remove the primary key field from the master table\n unset($status_column[array_search($this->CI->grants->primary_key_field($this->CI->controller),$status_column)]);\n \n\n return $this->access->control_column_visibility($this->controller,$status_column,'read');\n\n }", "public function select($columns){\n \n $this->columns = [];\n $columns = is_array($columns) ? $columns : func_get_args();\n\n foreach ($columns as $as => $column) {\n\n $this->columns[] = $column;\n\n }\n\n return $this;\n }", "public function getSelectColumns(): array\n {\n return [\n 'question_id',\n 'slug',\n 'user_id',\n 'subject',\n 'headline',\n 'message',\n 'views',\n 'views_not_bot_one_month',\n 'answer_count_cached',\n 'created_datetime',\n 'created_name',\n 'created_ip',\n 'modified_user_id',\n 'modified_datetime',\n 'modified_reason',\n 'moved_datetime',\n 'moved_user_id',\n 'moved_country',\n 'moved_language',\n 'moved_question_id',\n 'deleted_datetime',\n 'deleted_user_id',\n 'deleted_reason',\n ];\n }", "public function selectColumns()\n {\n $this->select(\n [\n ConfigService::$tableComments . '.id as id',\n ConfigService::$tableComments . '.content_id as content_id',\n ConfigService::$tableComments . '.comment as comment',\n ConfigService::$tableComments . '.parent_id as parent_id',\n ConfigService::$tableComments . '.user_id as user_id',\n ConfigService::$tableComments . '.temporary_display_name as display_name',\n ConfigService::$tableComments . '.created_on as created_on',\n ConfigService::$tableComments . '.deleted_at as deleted_at'\n ]\n );\n\n return $this;\n }", "public function select(...$columns)\n {\n // code...\n $this->__COLUMNS__ = array_unique(array_merge($this->__COLUMNS__ ?? [], $this->flatten($columns)));\n\n return $this;\n }", "public function set(array $cols) : void;", "public function setColumns($columns) {\n\t\t$this->columns = $columns;\n\t}", "public function select($columns = array('*'))\r\n {\r\n $this->columns = array_values_recursive(func_get_args());\r\n return $this;\r\n }", "public function setCols($cols) {\n $this->cols = $cols;\n }", "public function getColumns()\n {\n return $this->select_list;\n }", "public function setColumns($columns)\n {\n $this->columns = $columns;\n }", "protected function loadColumns(){\n\t\t\t$this->columns = array_diff(\n\t\t\t\tarray_keys(get_class_vars($this->class)),\n\t\t\t\t$this->getIgnoreAttributes()\n\t\t\t);\n\t\t}", "public function setSearchColumns(array $columns);", "public function previewColumns();", "abstract protected function columns();", "public static function setColumns($columns) {\n\t\tself::$columns = $columns;\n\t}", "public function select($columns)\n\t{\n\t\tif (is_array($columns)) {\n\t\t\t$this->_select = array_unique(array_merge($this->_select, $columns));\n\t\t}\n\t\telse {\n\t\t\t$this->_select = array_unique(array_merge($this->_select, array($columns)));\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function _configureColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n $this->_sourceColumns = $this->columns;;\n\n $columnsByKey = [];\n foreach ($this->columns as $column) {\n $columnKey = $this->_getColumnKey($column);\n for ($j = 0; true; $j++) {\n $suffix = ($j) ? '_' . $j : '';\n $columnKey .= $suffix;\n if (!array_key_exists($columnKey, $columnsByKey)) {\n break;\n }\n }\n $columnsByKey[$columnKey] = $column;\n }\n\n $this->columns = $columnsByKey;\n }", "public function setCols( $criteria )\n {\n\n $cols = array\n (\n 'project_task.rowid as project_task_rowid',\n 'project_task.title as project_task_title',\n 'project_task.id_type as id_type_id_type',\n 'project_task_type.name as project_task_type_name',\n 'project_task.id_status as id_status_id_status',\n 'project_task_status.name as project_task_status_name',\n 'project_task_employee.date_start as project_task_employee_date_start',\n 'project_task_employee.date_end as project_task_employee_date_end',\n );\n\n $criteria->select($cols);\n\n }", "public function selectColsArrayAction()\n {\n $view = new ViewModel();\n $sl = $this->getServiceLocator();\n $adapter = $sl->get('dbadapter');\n $tableGateway = new TableGateway('categoria', $adapter);\n $view->data = $tableGateway->select(function (Select $select){\n $select->columns(array('nombre','activo'));\n })->toArray();\n return $view;\n }", "public function select($columns = ['*'])\n {\n $this->columns = is_array($columns) ? $columns : func_get_args();\n return $this;\n\n }", "public function columns($columns = array('*'))\r\n {\r\n return call_user_func_array(array($this,'select'), func_get_args());\r\n }", "public function select($columns)\n {\n return $this->columns($columns);\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "private function setColumns(array $columns)\n {\n $this->columns = $columns;\n }", "public function columns(/* ... */)\n\t{\n\t\t$args = func_get_args();\n\t\tforeach ($args as $name)\n\t\t{\n\t\t\t$this->setColumnData($name,\n\t\t\t\tContainer::keyValue($this->columnValues, $name, null),\n\t\t\t\tfalse);\n\t\t}\n\t\treturn $this;\n\t}", "function select($columns)\n{\n\t$this->tryModify();\n\t$this->query['select'] = is_array($columns)? $columns : explode(',', $columns);\n\t$this->execute();\n\t$rows = $this->db->fetchAll($this->result);\n\t$this->close();\n\t$this->query['select'] = array('*');\n\treturn $rows;\n}", "public function select($columns = '*', $option = '')\n\t{\n\t\t$this->query->select = $columns;\n\t\t$this->query->selectOption = $option;\n\t\treturn $this;\n\t}", "public function addSelect($column);", "public function select_only($columns)\r\n {\r\n return call_user_func_array(array($this,'select'), func_get_args());\r\n }", "public function select($columns = '*'): self\n {\n if (is_array($columns)) {\n $columns = commas($columns);\n }\n\n $this->columns = $columns;\n\n return $this;\n }", "protected function _doColumns()\n {\n global $prefs;\n\n // Turba's columns pref\n $abooks = explode(\"\\n\", $prefs->getValue('columns'));\n if (is_array($abooks) && !empty($abooks[0])) {\n $new_prefs = array();\n $cnt = count($abooks);\n for ($i = 0; $i < $cnt; ++$i) {\n $colpref = explode(\"\\t\", $abooks[$i]);\n $colpref[0] = $this->_updateShareName($colpref[0]);\n $abooks[$i] = implode(\"\\t\", $colpref);\n }\n $prefs->setValue('columns', implode(\"\\n\", $abooks));\n }\n }", "public function selectAll() {\n\t\treturn $this->select(array_keys($this->table->columns));\n\t}", "public function setColumns($data)\n {\n $this->data['columns'] = $data;\n return $this;\n }", "public function setSelectFields()\r\n\t{\r\n\t\t$fields = func_get_args();\r\n\t\tif (empty($fields))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Select fields list is not an array or empty.');\r\n\t\t}\r\n\t\r\n\t\t// Check if fields exist in fields collection\r\n\t\tforeach($fields as &$item)\r\n\t\t{\r\n\t\t\t$found = false;\r\n\t\t\tforeach ($this->fields as &$field)\r\n\t\t\t{\r\n\t\t\t\tif ($item == $field->name)\r\n\t\t\t\t{\r\n\t\t\t\t\t$found = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif (!$found)\r\n\t\t\t{\r\n\t\t\t\tthrow new \\Exception('There is no field \"' . $item . '\" in table ' . $this->name . '.');\r\n\t\t\t}\r\n\t\r\n\t\t\t// Add to list\r\n\t\t\tif ($this->hasForeignFields())\r\n\t\t\t{\r\n\t\t\t\t$item = 't1.`' . $item . '`';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$item = '`' . $this->name . '`.`' . $item . '`';\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$this->selectFields = $fields;\r\n\t}", "public function select($columns) {\n\t\t$clone = clone $this;\n\t\t\n\t\tif (!is_array($columns))\n\t\t\t$columns = func_get_args();\n\t\tif (!is_array($this->select))\n\t\t\t$clone->select = array();\n\t\t\n\t\tforeach ($columns as $column) {\n\t\t\tif (!isset($clone->select[$column])) {\n\t\t\t\t$clone->formatColumnSimple($column); // check if column exists\n\t\t\t\t$clone->select[$column] = true;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$clone->sql = null;\n\t\treturn $clone;\n\t}", "public function SetViewColumns($arrCols) {\n if(!$this->blnGoodToGo()) return;\n if(!is_array($arrCols)) {\n $this->XaoThrow(\n \"_EntBase->SetViewColumns(): This method expects an array\" .\n \" of strings representing column names to SELECT on. The\" .\n \" supplied argument was not an array.\"\n );\n return;\n }\n $this->_arrViewColumns = $arrCols;\n }", "protected function initColumns()\n\t{\n\t\tif($this->columns===array())\n\t\t{\n\t\t\tif($this->dataProvider instanceof NActiveDataProvider)\n\t\t\t\t$this->columns=$this->dataProvider->model->attributeNames();\n\t\t\telse if($this->dataProvider instanceof IDataProvider)\n\t\t\t{\n\t\t\t\t// use the keys of the first row of data as the default columns\n\t\t\t\t$data=$this->dataProvider->getData();\n\t\t\t\tif(isset($data[0]) && is_array($data[0]))\n\t\t\t\t\t$this->columns=array_keys($data[0]);\n\t\t\t}\n\t\t}\n\t\t$id=$this->getId();\n\t\tforeach($this->columns as $i=>$column)\n\t\t{\n\t\t\tif ($column['name'] && (!isset($column['export']) || @$column['export']!=false)) {\n\t\t\t\tif(is_string($column))\n\t\t\t\t\t$column=$this->createDataColumn($column);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!isset($column['class']))\n\t\t\t\t\t\t$column['class']='NDataColumn';\n\t\t\t\t\t$column=Yii::createComponent($column, $this);\n\t\t\t\t}\n\t\t\t\tif(!$column->visible)\n\t\t\t\t{\n\t\t\t\t\tunset($this->columns[$i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($column->id===null)\n\t\t\t\t\t$column->id=$id.'_c'.$i;\n\t\t\t\t$this->columns[$i]=$column;\n\t\t\t} else {\n\t\t\t\tunset($this->columns[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->columns as $column)\n\t\t\t\t$column->init();\n\t}", "abstract protected function doCols();", "public function selectFields($select='*')\n\t\t{\n\t\t\t$this->reload();\n\t\t\t$this->select = $select;\n\t\t}", "public function columns(array $columns, $merge = false){\n if(!$merge){\n $this->_select = array_merge($this->_select, $columns);\n }else{\n $this->_select = $columns;\n }\n\n return $this;\n }", "protected function _prepareColumns()\n {\n \t// Checkbox\n \t$checkboxColumnBody = new Lumia_DataGrid_Body_Checkbox('student_id[]');\n \t$checkboxColumnHeader = new Lumia_DataGrid_Header_Checkbox();\n $this->addColumn(new Lumia_DataGrid_Column($checkboxColumnBody, $checkboxColumnHeader));\n \n // Name\n $nameColumnBody = new Lumia_DataGrid_Body_Text('student_name');\n $nameColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Name');\n $this->addColumn(new Lumia_DataGrid_Column($nameColumnBody, $nameColumnHeader));\n \n // Code\n $codeColumnBody = new Lumia_DataGrid_Body_Text('student_code');\n $codeColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Code');\n $this->addColumn(new Lumia_DataGrid_Column($codeColumnBody, $codeColumnHeader));\n \n // Date of birth\n $dateColumnBody = new Lumia_DataGrid_Body_Date('student_birth');\n $dateColumnBody->setOptions(array('dateFormat' => 'dd/MM/yyyy'));\n $dateColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Date of birth');\n $this->addColumn(new Lumia_DataGrid_Column($dateColumnBody, $dateColumnHeader));\n \n // Gender\n $genderColumnBody = new Admin_DataGrid_Student_Body_Gender('student_gender');\n $genderColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Gender');\n $this->addColumn(new Lumia_DataGrid_Column($genderColumnBody, $genderColumnHeader));\n \n // Class\n $classColumnBody = new Lumia_DataGrid_Body_Text('class_department');\n $classColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Class/Department');\n $this->addColumn(new Lumia_DataGrid_Column($classColumnBody, $classColumnHeader));\n \n // Status\n $statusColumnBody = new Admin_DataGrid_Student_Body_Status('user_status');\n $statusColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Status');\n $this->addColumn(new Lumia_DataGrid_Column($statusColumnBody, $statusColumnHeader));\n \n // Action\n $actionColumnBody = new Admin_DataGrid_Student_Body_Action('actionColumn');\n $actionColumnHeader = new Lumia_DataGrid_Header_Text();\n $this->addColumn(new Lumia_DataGrid_Column($actionColumnBody, $actionColumnHeader));\n }", "public function setHiddenCols($cols){\n\t\t$this->hiddenCols=explode(\",\",$cols);\n\t}", "public function setDefaultColumns()\n {\n foreach ($this->Model->columnsInformation as $column) {\n // Set indexes\n if ($column['Key'] == \"PRI\") {\n $this->indexes[] = $this->table . \".\" . $column['Field'];\n }\n // Set columns\n $this->columns[] = $this->table . \".\" . $column['Field'];\n }\n // Set default columns\n $this->defaultColumns = $this->columns;\n // Add actions column\n $this->addCustomColumn($this->builtInCustomColumns['actions']);\n // Add no column\n $this->addCustomColumnAsFirstColumn($this->builtInCustomColumns['no']);\n }", "public function columns($columns = '*'): self\n {\n return $this->select($columns);\n }", "public function setColumnsHeadData()\n\t{\n\t\tFileStorage::getInstance()->store([], 'league_table_columns_head');\n\t}", "protected function configureTableSelection()\n {\n return [ 'Table1', 'Table2', '...' ];\n }", "public function admin_table_columns($_columns)\n {\n }", "public function setSelect($columns, $table, $where = false, $order = false, $limit = false)\n {\n $action = $this->setAction(\"SELECT\");\n $table = $this->setTable($table);\n $columns = $this->setColumns($columns);\n $where = ($where !== false)?$this->setWhere($where):true;\n $order = ($order !== false)?$this->setOrder($order):true;\n $limit = ($limit !== false)?$this->setLimit($limit):true;\n\n return $action && $table && $columns && $where && $order && $limit;\n }", "public static function columns()\n {\n return filterColumnByRole([\n 'plot_ref' => trans('system.code'),\n 'plot_name' => trans_title('plots'),\n 'user.name' => trans_title('users'),\n 'city.city_name' => trans_title('cities'),\n 'plot_percent_cultivated_land' => sections('plots.cultivated_land'),\n 'plot_real_area' => sections('plots.real_area'),\n 'plot_start_date' => sections('plots.start_date'),\n 'plot_active' => trans('persona.contact.active'),\n 'plot_green_cover' => sections('plots.green_cover'),\n 'plot_pond' => sections('plots.pond'),\n 'plot_road' => sections('plots.road'),\n ],\n $roleFilter = Credentials::isAdmin(),\n $newColumns = ['client.client_name' => trans_title('clients')],//Admits multiple arrays\n $addInPosition = 3\n );\n }", "public function select(string ...$columns)\n {\n $this->select = $columns;\n\n return $this;\n }", "public function select($tables, array $columns, array $conditions = [], array $options = []): array;", "public function saveCustomColumns() {\n // get existing config\n $selectedColumns = $this->loadCustomColumns();\n\n // merge new selection for page type into existing variable\n $ctID = $this->post('ctID');\n $selectedColumns[$ctID] = $_REQUEST['selectedAttributes'];\n\n // save new configuration\n $pkg = Package::getByHandle('remo_composer_list');\n $pkg->saveConfig('SELECTED_COLUMNS', serialize($selectedColumns));\n\n die();\n }", "public function select($columns, ...$params): Selection\n {\n $this->selection->select($columns, ...$params);\n return $this;\n }", "protected function initColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n\n foreach ($this->columns as $i => $column) {\n if (is_string($column)) {\n $column = $this->createDataColumn($column);\n } else {\n $column = Yii::createObject(array_merge([\n 'class' => $this->dataColumnClass ?: DataColumn::className(),\n 'grid' => $this,\n ], $column));\n }\n if (!$column->visible) {\n unset($this->columns[$i]);\n $this->allColumns[$i] = $column;\n continue;\n }\n $this->columns[$i] = $column;\n $this->allColumns[$i] = $column;\n }\n }", "public function setColumns($settings = array())\n {\n if (!$settings) {\n $settings = $this->fields;\n }\n $this->Columns = array();\n foreach ($settings as $column => $options) {\n if (!is_string($column)) {\n $column = $options;\n $options = false;\n }\n if (!isset($options['display'])) {\n $options['display'] = true;\n }\n if (strpos($column, '.') === false && $column != 'actions') {\n $column = sprintf('%s.%s', $this->defaultModel, $column);\n }\n if (!isset($options['type'])) {\n if (isset($options['switch'])) {\n $options['type'] = 'switch';\n } else {\n $options['type'] = 'cell';\n }\n }\n $class = ucfirst($options['type']).'Column';\n $this->Columns[$column] = new $class($this, $column, $options);\n }\n }", "function ReInitTableColumns()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::ReInitTableColumns();\" . \"<HR>\";\n foreach ($this->form_fields as $prefix => $form) {\n foreach ($form as $i => $field) {\n foreach ($field as $param => $value) {\n //if found database parameters\n if (strpos($param, \"dbfield_\") !== false) {\n $columnparam = substr($param, strlen(\"dbfield_\"), strlen($param));\n $this->Storage->setColumnParameter($field[\"field_name\"], trim($columnparam), $value);\n }\n }\n }\n }\n }", "public static function getSelectColumns(){\n\t\t$columns = '';\n\t\t/* getSelectColumns */\n\t\t$columns .= ' `'.UserSetting::FIELD_USER.'`';\n\t\t$columns .= ', `'.UserSetting::FIELD_IDENT.'`';\n\t\t$columns .= ', `'.UserSetting::FIELD_VALUE.'`';\n\t\t/* getSelectColumns end */\n\t\treturn $columns;\n\t}", "public function setSelect(array $orderBy){\n $this->select = $orderBy;\n }", "public function select(array $columns = array(), $prefix = null);", "public function setColumns($arrColumns)\n\t{\n\t\t// Make sure it's an array and there's something in it\n\t\tif (!(is_array($arrColumns) && count($arrColumns)))\n\t\t{\n\t\t\tthrow new Exception(\"Invalid columns declaration\");\n\t\t}\n\t\t\n\t\t$this->_arrSelectedColumns = array();\n\t\tforeach ($arrColumns as $column)\n\t\t{\n\t\t\tif (!array_key_exists($column, $this->_arrColumns))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Invalid column, '$column', for \". self::$_arrReportTypes[$this->_reportType]['Name']);\n\t\t\t}\n\t\t\t$this->_arrSelectedColumns[] = $column;\n\t\t}\n\t}", "private function prepareColumns()\n {\n // start with the tableName and the primary key e.g. 'fos_user' and 'id'\n $this->addSelectColumn($this->metadata, $this->rootEntityIdentifier);\n\n foreach ($this->datatable->getColumns() as $column) {\n // association delimiter found (e.g. 'posts.comments.title')?\n if (strstr($column->getProperty(), '.') !== false) {\n $array = explode('.', $column->getProperty());\n $this->setAssociations($array, $this->metadata);\n } else {\n // no association found\n if ($column !== $this->rootEntityIdentifier) {\n $this->addSelectColumn($this->metadata, $column->getProperty());\n }\n\n $this->allColumns[] = $this->metadata->getTableName().'.'.$column->getProperty();\n }\n }\n\n return $this;\n }", "public function set_cols($cols)\n {\n $this->m_numCols = $cols;\n }", "public function languageSelectColumns($value)\n {\n $this->attributes['language']['select']['columns'] = $value;\n\n return $this;\n }", "private function initColumnArrays()\n {\n foreach ($this->columns as $key => $column) {\n $dql = $this->accessor->getValue($column, 'dql');\n $data = $this->accessor->getValue($column, 'data');\n\n $currentPart = $this->entityShortName;\n $currentAlias = $currentPart;\n $metadata = $this->metadata;\n\n if (true === $this->accessor->getValue($column, 'customDql')) {\n $columnAlias = str_replace('.', '_', $data);\n\n // Select\n $selectDql = preg_replace('/\\{([\\w]+)\\}/', '$1', $dql);\n $this->addSelectColumn(null, $selectDql.' '.$columnAlias);\n // Order on alias column name\n $this->addOrderColumn($column, null, $columnAlias);\n // Fix subqueries alias duplication\n $searchDql = preg_replace('/\\{([\\w]+)\\}/', '$1_search', $dql);\n $this->addSearchColumn($column, null, $searchDql);\n } elseif (true === $this->accessor->getValue($column, 'selectColumn')) {\n $parts = explode('.', $dql);\n\n while (count($parts) > 1) {\n $previousPart = $currentPart;\n $previousAlias = $currentAlias;\n\n $currentPart = array_shift($parts);\n $currentAlias = ($previousPart === $this->entityShortName ? '' : $previousPart.'_').$currentPart;\n\n if (!array_key_exists($previousAlias.'.'.$currentPart, $this->joins)) {\n $this->addJoin($previousAlias.'.'.$currentPart, $currentAlias, $this->accessor->getValue($column, 'joinType'));\n }\n\n $metadata = $this->setIdentifierFromAssociation($currentAlias, $currentPart, $metadata);\n }\n\n $this->addSelectColumn($currentAlias, $this->getIdentifier($metadata));\n $this->addSelectColumn($currentAlias, $parts[0]);\n $this->addSearchOrderColumn($column, $currentAlias, $parts[0]);\n } else {\n // Add Order-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'orderColumn') && true === $this->accessor->getValue($column, 'orderable')) {\n $orderColumn = $this->accessor->getValue($column, 'orderColumn');\n $orderParts = explode('.', $orderColumn);\n if (count($orderParts) < 2) {\n $orderColumn = $this->entityShortName.'.'.$orderColumn;\n }\n $this->orderColumns[] = $orderColumn;\n } else {\n $this->orderColumns[] = null;\n }\n\n // Add Search-Field for VirtualColumn\n if ($this->accessor->isReadable($column, 'searchColumn') && true === $this->accessor->getValue($column, 'searchable')) {\n $searchColumn = $this->accessor->getValue($column, 'searchColumn');\n $searchParts = explode('.', $searchColumn);\n if (count($searchParts) < 2) {\n $searchColumn = $this->entityShortName.'.'.$searchColumn;\n }\n $this->searchColumns[] = $searchColumn;\n } else {\n $this->searchColumns[] = null;\n }\n }\n }\n\n return $this;\n }", "public function wp_nav_menu_manage_columns()\n {\n }", "protected function setDbColumns()\n {\n $connection = $this->model()->eloquent()->getConnectionName();\n\n $this->dbColumns = collect(Schema::connection($connection)->getColumnListing($this->model()->getTable()));\n }", "protected function initColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n foreach ($this->columns as $i => $column) {\n if (is_string($column)) {\n $column = $this->createDataColumn($column);\n } else {\n $column = Yii::createObject(array_merge([\n 'class' => $this->dataColumnClass ?: DataColumn::className(),\n 'grid' => $this,\n ], $column));\n }\n if (!$column->visible) {\n unset($this->columns[$i]);\n continue;\n }\n $this->columns[$i] = $column;\n }\n }", "abstract public function tableColumns();", "protected function _prepareColumns()\n {\n \tparent::_prepareColumns();\n \tunset($this->_columns['actionColumn']);\n }", "public function set_columns( $columns ) {\n\n\t\t$date_column = $columns['date'];\n\t\t$author_column = $columns['author'];\n\n\t\tunset( $columns['date'] );\n\t\tunset( $columns['author'] );\n\n\t\t$columns['type'] = esc_html__( 'Type', 'elementskit' );\n\t\t$columns['condition'] = esc_html__( 'Conditions', 'elementskit' );\n\t\t$columns['date'] = $date_column;\n\t\t$columns['author'] = $author_column;\n\n\t\treturn $columns;\n\t}", "public function all($cols = ['*']);", "private function resetQuery()\n {\n $this->cols('*');\n }", "abstract public function listColumns();", "public function listRegisterCols(){\n\t\t$this->registerCol('name_hld', self::COL_ANCHO_DETALLE);\n\t}", "public function selectFields($selectFields)\n\t{\n\t\t$this->select = $selectFields ? $selectFields : '*';\n\t}", "public function set_custom_column( $columns )\n {\n /* We are going to rearrange the information */\n $title = $columns['title'];\n $date = $columns['date'];\n unset ( $columns['title'] , $columns['date'] );\n\n $columns['name'] = 'Author Name';\n $columns['title'] = $title;\n $columns['approved'] = 'Approved';\n $columns['featured'] = 'Featured';\n $columns['date'] = $date;\n return ( $columns );\n }", "protected function getSelectColumns()\n {\n $select = [];\n\n foreach ($this->config as $key => $columns) {\n if (substr($key, -6) !== 'Column') continue;\n if (trim($columns) === '') continue;\n $field = substr($key, 0, -6);\n\n $columns = explode(',', $columns);\n $columns = array_map('trim', $columns);\n foreach ($columns as $col) {\n if (!isset($select[$col])) $select[$col] = [];\n $select[$col][] = $field;\n }\n }\n\n return $select;\n }", "public function setSelect($fields)\n {\n $this->select = [];\n if (func_num_args() > 1) {\n $fields = func_get_args();\n } elseif (!is_array($fields)) {\n $fields = [$fields];\n }\n return $this->addSelect($fields);\n }", "public function add_select($columns)\r\n {\r\n if ($this->columns) {\r\n array_add($this->columns, $columns);\r\n } else {\r\n $this->select($columns);\r\n }\r\n\r\n return $this;\r\n }", "public function addColumns()\n {\n add_filter( 'manage_edit-' . $this->post_type . '_columns', array($this, 'editColumns') ) ; // Add or Remove a Column\n add_action( 'manage_' . $this->post_type . '_posts_custom_column', array($this, 'manageColumns') ); //Show and Modify Column Data\n add_filter( 'manage_edit-' . $this->post_type . '_sortable_columns', array($this, 'sortableColumns') ); // Flags sortable Columns\n add_action( 'load-edit.php', array($this, 'loadSortColumns') );\n }", "public function columns($columns)\n\t{\n\t\t$this->columns = $columns;\n\n\t\treturn $this;\n\t}", "public function addSelect(string ...$columns)\n {\n $this->select = array_merge($this->select, $columns);\n\n return $this;\n }" ]
[ "0.692604", "0.69106275", "0.67120034", "0.6686156", "0.66677535", "0.6662436", "0.6540613", "0.65026516", "0.6501031", "0.64503896", "0.6447919", "0.64392364", "0.6344181", "0.6327592", "0.62401944", "0.62360525", "0.6193538", "0.6185772", "0.61580664", "0.60937864", "0.6078296", "0.6062357", "0.60534775", "0.6038454", "0.60078865", "0.6002691", "0.6001282", "0.5962054", "0.5954485", "0.59500843", "0.5917618", "0.5915892", "0.5915374", "0.59115463", "0.5905441", "0.5884739", "0.5884739", "0.5884739", "0.5884739", "0.5884017", "0.5884017", "0.58726776", "0.58642346", "0.585521", "0.5839016", "0.58236176", "0.58212644", "0.5814448", "0.58048886", "0.58036876", "0.5802358", "0.5799675", "0.5796597", "0.5793474", "0.57866484", "0.5770971", "0.57704663", "0.57670057", "0.5765517", "0.5764949", "0.5750891", "0.57495683", "0.5743812", "0.5710466", "0.5700419", "0.5677136", "0.5676612", "0.5668901", "0.56638014", "0.5658141", "0.56494945", "0.56483376", "0.5643718", "0.5639462", "0.5630725", "0.56214833", "0.56143373", "0.5613051", "0.5605937", "0.56032366", "0.55965525", "0.55898523", "0.5577377", "0.5566484", "0.55531514", "0.5550966", "0.5549724", "0.554773", "0.5541251", "0.5534389", "0.55327123", "0.55306333", "0.5499562", "0.549947", "0.549754", "0.54910266", "0.54637", "0.54589534", "0.5452506", "0.5450218" ]
0.608876
20
Set the amount of results to select
public function limit($limit) { $this->model = $this->model->take($limit); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setNumResults()\n\t{\n\t\t$this->numResults = (int) count($this->data);\n\t}", "private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->limit=$row->answersperpage;\n }", "private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->questionsPerPage=$row->questionsperpage;\n }", "protected function getAllAvailableNumberOfResultsOptions() {}", "public function setRowsCountBeforeLimitFilter()\n {\n $this->rowsCountBeforeLimitFilter = $this->getRowsCount();\n }", "function setRecordsPerPage($count) {\n $this->records_per_page = $count;\n}", "public function setNumResults($count)\n {\n $this->numResults = (int)$count;\n\n return $this;\n }", "private function setNumberOfPages(): void\n {\n $this->number_of_pages = (int)ceil($this->number_of_records / $this->per_page);\n }", "public function setElementsPerPage($count);", "function set_num_items($num){\n $this -> num_of_items = $num;\n }", "private function startCountingSelectQueries(): void\n {\n if ($this->showQueries !== self::SHOW_QUERIES_RESET) {\n throw new LogicException('showQueries wasnt reset, you did something wrong');\n }\n $this->showQueries = $_REQUEST['showqueries'] ?? null;\n // force showqueries on to count the number of SELECT statements via output-buffering\n // if this approach turns out to be too brittle later on, switch to what debugbar\n // does and use tractorcow/proxy-db which should be installed as a dev-dependency\n // https://github.com/lekoala/silverstripe-debugbar/blob/master/code/Collector/DatabaseCollector.php#L79\n $_REQUEST['showqueries'] = 1;\n ob_start();\n echo '__START_ITERATE__';\n }", "protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }", "private function selectQuestions(){\n $this->selectLimit();\n $this->arrResultQuestions=parent::selectSomething('*', 'posts', '', '', '', null, null, null, null, 'lastanswer',\n 'desc', $this->questionsPerPage);\n }", "function setLimit($numrows, $offset = 0)\n{\n\t$this->drv->setLimit($numrows, $offset);\n}", "public function setRowsPerPage($r)\n\t{\n\t\tif((int) $r == 0)\n\t\t{\n\t\t\t$r = 20;\n\t\t}\n\t\t$this->max = $r;\n\t\t// (re-)calculate start rec\n\t\t//$this->calculateStart();\n\t}", "abstract public function prepareFilteredCount();", "function allWithLimit() {\n\n }", "function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }", "public function setLimit($x) { $this->limit = $x; }", "private function setLimitAndOffset()\n {\n $this->offset = ($this->page - 1) * $this->config->limit;\n if ($this->config->limit == 0) {\n $this->config->limit = count(self::$needles);\n }\n }", "public function limit($count, $offset);", "public function render_per_page_options()\n {\n }", "public function setCountQuery(SelectQueryInterface $query) {\n $this->customCountQuery = $query;\n }", "public function getNbResults()\n {\n return $this->select->count();\n }", "public function setPageResults($results,$resultsCount) {\n $this->calculatePageCount($resultsCount);\n $this->pageResults = $results;\n }", "public function testModSelectCountPages()\n {\n $this->todo('stub');\n }", "protected function prepareCount()\n {\n if (is_null($this->idsCount)) {\n $options = array(\n SelectorSourceInterface::RESULT => SelectorSourceInterface::RESULT_COUNT,\n SelectorSourceInterface::GROUPBY => $this->groupBy,\n );\n $this->idsCount = $this->source->loadIds(\n $this->criterias,\n array_merge($this->options, $options)\n );\n }\n\n return $this;\n }", "private function countSearchResults(): void\n {\n $this->SearchResult->total_matches = count($this->SearchResult->matches);\n $this->SearchResult->total_indecisive_matches = count($this->SearchResult->indecisive_matches);\n $this->SearchResult->total_no_matches = count($this->SearchResult->no_matches);\n }", "public static function setQueryLimit($limit){\t\t\n\t\t//reset the queryCount\n\t\tself::$queryCount = 0;\n\t\t\n\t\tself::$queryLimit = $limit;\n }", "private function doCount(SelectQueryInterface $query): void\n {\n if ($this->options->multiple && $this->options->pagination) {\n $this->options->count = true;\n $countSql = $this->sqlSelector->getSelectSql($query);\n $this->explanation->addQuery($query, $countSql, $this->options->mappingCollection, $this->configOptions);\n $recordCount = intval($this->fetchValue($countSql, $query->getParams()));\n $this->options->pagination->setTotalRecords($recordCount);\n $this->options->count = false;\n }\n }", "protected function applyItems()\n\t{\n\t\t$value = (int)$this->itemsPerPage;\n\n\t\tif ($value == 0) {\n\t\t\t$this->itemsPerPage = $this->paginator->itemsPerPage = count($this->dataSource);\n\t\t} else {\n\t\t\t$this->itemsPerPage = $this->paginator->itemsPerPage = $value;\n\t\t}\n\t}", "function MyMod_Paging_NItemsPerPage_Set()\n {\n $val=$this->CGI_VarValue($this->ModuleName.\"_NItemsPerPage\");;\n if (!empty($val) && preg_match('/^\\d+$/',$val))\n {\n $this->NItemsPerPage=$val;\n }\n }", "private function setLimit()\n {\n if (isset($this->iDisplayStart) && $this->iDisplayLength != '-1') {\n $this->qb->setFirstResult($this->iDisplayStart)->setMaxResults($this->iDisplayLength);\n }\n\n return $this;\n }", "private function _limit($numRows) \n\t{\n\t\t$this->_query .= \" LIMIT \" . ( int ) $numRows;\n\t}", "abstract public function prepareTotalCount();", "public function setNbResults($nbResults)\n {\n $this->nbResults = $nbResults;\n $this->calcNbPages();\n }", "private function setNumRows($num_rows)\r\n\t{\t\t\r\n\t\t$this->num_rows = $num_rows;\t\t\r\n\t}", "abstract protected function prepareTotalCount();", "public function setCountQuery()\n {\n $this->countQuery = true;\n return $this;\n }", "function _initrs()\n\t{\n\t\t$this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID );\n\t}", "public function setItemCountPerPage($n = -1) {\n\t\t$this->setJqueryParam('iDisplayLength', $n);// paramètre jquery\n\t\treturn parent::setItemCountPerPage($n);\n\t}", "public function SetNumPages()\n\t\t{\n\t\t\t$this->_pricenumpages = ceil($this->GetNumProducts() / GetConfig('CategoryProductsPerPage'));\n\t\t}", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "public function setMaxResults($maxResults);", "private function refreshNbPages()\n {\n $this->_nbPages = $this->_limit ? ceil($this->_count/$this->_limit) : 0;\n }", "function woocommerce_result_count() {\n\t\t\treturn;\n\t}", "public function recordsperpageAction() {\n\t\t$this->_helper->ajaxgrid->setRowNum ();\n\t}", "public function recordsperpageAction() {\n\t\t$this->_helper->ajaxgrid->setRowNum ();\n\t}", "public function itemsperpageAction()\r\n {\r\n $itemCountPerPageSession = new Zend_Session_Namespace('itemCountPerPage');\r\n $itemCountPerPageSession->itemCountPerPage['citype'] = $this->_getParam('rowCount');\r\n $this->_redirect('citype/index');\r\n exit;\r\n }", "public function setCountQuery(Select $query) {\n\t\t$this->countQuery = $query;\n\t\treturn $this;\n\t}", "function limit($count) {\n\t\t$this->appendStmt('limit', \"LIMIT ?\", [$count]);\n\t\treturn $this;\n\t}", "function numResults() {\n\t\treturn $this->num_rows();\n\t}", "public function set_rows($numrows) {\n $this->rows = $numrows;\n }", "private function stopCountingSelectQueries(): int\n {\n $s = ob_get_clean();\n $s = preg_replace('/.*__START_ITERATE__/s', '', $s);\n $this->resetShowQueries();\n return substr_count($s, ': SELECT');\n }", "abstract protected function setresults();", "protected function _getMaxResultsPerPage() {\r\n return 500;\r\n }", "protected function queryMore()\n {\n $result = $this->client->queryMore($this->queryResult->getQueryLocator());\n $this->setQueryResult($result);\n $this->rewind();\n }", "private function initializeTotalRecordCount()\r\n {\r\n if ( $this->mode == self::MODE_FILLED ) {\r\n $stmt = $this->conn->query( $this->getTotalRecordCountSql( $this->sql , $this->idField ) );\r\n }\r\n if ( $this->mode == self::MODE_PARAMETERIZED ) {\r\n $stmt = $this->conn->prepare( $this->getTotalRecordCountSql( $this->sql, $this->idField ) );\r\n for ( $i = 0; $i<count( $this->values); $i++) {\r\n if ( is_bool( $this->values[$i] ) ) {\r\n $stmt->bindValue( $i+1, $this->values[$i], PDO::PARAM_BOOL );\r\n } else {\r\n $stmt->bindValue( $i+1, $this->values[$i] );\r\n }\r\n }\r\n $stmt->execute( );\r\n }\r\n $this->totalRecordCount = $stmt->fetchColumn(0);\r\n }", "private function _proceedCount($select)\n {\n global $zdb;\n\n try {\n $countSelect = clone $select;\n $countSelect->reset(\\Zend_Db_Select::COLUMNS);\n $countSelect->reset(\\Zend_Db_Select::ORDER);\n $countSelect->columns('count(' . self::PK . ') AS ' . self::PK);\n\n $result = $countSelect->query()->fetch();\n\n $k = self::PK;\n $this->_count = $result->$k;\n if ( $this->_count > 0 ) {\n $this->counter = (int)$this->_count;\n $this->countPages();\n }\n } catch (\\Exception $e) {\n /** TODO */\n Analog::log(\n 'Cannot count contributions | ' . $e->getMessage(),\n Analog::WARNING\n );\n Analog::log(\n 'Query was: ' . $countSelect->__toString() . ' ' . $e->__toString(),\n Analog::ERROR\n );\n return false;\n }\n }", "public function fetchData()\r\n {\r\n $this->objectcount = $this->search_obj->getObjectQueryCount($this->extra);\r\n }", "protected final function fetchTotalRecordCount(): void\n {\n $query = $this->query;\n $query->resetColumns()\n ->count()\n ->resetOrders()\n ->removeLimit();\n\n $this->totalRecords = $this->query->execute()->getOne();\n }", "public function getTotalNumberOfResults();", "public function numResults()\n {\n return $this->numResults;\n }", "function startResult(& $result) \n {\n $start = ($result->pageNumber - 1) * $result->resultsPerPage;\n $end = $start + $result->numRows();\n $start ++;\n $row = $this->_headTemplate;\n $row = str_replace('{results}', $start.'-'.$end, $row);\n $row = str_replace('{total}', $result->results, $row);\n $this->_html .= $row;\n $this->_query = $result->getInfo('query');\n }", "function wpfme_search_results_per_page( $query ) {\n global $wp_the_query;\n if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) {\n $query->set( 'wpfme_search_results_per_page', 100 );\n }\n return $query;\n}", "private function setTotalPages()\n {\n $this->totalPages = ceil($this->totalData / $this->limit);\n }", "private function setTotalPages()\r\n\t{\r\n\t\t$this->total_pages = ceil($this->num_rows / $this->rows_per_page);\r\n\t}", "function awcp_setSearchResultsPerPage( $query ) {\n\tglobal $wp_the_query;\n\tif ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) {\n\n\t\t//get options\n\t\t$options = advancedwordpressconfigurationpluginOptions::getInstance();\n\n\t\t//get current option name\n\t\t$shortName = $options->getShortName(__FILE__);\n\n\t\t$query->set( 'wpfme_search_results_per_page', $options->options_frontend[\"advanced_wordpress_configuration_plugin_\".$shortName] );\n\t}\n\treturn $query;\n}", "public function setQueryLimit($limit) {\n\t\t$this->queryLimit = (integer) $limit;\n\t}", "public function setLimit($limit) {\n\t$this->parseQuery->setLimit($limit);\n }", "function selectMaxPage() {\n // 1) get Connection\n $dbInfo = new DBInfo();\n $con = $dbInfo->getConnection();\n if(!$con) {\n echo 'false_selectPageList_connect';\n return;\n }\n\n // 2) set SQL sentence\n $sql = \"SELECT CEIL(COUNT(*) / 10) \n FROM board b\n JOIN user_info u\n ON (writer = id)\";\n $sql .= $this->queryFilter;\n\n // 3) act SQL\n if(!($result = $con->query($sql))) {\n echo 'false_selectPageList_sqlQuery';\n return;\n }\n\n if(!$result) {\n echo 'false_selectPageList_noSelect';\n return;\n }\n $con->close();\n\n return $result->fetch_array()[0];\n }", "function paginateWithExtra($size = 15);", "public function findAllOverruleLimitClause()\n {\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->once())\n ->method('fetchAll')\n ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.'))));\n $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), null, 50, 10);\n $this->assertEquals(1, $finderResult->count());\n $data = $finderResult->current();\n $this->assertEquals('Here is bar.', $data->withAnnotation());\n $this->assertEquals('And this is default.', $data->withDefaultValue());\n $select = $this->mockQueryBuilder->getSelect();\n $this->assertEquals('foo', $select->getBaseTableName());\n $this->assertEquals('bar ASC', $select->getOrderedBy());\n $this->assertTrue($select->hasLimit());\n $this->assertEquals(50, $select->getOffset());\n $this->assertEquals(10, $select->getAmount());\n $this->assertFalse($select->hasCriterion());\n }", "protected function setCount($count) {\r\n $this->count = $count;\r\n }", "function perpage_selector()\r\n\t{\r\n\t?>\r\n\t\t<form name=\"per_page2\" action=\"\" method=\"get\">\r\n\t\t\t<select name=\"per_page\" id=\"per_page\" onChange='location.replace(\"<?php\r\n\t\t\t$data= $_GET;\r\n\t\t\tif(isset($data[\"per_page\"]))\r\n\t\t\t{\r\n\t\t\t\tunset($data[\"per_page\"]);\r\n\t\t\t}\r\n\t\t\techo $_SERVER['PHP_SELF'].\"?\".http_build_query($data); ?>&<?php echo \"per_page\";?>=\"+$(\"#per_page\").val() )'>\r\n\t\t\t<?php \r\n\t\t\t/* Adding a Default Value in options if it does not exist. */\r\n\r\n\t\t\tif(($this->rows_per_page%10)!=0)\r\n\t\t\t{\r\n\t\t\t ?>\r\n\t\t\t\t<option selected='selected' value=\"<?php echo $this->rows_per_page; ?>\"><?php echo $this->rows_per_page; ?></option>\r\n\t\t\t<?php \r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t<?php \r\n\t\t\t\tfor ($i=10; $i < 100 ; $i = $i + 10) { \r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t<option <?php \r\n\t\t\t\t\t\t\tif(isset($_GET['per_page']) && $_GET['per_page'] == $i)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \" selected = 'selected' \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(!isset($_GET['per_page']) && $this->rows_per_page == $i)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \" selected = 'selected' \";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t?> value=\"<?php echo $i; ?>\"><?php echo $i; ?></option>\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t<?php\r\n\t\t\t\t}\r\n\t\t\t ?>\r\n\t\t\t</select>\r\n\t\t</form>\r\n\t\t<?php\r\n\t}", "public function limit($limit);", "public function limit($limit);", "private function setNumRows( $rows )\n {\n $this->numrows = $rows;\n }", "private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }", "public function limit($limit,$offset);", "public function count(): ODataQueryBuilder {\n $this->count = true;\n\n return $this;\n }", "private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}", "function skip($count=1) {\n\t\tif ($this->dry()) {\n\t\t\ttrigger_error(self::TEXT_M2Empty);\n\t\t\treturn;\n\t\t}\n\t\tself::load($this->criteria,$this->order,$this->offset+$count);\n\t}", "public function setMaxResults()\n {\n return $this;\n }", "public function setResultsPerPage($resultsPerPage) {\n $this->resultsPerPage = $resultsPerPage;\n }", "public function fetchNrRecordsToGet();", "function getResultsCounter()\n\t{\n\t\t// Initialize variables\n\t\t$html = null;\n\t\t$fromResult = $this->limitstart + 1;\n\n\t\t// If the limit is reached before the end of the list\n\t\tif ($this->limitstart + $this->limit < $this->total) {\n\t\t\t$toResult = $this->limitstart + $this->limit;\n\t\t} else {\n\t\t\t$toResult = $this->total;\n\t\t}\n\n\t\t// If there are results found\n\t\tif ($this->total > 0) {\n\t\t\t$msg = JText::sprintf('Results of', $fromResult, $toResult, $this->total);\n\t\t\t$html .= \"\\n\".$msg;\n\t\t} else {\n\t\t\t$html .= \"\\n\".JText::_('No records found');\n\t\t}\n\n\t\treturn $html;\n\t}", "private function setCustomLimit()\n\t{\n\t\t$this->limit = $this->customQuery->limit ? $this->customQuery->limit : $this->queryLimit;\n\n\t\treturn $this;\n\t}", "function setResults ($result) {\n\t\t$this->_results = $result;\n\t}", "function bt_new_loop_shop_per_page( $cols ) {\n // $cols contains the current number of products per page based on the value stored on Options -> Reading\n // Return the number of products you wanna show per page.\n $cols = 12;\n return $cols;\n}", "function so22835795_loop_shop_per_page() {\n return -1; //return any number, -1 === show all\n }", "public function setTotalItemCount($totalItemCount);", "function set_posts_per_page($query) {\n if (is_search()) {\n $query->set('posts_per_page', 50);\n }\n\n return $query;\n}", "public function addLimit($_params , $_query)\n {\n \n $_query->setMaxResults($_params['length'])\n ->setFirstResult($_params['offset']);\n\n return $_query;\n }", "public function take($limit = 20);", "public function getQueryCount();", "private function setRowsPerPage($rows_per_page)\r\n\t{\r\n\t\tif(isset($rows_per_page) and is_numeric($rows_per_page))\r\n\t\t{\r\n\t\t\t$this->rows_per_page = (int) $rows_per_page;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// default number of rows to show per page\r\n\t\t\t$this->rows_per_page = 10;\r\n\t\t}\r\n\r\n\t\tif($this->rows_per_page < 1)\r\n\t\t{\r\n\t\t\t$this->rows_per_page = 10;\r\n\t\t}\r\n\t}", "function AddLimit($offset=-1, $numtofetch=-1)\n\t{\n\t\t$this->offset = $offset;\n\t\t$this->numtofetch = $numtofetch;\n\t\treturn ' ';\n\t}", "private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }", "function set_lines_per_page ($lines_per_page)\r\n {\r\n $_SESSION[\"lines_per_page\"] = $lines_per_page;\r\n }", "private function doRs()\n\t{\n//\t\tprint $this->getStart().'-'.$this->getRowsPerPage();\n\t\tif(!isset($this->rs))\n\t\t{\n\t\t\t$this->criteria->setOffset($this->getStart());\n\t\t\t$this->criteria->setLimit($this->getRowsPerPage());\n\t\t\t$this->rs = call_user_func_array(\n\t\t\t\tarray(\n\t\t\t\t\t$this->getPeerClass(), \n\t\t\t\t\t$this->getPeerSelectMethod()\n\t\t\t\t), \n\t\t\t\tarray(\n\t\t\t\t\t$this->criteria,\n\t\t\t\t\t$this->con\n\t\t\t\t)\n\t\t\t);\n//\t\t\tCommon::printArray(BasePeer::createSelectSql($this->criteria,$temp=array()));\n//\t\t\tCommon::printArray($this->rs);\n\t\t\t$this->currentCount = count($this->rs);\n\t\t}\n\t}" ]
[ "0.79341054", "0.68598145", "0.67933553", "0.6578989", "0.6537371", "0.64542806", "0.6382886", "0.6311044", "0.6255694", "0.62362725", "0.6211625", "0.61835396", "0.6174281", "0.6141372", "0.60769516", "0.607461", "0.6037919", "0.59681123", "0.59535325", "0.5946956", "0.59312683", "0.5918903", "0.5907273", "0.5892147", "0.5884332", "0.58833426", "0.5871573", "0.5863606", "0.5826731", "0.5822398", "0.5815415", "0.5805177", "0.58040226", "0.5801387", "0.5752094", "0.5745567", "0.57454383", "0.5738472", "0.5737992", "0.57264906", "0.57203317", "0.57084644", "0.56938815", "0.5675745", "0.5666906", "0.5665949", "0.5663204", "0.5663204", "0.56590617", "0.5646013", "0.562855", "0.5627955", "0.5596875", "0.5593603", "0.55856365", "0.5578641", "0.556498", "0.55630445", "0.55520606", "0.5544546", "0.55357665", "0.552853", "0.5526511", "0.5524595", "0.5522197", "0.5515344", "0.5501841", "0.5500795", "0.5494694", "0.54608166", "0.54597336", "0.5454643", "0.54466784", "0.5438581", "0.5438055", "0.54320353", "0.54320353", "0.5431142", "0.5429152", "0.5418146", "0.54176736", "0.54166", "0.5412764", "0.54076886", "0.54045546", "0.53998584", "0.5391359", "0.5386924", "0.53817195", "0.53767395", "0.53752506", "0.53721374", "0.53720933", "0.53705424", "0.53674227", "0.5366672", "0.53569686", "0.5352947", "0.53496546", "0.53466797", "0.5342343" ]
0.0
-1
Set a left join
public function leftJoin($table, $foreign_key, $operator, $local_key) { $this->model = $this->model ->leftJoin($table, $foreign_key, $operator, $local_key); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leftJoin($table, $conditions = []);", "public function leftOuterJoin($table);", "function dt_core_join_left_filter( $parts ) {\n\tif( isset($parts['join']) && !empty($parts['join']) ) {\n\t\t$parts['join'] = str_replace( 'INNER', 'LEFT', $parts['join']);\n\t}\n\treturn $parts;\n}", "public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments = []);", "public static function leftJoin($source, $on, $alias = null, array $bindings = []);", "public function leftJoin($table, $key, ?string $operator = null, $foreign = null);", "function leftJoin($conditions)\n\t{\n\t\treturn $this->join('LEFT', $conditions);\n\t}", "public function leftJoin() {\r\n\t\t$args = func_get_args();\r\n\t\t$name = array_shift($args);\r\n\t\t$joined = array_shift($args);\r\n\t\tif (!$name) $name = '___' . $joined;\r\n\t\t//if (count(array_keys(self::$_joinStack, $joined)) > 1) {\r\n\t\tif (in_array($joined, self::$_joinStack)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tself::$_joinStack[] = get_class($this);\r\n\t\tself::$_joinStack[] = $joined;\r\n\t\t$model = null;\r\n\t\tif (is_string($joined)) {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = new $joined();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (is_subclass_of($joined, 'Dbi_Model')) {\r\n\t\t\t\t$model = $joined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tarray_pop(self::$_joinStack);\r\n\t\tif (is_null($model)) {\r\n\t\t\tthrow new Exception('Queries can only join models.');\r\n\t\t}\r\n\t\t$this->_leftJoins[] = array(\r\n\t\t\t'name' => $name,\r\n\t\t\t'model' => $model,\r\n\t\t\t'args' => $args\r\n\t\t);\r\n\t}", "public function join()\n {\n $this->defaultjoinsetted = true;\n if (!empty($this->entity_link_list)) {\n foreach ($this->entity_link_list as $entity_link) {\n $this->defaultjoin .= \" left join `\" . strtolower(get_class($entity_link)) . \"` on \" . strtolower(get_class($entity_link)) . \".id = \" . $this->table . \".\" . strtolower(get_class($entity_link)) . \"_id\";\n }\n }\n return $this;\n }", "function joinLeft($field, $select, $foreign) {\n\t\tif ($select instanceof LinqSelect) {\n\t\t\t$this->join[] = array(\"LEFT\", $field, $select, $foreign);\n\t\t} else {\n\t\t\tdie(\"Not valid table\");\n\t\t}\n\t\treturn $this;\n\t}", "public function left_join($table, $on=null)\n {\n $alias = null;\n\n if (is_string($table) && strpos($table, ' ') && !preg_match('/^\\s*\\(/i', $table))\n {\n list ($table, $alias) = preg_split('/\\s+/', trim($table));\n $table = self::quote_name($table);\n }\n\n $args = func_get_args(); array_shift($args);\n $clause = call_user_func_array('self::clause', $args);\n\n $this->join[] = sprintf('left join '. $table .($alias ? ' '.$alias:'') . ' on ' . $clause);\n\n return $this;\n }", "public function leftJoin($table, $on = null)\n {\n $this->joinTokens[$this->activeJoin = $table] = ['type' => 'LEFT', 'on' => []];\n\n return call_user_func_array([$this, 'on'], array_slice(func_get_args(), 1));\n }", "public function testLeftJoinStmt()\n {\n $leftJoin = $this->joinTemplate()('LEFT');\n return $this->assertEquals($leftJoin, \"SELECT blog.blog_text, blog.token_id, tokens.token_id, tokens.token_string FROM blog LEFT JOIN tokens ON blog.token_id = tokens.token_id\");\n }", "function sql_leftJoin(){\n\t\t$dbconnection = $this->db_connect();\n\t\tif($dbconnection !=1)\n\t\t{\n\t\t\t$result=\"MySql Connection Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//LIST OF SELECTIONS\n\t\t\t//INSTEAD of a listOfFields I need a listOfSelections like \"db.tbl_1.fld_1\"\n\t\t\t// a_selections = array(\"db.tbl_1.fld_1\",\"db.tbl_1.fld_2\",\"db.tbl_2.fld_1\");\n\t\t\t\n\t\t\tif($this->a_fields !=\" \"){\n\t\t\t\t$a_selections = $this->arraySELECTIONS($this->db,$this->table,$this->a_fields);\n\t\t\t}else{\n\t\t\t\t$a_selections = $this->db.\".\".$this->table.\" \";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->a_fields2 !=\" \"){\n\t\t\t\t$a_selections2 = $this->arraySELECTIONS($this->db2,$this->table2,$this->a_fields2);\n\t\t\t}else{\n\t\t\t\t$a_selections2 = $this->db2.\".\".$this->table2.\" *\";\n\t\t\t}\n\t\t\t\n \t\t\t$listOfSelections = $this->arrayFieldsToList($a_selections);\n\t\t\t$listOfSelections2 = $this->arrayFieldsToList($a_selections2);\n\t\t\t\n \t\t\t$sql = mysql_query(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n\t\t\t\n \t\t\t //echo(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n \t\t\t\tif (mysql_num_rows($sql) > 0) \n\t\t\t \t{\n\t\t\t \twhile ($row = mysql_fetch_assoc($sql)) \n\t\t\t \t{\n\t\t\t \t$a_data[]=$row ;\n\t\t\t \t}\n\t\t \t\t$result= $a_data;\t\n\t\t\t\t}else{\n\t\t\t\t\t$result=\"NO DATA AVAILABLE\";\n\t\t\t\t}\n\t\t}\n\t\treturn $result;\n\t\n\t}", "public function testBuildJoinDefault()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 ON table1.id = table2.id',\n $query->buildJoin()\n );\n }", "public function leftjoin($classname, $classnameon = \"\")\n {\n $this->join = strtolower($classname);\n\n if (!$classnameon)\n $classnameon = $this->objectName;\n\n $from = '';\n// if($this->sequence == 'delete')\n// $from = \" from `\" . $this->table . \"` \";\n // on \".strtolower(get_class($entity)).\".id = \".strtolower(get_class($entity_owner)).\".\".strtolower(get_class($entity)).\"_id\n $this->query .= $from . \" left join `\" . $this->join . \"` on \" . $this->join . \".id = \" . strtolower($classnameon) . \".\" . $this->join . \"_id\";\n// $this->query .= \" left join `\" . $this->join . \"` \";\n $this->sequence = '';\n\n return $this;\n }", "final public static function leftJoin(string $table, string $primaryKey, string $foreignKey)\n {\n //Init the select\n self::$query .= \" LEFT JOIN \" . $table . \" ON $table.$primaryKey = \" . self::tableName() . \".$foreignKey \";\n return (new static);\n }", "public function leftJoin(Select $table, $alias, $on)\n {\n $this->joins[] = array(\"subject\"=>$table, \"ali\"=>$alias, \"on\"=>$on, \"join\"=>\"LEFT JOIN\");\n return $this;\n }", "public function leftJoin($table, array $fields = [], array $on = []) {\n return $this->_addJoin(Join::LEFT, $table, $fields, $on);\n }", "function joinQuery()\n {\n }", "public static function doLeftJoin($table2, $params=NULL, $fields=array()) {\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$what = parent::_getSelectFields($fields);\n\t\t$conn->leftJoin(self::TABLE_NAME, $table2, $what);\n\t\treturn DbModel::doSelect($conn, new ProjectsListingsModel());\n\t}", "public function leftJoin($table, $condition)\n {\n return $this->addJoin($table, $condition, 'LEFT');\n }", "public function leftJoin(\n $joined,\n $on = null,\n $fields = [],\n $additionalJoins = [],\n $grouped = false,\n $iterator = null\n ) {\n $relations = explode('~', $joined, 2);\n $modelClass = $relations[0];\n if (!class_exists($modelClass)) {\n throw new Exceptions\\ModelNotFoundException($modelClass);\n }\n if (count($relations) === 2) { // Index\n throw new Exceptions\\UnsupportedActionException('Cannot perform LEFT JOIN <index>');\n } else {// Model\n if (is_string($on)) {\n $on = new Expressions\\Conditions\\Generic($on, null, $this);\n }\n $this->withVirtualFields(\n $fields,\n function ($model, $field) use ($modelClass, $joined, $on, $grouped, $additionalJoins) {\n $mongoNotationOn = $on->mongoNotation;\n $modelName = ClassFinder::getClassBasename(get_class($this));\n\n $queryData = [];\n $fieldsInConditions = [];\n // @TODO: optimization: move this out of the callback\n $joinedModelKey = null;\n foreach ($mongoNotationOn as $left => $right) {\n // @TODO: nested conditions\n $leftField = (new \\Zer0\\Model\\Subtypes\\Field($left))->parseName();\n if ($right instanceof \\Zer0\\Model\\Subtypes\\Field) {\n // Field - Field predicate\n $rightField = $right->parseName();\n\n // If 'base.field = joined.field'\n if (isset($leftField['model']) && $modelName === $leftField['model']) {\n // then reverse it\n unset($mongoNotationOn[$left]);\n $mongoNotationOn[(string)$right] = new \\Zer0\\Model\\Subtypes\\Field($left);\n [$left, $right] = [$right, $left];\n [$leftField, $rightField] = [$rightField, $leftField];\n }\n unset($mongoNotationOn[(string)$left]);\n $mongoNotationOn[$leftField['name']] =\n new \\Zer0\\Model\\Subtypes\\Placeholder(count($queryData));\n // Base (right) model values to pass to where() on joined model\n if (is_array($model)) {\n throw new \\Exception('generic model array problem');\n }\n $queryData[] = $model->values($rightField['name']);\n $fieldsInConditions[] = $rightField['name'];\n $joinedModelKey = $leftField['name'];\n } else {\n // Field - Value predicate\n unset($mongoNotationOn[(string)$left]);\n $mongoNotationOn[$leftField['name']] = $right;\n }\n }\n\n $origModelKey = $fieldsInConditions[0]; // @TODO: foreach\n $on->setValues($queryData);\n $on = $on->mutateWithMongoNotation($mongoNotationOn);\n $joinedData = [];\n\n // Fetch data from joined model\n $models = $modelClass::where((string)$on, $on->getValues());\n if (isset($additionalJoins) && count($additionalJoins)) {\n foreach ($additionalJoins as $joinItem) {\n $models = $models->withVirtualFields($joinItem);\n }\n }\n $models = $models->load();\n foreach ($models as $item) {\n if ($grouped) {\n if (!isset($joinedData[$item[$joinedModelKey]])) {\n $joinedData[$item[$joinedModelKey]] = [];\n }\n $joinedData[$item[$joinedModelKey]] [] = $item;\n } else {\n $joinedData[$item[$joinedModelKey]] = $item;\n }\n }\n if ($grouped) {\n foreach ($model->values($joinedModelKey) as $k) {\n if (!isset($joinedData[$k])) {\n $joinedData[$k] = [];\n }\n }\n }\n $model->addDataFromJoin(\n $origModelKey,\n $joinedData,\n $field\n );\n },\n $iterator\n );\n }\n return $this;\n }", "public function leftJoin($fromAlias, $join, $alias, $condition = null)\n {\n return $this->add('join', array(\n $fromAlias => array(\n 'joinType' => 'left',\n 'joinTable' => $join,\n 'joinAlias' => $alias,\n 'joinCondition' => $condition\n )\n ), true);\n }", "public function basic_join_setup()\r\n {\r\n \r\n }", "public function leftJoin($fromAlias, $join, $alias, $condition = null)\n\t{\n\t\t$join = $this->getTableName($join, ConnectionManager::MODE_READ);\n\n\t\treturn parent::leftJoin($fromAlias, $join, $alias, $condition);\n\t}", "public function leftJoin(string $table, string $local_column, string $operator, string $joined_column, bool $is_pivot = false)\n {\n $this->join($table, $local_column, $operator, $joined_column, $is_pivot, 'left join');\n \n return $this;\n }", "public function leftJoin($table, $column1, $operator = null, $column2 = null)\n\t{\n\t\treturn $this->join($table, $column1, $operator, $column2, 'LEFT');\n\t}", "function cf_search_join( $join ) {\n\t global $wpdb;\n\n\t if ( is_search() ) { \n\t $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t }\n\t \n\t return $join;\n\t}", "public function leftjoinrecto($classname, $classnameon = \"\")\n {\n $this->join = strtolower($classname);\n\n if (!$classnameon)\n $classnameon = $this->objectName;\n\n $from = '';\n// if($this->sequence == 'delete')\n// $from = \" from `\" . $this->table . \"` \";\n // on \".strtolower(get_class($entity)).\".id = \".strtolower(get_class($entity_owner)).\".\".strtolower(get_class($entity)).\"_id\n $this->query .= $from . \" left join `\" . $this->join . \"` on \" . $this->join . \".\" . strtolower($classnameon) . \"_id = \" . strtolower($classnameon) . \".id\";\n// $this->query .= \" left join `\" . $this->join . \"` \";\n $this->sequence = '';\n\n return $this;\n }", "public function addLeftJoinOn($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::LEFT, $table, $where, false);\n \n return $this;\n }", "public function testBuildJoinDefaultWithTwoJoinOn()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->joinOn('id', 'id')\n ->joinOn('user_id', 'type_id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 ON table1.id = table2.id AND table1.user_id = table2.type_id',\n $query->buildJoin()\n );\n }", "public function addLeftJoinUsing($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::LEFT, $table, $where, true);\n \n return $this;\n }", "function carton_exclude_order_comments_from_feed_join( $join ) {\n\tglobal $wpdb;\n\n if ( ! $join )\n \t$join = \" LEFT JOIN $wpdb->posts ON $wpdb->comments.\\\"comment_post_ID\\\" = $wpdb->posts.\\\"ID\\\" \";\n\n return $join;\n}", "function cf_search_join( $join ) {\n\t\tglobal $wpdb;\n\n\t\tif ( is_search() ) {\n\t\t\t$join .= ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t\t}\n\n\t\treturn $join;\n\t}", "protected function applyPrejoin($query)\n {\n if (count($this->prejoin)>0) {\n foreach ($this->prejoin as $prejoin) {\n $DBColumn = QueryColumnFactoryStorage::byValueKey($prejoin);\n\n if (!$DBColumn->isFetchable()) {\n continue;\n }\n\n if ($DBColumn->needsJoin()) {\n $query->join($DBColumn);\n }\n }\n }\n }", "public function leftJoin(string $tableName, string $tableAlias = null, string $conditions = null): self {\r\n return $this -> addJoin('left', $tableName, $tableAlias, $conditions);\r\n }", "protected function _getFetchJoins() {\n\t\treturn 'LEFT JOIN series se ON se.series_id = s.series_id\n\t\t\tLEFT JOIN series_settings stpl ON (se.series_id = stpl.series_id AND stpl.setting_name = ? AND stpl.locale = ?)\n\t\t\tLEFT JOIN series_settings stl ON (se.series_id = stl.series_id AND stl.setting_name = ? AND stl.locale = ?)\n\t\t\tLEFT JOIN series_settings sapl ON (se.series_id = sapl.series_id AND sapl.setting_name = ? AND sapl.locale = ?)\n\t\t\tLEFT JOIN series_settings sal ON (se.series_id = sal.series_id AND sal.setting_name = ? AND sal.locale = ?)';\n\t}", "public function leftJoinRelations($relations)\n {\n $relations = is_array($relations) ? $relations : func_get_args();\n\n return $this->joinRelations($relations, 'left');\n }", "protected function setJoin($query = null)\n {\n $query = $query ? : $this->query;\n $baseTable = $this->related->getTable ();\n $key = $baseTable . '.' . $this->related->getKeyName ();\n $query->join ( $this->table, $key, '=', $this->getOtherKey () );\n return $this;\n }", "public function leftGroupedJoin(\n $joined,\n $on = null,\n $fields = [],\n $additionalJoins = [],\n $iterator = null\n ) {\n $this->leftJoin($joined, $on, $fields, $additionalJoins, true, $iterator);\n return $this;\n }", "protected function getLeftJoins()\n {\n return array(\n \"rr\" => \"entity.requiredExerciseResources\",\n \"rk\" => \"entity.requiredKnowledges\"\n );\n }", "function cf_search_join($join) {\n global $wpdb;\n\n if (is_search()) {\n $join .=' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "public function fullOuterJoin($table);", "public function set_join($table_or_alias, $on = null, $type='LEFT')\n { \n $table = $this->getJoinableTable($table_or_alias);\n if(!$this->is_used_table($table))\n {\n $table = (MormConf::isInConf($table_or_alias)) ? $this->add_table($table_or_alias) : $this->add_table($table);\n $this->join_tables[] = $table;\n }\n if(!is_null($on))\n {\n $tables = array_keys($on);\n $this->joins[] = array(array($tables[0] => $tables[1]), $on);\n }\n else\n {\n $key = $this->base_models[$this->base_table]->getForeignKeyFrom($table_or_alias);\n try\n {\n $ft_key = $this->base_models[$this->base_table]->getForeignTableKey($key);\n }\n catch (Exception $e)\n {\n if($this->base_models[$this->base_table]->isForeignUsingTable ($table))\n $ft_key = $this->base_models[$this->base_table]->getForeignMormonsUsingKey($table);\n else\n $ft_key = $this->base_models[$this->base_table]->getForeignMormonsKey($table);\n }\n $this->joins[] = array(array($this->base_table => $table), array($this->base_table => $key, $table => $ft_key));\n }\n //@todo put executed tu false only when join has changed\n $this->_executed = false;\n // switch($type)\n // {\n // case 'LEFT':\n // break;\n // case 'RIGHT':\n // break;\n // default:\n // throw new Exception(\"The join type \".$type.\" does not exist or is not yet supported by Mormons\");\n // break;\n // }\n }", "public function leftJoinUsing($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::LEFT, $table, $where, true);\n \n return $this;\n }", "public function leftJoinOn($table, $where)\n {\n //argument test\n Argument::i()\n //Argument 1 must be a string\n ->test(1, 'string')\n //Argument 2 must be a string\n ->test(2, 'string');\n \n $where = func_get_args();\n $table = array_shift($where);\n \n $this->join[] = array(self::LEFT, $table, $where, false);\n \n return $this;\n }", "function cf_search_join( $join ) {\n global $wpdb;\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n return $join;\n}", "function buildJoin()\n\t{\n\t\tif ($this->table_obj_reference)\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_reference.\" ON \".$this->table_tree.\".child=\".$this->table_obj_reference.\".\".$this->ref_pk.\" \".\n\t\t\t\t \"JOIN \".$this->table_obj_data.\" ON \".$this->table_obj_reference.\".\".$this->obj_pk.\"=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Use inner join instead of left join to improve performance\n\t\t\treturn \"JOIN \".$this->table_obj_data.\" ON \".$this->table_tree.\".child=\".$this->table_obj_data.\".\".$this->obj_pk.\" \";\n\t\t}\n\t}", "function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}", "protected function get_join_sql(array $filters=array()) {\n $joinsql = parent::get_join_sql($filters);\n $joinsql[] = 'LEFT JOIN {'.clusterassignment::TABLE.'} clstass\n ON clstass.clusterid='.$this->usersetid.'\n AND clstass.userid = element.id';\n return $joinsql;\n }", "public function resetJoins(): self\n {\n $clone = clone $this;\n $clone->joins = [];\n return $clone;\n }", "public function prev_next_join( $join ) {\n\t\tglobal $wpdb;\n\t\t$join .= \" LEFT JOIN $wpdb->postmeta AS m ON ( p.ID = m.post_id AND m.meta_key = 'wpex_post_link' )\";\n\t\treturn $join;\n\t}", "public function joinFields()\n {\n if (!$this->_joinedFields) {\n $this->getSelect()->join(\n array('related' => $this->getTable('oggetto_news/category_news')),\n 'related.news_id = main_table.entity_id',\n array('position')\n );\n $this->_joinedFields = true;\n }\n return $this;\n }", "public function get_additional_joins()\n {\n return 'LEFT JOIN isys_catg_its_type_list AS cat_rel\n\t\t\tON cat_rel.isys_catg_its_type_list__isys_obj__id = obj_main.isys_obj__id';\n }", "function yy_r69(){ $this->_retvalue = new Stmt\\Join('LEFT', $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor); }", "function join($table, &$query) {\r\n $left = $query->get_table_info($this->left_table);\r\n $output = \" $this->type JOIN {\" . $this->table . \"} $table[alias] ON ($this->left_query) = $table[alias].$this->field\";\r\n\r\n // Tack on the extra.\r\n if (isset($this->extra)) {\r\n if (is_array($this->extra)) {\r\n $extras = array();\r\n foreach ($this->extra as $info) {\r\n $extra = '';\r\n // Figure out the table name. Remember, only use aliases provided\r\n // if at all possible.\r\n $join_table = '';\r\n if (!array_key_exists('table', $info)) {\r\n $join_table = $table['alias'] . '.';\r\n }\r\n elseif (isset($info['table'])) {\r\n $join_table = $info['table'] . '.';\r\n }\r\n\r\n // And now deal with the value and the operator. Set $q to\r\n // a single-quote for non-numeric values and the\r\n // empty-string for numeric values, then wrap all values in $q.\r\n $raw_value = $this->db_safe($info['value']);\r\n $q = (empty($info['numeric']) ? \"'\" : '');\r\n\r\n if (is_array($raw_value)) {\r\n $operator = !empty($info['operator']) ? $info['operator'] : 'IN';\r\n // Transform from IN() notation to = notation if just one value.\r\n if (count($raw_value) == 1) {\r\n $value = $q . array_shift($raw_value) . $q;\r\n $operator = $operator == 'NOT IN' ? '!=' : '=';\r\n }\r\n else {\r\n $value = \"($q\" . implode(\"$q, $q\", $raw_value) . \"$q)\";\r\n }\r\n }\r\n else {\r\n $operator = !empty($info['operator']) ? $info['operator'] : '=';\r\n $value = \"$q$raw_value$q\";\r\n }\r\n $extras[] = \"$join_table$info[field] $operator $value\";\r\n }\r\n\r\n if ($extras) {\r\n if (count($extras) == 1) {\r\n $output .= ' AND ' . array_shift($extras);\r\n }\r\n else {\r\n $output .= ' AND (' . implode(' ' . $this->extra_type . ' ', $extras) . ')';\r\n }\r\n }\r\n }\r\n else if ($this->extra && is_string($this->extra)) {\r\n $output .= \" AND ($this->extra)\";\r\n }\r\n }\r\n return $output;\r\n }", "public function rightOuterJoin($table);", "public function testBuildJoinDefaultWithAliases()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->alias('table1_alias')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->alias('table2_alias')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 AS table2_alias ON table1_alias.id = table2_alias.id',\n $query->buildJoin()\n );\n }", "public function left($table, array $optionalTables = array())\n\t{\n\t\t$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);\n\t\t$this->join->left($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);\n\n\t\treturn $this;\n\t}", "public function add_JOIN($left, $right, $jointset) {\n\t\t$cmp = '';\n\t\t$joint = new QRYjoint($left, $right);\n\t\t$jointset->add($joint);\n\t}", "public function ON($left_field_name, $right_field_name, $left_table_offset = -2, $right_table_offset = null) {\n\t\t$jointset = $this->lastSet('joint') ;\n\t\tif (!$jointset) $jointset = $this->add_SET('joint');\n\n\t\t$left_ptr = $this->fieldByAlias($left_field_name);\n\t\tif (!$left_ptr) $left_ptr = $this->add_FIELD($left_field_name, null, $this->lastTable($left_table_offset), null);\n\n\t\t$right_ptr = $this->fieldByAlias($right_field_name);\n\t\tif (!$right_ptr) $right_ptr = $this->add_FIELD($right_field_name, null, $this->lastTable($right_table_offset), null);\n\n\t\t//remove right_ptr->table from tableset?\n\t\t$this->rem_TABLE($right_ptr->asTable());\n\n\t\t$this->add_JOIN($left_ptr, $right_ptr, $jointset);\n\t}", "private function sql_join($filter, $structure) {\n\t\t$sql = \"\";\n\t\t$table = $structure['table'];\n\t\t$class = $structure['class'];\n\t\t$pool_class = $class . 'Pool_Model';\n\t\t$full_structure = $pool_class::get_full_structure();\n\t\tforeach ($structure['relations'] as $relation) {\n\t\t\tlist($foreign_key, $foreign_table, $key) = $relation;\n\t\t\t$foreign_structure = $full_structure[$foreign_table];\n\t\t\t$ftable = $foreign_structure['table'];\n\t\t\t$join_expr = ' LEFT JOIN '.$ftable.' AS '.$key;\n\t\t\t$join_expr .= ' ON '.implode(' AND ',array_map(function($fk,$lk) use($key,$table) {\n\t\t\t\treturn \"$key.$fk = $table.$lk\";\n\t\t\t}, $foreign_structure['key'], $foreign_key));\n\t\t\t$sql .= $join_expr;\n\t\t}\n\t\treturn $sql;\n\t}", "public function setRelationshipMultiCondition($parameters)\n {\n foreach ($parameters as $parameter) {\n $sourceTable = $parameter['table'];\n $sourceColumn = $parameter['table'] . \".\" . $parameter['index'];\n $destinationColumn = $parameter['foreign'];\n $this->Model = $this->Model->join($sourceTable, $sourceColumn, \"=\", DB::raw($destinationColumn), \"LEFT\");\n }\n }", "function return_join_table_data($rt_or_left_or_none,$tableleft,$tableright,$on_a_and_b,$whereby=null,$orderby=null,$returnrows=\"a.*,b.*\") {\n\t$q = \"\n\tSELECT \".$returnrows.\"\n\tFROM \".$tableleft.\" AS a \".$rt_or_left_or_none.\" JOIN \".$tableright.\" AS b ON \".$on_a_and_b.\" \n\t\".$whereby.\" \n\t\".$orderby.\" \n\t\";\n\t//echo $q;\n\t$r = mysql_query($q) or die(\"return_join_table_data($rt_or_left_or_none,$tableleft,$tableright): \".mysql_error());\n\treturn check_results($r);\n}", "public function joinBills()\n {\n $this->builder->join('bills', 'bil_id', 'rc_bill');\n }", "public function join($sql) {\n $this->__join__ = $sql;\n return $this;\n }", "private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }", "public function _complex_join()\n {\n // LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n // LEFT JOIN (SELECT a.* FROM `%1$sproout` as a INNER JOIN (SELECT max(`id`) as id FROM `%1$sproout` group by `jpid`) as b on a.id = b.id) as `%1$sproout` on `%1$spro`.`id` = `%1$sproout`.`jpid`\n // LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n\n $join = sprintf('LEFT JOIN `%1$sproin` ON `%1$spro`.`id` = `%1$sproin`.`jpid`\n LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n LEFT JOIN `%1$sproout` on `%1$sproout`.`jpid` = `%1$spro`.`id`\n LEFT JOIN `%1$sproout` tmp_out on tmp_out.`jpid` = `%1$sproout`.`jpid` and tmp_out.`id` > `%1$sproout`.`id`\n LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n return $join;\n }", "protected function left_join($new_column, $column, $operator, $column2){\n\n\t\tlist($this_table, $this_table_coulmn) = explode('.', $column);\n\t\tlist($second_table, $second_table_column) = explode('.', $column2);\n\n\t\t$this_results = $this->_t();\n\n\t\tif($this_results){\n\n\t\t\tforeach($this_results as $file_id => &$row){\n\t\t\t\t\n\t\t\t\tif($new_column == '*'){\n\n\t\t\t\t\t$selection = $second_table::where($second_table_column, $operator, $row->$this_table_coulmn)->get();\n\n\t\t\t\t\tif($selection){\n\n\t\t\t\t\t\t$selection_qty = count(static::object_to_array($selection));\n\n\t\t\t\t\t\tforeach ($selection as $selected_file_id => &$selected_row) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($selected_row as $column => $value) {\n\n\t\t\t\t\t\t\t\tif($selection_qty > 1){\n\n\t\t\t\t\t\t\t\t\t$this_results[$file_id]->{$second_table.'.'.$column}[$selected_file_id] = $value;\n\n\t\t\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t\t\t$this_results[$file_id]->{$second_table.'.'.$column} = $value;\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\tunset($selected_file_id, $selected_row);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\tif(is_array($new_column)){\n\n\t\t\t\t\t\t$selection = $second_table::where($second_table_column, $operator, $row->$this_table_coulmn)->only($new_column);\n\n\t\t\t\t\t\tif($selection){\n\n\t\t\t\t\t\t\t$selection_qty = count(static::object_to_array($selection));\n\n\t\t\t\t\t\t\tforeach ($selection as $key => &$selected_array){\n\n\t\t\t\t\t\t\t\tforeach ($selected_array as $column => &$value) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$this_results[$file_id]->{$second_table.'.'.$column}[$key] = $selected_array[$column];\n\n\t\t\t\t\t\t\t\t\tunset($column, $value);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tunset($key, $selected_array);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t$selection = $second_table::where($second_table_column, $operator, $row->$this_table_coulmn)->only($new_column);\n\n\t\t\t\t\t\tif($selection){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this_results[$file_id]->{$second_table.'.'.$new_column} = $selection;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tunset($file_id, $row);\n\t\t\t}\n\t\t}\n\n\t\tif($this_results){\n\n\t\t\t$this->_t_set($this_results);\n\t\t}\n\n\t\tunset($this_results);\n\n\t\treturn $this;\n\t}", "public function leftJoin(string $name, ?string $alias = null, ?string $condition = null): Query\n {\n $this->resetStatement();\n $key = $alias ?? $name;\n $this->tables[$key] = new Table($name, $alias, 'LEFT JOIN', $condition);\n return $this;\n }", "function xiliml_adjacent_join_filter( $join, $in_same_cat, $excluded_categories ) {\n\t\tglobal $post, $wpdb;\n\t\t$curlang = xiliml_get_lang_object_of_post( $post->ID );\n\n\t\tif ( $curlang ) { // only when language is defined !\n\t\t\t$join .= \" LEFT JOIN $wpdb->term_relationships as xtr ON (p.ID = xtr.object_id) LEFT JOIN $wpdb->term_taxonomy as xtt ON (xtr.term_taxonomy_id = xtt.term_taxonomy_id) \";\n\t\t}\n\t\treturn $join;\n\t}", "public function testBuildSelectFieldsEmptyWithJoin()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->alias('table1_alias')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->alias('table2_alias')\n ->joinOn('id', 'id')\n ->groupBy('is_admin', 'desc')\n )\n ->groupBy('id', 'asc')\n ;\n\n $this->assertSame(\n 'table1_alias.*, table2_alias.*',\n $query->buildSelectFields()\n );\n }", "private function set_relation_joins() {\n if(!$this->use_relations) return;\n $relations = [];\n foreach ($this->colmodel as $i => $col) {\n if (!isset($col['relation']))\n continue;\n foreach (explode('>', $col['relation']) as $relation) {\n if (!str_contains($relation, '.'))\n continue;\n list($model_name, $relation_name) = explode('.', $relation);\n if ($relation_name != '' && !in_array($relation, $relations)) {\n $this->set_relation_join($model_name, $relation_name);\n $relations[] = $relation;\n }\n }\n }\n }", "protected function set_join($other)\n {\n $this->table->join($this->joining, $this->associated_key(), '=', $this->joining . '.' . $other);\n return $this;\n }", "public static function add_wp_query_join( $join, $wp_query ) {\n\t\tglobal $wpdb;\n\n\t\t$search = $wp_query->get( 'search' );\n\t\tif ( $search ) {\n\t\t\t$join .= \" LEFT JOIN {$wpdb->postmeta} AS attr_search_meta\n\t\t\t\t\t\tON {$wpdb->posts}.ID = attr_search_meta.post_id\n\t\t\t\t\t\tAND attr_search_meta.meta_key LIKE 'attribute_%' \";\n\t\t}\n\n\t\tif ( wc_product_sku_enabled() && ! strstr( $join, 'wc_product_meta_lookup' ) ) {\n\t\t\t$join .= \" LEFT JOIN {$wpdb->wc_product_meta_lookup} wc_product_meta_lookup\n\t\t\t\t\t\tON $wpdb->posts.ID = wc_product_meta_lookup.product_id \";\n\t\t}\n\n\t\treturn $join;\n\t}", "function getJoinCondition() ;", "public function makeSearchJoin($join)\n {\n global $wpdb;\n\n if (is_search()) {\n\n $join .= ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\n foreach ($this->getAvailableMetaKeysForFilters() as $values) {\n if (isset($_GET[$values]) && !empty($_GET[$values])) {\n $join .= \" LEFT JOIN $wpdb->postmeta as $values ON $wpdb->posts.ID = $values.post_id\";\n\n }\n }\n\n }\n\n return $join;\n }", "function wc_tab_manager_tabs_posts_join( $join, $query ) {\n\tglobal $wpdb, $typenow;\n\n\tif ( 'wc_product_tab' === $typenow ) {\n\t\t$join .= \" JOIN {$wpdb->posts} AS product_parents ON ( {$wpdb->posts}.post_parent = 0 OR ( {$wpdb->posts}.post_parent = product_parents.ID AND product_parents.post_status != 'trash' ) )\";\n\t}\n\n\treturn $join;\n}", "public function joinPartialTree($table1,$table2,$num_td_to_join)\n {\n //echo \"je tente d'accèder à la cellule $num_td_to_join<br>\";\n $temp_td=$table1->getCellule(1,$num_td_to_join);\n // echo $table1->htmlValue().$table2->htmlValue().\"<br>\";\n $temp_td->setValue($table2,true);\n $temp_td->setValign(\"top\");\n return $table1;\n }", "public function left($table, $on, $field = null, $comparitor = null);", "public function ADD_ON($left_right_map, $left_table_offset = -2, $right_table_offset = null) {\n\t\t$left_field_name = key($left_right_map);\n\t\t$right_field_name = current($left_right_map); \n\t\treturn $this->ON($left_field_name, $right_field_name, $left_table_offset, $right_table_offset);\n\t}", "function outerJoin($conditions)\n\t{\n\t\treturn $this->join('OUTER', $conditions);\n\t}", "function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') {\r\n parent::construct($table, $left_table, $left_field, $field, $extra, $type);\r\n\r\n $this->left_query = $this->definition['left query'];\r\n }", "public function leftOuter($table, array $optionalTables = array())\n\t{\n\t\t$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);\n\t\t$this->join->leftOuter($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);\n\n\t\treturn $this;\n\t}", "public static function exclude_fue_comments_from_feed_join( $join ) {\n global $wpdb;\n\n if ( ! strstr( $join, $wpdb->posts ) ) {\n $join = \" LEFT JOIN $wpdb->posts ON $wpdb->comments.comment_post_ID = $wpdb->posts.ID \";\n }\n\n return $join;\n }", "function editor_joins(){\n //\n //begin with an empty collection of joins \n $joins=[];\n //\n //Push the editor joins also\n foreach ($this->editor_joins as $join){\n array_push($joins, $join);\n }\n //\n //Set the new joins \n $this->joins=new joins($joins);\n }", "public function join($tabela1 = null, $tabela2 = null, $para=null) {\n \n \n }", "public function setOn($on = null): void\n {\n if (null !== $on) {\n if (self::CROSS === $this->p_type) {\n throw new InvalidArgumentException('No join conditions are allowed for CROSS JOIN');\n } elseif (!empty($this->p_natural) || !empty($this->p_using)) {\n throw new InvalidArgumentException('Only one of NATURAL, USING, ON clauses should be set for JOIN');\n }\n if (is_string($on)) {\n $on = $this->getParserOrFail('an ON expression')->parseExpression($on);\n }\n if (!($on instanceof ScalarExpression)) {\n throw new InvalidArgumentException(sprintf(\n '%s requires an SQL expression string or an instance of ScalarExpression, %s given',\n __METHOD__,\n is_object($on) ? 'object(' . get_class($on) . ')' : gettype($on)\n ));\n }\n }\n $this->setProperty($this->p_on, $on);\n }", "public function subpropertyInMultipleLeftJoinCountTest() {}", "public function testBuildSelectWithJoinEmptyFields()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->fields()\n ->addField('user@email', 'email')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->fields()\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n \"'user@email' AS table1__email\",\n $query->buildSelectFields()\n );\n }", "public function join($table, $type = NULL){\n $this->_last_join = new Join($table, $type);\n $this->_last_join->setQuoter($this->quoter);\n $this->_join[] = $this->_last_join;\n return $this;\n }", "function joinClause( $join ) {\n\t global $wpdb;\n\t $join .= \" INNER JOIN $wpdb->postmeta dm ON (dm.post_id = $wpdb->posts.ID AND dm.meta_key = '$this->orderby') \";\n\t return $join;\n\t}", "protected function append_product_sorting_table_join( $sql ) {\n\t\tglobal $wpdb;\n\n\t\tif ( ! strstr( $sql, 'wc_product_meta_lookup' ) ) {\n\t\t\t$sql .= \" LEFT JOIN {$wpdb->wc_product_meta_lookup} wc_product_meta_lookup ON $wpdb->posts.ID = wc_product_meta_lookup.product_id \";\n\t\t}\n\t\treturn $sql;\n\t}", "function map_joins($join){\n //\n //return field to str\n return $join->to_str();\n }", "function custom_search_join($join) {\r\n if ( is_search() && isset($_GET['s'])) {\r\n global $wpdb;\r\n $join = \" LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id \";\r\n }\r\n return($join);\r\n}", "protected function performJoins()\n {\n $query = $this->query;\n\n $predecessor = $this->related;\n\n $this->through_parents->each(function ($model) use ($query, &$predecessor) {\n $first = $predecessor->getQualifiedKeyName();\n $joined = $model->qualifyColumn($this->getForeignKeyName($predecessor));\n\n $query->join($model->getTable(), $first, '=', $joined);\n\n if ($this->hasSoftDeletes($model)) {\n $this->query->whereNull($model->getQualifiedDeletedAtColumn());\n }\n\n $predecessor = $model;\n });\n }", "public function joinCustomers()\n {\n $this->builder->join('customers', 'cus_id', 'rc_customer');\n }", "protected function _joinFields()\n {\n $reviewTable = $this->_resource->getTableName('review');\n $reviewDetailTable = $this->_resource->getTableName('review_detail');\n\n $this->addAttributeToSelect('name')->addAttributeToSelect('sku');\n\n $this->getSelect()->join(\n ['rt' => $reviewTable],\n 'rt.entity_pk_value = e.entity_id',\n ['rt.review_id', 'review_created_at' => 'rt.created_at', 'rt.entity_pk_value', 'rt.status_id', 'rt.vendor_id']\n )->join(\n ['rdt' => $reviewDetailTable],\n 'rdt.review_id = rt.review_id',\n ['rdt.title', 'rdt.nickname', 'rdt.detail', 'rdt.customer_id', 'rdt.store_id']\n );\n return $this;\n }", "public function outerJoin($className, $field = null) {\n return $this->joinHelper($className, $field, $this->outerJoin);\n }" ]
[ "0.70154434", "0.6952868", "0.6859293", "0.6854731", "0.6840933", "0.68338025", "0.6833006", "0.67502046", "0.66297203", "0.66046184", "0.66039467", "0.65313536", "0.6500174", "0.6333821", "0.63211393", "0.6266698", "0.62579817", "0.6235731", "0.62274885", "0.61600834", "0.61426115", "0.6048505", "0.601693", "0.600577", "0.59499305", "0.5908646", "0.5899446", "0.5883568", "0.5863221", "0.5858352", "0.5851539", "0.5840807", "0.5826756", "0.5812166", "0.5802992", "0.5722121", "0.56969464", "0.5684668", "0.5660641", "0.56082577", "0.5605146", "0.558972", "0.5576914", "0.5576135", "0.55741656", "0.5557292", "0.5529374", "0.55258673", "0.55216664", "0.5516151", "0.55016303", "0.54745907", "0.5468134", "0.5451898", "0.54288065", "0.54116035", "0.5378231", "0.53734916", "0.53605837", "0.5342917", "0.5333534", "0.52778065", "0.5205056", "0.52010834", "0.5189155", "0.51696175", "0.5167913", "0.5161944", "0.51556236", "0.5146719", "0.5143031", "0.5142075", "0.5141613", "0.5138655", "0.51130766", "0.5112979", "0.51122355", "0.510957", "0.5100528", "0.509693", "0.5096031", "0.50890654", "0.5085085", "0.5083863", "0.5080403", "0.5076604", "0.5067905", "0.50478834", "0.5033072", "0.5019122", "0.50113136", "0.5010927", "0.49997318", "0.49827567", "0.49690816", "0.4959444", "0.49568456", "0.4936519", "0.49332905", "0.49192277" ]
0.6111255
21
Run a raw select query on the model
public function rawSelect($query) { $this->model = $this->model->select($query); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }", "protected function runSelectWithMeta()\n {\n return $this->connection->selectWithMeta(\n $this->toSql(),\n $this->getBindings(),\n ! $this->useWritePdo\n );\n }", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "public function select()\n {\n return $this->_db->factory('select', $this);\n }", "public function select();", "public function select();", "public function select();", "public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }", "public function select()\n {\n $cols = $this->getColsAsFields();\n return $this->gateway->select($cols);\n }", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "public function createSelect()\n {\n return $this->getConnection()->select();\n }", "public function select()\n {\n return new QueryProxy('select', $this);\n }", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "public function rawQuery($query);", "public function query()\n {\n $query = Fieldagent::query()->select($this->getColumns());\n\n return $this->applyScopes($query);\n }", "abstract public function prepareSelect();", "protected static function buildSelectionQuery() \n {\n return Query::select()->\n from(self::getTableName());\n }", "public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}", "protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }", "public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }", "public function raw($sql) {\n\t\t$this->query ( $sql );\n\t}", "protected static function select()\n {\n }", "public function selectQuery($sql_stmt)\n {\n return DB::select($sql_stmt);\n }", "public function query(Jogador $model)\n {\n return $model\n ->newQuery()\n ->select(\n 'id',\n 'nome',\n 'apelido',\n 'dt_nascimento',\n 'posicao',\n 'camisa',\n 'nacionalidade',\n 'clube_id',\n 'created_at',\n 'updated_at');\n\n\n }", "public function querySelect($sql, $fields = NULL, $fetchMode = NULL) : Collection;", "public function select($query, $bindings = []);", "public function select($query, $bindings = []);", "public function select($query, $bindings = []);", "function rawQuery ($sql)\n\t{\n\t\t$clauses = array('RAW' => $sql);\n\t\treturn new Db_Query_Mysql($this, Db_Query::TYPE_RAW, $clauses);\n\t}", "public function sql() {\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/select/query.twig.sql\");\n\t\treturn $sqlT->render([\"query\" => $this]);\n\t}", "public function query(Egreso $model)\n {\n $ingreso = $model->newQuery()->select();\n\n\n return $this->applyScopes($ingreso);\n }", "public function get(){\n $this->query = \"SELECT \".$this->select.\" FROM $this->table WHERE \";\n $wheres = $this->mergeWhere().\" OR \".$this->mergeOrWhere();\n $query = $this->query.$wheres;\n $statement = $this->prepare($query);\n $statement->execute($this->bindings);\n return $statement->fetchAll();\n }", "public function query($sql) {\n return $this->data($sql);\n }", "public function select()\r\n\t{\r\n\t\t$this->clear();\r\n\t\t$where = null;\r\n\t\t// no args, so I'm searching for ALL... or doing a specific search\r\n\t\tif(func_num_args() === 0\r\n\t\t || ($where = call_user_func_array(array($this->obj, 'buildWhere'), func_get_args())))\r\n\t\t{\r\n\t\t\t$query = 'SELECT *\r\n\t\t\t\tFROM '.$this->obj->buildFrom();\r\n\t\t\t// pass args to where generator\r\n\t\t\tif($where)\r\n\t\t\t{\r\n\t\t\t\t$query .= ' WHERE '.$where;\r\n\t\t\t}\r\n\t\t\t$results = $this->site->db->query($query);\r\n\t\t\t$success = ($results->num_rows > 0);\r\n\t\t\twhile($row = $results->fetch_assoc())\r\n\t\t\t{\r\n\t\t\t\t$obj = new $this->obj->__CLASS__($this->obj->site);\r\n\t\t\t\tif($obj->loadRow($row))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->push($obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $success;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function select($fields = '*', $fetch_type = \\PDO::FETCH_ASSOC)\n {\n $this->db->table($this->getTableFullName());\n return call_user_func_array([$this->db, __FUNCTION__], func_get_args());\n }", "function remake()\n {\n $result = parent::select($this->table, '*', null);\n parent::closeConection();\n \n return $result;\n }", "abstract public function queryRaw($q);", "public function select_all()\n {\n // TODO: Limit to id_user\n $query = $this->db->get($this->table);\n return $query;\n }", "public function select()\n {\n return $this->_getReadAdapter()->select();\n }", "public function query()\n {\n $query = Unit::select(['id','code','name']);\n\n return $this->applyScopes($query);\n }", "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "private function Select()\n {\n $return = false;\n $action = $this->Action();\n $columns = $this->Columns();\n $table = $this->Table();\n $where = (Checker::isArray($this->Where(), false))?$this->Where():array(Where::QUERY => \"\", Where::VALUES => array());\n $order = (Checker::isString($this->Order()))?$this->Order():\"\";\n $limit = (Checker::isInt($this->Limit()))?\" LIMIT \".$this->Limit():\"\";\n if($columns && $table && Checker::isArray($where, false))\n {\n $return[Where::QUERY] = \"$action $columns FROM $table\".$where[Where::QUERY].\"$order$limit\";\n\n if(Checker::isArray($where, false) && isset($where[Where::VALUES])) $return[Where::VALUES] = $where[Where::VALUES];\n else $return[Where::VALUES] = array();\n }\n return $return;\n }", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "function selectAll() {\n $query = $this->getStatement(\n \"SELECT * FROM `$this->table` WHERE 1 ORDER BY id\"\n );\n $query->execute();\n return $query->fetchAll();\n }", "public function select($rawQuery, $params = array())\n {\n\n $stmt = $this->query($rawQuery, $params);\n\n return $stmt->fetchAll(PDO ::FETCH_ASSOC); //retorna um array simples \n\n }", "public function selectdata(){\n$this->autoRender=false;\n$data=$this->connection->execute(\"select * from users\")->fetchAll();\nprint_r($data);\n}", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "public function query()\n {\n return $this->model\n ->newQuery()\n ->with(['translations'])\n ->orderBy('order_column')\n ->nonDraft();\n }", "public function query(User $model)\n {\n return $model->select('id','name','email','created_at');\n }", "function select($fields = NULL)\n {\n // Create a fresh slate\n $this->object->_init();\n if (!$fields or $fields == '*') {\n $fields = $this->get_table_name() . '.*';\n }\n $this->object->_select_clause = \"SELECT {$fields}\";\n return $this->object;\n }", "public function rawQuery(string $sql, array $params=[])\n {\n return $this->getConnection()->rawQuery($sql, $params);\n }", "static function select($sql, $params = array()) {\n $sth = static::execute($sql, $params);\n\n $result = $sth->fetchAll();\n\n return $result;\n }", "function select($q)\n {\n return $this->dbh->query($q, PDO::FETCH_ASSOC)->fetchAll();\n }", "public function select($query){\n return pg_fetch_all($this -> query($query));\n }", "public function selectAll() {\n\t\treturn $this->select(array_keys($this->table->columns));\n\t}", "public function query();", "public function query();", "public function query();", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "public function rawQuery($sql){\n\n\t\t$queried_rep_repository = $this->rep_repository->get_database_utils()->rawQuery($sql);\n\n\t\tif($this->build == \"eng-build\"){\n\t\t\treturn $this->query_eng_build($queried_rep_repository);\n\t\t}\n\t\tif($this->build == \"user-build\"){\n\t\t\treturn $this->query_user_build($queried_rep_repository);\n\t\t}\n\t}", "public function query(Campeonato $model)\n {\n return $model->newQuery()->select($this->getColumns())->orderBy('created_at','desc');\n }", "public function query()\n {\n return (new Query($this))->entity($this->getEntityName());\n }", "public function select()\n {\n\n }", "public function get()\n {\n if (!empty($this->async)) {\n return $this->connection->selectAsync($this->toAsyncQueries());\n } else {\n return $this->connection->select($this->toSql(), [], $this->getFiles());\n }\n }", "protected function prepareSelectStatement() {}", "public function selectAll()\n {\n $sql = \"SELECT idagenda, visita_idvisita, horario_idhorario, created, modified\n FROM \" . $this->schema . \".\" . $this->table;\n }", "public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }", "public function query(ActionDataTable $model)\n {\n //return $model->newQuery();\n $data = Action::select();\n return $this->applyScopes($data);\n }", "private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }", "function select() {\r\n\t\t$query = 'SELECT * FROM `subscribers`';\r\n\t\t\r\n\t\t$this->query = $query;\r\n\t}", "public function fetch()\n {\n return $this->query->select(\n $this->filter,\n $this->order,\n null,\n $this->limitOffset,\n PDO::FETCH_CLASS\n );\n }", "public function build_query(/* ... */)\n {\n $query = [\"SELECT\"];\n $model = $this->get_model();\n // Field selection\n $fields = [];\n foreach ($this->_fields as $_field) {\n $fields[] = $this->_build_select_field($_field);\n }\n $query[] = implode(', ', $fields);\n // Table Selection\n $query[] = 'FROM';\n $query[] = '`' . $model->get_table() . '`';\n // WHERE lookup\n $query[] = $this->build_where();\n if (null !== $this->_orderby) {\n $query[] = $this->_orderby;\n }\n if (null !== $this->_limit) {\n $query[] = $this->_limit;\n }\n return $model->get_connection()->prepare(implode(\" \", $query));\n }", "public static function selectAll() {\n $select = self::select(Option::getTableName());\n\n return self::getInstanceData($select);\n }", "function Borrow_model()\n\t{\n\t\tparent::Query();\n\t}", "function read(){\n \n // select all query\n $query = \"SELECT * from \" . $this->table_name . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "public function from($sql);", "abstract public function query();", "public function rawQuery($sql){\n\n\t\t$queried_reference_result_vl = $this->reference_result_vl->get_database_utils()->rawQuery($sql);\n\n\t\tif($this->build == \"eng-build\"){\n\t\t\treturn $this->query_eng_build($queried_reference_result_vl);\n\t\t}\n\t\tif($this->build == \"user-build\"){\n\t\t\treturn $this->query_user_build($queried_reference_result_vl);\n\t\t}\n\t}", "public function select_pure ( $SQL, $params, $fetch_class = null )\n {\n return $this->pdoFetch($SQL, $params, $fetch_class);\n\n }", "public function toQuery();", "function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}", "public function createSelectSql(): \\Hx\\Db\\Sql\\SelectInterface;", "public static function selectAll() {\n $select = self::select(Post::getTableName());\n\n return self::getInstanceData($select);\n }", "public function select($params){\n\t\t$DB = Registry::getInstance()->DB;\n\t\t$prefix = \"SELECT \";\n\t\t$p = $this->clean($params);\n\t\t$statement = $prefix.\" \".$this->genFrom($p['cols']).\" \".$this->genTable($p['tables']).$this->genWhere($p['where']);\t\n\t\treturn $DB->select($statement);\t\n\t}", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "protected function _sql_select ( /* void */ )\n {\n /*\n Start SQL query.\n */\n $sql = ($this->bDistinct) ? 'SELECT DISTINCT ' : 'SELECT ';\n /*\n Select which fields ?\n */\n $sql .= (empty($this->aFields)) ? '*' : implode(', ', $this->aFields);\n /*\n From which tables ?\n */\n $sql .= (empty($this->aTables)) ? '' : \"\\nFROM \" . implode(', ', $this->aTables);\n /*\n Join something ?\n */\n if (!empty($this->aJoin))\n {\n foreach ($this->aJoin as $j)\n {\n $sql .= \"\\n{$j[0]} JOIN {$j[1]} ON {$j[2]}\";\n }\n }\n /*\n Where ?\n */\n if (!empty($this->aWhere))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aWhere);\n $sql .= (!empty($this->aLike)) ? implode(\"\\n\", $this->aLike) : '';\n }\n elseif (!empty($this->aLike))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aLike);\n }\n /*\n Group by ?\n */\n if (!empty($this->aGroupBy))\n {\n $sql .= \"\\nGROUP BY \" . implode(', ', $this->aGroupBy);\n }\n /*\n Having ?\n */\n if (!empty($this->aHaving))\n {\n $sql .= \"\\nHAVING \";\n foreach ($this->aHaving as $i)\n {\n $sql .= \"\\n{$i[0]}{$i[1]} {$i[2]}\";\n }\n }\n /*\n Order by ?\n */\n if (!empty($this->aOrderBy))\n {\n $sql .= \"\\nORDER BY \";\n foreach ($this->aOrderBy as $i)\n {\n $sql .= \"{$i[0]} {$i[1]}, \";\n }\n $sql = trim($sql, ', ');\n }\n /*\n Query limit ?\n */\n if ($this->nLimit !== false)\n {\n if ($this->nOffset !== false)\n {\n $sql .= \"\\nLIMIT \" . $this->nOffset . ', ' . $this->nLimit;\n }\n else\n {\n $sql .= \"\\nLIMIT 0, \" . $this->nLimit;\n }\n }\n /*\n Return SQL.\n */\n return $sql;\n }", "function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}", "public function query(User $model)\n {\n return $model->newQuery()->select('id', 'name', 'email');\n }", "public function PgSelect($sql){\n $this->StartBD();\n $this->SQuery = $this->PgQuery($sql);\n if (!$this->SQuery){\n die(\"SELECT Erroneo!\");\n }\n $this->EndBD();\n }", "public function sql_select_db() {}", "public function read() {\n //Create query\n $query = 'SELECT vendor_id, latitude, longitude, time, type FROM ' . $this->table_name;\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n\n //Execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function sql_select_db() {}", "public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "public function query(Order $model)\n {\n return $model->newQuery()->select('id', 'product_id', 'user_id','amount', 'created_at', 'updated_at');\n }" ]
[ "0.71282804", "0.70387477", "0.6725414", "0.6688131", "0.65096164", "0.650322", "0.64679974", "0.64679974", "0.64679974", "0.6387126", "0.638069", "0.63796055", "0.6363913", "0.6288674", "0.62583447", "0.62393963", "0.61828166", "0.6159401", "0.61488044", "0.61337507", "0.60999906", "0.60936046", "0.6038748", "0.6033498", "0.60212827", "0.59879744", "0.5981755", "0.59623647", "0.59623647", "0.59623647", "0.59598124", "0.5954118", "0.594177", "0.5910872", "0.5909459", "0.5908938", "0.59063804", "0.5870326", "0.5867463", "0.58529305", "0.5848887", "0.58406574", "0.58344346", "0.58344346", "0.5833071", "0.582565", "0.5824068", "0.58224136", "0.58132976", "0.58122975", "0.5802323", "0.57971334", "0.5792528", "0.5789157", "0.5789142", "0.5787161", "0.5778518", "0.5774219", "0.57715493", "0.57715493", "0.57715493", "0.5764646", "0.57498693", "0.5748258", "0.5747258", "0.57348084", "0.57306707", "0.5726684", "0.57257193", "0.57182485", "0.570761", "0.5707227", "0.5707036", "0.5697593", "0.56942105", "0.56854236", "0.5683804", "0.5678555", "0.56491554", "0.56491554", "0.56464016", "0.564043", "0.56403494", "0.56331486", "0.5625313", "0.5623145", "0.561896", "0.56105196", "0.560852", "0.56026995", "0.56021327", "0.55997646", "0.5598224", "0.55803096", "0.55792123", "0.55790293", "0.5577873", "0.55645204", "0.55639195", "0.5563329" ]
0.6777547
2
Refresh the order by statement
public function refreshOrderBy() { $query = $this->model->getQuery(); unset($query->orders); $this->model->setQuery($query); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareOrderByStatement() {}", "protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }", "public function refreshOrderBy()\n {\n $query = $this->model->getQuery();\n unset($query->orders);\n\n $this->model->setQuery($query);\n return $this;\n }", "public function orderBy() {\n $this->_orderBy = \"\";\n foreach ($this->_columns as $tableName => $table) {\n if (array_key_exists('order_bys', $table)) {\n foreach ($table['order_bys'] as $fieldName => $field) {\n $this->_orderBy[] = $field['dbAlias'];\n }\n }\n }\n $this->_orderBy = \"ORDER BY \" . implode(', ', $this->_orderBy) . \" \";\n }", "public function orderBy($sql);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function implicitOrderby() {\n\t\treturn true;\n\t}", "public function &getOrderBy();", "protected function enforceOrderBy() : void\n {\n if (empty($this->query->orders) && empty($this->query->unionOrders)) {\n $this->orderBy($this->mapper->getQualifiedKeyName(), 'asc');\n }\n }", "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->created_at->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function LoadSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\t\t$sOrderBy = $fs_multijoin_v->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($fs_multijoin_v->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $fs_multijoin_v->SqlOrderBy();\r\n\t\t\t\t$fs_multijoin_v->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function enforceOrderBy()\n {\n if (empty($this->query->orders) && empty($this->query->unionOrders)) {\n $this->orderBy($this->model->getQualifiedKeyName(), 'asc');\n }\n }", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "public function resetOrderBy(): static\n {\n $this->orderBy = [];\n return $this;\n }", "public function sort($orderBy): void;", "function LoadSortOrder() {\r\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->created_time->setSort(\"DESC\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function sql_orderBy()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $arr_order = null;\n $arr_order = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'order.' ];\n\n // Order field\n switch ( true )\n {\n case( $arr_order[ 'field' ] == 'uid' ):\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n break;\n case( $arr_order[ 'field' ] == 'value' ):\n default:\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n break;\n }\n // Order field\n // Order flag\n switch ( true )\n {\n case( $arr_order[ 'orderFlag' ] == 'DESC' ):\n $orderFlag = 'DESC';\n break;\n case( $arr_order[ 'orderFlag' ] == 'ASC' ):\n default:\n $orderFlag = 'ASC';\n break;\n }\n // Order flag\n // Get ORDER BY statement\n $orderBy = $orderField . ' ' . $orderFlag;\n\n // RETURN ORDER BY statement\n return $orderBy;\n }", "public function default_order_by()\r\n {\r\n $this->db->order_by('partners.id');\r\n }", "public function setOrderBy(array $orderBy);", "public function stripOrderByForOrderByKeywordDataProvider() {}", "private function sortQueryOrders() {\n foreach ($this->queryResult as $index => $order) {\n $order = $this->injectKitData($order);\n $this->statusOutputOrder[$order['Order']['status']][$order['Order']['id']] = $order;\n }\n }", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->tanggal->setSort(\"DESC\");\n\t\t\t\t$this->auc_number->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "public function order();", "public function setOrderBy($orderBy)\r\n\t{\r\n\t\t$this->orderBy = $orderBy;\r\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "abstract protected function _buildOrderBy( $order );", "function LoadSortOrder() {\n\t\tglobal $scholarship_package;\n\t\t$sOrderBy = $scholarship_package->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($scholarship_package->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $scholarship_package->SqlOrderBy();\n\t\t\t\t$scholarship_package->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "public function OrderBy($by = null) {\r\n $this->orderBy = $by;\r\n }", "function LoadSortOrder() {\r\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function LoadSortOrder() {\r\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function LoadSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\t\t$sOrderBy = $rekeningju->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($rekeningju->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $rekeningju->SqlOrderBy();\r\n\t\t\t\t$rekeningju->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function orderBy(){\r\n $this->orderBy = \"ORDER BY \";\r\n $args = func_get_args();\r\n foreach($args as $arg){\r\n $this->orderBy.= $this->db->formatTableName($arg);\r\n if(end($args) !== $arg){\r\n $this->orderBy.=\", \";\r\n } \r\n\r\n }\r\n return $this;\r\n }", "protected function _appendOrderByClause(Zend_Db_Select $query)\n {\n $order = strtoupper($this->_getParam($this->_orderKey, $this->_defaultOrderDirection));\n $orderBy = $this->_getParam($this->_orderByKey, $this->_defaultOrderColumn);\n \n if (in_array($orderBy, $this->_getTable()->info('cols'))) {\n $this->view->order = $order;\n $this->view->orderBy = $orderBy;\n \n $query->order($orderBy . ' ' . $order);\n }\n \n return $query;\n }", "protected function getOrderByQuery()\n {\n\t\t$isWhat = $this->model->isWhat();\n\t\t$remoteTable = $this->model->tableName();\n\t\t$localOrderBy = [];\n\t\t$relations = [\n\t\t\t\\nitm\\widgets\\models\\Vote::tableName() => [\n\t\t\t\t'select' => new Expression('COUNT(*)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Issues::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Replies::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Revisions::tableName() => [\n\t\t\t\t'select' => ['COUNT(*)'],\n\t\t\t]\n\t\t];\n\t\tforeach($relations as $table=>$relation){\n\t\t\t$localOrderBy[serialize(new Expression('('.(new Query)\n\t\t\t\t->from($table)\n\t\t\t\t->select($relation['select'])\n\t\t\t\t->where([\n\t\t\t\t\t\"$table.parent_id\" => \"$remoteTable.id\",\n\t\t\t\t\t\"$table.parent_type\" => $isWhat\n\t\t\t\t])->createCommand()->getRawSql().')'))] = SORT_DESC;\n\t\t}\n $localOrderBy = array_merge($localOrderBy, [\n serialize(new Expression(\"(CASE $remoteTable.status\n\t\t\t\tWHEN 'normal' THEN 0\n\t\t\t\tWHEN 'important' THEN 1\n\t\t\t\tWHEN 'critical' THEN 2\n\t\t\tEND)\")) => SORT_DESC,\n ]);\n\n return array_merge($localOrderBy, \\nitm\\helpers\\QueryFilter::getOrderByQuery($this->model));\n }", "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "function Trigger_SetOrderColumn(&$tNG) {\r\n $orderFieldObj = new tNG_SetOrderField($tNG);\r\n $orderFieldObj->setFieldName(\"sort\");\r\n return $orderFieldObj->Execute();\r\n}", "private function orderBy($param) {\n if (isset($param['column']) && isset($param['type'])) {\n $this->sql .= 'ORDER BY ' . $param['column'] . ' ' . $param['type'] . ' ';\n }\n }", "private function buildOrderBy() {\n\t\t$hasorderby = false;\n\t\tforeach($this->ordergroup as $key=>$extra) {\n\t\t\tif(strpos(strtoupper($extra), 'ORDER BY') !== false) {\n\t\t\t\t$this->orders[] = str_replace('ORDER BY', \"\", strtoupper($extra));\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t\tif(strpos(strtoupper($extra), 'LIMIT') !== false) {\n\t\t\t\t$this->limit = $extra;\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t\tif(strpos(strtoupper($extra), 'GROUP BY') !== false) { \n\t\t\t\t$this->groups[] = str_replace('GROUP BY', \"\", strtoupper($extra));\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t}\n\t}", "public function order($orderBy) {\r\n $this->sqlOrderBy = $orderBy;\r\n return $this;\r\n }", "function orderByClause( $orderby ) {\n\t global $wpdb;\n\t return \"dm.meta_value+0 {$this->order}, $wpdb->posts.post_title ASC\";\n\t}", "function LoadSortOrder() {\n\t\tglobal $tbl_slide;\n\t\t$sOrderBy = $tbl_slide->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($tbl_slide->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $tbl_slide->SqlOrderBy();\n\t\t\t\t$tbl_slide->setSessionOrderBy($sOrderBy);\n\t\t\t\t$tbl_slide->order_by->setSort(\"ASC\");\n\t\t\t}\n\t\t}\n\t}", "public function scopeOrdered(Builder $query)\n {\n if (! Schema::hasColumn($this->getTable(), 'order')) {\n return;\n }\n\n $query->orderBy('order');\n }", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "function LoadSortOrder() {\n\t\tglobal $patient_detail;\n\t\t$sOrderBy = $patient_detail->getSessionOrderBy(); // Get order by from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($patient_detail->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $patient_detail->SqlOrderBy();\n\t\t\t\t$patient_detail->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function query() {\n $this->ensure_my_table();\n switch ($this->options['granularity']) {\n case 'second':\n default:\n $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);\n return;\n case 'minute':\n $formula = views_date_sql_format('YmdHi', \"$this->table_alias.$this->real_field\");\n break;\n case 'hour':\n $formula = views_date_sql_format('YmdH', \"$this->table_alias.$this->real_field\");\n break;\n case 'day':\n $formula = views_date_sql_format('Ymd', \"$this->table_alias.$this->real_field\");\n break;\n case 'month':\n $formula = views_date_sql_format('Ym', \"$this->table_alias.$this->real_field\");\n break;\n case 'year':\n $formula = views_date_sql_format('Y', \"$this->table_alias.$this->real_field\");\n break;\n }\n\n // Add the field.\n $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']);\n }", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->fields_arr['orderby_field'].' '.$this->fields_arr['orderby'];\n\t\t\t}", "protected function compileOrderByStatement()\n {\n if (is_array($this->builderCache->orderBy) && count($this->builderCache->orderBy) > 0) {\n for ($i = 0, $c = count($this->builderCache->orderBy); $i < $c; $i++) {\n if ($this->builderCache->orderBy[ $i ][ 'escape' ] !== false\n && ! $this->isLiteral(\n $this->builderCache->orderBy[ $i ][ 'field' ]\n )\n ) {\n $this->builderCache->orderBy[ $i ][ 'field' ] = $this->conn->protectIdentifiers(\n $this->builderCache->orderBy[ $i ][ 'field' ]\n );\n }\n\n $this->builderCache->orderBy[ $i ] = $this->builderCache->orderBy[ $i ][ 'field' ]\n . $this->builderCache->orderBy[ $i ][ 'direction' ];\n }\n\n return $this->builderCache->orderBy = \"\\n\" . sprintf(\n 'ORDER BY %s',\n implode(', ', $this->builderCache->orderBy)\n );\n } elseif (is_string($this->builderCache->orderBy)) {\n return $this->builderCache->orderBy;\n }\n\n return '';\n }", "function SetUpSortOrder() {\n\tglobal $dpp_proveedores;\n\n\t// Check for an Order parameter\n\tif (@$_GET[\"order\"] <> \"\") {\n\t\t$dpp_proveedores->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t$dpp_proveedores->CurrentOrderType = @$_GET[\"ordertype\"];\n\n\t\t// Field provee_id\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_id);\n\n\t\t// Field provee_rut\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_rut);\n\n\t\t// Field provee_dig\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dig);\n\n\t\t// Field provee_cat_juri\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_cat_juri);\n\n\t\t// Field provee_nombre\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_nombre);\n\n\t\t// Field provee_paterno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_paterno);\n\n\t\t// Field provee_materno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_materno);\n\n\t\t// Field provee_dir\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dir);\n\n\t\t// Field provee_fono\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_fono);\n\t\t$dpp_proveedores->setStartRecordNumber(1); // Reset start position\n\t}\n\t$sOrderBy = $dpp_proveedores->getSessionOrderBy(); // Get order by from Session\n\tif ($sOrderBy == \"\") {\n\t\tif ($dpp_proveedores->SqlOrderBy() <> \"\") {\n\t\t\t$sOrderBy = $dpp_proveedores->SqlOrderBy();\n\t\t\t$dpp_proveedores->setSessionOrderBy($sOrderBy);\n\t\t}\n\t}\n}", "protected function setOrdering(&$query)\n\t{\n\t\t$defaultOrdering = \"{$this->defaultOrdering} {$this->defaultDirection}\";\n\t\t$session = JFactory::getSession();\n\t\t$listOrdering = $this->state->get('list.fullordering', $defaultOrdering);\n\t\tif (strpos($listOrdering, 'null') !== false)\n\t\t{\n\t\t\t$sessionOrdering = $session->get('ordering', '');\n\t\t\tif (empty($sessionOrdering))\n\t\t\t{\n\t\t\t\t$session->set($this->context . '.ordering', $defaultOrdering);\n\t\t\t\t$query->order($defaultOrdering);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$query->order($listOrdering);\n\t}", "private function setCustomOrderBy()\n\t{\n\t\tif (!$this->useDataProvider && $this->customQuery->orderBy) {\n\t\t\t$this->orderBy = $this->customQuery->orderBy;\n\t\t} else {\n\t\t\t$this->sort = $this->customQuery->orderBy; //set $this->sort property for dataProvider sorting\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function _compile_order_by()\n\t{\n\t\tif (is_array($this->qb_orderby) && count($this->qb_orderby) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->qb_orderby); $i < $c; $i++)\n\t\t\t{\n\t\t\t\tif ($this->qb_orderby[$i]['escape'] !== FALSE && ! $this->_is_literal($this->qb_orderby[$i]['field']))\n\t\t\t\t{\n\t\t\t\t\t$this->qb_orderby[$i]['field'] = $this->protect_identifiers($this->qb_orderby[$i]['field']);\n\t\t\t\t}\n\n\t\t\t\t$this->qb_orderby[$i] = $this->qb_orderby[$i]['field'].$this->qb_orderby[$i]['direction'];\n\t\t\t}\n\n\t\t\treturn $this->qb_orderby = \"\\nORDER BY \".implode(', ', $this->qb_orderby);\n\t\t}\n\t\telseif (is_string($this->qb_orderby))\n\t\t{\n\t\t\treturn $this->qb_orderby;\n\t\t}\n\n\t\treturn '';\n\t}", "function LoadSortOrder() {\n\t\tglobal $t_tinbai_mainsite;\n\t\t$sOrderBy = $t_tinbai_mainsite->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($t_tinbai_mainsite->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $t_tinbai_mainsite->SqlOrderBy();\n\t\t\t\t$t_tinbai_mainsite->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function GetOrderBy() {\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql(\"\", \"\", \"\", \"\", $this->getSqlOrderBy(), \"\", $sSort);\n\t}", "function GetOrderBy() {\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql(\"\", \"\", \"\", \"\", $this->getSqlOrderBy(), \"\", $sSort);\n\t}", "function GetOrderBy() {\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql(\"\", \"\", \"\", \"\", $this->getSqlOrderBy(), \"\", $sSort);\n\t}", "function foo_modify_query_order( $query ) {\n if ( $query->is_main_query() ) {\n $query->set( 'orderby', 'title' );\n $query->set( 'order', 'ASC' );\n }\n}", "protected function decksOrderAsc()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_condition', $request['decks_order_asc'])\n ->changeRequest('decks_current_order', 'ASC')\n ->setCurrent('Decks_shared');\n }", "public function ordered()\n\t{\n\t\t$this->db->order = \"t.date DESC\";\n\n\t\treturn $this;\n\t}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function orderby(){\n\n $rows = $this\n ->db\n ->order_by(\"title\", \"asc\")\n ->order_by(\"id\", \"random\")\n ->get(\"personel\")\n ->result();\n\n print_r($rows);\n\n }", "protected function prepareOrderByQuery($order, $direction)\n {\n $this->orderBy = \"ORDER BY $order $direction\";\n }", "function order_by($order_by, $direction = 'ASC')\n {\n // We treat the rand() function as an exception\n if (preg_match(\"/rand\\\\(\\\\s*\\\\)/\", $order_by)) {\n $order = 'rand()';\n } else {\n $order_by = $this->object->_clean_column($order_by);\n // If the order by clause is a column, then it should be backticked\n if ($this->object->has_column($order_by)) {\n $order_by = \"`{$order_by}`\";\n }\n $direction = $this->object->_clean_column($direction);\n $order = \"{$order_by} {$direction}\";\n }\n $this->object->_order_clauses[] = $order;\n return $this->object;\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "function get_sql_order(){\r\n\r\n\t\tif(stripos($this->sql_query,' ORDER BY ')!==false){\r\n\t\t\tif(stripos($this->sql_query,' LIMIT ')!==false)\r\n\t\t\t\t$order_str_ini=substr($this->sql_query,stripos($this->sql_query,' ORDER BY '),stripos($this->sql_query,' LIMIT ')-stripos($this->sql_query,' ORDER BY '));\r\n\t\t\telse\r\n\t\t\t\t$order_str_ini=substr($this->sql_query,stripos($this->sql_query,' ORDER BY '));\r\n\t\t}else{\r\n\t\t\t$order_str_ini='';\r\n\t\t}\r\n\r\n\t\t$order_str='';\r\n\t\t$arr_new_cols=array();\r\n\r\n\t\t// adds the extra columns in consideration\r\n\t\t$arr_sql_fields=$this->sql_fields;\r\n\t\tfor($i=0; $i<count($this->extra_cols); $i++){\r\n\t\t\tarray_splice($arr_sql_fields, $this->extra_cols[$i][0]-1, 0, '');\r\n\t\t\t$arr_new_cols[]=$this->extra_cols[$i][0];\r\n\t\t}\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\tasort($arr_sort);\r\n\r\n\t\tforeach($arr_sort as $key => $value){\r\n\r\n\t\t\tif(!in_array($key+1,$arr_new_cols)){\r\n\r\n\t\t\t\tif(substr($arr_sort[$key],-1)=='a')\r\n\t\t\t\t\t$order_str.=(($order_str_ini or $order_str) ? ', ' : ' ORDER BY ').$arr_sql_fields[$key].' ASC';\r\n\r\n\t\t\t\tif(substr($arr_sort[$key],-1)=='d')\r\n\t\t\t\t\t$order_str.=(($order_str_ini or $order_str) ? ', ' : ' ORDER BY ').$arr_sql_fields[$key].' DESC';\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn $order_str_ini.$order_str;\r\n\t}", "public function findAllOverruleOrderBy()\n {\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->once())\n ->method('fetchAll')\n ->will($this->returnValue(array(array('bar' => 'Here is bar.', 'default' => 'And this is default.'))));\n $finderResult = $this->dbFinder->findAll($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), 'blub DESC');\n $this->assertEquals(1, $finderResult->count());\n $data = $finderResult->current();\n $this->assertEquals('Here is bar.', $data->withAnnotation());\n $this->assertEquals('And this is default.', $data->withDefaultValue());\n $select = $this->mockQueryBuilder->getSelect();\n $this->assertEquals('foo', $select->getBaseTableName());\n $this->assertEquals('blub DESC', $select->getOrderedBy());\n $this->assertFalse($select->hasLimit());\n $this->assertNull($select->getOffset());\n $this->assertNull($select->getAmount());\n $this->assertFalse($select->hasCriterion());\n }", "function Orderer($orderBy, $rowSchema = null) {\n\t\tif (!is_array($orderBy))\n\t\t\t$orderBy = array($orderBy);\n\t\tif ($rowSchema)\n\t\t{\n\t\t\t// Fix the comparison types\n\t\t\tforeach ($orderBy as $index => $discard)\n\t\t\t{\n\t\t\t\t$item =& $orderBy[$index]; // PHP4\n\t\t\t\tif ($item->compareAs == DEFAULT_COMPARISON)\n\t\t\t\t{\n\t\t\t\t\t$item->compareAs = get_comparison_type_for_col_type($rowSchema[$item->field]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->orderByList = $orderBy;\n\t}" ]
[ "0.7611777", "0.716666", "0.70202523", "0.67338914", "0.6507315", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.64334935", "0.632426", "0.6312696", "0.6310018", "0.62673545", "0.6254019", "0.621856", "0.6218371", "0.620799", "0.619013", "0.6159444", "0.615094", "0.6147675", "0.6103482", "0.60941696", "0.60857385", "0.6059878", "0.6050376", "0.60457546", "0.60409886", "0.6025359", "0.6025359", "0.6025359", "0.6007186", "0.6003749", "0.6001369", "0.5987374", "0.59844834", "0.59733695", "0.59733695", "0.5961502", "0.59164125", "0.59047407", "0.5889502", "0.5854774", "0.5854774", "0.5854774", "0.58509266", "0.5837312", "0.5795222", "0.57900274", "0.57855564", "0.5778891", "0.5776872", "0.57751185", "0.57651275", "0.5760107", "0.5746267", "0.57442415", "0.57204074", "0.5708501", "0.57054245", "0.5689266", "0.56868875", "0.56827044", "0.56668097", "0.5666199", "0.5666199", "0.5666199", "0.5656035", "0.5621719", "0.56198955", "0.56156015", "0.5608908", "0.5597045", "0.5582068", "0.5578339", "0.5569372", "0.5567626", "0.55660963" ]
0.7063796
2
Get the results from the query
public function results() { return $this->model->get($this->select); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResults()\n {\n return $this->execute();\n }", "public function getResults();", "public abstract function getResults();", "protected function get_results_from_query() {\n\t\t//para vaciar posibles resultados previos\n\t\t$this->rows = array();\n\t\t\n\t\t$this->crear_conexion();\n\t\t$this->set_charset();\n\t\t$result = $this->conn->query($this->query);\n\t\twhile ($row = $result->fetch_assoc())\n\t\t\t$this->rows[] = $row;\n\t\t$result->close();\n\t\t$this->cerrar_conexion();\n\t\t//array_pop($this->rows);\t//trae uno de más por el while\n\t\t//return $this->rows;\n\t}", "public function getResults()\n {\n return $this->get();\n }", "public function getResults()\n {\n return $this->get ();\n }", "public function results()\n {\n return $this->model->get($this->select);\n }", "protected function get_results_from_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$result = $this->conn->query($this->query);\n \t\t\twhile ($this->rows[] = $result->fetch_assoc());\n \t\t\t$result->close();\n \t\t\t$this->close_connection();\n \t\t\tarray_pop($this->rows);\n\t\t}", "public function fetchResults(){\n $resultsValues = $this->data;\n return $resultsValues;\n }", "public function GetResults() {\n return $this->rs; \n }", "function get_results($query=null) {\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query ) {\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Send back array of objects. Each row is an object\n\t\t\treturn $this->last_result;\n\t\t}", "public function Results(){\r\n\t\treturn self::get_results();\r\n\t}", "public function get_results()\n {\n }", "public function get_results()\n {\n }", "public function getResults()\n\t{\n\t\t# code...\n\t\treturn $this->results;\n\t}", "public function get_results() {\n\t\t//Begin actual functon\n\t\t$arg_check = $this->query_arg_check();\n\t\t\n\t\t//Check for matching number of arguments in query and arg array\n\t\tif (!$arg_check) {\n\t\t\t$this->except( MYSQLI_ERR_ARG_NUM_MISMATCH , $this->QUERY);\n\t\t} else {\n\t\t\t//Begin running the query\n\t\t\tif ($stmt = $this->connection->prepare($this->QUERY)) {\n\t\t\t\t\n\t\t\t\t$bind_values = array();\n\t\t\t\t$bind_types = '';\n\t\t\t\t$i=0;\n\t\t\n\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\tif(is_array($this->QUERY_ARGS))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->QUERY_ARGS as $id=>$value) \n\t\t\t\t\t{\n\t\t\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\t\t\tif ($value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bind_values[$i] = $value['value'];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$bind_types .= $value['type'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tcall_user_func_array('mysqli_stmt_bind_param',\n\t\t\t\t\t\t\t\t\t array_merge ( array($stmt,$bind_types),\n\t\t\t\t\t\t\t\t\t $this->ref_values($bind_values)\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}\n\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t$count = $stmt->execute();\n\t\t\t\t\n\t\t\t\t//Get sql result based on query type\n\t\t\t\tswitch ($this->QUERY_TYPE) {\n\t\t\t\t\tcase 'SELECT';\n\t\t\t\t\t\t$result_class_object = $this->fetch_data($stmt);\n\t\t\t\t\t\t$result = $this->std_class_object_to_array($result_class_object);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'INSERT';\n\t\t\t\t\t\t$result = $stmt->insert_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault; // UPDATE and others\n\t\t\t\t\t\t$result = $count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$stmt->close();\n\t\t\t\t\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t}", "public function results(){\n return $this->_result;\n }", "public function results() {\n\t\treturn $this->results;\n\t}", "function results()\r\n {\r\n $result = array();\r\n if(!$this->res_id)\r\n {\r\n $this->error_msg = \"Could not execute query to $this->db_name database, wrong result id\";\r\n return 0;\r\n }\r\n while($row = mysql_fetch_object($this->res_id))\r\n {\r\n array_push($result, $row);\r\n }\r\n return $result;\r\n }", "protected function get_results_from_query() {\n\t\t\t\t\n\t\t\t\t$this->open_connection();\n\t\t\t\t\n\t\t\t\tif (!$this->conn) {\n\t\t\t\t\tthrow new Excepcion('No se pudo Conectar a la BD: ' . mysql_error());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\t$result = $this->conn->query($this->query);\n\t\t\t\t\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthrow new Excepcion('No se pudo ejecutar la consulta a la BD: ' . mysql_error());\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\treturn $result;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result->close();\t\t\t\t\n\t\t\t\t$this->close_connection();\t\t\n\t\t\t\n\t\t}", "public function get_result() {\n\t\tif ( ! method_exists( $this->query, 'query' ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$this->parse_args( $this->args );\n\n\t\treturn $this->query->query( $this->get_query_args() );\n\t}", "public function getResults(){\n $this->results;\n }", "public function all() {\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return new QueryResult($query);\n }", "public function getResults(string $sQuery): array;", "abstract public function getResults(): mixed;", "public function results() {\n return $this->_results;\n }", "public function results() {\n return $this->_results;\n }", "public function results() {\n return $this->results;\n }", "public function getResults(){\n return $this->_results;\n }", "public function results()\n\t{\n\t\t// This function return entries\n\t\treturn $this->EE->job_search->results();\n\t}", "public function results()\n {\n return $this->_results;\n }", "public function results()\n {\n return $this->_results;\n }", "public function results()\n {\n return parent::get();\n }", "public function results()\n {\n return $this->_results;\n }", "public function getResults()\n {\n return $this->results;\n }", "public function results(): array;", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }", "public function getResults()\n {\n return parent::getResults();\n }" ]
[ "0.79531646", "0.78548115", "0.783856", "0.76645744", "0.76189286", "0.76037776", "0.75528306", "0.75267804", "0.7401936", "0.73551536", "0.73167187", "0.7299508", "0.7272348", "0.7270418", "0.7269784", "0.7256081", "0.7248797", "0.7248001", "0.7237911", "0.7178481", "0.71780306", "0.717081", "0.7146512", "0.71331006", "0.71330094", "0.7119758", "0.7119758", "0.71083295", "0.710291", "0.70938855", "0.70907503", "0.70907503", "0.70554036", "0.7051432", "0.7043516", "0.70282924", "0.7005616", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.70026433", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631", "0.7002631" ]
0.7622817
4
Return the total results
public function count() { $countModel = clone $this->model; $countQuery = $countModel->getQuery(); $countQuery->orders = null; $countModel->setQuery($countQuery); return $countModel->count(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalResults();", "public function getTotalResults() {\n return $this->totalResults;\n }", "public function getTotal();", "public function getTotal();", "public function getTotalNumberOfResults();", "public function getTotalResults()\n {\n return isset($this['info']['results'])\n ? (int) $this['info']['results']\n : 0;\n }", "public function total_results()\n\t{\n\t\t$results = $this->get_results();\n\t\t$total = 0;\n\n\t\tforeach\t( $results as $set ) {\n\t\t\t$total = $total + count( $set );\n\t\t}\n\n\t\treturn $total;\n\t}", "public function getTotalResults()\n {\n return $this->totalResults;\n }", "public function getTotalResults()\n {\n return $this->totalResults;\n }", "public function totalResults()\n {\n\t\treturn (int) $this->totalResultsReturned;\n }", "public static function searchTotal()\n\t{\n\t\t$total = self::all()->total();\n\t\treturn $total;\n\t}", "public function totalCount();", "public function totalCount();", "public function getTotal() {\n\t\treturn $this->find('count', array(\n\t\t\t'contain' => false,\n\t\t\t'recursive' => false,\n\t\t\t'cache' => $this->alias . '::' . __FUNCTION__,\n\t\t\t'cacheExpires' => '+24 hours'\n\t\t));\n\t}", "public function getTotalResults() : int\n {\n return $this->totalResults;\n }", "public function getTotalResults(): int\n {\n return $this->totalResults;\n }", "abstract public function countTotal();", "public function total();", "public function total();", "public function total();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "function getTotal() {\r\n\t\tif (empty ( $this->_total )) {\r\n\t\t\t$query = $this->_buildQuery ();\r\n\t\t\t$this->_total = $this->_getListCount ( $query );\r\n\t\t}\r\n\t\treturn $this->_total;\r\n\t}", "function getTotal()\r\n\t{\r\n\t\tif( empty($this->_total) )\r\n\t\t{\r\n\t\t\t$this->_total\t= $this->_getListCount( $this->_query() );\r\n\t\t}\r\n\r\n\t\treturn $this->_total;\r\n\t}", "function getTotal()\r\n{\r\n if (empty($this->_total))\r\n {\r\n $query = $this->_buildQuery();\r\n $this->_total = $this->_getListCount($query);\r\n }\r\n \r\n return $this->_total;\r\n}", "public function getTotal()\n\t{\n\t\t\n\t\treturn count($this->findAll());\n\t}", "function getTotal()\n\t{\n\t\tif (empty($this->_total)) {\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query); \n\t\t}\n\t\treturn $this->_total;\n\t}", "public function getTotal()\n\t{\n\t\t// Lets load the 'pending' records of the view instead of the existing records list\n\t\tif ($this->_pending)\n\t\t{\n\t\t\tif ($this->_total_pending === null)\n\t\t\t{\n\t\t\t\t$query = $this->_buildQuery();\n\n\t\t\t\tif ($query === false)\n\t\t\t\t{\n\t\t\t\t\treturn $this->_total_pending = 0;\n\t\t\t\t}\n\n\t\t\t\t$this->_getList($query, 0, 1);\n\t\t\t\t$this->_db->setQuery(\"SELECT FOUND_ROWS()\");\n\t\t\t\t$this->_total_pending = $this->_db->loadResult();\n\t\t\t}\n\n\t\t\treturn $this->_total_pending;\n\t\t}\n\n\t\t// Lets load the records if it doesn't already exist\n\t\telseif ($this->_total === null)\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\n\t\t\tif ($query === false)\n\t\t\t{\n\t\t\t\treturn $this->_total = 0;\n\t\t\t}\n\n\t\t\t$this->_getList($query, 0, 1);\n\t\t\t$this->_db->setQuery(\"SELECT FOUND_ROWS()\");\n\t\t\t$this->_total = $this->_db->loadResult();\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "public function getTotalResults()\n {\n if (null === $this->totalResults) {\n $this->totalResults = $this->countResults();\n }\n return $this->totalResults;\n }", "function getTotal()\n\t{\n\t\tif (empty($this->_total)) {\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\t\treturn $this->_total;\n\t}", "function getTotal() {\n\t\tif (empty($this->_total)) {\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "public function getTotalResults()\n {\n $query = $this->deliverQueryObject();\n\n return $query->resetQueryParts(['groupBy', 'orderBy'])->select('count(distinct uph.upID)')->setMaxResults(1)->execute()->fetchColumn();\n }", "public function total_rows();", "public function get_total()\n\t{\n\t\t$query = $this->query;\n\t\tif(isset($query['order']))\n\t\t\t$query['order'] = $this->model->table() . '.id';\n\t\treturn $this->model->count($query);\n\t}", "public function getTotal() {\n return $this->get(self::TOTAL);\n }", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "function getTotal()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_total))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_total = $this->_getListCount($query);\n\t\t}\n\n\t\treturn $this->_total;\n\t}", "public function getTotal()\n {\n if ( empty ( $this->_total ) ) {\n $query = $this->_buildQuery();\n $this->_total = $this->_getListCount($query);\n }\n\n return $this->_total;\n }", "public function total(){\n $total = $this->qualification + $this->referee_report + $this->interview;\n }", "public function total(): int\n {\n return count($this->all());\n }", "public static function getTotalData()\n {\n $table = \"return_list\";\n $condition = \"\";\n return Connection::getCountData($table, $condition);\n\n }", "public function getNumTotalQueryResults() : int{\n return $this->numTotalQueryResults;\n }", "public function countquery(){ \n\t\treturn $this->query_total; \n\t}", "public function getTotal(): int;", "protected function getTotal()\n {\n $total = 0;\n foreach ($this->entries as $entry) {\n $total += $entry['price'] * $entry['quantity'];\n }\n\n return $total;\n }", "public function getTotal()\n\t{\n\t\treturn $this->total;\n\t}", "public function qTotal(){\n return Manager::getManager($this)->select()->count();\n }", "public function getTotal() {\n\t\treturn $this->total;\n\t}", "function totalAll()\n\t{\n\t\t$sql=\"select count(ben_id) total from {$this->table}\";\n\t\t$data=dbFetchOne($sql);\n\t\treturn isset($data['total'])?$data['total']:false;\n\t}", "function getTotal()\n\t{\n\t\treturn $this->_total;\n\t}", "protected abstract function getRowsTotal(Result $result);", "public function getRecordsTotal(): int;", "public function getTotal(){\n\t\treturn $this->_total;\n\t}", "public function getTotal()\n {\n $db = self::getInstance();\n $db = $db->prepare(\"SELECT count(*) as count FROM paciente\");\n $db->execute();\n return $db->fetch(\\PDO::FETCH_ASSOC);\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal()\n {\n return $this->total;\n }", "public function getTotal() {\n\n }", "public function get_total()\n {\n }", "public function getTotal()\n\t{\n $rows = (new \\yii\\db\\Query())\n ->select('*')\n ->from($this->table)\n ->all();\n\t\treturn count($rows);\n\t}", "public function getTotalCount($results)\n {\n return $results->first();\n }", "public static function getTotalSearchResultsCount() {\n\n $category_dress_type_id = isset($_POST['product_type']) ? $_POST['product_type'] : '';\n $search_term = $_POST['search_term'];\n\n if (isset($_POST['model_type'])) {\n $model_type = $_POST['model_type'];\n switch ($model_type) {\n case \"girl\":\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=260\");\n Db_Actions::DbSelect(\"SELECT product_id FROM cscart_product_descriptions WHERE product LIKE '%\" . $search_term . \"%'\");\n break;\n case \"boy\":\n Db_Actions::DbSelect(\"SELECT DISTINCT COUNT(product_id) AS totalprds FROM cscart_products_categories WHERE category_id=261\");\n\n break;\n }\n }\n $products_count = Db_Actions::DbGetResults();\n if (!isset($products_count->empty_result)) {\n foreach ($products_count as $count) {\n echo ceil($count->totalprds / 9);\n }\n }\n else {\n echo 0;\n }\n }", "public function getTotalResultsAvailable()\n {\n return $this->TotalResultsAvailable;\n }", "public function getTotalItemCount();", "public function total()\n {\n return $this->calculateTotal();\n }", "public function GetTotalQueries()\r\n {\r\n return $this->_TotalQueries; \r\n }", "public function totals()\n {\n return $this->get(self::BASE_PATH.'/totals');\n }", "public function count()\r\n {\r\n\t\tif ( null === $this->totalResults )\r\n\t\t{\r\n\t\t\t$this->warmUp();\r\n\t\t}\r\n\r\n\t\treturn $this->totalResults;\r\n\t}", "public function getTotal()\n\t{\n\t\treturn $this->getKeyValue('total'); \n\n\t}", "public function getNumResultsStored() : int{\n return $this->numResults;\n }", "public function totalRecord(){\n\t\t\t//lay bien ket noi csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc thi truy van\n\t\t\t$query = $conn->query(\"select * from work inner join content_time on work.id=content_time.fk_work_id inner join work_time on work_time.id=content_time.fk_worktime_id\");\n\t\t\t//tra ve tong so luong ban ghi\n\t\t\treturn $query->rowCount();\n\t\t}", "public function total(){\n\t\treturn $this->total;\n\t}", "protected function fetchTotalCount()\n {\n //get total if fetching a list\n $this->main_model_obj = new $this->main_model();\n $total_builder = $this->main_model_obj->getModelsManager()->createBuilder()\n ->columns(['COUNT(1) AS total'])\n ->from($this->main_model);\n\n $this->formJoinsUsingFilters($total_builder);\n $this->formConditions($total_builder);\n\n $result_obj = $total_builder->getQuery()->getSingleResult();\n $this->total_count = (empty($result_obj['total'])) ? 0 : $result_obj['total'];\n }", "public function getTotal()\n {\n// $store = $this->getStoreId('getTotal');\n//\n// // Try to load the data from internal storage.\n// if (isset($this->cache[$store]))\n// {\n// return $this->cache[$store];\n// }\n\n // Load the total.\n $query = $this->getItems();\n $total = (int) $this->_getListCount($query);\n\n // Check for a database error.\n if ($this->_db->getErrorNum())\n {\n $this->setError($this->_db->getErrorMsg());\n return false;\n }\n\n // Add the total to the internal cache.\n// $this->cache[$store] = $total;\n\n return $total;\n }", "public function getTotal()\n {\n $query = $this->getQuery()->select('COUNT(*) as total');\n \n $rows = $this->database->query($query, $this->database->getBinds());\n \n if (!isset($rows[0]['total'])) {\n return 0;\n }\n \n return $rows[0]['total'];\n }", "public static function getTotal()\n {\n return Query::select()->\n count('*', 'total')->\n from(self::getTableName())->\n execute()->\n getFirstRow()->\n getValue('total', 'int');\n }", "public function getTotal()\n {\n $response = $this->client->post( 'https://idf.intven.com/public_patent_listing.json', [\n 'verify' => false,\n 'json' => [\n \"report_type\" => \"public_patent_listing\",\n \"queryFields\" => new \\stdClass(),\n \"filters\" => new \\stdClass(),\n \"per_page\" => 0,\n \"from\" => 0,\n \"sort\" => \"issued_on\",\n \"sort_order\" => \"desc\"\n ],\n ]);\n $data = json_decode($response->getBody()->getContents());\n return $data->meta_data->total_count;\n }", "public function getTotal() {\n $query = \"\n SELECT \n count(*) as total\n FROM \n tbl_usuario_admin\n \";\n\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n\n return $stmt->fetch(\\PDO::FETCH_ASSOC);\n }", "public function getTotalCount($results)\n {\n return $results->getNumFound();\n }", "public function getTotal() : int\n {\n return $this->total;\n }", "public function total() {\n\t\t$query = \"select count(us.sentimento_id) as total\n\t\t\t\t from usuario_sentimento us where us.sentimento_id = \" . $this->id;\n\t\t$this->db->ExecuteSQL($query);\n\t\t$res = $this->db->ArrayResult();\n\t\treturn $res['total'];\n\t}", "public function getTotal(): float;", "public function modelTotal(){\n\t\t\t//---\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select id from orders\");\n\t\t\t//lay tong so ban ghi\n\t\t\treturn $query->rowCount();\n\t\t\t//---\n\t\t}", "public function count()\r\n\t{\r\n//\t\techo json_encode($this->db->query_first($sql));\r\n\t\techo json_encode(array('total'=>30));\r\n\t}", "private function _calculateTotalsByRating()\n {\n $sql = new SqlStatement();\n $sql->select(array(\n 'id' => 'ROUND(total)',\n 'val' => 'ROUND(total)',\n 'c' => 'COUNT(*)',\n 'type' => \"'RATING'\"))\n ->from(array('p' => self::RESULTS_TABLE))\n ->group(array('ROUND(total)'));\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n $res = $this->db->query($sql);\n// echo $sql;\n return $res->rows;\n }", "public function getTotal():int{\r\n\t return (int)$this->_vars['total_items']??0;\r\n\t}", "public function total()\n\t{\n\t\treturn $this->total;\n\t}", "public function getTotalHits()\n {\n if (isset($this->results)) {\n return $this->results->getTotalHits();\n }\n }", "public function getTotalCount($results)\n {\n return count($results);\n }", "function getTotals(){\n\t\treturn $this->cache->getTotals();\n\t}", "function showtotals(){\nglobal $XUSER, $SERVER, $ROOMS;\ncleanOnline();\n$q = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]online\");\n$RV[0] = 0; $RV[1] = 0; $RV[2] = 0;\nwhile($row = Do_Fetch_Row($q)){\n$q2 = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]users WHERE username='$row[1]'\");\n$row2 = Do_Fetch_Row($q2);\nif($row2[4] == 4 || $row2[4] == 5){\n$RV[0]++;\n}else{\n$RV[1]++;\n}\n}\ncleanRooms();\n$q = DoQuery(\"SELECT * FROM $SERVER[TBL_PREFIX]rooms\");\nwhile($row = Do_Fetch_Row($q)){\n$RV[2]++;\n}\nreturn $RV;\n}", "public function totalRegistros();", "public function total()\n {\n return $this->total;\n }", "public function total()\n {\n return $this->total;\n }", "public function getNbResults()\n {\n $this->sphinxQL->execute();\n\n $helper = Helper::create($this->sphinxQL->getConnection());\n $meta = $helper->showMeta()->execute()->fetchAllAssoc();\n\n foreach ($meta as $item) {\n if ('total_found' === $item['Variable_name']) {\n return (int) $item['Value'];\n }\n }\n\n return 0;\n }", "public function getTotal(){\n\t\t\t$sql = \"SELECT COUNT(*) as c FROM servico\";\n\t\t\t$sql = $this->db->query($sql);\n\t\t\t$sql = $sql->fetch();\n\t\n\t\t\treturn $sql['c'];\n\t\t}" ]
[ "0.9064608", "0.8295727", "0.823302", "0.823302", "0.8207319", "0.8164317", "0.8121554", "0.81058544", "0.81058544", "0.8035189", "0.7960989", "0.7927728", "0.7927728", "0.78351873", "0.7790682", "0.7782512", "0.7770518", "0.7763495", "0.7763495", "0.7763495", "0.77330315", "0.77330315", "0.77330315", "0.77293545", "0.7713215", "0.7690511", "0.7686078", "0.7620584", "0.7577572", "0.75667995", "0.755685", "0.7555573", "0.7522628", "0.7517822", "0.7442481", "0.7435905", "0.7409857", "0.7409857", "0.7409857", "0.74008757", "0.738597", "0.73707116", "0.73560995", "0.7346028", "0.7316094", "0.73002964", "0.728823", "0.7277079", "0.72770315", "0.7264803", "0.7240821", "0.72396916", "0.72269064", "0.721297", "0.72113925", "0.7209331", "0.7202521", "0.7202521", "0.7202521", "0.7202521", "0.7202521", "0.7202521", "0.71854055", "0.71752775", "0.7166747", "0.7166541", "0.7122215", "0.71137553", "0.70796376", "0.7065858", "0.70519274", "0.70495015", "0.7029746", "0.70294607", "0.70287323", "0.70122355", "0.70080703", "0.6999277", "0.69777405", "0.69770896", "0.69723755", "0.6963235", "0.6958876", "0.694738", "0.694248", "0.6936796", "0.69347703", "0.6927084", "0.6918051", "0.6917862", "0.69078064", "0.69073504", "0.6906207", "0.6894774", "0.6892757", "0.6869271", "0.68628687", "0.68601143", "0.68601143", "0.68562084", "0.6846997" ]
0.0
-1
Get card Id or create new
public function getCardIdWithData(int $user_id, array $card_data) { return $this->firstOrCreate(['user_id' => $user_id], $card_data)->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdCard()\n {\n return $this->id_card;\n }", "public function insertCard($data){\n unset($data['is_default']);\n\n /**\n Api/CardCredit/insertCardCredit: insert card data\n Kiosk/Api/verifyCreditCard: insert card data, without member_id, cvv2\n */\n\n if($data['card_code']) {\n $data['card_last4'] = substr($data['card_code'], -4);\n $data['card_md5'] = md5($data['card_code']);\n if($data['member_id']) {\n if(empty($this->getDefaultCard($data['member_id'], $scope='default', $forceGetDefault=true))) {\n //if no default card, this must be a default card\n $data['is_default'] = 1;\n }\n }\n\n $card = $this->getCardByCode($data['card_code']);\n if($card) {\n //when card is inserted in web api, member_id is essential\n //when card is inserted in kiosk api, member_id is empty\n if($data['member_id']) {\n //for Api/CardCredit/insertCardCredit: card has existed and bind memberId, fail insert\n if($card['member_id']) return false;\n\n //for Api/CardCredit/insertCardCredit: card has existed and bind memberId, no matter member_id match, bind the new member_id\n //for Api/CardCredit/insertCardCredit: card_code has existed and not bind memberId, bind memberId now\n $data['update_time'] = time();\n if($this->where('card_id=%d', $card['card_id'])->data($data)->save()) {\n return $card['card_id'];\n } else {\n return false;\n }\n } else {\n //for Kiosk/Api/verifyCreditCard: card has existed and bind memberId\n //for Kiosk/Api/verifyCreditCard: card_code has existed and not bind memberId\n return $card['card_id'];\n }\n } else {\n $data['create_time'] = time();\n if ($this->create($data)) {\n return $this->add();\n } else {\n return false;\n }\n }\n } else {\n return false;\n }\n }", "public function createToken($cardinfo){\n \\Stripe\\Stripe::setApiKey($this->getApi('secret_key'));\n $token = \\Stripe\\Token::create(array(\n \"card\" => array(\n \"number\" => $cardinfo['number'],\n \"exp_month\" => $cardinfo['exp_month'],\n \"exp_year\" => $cardinfo['exp_year'],\n \"cvc\" => $cardinfo['cvc']\n )\n ));\n $this->_token = $token; \n $this->_card = $token->card;\n return $token->card->id;\n }", "protected function k_CardId():string {return '';}", "function getNewId();", "public function drawCard(int $cardId): Card;", "public function get_postcard_id() {\n return (int) $this->get_field( 'postcard' );\n }", "public static function getHolderID();", "public function addCard(): bool {\n if($this->id == 0) { # Card doesn't exist yet\n if($result = $this->mysqli->query(\"INSERT INTO cards (card_num, name, billing_address, exp, security_code) VALUES ('{$this->cardNum}', '{$this->name}', '{$this->billingAddress}', '{$this->exp}', '{$this->securityCode}')\")) {\n # INSERT query successful\n $lastEntry = $this->mysqli->query(\"SELECT max(id) FROM cards\")->fetch_assoc();\n $this->id = $lastEntry['max(id)'];\n return true;\n } else { # INSERT query failed\n return false;\n }\n } else { # Card does exist in database\n return false;\n }\n }", "public function getCard(): bool {\n $result = $this->mysqli->query(\"SELECT * FROM cards WHERE id='{$this->id}'\");\n if($result->num_rows == 1) { # Card exists in database\n $card = $result->fetch_assoc();\n $this->cardNum = $card['card_num'];\n $this->name = $card['name'];\n $this->billingAddress = $card['billing_address'];\n $this->exp = $card['exp'];\n $this->securityCode = $card['security_code'];\n return true;\n } else { # Card doesn't exist yet\n return false;\n }\n }", "public function getCustomerCardId(): ?string\n {\n if (count($this->customerCardId) == 0) {\n return null;\n }\n return $this->customerCardId['value'];\n }", "public function getCurrentCartIdentifier();", "public function obtenerId() {}", "public static function getCardById($id)\n {\n\t\t$key = 'CardById_' . $id;\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$card = $cache->get($key);\n\t\tif ($card === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Card::getDefaultInstance();\n\t\t\t$card = $db->getCardById($id);\n\t\t\tif ($card) {\n\t\t\t\t$cache->add($key, $card, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $card;\n }", "public function get_id();", "public function get_id();", "public function storeCreditCard($obj) {\n if($obj){\n $cc_id = CreditCard::create(array(\n 'type' => $obj-> type,\n 'number' => $obj-> number,\n 'name' => $obj-> name,\n 'expirationDate' => $obj-> expirationDate\n ))->id;\n return $cc_id;\n }\n\n }", "public function store(Request $request)\n {\n $cardId = $request->input('id');\n $card = $request->except('id');\n return response()->json(array('code'=>20000, 'card'=>$card, 'cardId'=>$cardId));\n $user = Helper::getCurrentUserByToken(Helper::getCurrentToken($request));\n $uuid = Str::random(32);\n $card['user_id'] = $user['id'];\n $card['uuid'] = $uuid;\n $handledCard = DB::table('giftcards')->updateOrInsert(['id'=>$cardId], $card);\n // $handledCard = Giftcard::create($card);\n return response()->json(array('code'=>20000, 'card'=>$handledCard));\n }", "public function getCardVueIdAttribute ()\n {\n $this->card_vue_id = $this->card_type . '_' . $this->tweet_id;\n return( $this->card_vue_id );\n }", "public function get_card(){ return $this->_card;}", "abstract public function get_id();", "public function obtenerID();", "private static function getNewId()\n {\n return DB::table('cashouts')->get()->count() + 1;\n }", "public function getCidCard()\n {\n return $this->cid_card;\n }", "public function addNewCardToCustomer($card) {\n\n\t\treturn $this->request('/card', $card, 'POST');\n\t}", "public function determineId() {}", "public function add_card() {\n\n\t\tif ($this->input->get('action') == \"remove_card\" && $this->input->get('card_id') != \"\") {\n\t\t\t// call remove card function \n\t\t\t$option = array(\n\t\t\t\t'is_json' => false,\n\t\t\t\t'url' => site_url() . '/service_delete_user_card_info',\n\t\t\t\t'data' => array(\n\t\t\t\t\t'user_id' => $this->session->userdata('userId'),\n\t\t\t\t\t'card_id' => $this->input->get('card_id')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$result = get_data_with_curl($option);\n\t\t\tif (element('isSuccess', $result, '') == 1) {\n\t\t\t\t$this->session->set_flashdata('card_msg', $result['message']);\n\t\t\t}\n\t\t}\n\n\t\t$data['user_account_info'] = $this->user_model->get_user_payment_account($this->session->userdata('userId'));\n\n\t\t/* view existing card */\n\t\t$data['card_exist'] = array();\n\t\tif (count($data['user_account_info']) != 0 && $data['user_account_info']['card_id'] != \"\") {\n\n\t\t\t$data['card_exist'] = $this->mango_pay->view_a_card($data['user_account_info']['card_id']);\n\t\t}\n\n\t\t/* create card registration tokken */\n\n\t\tif (count($data['user_account_info']) == 0) {\n\n\t\t\t/* create payment account of user */\n\t\t\t$option = array(\n\t\t\t\t'is_json' => false,\n\t\t\t\t'url' => site_url() . '/service_create_user_wallet',\n\t\t\t\t'data' => array('user_id' => $this->session->userdata('userId'))\n\t\t\t);\n\n\t\t\t$result = get_data_with_curl($option);\n\t\t\t$data['user_account_info'] = $this->user_model->get_user_payment_account($this->session->userdata('userId'));\n\t\t}\n\n\n\t\t/* create card registration tokken */\n\t\t$card_info = $data['user_address'] = array();\n\t\tif (count($data['user_account_info']) > 0) {\n\t\t\t$user = $data['user_account_info'];\n\t\t\t$data['user_address'] = $this->mango_pay->mango_view_user_detail($user['author_id']);\n\t\t\tif ($this->input->get('card_type') != \"\") {\n\t\t\t\t$access = array(\n\t\t\t\t\t\"Tag\" => $user['user_id'],\n\t\t\t\t\t\"UserId\" => $user['author_id'],\n\t\t\t\t\t\"Currency\" => \"EUR\",\n\t\t\t\t\t\"CardType\" => $this->input->get('card_type')\n\t\t\t\t);\n\t\t\t\t$card_info = $data['card_access_tokken'] = $this->mango_pay->mango_create_registration($access);\n\t\t\t}\n\t\t}\n\n\t\tif (count($card_info)) {\n\t\t\t$this->session->set_userdata(\"cardRegisterId\", $card_info->Id);\n\t\t}\n\t\t$this->load->view('account_information/add_card', $data);\n\t}", "public function card();", "public function createCard(){\n if(Input::has('name') && Input::has('email') && Input::has('phone') && Input::has('company') && Input::has('position')){\n\n $user = User::where('_id', '=', Session::get('id'))->first();\n if($user){\n $card = $user->card;\n if($card == null){\n\n $user->card = array(\n 'name' => Input::get('name'),\n 'email' => Input::get('email'),\n 'photo' => Input::get('photo'),\n 'phone' => Input::get('phone'),\n 'company' => Input::get('company'),\n 'position' => Input::get('position')\n );\n $user->isCompleted = true;\n $user->save();\n\n return Response::json(\n array('reason' => 'card created and profile completed', 'status' => 0))->setCallback(Input::get('callback'));\n }\n\n return Response::json(\n array('reason' => 'existent user card', 'status' => 1))->setCallback(Input::get('callback'));\n }\n return Response::json(\n array('reason' => 'user not exist', 'status' => 2))->setCallback(Input::get('callback'));\n }\n return Response::json(\n array('reason' => 'fields arguments are icorrect', 'status' => 3))->setCallback(Input::get('callback'));\n }", "public function addCard()\n {\n }", "function getId();", "public function paymentId() : string;", "public function getID();", "public function getID();", "public function getID();", "public function GetId () ;", "function flashcard_add_instance($flashcard) {\n global $DB;\n\n $flashcard->timemodified = time();\n\n if (!isset($flashcard->starttimeenable)) {\n $flashcard->starttime = 0;\n }\n\n if (!isset($flashcard->endtimeenable)) {\n $flashcard->endtime = 0;\n }\n\n // Saves draft customization image files into definitive filearea.\n $customimages = array('custombackfileid',\n 'customfrontfileid',\n 'customemptyfileid',\n 'customreviewfileid',\n 'customreviewedfileid',\n 'customreviewemptyfileid');\n foreach ($customimages as $ci) {\n flashcard_save_draft_customimage($flashcard, $ci);\n }\n\n // weird hack\n // Quickform fails getting thios value in $data.\n $flashcard->completionallviewed = clean_param(@$_POST['completionallviewed'], PARAM_INT);\n\n $newid = $DB->insert_record('flashcard', $flashcard);\n\n // Import all information from question.\n if (isset($flashcard->forcereload) && $flashcard->forcereload) {\n flashcard_import($flashcard);\n }\n\n return $newid;\n}", "public function getCardNumber() : ?string ;", "public function getId()\n {\n return $this->savePayment();\n }", "public function actionCardCreate() {\n $model = new UserCard();\n $model->scenario = 'create';\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $dbTrans = Yii::$app->db->beginTransaction();\n $text = '保存成功';\n try {\n if ($model->id) {\n $model->updateAll([\n 'user_name' => $model->user_name,\n 'phone' => $model->phone,\n ], ['id' => $model->id]);\n } else {\n //调用卡中心 激活接口激活卡 现在改为直接激活服务\n UserCard::activateCard($model->card_id, $model->card_type);\n if (!$model->card_physical_id) {\n $model->card_type = 2;\n }\n $model->save(false);\n $text = '激活成功';\n }\n $cardRecord = Yii::$app->request->get('record');\n// $serviceLeft = Yii::$app->request->post('UserCard')['service_left'];\n// $serviceId = Yii::$app->request->post('UserCard')['service_id'];\n if (!empty($model->service_left) && (!empty($model->service_id))) {//修改剩余次数\n// $serviceRecord = CardServiceLeft::find()->where(['card_id' => $cardRecord['f_card_id'], 'service_id' => $service_id])->one();\n// if ($serviceRecord) {//修改\n// $serviceRecord->service_left = $service_left;\n// } else {\n// $serviceRecord = new CardServiceLeft();\n// $serviceRecord->service_left = $service_left;\n// $serviceRecord->card_physical_id = isset($cardRecord['f_physical_id']) ? $cardRecord['f_physical_id'] : 0;\n// $serviceRecord->service_id = $service_id;\n// $serviceRecord->card_id = $cardRecord['f_card_id'];\n// $serviceRecord->activate_time = time();\n// $serviceRecord->invalid_time = time() + 365 * 24 * 60 * 60;\n// }\n// $serviceRecord->save();\n //新增/修改卡关联服务的剩余次数\n CardServiceLeft::createUpdateService($model->service_left, $model->service_id, $model->card_id, $model->card_physical_id);\n }\n $dbTrans->commit();\n } catch (Exception $e) {\n Yii::info('cardCreate failed info :' . $e->getMessage());\n $dbTrans->rollBack();\n }\n Yii::$app->getSession()->setFlash('success', $text);\n return $this->redirect(['card-index']);\n } else {\n $record = Yii::$app->request->get('record');\n if ($record['dataFrom'] == 1) {//本地已经有数据 更新\n $model->id = $record['id'];\n }\n $model->user_name = $model->user_name ? $model->user_name : $record['user_name'];\n $model->phone = $model->phone ? $model->phone : $record['phone'];\n $model->card_id = $record['f_card_id'];\n $model->card_physical_id = isset($record['f_physical_id']) ? $record['f_physical_id'] : 0;\n $model->card_type_code = $record['f_card_type_code'];\n $model->parent_spot_id = $this->parentSpotId;\n $model->f_effective_time = $record['f_effective_time'];\n $model->card_type = $record['card_type'];\n //服务信息\n $service = ServiceConfig::find()->where(['card_type' => $record['f_card_type_code']])->asArray()->all();\n //剩余次数\n $left = [];\n if ($service) {\n $left = CardServiceLeft::find()->where(['card_id' => $record['f_card_id'], 'service_id' => array_column($service, 'id')])->indexBy('service_id')->asArray()->all();\n }\n return $this->render('/card/create', [\n 'model' => $model,\n 'record' => $record,\n 'service' => $service,\n 'left' => $left,\n ]);\n }\n }", "public function getCard() {\n return $this->card;\n }", "public function get_id()\n {\n }", "public function getIidCard()\n {\n return $this->iid_card;\n }", "abstract function getId();", "function add_credit_card($contact_id,$data)\n {\n $last_4 = substr($data['CardNumber'],-4);\n $cc_id = $this->locateCard($contact_id,$last_4);\n\n if($cc_id == 0) //Doesn't Exist\n {\n //Add Card\n $cc_id = $this->dsAdd('CreditCard',$data);\n return $cc_id;\n }\n elseif($cc_id > 0)\n {\n //Check if card as same expiration date\n $card_data = $this->dsLoad('CreditCard',$cc_id,array('ExpirationMonth','ExpirationYear'));\n if(\n $card_data['ExpirationMonth'] == $data['ExpirationMonth'] &&\n $card_data['ExpirationYear'] == $data['ExpirationMonth']) {\n return $cc_id;\n }\n else\n {\n //Update CC Dates\n return $this->dsUpdate('CreditCard',$cc_id,array('ExpirationYear' => $data['ExpirationYear'],'ExpirationMonth' => $data['ExpirationMonth']));\n }\n\n\n }\n else\n {\n return FALSE;\n }\n\n }", "public function getId() {}", "public function getId() {}", "public function getCipherId() {}", "function saveCard()\n {\n $table = 'module_isic_card';\n $card = $this->vars[\"card_id\"];\n $this->convertValueFieldKeys();\n //print_r($this->vars);\n // there are 2 possibilites for saving card (modify existing or add new)\n if ($card) { // modify existing card\n\n $row_old = $this->isic_common->getCardRecord($card);\n $t_field_data = $this->getFieldData($row_old[\"type_id\"]);\n\n\n $r = &$this->db->query('\n UPDATE\n `module_isic_card`\n SET\n `module_isic_card`.`moddate` = NOW(),\n `module_isic_card`.`moduser` = ?,\n `module_isic_card`.`person_name` = ?,\n `module_isic_card`.`person_addr1` = ?,\n `module_isic_card`.`person_addr2` = ?,\n `module_isic_card`.`person_addr3` = ?,\n `module_isic_card`.`person_addr4` = ?,\n `module_isic_card`.`person_email` = ?,\n `module_isic_card`.`person_phone` = ?,\n `module_isic_card`.`person_position` = ?,\n `module_isic_card`.`person_class` = ?,\n `module_isic_card`.`person_stru_unit` = ?,\n `module_isic_card`.`person_bankaccount` = ?,\n `module_isic_card`.`person_bankaccount_name` = ?,\n `module_isic_card`.`person_newsletter` = ?,\n `module_isic_card`.`confirm_user` = !,\n `module_isic_card`.`confirm_payment_collateral` = !,\n `module_isic_card`.`confirm_payment_cost` = !,\n `module_isic_card`.`confirm_admin` = !\n WHERE\n `module_isic_card`.`id` = !\n ', $this->userid,\n $this->vars[\"person_name\"],\n $this->vars[\"person_addr1\"],\n $this->vars[\"person_addr2\"],\n $this->vars[\"person_addr3\"],\n $this->vars[\"person_addr4\"],\n $this->vars[\"person_email\"],\n $this->vars[\"person_phone\"],\n $this->vars[\"person_position\"],\n $this->vars[\"person_class\"],\n $this->vars[\"person_stru_unit\"],\n $this->vars[\"person_bankaccount\"],\n $this->vars[\"person_bankaccount_name\"],\n $this->vars[\"person_newsletter\"] ? 1 : 0,\n $this->vars[\"confirm_user\"] ? 1: 0,\n $this->user_type == 1 ? ($this->vars[\"confirm_payment_collateral\"] ? 1 : 0) : $row_old[\"confirm_payment_collateral\"],\n $this->user_type == 1 ? ($this->vars[\"confirm_payment_cost\"] ? 1 : 0) : $row_old[\"confirm_payment_cost\"],\n $this->user_type == 1 ? ($this->vars[\"confirm_admin\"] ? 1 : 0) : $row_old[\"confirm_admin\"],\n $card\n );\n if ($r) {\n $success = true;\n $this->isic_common->saveCardChangeLog(2, $card, $row_old, $this->isic_common->getCardRecord($card));\n $message = 'card saved ...';\n } else {\n $success = false;\n $message = 'card modify failed ...';\n }\n\n } else { // adding new card\n $success = false;\n $action = 1; // add\n $t_field_data = $this->getFieldData($this->vars[\"type_id\"]);\n //print_r($t_field_data);\n foreach ($t_field_data[\"detailview\"] as $fkey => $fval) {\n // check for disabled fields, setting these values to empty\n if (in_array($action, $fval[\"disabled\"])) {\n unset($this->vars[$fkey]);\n continue;\n }\n // check for requried fields\n if (in_array($action, $fval[\"required\"])) {\n if (!$this->vars[$fkey]) {\n $error = $error_required_fields = true;\n break;\n }\n }\n if (!$error) {\n $insert_fields[] = $this->db->quote_field_name(\"{$fkey}\");\n $t_value = '';\n switch ($fval['type']) {\n case 1: // textfield\n $t_value = $this->db->quote($this->vars[$fkey] ? $this->vars[$fkey] : '');\n break;\n case 2: // combobox\n $t_value = $this->vars[$fkey] ? $this->vars[$fkey] : 0;\n break;\n case 3: // checkbox\n $t_value = $this->vars[$fkey] ? 1 : 0;\n break;\n case 5: // date\n $t_date = $this->convertDate($this->vars[$fkey]);\n $t_value = $this->db->quote($t_date);\n break;\n default :\n break;\n }\n $insert_values[] = $t_value;\n }\n }\n if (!$error) {\n $r = &$this->db->query('INSERT INTO ' . $this->db->quote_field_name($table) . ' FIELDS (' . implode(',', $insert_fields) . ') VALUES (' . implode(',', $insert_values) . ')');\n echo \"<!-- \" . $this->db->show_query() . \" -->\\n\";\n $card = $this->db->insert_id();\n\n }\n\n if ($r && $card) {\n $success = true;\n $this->isic_common->saveCardChangeLog(1, $card, array(), $this->isic_common->getCardRecord($card));\n $message = 'new card saved ...';\n } else {\n $success = false;\n $message = 'card add failed ...';\n }\n }\n\n echo JsonEncoder::encode(array('success' => $success, 'msg' => $message));\n exit();\n \n }", "public function getCard()\n {\n return $this->card;\n }", "public function setIdCard($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->id_card !== $v) {\n $this->id_card = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_ID_CARD] = true;\n }\n\n return $this;\n }", "function getID();", "public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $this->bean->card;\n }", "public function getDefaultCardNumber() : ?string;", "public function store(Request $request)\n {\n $user = $request->input('username');\n $shopper = Shopper::where('email', $user)->first();\n\n $type = strtoupper($request->input('cardType'));\n $number = $request->input('cardNumber');\n $firstDigits = substr($number, 0, 4);\n $lastDigits = substr($number, -4);\n $month = $request->input('expiryMonth');\n $year = $request->input('expiryYear');\n\n $date = strtotime($year . '-' . $month . '-01');\n\n $currentDate = time();\n $validDate = $date > $currentDate;\n\n if (!empty($shopper) && !empty($type) && !empty($number) && !empty($month) && !empty($year) && $validDate) {\n $card = new Card();\n $card->cardType = $type;\n $card->firstDigits = $firstDigits;\n $card->lastDigits = $lastDigits;\n $card->expirationMonth = sprintf('%02d', $month);\n $card->expirationYear = sprintf('%02d', $year);\n\n if ($type == 'VISA') {\n $card->image = 'http://ec2-52-50-67-73.eu-west-1.compute.amazonaws.com/images/visa.jpg';\n } else {\n $card->image = 'http://ec2-52-50-67-73.eu-west-1.compute.amazonaws.com/images/mastercard.jpg';\n }\n $card->save();\n return response()->json(Card::orderBy('id', 'desc')->get());\n } else {\n return response('{\"error\":\"Invalid arguments\"}', 500);\n }\n\n }", "function add_card_type($params)\n {\n $this->db->insert('card_types',$params);\n return $this->db->insert_id();\n }", "public function getID(): string;", "public function postAddCard(AddCardRequest $request)\n {\n try {\n $customerId = RecruiterProfile::where(['user_id' => Auth::user()->id])->pluck('customer_id');\n $expiry = explode('/', $request->expiry);\n $month = $expiry[0];\n $year = $expiry[1];\n $cardToken = \\Stripe\\Token::create([\n \"card\" => [\n \"number\" => $request->cardNumber,\n \"exp_month\" => $month,\n \"exp_year\" => $year,\n \"cvc\" => $request->cvv\n ]\n ]);\n if (isset($cardToken['id'])) {\n $customer = \\Stripe\\Customer::retrieve($customerId[0]);\n $customer->sources->create([\n \"source\" => $cardToken['id']\n ]);\n $this->response['success'] = true;\n $this->response['message'] = trans('messages.card_added');\n } else {\n $this->response['success'] = false;\n $this->response['data'] = null;\n $this->response['message'] = trans('messages.cannot_add_card');\n }\n } catch (\\Exception $e) {\n Log::error($e);\n $this->response['success'] = false;\n $this->response['message'] = $e->getMessage();\n }\n return $this->response;\n }", "public function testAddCard() {\n $title = \"Deck1\";\n $tags = array(\"aaa\", \"bbb\", \"ccc\");\n $deckid = $this->user->add_deck($title, $tags, true, $this->con);\n\n $title = \"Card99\";\n $sub = \"One card\";\n $content = \"<h1>Hi</h1>\";\n $cardid = $this->user->add_card($title, $sub, $content, $deckid, 0, NULL, $this->con);\n\n $result = select_from(\"cards\", \"*\", \"WHERE `cardid` = '$cardid'\", $this->con);\n while ($row = mysqli_fetch_assoc($result)) {\n $this->assertEquals($title, $row['title']);\n $this->assertEquals($sub, $row['sub']);\n $this->assertEquals($content, $row['content']);\n }\n \n // delete this deck\n delete_from(\"decks\", \"WHERE `deckid` = '$deckid'\", '1', $this->con);\n // delete the tags\n delete_from(\"tags\", \"WHERE `deckid` = '$deckid'\", '', $this->con);\n // delete this card\n delete_from(\"cards\", \"WHERE `cardid` = '$cardid'\", '1', $this->con);\n }", "public function getId(): int;", "public function getRequestedId() {}", "public function cards_add(Request $request) {\n\n if(Setting::get('stripe_secret_key')) {\n\n \\Stripe\\Stripe::setApiKey(Setting::get('stripe_secret_key'));\n\n } else {\n\n throw new Exception(tr('add_card_is_not_enabled'), 101);\n }\n\n DB::beginTransaction();\n\n try {\n\n $validator = Validator::make($request->all(), array(\n 'number' => 'numeric',\n 'card_token'=>'required',\n )\n );\n\n if($validator->fails()) {\n\n $error_messages = implode(',', $validator->messages()->all());\n \n throw new Exception($error_messages , 101);\n\n } else {\n Log::info(\"INSIDE CARDS ADD\");\n\n $user_details = User::find($request->id);\n\n if(!$user_details) {\n\n throw new Exception(Helper::error_message(505), 505); \n\n }\n\n // Get the key from settings table\n \n $customer = \\Stripe\\Customer::create([\n \"card\" => $request->card_token,\n \"email\" => $user_details->email,\n \"description\" => \"Customer for \".Setting::get('site_name'),\n ]);\n\n \n\n if($customer) {\n\n $customer_id = $customer->id;\n\n $card_details = new Card;\n $card_details->user_id = $user_details->id;\n $card_details->customer_id = $customer_id;\n $card_details->card_token = $customer->sources->data ? $customer->sources->data[0]->id : \"\";\n $card_details->card_type = $customer->sources->data ? $customer->sources->data[0]->brand : \"\";\n $card_details->last_four = $customer->sources->data[0]->last4 ? $customer->sources->data[0]->last4 : \"\";\n\n $card_details->card_holder_name = $request->card_holder_name ?: $user_details->name;\n\n // Check is any default is available\n\n $check_card_details = Card::where('user_id', $request->id)->count();\n\n $card_details->is_default = $check_card_details ? 0 : 1;\n \n $card_details->save();\n\n if($user_details && $card_details->is_default) {\n\n $user_details->payment_mode = 'card';\n\n $user_details->card_id = $card_details->id;\n\n $user_details->save();\n }\n\n DB::commit();\n\n $data = [\n 'user_id'=>$request->id, \n 'id'=>$request->id, \n 'token'=>$user_details->token,\n 'card_id'=>$card_details->id,\n 'customer_id'=>$card_details->customer_id,\n 'last_four'=>$card_details->last_four, \n 'card_token'=>$card_details->card_token, \n 'is_default'=>$card_details->is_default\n ];\n\n $response_array = ['success' => true, 'message'=> tr('add_card_success'), \n 'data'=> $data];\n\n\n return response()->json($response_array);\n\n } else {\n\n throw new Exception( Helper::error_message(174) , 174);\n \n }\n\n }\n\n DB::commit();\n\n return response()->json($response_array , 200);\n\n } catch(Stripe_CardError $e) {\n\n Log::info(\"error1\");\n\n $error1 = $e->getMessage();\n\n $response_array = array('success' => false , 'error_messages' => $error1 ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch (Stripe_InvalidRequestError $e) {\n\n // Invalid parameters were supplied to Stripe's API\n\n Log::info(\"error2\");\n\n $error2 = $e->getMessage();\n\n $response_array = array('success' => false , 'error_messages' => $error2 ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch (Stripe_AuthenticationError $e) {\n\n Log::info(\"error3\");\n\n // Authentication with Stripe's API failed\n $error3 = $e->getMessage();\n\n $response_array = array('success' => false , 'error_messages' => $error3 ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch (Stripe_ApiConnectionError $e) {\n\n Log::info(\"error4\");\n\n // Network communication with Stripe failed\n $error4 = $e->getMessage();\n\n $response_array = array('success' => false , 'error_messages' => $error4 ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch (Stripe_Error $e) {\n\n Log::info(\"error5\");\n\n // Display a very generic error to the user, and maybe send\n // yourself an email\n $error5 = $e->getMessage();\n\n $response_array = array('success' => false , 'error_messages' => $error5 ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch (\\Stripe\\StripeInvalidRequestError $e) {\n\n Log::info(\"error7\");\n\n // Log::info(print_r($e,true));\n\n $response_array = array('success' => false , 'error_messages' => Helper::get_error_message(903) ,'error_code' => 903);\n\n return response()->json($response_array , 200);\n\n } catch(Exception $e) {\n\n DB::rollback();\n\n $error_message = $e->getMessage();\n\n $error_code = $e->getCode() ?: 101;\n\n Log::info(\"catch FUNCTION INSIDE\".$error_message);\n\n $response_array = ['success'=>false, 'error_messages'=> $error_message , 'error_code' => $error_code];\n\n return response()->json($response_array , 200);\n \n }\n\n }", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function omise_create_card()\n\t\t{\n\t\t\t$token = isset ( $_POST['omise_token'] ) ? wc_clean ( $_POST['omise_token'] ) : '';\n\n\t\t\tif ( empty( $token ) ) {\n\t\t\t\tOmise_Util::render_json_error( 'omise_token is required' );\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tif ( ! wp_verify_nonce($_POST['omise_nonce'], 'omise_add_card' ) ) {\n\t\t\t\tOmise_Util::render_json_error( 'Nonce verification failure' );\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$card = $this->customerCard->create($this->omise_customer_id, $token);\n\t\t\t\techo json_encode( $card );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'object' => 'error',\n\t\t\t\t\t'message' => $e->getMessage()\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "abstract public function getId();", "public function getObjectId() {}", "public function getObjectId() {}", "function createContract( $contract=null ){\n global $mysqli;\n if(!isset($contract) || $contract=='')\n return;\n $contract = $mysqli->real_escape_string($contract);\n $results = $mysqli->query(\"SELECT id FROM index_contracts WHERE contract='{$contract}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n $row = $results->fetch_assoc();\n return $row['id'];\n } else {\n $results = $mysqli->query(\"INSERT INTO index_contracts (contract) values ('{$contract}')\");\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create record in index_contracts table');\n }\n }\n } else {\n byeLog('Error while trying to lookup record in index_contracts table');\n }\n}", "public function getID() : string;", "public function getCard(): ?string\n {\n return $this->card;\n }", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "public function getOriginalId();", "function insertId();", "public function actionCardCreate()\n {\n $model = new InfoBlockCard();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->block_id]);\n }\n }", "public function getCardnumber()\n {\n return $this->cardnumber;\n }", "public function store(CardRequest $request)\n {\n $card = Card::create([\n 'name' => $request->name\n ]);\n\n return $card;\n }", "function mknewPerson($id) {\n $newID=uniqid (rand());\n //Wird zur Zeit nicht verwendet\n //if (!$id) {$uid='null';} else {$uid=$id;};\n $sql=\"insert into contacts (cp_name,cp_employee) values ('$newID',$id)\";\n $rc=$GLOBALS['dbh']->query($sql);\n if ($rc) {\n $sql=\"select cp_id from contacts where cp_name = '$newID'\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if ($rs) {\n $id=$rs[0][\"cp_id\"];\n } else {\n $id=false;\n }\n } else {\n $id=false;\n }\n return $id;\n}", "public function create(Request $request, $card_id)\n {\n $item = new Item();\n $item->card_id = $card_id;\n $this->authorize('create', $item);\n $item->done = false;\n $item->description = $request->input('description');\n $item->save();\n return $item;\n }", "public function intGetNewId() {\n $this->XaoThrow(\n \"_EntBase::Build(): This entity does not implement retrieval of a \".\n \"new numeric identifier as a descrite function. It may not be \" .\n \"applicable.\"\n , debug_backtrace()\n );\n }", "public function testGetCardById()\n {\n $card = factory('App\\Card')->create();\n\n $response = $this->actingAs($card->owner, 'api')\n ->withHeader('Accept', 'application/json')\n ->get(route('api.cards.show', $card->id));\n\n $response->assertOk();\n $response->assertJson([\n 'id' => $card->id,\n ]);\n\n $user = factory('App\\User')->create();\n $response = $this->actingAs($user, 'api')\n ->withHeader('Accept', 'application/json')\n ->get(route('api.cards.show', $card->id));\n\n $response->assertForbidden();\n $response->assertJsonStructure([\n 'error'\n ]);\n }", "public function projectCards(Request $request)\n {\n try{\n $input = $request->input();\n $validator = Validator::make($input, [\n 'project_id' => 'required',\n 'title' => 'required',\n ]);\n if ($validator->fails()){\n return redirect()->back()->withErrors($validator->errors())->withInput($input);\n }\n\n $cardModel = new Card();\n $cardModel->project_id = $input['project_id'];\n $cardModel->title = $input['title'];\n $cardModel->created_at = Carbon::now();\n $cardModel->save();\n /* $cardId = $cardModel->id;\n if($cardId > 0){\n $mediaIds = isset($input['media_id']) ? $input['media_id'] : '';\n if($mediaIds != ''){\n $mediaIds = explode(',', $mediaIds);\n $mediaArr = [];\n foreach ($mediaIds as $mediaId){\n if($mediaId != '' && $mediaId > 0){\n $mediaArr[] = array(\n 'card_id' => $cardId,\n 'media_id' => $mediaId,\n 'created_at' => Carbon::now()\n );\n }\n }\n if(count($mediaArr) > 0){\n CardFile::insert($mediaArr);\n }\n }\n }*/\n\n return redirect()->back();\n\n }catch (\\Exception $e){\n\n return redirect()->back()->withErrors($e->getMessage());\n }\n }", "function generateNewId(){\n\t\t$id = null;\n\t\t//while ( $this->getSessionData($id) !== null ){\n\t\t\t$id = rand(0,100000);\n\t\t//}\n\t\treturn $id;\n\t}", "public function getIdCardImg()\n {\n return $this->id_card_img;\n }", "protected function ensure_id()\n\t{\n\t\t$existing = $this->id();\n\t\t\n\t\tif(empty($existing))\n\t\t{\n\t\t\t$this->id(Tools_Storage::id());\n\t\t}\n\t\t\n\t\treturn $this->id();\n\t}", "public function create(\n string $name, \n string $email, \n string $phone, \n string $id_card\n ) : Model;", "public function getId(): ?int;", "public function update(CardRequest $request, Card $card)\n { \n /*$card = Card::find(1);\n $newCard = $card->replicate();\n $newCard->IdCardT = $request->newID;\n $newCard->IDCard = $request->newID;\n $newCard->push();*/\n\n $card = Card::find(19);\n $newCard = $card->replicate();\n $newCard->IdCardT = $card->IdCardT;\n $newCard->IDCard = $card->IdCardT;\n $newCard->push();\n\n $card->update($request->all()); \n return redirect()->route('card.index')->with('message','item has been updated successfully');\n }", "function createCard($account_id) {\n // final product looks like this: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_cards_buttons2\n\n $con = Connection::connect();\n $stmt = $con->prepare(\"select * from Account where account_ID = ? and active = 0\");\n $stmt->bindValue(1, $account_id, PDO::PARAM_INT);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($row != null) {\n return \"\";\n }\n\n $image = \"data:image/jpeg;base64, /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABQQEBkSGScXFycyJh8mMi4mJiYmLj41NTU1NT5EQUFBQUFBRERERERERERERERERERERERERERERERERERERET/2wBDARUZGSAcICYYGCY2JiAmNkQ2Kys2REREQjVCRERERERERERERERERERERERERERERERERERERERERERERERERET/wAARCAJYAlgDACIAAREBAhEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAEEAwIFBv/EACcQAQACAgEDBAIDAQEAAAAAAAABAgMRMQQSITJBUWETcSJCkVKB/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMAAAERAhEAPwD9UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAgqAAAAAAAgoD0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAAAAgAAD2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAKgAAAAAiiAAAAA9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAgCoAAAAAAIAAAAAAD2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAgAAAAAAICoAAAAAIKA9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkzEcgo426isceXKeptPEaBrGGc1593ibTPMg+huITuj5fPAfR3Eq+asWmOJB9EYYzXj3e46m0cxsGsca9RWefDrExPAKAAAAAAgAAAAAAAIAAAAAAACKAgGwAACQBA5AdAAAAAAAAAAAAAAAAAAAAAAAAAAASZ15kFeLXrTmXHJ1HtT/WeZmfMg7X6mZ9Phxm028z5QUAAAAAAAAAAFi018x4QBop1Mx6vLvW9b8SwLEzHmEH0Rmx9R7X/ANaImJ8wCoqAAAAAAAIqAAAAAAAIKCAAAAIqAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAA55csY4+wW+SKRuWPJkm/PHw82tNp3KKAAAAAAAAAAAAAAAAAAD3jyzTjj4eAG+mSLxuHp8+tprO4bMWWMkfaDoAAAACAAAAAAAAgAAAAIoAIqAAACAOoAAAAAAAAAAAAAAAAAAAAAAPN7RSNyDzkyRjj7YpmbTuVvebzuXlQAAAAAAAAAAAAAAAAAAAAAAWJms7jlAG7HkjJH29vn0vNJ3DdW0XjcIPSKgAAAAAAAIAAAAAioAAAAAigAgDqAAAAAAAAAAAAAAAAAAAAAAxZsnfOo4h3z5O2NRzLGAAoAAAAAAAAAAAAAAAAAAAAAACKCOuHJ2TqeJcgH0RxwZO6NTzDsgAAAAAAgAAAAAIKgAAAACKgAAOoAAAAAAAAAAAAAAAAAAACcK49Rftrr5BmyX77TLwCgAAAAAAAAAAAAAAAAAAAAAAioAAAAD3jv2WiW7l85s6e3dXXwg6gAAAIABsAEUBBUAAAABBUAABBQHUAAAAAAAAAAAAAAAAAAABiz27rfpsmdRt8+Z3OwQBQAAAAAAAAAAAAAAAAAAAAAAQAAAAAHXBbtt+3IideYB9ESJ3G/kQUEBUAARQQAAAAAEFAQABFAQAHYAAAAAAAAAAAAAAAAAAAHLPOqSxNXVT4iGUABQAAAAAAAAAAAAAAAAAABABUAAAAAAAABswTukOrP00+JhoQQAAEBQQFQAAAAQAABABdiAAAOwAAAAAAAAAAAAAAAAAAAMvVT5iGd36n1R+nBQAAAAAAAAAAAAAAAAAABAVAAAAAAAAAAEAaOm5lpZem9U/pqQAAAAEAAAAEAAAAASVQAAD9gA7AAAAAAAAAAAAAAAAAAAAydT6o/Tg0dTzDOoAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAIADv03qn9NTN03MtKAAAgAAAAgKgAAAJKpMgB5ABCQUQB3AAAAAAAAAAAAAAAAAAABn6qPESytvURun6YgAFAAAAAAAAAAAAAABAAAAAAAAAAAAQAAAaemjxMtDlgjVHVAQADYAAAgAAAAIAAAioAAAADuAAAAAAAAAAAAAAAAAAADzaO6Jj5fPfSYc9e28/fkHMBQAAAAAAAAAAAABAAAAAAAAAAARQBAAAdMNe68fXkGysdsRCiIKgAAAgAB+wABAA2AAAIAAHsAIA0AAAAAAAAAAAAAAAAAAAAOHU03Xu+HdJjcakHzh6vXtmYl5UAAAAAAAAAAAQFQAAAAAAAAAEFBAAAAGrp6ajfyzVr3TEQ3xGo1AACAAAgAqAAACAAAAioAAAIoCAA0AAAAAAAAAAAAAAAAAAAAAAz9Rj3HdHsyvosWXH2T9ewOYCgAAAAAAAAgAAAAAAAAAAgAqAAAA94qd869vcHbp6ajun3dzgQAAEVAAAEUBAAAABOQACQBFBAAQUBoAAAAAAAAAAAAAAAAAAAAAAeMlIvGpewHzrVms6lG3Ni743HLFMa8SoAAAAAgKIAAAAAAAAAAAgAAAAERsFiJtOobcdIpGnnFi7I3PLogqAAAAgAAACAAAIbVAAAAQFQABAFEAaQAAAAAAAAAAAAAAAAAAAAAAAHHNh7/McuyA+dMa8SNuTFF/2x2pNJ1KiAAAgAAAAAAAAAIAAAAAD1Ws3nUA8xG/DXixdnmeXrFiin3Py9oKgAAAgEgAAIAAHACAC/SAAIAoIAciAogAADSAAAAAAAAAAAAAAAAAAAAAAACAAJasWjUqAyZME1818w4voud8Nb/UgwjrfBavHmHNRAAAAAAAABAAAAdaYLW58Q0UxVp+wcMeCbeZ8Q01rFY1D0iABsAAENAAAACAqAAACAAAAIABIgKCAEgCCgNIAAAAAAAAAAAAAAAAAAAAACAAAAAAAA8Wx1tzD0A4W6aP6y5WwXj222APnzWY5hH0UmtZ5iAfPG78VfiD8VPgGEbvxUj2WK1jiIBgiszxG3SuC8/X7bAGevTR/aXatK14h6AQVAAAAAAQFSQAJABDYAAAkAAAAgAAASigIABIb90AABqAAAAAAAAAAAAAAAAAAAARUABJmI8yCjhfqYj0+We2S1+ZBrtlrXmXK3U/8AMf6zCjr+e+97dadTH9mUB9CtotxKvnxOvMOlc9o+0GwcK9THvGnSMtJ9wexInfCgAgAAAkzp4nLWPcHQZ7dTEcQ52z3n6BqtaK8zpxv1Mf1hmmd8ijp+e+97e69T/wBQzgNtctbe/l0fOe65LV4nwg2jhTqIn1eHaJieAUDkBCDYAAAgAAAAAIAiooIACoACAAH2A1AAAAAAAAAAAAAAAAAAAgBM6eMmWKc8/DJfLa/PHwDvk6iI8V8s1rTadyiKKioAAAAAAAAAsXtHEy8qD1+W/wAr+a/y5gPf5b/KTe0+8vIAAAAAioAAACAPVbTXzEomwasfURPiztt897plmnHANo8UyRfjn4e0AEAAARUAAARUAiQAAQAAANIAADWAAAAAAAAAAAAAAAACAOOXP2+K8vObN/Wv+swEzvzICgCAAAAAAAAAAAIAAAAAAACKAgAAAAgAAAABvU7hqxZu7xbllQH0BnxZv62/1oQA5QF0nKoBIACAAAAkqgCKbAQIAABrAAAAAAAAAAAAAAAAZs+b+tf/AF6z5e3+McsgACgioAAAAAAAAAgoCAAAAAAAACAAAAAAgAAAAAAIAA0Yc39bf+M4D6COOHL3fxnl2QDYAciALKCAogAAAgAAABADWAAAAAAAAAAAAAA8ZL9kbemLLk77b9vYHiZmZ3KAoAAgAAAAAAAAACKgAAAAAAAIAAAAACAAAAAAgKioAAAABE6nw2Uv312xvWO/bP17g2ofYgAAIqASAASgAAAQICgA1gAAAAAAAAAAAAkzryDj1F9R2xzLI9Xt32mXlQBAVAAAAAAAAAAAAQAAAAAAQFQAAAAQBUAAAAAEVAAAAAASQAAacF9x2/DsxUt2zts3uNwCiCAABIIAAACAoiggANgAAAAAAAAAAIA49RfVdfLsxZrd1p+vAOYCgioAAAAAAAAAAAIAAAAAAAIAAAAIAAAAAAAIAAAAAAgAAAAI1YLbjU+zK6Yrdtv2DYgIAIAAAACKgCoAAANgAAAAAAAAIAADze3bWZYGrqbaiI+WUBBVEAAAAAAAAEAUQAAAAAAARUAAAABFEAAAAABAVAAAAABAAAARUAAAbaW7oiXpx6e3jXw6oAAAigSioAqKCAAAA2AAAAAAAAgAAAMfUTu2vhyesk7tM/bwoAAAAAAAAAAAgAAAAAACKgAAAAAgAAAAAbEBUAAAAABAAAAQUBAAAB1wT/L9tLHSdWiWwAOBADaAKIAqAAAAANgAAAAACKgAACTOo2rxkn+M/oGFAUAAAAAAAAAQAAAAAABFQAAAABBQQAAAAABFQAAAEBUVANAAAAIqAAACADdHnyxNmP0x+gegEEUNgipsAAAAn4AAUbAEAABAAAAAAeMvol7eMvokGABQAAAAAAEAAAAAAAAQAAAAAJQAAAAAEBUAAAAABFQAAAEAAAAABAAAGzFP8IY2zH6YB7AQQAA+gAIDYIoigEgNoCACAAAAAAAOeX0S6OeX0SDCAoAAAAAAIAAAAAAACAAAASIAKgAAAAAAIAAACKIAAAACKgAAAACAAAANmP0wxtmP0wD2hyIHAICgASCKKIAAINoIAAAAAAAAA55fRL28ZfRIMICgAACAqAAAAAAigCAAAACACoAAAAAIAqAAAAigIAAAAioCoAAACAAAAAA2YvTDG2Y/TAPRIIAAACiSqScAAIAQA2AAAAAAAAIADxl9Evbxl9EgwgKAICoqAAAAAAAIAAAAACAAAAAAAAgAAAIoAgAAAAgLKAAAAIAAAAAAgDZj9MMbbi9MfoHpUEABQAAEP0gCoC+wQA1gAAAAAgAAADxm9EgDCAoAAgAAAAACAAAAAAACAAAAAAIAAAAACAAAAAAgAAAAAgAAACAAACteP0wAPYCAnIKAALsBBDQAv2Ao/9k=\";\n\n $user = User::fromID($account_id);\n $location = $user->formatCityAndState();\n if ($location == \"\") {\n $location = getApproximateLocation($account_id);\n }\n //$imageSrc = file_get_contents(\"http://corsair.cs.iupui.edu:22891/courseproject/image.php?account_id=\" . $account_id);\n //$imageSrc = \"http://corsair.cs.iupui.edu:22891/courseproject/image.php?account_id=\" . $account_id;\n\n return '<div class=\"w3-container\" style=\"display: inline-block; text-align: center; order: ' . $account_id . ';\">\n <div class=\"w3-card-4 w3-margin-bottom\">\n <header class=\"w3-container w3-pale-red\">\n <h3>'.$user->formatName().'</h3>\n </header>\n <div class=\"w3-container w3-text-grey w3-white\">\n <div class=\"w3-row-padding\">\n <div class=\"w3-third\">\n <div class = \"w3-padding-16\" style=\"position: relative; top: 50%;\">\n <img id=\"' . $account_id . '\" class=\"w3-circle w3-border\" src=\"' . $image . '\" style=\"width: 100%;\" alt=\"Avatar\">\n </div>\n <p style=\"margin:0.25em;\">' . getUserMentorshipPreference($account_id) . \" / \" . $user->formatGender() . '</p>\n </div>\n <div class=\"w3-twothird w3-small\" style=\"text-align: left;\">' . formatDegreesAndJobs(getDegrees($account_id), getJobs($account_id)) . '</div>\n </div>\n <hr>\n <p>' . $location . '</p>\n </div>\n <a class=\"w3-button w3-block w3-dark-grey\" href=\"profile.php?user=' . $account_id . '\">+ View Profile</a>\n </div></div>';\n}", "abstract public function getCard(int $card_id): ?array;", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();" ]
[ "0.6814749", "0.6467103", "0.62946606", "0.62833256", "0.6221153", "0.61916286", "0.6183408", "0.608761", "0.60657483", "0.6030497", "0.60106295", "0.5961464", "0.5938207", "0.5930469", "0.5923506", "0.5923506", "0.590853", "0.5901838", "0.5897588", "0.5874905", "0.5863559", "0.58577424", "0.58343154", "0.5812502", "0.5803712", "0.579571", "0.5778737", "0.57719034", "0.5756908", "0.57337505", "0.5719299", "0.56948334", "0.56933624", "0.56933624", "0.56933624", "0.5678753", "0.5673213", "0.56709754", "0.56477696", "0.5643342", "0.5643149", "0.56428903", "0.5633365", "0.5624433", "0.55958825", "0.5580886", "0.5580886", "0.55756205", "0.5574691", "0.556434", "0.5560558", "0.5550376", "0.553627", "0.5530588", "0.5528476", "0.55271643", "0.552484", "0.55200565", "0.55169946", "0.5507144", "0.550489", "0.55032617", "0.55023515", "0.55017847", "0.5501326", "0.5498702", "0.5498702", "0.54982746", "0.54888076", "0.54804903", "0.54726577", "0.54726577", "0.54726577", "0.5469854", "0.5464519", "0.5460764", "0.5459835", "0.54597133", "0.54580534", "0.5437775", "0.5437581", "0.5432566", "0.5429727", "0.5423012", "0.54228336", "0.5412826", "0.5407278", "0.5404806", "0.5399864", "0.5395068", "0.53926706", "0.5391543", "0.5391543", "0.5391543", "0.5391543", "0.5391543", "0.5391543", "0.5391543", "0.5391543", "0.5391543" ]
0.60592806
9
Get first card id from customer cards If Customer has cards will return first one or zero
public function getFirstCardId(int $user_id): int { return $this->where('user_id', $user_id)->first()->id ?? 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomerCardId(): ?string\n {\n if (count($this->customerCardId) == 0) {\n return null;\n }\n return $this->customerCardId['value'];\n }", "public function getIdCard()\n {\n return $this->id_card;\n }", "function getStripeCustomerId(){\n\n $getCusId = $this->common_model->getsingle(USERS,array('userId'=>$this->session->userdata('userId')));\n if($getCusId){\n return $getCusId->stripeCustomerId;\n }else{\n return FALSE;\n }\n\n }", "public function getFirstId() {\n return $this->id[0];\n }", "function get_by_id( $card_id )\n {\n $this->db->join('card_types', 'card_types.type_id=cards.type_id');\n $this->db->where('card_id', $card_id);\n $this->db->limit(1);\n return $this->db->get($this->table)->row();\n }", "public static function fakeCustomerId() {\n\t\t\t\n\t\t\t$lastCustomerId = Customer::select('customer_id')->orderBy('customer_id', 'desc')->take(1)->get()->first();\n\t\t\tif ($lastCustomerId == null) {\n\t\t\t\t$lastCustomerId = 0;\n\t\t\t}\n\t\t\treturn ++$lastCustomerId;\n\t\t}", "public function getCidCard()\n {\n return $this->cid_card;\n }", "function getCcInfoByCustId($customerid) {\n $query = \"SELECT * FROM `creditcards` WHERE CustomerId='\".$customerid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result[0];\n }\n }", "public function getCardNumber() : ?string ;", "public function getDefaultCardNumber() : ?string;", "public static function getCardReference($response, $last_digits = null)\n {\n // $data = (array)static::getData($response);\n if ($response->offsetExists('object') && $response->offsetGet('object') === 'card') {\n return $response->offsetGet('id');\n }\n\n if ($response->offsetExists('object') && $response->offsetGet('object') === 'customer') {\n $cards = $response->offsetGet('cards');\n $total = $cards['total'];\n if (1 == $total) {\n return $cards['data'][0]['id'];\n } else {\n if (!$last_digits) {\n foreach ($cards['data'] as $key => $card) {\n if ($last_digits == $card['last_digits']) {\n return $card->offsetGet('id');\n break;\n }\n }\n }\n }\n return null;\n }\n\n return null;\n }", "function getLastBookingIdByCustomerId($custId) {\n $query = \"SELECT `BookingId` FROM bookings WHERE CustomerId='$custId' ORDER BY BookingId DESC LIMIT 1\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result[0];\n }\n }", "public function getCardnumber()\n {\n return $this->cardnumber;\n }", "static function first() {\n list($record) = self::collection(null, \"id LIMIT 1\");\n return isset($record) ? $record : null;\n }", "public function getCardIdWithData(int $user_id, array $card_data)\n\t{\n\t\treturn $this->firstOrCreate(['user_id' => $user_id], $card_data)->id;\n\t}", "function jpid_next_customer_id() {\n\treturn JPID()->db_customers->get_next_id();\n}", "public function getFirst()\r\n {\r\n return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();\r\n }", "protected function _lookupCustomerId()\n {\n return $this->_customerFactory->create()\n ->loadByEmail($this->_quote->getCustomerEmail())\n ->getId();\n }", "abstract public function getCard(int $card_id): ?array;", "public function getCustomerId();", "public function getCustomerId();", "public function getCustomerId();", "function InfGetCreditCard($inf_contact_id, $inf_card_id) {\n\t$object_type = \"CreditCard\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$object->removeRestrictedFields(); // Remove CreditCard and CVV\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_card_id, 'ContactId' => $inf_contact_id, 'Status' => 3));\n\n $cards_array = array();\n foreach ($objects as $i => $object) {\n $cards_array = $object->toArray();\n }\n\treturn $cards_array; // Should only be one card\n}", "public function get_postcard_id() {\n return (int) $this->get_field( 'postcard' );\n }", "public function getCustomerId()\n {\n if (array_key_exists(\"customerId\", $this->_propDict)) {\n return $this->_propDict[\"customerId\"];\n } else {\n return null;\n }\n }", "public function getCustomerId(): ?string\n {\n if (count($this->customerId) == 0) {\n return null;\n }\n return $this->customerId['value'];\n }", "public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $this->bean->card;\n }", "public function getCardanoSpecific()\n {\n return $this->cardano_specific;\n }", "public function firstKey(): ?int;", "public function get_first_item_id(): int {\n\t\t\treturn LP_Course_DB::getInstance()->get_first_item_id( $this->get_id() );\n\t\t}", "public function getCard(): ?string\n {\n return $this->card;\n }", "protected function first()\n {\n foreach ($this->sortable as $key => $value) {\n if (is_numeric($key)) {\n return $value;\n }\n\n return $key;\n }\n\n return null;\n }", "public function getFirstCarItem()\n {\n $query = $this->createQueryBuilder('car')\n ->setMaxResults(1)\n ->getQuery();\n\n return $query->getSingleResult();\n }", "private function getRandomCustomer(): int {\n $rand_key = array_rand($this->customers, 1);\n return $this->customers[$rand_key];\n }", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function getCard()\n {\n return $this->card;\n }", "protected function k_CardId():string {return '';}", "public function getCustomerId()\n {\n $value = $this->get(self::customer_id);\n return $value === null ? (integer)$value : $value;\n }", "public function getCard() {\n return $this->card;\n }", "public function getCard(): bool {\n $result = $this->mysqli->query(\"SELECT * FROM cards WHERE id='{$this->id}'\");\n if($result->num_rows == 1) { # Card exists in database\n $card = $result->fetch_assoc();\n $this->cardNum = $card['card_num'];\n $this->name = $card['name'];\n $this->billingAddress = $card['billing_address'];\n $this->exp = $card['exp'];\n $this->securityCode = $card['security_code'];\n return true;\n } else { # Card doesn't exist yet\n return false;\n }\n }", "private function getCustomerId()\n {\n $customer_id = session('customer_id');\n\n return (int) $customer_id;\n }", "public function getCardFor(string $name): ?string\n {\n foreach ($this->getGroups() as $card => $group) {\n foreach ($group->fields as $field) {\n if (isset($field->id) && $field->id === $name) {\n return $card;\n }\n }\n }\n\n return null;\n }", "public function getIidCard()\n {\n return $this->iid_card;\n }", "final public static function awaitingForCustomerCardDetails()\n {\n return self::get(820);\n }", "public function getCustomerId(): ?int\n {\n return $this->customerId;\n }", "public static function getCardById($id)\n {\n\t\t$key = 'CardById_' . $id;\n\t\t$cache = Hapyfish_Cache_Memcached::getInstance();\n\t\t$card = $cache->get($key);\n\t\tif ($card === false) {\n\t\t\t//load from database\n\t\t\t$db = Hapyfish_Island_Dal_Card::getDefaultInstance();\n\t\t\t$card = $db->getCardById($id);\n\t\t\tif ($card) {\n\t\t\t\t$cache->add($key, $card, Hapyfish_Cache_Memcached::LIFE_TIME_ONE_MONTH);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $card;\n }", "public function getNextID()\n {\n try{\n //define the query to get the next ID\n $this->dbQuery = \"SELECT CustomerID FROM customer\n ORDER BY CustomerID DESC LIMIT 0,1\";\n \n $results = $this->dbObj->query($this->dbQuery);\n \n while($row = mysqli_fetch_array($results))\n {\n return $row['CustomerID'] +1;\n }\n }catch(Exception $e)\n {\n echo $e->getMessage();\n }\n }", "function get_first_row(){\n global $db;\n $query = \n ' SELECT cat_categoryID\n FROM categories\n LIMIT 1';\n $statement = $db->prepare($query);\n $statement->execute();\n $categories = $statement->fetchAll();\n $statement->closeCursor();\n foreach($categories as $category){ \n return $category['cat_categoryID'];\n }\n}", "protected function _getIdentifier()\n\t{\n\t\treturn $this->_getCookieValue(Df_PageCache_Model_Cookie::COOKIE_CUSTOMER, '');\n\t}", "public function getByCustomer($customer)\n {\n $company = $this->companyFactory->create();\n $this->resource->load($company, $customer, 'customer_id');\n if (!$company->getId()) {\n return null;\n }\n return $company->getId();\n }", "public function getCustomerId()\n {\n return Mage::getSingleton('customer/session')->getCustomerId();\n }", "public function getCustomerId()\n {\n return Mage::getSingleton('customer/session')->getCustomerId();\n }", "public function getDefaultCard(): ?string\n {\n return $this->defaultCard;\n }", "public function getCreditCardById($customer_id, $card_id)\n {\n \n // verify the required parameter 'customer_id' is set\n if ($customer_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $customer_id when calling getCreditCardById');\n }\n // verify the required parameter 'card_id' is set\n if ($card_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $card_id when calling getCreditCardById');\n }\n \n // parse inputs\n $resourcePath = \"/customer/{customer_id}/credit_card/{card_id}\";\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('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));\n \n \n \n // path params\n if ($customer_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"customer_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($customer_id),\n $resourcePath\n );\n }// path params\n if ($card_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"card_id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($card_id),\n $resourcePath\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 $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\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, '\\Tpaga\\Model\\CreditCard'\n );\n \n if (!$response) {\n return null;\n }\n\n return $this->apiClient->getSerializer()->deserialize($response, '\\Tpaga\\Model\\CreditCard', $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Tpaga\\Model\\CreditCard', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n \n return null;\n \n }", "protected function getCustomerId()\n {\n return $this->customerSession->getCustomer()->getId();\n }", "public function get_card(){ return $this->_card;}", "protected function extractCardID($oXPath)\n {\n $this->debug('Extracting cards ID.');\n\n $aXPathCardID = $oXPath->query('//a[@id=\"' . self::DIV_PREFIX . $this->sPrefix . '_discussionLink\"]/@href');\n foreach ($aXPathCardID as $sTmp) {\n return (int)trim(str_replace('/Pages/Card/Discussion.aspx?multiverseid=', '', $sTmp->nodeValue));\n }\n\n return;\n }", "function firstRecurringCharacter($numbers)\n{\n $numberHash = [];\n foreach ($numbers as $number) {\n if (array_key_exists($number, $numberHash)) {\n return $number;\n }\n\n $numberHash[$number] = null;\n }\n\n return null;\n}", "protected function getProfileId($_customer, $payment=null) {\r\n\t\tif( $this->_debug ) Mage::log('getProfileId()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$profile_id = $_customer->getAuthnetcimProfileId();\r\n\t\tif( intval($profile_id) < 1 ) {\r\n\t\t\t$profile_id\t= $this->createCustomerProfile( $_customer, $payment );\r\n\t\t}\r\n\t\t\r\n\t\treturn !empty($profile_id) ? $profile_id : 0;\r\n\t}", "function InfGetCreditCards($inf_contact_id) {\n\t$object_type = \"CreditCard\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$object->removeRestrictedFields(); // Remove CreditCard and CVV\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'Status' => 3));\n\n $cards_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, card_id\n\t\t$array = $object->toArray();\n $cards_array[$array['Id']] = $array;\n }\n\treturn $cards_array; // Maybe multiple cards\n}", "public function getCurrentCartIdentifier();", "public function getCurrentPrimaryContact(){\n\t\t$author = Author::select()->where('is_principal_contact', 1)->first();\n\n\t\treturn $author;\n\t}", "public function getIdCards($string)\n {\n preg_match(self::REG_ID_CARD, $string, $pgStrings, PREG_OFFSET_CAPTURE);\n if(!empty($pgStrings)){\n foreach ($pgStrings as $pgString) {\n if(!empty($pgString[0])) $results = $pgString[0];\n }\n return $results;\n }\n return false;\n }", "private function getMundipaggCardId($cardId)\n {\n if($cardId && $cardId != \"\") {\n $savedCreditcard = new Creditcard($this->openCart);\n $mundiPaggCreditcardId = $savedCreditcard->getCreditcardById($cardId);\n\n return $mundiPaggCreditcardId['mundipagg_creditcard_id'];\n }\n\n return false;\n }", "public function getFirst();", "function obtenerClienteID($cedula){\n\n $query = $this->db->get('cliente');\n if($query-> num_rows() > 0){\n\t \t\n $row = $query->row($cedula);\n\n\t\tif (isset($row))\n\t\t{\n \treturn $row->id;\n\t\t}\n \n\t }else return false ;\n\t \n\t}", "public function firstKey(): int|string|null\n {\n return array_key_first($this->data);\n }", "public function getDefaultCardIndex()\n {\n return $this->reel->aliases['_default'];\n }", "public function getFirst()\n {\n return 1;\n }", "public function getCustomerId()\n {\n return $this->customer_id;\n }", "public function getCustomerId()\n {\n return $this->customer_id;\n }", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "function customer_id($customer_id=null)\n {\n if (isset($customer_id)) $this->customer_id = intval($customer_id);\n return $this->customer_id;\n }", "protected function get_customer_id() {\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn null;\n\t\t}\n\t\t$current = get_current_user_id();\n\t\tif ( 0 == $current ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $current;\n\t}", "public function getStripeCustomerId() {\n return $this->stripe_customer_id;\n\n }", "public function customerId(): int\n {\n return $this->customerId;\n }", "function getCustomerIdByUsername($custusername){\n $query = \"SELECT CustomerId FROM `customers` WHERE username='\".$custusername.\"'\";\n $result = Database::selectQuery($query);\n \n if($result == null) {\n return null;\n } \n if(count($result) > 1){\n return \"Unexpected error\"; //shouldn't happen\n } else {\n return $result[0]['CustomerId'];\n }\n }", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "private function getCustomerId()\n {\n $customerSession = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\\Magento\\Customer\\Model\\SessionFactory::class);\n return $customerSession->create()->getId();\n }", "public function getCustomerId()\n {\n return $this->_customerSession->getCustomerId();\n }", "function getAssetId($asset=null){\n $id = false;\n if($asset == 'XCP'){\n $id = 1;\n } else if(substr($asset,0,1)=='A'){\n $id = substr($asset,1);\n } else {\n $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $array = str_split($asset);\n $n = 0;\n for ($i = 0; $i < count($array); $i++) { \n $n *= 26;\n $n += strpos($chars, $array[$i]);\n }\n $id = $n;\n }\n return $id;\n}", "public function first()\n {\n if ($this->getNumParts() < 1) {\n return null;\n }\n\n return $this->identifierParts[0];\n }", "public function showSingle(Card $card){\n \t//$card= Card::with('notes.user')->find(1); \n\n \t$card->load('notes.user');\n \t//return $card;\n\n \t//return $card->notes[0]; //n+1 problem will occur here is the number of loop and the nuber of quary will hit\n \treturn view('cards.showSingle', compact('card'));\n\n //return $card->notes[0]->user;\n\n //return $card;\n }", "function getCustomerID($userID) {\n $customerModel = $this->loadModel('Customers');\n $query = $customerModel->find()->select('id')->where([\n 'user_id' => $userID\n ])->first();\n return $query->id;\n }", "public function getCustomerId() {\n return $this->customerID;\n }", "function card_get(){\n\t\tif ($this->get('idspbu') == NULL){\n\t\t\t$this->response(array( 'status' => \"ID SPBU not found\" ), 408);\n\t\t} else {\n\t\t\t$param['id_spbu'] = $this->get('idspbu');\n\t\t\t$param['id_pelanggan'] = $this->get('idpelanggan');\n\t\t\t$param['id_card'] = $this->get('idcard');\n\t\t\t$param['nik'] = $this->get('nik');\n\t\t\t\n\t\t\t$response = $this->rest_model->getCard($this->get('idspbu'), $param);\n\t\t\tif(!empty($response)){\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"NULL\" ), 406);\n\t\t\t}\n\t\t}\n\t}", "protected function getCustomerId()\n {\n $_customerSession = Mage::getSingleton('customer/session');\n \n if ($_customerSession->isLoggedIn())\n return $_customerSession->getCustomer()->getId();\n\n return false;\n }", "public function getCard(): ?bool\n {\n return $this->card;\n }", "function get_primarybuyercontact($custID, $shiptoID = false, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('custindex');\n\t\t$q->limit(1);\n\t\t$q->where('custid', $custID);\n\t\tif (!empty($shiptoID)) {\n\t\t\t$q->where('shiptoid', $shiptoID);\n\t\t}\n\t\t$q->where('buyingcontact', 'P');\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\t$sql->setFetchMode(PDO::FETCH_CLASS, 'Contact');\n\t\t\treturn $sql->fetch();\n\t\t}\n\t}", "public function getCardReference()\n {\n return $this->data->creditCard->token;\n }", "public static function getFirstName($_cID) {\n global $lC_Database;\n \n $Qfirst = $lC_Database->query('select customers_firstname from :table_customers where customers_id = :customers_id');\n $Qfirst->bindTable(':table_customers', TABLE_CUSTOMERS);\n $Qfirst->bindInt(':customers_id', $_cID);\n $Qfirst->execute();\n \n $first = $Qfirst->value('customers_firstname');\n\n $Qfirst->freeResult();\n \n return $first;\n }", "public function fetch_next_bill() {\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '=', $this->monthrefdate)\n ->where('monthseqnumber', '>', $this->monthseqnumber)\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n if ($next_bill != null) {\n return $next_bill;\n }\n\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '>', $this->monthrefdate)\n ->orderBy('monthrefdate', 'asc')\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n return $next_bill;\n}", "public function getCustomerId($api_key) {\n $stmt = $this->conn->prepare(\"SELECT customer_id FROM customer WHERE api_key = ?\");\n $stmt->bind_param(\"s\", $api_key);\n if ($stmt->execute()) {\n $stmt->bind_result($customer_id);\n $stmt->fetch();\n // TODO\n // $user_id = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $customer_id;\n } else {\n return NULL;\n }\n }" ]
[ "0.7004446", "0.6583274", "0.6259025", "0.6205459", "0.6143456", "0.61394405", "0.6013545", "0.5980387", "0.5968282", "0.5800017", "0.5797028", "0.5795271", "0.5794025", "0.57341415", "0.5709224", "0.5704326", "0.5697719", "0.56567776", "0.5654156", "0.5653232", "0.5653232", "0.5653232", "0.5647494", "0.5646581", "0.56442595", "0.5642947", "0.56305426", "0.56248295", "0.55987763", "0.5582386", "0.5571988", "0.5570263", "0.55613387", "0.55567837", "0.5548248", "0.5543169", "0.5538994", "0.55292124", "0.55108374", "0.55106133", "0.55016696", "0.549093", "0.5486706", "0.548483", "0.5476344", "0.5468789", "0.54647005", "0.5455731", "0.545466", "0.5443926", "0.5443498", "0.5443498", "0.5436733", "0.54352957", "0.5417554", "0.5416348", "0.5405714", "0.54006416", "0.5395289", "0.5392841", "0.53859264", "0.53787065", "0.5377791", "0.5370278", "0.53690255", "0.5366631", "0.53602976", "0.53595287", "0.5349625", "0.53389275", "0.53389275", "0.5334248", "0.5330588", "0.5324205", "0.53211784", "0.53181523", "0.53164417", "0.5311032", "0.5311032", "0.5311032", "0.5311032", "0.5311032", "0.5311032", "0.5311032", "0.5311032", "0.53097004", "0.53062886", "0.5305435", "0.52990526", "0.5298319", "0.52885777", "0.5284977", "0.5282767", "0.52710307", "0.5262944", "0.5250885", "0.5248591", "0.52479845", "0.52461493", "0.5245984" ]
0.6914502
1
Receive and wait for messages from queue
function startQueue(){ // Maintain the array checkLogQ as a FIFO buffer with length 4. // When a new entry is added, remove oldest entry and shuffle. function addCheckLog($message){ global $checkLogQ; $length = 4; // If checkLogQ size is smaller than 4 add the message if(count($checkLogQ)<$length){ $checkLogQ[] = $message; } // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one else{ array_shift($checkLogQ); $checkLogQ[] = $message; } } // Prints all checkLogQ messages to the console function printCheckLogQ(){ global $checkLogQ; foreach($checkLogQ as $message){ print($message); } $checkLogQ = array(); // reset a variable to an empty array } try{ while(true){ addCheckLog(date('Y/m/d H:i:s')." Awaiting a message...\n"); // Receive messages from queue, maximum waits for 20 seconds for message // receive_request - contain all the queue messages global $sqs; $receive_request = $sqs->receiveMessage(array( 'QueueUrl' => ds_config("QUEUE_URL"), 'WaitTimeSeconds' => 20, 'MaxNumberOfMessages' => 10 )); // Count the amount of messages received $msgCount = 0; if($receive_request->getPath('Messages') !== NULL){ $msgCount = count($receive_request->getPath('Messages')); } addCheckLog(date('Y/m/d H:i:s')." found $msgCount message(s)\n"); // If at least one message has been received if ($msgCount!=0) { printCheckLogQ(); foreach ($receive_request->getPath('Messages') as $msg) { messageHandle($msg, $receive_request); } } } } catch (Exception $e) { printCheckLogQ(); print(date('Y/m/d H:i:s')." Queue receive error: $e"); sleep(5); global $restart; $restart = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listen()\n {\n $this->open();\n $callback = function(AMQPMessage $message) {\n $job = $this->unserialize($message->body);\n if ($this->getQueue()->run($job)) {\n $message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);\n }\n };\n $this->_channel->basic_qos(null, 1, null);\n $this->_channel->basic_consume($this->queueName, '', false, false, false, false, $callback);\n while(count($this->_channel->callbacks)) {\n $this->_channel->wait();\n }\n }", "public function processMessages() {\n while ( ( $execution = array_shift($this->queue) ) ) { \n $execution->event('continue');\n $this->messagesDelivered++;\n }\n }", "private function ProcessPendingMessages() {\n\t\twhile($message = $this->GetRedisConn()->rPop($this->GetChannel())) {\n\t\t\t$this->ProcessMessage($message);\n\t\t}\n\t}", "public function consumeQueue()\n {\n try {\n $queue = Di::getDefault()->get('queue');\n\n /** @var \\Aws\\Result $messages*/\n $messages = $this->getMessagesFromQueue($queue);\n\n if (count($messages->get('Messages')) == 0) {\n return;\n }\n\n $queueName = (new QueueService())->getFullQueueName('notifications');\n foreach ($messages->get('Messages') as $message) {\n $idList = json_decode($message['Body'], true);\n\n if (!empty($idList)) {\n $this->trySendNotificationsFromMessage($idList);\n }\n\n $queue->deleteMessage([\n 'QueueUrl' => $queue->getQueueUrl(['QueueName' => $queueName])->get('QueueUrl'),\n 'ReceiptHandle' => $message['ReceiptHandle'],\n ]);\n }\n } catch (AwsException $e) {\n Di::getDefault()->get('logger')->error($e->getMessage());\n } catch (\\Exception $e) {\n // Do nothing\n } catch (\\Throwable $e) {\n // Do nothing\n }\n\n sleep(5);\n $this->consumeQueue();\n }", "protected function processMessages()\n {\n while ($done = curl_multi_info_read($this->multiHandle)) {\n $request = $this->resourceHash[(int)$done['handle']];\n $this->processResponse($request, $this->handles[$request], $done);\n }\n }", "public function receive(): void\n {\n $connection = $this->getConnection();\n $node = $connection->getCurrentNode();\n\n do {\n $this->_run($node);\n } while (\n false === $connection->isDisconnected() &&\n true !== $node->isMessageComplete()\n );\n }", "public function listen()\n {\n $this->log->addInfo('Begin listen routine');\n \n $connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');\n $channel = $connection->channel();\n \n $channel->queue_declare(\n 'invoice_queue', #queue\n false, #passive\n true, #durable, make sure that RabbitMQ will never lose our queue if a crash occurs\n false, #exclusive - queues may only be accessed by the current connection\n false #auto delete - the queue is deleted when all consumers have finished using it\n );\n \n /**\n * don't dispatch a new message to a worker until it has processed and \n * acknowledged the previous one. Instead, it will dispatch it to the \n * next worker that is not still busy.\n */\n $channel->basic_qos(\n null, #prefetch size - prefetch window size in octets, null meaning \"no specific limit\"\n 1, #prefetch count - prefetch window in terms of whole messages\n null #global - global=null to mean that the QoS settings should apply per-consumer, global=true to mean that the QoS settings should apply per-channel\n );\n \n /**\n * indicate interest in consuming messages from a particular queue. When they do \n * so, we say that they register a consumer or, simply put, subscribe to a queue.\n * Each consumer (subscription) has an identifier called a consumer tag\n */ \n $channel->basic_consume(\n 'invoice_queue', #queue\n '', #consumer tag - Identifier for the consumer, valid within the current channel. just string\n false, #no local - TRUE: the server will not send messages to the connection that published them\n false, #no ack, false - acks turned on, true - off. send a proper acknowledgment from the worker, once we're done with a task\n false, #exclusive - queues may only be accessed by the current connection\n false, #no wait - TRUE: the server will not respond to the method. The client should not wait for a reply method\n array($this, 'process') #callback\n );\n \n $this->log->addInfo('Consuming from queue');\n \n while(count($channel->callbacks)) {\n $this->log->addInfo('Waiting for incoming messages');\n $channel->wait();\n }\n \n $channel->close();\n $connection->close();\n }", "public function processQueue ()\n {\n $lastRestartTime = $this->getLastRestartTime();\n $app = Application::getInstance();\n\n while ( true ) {\n //check if the code is updated in between the run time\n $this->needsRestart($lastRestartTime);\n\n //check if the system is down for maintenance\n if ( $app->isDownForMaintenance() ) continue;\n\n //get all pending events for the period\n $events = $this->getPendingEvents();\n\n foreach ( $events as $event ) {\n $event->start_time = DateUtil::getDateTime();\n\n //no event is registered for the given record\n $handler = $event->event_detail;\n if ( !$handler ) {\n $this->saveEvent($event);\n continue;\n }\n\n //set event to broadcast of its event\n event(new EventQueueRaised($event));\n\n //process the job mentioned with the event\n $this->dispatchEventJob($event);\n\n //dispatch notification if any attached to the event\n $this->dispatchNotificationJob($event);\n\n //save the given event with necessary datetime params\n $this->saveEvent($event);\n }\n\n //check if the program has to sleep or not\n if ( !sizeof($events) ) $this->rest();\n\n Cache::forever($this->identifier, false);\n }\n }", "public function runQueue();", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "public function getQueue();", "public function getQueue();", "public function Poll(){\n\n\t\t$myEppServer = new EppServer();\n\t\tif(DEBUG_lEVEL >=5){ print \"<p>Starting Connection</p>\";}\n\t\t$myEppServer->Start();\n\t\t$flag = 0;\t\t\t\t\t\t\n\t\twhile ($flag != 1){\n\t\t\t\t$TransactionID = $myEppServer->Chat($this->xmlPoll());\n\t\t\t\t$resultcode = $myEppServer->ResultCode();\n\t\n\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>Result code: $resultcode</p>\";}\n\t\t\t\n\t\t\t\t\tif ($resultcode == 1300){\n\t\t\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>There are no messages in the queue</p>\";}\n\t\t\t\t\t\tprint \"<p>There are no messages in the queue</p>\";\n\t\t\t\t\t\t$flag =1;\n\n\t\t\t\t\t}elseif ($resultcode == 1301){\n\t\t\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>There are messages</p>\";}\n\t\t\t\t\t\t$EPPID = $this->xmlPollProcess($myEppServer->OutXML, $TransactionID);\n\t\t\t\t\t\t\tprint \"<p>Loading Message</p>\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>ACK message</p>\";}\n\t\t\t\t\t\t\t$myEppServer->Chat($this->xmlAck($EPPID));\n\t\t\t\t\t\t\t$resultcode2 = $myEppServer->ResultCode();\n\t\t\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>ACK Result Code: $resultcode2</p>\";}\n\t\t\t\t\t\t\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(DEBUG_lEVEL >=5){ print \"<p>Failed due to an unknown Error</p>\";}\n\t\t\t\t\t\t$flag =1;\n\t\t\t\t\t}\n\t\t}\n\t\t$myEppServer->Stop();\n\t\tif(DEBUG_lEVEL >=5){ print \"<p>Stopping Connection</p>\";}\n\t}", "public function getReceivedMessages();", "public function listen(): void\n {\n $this->logger->debug('Start listening to the queue.');\n $handler = function (MessageInterface $message) {\n $this->worker->process($message, $this);\n };\n\n $this->driver->subscribe($handler);\n $this->logger->debug('Finish listening to the queue.');\n }", "protected function PollJobs() {\n\n\t\tforeach($this->_running_queue as $i=>$rjob) {\n\t\t\techo (\"Index is $i<br/>\");\n\t\t\t//job finished?\n\t\t\t$status = $this->JobPollAsync($rjob);\n\t\t\tif ($status === false) {\n\t\t\t\t$this->LogEntry(\"Status is false for job $i and slots are \" . $this->_slots .\"<br/>\");\n\t\t\t\tunset($this->_running_queue[$i]);\n\t\t\t\t$this->_finished_count++;\n\t\t\t\tif (count($this->_waiting_queue)) {\n\t\t\t\t\t$this->LogEntry(\"Adding a job because finish count is \" . $this->_finished_count . \" and job count is \" . $this->_job_count . \" so slot count becomes \" . $this->_slots +1 . \"<br/>\");\n\t\t\t\t\t$this->_slots++;\n\t\t\t\t} else {\n\t\t\t\t\t$this->LogEntry(\"Finish count is ! < job count and slots are \" . $this->_slots. \"<br/>\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->LogEntry(\"Status of job $i is $status\\n\");\n\t\t\t}\n\t\t}\n\t}", "private function receiveMessages(): array\n {\n $result = SqsClient::instance()->receiveMessage(\n [\n 'AttributeNames' => ['SentTimestamp'],\n 'MaxNumberOfMessages' => 1,\n 'MessageAttributeNames' => ['All'],\n 'QueueUrl' => $this->getSqsUrl(),\n 'WaitTimeSeconds' => 20,\n ]\n );\n\n $messages = $result->get('Messages');\n if (isset($messages) === true) {\n return $messages;\n }\n\n return [];\n }", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function receive()\n {\n $messages = array();\n\n if (apcu_exists($this->key)) {\n $messages = apcu_fetch($this->key);\n apcu_delete($this->key);\n }\n\n return $messages;\n }", "public function run()\n {\n $quit = false;\n while (!$quit)\n {\n \\Mutex::lock($this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Cond::wait($this->thread_cond, $this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Mutex::unlock($this->thread_mutex);\n continue;\n }\n }\n $reqs = array();\n while (count($this->req_queue) > 0 and count($reqs) < 10)\n {\n $m = $this->req_queue->shift();\n if ($m[0] == 'stop')\n {\n $quit = true;\n break;\n }\n $reqs[] = array($m[1], $m[2], $m[3], $m[4]);\n }\n \\Mutex::unlock($this->thread_mutex);\n if (count($reqs) > 0)\n $this->pubbatch($reqs);\n }\n }", "public function dequeue();", "abstract public function receive();", "public function run()\n {\n while (($payload = array_shift($this->payloads)) !== null) {\n list($ttr, $message) = $payload;\n $this->startedId = $this->finishedId + 1;\n $this->handleMessage($this->startedId, $message, $ttr, 1);\n $this->finishedId = $this->startedId;\n $this->startedId = 0;\n }\n }", "public function receive();", "function read_messages_from_queue($queue_url, $region, $queue_name)\n {\n $sqs_client = new Aws\\Sqs\\SqsClient([\n 'version' => 'latest',\n 'region' => \"$region\"\n ]);\n\n try\n {\n $sqs_msgs = $sqs_client->receiveMessage([\n 'QueueUrl' => $queue_url\n ]);\n return $sqs_msgs;\n }\n catch(\\Aws\\Sqs\\Exception\\SqsException $sqs_exception)\n {\n echo \"Failed to read message to queue: $queue_name, \" . $sqs_exception->getMessage() . \"\\n\";\n exit(1);\n }\n }", "public function receiveNoWait()\n {\n if ($this->currentEnvelope) {\n throw new \\RuntimeException(\n 'AmqpQueueDriver: This driver has a message that was not acknowledged yet. A message must be processed and acknowledged before receiving new messages.'\n );\n }\n\n $this->dequeueingTimeMs = 0;\n\n $this->currentEnvelope = $this->queue->get();\n\n $msg = null;\n\n if (!$this->currentEnvelope) {\n return null;\n }\n\n $start = microtime(true);\n $deserializationContext = new DeserializationContext();\n\n try{\n /** @var QueueMessageInterface $msg */\n $msg = $this->getSerializer()->deserialize($this->currentEnvelope->getBody(), SerializableInterface::class, $this->format, $deserializationContext);\n } catch (\\Exception $exception) {\n $this->getExceptionHandler()($exception, ['headers' => $this->currentEnvelope->getHeaders(), 'body' => $this->currentEnvelope->getBody()]);\n $this->ack();\n return null;\n }\n foreach ($this->currentEnvelope->getHeaders() as $header => $value) {\n $msg->setHeader($header, $value);\n }\n\n // Calculate how long it took to deserilize the message\n $this->dequeueingTimeMs = (int) ((microtime(true) - $start) * 1000);\n\n return $msg;\n }", "public function run()\n {\n $this->openWorker();\n while (($payload = $this->pop(0)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n $this->closeWorker();\n }", "protected abstract function receive();", "public function Run()\n\t{\n\t\t$q1 = new AMQPQueue($this->cnn);\n\t\t$q1->declare('queue1');\n\t\t$q1->purge('queue1');\n\t\t\n\t\t$options = array(\n\t\t 'min' => 0,\n\t\t 'max' => 10,\n\t\t 'ack' => true\n\t\t);\n\n\t\t// Bind it on the exchange to routing.key\n\t\t$q1->bind(\\Constant\\AMQPChannelConstant::AMF, \\Constant\\AMQPCommand::BingoBroadcast);\n\t\t\n\t\t// Read from the queue\n\t\twhile (TRUE)\n\t\t{\n\t\t\t$msg = $q1->consume($options);\n\n\t\t\tvar_dump($msg);\n\t\t}\n\t}", "abstract function receive();", "public function receive()\n\t{\n\t\t$payloads = parent::receive();\n\t\t\n\t\t// If the latest payload(s) are received, clear the buffer. We don't need that copy any more.\n\t\tif ($payloads)\n\t\t\t$this->received = array();\n\n\t\t// Return the latest received payloads\n\t\treturn $payloads;\n\t}", "public function startDownload()\n {\n // use RabbitMQ for send queue.\n $this->channel->queue_declare('downloader', 'fanout', false, false, false);\n\n $callback = function($msg) {\n echo \" [x] Received \", $msg->body, \"\\n\";\n sleep(1);\n\n // print_r($msg::get_properties());\n\n\n $id = new ImageDownloader($msg);\n try\n {\n $queue = $id->download();\n }\n catch (\\Exception $e)\n {\n $queue = new Queue($msg->body);\n $queue->setStatus(Queue::FAILED);\n }\n\n\n // exchange w messenger for save status.\n $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);\n };\n\n $this->channel->basic_qos(null, 1, null);\n $this->channel->basic_consume('downloader', '', false, true, false, false, $callback);\n\n while(count($this->channel->callbacks)) {\n $this->channel->wait();\n }\n\n // return $queue;\n }", "public abstract function receive();", "public function listen($queueName);", "public function grabMessageFromQueue($queue) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabMessageFromQueue', func_get_args()));\n }", "public function grabMessageFromQueue($queue) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabMessageFromQueue', func_get_args()));\n }", "function msgsrv_receive($callback, $timeout = 30000 , $link = null) {}", "function check_message_status($messageId){\n global $platform;\n try {\n $endpoint = \"/restapi/v1.0/account/~/extension/~/message-store/\".$messageId;\n $resp = $platform->get($endpoint);\n $jsonObj = $resp->json();\n print(\"Message status: \" . $jsonObj->messageStatus . PHP_EOL);\n if ($jsonObj->messageStatus == \"Queued\"){\n sleep(2);\n check_message_status($jsonObj->id);\n }\n } catch (\\RingCentral\\SDK\\Http\\ApiException $e) {\n exit(\"Error message: \" . $e->message . PHP_EOL);\n }\n}", "public function receive($queue, $interfaceConfig, $options)\n {\n $this->init($interfaceConfig);\n\n self::$conn->subscribe(\"/queue/\" . $queue);\n\n $result = new ArrayList();\n $count = 0;\n $limit = ($options && isset($options[\"limit\"])) ? $options[\"limit\"] : 0;\n while ((!$limit || $count < $limit) && ($frame = self::$conn->readFrame())) {\n $result->push(new MessageFrame($frame->body, $frame->headers, $queue));\n self::$conn->ack($frame);\n $count++;\n }\n\n self::$conn->unsubscribe($queue);\n\n return $result;\n }", "public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }", "public function run(): void\n {\n $this->logger->debug('Start processing queue messages.');\n $count = 0;\n\n while ($this->loop->canContinue() && $message = $this->driver->nextMessage()) {\n $this->worker->process($message, $this);\n $count++;\n }\n\n $this->logger->debug(\n 'Finish processing queue messages. There were {count} messages to work with.',\n ['count' => $count]\n );\n }", "public function consumeItemFromQueue(){\n $record = $this->storageEngine->getNextQueueItemToProcess();\n if($record){\n return $record;\n }\n return -1; //will cause the worker to sleep\n }", "public function receiveMessages($queueId, $max = 1, $options = null);", "public function waitPush()\n {\n sleep(7);\n\n return 0;\n }", "function process_mail_queue()\n\t{\n\t\t//-----------------------------------------\n\t\t// SET UP\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->vars['mail_queue_per_blob'] = isset($this->vars['mail_queue_per_blob']) ? $this->vars['mail_queue_per_blob'] : 5;\n\t\t\n\t\t$this->cache['systemvars']['mail_queue'] = isset( $this->cache['systemvars']['mail_queue'] ) ? intval( $this->cache['systemvars']['mail_queue'] ) : 0;\n\t\t\n\t\t$sent_ids = array();\n\t\t\n\t\tif ( $this->cache['systemvars']['mail_queue'] > 0 )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Require the emailer...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\trequire_once( ROOT_PATH . 'sources/classes/class_email.php' );\n\t\t\t$emailer = new emailer(ROOT_PATH);\n\t\t\t$emailer->ipsclass =& $this;\n\t\t\t$emailer->email_init();\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Get the mail stuck in the queue\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_queue', 'order' => 'mail_id', 'limit' => array( 0, $this->vars['mail_queue_per_blob'] ) ) );\n\t\t\t$this->DB->simple_exec();\n\t\t\t\n\t\t\twhile ( $r = $this->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$data[] = $r;\n\t\t\t\t$sent_ids[] = $r['mail_id'];\n\t\t\t}\n\t\t\t\n\t\t\tif ( count($sent_ids) )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Delete sent mails and update count\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cache['systemvars']['mail_queue'] = $this->cache['systemvars']['mail_queue'] - count($sent_ids);\n\t\t\t\t\n\t\t\t\t$this->DB->simple_exec_query( array( 'delete' => 'mail_queue', 'where' => 'mail_id IN ('.implode(\",\", $sent_ids).')' ) );\n\t\t\t\n\t\t\t\tforeach( $data as $mail )\n\t\t\t\t{\n\t\t\t\t\tif ( $mail['mail_to'] and $mail['mail_subject'] and $mail['mail_content'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$emailer->to = $mail['mail_to'];\n\t\t\t\t\t\t$emailer->from = $mail['mail_from'] ? $mail['mail_from'] : $this->vars['email_out'];\n\t\t\t\t\t\t$emailer->subject = $mail['mail_subject'];\n\t\t\t\t\t\t$emailer->message = $mail['mail_content'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $mail['mail_html_on'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$emailer->html_email = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$emailer->html_email = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$emailer->send_mail();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No mail after all?\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cache['systemvars']['mail_queue'] = 0;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Update cache with remaning email count\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->update_cache( array( 'array' => 1, 'name' => 'systemvars', 'donow' => 1, 'deletefirst' => 0 ) );\n\t\t}\n\t}", "public function processQueue()\n {\n $gate_arr = config('gates');\n foreach ($gate_arr as $gate_item) {\n $this->sendSmsOne($gate_item['name']);\n }\n }", "public function getMessagesAndFlush() {}", "public function receiveData()\n {\n while (false !== ($data = socket_read($this->socket, 512))) {\n if ($data === '') {\n $this->reactor->removeReader($this->socket);\n \n call_user_func($this->callback, Response::fromString($this->buffer));\n return;\n }\n \n $this->buffer .= $data;\n }\n }", "protected function startRequestsFromQueue()\n {\n while (\n !$this->requestQueue->isEmpty() &&\n // Either start all when no maximum set, or only till maximum is reached.\n ($this->number_parallel == 0 || $this->countActive() < $this->number_parallel)\n ) {\n $request = $this->requestQueue->next();\n $request->setState(RequestInterface::STATE_TRANSFER);\n $handle = $this->createCurlHandle($request)->getHandle();\n $this->checkCurlResult(curl_multi_add_handle($this->multiHandle, $handle));\n }\n }", "public function receiveNoWait(): ?Message;", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "abstract public function readMessageEnd();", "protected function readAll() {\n while ($info = curl_multi_info_read($this->mh)) {\n $ch = $info['handle'];\n $uid = (int)$ch;\n $request = $this->requests[$uid];\n $this->detach($request);\n $this->eventManager->notify('complete', array($this, $request));\n }\n }", "public function get()\n {\n $result = $this->sqs_client->ReceiveMessage([\n 'QueueUrl' => 'https://sqs.us-east-1.amazonaws.com/947603853016/rs-video-harvester.fifo'\n ]);\n\n return TRUE;\n }", "public function dequeue($timeout=false);", "public function fetchMessageFromQueue()\n {\n $whereParams = [\n 'status' => 'PENDING',\n ];\n $orderBy = 'attempts';\n return $this->db->first($this->table, $whereParams, $orderBy);\n\n }", "public function receive($maxMessages=null, $timeout=null, Zend_Queue $queue=null)\n {\n if ($maxMessages === null) {\n $maxMessages = 1;\n }\n\n if ($timeout === null) {\n $timeout = self::RECEIVE_TIMEOUT_DEFAULT;\n }\n if ($queue === null) {\n $queue = $this->_queue;\n }\n\n $msgs = array();\n if ($maxMessages > 0 ) {\n for ($i = 0; $i < $maxMessages; $i++) {\n \t$job = $this->_pheanstalk->watch($queue->getName())->reserve();\n $data = array(\n 'handle' => $job,\n 'body' => $job->getData(),\n );\n $msgs[] = $data;\n }\n }\n\n $options = array(\n 'queue' => $queue,\n 'data' => $msgs,\n 'messageClass' => $queue->getMessageClass(),\n );\n\n $classname = $queue->getMessageSetClass();\n if (!class_exists($classname)) {\n require_once 'Zend/Loader.php';\n Zend_Loader::loadClass($classname);\n }\n return new $classname($options);\n }", "public function waitEmptyBuffer($queueEmpty)\n {\n if($queueEmpty == 0) {\n sleep(5);\n }\n }", "public function getMessageQueue()\n\t{\n\t\treturn $this->messages;\n\t}", "public function emailQueue() {\n\t\t$this->EmailQueue->processQueue(); exit;\n\t}", "public function execute()\n {\n foreach ($this->queue->pull(1000) as $message) {\n $this->process($message)->delete();\n }\n }", "public function wait()\n {\n register_shutdown_function(array($this, 'close'));\n while (count($this->ch->callbacks)) {\n $this->ch->wait();\n }\n }", "public static function readNotificationQueue() {\n global $wpdb;\n //TODO\n // 1- Add user_id field to token table\n // 2- if the notification isn't an admin\n //TODO Use This when There is a user Id with multiple tokens\n $tokens = [];\n $table = self::getQueueTableName();\n $query = \"SELECT * FROM $table WHERE `is_sent` = 0 LIMIT 100\";\n //Admin Notifications\n $results = $wpdb->get_results($query);\n if(count($results) < 1) {\n return 0;\n }\n else {\n foreach ($results as $result) {\n $token_id = $result->token_id;\n $token = KibarToken::getTokenByID($token_id);\n $notification = self::getNotificationById($result->notification_id);\n //Call FCM For each token row\n $args = array(\n 'entry_id' => $result->id,\n 'to' => $token,\n 'notification' => $notification\n );\n\n KibarFCM::sendFCMMsg($args);\n //set each token is_sent to false\n }\n }\n }", "public function aim_loop()\r\n\t{\r\n\t\twhile ($this->aim_connected()) {\r\n\t\t\techo $this->aim_recv();\r\n\t\t} \r\n\t}", "public function isWaiting();", "public function popQueueMessagesExtern($params = null);", "function async_work() {\n\t\t$posix_pid = posix_getpid();\n\t\t$this->predis->sadd('workers', $posix_pid);\n\t\t//set_error_handler('error_as_exception');\n\t\twhile(true) {\n\t\t\tlist($liste, $sdata) = $this->predis->brpop(\"posix_pid:$posix_pid\", 'queue', 300);\n\t\t\tif($sdata != NULL) {\n\t\t\t\t$data = unserialize($sdata);\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$_PID = $data[2];\n\t\t\t\t\t$_CONTEXT = new Context($_PID);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t//var_dump($sdata);\n\t\t\t\t\t$result = call_user_func_array($data[0], $data[1]);\n\t\t\t\t\t$msg = array('r', $result);\n\t\t\t\t} catch( Exception $e) {\n\t\t\t\t\t$msg = array('e', $e);\n\t\t\t\t}\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$this->predis->lpush(\"pid:$data[2]\", serialize($msg));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trestore_error_handler();\n\t}", "function execute() {\n foreach($this -> queue as $queue) {\n for($written = 0; $written < strlen($queue); $written += $fwrite) {\n $fwrite = fwrite($this -> __sock, substr($queue, $written));\n if($fwrite === false or $fwrite <= 0)\n trigger_error('WRITE ERROR', E_USER_ERROR);\n }\n }\n // Read in the results from the pipelined commands\n $responses = array();\n for($i = 0; $i < count($this -> queue); $i++) {\n $responses[] = $this -> response();\n }\n // Clear the queue and return the response\n $this -> queue = array();\n if($this -> pipelined) {\n $this -> pipelined = false;\n return $responses;\n }\n return $responses[0];\n }", "public function wait(): array;", "function wait_in_line(Session $session): Promise{\r\n\t\t\tif(count($this->queue ) == 0 && !$this->locked){\r\n\t\t\t\treturn new Success();\r\n\t\t\t} else {\r\n\t\t\t\tplog(\"HardwareDualGPIOToggle: 'set' currently locked, entering queue\", INFO, $session);\r\n\t\t\t\t$d = new Deferred;\r\n\t\t\t\t$this->queue[] = $d;\r\n\t\t\t\t//var_dump($d->promise());\r\n\t\t\t\treturn $d->promise();\r\n\t\t\t}\r\n\t\t}", "public function handle()\n {\n //\n $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest', '/');\n\n $channel = $connection->channel();\n\n $channel->exchange_declare('ex1', 'direct', false, true, false, false, false);\n\n $channel->queue_declare('queue1', false, true, false, false);\n\n $channel->queue_bind('queue1', 'ex1', 'routingkey1');\n\n $msg = new AMQPMessage('Hello World!', ['delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT, 'content_type' => 'text/plain']);\n\n $wait = true;\n $returnListener = function (\n $replyCode,\n $replyText,\n $exchange,\n $routingKey,\n $message\n ) use ($wait) {\n $GLOBALS['wait'] = false;\n echo \"return: \",\n $replyCode, \"\\n\",\n $replyText, \"\\n\",\n $exchange, \"\\n\",\n $routingKey, \"\\n\",\n $message->body, \"\\n\";\n };\n\n // 监听没有成功路由到队列的消息\n $channel->set_return_listener($returnListener);\n\n $channel->basic_publish($msg, 'ex1', 'routingkey123', true, false);\n\n while ($wait) {\n $channel->wait();\n }\n\n $channel->close();\n\n $connection->close();\n }", "function getQueue($id);", "function findMessagesFor($recipient, $wait, $one = false) {\n $messages = [];\n $polls = 0;\n\n $recipient = $this->clean($recipient);\n\n do {\n $result = $this->db->query(\"\n SELECT id, message FROM messages\n WHERE recipient = '{$recipient}'\n AND received = 0\n ORDER BY ts;\n \");\n\n $rows = [];\n\n if ($result) {\n if ($one) {\n $row = $result->fetch_assoc();\n\n $this->db->query(\"\n UPDATE messages SET received = 1\n WHERE id = {$row['id']};\n \");\n\n if ($row) return $row['message'];\n }\n $rows = $result->fetch_all(MYSQLI_ASSOC);\n }\n\n if (count($rows) > 0) {\n foreach ($rows as $row) {\n array_push($messages, $row['message']);\n $this->db->query(\"\n UPDATE messages SET received = 1\n WHERE id = {$row['id']};\n \");\n }\n\n break;\n }\n\n if ($wait) sleep(1);\n $polls++;\n\n } while ($wait && $polls < 30);\n\n if ($one) return \"\";\n return $messages;\n }", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function listen(): void\n {\n $receive = function () {\n each($this->receiveMessages(), $this->parseAndConsumeMessage());\n };\n\n $this->settings->beforeReceive($receive);\n }", "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\t\t$emails = $vbulletin->db->query_read(\"\n\t\t\tSELECT *\n\t\t\tFROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\tORDER BY mailqueueid\n\t\t\tLIMIT \" . intval($vbulletin->options['emailsendnum'])\n\t\t);\n\n\t\t$mailqueueids = '';\n\t\t$newmail = 0;\n\t\t$emailarray = array();\n\t\twhile ($email = $vbulletin->db->fetch_array($emails))\n\t\t{\n\t\t\t// count up number of mails about to send\n\t\t\t$mailqueueids .= ',' . $email['mailqueueid'];\n\t\t\t$newmail++;\n\t\t\t$emailarray[] = $email;\n\t\t}\n\t\tif (!empty($mailqueueids))\n\t\t{\n\t\t\t// remove mails from queue - to stop duplicates being sent\n\t\t\t$vbulletin->db->query_write(\"\n\t\t\t\tDELETE FROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\t\tWHERE mailqueueid IN (0 $mailqueueids)\n\t\t\t\");\n\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\tif ($vbulletin->options['use_smtp'])\n\t\t\t{\n\t\t\t\t$prototype =& new vB_SmtpMail($vbulletin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prototype =& new vB_Mail($vbulletin);\n\t\t\t}\n\n\t\t\tforeach ($emailarray AS $index => $email)\n\t\t\t{\n\t\t\t\t// send those mails\n\t\t\t\t$mail = (phpversion() < '5' ? $prototype : clone($prototype)); // avoid ctor overhead\n\t\t\t\t$mail->quick_set($email['toemail'], $email['subject'], $email['message'], $email['header'], $email['fromemail']);\n\t\t\t\t$mail->send();\n\t\t\t}\n\n\t\t\t$newmail = 'data - ' . intval($newmail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\t$newmail = 0;\n\t\t}\n\n\t\t// update number of mails remaining\n\t\t$vbulletin->db->query_write(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore SET\n\t\t\t\tdata = \" . $newmail . \",\n\t\t\t\tdata = IF(data < 0, 0, data)\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\t// if we're using a alternate datastore, we need to give it an integer value\n\t\t// this may not be atomic\n\t\tif (method_exists($vbulletin->datastore, 'build'))\n\t\t{\n\t\t\t$mailqueue_db = $vbulletin->db->query_first(\"\n\t\t\t\tSELECT data\n\t\t\t\tFROM \" . TABLE_PREFIX . \"datastore\n\t\t\t\tWHERE title = 'mailqueue'\n\t\t\t\");\n\t\t\t$vbulletin->datastore->build('mailqueue', intval($mailqueue_db['data']));\n\t\t}\n\t}", "public function testQueue() {\n $node = $this->node;\n $message = Message::create([\n 'template' => 'foo',\n ]);\n\n $subscribe_options = [];\n $subscribe_options['save message'] = FALSE;\n\n try {\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->fail('Can add a non-saved message to the queue.');\n }\n catch (MessageSubscribeException $e) {\n $this->assertTrue(TRUE, 'Cannot add a non-saved message to the queue.');\n }\n\n // Assert message was saved and added to queue.\n $uids = array_fill(1, 10, new DeliveryCandidate([], [], 1));\n foreach ($uids as $uid => $candidate) {\n $candidate->setAccountId($uid);\n }\n $subscribe_options = [\n 'uids' => $uids,\n 'skip context' => TRUE,\n 'range' => 3,\n ];\n $queue = \\Drupal::queue('message_subscribe');\n $this->assertEquals($queue->numberOfItems(), 0, 'Queue is empty');\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->assertTrue((bool) $message->id(), 'Message was saved');\n $this->assertEquals($queue->numberOfItems(), 1, 'Message added to queue.');\n\n // Assert queue-item is processed and updated. We mock subscription\n // of users to the message. It will not be sent, as the default\n // notifier is disabled.\n $item = $queue->claimItem();\n $item_id = $item->item_id;\n\n // Add the queue information, and the user IDs to process.\n $subscribe_options['queue'] = [\n 'uids' => $uids,\n 'item' => $item,\n 'end time' => FALSE,\n ];\n\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n\n // Reclaim the new item, and assert the \"last UID\" was updated.\n $item = $queue->claimItem();\n $this->assertNotEquals($item_id, $item->item_id, 'Queue item was updated.');\n $this->assertEquals($item->data['subscribe_options']['last uid'], 3, 'Last processed user ID was updated.');\n }", "function fetch() {\n\n\t\t$items = $this->get_items();\n\n\t\tif ( is_wp_error( $items ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $items as $item ) {\n\t\t\t$this->background_process->push_to_queue( $item );\n\t\t}\n\n\t\t$this->background_process->save()->dispatch();\n\n\t}", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "public function consume();", "public function consume();", "public function fetchQueue() {\n\t\tif (TRUE === self::$instance instanceof QueueInterface) {\n\t\t\treturn self::$instance;\n\t\t}\n\t\treturn $this->initializeQueue();\n\t}", "public function aim_recv()\r\n\t{\r\n\t\t$header = fread($this->resource, 6);\r\n if ($this->user['debug']) $this->aim_debug($header, AIM_RAW);\r\n\r\n\t\t// Need error checking here to prevent bad data\r\n\t\ttry {\r\n\t\t\tif (!$data = @unpack(\"aone/Ctwo/nthree/nfour\", $header)) {\r\n\t\t\t\t// This normally happens if you sign on elsewhere with the same name,\r\n // or, if the TOC server resets (AOL likes to do this alot).\r\n\t\t\t\tthrow new TACException('Connection to TOC server interrupted.');\r\n\t\t\t} \r\n\t\t} catch(TACException $ex) {\r\n\t\t\t$ex->display();\r\n\t\t}\r\n\r\n if ($this->user['debug']) print_r($data);\r\n\t\t$msg = fread($this->resource, $data['four']);\r\n\t\t$msg = implode('', unpack(\"a*done\", $msg));\r\n if ($this->user['debug']) var_dump($msg);\r\n\r\n // match incoming commands\r\n preg_match(\"/^([A-Z0-9_]{4,19})\\:(.*)/s\", $msg, $matches);\r\n @list($orig, $cmd, $args) = $matches;\r\n // send the command and arguments to our parser\r\n $this->parser->aim_parse_command($cmd, $args);\r\n // regain some memory\r\n unset($header, $orig, $data, $matches);\r\n\t}", "public function testConsumesUpdateQueues()\n {\n $rabbit = $this->getModelMock('messenger/transport_rabbitmq', array('_getChannel', '_close'));\n $channel = $this->_getChannelMock();\n $rabbit->expects($this->any())->method('_getChannel')->will($this->returnValue($channel));\n $rabbit->setConsumeQueues(array('test'));\n\n $channel->expects($this->once())->method('queue_declare')->with($this->equalTo('test'));\n $channel->expects($this->once())->method('basic_consume')->with($this->equalTo('test'));\n $this->_startReceiving($rabbit);\n }", "public function wait(): void;", "public function poll()\n {\n }", "function readIncoming()\n {\n\n $this->logDebug(\"Reading incoming messages.\");\n \n $payloadChain = '';\n $opCode = null;\n\n try\n {\n do\n {\n $frameInfo = $this->readFrame();\n $this->counter++;\n\n if($frameInfo === false)\n {\n $this->logError(\"Could not read frame. Breaking.\");\n return null;\n }\n \n $payloadChain .= $frameInfo['Payload'];\n \n if($opCode === null)\n $opCode = $frameInfo['OpCode'];\n \n } while($frameInfo['IsFinal'] == false);\n }\n \n catch(Exception $ex)\n {\n $this->logError(\"Could not processing incoming message because of exception [\" . get_class($ex) . \"]: \" . $ex->getMessage());\n return false;\n }\n \n if($this->removePreviousMessage() === false)\n {\n $this->logError(\"Could not remove message just processed.\");\n return false;\n }\n \n $messageInfo = array(\n 'OpCode' => $opCode,\n 'PayloadChain' => $payloadChain,\n );\n \n if($this->m->messageReceived($this->socket, $messageInfo) === false)\n {\n $this->logError(\"Message-received callback failed.\");\n return false;\n }\n \n return $messageInfo;\n }", "public function pop($queue);", "function receive($last_retrieved_id)\n {\n if (!is_int($last_retrieved_id)) {\n $last_retrieved_id = int($last_retrieved_id);\n }\n\n $url = sprintf('cmd=receive&last=%s', $last_retrieved_id);\n\n $response = $this->_callURL($url);\n\n if (is_a($response, 'PEAR_Error')) {\n return PEAR::raiseError(sprintf(_(\"Send failed.\")));\n }\n\n $result = array();\n\n if (!array_key_exists('error_code', $response)) {\n $result[0] = 1;\n\n $result[1] = $response;\n } else {\n $result[0] = 0;\n\n $result[1] = $response['error_message'];\n }\n\n return $result;\n }", "public function handle()\n {\n $this->output->writeln('Waiting for jobs...');\n\n return $this->call('queue:work', [\n '--timeout' => '-1',\n ]);\n }", "function callback_function(Swoole\\Process $worker)\n{\n //recv data from master\n while(true)\n {\n $recv = $worker->pop();\n echo \"From Master: $recv\\n\";\n }\n\n sleep(2);\n $worker->exit(0);\n}", "public function benchLpopInternal()\n {\n $messageList = $this->queue->consume(self::CONSUME_SIZE);\n }", "public function peekMessages($queueId, $num = 1, $options = null);", "public function execute()\n {\n\n $undeliveredRecipients = array();\n $recipientsCount = 0;\n\n while (count($this->recipients) >= 1) {\n\n //send the command and read the response\n parent::execute();\n\n $recipient = array_pop($this->recipients);\n\n switch ($this->response->getCode()) {\n\n case '250':\n case '251':\n if (isset($recipient['original_email'])) {\n //we finally delivered mail to a user that provided a \n //forward-address\n $key = array_search($recipient['original_email'],\n $undeliveredRecipients);\n\n if ($key !== FALSE)\n unset($undeliveredRecipients[$key]);\n }\n\n $recipientsCount++;\n break;\n\n case '450':\n case '451':\n //add the recipient to the begginning of the queue to try again\n //later\n if ($recipient['retries'] > 0) {\n $recipient['retries']--;\n array_unshift($this->recipients, $recipient);\n }\n break;\n\n /* Handle too much recipients by splitting the message to chunks\n *\n * RFC 821 [30] incorrectly listed the error where an SMTP server\n * exhausts its implementation limit on the number of RCPT commands\n * (\"too many recipients\") as having reply code 552. The correct \n * reply code for this condition is 452. Clients SHOULD treat a \n * 552 code in this case as a temporary, rather than permanent, \n * failure so the logic below works. \n */\n case '452':\n case '552':\n array_push($this->recipients, $recipient);\n\n $result['undelivered'] = $undeliveredRecipients;\n //this causes the client to append a new mail sending sequence \n //for the rest of recipients\n $result['toDeliver'] = $this->recipients;\n $result['recipientsCount'] = $recipientsCount;\n\n return $result;\n break; //unreachable\n\n case '550':\n case '553':\n $undeliveredRecipients[] = $recipient['email'];\n break;\n\n case '551':\n if (preg_match('/<\\([^>]*\\)>/', $this->response, $matches)) {\n\n $forward = array();\n $forward['email'] = $matches[1];\n $forward['retries'] = 2;\n if (isset($recipient['original_email'])) {\n $forward['original_email'] = \n $recipient['original_email'];\n } else {\n $forward['original_email'] = $recipient['email'];\n $undeliveredRecipients[] = $recipient['email'];\n }\n\n $this->recipients[] = $forward;\n }\n break;\n }\n\n }\n\n return array(\n 'undelivered' => $undeliveredRecipients, \n 'recipientsCount' => $recipientsCount,\n );\n }", "public function handle()\n {\n MessagingAmqpService::declareSysQueues();\n ExchangeService::bindAllExchanges();\n MessagingAmqpService::listen(\n config('amqp.log_queue'),\n [ MessageService::class, 'consumeLog' ]\n );\n }", "public function popFromQueue()\n {\n $this->semId = sem_get($this->SEMKEY, 1);\n \n //get id of shared memory\n $this->shmId = shm_attach($this->SHMKEY, $this->MEMSIZE);\n \n if (!sem_acquire($this->semId))\n {\n $this->clear();\n throw new Exception();\n }\n \n $counter = shm_get_var($this->shmId, 1);\n if($counter < 2)\n {\n sem_release($this->semId);\n return false;\n }\n $counter--;\n \n $result = shm_get_var($this->shmId, $counter);\n \n if (!shm_put_var($this->shmId, 1, $counter))\n {\n $this->clear();\n throw new Exception();\n }\n \n sem_release($this->semId);\n \n return $result;\n }", "public function testReceiveNotification()\n {\n Config::set('xchainqueue.jobClass', 'MockXchainHandlerJob');\n\n $xchain_queue_helper = app('XchainQueueHelper')->mockWebhookReceiver();\n $request = $xchain_queue_helper->buildReceiveRequest();\n\n // receive the request\n $response = $xchain_queue_helper->receiveRequest($request);\n\n // check the events\n $called_events = MockXchainHandlerJob::getCalledEvents();\n PHPUnit::assertCount(1, $called_events);\n }", "function getNextFuture()\n {\n if (!(msg_receive($this->collectionQueueId, self::VALUE_READY, $msgType, self::SIZE, $futureId, true, 0, $error))) {\n return false;\n }\n $finishedFuture = $this->futures[$futureId];\n unset($this->futures[$futureId]);\n return $finishedFuture;;\n }", "public function listen($args, $assoc_args = array())\n {\n global $wp_queue;\n\n $worker = new WP_Worker($wp_queue);\n\n WP_CLI::log('Listening for queue jobs...');\n\n while (true) {\n if ($worker->should_run()) {\n if ($worker->process_next_job()) {\n WP_CLI::success('Processed: ' . $worker->get_job_name());\n sleep(1);\n }\n } else {\n sleep(5);\n }\n }\n }", "public function startMessageConsumer()\n {\n $this->process->start();\n }" ]
[ "0.71199083", "0.6990867", "0.66668683", "0.66524714", "0.63747585", "0.6364515", "0.6179977", "0.6123481", "0.6116413", "0.6058558", "0.60179716", "0.60179716", "0.6015656", "0.5980645", "0.5967203", "0.5951462", "0.5944981", "0.59365755", "0.591689", "0.59080625", "0.58978504", "0.5885605", "0.58474565", "0.5846806", "0.5838188", "0.5825045", "0.5805801", "0.57928854", "0.5772781", "0.57714707", "0.5768207", "0.57664293", "0.5732461", "0.5694044", "0.56796867", "0.56796867", "0.56662107", "0.5650795", "0.5647769", "0.56455064", "0.56424487", "0.562636", "0.56249255", "0.5615016", "0.56130177", "0.5594549", "0.55805784", "0.5572432", "0.5554368", "0.5545035", "0.55438805", "0.55409354", "0.5538417", "0.55104625", "0.5502585", "0.54950285", "0.54863816", "0.5468688", "0.54429704", "0.54424566", "0.54382414", "0.5426563", "0.54084796", "0.54038733", "0.5394939", "0.53870976", "0.5385299", "0.5385011", "0.5383996", "0.537865", "0.53644896", "0.53567976", "0.5355369", "0.53493506", "0.53448987", "0.53397244", "0.5336315", "0.5330734", "0.52781665", "0.526056", "0.526056", "0.5254849", "0.52407014", "0.52391595", "0.5212568", "0.52057314", "0.52041405", "0.5199646", "0.5195489", "0.5194476", "0.5190474", "0.51836276", "0.51741827", "0.5169727", "0.5166206", "0.51506907", "0.5150329", "0.5148652", "0.514193", "0.5130323" ]
0.6414643
4
Maintain the array checkLogQ as a FIFO buffer with length 4. When a new entry is added, remove oldest entry and shuffle.
function addCheckLog($message){ global $checkLogQ; $length = 4; // If checkLogQ size is smaller than 4 add the message if(count($checkLogQ)<$length){ $checkLogQ[] = $message; } // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one else{ array_shift($checkLogQ); $checkLogQ[] = $message; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printCheckLogQ(){\n global $checkLogQ;\n foreach($checkLogQ as $message){\n print($message);\n }\n $checkLogQ = array(); // reset a variable to an empty array\n }", "function startQueue(){\n\n // Maintain the array checkLogQ as a FIFO buffer with length 4.\n // When a new entry is added, remove oldest entry and shuffle.\n function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }\n // Prints all checkLogQ messages to the console \n function printCheckLogQ(){\n global $checkLogQ;\n foreach($checkLogQ as $message){\n print($message);\n }\n $checkLogQ = array(); // reset a variable to an empty array\n }\n \n try{\n while(true){\n addCheckLog(date('Y/m/d H:i:s').\" Awaiting a message...\\n\");\n\n // Receive messages from queue, maximum waits for 20 seconds for message\n // receive_request - contain all the queue messages\n global $sqs;\n $receive_request = $sqs->receiveMessage(array(\n 'QueueUrl' => ds_config(\"QUEUE_URL\"),\n 'WaitTimeSeconds' => 20,\n 'MaxNumberOfMessages' => 10\n ));\n // Count the amount of messages received\n $msgCount = 0;\n if($receive_request->getPath('Messages') !== NULL){\n $msgCount = count($receive_request->getPath('Messages'));\n }\n addCheckLog(date('Y/m/d H:i:s').\" found $msgCount message(s)\\n\");\n // If at least one message has been received\n if ($msgCount!=0) {\n printCheckLogQ();\n foreach ($receive_request->getPath('Messages') as $msg) {\n messageHandle($msg, $receive_request);\n }\n }\n }\n }\n catch (Exception $e) {\n printCheckLogQ();\n print(date('Y/m/d H:i:s').\" Queue receive error: $e\");\n sleep(5);\n global $restart;\n $restart = true;\n }\n }", "private function clear_log()\n {\n if ($this->_log && is_array($this->_log)) {\n $this->_log = array();\n }\n }", "function queue_rotate(&$queue) { \n // Remove the first item and insert it at the rear. \n $queue[] = array_shift($queue); \n}", "function queue_initialize() { \n // In this case, just return a new array \n $new = array(); \n return $new; \n}", "private function clearLog() {\n $this -> log = array();\n $this -> log[\"success\"] = array();\n $this -> log[\"failure\"] = array();\n }", "final public function purgeLog() {\n $this->log = array();\n }", "public function clear()\n {\n $this->log = [];\n }", "public function remove_old_log_events() {\n global $wpdb;\n\n $older_than = (time() - H5PEventBase::$log_time);\n\n $wpdb->query($wpdb->prepare(\"\n DELETE FROM {$wpdb->prefix}h5p_events\n\t\t WHERE created_at < %d\n \", $older_than));\n }", "private function rotate_log_table() {\n\t\t\tif( $this->calls > 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$random_val = rand(0,1000);\n\t\t\tif($random_val == 500){\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$lock = rand();\n\t\t\t\t$sql = $wpdb->prepare(\"INSERT IGNORE INTO {$wpdb->prefix}options SET `option_name` = 'error_log_delete_lock', `option_value` = '$lock', `autoload` = 'no'\");\n\t\t\t\tif($wpdb->query($sql)){\n\t\t\t\t\t$sql = $wpdb->prepare(\"SELECT option_value FROM {$wpdb->prefix}options where option_name='error_log_delete_lock'\");\n\t\t\t\t\t$results = $wpdb->$results($sql);\n\t\t\t\t\tif ($results['key'] == $lock) {\n \t\t\t\t\t\t$sql = $wpdb->prepare( \"DELETE FROM {$this->table_name} WHERE time_stamp < (CURDATE() - INTERVAL %d DAY)\", Error_Logging::KEEP_DAYS );\n\t\t\t\t\t\t$return = $wpdb->query( $sql );\n\t\t\t\t\t\t$sql = $wpdb->prepare(\"DELETE FROM {$wpdb->prefix}options WHERE option_name='error_log_delete_lock'\");\t\n\t\t\t\t\t\t$return = $wpdb->query( $sql );\n\t\t\t\t\t}else {\n\t\t\t \t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\treturn $return;\n\t\t\t\t}else{\n\t\t\t \t\treturn 0;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t \treturn 0;\n\t\t\t}\n\t\t}", "public function testOrderedQueueGC_consistent() {\n\t\t\t$this->oq[1] = new stdClass; $this->oq[7] = new stdClass;\n\t\t\t$this->oq[7] = new stdClass; $this->oq[4] = new stdClass;\n\n\t\t\t// run garbage collector...\n\t\t\t$this->oq->gc();\n\n\t\t\t// assertions\n\t\t\tfor($i=0;$i<4;$i++) $this->assertTrue(isset($this->oq[$i]));\n\t\t}", "public function reset()\n {\n $this->values[self::_GUILD_LOG] = array();\n }", "function check(){\n\techo \"Looking for jobs and adding to queue\\n\";\n\t\n\t$times = date('d-M-Y');\n\tif(DEBUG) $qlog = new snowytech\\stphplogger\\logWriter('../logs/check-queue-' . $times . '.txt');\n\t$check = new snowytech\\stphpschedule\\schedule();\n\t//Goes through whole Jobs table and checks interval!\t\n\t$db = db::getInstance();\n\t$sql = \"SELECT * FROM JOBS\";\n\t$stmt = $db->getData($sql);\n\n\t//Count the rows and send console message there are no jobs configured.\n\tif ( count($stmt) > 0) {\n\t\tforeach($stmt as $row){\n\t\t\t$id = $row['id'];\n\t\t\t$job_name = $row['name'];\n\t\t\t$path = $row['path'];\n\t\t\t$in_queue = $row['status_int'];\n\t\t\t$lastrun = $row['last_run'];\n\t\t\t$interval = $row['interval'];\n\t\t\t$global_hold = $row['global_hold'];\n\t\t\t\n\t\t\t$r = $check->interval($lastrun, $interval);\n\t\t\t\n\t\t\t//Dont run if global hold is set to 1\n\t\t\tif($global_hold !=1){\n\t\t\t\t//Dont run if $in_queue = 0 ( already in queue )\n\t\t\t\tif($in_queue != 0){\n\t\t\t\t\tif( $r ) {\n\t\t\t\t\t\techo \"Job hit the queue: \" . $job_name . \"\\n\";\n\t\t\t\t\t\t$count = time();\n\t\t\t\t\t\techo $count . \"\\n\";\n\t\t\t\t\t\tif(DEBUG) $qlog->info('Job hit the queue: ' . $job_name . \" : time: \" . $count);\n\t\t\t\t\t\t \n\t\t\t\t\t\t//Now last update is updating in table. Need to add an entry to the QUE and update last run from there.\t\t\t\t\n\t\t\t\t\t\t$data = array(':jid' => $id, ':path' => $path, ':hold' => '1', ':time' => $count);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Add into QUEUE\n\t\t\t\t\t\t$sql= 'INSERT INTO QUEUE (job_id, path, hold, in_que_time) VALUES (:jid,:path,:hold,:time)';\n\t\t\t\t\t\t$db->execQuery($sql, $data);\n\n\t\t\t\t\t\t//update status_int, prevents multiple entries into queue\n\t\t\t\t\t\t$sql= \"UPDATE JOBS SET status_int = 0 WHERE id = '$id'\";\n\t\t\t\t\t\t$db->updateData($sql);\n\t\t\t\t\t}else{ \n\t\t\t\t\t\techo \"NOT ready to run - \" . $job_name . \"\\n\"; \n\t\t\t\t\t\t//Log that its intervnal is not ready\n\t\t\t\t\t\tif(DEBUG) $qlog->info('NOT RUN - interval is ' . $interval . \" minutes on JOB: \" . $job_name . \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} else { \n\t\t\t\t\techo \"JOB \" . $job_name . \" - already in QUEUE!\\n\"; \n\t\t\t\t\tif(DEBUG) $qlog->info('JOB ' . $job_name . \" - already in QUEUE!\");\n\t\t\t\t}\n\t\t\t} else { \n\t\t\t\techo \"JOB \" . $job_name . \" is HELD globally!\\n\";\n\t\t\t\tif(DEBUG) $qlog->info(\"JOB \" . $job_name . \" is HELD globally!\\n\");\n\t\t\t}\n\t\t}\n\t} else { echo \"There are no JOBS configured!\"; }\n\t$db->closeDB();\n}", "public function benchLpopConsecutive()\n {\n $messageList = [];\n for ($i = 0; $i < self::CONSUME_SIZE; $i++) {\n $messageList[] = RedisEnvelope::jsonDeserialize($this->client->lpop($this->queueName));\n }\n }", "public function clearRecordedEvents()\n {\n $this->latestRecordedEvents = [];\n }", "function insertLogDigestQueue($digest_insert)\n{\n\t$db = database();\n\n\t$db->insert('',\n\t\t'{db_prefix}log_digest',\n\t\t[\n\t\t\t'id_topic' => 'int', 'id_msg' => 'int', 'note_type' => 'string', 'exclude' => 'int',\n\t\t],\n\t\t$digest_insert,\n\t\t[]\n\t);\n}", "public static function clear()\n {\n self::$actionList = new \\SplPriorityQueue();\n self::$errors = [];\n self::$warnings = [];\n }", "function addSongsToQueue($accountId, $soundtrackId, $startSong, $startingSequence = 1)\n{\n \n $sql = \"SELECT * FROM soundtrack_playlist WHERE soundtrack_id = $soundtrackId\";\n \n $rows = mysql_query($sql);\n $songs = array();\n $songIds = array();\n\n if ($startSong)\n {\n $startSongId = intval($startSong['song_id']);\n $songIds[] = $startSongId;\n }\n\n while ($row = mysql_fetch_array($rows, MYSQL_ASSOC))\n {\n $playlistId = $row['playlist_id'];\n $weight = $row['weight'];\n\n // TODO: What if there aren't enough songs from this playlist?\n \n $sql = \"SELECT * FROM playlist_song JOIN song ON playlist_song.song_id = song.song_id WHERE playlist_id = $playlistId \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_queue WHERE account_id = $accountId)) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_song WHERE account_id = $accountId AND action = (-2))) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM account_song WHERE account_id = $accountId AND `timestamp` >= DATE_SUB(NOW(), INTERVAL 1 DAY))) \" .\n \"AND (playlist_song.song_id NOT IN (SELECT song_id FROM soundtrack_exclude_song WHERE soundtrack_id = $soundtrackId)) \";\n\n if (count($songIds) > 0)\n {\n $sql .= \"AND (playlist_song.song_id NOT IN (\" . implode(',', $songIds) . \")) \";\n } \n \n $sql .= \"AND playlist_song.status = 0 AND song.status = 0 ORDER BY RAND() LIMIT $weight\";\n \n //echo $sql;\n \n $songRows = mysql_query($sql);\n $songCount = 0;\n\n while ($row = mysql_fetch_array($songRows, MYSQL_ASSOC))\n {\n $songId = intval($row['song_id']);\n $songIds[] = $songId;\n\n $songs[] = $row;\n $songCount++;\n }\n }\n \n // Randomize the songs\n\n shuffle($songs);\n \n // Prepend the start song\n \n if ($startSong)\n {\n array_unshift($songs, $startSong);\n }\n \n // Try to make sure the same artist isn't too close to themselves\n // Some soundtracks don't want this\n\n $separateArtists = true; \n $sql = \"SELECT shuffle FROM soundtrack WHERE soundtrack_id = $soundtrackId\";\n $rows = mysql_query($sql);\n\n if ($row = mysql_fetch_array($rows, MYSQL_ASSOC))\n {\n $separateArtists = intval($row['shuffle']);\n }\n \n if ($separateArtists)\n {\n $songCount = count($songs);\n \n for ($i = 1; $i < ($songCount - 1); $i++)\n {\n $artistA = $songs[$i-1]['artist'];\n $artistB = $songs[$i]['artist'];\n \n if (strcmp(strtolower($artistA), strtolower($artistB)) == 0)\n {\n // Found a match\n // Just swap B with C\n \n $save = $songs[$i];\n $songs[$i] = $songs[$i+1];\n $songs[$i+1] = $save;\n }\n }\n }\n \n // Append to the queue\n \n $sequence = $startingSequence;\n \n foreach ($songs as $song)\n {\n $songId = $song['song_id'];\n $playlistId = $song['playlist_id'];\n \n mysql_query(\"INSERT INTO account_queue (account_id, soundtrack_id, playlist_id, song_id, sequence) VALUES ($accountId, $soundtrackId, $playlistId, $songId, $sequence)\");\n $sequence++;\n }\n \n \n}", "public function benchLpopInternal()\n {\n $messageList = $this->queue->consume(self::CONSUME_SIZE);\n }", "function clean_data_set($a1,$position,$trial_count){\n $a2 =array();\n for($i=0;$i<count($a1);$i++){\n if(!($i>=$position && $i<=$position+$trial_count)){\n array_push($a2,$a1[$i]);\n }\n \n }\n return $a2;\n}", "public function cleanUpOldLog() {\n\t\t$timestamp = Utils::instance()->localToUtc( apply_filters( 'ip_lockout_logs_store_backward', '-' . Settings::instance()->storage_days . ' days' ) );\n\t\tLog_Model::deleteAll( array(\n\t\t\t'date' => array(\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $timestamp\n\t\t\t),\n\t\t), '0,1000' );\n\t}", "protected function _cleanClaimedPushes()\n {\n $readAdapter = $this->_getReadAdapter();\n $writeAdapter = $this->_getWriteAdapter();\n\n while (true) {\n $select = $readAdapter->select()\n ->from(\n array('push_queue' => $this->getTable('klarna_kcokred/push_queue'))\n )\n ->joinLeft(\n array('kco_order' => $this->getTable('klarna_kco/order')),\n 'push_queue.klarna_checkout_id = kco_order.klarna_checkout_id'\n )\n ->where('kco_order.is_acknowledged = ?', 1)\n ->limit(100);\n\n $pushQueueIds = $readAdapter->fetchCol($select);\n\n if (!$pushQueueIds) {\n break;\n }\n\n $condition = array('push_queue_id IN (?)' => $pushQueueIds);\n\n $writeAdapter->delete($this->getTable('klarna_kcokred/push_queue'), $condition);\n }\n\n return $this;\n }", "public function autoPostOpenQueueItems()\n\t{\n\t\t$helper = Mage::helper('fw_queue');\n\t\tif($helper->isQueueEnabled())\n\t\t{\n\t\t\t$start = -microtime(true);\n\t\t\t$collection = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$collection->addFieldToSelect('*');\n\t\t\t$collection->addFieldToFilter('status', array(array('eq' => '1'),array('eq' => '4')));\n\t\t\tforeach($collection as $queue_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t$queue->process();\n\t\t\t}\n\t\t\t//CLEAN-UP AND STOP ERROR QUEUE ITEMS\n\t\t\t$expired = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$expired->addFieldToSelect('*');\n\t\t\t$expired->addFieldToFilter('status', array(array('eq' => '4')));\n\t\t\t$expired->addFieldToFilter('number_attempts', array(array('gteq' => '75')));\n\t\t\tforeach($expired as $expire_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t//STATUS_ABORTED_NOTIFIED = 5\n\t\t\t\t$queue->changeStatus('5');\n\t\t\t}\n\n\t\t\t//CLEAN-UP OLD ITEMS\n\t\t\t$date = date('Y-m-d H:i:s', time());\n\t\t\t$queueLastAttemptDate = strtotime ( '-90 day' , strtotime ( $date ) ) ;\n\t\t\t$queueLastAttemptDate = date ( 'Y-m-d H:i:s' , $queueLastAttemptDate );\n\n\t\t\ttry {\n\t\t\t\t$queueItems = Mage::getModel('fw_queue/queue')\n\t\t\t\t->getCollection()\n\t\t\t\t->addFieldToSelect('*')\n\t\t\t\t->addFieldToFilter('last_attempt', array('to' => $queueLastAttemptDate));\n\n\t\t\t\t$queueItems->getSelect()->limit(10000);\n\n\t\t\t\tforeach ($queueItems as $queueItem)\n\t\t\t\t{\n\t\t\t\t\t$queueItem->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\tMage::logException($e->getMessage());\n\t\t\t}\n\t\t\t$totalTime = microtime(true) + $start;\n\t\t\t$span = gmdate(\"H:i:s\",$totalTime);\n\t\t\t$micro = substr($totalTime - floor($totalTime),2);\n\t\t\t$logLine = \"Queue executed in {$span}.{$micro}\\r\\n\";\n\t\t\tMage::Log($logLine,null,'fw_queue.log');\n\n\t\t\t//Dispatch Event to let fw_orderpublish know when queue is done running\n\t\t\t$eventData = array('queue_complete' => 'true');\n\t\t\tMage::dispatchEvent('fw_queue_run_complete');\n\t\t}\n\n\t}", "function apc_cache_write_log() {\n\tglobal $ydb;\n\t$updates = 0;\n\t// set up a lock so that another hit doesn't start writing too\n\tif(!apc_add(APC_CACHE_LOG_UPDATE_LOCK, 1, APC_CACHE_LOCK_TIMEOUT)) {\n\t\tapc_cache_debug(\"write_log: Could not lock the log index. Abandoning write\", true);\n\t\treturn $updates;\n\t}\n\tapc_cache_debug(\"write_log: Writing log to database\");\n\n\t$key = APC_CACHE_LOG_INDEX;\n\t$index = apc_fetch($key);\n\tif($index === false) {\n\t\tapc_cache_debug(\"write_log: key $key has disappeared. Abandoning write.\");\n\t\tapc_store(APC_CACHE_LOG_TIMER, time());\n\t\tapc_delete(APC_CACHE_LOG_UPDATE_LOCK);\n\t\treturn $updates;\n\t}\n\t$fetched = 0;\n\t$n = 0;\n\t$loop = true;\n\t$values = array();\n\t\n\t// Retrieve all items and reset the counter\n\twhile($loop) {\n\t\tfor($i = $fetched+1; $i <= $index; $i++) {\n\t\t\t$row = apc_fetch(apc_cache_get_logindex($i));\n\t\t\tif($row === false) {\n\t\t\t\tapc_cache_debug(\"write_log: log entry \" . apc_cache_get_logindex($i) . \" disappeared. Possible data loss!!\", true);\n\t\t\t} else {\n\t\t\t\t$values[] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$fetched = $index;\n\t\t$n++;\n\t\t\n\t\tif(apc_cas($key, $index, 0)) {\n\t\t\t$loop = false;\n\t\t} else {\n\t\t\tusleep(500);\n\t\t\t$index = apc_fetch($key);\n\t\t}\n\t}\n\tapc_cache_debug(\"write_log: $fetched log entries retrieved; index reset after $n tries\");\n\t// Insert all log message - we're assuming input filtering happened earlier\n\t$query = \"\";\n\n\tforeach($values as $value) {\n\t\tif(!is_array($value)) {\n\t\t apc_cache_debug(\"write_log: log row is not an array. Skipping\");\n\t\t continue;\n\t\t}\n\t\tif(strlen($query)) {\n\t\t\t$query .= \",\";\n\t\t}\n\t\t$row = \"('\" . \n\t\t\t$value[0] . \"', '\" . \n\t\t\t$value[1] . \"', '\" . \n\t\t\t$value[2] . \"', '\" . \n\t\t\t$value[3] . \"', '\" . \n\t\t\t$value[4] . \"', '\" . \n\t\t\t$value[5] . \"')\";\n\t\tapc_cache_debug(\"write_log: row: $row\");\n\t\t$query .= $row;\n\t\t$updates++;\n\t}\n\t$ydb->query( \"INSERT INTO `\" . YOURLS_DB_TABLE_LOG . \"` \n\t\t\t\t(click_time, shorturl, referrer, user_agent, ip_address, country_code)\n\t\t\t\tVALUES \" . $query);\n\tapc_store(APC_CACHE_LOG_TIMER, time());\n\tapc_delete(APC_CACHE_LOG_UPDATE_LOCK);\n\tapc_cache_debug(\"write_log: Added $updates entries to log\");\n\treturn $updates;\n\n}", "public function deleteQueue();", "protected function cleanHistory()\n {\n $createdAt = new \\DateTime();\n $logs = $this->instance->getLogs();\n foreach($logs as $log) {\n if(($createdAt->getTimestamp() - $log->getCreatedAt()->getTimestamp()) > $this->expiredTimestamp) {\n $this->instance->removeLog($log);\n }\n }\n }", "function cleanDBonMarkDeleted() {\n\n if ((isset($this->input['_no_history']) && $this->input['_no_history'])\n || (!static::$logs_for_item_1\n && !static::$logs_for_item_2)) {\n return;\n }\n\n if ($this->useDeletedToLockIfDynamic()\n && $this->isDynamic()) {\n $item1 = $this->getConnexityItem(static::$itemtype_1, static::$items_id_1);\n $item2 = $this->getConnexityItem(static::$itemtype_2, static::$items_id_2);\n\n if (($item1 !== false)\n && ($item2 !== false)) {\n if ($item1->dohistory\n && static::$logs_for_item_1) {\n $changes[0] = '0';\n $changes[1] = addslashes($this->getHistoryNameForItem1($item2, 'lock'));\n $changes[2] = \"\";\n\n Log::history($item1->getID(), $item1->getType(), $changes, $item2->getType(),\n static::$log_history_1_lock);\n }\n\n if ($item2->dohistory\n && static::$logs_for_item_2) {\n $changes[0] = '0';\n $changes[1] = addslashes($this->getHistoryNameForItem2($item1, 'lock'));\n $changes[2] = \"\";\n Log::history($item2->getID(), $item2->getType(), $changes, $item1->getType(),\n static::$log_history_2_lock);\n }\n }\n\n }\n }", "public function flushlogs()\n\t{\n\t\t$this->deleteAll(array('1 = 1'));\n\t}", "protected function updateHistory() {\n self::$history[] = time();\n\n if ( 30 === count( self::$history ) ) {\n if ( reset( self::$history ) >= (time() - 30) ) {\n sleep( 2 );\n }\n\n array_shift( self::$history );\n }\n }", "function insert_log( $log_data = array() ) {\n\t\n\t\t/* Get Log From Rule ID */\t\t\n\t\t$logs_array = Inbound_Logging_Automation::get_logs( $log_data['rule_id'] );\n\t\t\n\t\t/* Push log to front of array */\n\t\t$logs_array[] = $log_data;\n\t\t\n\t\t/* Trim logs array to X entries */\n\t\tif ( count($logs_array) > self::$log_limit ) {\n\t\t\t$trim = count($logs_array) - self::$log_limit;\n\t\t\t$logs_array = array_slice($logs_array, $trim);\n\t\t}\n\t\t\n\t\t/* Update logs meta */\n\t\tupdate_post_meta( $log_data['rule_id'] , '_automation_logs' , json_encode($logs_array) );\n\n\t}", "function pocker_flush(array $hand) {\n\n if (count($hand) < 5) return false;\n\n $suits = cards_suits($hand);\n\n $same = array_count_values($suits);\n\n if (count($same) > 1) return false;\n\n return ['value' => highest_value_card($hand)['value'], 'remaining' => []];\n}", "function fill_array($log_cat_id){\r\n\t\r\n $conn = $GLOBALS['conn'];\r\n\t$questions_array = array();\r\n $q_sql = \"SELECT COUNT(*) FROM questions WHERE q_cat_id = '$log_cat_id' \";\r\n\r\n $stmt2 =$conn->prepare($q_sql);\r\n $stmt2->execute();\r\n \t$count2 = $stmt2->fetchColumn();\r\n\r\n if ($count2 >= 1) {\r\n $sql = \"SELECT * FROM questions WHERE q_cat_id = '$log_cat_id' \";\r\n\r\n $i = 0;\r\n foreach ($conn->query($sql) as $row) { \r\n\r\n $questions_array[$i][0] = $row['q_title'];\r\n $questions_array[$i][1] = $row['q_ans1'];\r\n $questions_array[$i][2] = $row['q_ans2'];\r\n $questions_array[$i][3] = $row['q_ans3'];\r\n $questions_array[$i][4] = $row['q_ans4'];\r\n $questions_array[$i][5] = $row['q_right_ans'];\r\n \r\n $i++;\r\n }\r\n }\r\n // Shuffle the order of the questions for more fun!\r\n shuffle($questions_array);\r\n \r\n $res = null;\r\n $conn = null;\r\n\r\n return $questions_array;\r\n}", "protected function updateHistory()\n {\n self::$history[] = time();\n if(30 === count(self::$history))\n {\n if(reset(self::$history) >= (time() - 30))\n {\n sleep(2);\n }\n array_shift(self::$history);\n }\n }", "public function clearEvents()\n {\n $this->recorded = [];\n }", "public function createQueue();", "protected function populateDatastreamHistory() {\n if ($this->datastreamHistory === NULL) {\n $this->datastreamHistory = $this->getDatastreamHistory();\n }\n }", "function qccron(&$event, $param) {\n if ($this->run) return;\n\n global $ID;\n $this->run = true;\n echo 'qc data gatherer: started on '.$ID.NL;\n $qc = $this->loadHelper('qc',true);\n\n $persist = array();\n if (is_file($this->file)) {\n $persist = file_get_contents($this->file);\n $persist = unserialize($persist);\n } else {\n $persist = array();\n echo '2';\n }\n\n $fixme = $qc->getQCData($ID);\n\n // when there are no quality problems we won't need the information\n if ($this->isOk($fixme['err'])) {\n unset($persist[$ID]);\n } else {\n $persist[$ID] = $fixme;\n }\n\n $persist = serialize($persist);\n file_put_contents($this->file, $persist);\n }", "public static function delAll () {\n\t\tself::$timeArray = Array ();\n\t}", "function queue_enqueue(&$queue, $value) { \n // We are just adding a value to the end of the array, so can use the \n // [] PHP Shortcut for this. It's faster than using array_push \n $queue[] = $value; \n}", "public function cleanOldLog() {\n\t\t// not yet implemented\n\t}", "public function test_get_next() {\n //TEST CASE: $serviceID == 0\n //caso con code di lunghezza diversa => prende dalla coda più lunga il biglietto con numero più basso\n\n $ticket_info1 = get_next(0);\n $this->assertEquals(0,$ticket_info1['ticketN'], \"TestQueue: test_get_next not performed correctly or not performed\");\n $this->assertEquals(1,$ticket_info1['serviceID'], \"TestQueue: test_get_next not performed correctly or not performed\");\n //caso con code di lunghezza uguale => prende il timestamp minore\n\n perform_INSERT_or_DELETE(\"INSERT INTO Queue(ServiceID, TicketNumber) VALUES(2, 1)\");\n perform_INSERT_or_DELETE(\"INSERT INTO Queue(ServiceID, TicketNumber) VALUES(2, 2)\");\n perform_INSERT_or_DELETE(\"INSERT INTO Queue(ServiceID, TicketNumber) VALUES(1, 1)\");\n\n /*\n * The actual configuration in Queue table is:\n *\n * ----------------------------------------------------------\n * |ID |ServiceID |TicketNUmber |Timestamp |\n * ----------------------------------------------------------\n * |2 |2 |0 |2019-10-19 12:18:17 |\n * |61 |1 |0 |2019-10-19 16:31:49 |\n * |62 |1 |1 |2019-10-19 20:03:25 |\n * |? |**2** |**1** |? |<<<\n * |? |**2** |**2** |? |<<<\n * |? |**1** |**1** |? |<<< the element with the latest timestamp\n * ----------------------------------------------------------\n */\n\n $ticket_info2 = get_next(0);\n $this->assertTrue($ticket_info2['ticketN'] == 0, \"TestQueue: test_get_next not performed correctly or not performed\");\n $this->assertTrue($ticket_info2['serviceID'] == 2, \"TestQueue: test_get_next not performed correctly or not performed\");\n\n //TEST CASE: $serviceID != -1 AND $serviceID != 0 => ritorna il biglietto con numero minore\n $ticket_info3 = get_next(1);\n\n $this->assertTrue($ticket_info3['ticketN'] == 0, \"TestQueue: test_get_next not performed correctly or not performed\");\n $this->assertTrue($ticket_info3['serviceID'] == 1, \"TestQueue: test_get_next not performed correctly or not performed\");\n\n $ticket_info4 = get_next(2);\n $this->assertTrue($ticket_info4['ticketN'] == 0, \"TestQueue: test_get_next not performed correctly or not performed\");\n $this->assertTrue($ticket_info4['serviceID'] == 2, \"TestQueue: test_get_next not performed correctly or not performed\");\n $conn = TestsConnectMySQL();\n $sql = \"Select * from queue;\";\n $res = $conn->query($sql);\n while( $row = $res->fetch_row()){\n echo\"$row[0] $row[1] $row[2] $row[3] \\n\";\n }\n $res->close();\n perform_INSERT_or_DELETE(\"DELETE FROM queue where ID >62;\");\n }", "function saveQueue($request) {\n\n if(isset($request['Statistic_type']) && $request['Statistic_type'] !='') {\n if($request['Statistic_type'] == 'all') {\n $this->insertQueue($request,'Avalue');\n $this->insertQueue($request,'Pvalue');\n $this->insertQueue($request,'Ritvalue');\n } else {\n $this->insertQueue($request);\n }\n }\n return true;\n }", "protected function cleanExecutionArrays() {}", "function cleanUpValidationLog() {\n if(!empty($this->validation_log)) {\n $this->validation_log = array();\n } // if\n }", "function _queue2civicrm_log( $log=array() ) {\n if ( empty( $log ) ) {\n return false; \n }\n \n // make sure we're using the default db\n $dbs = wmf_civicrm_get_dbs();\n $dbs->push( 'default' );\n \n // if cid is set in the log array, we need to update\n if ( array_key_exists('cid', $log)) {\n $result = db_update( 'queue2civicrm_log' )->fields( array(\n 'gateway' => $log[ 'gateway' ],\n 'gateway_txn_id' => $log[ 'gateway_txn_id' ],\n 'data' => $log[ 'data' ],\n 'timestamp' => $log[ 'timestamp' ],\n 'verified' => $log[ 'verified' ],\n ) )->condition( 'cid', $log[ 'cid' ] )->execute();\n } else { \n $result = db_insert('queue2civicrm_log')->fields( array(\n 'gateway' => $log[ 'gateway' ],\n 'gateway_txn_id' => $log[ 'gateway_txn_id' ],\n 'data' => $log[ 'data' ],\n 'timestamp' => $log[ 'timestamp' ],\n 'verified' => $log[ 'verified' ],\n ) )->execute();\n }\n\n if ( !$result ) {\n watchdog( 'queue2civicrm', 'Failed logging the transaction: %log', array( \"%log\" => print_r( $log, true )), WATCHDOG_ERROR );\n }\n return $result;\n}", "public static function flusher($queue, $callback) {\n static::$flushers[$queue][] = $callback;\n }", "function enQueue($value) {\n if ($this->isFull()){\n return FALSE;\n }\n $this->data[$this->rear]=$value;\n $this->rear=($this->rear+1)%$this->size;\n return TRUE;\n }", "public function flush(/* ... */)\n {\n $this->_storage = [[], [], []];\n $this->_event_history = [];\n $this->set_state(STATE_DECLARED);\n }", "public function dequeue();", "public function add($entry)\n {\n $this->log[] = $entry;\n while (\\count($this->log) > $this->size) {\n array_shift($this->log);\n }\n }", "public function clearRecordedEvents()\n {\n $this->events = [];\n }", "public function testAppendToOverMaxSizeWithoutAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $this->assertSame(1, count($array));\n }", "public function clear():void{\n $this->size = 0;\n $this->arrayQueue = -1;\n }", "protected function processClearCacheQueue() {}", "function frl_perform_update(){\n\n\t$task_for_out = frl_get_tasks();\n\t$log_for_out = frl_get_log();\n\t$log_queue = frl_get_log_queue();\n\n\t$step = count($log_for_out);\n\tif($step > $log_queue){\n\t\tfrl_perform_reset();\n\t\treturn;\n\t}\n\n\t//add action into log\n\t$new_line = $log_queue[$step]; \n\tarray_unshift($log_for_out, $new_line);\n\n\t$file = dirname(__FILE__).'/data/log-out.csv'; \n $csv_handler = fopen($file,'w');\n foreach ($log_for_out as $l) {\n \tfputcsv($csv_handler, $l, \",\");\n }\n fclose($csv_handler);\n\n //change status of task\n if($new_line[2] == 'Запрос уточнения'){\n \t//change status to Ждет уточнения\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Ждет уточнения');\n }\n\n if($new_line[2] == 'Отклик на задачу'){\n \t//change status to Подтверждено\n \t$task_for_out = frl_change_task_status($task_for_out, $new_line[4], 'Подтверждено');\n }\n\n $file = dirname(__FILE__).'/data/tasks-out.csv';\n $csv_handler = fopen($file,'w');\n foreach ($task_for_out as $t) {\n \tfputcsv($csv_handler, $t, \",\");\n }\n fclose($csv_handler);\n\n}", "function pushCurrentTimeLog()\n\t{\n\t\tarray_push($this->Time_Log, $this->Current_TimeLog);\n\t\t$this->setCurrentTimeLog(NULL);\n\t}", "public function testAppendToOverMaxSizeWithAccessToSpecific()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n }\n $array[1];\n $array[2];\n $array[3];\n $array[] = $i;\n $this->assertSame(4, count($array));\n }", "public function deleteRear()\n {\n //if queue has only one element\n if($this->rear == $this->front){\n $newData = $this->array[$this->rear];\n $this->rear = $this->front = -1;\n self::$size--;\n }\n else{\n $newData = $this->array[$this->rear];\n $this->rear = $this->rear-1;\n self::$size--;\n }\n return $newData;\n }", "public function handle()\n {\n $start = time();\n\n $PATH_QUEUE_LOG = env('ASTK_PATH_QUEUE_LOG','/var/log/asterisk/');\n\n $handle = fopen($PATH_QUEUE_LOG . \"queue_log\", \"r\");\n $linecount = 0;\n while(!feof($handle)){\n $line = fgets($handle);\n $linecount++;\n }\n fclose($handle);\n $handle = fopen($PATH_QUEUE_LOG . \"queue_log\", \"r\");\n if ($handle) {\n $bar = $this->output->createProgressBar($linecount);\n while (($line = fgets($handle)) !== false) {\n $array = explode(\"|\",$line);\n $time = gmdate('Y-m-d H:i:s', $array[0]);\n $callId = trim($array[1]);\n $queueName = trim($array[2]);\n $agent = trim($array[3]);\n $event = trim($array[4]);\n $data1 = (count($array) > 5 ? trim($array[5]) : '');\n $data2 = (count($array) > 6 ? trim($array[6]) : '');\n $data3 = (count($array) > 7 ? trim($array[7]) : '');\n $data4 = (count($array) > 8 ? trim($array[8]) : '');\n $data5 = (count($array) > 9 ? trim($array[9]) : '');\n\n $rs = DB::connection('astk')->select(\"select count(*) as qtd from asteriskcdrdb.queue_log \".\n \"where time = '$time' AND callid = '$callId' AND queuename = '$queueName' AND event = '$event'\");\n\n //dd(\"$time|$callId|$queueName|$agent|$event\");\n\n if ($rs[0]->qtd <= 0){\n DB::connection('astk')->insert(\"INSERT INTO queue_log (time,callid,queuename,agent,event,data,data1,data2,data3,data4,data5) VALUES ('$time','$callId','$queueName','$agent','$event',null,'$data1','$data2','$data3','$data4','$data5')\");\n //$this->info(\" \\nInserted: $line\");\n } else {\n //$this->info(\" \\nExists: $line\");\n }\n $bar->advance();\n }\n $bar->finish();\n fclose($handle);\n } else {\n $this->info(\" \\nerror opening the file.\");\n }\n\n $timeDiff = date(\"H:i:s\", time() - $start);\n\n $this->info(\"\\nTime $timeDiff. Done!\");\n }", "public function test_clear_batches() {\n\t\t$this->register_successful_batch( 'hello' );\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 1, $batches );\n\n\t\tlocomotive_clear_existing_batches();\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 0, $batches );\n\t}", "public function rotateLogs()\n\t{\n\t\t$arrFiles = preg_grep('/\\.log$/', scan(TL_ROOT . '/system/logs'));\n\n\t\tforeach ($arrFiles as $strFile)\n\t\t{\n\t\t\t$objFile = new \\File('system/logs/' . $strFile . '.9', true);\n\n\t\t\t// Delete the oldest file\n\t\t\tif ($objFile->exists())\n\t\t\t{\n\t\t\t\t$objFile->delete();\n\t\t\t}\n\n\t\t\t// Rotate the files (e.g. error.log.4 becomes error.log.5)\n\t\t\tfor ($i=8; $i>0; $i--)\n\t\t\t{\n\t\t\t\t$strGzName = 'system/logs/' . $strFile . '.' . $i;\n\n\t\t\t\tif (file_exists(TL_ROOT . '/' . $strGzName))\n\t\t\t\t{\n\t\t\t\t\t$objFile = new \\File($strGzName, true);\n\t\t\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.' . ($i+1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add .1 to the latest file\n\t\t\t$objFile = new \\File('system/logs/' . $strFile, true);\n\t\t\t$objFile->renameTo('system/logs/' . $strFile . '.1');\n\t\t}\n\t}", "public function testRollbarLoggerFlush(): void\n {\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n ]);\n Rollbar::log(LogLevel::WARNING, \"Testing PHP Notifier\");\n Rollbar::flush();\n $this->assertVerboseLogContains('Queue flushed', LogLevel::DEBUG);\n }", "private function prepareQueue(int $resultLength)\n {\n $this->queue = new SplPriorityQueue();\n $this->queue->setExtractFlags(SplPriorityQueue::EXTR_PRIORITY);\n\n $itemsInTree = $this->tree->getItemCount();\n\n if ($itemsInTree < $resultLength) {\n $resultLength = $itemsInTree;\n }\n\n for ($i = 0; $i < $resultLength; $i++) {\n $this->queue->insert(null, INF);\n }\n\n $this->maxQueuedDistance = INF;\n }", "public function ReconcileQueues()\n {\n $xml = file_get_contents($this->StatsDir);\n $XML = simplexml_load_string($xml);\n foreach ($XML->data->queue as $i => $q) {\n $NAME = (string) $q->name[0];\n list($DOMAIN, $VMTA) = explode('/', $NAME);\n $LONGIP = ip2long(trim($VMTA));\n if (isset($this->TDOMS[$DOMAIN]) && ($DOMAIN!=='*') && ($VMTA!=='*'))\n if (!isset($this->PoolIPs[$LONGIP]))\n $this->ALERTS[] = FAIL.\" No Queued Jobs for \".$DOMAIN.' on VMTA: '.$VMTA.WHT;\n else {\n $POOL = $this->PoolIPs[$LONGIP];\n $TARGET = $this->TDOMS[$DOMAIN];\n $SIZE = (string) $q->rcp[0];\n $MODE = (string) $q->mode[0];\n $PAUSED = (string) $q->paused[0];\n $RETRY = empty($q->retryTime)?'00:00:00':(string) $q->retryTime[0];\n $ER = [];\n foreach ($q->event as $event)\n $ER[] = (string) $event->text[0];\n if ($SIZE >= $this->Low) \n unset($this->Pools[$POOL]['ips'][$LONGIP][$TARGET]);\n }\n }\n if (empty($this->Pools)) {\n $this->ALERTS[] = FAIL.\" No low Queues Found\";\n return false;\n }\n return $this->CompileJobs();\n }", "public function clean()\r\n {\r\n if (file_exists($this->_configsFile)) {\r\n $configsFile = $this->_configsFile;\r\n $queueFile = $this->_queueFile;\r\n $fp_configs = fopen($configsFile, 'r');\r\n flock($fp_configs, LOCK_EX);\r\n $configs = file_get_contents($configsFile);\r\n\r\n $configs = unserialize($configs);\r\n if (!is_array($configs)) {\r\n $configs = array();\r\n }\r\n if ($configs) {\r\n $cursorFiles = array();\r\n foreach ($configs as $config) {\r\n $config['silent'] = true;\r\n $FileQueue = new FileQueue($config);\r\n $cursorFiles[] = $cursorFile = $FileQueue->getCursorFile();\r\n }\r\n\r\n $fp_cursors = array();\r\n foreach ($cursorFiles as $cursorFile) {\r\n $fp_cursors[] = fopen($cursorFile, 'r+');\r\n }\r\n\r\n foreach ($fp_cursors as $fp_cursor) {\r\n flock($fp_cursor, LOCK_EX);\r\n }\r\n\r\n $fp_queueFile = fopen($queueFile, 'r+b');\r\n flock($fp_queueFile, LOCK_EX);\r\n\r\n rewind($fp_queueFile);\r\n ftruncate($fp_queueFile, 0);\r\n rewind($fp_queueFile);\r\n\r\n foreach ($fp_cursors as $fp_cursor) {\r\n rewind($fp_cursor);\r\n ftruncate($fp_cursor, 0);\r\n fwrite($fp_cursor, \"0,1\");\r\n }\r\n\r\n flock($fp_queueFile, LOCK_UN);\r\n\r\n $reverse_fp_cursors = array_reverse($fp_cursors);\r\n foreach ($reverse_fp_cursors as $reverse_fp_cursor) {\r\n flock($reverse_fp_cursor, LOCK_UN);\r\n }\r\n\r\n foreach ($fp_cursors as $fp_cursor) {\r\n fclose($fp_cursor);\r\n }\r\n }\r\n flock($fp_configs, LOCK_UN);\r\n fclose($fp_configs);\r\n }\r\n }", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "public function testReadAllDataAndCompareTheValueFromPreviousTest()\n {\n $store = new Storage(TESTING_STORE);\n\n // let assign our data result into variable\n $items = $store->read();\n\n // mapping msg value from items\n $item_messages = array_map(function (&$val) {\n return $val['msg'];\n }, $items);\n\n // mapping msg value from batch dummy\n $batch_dummy = array_map(function (&$val) {\n return $val['msg'];\n }, $this->batch_dummy);\n\n // here we make a test that count diff values from data between 2 array\n $diff_count = count(array_diff($item_messages, $batch_dummy));\n $this->assertEquals(0, $diff_count);\n }", "public function testRollbarLoggerSendBatched(): void\n {\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n 'batched' => true,\n ]);\n Rollbar::log(LogLevel::INFO, \"Testing PHP Notifier\");\n $this->assertVerboseLogContains('Added payload to the queue \\(running in `batched` mode\\)\\.', LogLevel::DEBUG);\n }", "function garbageCollect() {\n\t\tif ( !mt_rand( 0, 100 ) ) {\n\t\t\t$nowtime = time();\n\t\t\t/* Avoid repeating the delete within a few seconds */\n\t\t\tif ( $nowtime > ($this->lastexpireall + 1) ) {\n\t\t\t\t$this->lastexpireall = $nowtime;\n\t\t\t\t$this->expireall();\n\t\t\t}\n\t\t}\n\t}", "public function erase_history()\n {\n $this->_event_history = [];\n }", "function _free_keybuf()\n\t{\n\t\t// free the buffers\n\t\tfor ($i = 0; $i < $this->max_klen; $i++)\n\t\t{\n\t\t\tif (isset($this->key_buffer[$i]))\n\t\t\t\tunset($this->key_buffer[$i]);\n\t\t\tunset($this->key_index[$i]);\n\t\t}\n\t\tunset($this->dat_buffer);\n\t\t$this->key_buffer = array();\n\t\t$this->key_index = array();\n\t\t$this->dat_buffer = '';\n\t}", "protected function cleanHistory()\n\t{\n\t\t$this->taskHistoryRepository->deleteOlderThanDays($this->maxHistoryDays);\n\t\t$this->taskHistoryRepository->deleteOverCount($this->maxHistoryRecords);\n\t}", "public function runQueue();", "function royal_flush(array $hand) {\n if (!pocker_flush($hand)) return false;\n $straight = straight($hand);\n if (!$straight) return false;\n if ($straight['value'] !== 'T') return false;\n\n return ['value' => true, 'remaining' => []];\n}", "function dblog_clear_log_submit() {\n $_SESSION['dblog_overview_filter'] = array();\n db_truncate('watchdog')->execute();\n db_query('alter sequence watchdog_wid_seq restart');\n drupal_set_message(t('Database log cleared.'));\n}", "public function queueItems() {\n if (!$this->read_only) {\n $this->datasource()->startTracking(array($this));\n }\n }", "public function cron($timeLimit = self::CRON_EXEC_TIME, $workerID = self::WORKER_ID)\n {\n $start = microtime(true);\n $workerID = $this->setWorkerID($workerID);\n $log = [];\n $lastCount = -1;\n while (count($log) > $lastCount &&\n (\n empty($timeLimit) ||\n $timeLimit > (microtime(true) - $start)\n )\n ) {\n $lastCount = count($log);\n $query = $this->pdo->prepare(<<<SQL\nUPDATE robotstxt__cache1\nSET worker = :workerID\nWHERE worker IS NULL AND nextUpdate <= UNIX_TIMESTAMP()\nORDER BY nextUpdate ASC\nLIMIT 1;\nSQL\n );\n $query->bindValue('workerID', $workerID, \\PDO::PARAM_INT);\n $query->execute();\n $query = $this->pdo->prepare(<<<SQL\nSELECT base\nFROM robotstxt__cache1\nWHERE worker = :workerID\nORDER BY nextUpdate DESC\nLIMIT 10;\nSQL\n );\n $query->bindValue('workerID', $workerID, \\PDO::PARAM_INT);\n $query->execute();\n while ($baseUri = $query->fetch(\\PDO::FETCH_COLUMN)) {\n if ((new Base($this->pdo, $baseUri, $this->curlOptions, $this->byteLimit))->refresh()) {\n $log[(string)microtime(true)] = $baseUri;\n }\n }\n }\n return $log;\n }", "public function shuffleEntries(Pool $pool)\n {\n //Validator should already have shuffled it.\n if (!$shuffled = $this->entryShuffler->shuffleEntries($pool)) {\n return false;\n }\n\n foreach ($pool->getEntries() as $key => $entry) {\n $match = $shuffled[$key];\n $entry->setEntry($match)\n ->setUrl(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36));\n\n $this->em->persist($entry);\n }\n\n $this->em->flush();\n }", "function clear_logs_entry(string $logs_filepath, int $index): void {\n $file = null;\n switch ($index) {\n case ALL_ENTRIES:\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n break;\n case LATEST_ENTRY:\n $lines = file($logs_filepath);\n unset($lines[count($lines) - 1]);\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n foreach ($lines as $line) {\n fwrite($file, $line);\n }\n break;\n default:\n $lines = file($logs_filepath);\n unset($lines[$index - 1]);\n $lines = array_values($lines);\n $file = fopen($logs_filepath, \"w\");\n flock($file, LOCK_EX);\n foreach ($lines as $line) {\n fwrite($file, $line);\n }\n break;\n }\n flock($file, LOCK_UN);\n fclose($file);\n }", "public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }", "public function append ($path)\n {\n // make sure we don't have a duplicate filename - highly unusual as two people should not be using Studio/MB concurrently, but when testing quite possible to do two appends within one second...\n // because so unlikely in normal use we handle this the naive way by waiting a second so our naming scheme doesn't get overelaborated\n $retries = 0 ;\n\n $now = TimeDate::getInstance()->getNow();\n $new_file = null;\n for($retries = 0; !file_exists($new_file) && $retries < 5; $retries ++)\n {\n $now->modify(\"+1 second\");\n $time = $now->__get('ts');\n $new_file = $this->getFileByTimestamp( $time );\n }\n // now we have a unique filename, copy the file into the history\n copy ( $path, $new_file ) ;\n \t $this->_list [ ] = $time ;\n\n // finally, trim the number of files we're holding in the history to that specified in the configuration\n // truncate the oldest files, keeping only the most recent $GLOBALS['sugar_config']['studio_max_history'] files (zero=keep them all)\n $to_delete = $this->getCount() - $this->_historyLimit;\n if ($this->_historyLimit != 0 && $to_delete)\n {\n // most recent files are at the end of the list, so we strip out the first count-max_history records\n // can't just use array_shift because it renumbers numeric keys (our timestamp keys) to start from zero...\n for ( $i = 0 ; $i < $to_delete ; $i ++ )\n {\n $timestamp = array_shift( $this->_list ) ;\n if (! unlink ( $this->getFileByTimestamp( $timestamp ) ))\n {\n $GLOBALS [ 'log' ]->warn ( \"History.php: unable to remove history file {$timestamp} from directory {$this->_dirname} - permissions problem?\" ) ; }\n }\n }\n\n // finally, remove any history preview file that might be lurking around - as soon as we append a new record it supercedes any old preview, so that must be removed (bug 20130)\n if (file_exists($this->_previewFilename))\n {\n $GLOBALS [ 'log' ]->debug( get_class($this).\"->append(): removing old history file at {$this->_previewFilename}\");\n unlink($this->_previewFilename);\n }\n\n return $time ;\n }", "function readLog()\n {\n $file = fopen(\"../log.txt\", \"r\");\n\n while (!feof($file)) {\n $text = fgets($file);\n $line = explode('_', $text);\n\n if (isset($line[1])){\n if (!isset($log[$line[0]]))\n $log[$line[0]] = [];\n\n array_push($log[$line[0]], $line[1]);\n }\n }\n\n fclose($file);\n\n return $log;\n }", "protected function _balanceQueues(){\n// $this->RUNNING = false;\n }", "public function flushNotificationQueue() {\r\n\t\t// Logfile entries\r\n\t\tforeach ($this->notificationQueue as $key => $message) {\r\n\t\t\t// Log the message\r\n\t\t\t$this->log($message);\r\n\t\t}\r\n\t\t$sendNotifications = Configure::read('Alert.send');\r\n\t\tif (!$sendNotifications) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Email notifications\r\n\t\tforeach ($this->notificationQueue as $key => $message) {\r\n\r\n\t\t\t$this->sendAlertEmail($message);\r\n\r\n\r\n\t\t\t// Limit the amount of messages we're going to send out in a period of time...\r\n\t\t\t// 1/4 of a second is enough here.\r\n\t\t\tusleep(250000);\r\n\t\t}\r\n\r\n\t\t// Pushover Notifications\r\n\t\tforeach ($this->notificationQueue as $key => $message) {\r\n\t\t\t// Send out notifications through Pushover\r\n\r\n\t\t\t$this->sendPushoverAlert($message);\r\n\r\n\t\t\t// Limit the amount of messages we're going to send out in a period of time...\r\n\t\t\t// We don't want to get ourselves banned from Pushover...\r\n\t\t\t// 1/4 of a second should suffice\r\n\t\t\tusleep(250000);\r\n\t\t}\r\n\r\n\r\n\t}", "static function send_buffer()\n {\n self::log_debug('Start sending buffer ...');\n\n $requests_sent = 0;\n $buffer_file = self::$log_dir . self::$log_file_buffer;\n $buffer_file_tmp = self::$log_dir . self::$log_file_buffer . '.' . rand(1, 100000) . '.tmp';\n\n try {\n\n if (!is_file($buffer_file)) {\n self::log_debug('Buffer file does not exists, nothing found to sent.');\n return false;\n }\n\n // take the current buffer and put it inside a unique tmp buffer\n rename($buffer_file, $buffer_file_tmp);\n\n // read and process the tmp buffer\n $fh = fopen($buffer_file_tmp, \"r\");\n if ($fh) {\n while (!feof($fh)) {\n $data_serialized = fgets($fh);\n\n if ($data_serialized == false) {\n continue;\n }\n\n $data = unserialize($data_serialized);\n \n if (self::send($data['e'], $data['m'], $data['d'])) {\n $requests_sent++;\n }\n }\n fclose($fh);\n }\n unlink($buffer_file_tmp);\n\n self::log_debug('Queue was sent successfully! Sent ' . $requests_sent . ' requests.');\n } catch (Exception $e) {\n self::log_error($e->getMessage());\n }\n }", "function push($x) {\n return array_push($this->queue,$x);\n }", "public static function purge($time=NULL) {\r\n $lines = file(self::FILE_NAME);\r\n $report = NULL;\r\n\r\n if (!$time) $time = time() - 120;\r\n\r\n if (is_array($lines)) {\r\n foreach ($lines as $line) {\r\n if (rtrim($line)) {\r\n $elements = explode(\"\\t\", $line);\r\n if ($elements[1] < $time) {\r\n $report[] = $elements[0];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $report;\r\n }", "public function createQueue($filterArray, $operations, $offset, $limit, $queueId);", "function queue_dequeue(&$queue) { \n // Just use array unshift \n return array_shift($queue); \n}", "public function popRecordedEvents(): array\n\t{\n\t\t$pendingEvents = $this->recordedEvents;\n\n\t\t$this->recordedEvents = [];\n\n\t\treturn $pendingEvents;\n\t}", "function CleanUniqueRecords(&$rArray) {\n\t\t$n=count($rArray);\n\t\t$LastN=$n;\n\t\t$i=0;\n\t\twhile ($i<$n-1) {\n\t\t\t$k=$i+1;\n\t\t\twhile ($k<$n) {\n\t\t\t\tif ($rArray[$i][0]==$rArray[$k][0]) {\n\t\t\t\t\tfor ($j=$k;$j<$n-1;$j++) {\n\t\t\t\t\t\tfor ($h=0;$h<count($rArray[$j]);$h++) {\n\t\t\t\t\t\t\t$rArray[$j][$h]=$rArray[$j+1][$h];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t$n --;\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$k++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\tfor ($i=$n;$i<$LastN;$i++) {\n\t\t\t$DummyVar=array_pop($rArray);\n\t\t}\n\t}", "public function testSetGet_log() {\n\t\t$expected_time = time();\n\t\tfor ( $i = 0; $i < 100; $i++ ) {\n\t\t\t$this->config->log( WP_Backup::BACKUP_STATUS_WARNING, 'WARNING' );\n\t\t}\n\n\t\t$history = $this->config->get_history();\n\t\t$this->assertEquals( 100, count( $history ) );\n\n\t\t$this->config->log( WP_Backup::BACKUP_STATUS_FAILED, 'FAILED' );\n\t\t$history = $this->config->get_history();\n\t\t$this->assertEquals( 100, count( $history ) );\n\n\t\tlist( $time, $status, $msg ) = array_shift( $history );\n\t\t$this->assertEquals( $expected_time, $time );\n\t\t$this->assertEquals( WP_Backup::BACKUP_STATUS_FAILED, $status );\n\t\t$this->assertEquals( 'FAILED', $msg );\n\n\t\tfor ( $i = 0; $i < 99; $i++ ) {\n\t\t\tlist( $time, $status, $msg ) = array_shift( $history );\n\t\t\t$this->assertEquals( $expected_time, $time );\n\t\t\t$this->assertEquals( WP_Backup::BACKUP_STATUS_WARNING, $status );\n\t\t\t$this->assertEquals( 'WARNING', $msg );\n\t\t}\n\t}", "public function testOrderedQueueArrayAccess_for() {\n\t\t\t$o = array();\n\n\t\t\t// add objects...\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\n\t\t\t// assertions\n\t\t\tfor($i=0;$i<4;$i++) $this->assertSame($o[$i], $this->oq[$i]);\n\t\t}", "public function dequeueItems() {\n $this->datasource()->stopTracking(array($this));\n _search_api_empty_cron_queue($this);\n }", "function MaintainEmptyUnimportantLogs()\n{\n\tglobal $context, $txt;\n\n\tcheckSession();\n\n\t// No one's online now.... MUHAHAHAHA :P\n\t// Dump the banning and spam logs.\n\twesql::query('TRUNCATE {db_prefix}log_online');\n\twesql::query('TRUNCATE {db_prefix}log_floodcontrol');\n\n\t// Start id_error back at 0 and dump the error log.\n\twesql::query('TRUNCATE {db_prefix}log_errors');\n\n\t// Last but not least, the search logs!\n\twesql::query('TRUNCATE {db_prefix}log_search_topics');\n\twesql::query('TRUNCATE {db_prefix}log_search_messages');\n\twesql::query('TRUNCATE {db_prefix}log_search_results');\n\n\tupdateSettings(array('search_pointer' => 0));\n\n\t$context['maintenance_finished'] = $txt['maintain_logs'];\n}", "protected function resetOldBeingIndexedEntries()\n {\n $timeLimit = $this->getMinutesToKeepBeingIndexedEntries();\n $resetCount = $this->resetItemsBeingIndexed($timeLimit);\n if ($resetCount > 0) {\n tx_rnbase_util_Logger::warn(\n 'Items in queue are resetted because they are in state \"being_indexed\" '.\n 'longer than the configured amount of time. Check that, if it occurs multiple times.',\n 'mksearch',\n [\n 'itemResetCount' => $resetCount,\n 'configuredTimeLimitInMin' => $timeLimit,\n ]\n );\n }\n\n return $resetCount;\n }", "protected function execute() \n {\n /** @var float */\n static $lastCleanUpTime = -999999999;\n\n $incCount = $this->_redis->getIncomingSize();\n if ($incCount > 0) {\n $this->log(\"$incCount elements in queue.\");\n $this->_redis->processMultiple($this->_redis->getIncoming(2000));\n }\n\n if ($this->_upTime() - $lastCleanUpTime > $this->ini['ttl']) {\n $this->_redis->cleanIndexes();\n $lastCleanUpTime = $this->_upTime();\n }\n }", "public function clearHistorys()\n\t{\n\t\t$this->collHistorys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearHistory()\r\r\n {\r\r\n $this->history = array();\r\r\n }", "public function insertAtRear($newData)\n {\n if($this->front== -1 && $this->rear== -1){\n $this->array[++$this->rear] = $newData;\n $this->front = $this->rear;\n self::$size++;\n }\n //If queue contains elements\n else{\n $this->rear = $this->rear+1;\n $this->array[$this->rear] = $newData;\n self::$size++;\n }\n }" ]
[ "0.6110949", "0.5961492", "0.50874597", "0.49682108", "0.49598435", "0.49430254", "0.49205628", "0.47151068", "0.4712714", "0.47123906", "0.47057217", "0.46693307", "0.4647618", "0.4619267", "0.46137637", "0.46044245", "0.45768133", "0.45693743", "0.45657006", "0.45527217", "0.45475635", "0.4532784", "0.45127833", "0.45089743", "0.44883355", "0.4480783", "0.44806", "0.44679716", "0.439793", "0.43920556", "0.43738538", "0.4360005", "0.43495646", "0.43348163", "0.4331461", "0.43229145", "0.4305701", "0.43050438", "0.42914018", "0.42901757", "0.42859843", "0.42853338", "0.4284983", "0.42831504", "0.426826", "0.42597693", "0.42535117", "0.4248466", "0.4231555", "0.4224083", "0.42184737", "0.42180562", "0.42167923", "0.42093855", "0.42049566", "0.4195546", "0.41922906", "0.41889524", "0.4188226", "0.41832045", "0.41828653", "0.41823357", "0.41758934", "0.41690367", "0.41673124", "0.41526744", "0.41353628", "0.41226888", "0.41204065", "0.41069248", "0.4102405", "0.4092511", "0.40901244", "0.40880358", "0.40836334", "0.40827355", "0.4079418", "0.4075714", "0.40728095", "0.40699518", "0.40624946", "0.4059054", "0.4058713", "0.40586096", "0.40557453", "0.4055062", "0.4053287", "0.40517926", "0.40473866", "0.4045732", "0.40455517", "0.40398946", "0.40369564", "0.40329447", "0.40287432", "0.40273497", "0.40270773", "0.40267968", "0.40259978", "0.40223265" ]
0.6718232
0
Prints all checkLogQ messages to the console
function printCheckLogQ(){ global $checkLogQ; foreach($checkLogQ as $message){ print($message); } $checkLogQ = array(); // reset a variable to an empty array }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function printErrorLog() {}", "public static function print_log() {\n $line_break = PHP_SAPI != \"cli\" ? \"<hr/>\" : PHP_EOL; //If not cmd. EOL is a cross platform new line\n //generate a string and output\n foreach (self::$log_message as &$log) {\n $log = \"* \".$log;\n echo $log . $line_break;\n }\n //Create header with timestamp\n self::construct_header();\n array_unshift(self::$log_message,PHP_EOL);\n //Write and display\n self::write_to_file();\n self::clear_log();\n }", "public function print_log() {\r\n if ($this->logger) {\r\n $this->logger->print_log();\r\n }\r\n }", "protected function printLogMgm() {}", "public function actionCheck()\n {\n $version = $this->module->version;\n $this->stdout(\"\\nPodium mail queue check v{$version}\\n\");\n $this->stdout(\"------------------------------\\n\");\n $this->stdout(\" EMAILS | COUNT\\n\");\n $this->stdout(\"------------------------------\\n\");\n \n $pending = (new Query)->from($this->queueTable)->where(['status' => Email::STATUS_PENDING])->count();\n $sent = (new Query)->from($this->queueTable)->where(['status' => Email::STATUS_SENT])->count();\n $gaveup = (new Query)->from($this->queueTable)->where(['status' => Email::STATUS_GAVEUP])->count();\n \n $showPending = $this->ansiFormat($pending, Console::FG_YELLOW);\n $showSent = $this->ansiFormat($sent, Console::FG_GREEN);\n $showGaveup = $this->ansiFormat($gaveup, Console::FG_RED);\n \n $this->stdout(\" pending | $showPending\\n\");\n $this->stdout(\" sent | $showSent\\n\");\n $this->stdout(\" stucked | $showGaveup\\n\");\n $this->stdout(\"------------------------------\\n\\n\");\n }", "public function logs()\n {\n $this->_display('logs');\n }", "public function printResults() {\n $assertions = $this->getAssertions();\n $failures = $this->getFailures();\n $errors = $this->getErrors();\n return \"Assertions: \" . $assertions . \", Failures: \" . $failures . \" and \" . $errors . \" errors.\";\n }", "public function printTSlog() {}", "public function printTSlog() {}", "public function exec()\n {\n $report = $this->getReport();\n $this->msg = CheckMessage::report($report);\n }", "function scaffold_log() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\t$msg = print_r($arg, true);\n\t\terror_log($msg);\n\t}\n}", "protected function _showFinalMessages()\n {\n if ($this->_errors) {\n $this->_output->writeln(\n \"<fg=red>There was some errors on setting configuration: \\n{$this->_errors}</fg=red>\"\n );\n }\n\n if ($this->_warnings) {\n $this->_output->writeln(\n \"<comment>There was some warnings on setting configuration: \\n{$this->_warnings}</comment>\"\n );\n }\n\n if ($this->_configurationCounter > 0) {\n $this->_output->writeln(\n \"<info>Configuration has been applied</info>\"\n );\n\n $this->_output->writeln(\n \"<info>Total changed configurations: {$this->_configurationCounter}</info>\"\n );\n } else {\n $this->_output->writeln(\n \"<error>There was no configuration applied.</error>\"\n );\n }\n }", "public function printSuccessMessage()\n {\n printf('Successfully checked %d lines in %d files :)'. PHP_EOL, $this->lines, $this->files);\n }", "function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }", "function getMessagesPrint(){\r\n foreach ($this->messages as $key => $value) {\r\n echo $this->messagePrefixForPrint.$value.\"<br>\\n\";\r\n }\r\n }", "public function logResults() {\n\t\tforeach ( $this->records as $outcome) {\n\t\t\t$this->log($outcome);\n\t\t}\n\t}", "public static function logging()\n {\n }", "public function logResult() : void\n {\n $log = implode(' ', $this->logArray);\n $logger = new Logger('Results');\n $logger->pushHandler(new StreamHandler('file.log', Logger::DEBUG));\n $logger->addInfo($log);\n }", "public function displayLogs() {\n global $mwAdminDB; // db connection \n\n return ($mwAdminDB->displayLogs());\n }", "public static function log($msg, $nl = true) {\n\n if (!defined('CHECKOUT_DEBUG')) return;\n\n echo $msg . ($nl ? self::interfaceBr() : '');\n }", "public function log()\n {\n $this->fetchFields();\n Log::console($this);\n }", "public function log()\r\n {\r\n echo $this->message.PHP_EOL;\r\n }", "public function writeMessages()\n {\n /**\n * Messages so far have their own PHP_EOL at the end of them,\n * so I don't implode them using PHP_EOL.\n *\n */\n echo implode(\"\", $this->messages);\n }", "protected\n function console_log( array $logs )\n {\n if ( count($logs) == 0 ) {\n return;\n }\n $lines = array();\n foreach ($logs as $data) {\n $json = json_encode((is_array($data) || is_object($data))\n ? $data\n : trim($data));\n $lines[] = \"window.console.log($json);\";\n }\n $lines = implode('', $lines);\n $output = \"<script>if(window.console){if(window.console.log){$lines}}</script>\";\n echo $output;\n }", "function console() {\n\n\t\t$args = func_get_args();\n\t\t$message = '[' . date('m/d,H:i:s') . '] ' . call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\tdoLog($message);\n\t\tflush();\n\t}", "function console() {\n\t\t$args = func_get_args();\n\t\t$message = '['.date('m/d,H:i:s').'] '.call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\t//doLog($message);\n\t\tflush();\n\t}", "public static function getQueryLog()\n {\n }", "public function printLogMessages($bPrintLogMessages = false)\n\t{\n\t\t$this->bPrintLogMessages = $bPrintLogMessages;\n\t}", "public function logs() {\n\t\t$this->out('Deleting logs:');\n\t\tif (!empty($this->args)) {\n\t\t\tforeach ($this->args as $arg) {\n\t\t\t\tif (!is_dir(LOGS . $arg)) {\n\t\t\t\t\t$this->err('No log dir \\'' . $arg . '\\'');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->out('\\'' . $arg . '\\' emptied');\n\t\t\t\t$this->_empty(LOGS . $arg);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_empty(LOGS);\n\t\t\t$this->out('All log files deleted');\n\t\t}\n\t}", "static public function logAll()\r\n\t{\r\n\t\t$db = false; $origin = __CLASS__.'::'.__FUNCTION__;\r\n\t\t$lines = func_get_args();\r\n\t\tif ($db) {\r\n\t\t\tvar_dump($origin, 'LINES', $lines, 'COUNT', count($lines) );\r\n\t\t}\r\n\t\tif (1 > count($lines) ) { // aucun argument !\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$tab = array();\r\n\t\t$last = count($lines)-1;\r\n\r\n\t\t$priorities = self::getPriorities();\r\n\t\t// var_dump('prio', $lines[$last]);\r\n\t\t$p = NULL; $priority = $lines[$last];\r\n\t\tif (self::isValidPriority($priority) ) {\r\n\t\t\t$p = $lines[$last];\r\n\t\t\tunset($lines[$last]);\r\n\t\t}\r\n\t\tforeach ($lines AS $v) {\r\n\t\t\tself::log($v, $p);\r\n\t\t}\r\n\t}", "public function showMessages()\n {\n $messages = $this->getMessages();\n foreach ($messages as $message) {\n echo $message . \"\\n\";\n }\n }", "public function getLog();", "public static function debug()\n {\n foreach (func_get_args() as $message) {\n if (is_null($message))\n $message = 'NULL';\n if (!is_string($message))\n $message = print_r($message, true);\n static::_log(self::DEBUG, $message);\n }\n }", "protected function debug($msg)\n {\n if(self::DEBUG)\n {\n error_log('epfl-quota: '.$msg);\n }\n }", "public static function debug() {\n $args = func_get_args();\n self::log(count($args) === 1 ? current($args) : $args);\n }", "function startQueue(){\n\n // Maintain the array checkLogQ as a FIFO buffer with length 4.\n // When a new entry is added, remove oldest entry and shuffle.\n function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }\n // Prints all checkLogQ messages to the console \n function printCheckLogQ(){\n global $checkLogQ;\n foreach($checkLogQ as $message){\n print($message);\n }\n $checkLogQ = array(); // reset a variable to an empty array\n }\n \n try{\n while(true){\n addCheckLog(date('Y/m/d H:i:s').\" Awaiting a message...\\n\");\n\n // Receive messages from queue, maximum waits for 20 seconds for message\n // receive_request - contain all the queue messages\n global $sqs;\n $receive_request = $sqs->receiveMessage(array(\n 'QueueUrl' => ds_config(\"QUEUE_URL\"),\n 'WaitTimeSeconds' => 20,\n 'MaxNumberOfMessages' => 10\n ));\n // Count the amount of messages received\n $msgCount = 0;\n if($receive_request->getPath('Messages') !== NULL){\n $msgCount = count($receive_request->getPath('Messages'));\n }\n addCheckLog(date('Y/m/d H:i:s').\" found $msgCount message(s)\\n\");\n // If at least one message has been received\n if ($msgCount!=0) {\n printCheckLogQ();\n foreach ($receive_request->getPath('Messages') as $msg) {\n messageHandle($msg, $receive_request);\n }\n }\n }\n }\n catch (Exception $e) {\n printCheckLogQ();\n print(date('Y/m/d H:i:s').\" Queue receive error: $e\");\n sleep(5);\n global $restart;\n $restart = true;\n }\n }", "public function writeln($messages = '');", "public static function log()\n {\n dmContext::getInstance()->getLogger()->err(self::formatAsString(func_get_args()));\n }", "function logger() {\n $args = func_get_args();\n foreach( $args as $arg) {\n file_put_contents('php://stderr', print_r( $arg, true) . \"\\n\");\n }\n}", "function dump_queue($flush=true)\n\t{\n\t\techo $this->output_queue;\n\t\tif($flush)\n\t\t{\n\t\t\t$this->output_queue = '';\n\t\t}\n\t\treturn true;\n\t}", "protected function printSqlCheck() {}", "public function printErrors()\n {\n // only 1 error and no filename given = Fatal Error! (Eg. \".editorconfig not found!\")\n if ($this->errors[0]['fileName'] === null && $this->countErrors() === 1) {\n printf('Fatal Error: %s' . PHP_EOL, $this->errors[0]['message']);\n return;\n }\n\n // sort error log by filename\n array_multisort(array_map(function ($element) {\n return $element['fileName'];\n }, $this->errors), SORT_ASC, $this->errors);\n\n $lastFile = '';\n $errorSegment = 0;\n foreach ($this->errors as $error) {\n if ($lastFile !== $error['fileName']) {\n $errorSegment++;\n $lastFile = $error['fileName'];\n printf('%04d) %s' . PHP_EOL, $errorSegment, $error['fileName']);\n }\n\n printf(' %s', $error['message']);\n if (false === empty($error['lineNumber'])) {\n printf(' on line %d', $error['lineNumber']);\n }\n printf(PHP_EOL);\n }\n\n printf(PHP_EOL);\n printf('%d files checked, %d errors occurred' . PHP_EOL, $this->getFiles(), $this->countErrors());\n printf('Check log above and fix the issues.' . PHP_EOL);\n\n if ($this->fixed) {\n printf(\n 'Some of the errors are automatically fixed by this tool, remember to add them to your git repository.'\n );\n }\n }", "public function onFinish(ResultsCollection $results)\n {\n $this->console->writeLine();\n\n // Display information that the check has been aborted.\n if ($this->stopped) {\n $this->console->writeLine('Diagnostics aborted because of a failure.', Color::RED);\n }\n\n // Display a summary line\n if ($results->getFailureCount() == 0 && $results->getWarningCount() == 0 && $results->getUnknownCount() == 0) {\n $line = 'OK (' . $this->total . ' diagnostic checks)';\n $this->console->writeLine(\n str_pad($line, $this->width - 1, ' ', STR_PAD_RIGHT),\n Color::NORMAL, Color::GREEN\n );\n } elseif ($results->getFailureCount() == 0) {\n $line = $results->getWarningCount() . ' warnings, ';\n $line .= $results->getSuccessCount() . ' successful checks';\n\n if ($results->getSkipCount() > 0) {\n $line .= ', ' . $results->getSkipCount() . ' skipped checks';\n }\n\n if ($results->getUnknownCount() > 0) {\n $line .= ', ' . $results->getUnknownCount() . ' unknown check results';\n }\n\n $line .= '.';\n\n $this->console->writeLine(\n str_pad($line, $this->width - 1, ' ', STR_PAD_RIGHT),\n Color::NORMAL, Color::YELLOW\n );\n } else {\n $line = $results->getFailureCount() . ' failures, ';\n $line .= $results->getWarningCount() . ' warnings, ';\n $line .= $results->getSuccessCount() . ' successful checks';\n\n if ($results->getSkipCount() > 0) {\n $line .= ', ' . $results->getSkipCount() . ' skipped checks';\n }\n\n if ($results->getUnknownCount() > 0) {\n $line .= ', ' . $results->getUnknownCount() . ' unknown check results';\n }\n\n $line .= '.';\n\n $this->console->writeLine(\n str_pad($line, $this->width, ' ', STR_PAD_RIGHT),\n Color::NORMAL, Color::RED\n );\n }\n\n $this->console->writeLine();\n }", "private static function print_log_database($title, $db_log) {\n\t//--\n\t$log = '';\n\t//--\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>'.Smart::escape_html($title).' :: DATABASE Queries</b></font></div>';\n\t//--\n\t$max = Smart::array_size($db_log['log']);\n\tif(is_array($db_log) AND ($max > 0)) {\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\">Total Queries Number: <b>'.Smart::escape_html(Smart::format_number_int($db_log['total-queries'], '+')).'</b></div>';\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\">Total Queries Time: <b>'.Smart::escape_html(Smart::format_number_dec($db_log['total-time'], 9, '.', '')).' sec.'.'</b></div>';\n\t\t$num = 0;\n\t\tfor($i=0; $i<$max; $i++) {\n\t\t\t//--\n\t\t\t$tmp_arr = (array) $db_log['log'][$i];\n\t\t\t//--\n\t\t\tswitch((string)$tmp_arr['type']) {\n\t\t\t\tcase 'transaction':\n\t\t\t\t\t//--\n\t\t\t\t\t$num++;\n\t\t\t\t\t//--\n\t\t\t\t\t$tmp_color = '#339900';\n\t\t\t\t\t//--\n\t\t\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:12px; color:'.$tmp_color.';\">';\n\t\t\t\t\t$log .= $num.'. '.'<b>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html($tmp_arr['data']), true).'</b>';\n\t\t\t\t\tif((string)$tmp_arr['connection'] != '') {\n\t\t\t\t\t\t$log .= ' @ '.Smart::escape_html($tmp_arr['connection']);\n\t\t\t\t\t} //end if\n\t\t\t\t\tif($tmp_arr['time'] > 0) {\n\t\t\t\t\t\t$log .= '<br><span style=\"padding:1px;\"><b>@Time: '.Smart::format_number_dec($tmp_arr['time'], 9, '.', '').' sec.</b></span>';\n\t\t\t\t\t} //end if\n\t\t\t\t\tif((string)$tmp_arr['query'] != '') {\n\t\t\t\t\t\t$log .= '<br><span class=\"smartframework_debugbar_status_highlight\" style=\"padding:1px;\"><b>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html($tmp_arr['query']), true).'</b></span>';\n\t\t\t\t\t} //end if\n\t\t\t\t\t$log .= '</div>';\n\t\t\t\t\t//--\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'set':\n\t\t\t\tcase 'count':\n\t\t\t\tcase 'read':\n\t\t\t\tcase 'write':\n\t\t\t\tcase 'sql':\n\t\t\t\tcase 'nosql':\n\t\t\t\t\t//--\n\t\t\t\t\tif((string)$tmp_arr['skip-count'] != 'yes') {\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t} //end if\n\t\t\t\t\t//--\n\t\t\t\t\tif((string)$tmp_arr['type'] == 'count') {\n\t\t\t\t\t\t$tmp_color = '#557788';\n\t\t\t\t\t} elseif((string)$tmp_arr['type'] == 'read') {\n\t\t\t\t\t\t$tmp_color = '#665599';\n\t\t\t\t\t} elseif((string)$tmp_arr['type'] == 'write') {\n\t\t\t\t\t\t$tmp_color = '#113377';\n\t\t\t\t\t} elseif((string)$tmp_arr['type'] == 'set') {\n\t\t\t\t\t\t$tmp_color = '#333333';\n\t\t\t\t\t} else { // nosql\n\t\t\t\t\t\t$tmp_color = '#111111';\n\t\t\t\t\t} //end if else\n\t\t\t\t\t//--\n\t\t\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:11px; color:'.$tmp_color.';\">';\n\t\t\t\t\tif((string)$tmp_arr['skip-count'] != 'yes') {\n\t\t\t\t\t\t$log .= $num.'. ';\n\t\t\t\t\t} //end if else\n\t\t\t\t\t$log .= '<b>'.Smart::escape_html($tmp_arr['data']).'</b>';\n\t\t\t\t\tif((string)$tmp_arr['connection'] != '') {\n\t\t\t\t\t\t$log .= ' @ '.Smart::escape_html($tmp_arr['connection']);\n\t\t\t\t\t} //end if\n\t\t\t\t\t$log .= '<br>';\n\t\t\t\t\tif($tmp_arr['time'] > 0) {\n\t\t\t\t\t\tif($tmp_arr['time'] <= $db_log['slow-time']) {\n\t\t\t\t\t\t\t$log .= '<span style=\"padding:1px;\"><b>@Time: '.Smart::format_number_dec($tmp_arr['time'], 9, '.', '').' sec.</b></span>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$log .= '<span class=\"smartframework_debugbar_status_warn\" style=\"padding:1px;\" title=\"Slow-Time: '.Smart::escape_html($db_log['slow-time']).'\"><b>@Time: '.Smart::format_number_dec($tmp_arr['time'], 9, '.', '').' sec.'.'</b></span>';\n\t\t\t\t\t\t} //end if else\n\t\t\t\t\t} //end if\n\t\t\t\t\tif(is_array($tmp_arr['command'])) {\n\t\t\t\t\t\t$datmod = 'DATA-SETS';\n\t\t\t\t\t} elseif((string)$tmp_arr['command'] != '') {\n\t\t\t\t\t\t$datmod = 'DATA-SIZE';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$datmod = 'ROWS';\n\t\t\t\t\t} //end if else\n\t\t\t\t\tif((string)$tmp_arr['rows'] != '') {\n\t\t\t\t\t\tif($tmp_arr['time'] > 0) {\n\t\t\t\t\t\t\t$log .= ' &nbsp;/&nbsp; ';\n\t\t\t\t\t\t} //end if\n\t\t\t\t\t\tif((string)$tmp_arr['type'] == 'count') {\n\t\t\t\t\t\t\t$log .= '<i>'.'MATCHED '.$datmod.': '.(int)$tmp_arr['rows'].'</i>';\n\t\t\t\t\t\t} elseif((string)$tmp_arr['type'] == 'read') {\n\t\t\t\t\t\t\t$log .= '<i>'.'RETURNED '.$datmod.': '.(int)$tmp_arr['rows'].'</i>';\n\t\t\t\t\t\t} elseif((string)$tmp_arr['type'] == 'write') {\n\t\t\t\t\t\t\t$log .= '<i>'.'AFFECTED '.$datmod.': '.(int)$tmp_arr['rows'].'</i>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$log .= '<i>'.'#'.$datmod.': '.(int)$tmp_arr['rows'].'</i>';\n\t\t\t\t\t\t} //end if\n\t\t\t\t\t} //end if\n\t\t\t\t\tif((string)$tmp_arr['query'] != '') {\n\t\t\t\t\t\t$log .= '<br>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html($tmp_arr['query']), true);\n\t\t\t\t\t\tif(Smart::array_size($tmp_arr['params']) > 0) {\n\t\t\t\t\t\t\t$tmp_params = array();\n\t\t\t\t\t\t\tforeach($tmp_arr['params'] as $key => $val) {\n\t\t\t\t\t\t\t\t$tmp_params[] = SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html('$'.($key+1).' : `'.self::print_value_by_type($val).'`'), true);\n\t\t\t\t\t\t\t} //end foreach\n\t\t\t\t\t\t\t$log .= '<br>'.'@PARAMS:&nbsp;{ '.implode(', ', $tmp_params).' }';\n\t\t\t\t\t\t\t$tmp_params = array();\n\t\t\t\t\t\t} //end if\n\t\t\t\t\t} //end if\n\t\t\t\t\tif(is_array($tmp_arr['command'])) {\n\t\t\t\t\t\t$log .= '<br>'.'@COMMAND-PARAMS:&nbsp;( <pre style=\"display:inline; color:'.$tmp_color.';\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html(self::print_value_by_type((array)$tmp_arr['command'])), true).' )</pre>';\n\t\t\t\t\t} elseif((string)$tmp_arr['command'] != '') {\n\t\t\t\t\t\t$log .= '<br>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(str_replace(array(\"\\r\\n\", \"\\r\", \"\\t\"), array(\"\\n\", \"\\n\", ' '), (string)$tmp_arr['command']))), true);\n\t\t\t\t\t} //end if\n\t\t\t\t\t$log .= '</div>';\n\t\t\t\t\t//--\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'open-close':\n\t\t\t\t\t//--\n\t\t\t\t\t$tmp_color = '#4285F4';\n\t\t\t\t\t//--\n\t\t\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:12px; color:'.$tmp_color.';\">';\n\t\t\t\t\t$log .= '<b>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html($tmp_arr['data']), true).'</b>';\n\t\t\t\t\tif((string)$tmp_arr['connection'] != '') {\n\t\t\t\t\t\t$log .= ' @ '.Smart::escape_html($tmp_arr['connection']);\n\t\t\t\t\t} //end if\n\t\t\t\t\t$log .= '</div>';\n\t\t\t\t\t//--\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'metainfo':\n\t\t\t\tdefault:\n\t\t\t\t\t//--\n\t\t\t\t\t$tmp_color = '#CCCCCC';\n\t\t\t\t\t//--\n\t\t\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:12px; color:'.$tmp_color.';\">';\n\t\t\t\t\t$log .= '<b>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html($tmp_arr['data']), true).'</b>';\n\t\t\t\t\tif((string)$tmp_arr['connection'] != '') {\n\t\t\t\t\t\t$log .= ' @ '.Smart::escape_html($tmp_arr['connection']);\n\t\t\t\t\t} //end if\n\t\t\t\t\t$log .= '</div>';\n\t\t\t\t\t//--\n\t\t\t} //end switch\n\t\t\t//--\n\t\t} //end for\n\t\t//--\n\t} else {\n\t\t//--\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_warn\" style=\"width: 100px; text-align: center;\"><font size=\"2\"><b>N/A</b></font></div>';\n\t\t//--\n\t} //end if\n\t//--\n\treturn $log;\n\t//--\n}", "private static function logging()\n {\n $files = ['Handler', 'Exception', 'Log'];\n $folder = static::$root.'Logging'.'/';\n\n self::call($files, $folder);\n }", "public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }", "private function write($messages) {\n if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {\n $this->output->writeln($messages);\n }\n }", "public function\n\tprintMessages(string $_msgTarget = '')\n\t{\n\t\tforeach($this -> m_aStorage as $_msgType => $_msgSet)\n\t\t{\n\t\t\techo '<div class=\"ui result-box\" data-error=\"'. $_msgType .'\">';\n\t\t\tforeach($_msgSet as $_msg)\n\t\t\t{\n\t\t\t\tif($_msgTarget !== '' && !$_msg -> isMessageTarget($_msgTarget)) continue;\n\t\t\t\techo '<p>'. $_msg -> m_MessageContent .'</p>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t}", "function print_msg($msg) {\n if ( php_sapi_name() == 'cli' ) {\n $msg = preg_replace('#<br\\s*/>#i', \"\\n\", $msg);\n $msg = preg_replace('#<h1>#i', '== ', $msg);\n $msg = preg_replace('#</h1>#i', ' ==', $msg);\n $msg = preg_replace('#<h2>#i', '=== ', $msg);\n $msg = preg_replace('#</h2>#i', ' ===', $msg);\n $msg = strip_tags($msg) . \"\\n\";\n }\n print $msg;\n}", "function printt( $msj ){\r\n switch($this->severity)\r\n {\r\n\t\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\tcase self::LLOG_WARNING: \r\n\t\t\t\t\t\t\t\t\tcase self::LLOG_CRITICAL: \r\n\t\t\t\t\t\t\t\t\tcase self::LLOG_INFO: {\r\n ECHO $msj. \"\\n\"; //$this->log;\r\n break;\r\n }\r\n\t\t\t\t\t\t\t\t\tcase self::LLOG_DEBUG: {\r\n ECHO $msj . \"\\n\". $this->log;\r\n break;\r\n }\r\n }\r\n\t\t\t\t\t\t\r\n\t\t}", "private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }", "public function log()\n {\n $output = new Output(Output::MODE_FILE, $this->getLogPath());\n $output->open();\n foreach (func_get_args() as $argument) {\n $output->dump($argument);\n }\n $output->close();\n }", "function printStatus (): void {\r\n foreach ( $this->allPlayers() as $player ) {\r\n $player->printDeck();\r\n }\r\n }", "public function dprint()\n\t{\n\t\tprint_r( $this->debug );\n\t}", "public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }", "public function getLogMessages() {\n return $this -> log;\n }", "function consoleLog( $msg ) {\n\techo \"[\\033[1;34m\" . wfTimestamp( TS_RFC2822 ) . \"\\033[0m] $msg\\n\";\n}", "function print_msg($msg) {\n if (php_sapi_name() == 'cli') {\n $msg = preg_replace('#<br\\s*>#i', \"\\n\", $msg);\n $msg = preg_replace('#<h1>#i', '== ', $msg);\n $msg = preg_replace('#</h1>#i', ' ==', $msg);\n $msg = preg_replace('#<h2>#i', '=== ', $msg);\n $msg = preg_replace('#</h2>#i', ' ===', $msg);\n $msg = strip_tags($msg) . \"\\n\";\n }\n print $msg;\n}", "function harvest_debug( $log ) {\n\tadd_action( 'admin_notices', function( $log ){\n\t\techo '<div class=\"error\"><p><code>'. $log .'</code></p></div>';\n\t} );\n}", "public static function DEBUG_PRINT()\n {\n $self = new self;\n $debug = [\n 'Service_Endpoint' => $self->getServiceEndpoint(),\n 'App_key' => $self->getAppKey(),\n 'App_Secret' => $self->getSecretKey(),\n 'Server_URL' => $self->SERVER_URL\n ];\n\n echo \"<h1> Print our all configuration </h1>\";\n echo \"<br>\";\n\n foreach ($debug as $key => $value) {\n echo \"My \" . $key . ' is ' . $value . \"<br>\";\n }\n }", "protected function debug() { \n if ($this->SHOW_ERRORS) { \n echo $this->ERROR_MSG; \n } \n if ($this->LOGGING) { \n if ($this->FILE_HANDLER) { \n fwrite($this->FILE_HANDLER,$this->ERROR_MSG); \n } else { \n return false; \n } \n } \n }", "function emDebug() {\n if ($this->getSystemSetting('enable-system-debug-logging') || ( !empty($_GET['pid']) && $this->getProjectSetting('enable-project-debug-logging'))) {\n $emLogger = \\ExternalModules\\ExternalModules::getModuleInstance('em_logger');\n $emLogger->emLog($this->PREFIX, func_get_args(), \"DEBUG\");\n }\n }", "public static function console()\n {\n self::$arrBacktrace = array_shift(debug_backtrace());\n $strMessage = self::$arrBacktrace['file'] . ' on line ' . self::$arrBacktrace['line'];\n $arrLogDisplay = self::$arrBacktrace;\n $arrLogDisplay['debug'] = [];\n\n if (is_array($arrLogDisplay['args']) && !empty($arrLogDisplay['args'])) {\n foreach ($arrLogDisplay['args'] as $intKey => $mixValue) {\n array_push(\n $arrLogDisplay['debug'],\n array(\n \"Argument \" . ($intKey + 1) => $mixValue\n )\n );\n }\n }\n\n $log = new Logger(self::$strLogName);\n $log->pushProcessor(new MemoryPeakUsageProcessor());\n $log->pushProcessor(new WebProcessor());\n $streamHandler = new StreamHandler('php://stdout', Logger::DEBUG);\n $log->pushHandler($streamHandler);\n\n unset(\n $arrLogDisplay['args'],\n $arrLogDisplay['class'],\n $arrLogDisplay['type'],\n $arrLogDisplay['file'],\n $arrLogDisplay['line']\n );\n\n return $log->debug($strMessage, $arrLogDisplay);\n }", "function consolelog ($message) {\n echo $message.PHP_EOL;\n ob_flush();\n flush();\n}", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "function qruqsp_admin_actionLogs($q) {\n //\n // Get the args\n //\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'prepareArgs');\n $rc = qruqsp_core_prepareArgs($q, 'no', array(\n 'last_timestamp'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Last Timestamp'),\n 'session_key'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Session Key'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access restrictions to monitorActionLogs\n //\n qruqsp_core_loadMethod($q, 'qruqsp', 'admin', 'private', 'checkAccess');\n $rc = qruqsp_admin_checkAccess($q, 0, 'qruqsp.admin.actionLogs');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n \n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'datetimeFormat');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbQuote');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbRspQuery');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbHashQuery');\n\n $strsql = \"SELECT UNIX_TIMESTAMP(UTC_TIMESTAMP()) as cur\";\n $ts = qruqsp_core_dbHashQuery($q, $strsql, 'qruqsp.core', 'timestamp');\n if( $ts['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.core.389', 'msg'=>'No timestamp available'));\n }\n\n //\n // Verify the field was passed, and is valid.\n //\n $last_timestamp = $ts['timestamp']['cur'] - 43200; // Get anything that is from the last 12 hours by default.\n $last_timestamp = $ts['timestamp']['cur'] - 86400; // Get anything that is from the last 24 hours by default.\n $req_last_timestamp = $last_timestamp;\n if( isset($args['last_timestamp']) && $args['last_timestamp'] != '' ) {\n $req_last_timestamp = $args['last_timestamp'];\n }\n // Force last_timestamp to be no older than 1 week\n if( $req_last_timestamp < ($ts['timestamp']['cur'] - 604800) ) {\n $req_last_timestamp = $ts['timestamp']['cur'] - 604800;\n }\n\n $date_format = qruqsp_core_datetimeFormat($q);\n\n // Sort the list ASC by date, so the oldest is at the bottom, and therefore will get insert at the top of the list in qruqsp manage\n $strsql = \"SELECT DATE_FORMAT(log_date, '\" . qruqsp_core_dbQuote($q, $date_format) . \"') as log_date, \"\n . \"CAST(UNIX_TIMESTAMP(UTC_TIMESTAMP())-UNIX_TIMESTAMP(log_date) as DECIMAL(12,0)) as age, \"\n . \"UNIX_TIMESTAMP(log_date) as TS, \"\n . \"qruqsp_core_api_logs.id, \"\n . \"qruqsp_core_api_logs.user_id, \"\n . \"qruqsp_core_users.display_name, \"\n . \"IFNULL(qruqsp_core_stations.name, 'System Admin') AS name, \"\n . \"qruqsp_core_api_logs.session_key, \"\n . \"qruqsp_core_api_logs.method, \"\n . \"qruqsp_core_api_logs.action \"\n . \"FROM qruqsp_core_api_logs \"\n . \"LEFT JOIN qruqsp_core_users ON (\"\n . \"qruqsp_core_api_logs.user_id = qruqsp_core_users.id\"\n . \") \"\n . \"LEFT JOIN qruqsp_core_stations ON (\"\n . \"qruqsp_core_api_logs.station_id = qruqsp_core_stations.id\"\n . \") \";\n if( isset($args['session_key']) && $args['session_key'] != '' ) {\n $strsql .= \"WHERE session_key = '\" . qruqsp_core_dbQuote($q, $args['session_key']) . \"' \";\n } else {\n $strsql .= \"WHERE UNIX_TIMESTAMP(qruqsp_core_api_logs.log_date) > '\" . qruqsp_core_dbQuote($q, $req_last_timestamp) . \"' \";\n }\n// . \"AND qruqsp_core_api_logs.user_id = qruqsp_users.id \"\n $strsql .= \"\"\n . \"ORDER BY TS DESC \"\n . \"LIMIT 100 \";\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = qruqsp_core_dbHashQueryArrayTree($q, $strsql, 'qruqsp.core', array(\n array('container'=>'logs', 'fname'=>'id', 'fields'=>array('id', 'log_date', 'age', 'TS', 'user_id', 'display_name', 'name', 'session_key', 'method', 'action')),\n ));\n $rsp = $rc;\n if( $rsp['stat'] == 'ok' ) {\n $rsp['timestamp'] = $ts['timestamp']['cur'];\n }\n\n return $rsp;\n}", "protected function _reportSuiteMessages($log)\n {\n $this->_indent = 0;\n $messages = array_values(array_filter($log->messages()));\n array_pop($messages);\n foreach ($messages as $message) {\n $this->write($message);\n $this->write(\"\\n\");\n $this->_indent++;\n }\n }", "public function run()\n {\n $data = [\n \t\t\t'Company-Updated',\n \t\t\t'Project-Updated',\n 'User-Updated'\n \t\t];\n\n foreach($data as $key => $value) {\n\t\t\tLog::create(['name'=>$value]);\n\t\t}\t\t\n }", "public function printError() {\n\t\t\tfwrite(STDERR, $this->message);\n\t\t}", "public static function flush()\n {\n if (!empty(self::$logs)) {\n FS::append(constant('LOG_PATH'), self::$logs);\n self::$logs = '';\n }\n\n if (!empty(self::$mysql_logs)) {\n FS::append(constant('LOG_SQL_PATH'), self::$mysql_logs);\n self::$mysql_logs = '';\n }\n }", "private function debug($msg) {\r\n if ($this->debug) {\r\n echo '[debug] ' . $msg . '<br>';\r\n }\r\n }", "static function PrintTrace()\r\n {\r\n self::$yyTraceFILE = fopen('php://output', 'w');\r\n self::$yyTracePrompt = '<br>';\r\n }", "function email_console_logs($message = '')\n {\n if ( ! Session::access('can_admin_members'))\n {\n return Cp::unauthorizedAccess();\n }\n\n\n // ------------------------------------\n // Define base variables\n // ------------------------------------\n\n $i = 0;\n\n\n $row_limit = 100;\n $paginate = '';\n $row_count = 0;\n\n Cp::$title = __('members.email_console_log');\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem(__('members.email_console_log'));\n\n Cp::$body = Cp::quickDiv('tableHeading', __('members.email_console_log'));\n\n if ($message != '') {\n Cp::$body .= Cp::quickDiv('successMessage', $message);\n }\n\n\n // ------------------------------------\n // Run Query\n // ------------------------------------\n\n $query = DB::table('email_console_cache')\n ->orderBy('cache_id', 'desc')\n ->select('cache_id', 'member_id', 'member_name', 'recipient_name', 'cache_date', 'subject');\n\n $total_query = clone $query;\n\n if ($total_query->count() == 0)\n {\n if ($message == '') {\n Cp::$body .= Cp::quickDiv('box', Cp::quickDiv('highlight', __('members.no_cached_email')));\n }\n\n return;\n }\n\n // ------------------------------------\n // Do we need pagination?\n // ------------------------------------\n\n if ($total_query->count() > $row_limit)\n {\n $row_count = ( ! Request::input('row')) ? 0 : Request::input('row');\n\n $url = BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=email_console_logs';\n\n $paginate = Cp::pager( $url,\n $total_query->count(),\n $row_limit,\n $row_count,\n 'row'\n );\n\n $query->offset($row_count)->$limit($row_limit);\n\n $query = $query->get();\n }\n\n Cp::$body .= Cp::toggle();\n\n Cp::$body_props .= ' onload=\"magic_check()\" ';\n\n Cp::$body .= Cp::magicCheckboxesJavascript();\n\n Cp::$body .= Cp::formOpen(\n array(\n 'action' => 'C=Administration'.AMP.'M=members'.AMP.'P=delete_email_console',\n 'name' => 'target',\n 'id' => 'target'\n )\n );\n\n Cp::$body .= Cp::table('tableBorder', '0', '0', '100%').\n '<tr>'.PHP_EOL.\n Cp::tableCell('tableHeadingAlt',\n array(\n NBS,\n __('members.email_title'),\n __('members.from'),\n __('members.to'),\n __('members.date'),\n Cp::input_checkbox('toggleflag', '', '', \"onclick=\\\"toggle(this);\\\"\").NBS\n )\n ).\n '</tr>'.PHP_EOL;\n\n // ------------------------------------\n // Table Rows\n // ------------------------------------\n\n $row_count++;\n\n foreach ($query as $row)\n {\n Cp::$body .= Cp::tableQuickRow('',\n array(\n $row_count,\n\n Cp::anchorpop(BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=view_email'.AMP.'id='.$row->cache_id.AMP.'Z=1', '<b>'.$row->subject.'</b>', '600', '580'),\n\n Cp::quickSpan('defaultBold', $row->member_name),\n\n Cp::quickSpan('defaultBold', $row->recipient_name),\n\n Localize::createHumanReadableDateTime($row->cache_date),\n\n Cp::input_checkbox('toggle[]', $row->cache_id, '', \" id='delete_box_\".$row->cache_id.\"'\")\n\n )\n );\n $row_count++;\n }\n\n Cp::$body .= '</table>'.PHP_EOL;\n\n\n if ($paginate != '')\n {\n Cp::$body .= Cp::quickDiv('littlePadding', Cp::quickDiv('defaultBold', $paginate));\n }\n\n Cp::$body .= Cp::quickDiv('paddingTop', Cp::input_submit(__('cp.delete')));\n\n Cp::$body .= '</form>'.PHP_EOL;\n }", "private static function print_log_extra($title, $extra_log) {\n\t//--\n\t$log = '';\n\t//--\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>'.Smart::escape_html($title).' :: EXTRA Log</b></font></div>';\n\t//--\n\t$max = Smart::array_size($extra_log);\n\tif(is_array($extra_log) AND ($max > 0)) {\n\t\t//--\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\">Total Entries: <b>'.Smart::escape_html($max).'</b></div>';\n\t\t//--\n\t\tfor($i=0; $i<$max; $i++) {\n\t\t\t//--\n\t\t\t$tmp_arr = (array) $extra_log[$i];\n\t\t\t//--\n\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:11px; color:#000000;\">';\n\t\t\t$log .= '<b>'.Smart::escape_html((string)$tmp_arr['title']).'</b><br>';\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html(str_replace(array(\"\\r\\n\", \"\\r\", \"\\t\"), array(\"\\n\", \"\\n\", ' '), trim((string)$tmp_arr['data']))), true).'</pre>';\n\t\t\t$log .= '</div>';\n\t\t\t//--\n\t\t} //end for\n\t\t//--\n\t} else {\n\t\t//--\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_warn\" style=\"width: 100px; text-align: center;\"><font size=\"2\"><b>N/A</b></font></div>';\n\t\t//--\n\t} //end if\n\t//--\n\treturn $log;\n\t//--\n}", "protected function assertNoLogEntries() {}", "protected function debug($log)\n {\n if ($this->doDebug) {\n echo \"\\n\" . $log;\n }\n }", "private function log($message) {\n //echo $message . \"\\n\";\n }", "public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}", "public static function outputLog() {\n\t\t// If we do not have anything in the log, then there is nothing to output.\n\t\tif(count(self::$log) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch(self::$log_location) {\n\t\t\tcase 0: break;\n\t\t\t// Empty void.\n\t\t\tcase 1:\n\t\t\t\t// Check to see if we need to log anything to the server\n\t\t\t\tif(self::$log_current_level > 1) {\n\t\t\t\t\t$log_file_handle = fopen(BASEPATH . APP_DIR . \"/\" . \\Config::LOG_FILE, 'a');\n\t\t\t\t\t// Log header.\n\t\t\t\t\tfprintf($log_file_handle, \"[IP:%s TIME:%s USER_ID:%s] BEGIN LOG:\\n\", self::$main->User->Ipv4, time(), self::$main->User->Id);\n\n\t\t\t\t\t// Log body. Just seperate each part of the log with a sepearate line.\n\t\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\t\tfwrite($log_file_handle, $log_item['value']);\n\t\t\t\t\t\tfwrite($log_file_handle, \"\\n\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Log footer.\n\t\t\t\t\tfwrite($log_file_handle, \"END LOG;\\n\");\n\n\t\t\t\t\tfclose($log_file_handle);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// Output as a javascript object easily read by FireBug\n\t\t\t\techo \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t\t\techo \"if(typeof console == \\\"object\\\" && typeof console.group == \\\"function\\\"){\\n\";\n\t\t\t\techo \"console.\";\n\t\t\t\techo (\\Config::LOG_COLLAPSED_GROUPS) ? \"groupCollapsed\" : \"group\";\n\t\t\t\techo \"(\\\"PHP Server\\\");\\n\";\n\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\techo 'console.';\n\t\t\t\t\techo $log_item['type'];\n\t\t\t\t\techo '(';\n\t\t\t\t\techo json_encode($log_item['value']);\n\n\t\t\t\t\tif($log_item['type'] === 'error') {\n\t\t\t\t\t\techo ', null';\n\t\t\t\t\t}\n\t\t\t\t\techo \");\\n\";\n\t\t\t\t}\n\t\t\t\techo \"\\nconsole.groupEnd();\\n}\\n</script>\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// TODO: Write logging code to write to database\n\t\t\t\t/* @var $model Core\\LogModel */\n\t\t\t\tMain::app()->Loader->model('Core\\LogModel');\n\t\t\t\tbreak;\n\t\t}\n\t}", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "function printConsole()\n\t{\n\t\tglobal $site_core;\n\t\tif($this->debug_mode)\n\t\t{\n\t\t\t\n\t\t\tprint '<script type=\"text/javascript\">';\n\t\t\t\tprint \"\\n\".'console_'.$this->name.' = window.open(\"\",\"'.$this->name.'\",\"menubar=no,width=360,height=250,toolbar=no,resizable=yes\");';\n\t\t\t\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\");';\n\t\t\t\t\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<html><head><title>'.$this->title.'</title>\");';\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<link rel=\\\"stylesheet\\\" href=\\\"'.$site_core.'/Console/console.css\\\" /></head>\")';\n\t\t\t\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<table>\");';\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<tr><th class=\\\"num\\\">#</th><th class=\\\"comment\\\">Comment</th></tr>\");';\n\t\t\t\t$num = 1;\n\t\t\t\tforeach($this->items as $log_item)\n\t\t\t\t{\n\t\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"<tr><td class=\\\"num\\\">'.$num.'</td><td class=\\\"comment\\\">'.$log_item.'</td></tr>\");';\n\t\t\t\t\t$num++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"</table>\");';\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.write(\"</body></html>\");';\n\t\t\t\tprint \"\\n\".'console_'.$this->name.'.document.close();';\n\t\t\tprint '</script>';\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function _log($text)\n {\n if (!Mage::getStoreConfigFlag('simple_relevance/general/debug')) {\n return; // if the debug flag is false in the config, do nothing\n }\n\n Mage::log($text, null, 'SimpleRelevance_Integration.log');\n }", "public function testRollbarLoggerFlush(): void\n {\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n ]);\n Rollbar::log(LogLevel::WARNING, \"Testing PHP Notifier\");\n Rollbar::flush();\n $this->assertVerboseLogContains('Queue flushed', LogLevel::DEBUG);\n }", "function runCheck()\r\n\t{\r\n\t\t$this->reportWriter->startReport();\r\n\r\n\t\twhile($this->urlSource->hasNext())\r\n\t\t{\r\n\t\t\t//create the full URL from the host address and port number\r\n\t\t\t$request = $this->urlSource->getNext();\r\n\t\t\t$url = \"http://\".$this->host.\":\".$this->port;\r\n\t\t\tif ($this->dir!=\"\")\r\n\t\t\t\t$url = $url.\"/\".$this->dir.\"/\".$request;\r\n\t\t\telse\r\n\t\t\t\t$url = $url.\"/\".$request;\r\n\r\n\t\t\t$page = $this->fetchPage($url);\r\n\t\t\tif ($page[\"error\"])\r\n\t\t\t{\r\n\t\t\t\t//report an un-expected error\r\n\t\t\t\t$this->reportWriter->addItemMessage(false, $url, $page[\"error\"]);\r\n\t\t\t}\r\n\t\t\telse if ($page[\"headers\"][\"status_code\"]!=200)\r\n\t\t\t{\r\n\t\t\t\t//report an HTTP error\r\n\t\t\t\t$this->reportWriter->addItemMessage(false, $url, \"Page not loaded, error code: \".$page[\"headers\"][\"status_code\"]);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//report PHP page errors\r\n\t\t\t\t$errors = $this->checkForErrors($page[\"content\"]);\r\n\t\t\t\t$this->reportWriter->addItem($url, $errors);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->reportWriter->endReport();\r\n\t}", "public function display_log() {\n\t\t$log_choices = $this->get_available_logs();\n\t\t$log_engines = $this->get_log_engines();\n\t\t$log_levels = $this->get_logging_levels();\n\t\t$log_entries = $this->get_log_entries();\n\t\t$download_url = $this->get_log_url();\n\n\t\tob_start();\n\t\tinclude trailingslashit( Tribe__Main::instance()->plugin_path ) . 'src/admin-views/event-log.php';\n\t\treturn ob_get_clean();\n\t}", "public function no_items() {\n\t\t_e( 'No logs available.', 'sp' );\n\t}", "public static function setupPhpLogs()\n {\n if (!empty(self::$phpFile)) {\n set_error_handler([__CLASS__, 'phpLogHandler']);\n register_shutdown_function([__CLASS__, 'phpShutdownFunction']);\n }\n }", "private function Log($msg) {\n// error_log( '[LOG] '.$msg);\n\t}", "function cp_admin_logs()\n{\n?>\n\n\t<div class=\"wrap\">\n\t\t<h2>CubePoints - <?php _e('Logs', 'cp'); ?></h2>\n\t\t<?php _e('View recent point transactions.', 'cp'); ?><br /><br />\n\t\t<?php cp_show_logs('all', apply_filters('cp_admin_logs_limit', 0 ) , true); ?>\n\t</div>\n\t\n\t<?php do_action('cp_admin_logs'); ?>\n\t\n\t<?php\n}", "public function listen() {\n\t\t$fields = wp_parse_args( $_POST, array(\n\t\t\t'check' => '',\n\t\t\t'log-level' => '',\n\t\t\t'log-engine' => '',\n\t\t) );\n\n\t\tforeach ( $fields as &$single_field ) {\n\t\t\t$single_field = sanitize_text_field( $single_field );\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( $fields['check'], 'logging-controls' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Fires before log settings are committed.\n\t\t *\n\t\t * This will not happen unless a nonce check has already passed.\n\t\t */\n\t\tdo_action( 'tribe_common_update_log_settings' );\n\n\t\t$this->update_logging_level( $fields['log-level'] );\n\t\t$this->update_logging_engine( $fields['log-engine'] );\n\n\t\t/**\n\t\t * Fires immediately after log settings have been committed.\n\t\t */\n\t\tdo_action( 'tribe_common_updated_log_settings' );\n\n\t\t$data = array(\n\t\t\t'logs' => $this->get_available_logs(),\n\t\t);\n\n\t\tif ( ! empty( $fields['log-view'] ) ) {\n\t\t\t$data['entries'] = $this->get_log_entries( $fields['log-view'] );\n\t\t}\n\n\t\twp_send_json_success( $data );\n\t}", "function NSLogf() {\n\t\tglobal $db;\n\t\t$args = func_get_args();\n\t\t$db->Execute(sprintf(\"INSERT INTO `nslog_messages` (`message`, `timestamp`) VALUES('%s', NOW())\", $db->prepare_input(array_pop(sNSLog($args)))));\n\t}", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "public function testSetGet_log() {\n\t\t$expected_time = time();\n\t\tfor ( $i = 0; $i < 100; $i++ ) {\n\t\t\t$this->config->log( WP_Backup::BACKUP_STATUS_WARNING, 'WARNING' );\n\t\t}\n\n\t\t$history = $this->config->get_history();\n\t\t$this->assertEquals( 100, count( $history ) );\n\n\t\t$this->config->log( WP_Backup::BACKUP_STATUS_FAILED, 'FAILED' );\n\t\t$history = $this->config->get_history();\n\t\t$this->assertEquals( 100, count( $history ) );\n\n\t\tlist( $time, $status, $msg ) = array_shift( $history );\n\t\t$this->assertEquals( $expected_time, $time );\n\t\t$this->assertEquals( WP_Backup::BACKUP_STATUS_FAILED, $status );\n\t\t$this->assertEquals( 'FAILED', $msg );\n\n\t\tfor ( $i = 0; $i < 99; $i++ ) {\n\t\t\tlist( $time, $status, $msg ) = array_shift( $history );\n\t\t\t$this->assertEquals( $expected_time, $time );\n\t\t\t$this->assertEquals( WP_Backup::BACKUP_STATUS_WARNING, $status );\n\t\t\t$this->assertEquals( 'WARNING', $msg );\n\t\t}\n\t}", "private static function print_log_mail($log_mail_arr) {\n\t//--\n\t$log = '';\n\t//--\n\t$max = Smart::array_size($log_mail_arr);\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>MAIL Log</b></font></div>';\n\t//--\n\tif(is_array($log_mail_arr) AND ($max > 0)) {\n\t\t//--\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\">Total Entries: <b>'.Smart::escape_html($max).'</b></div>';\n\t\t//--\n\t\tforeach($log_mail_arr as $key => $val) {\n\t\t\t//--\n\t\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\">Operation: <b>'.strtoupper((string)$key).'</b></div>';\n\t\t\t$log .= '<div class=\"smartframework_debugbar_inforow\" style=\"font-size:11px; color:#000000;\">';\n\t\t\tif(is_array($val)) {\n\t\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html(str_replace(array(\"\\r\\n\", \"\\r\", \"\\t\"), array(\"\\n\", \"\\n\", ' '), trim((string)implode(\"\\n\\n##########\\n\\n\", $val)))), true).'</pre>';\n\t\t\t} else {\n\t\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html(str_replace(array(\"\\r\\n\", \"\\r\", \"\\t\"), array(\"\\n\", \"\\n\", ' '), trim((string)self::print_value_by_type($val)))), true).'</pre>';\n\t\t\t} //end if else\n\t\t\t$log .= '</div>';\n\t\t\t//--\n\t\t} //end foreach\n\t\t//--\n\t} else {\n\t\t//--\n\t\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_warn\" style=\"width: 100px; text-align: center;\"><font size=\"2\"><b>N/A</b></font></div>';\n\t\t//--\n\t} //end if\n\t//--\n\treturn $log;\n\t//--\n}", "public function get_query_log()\n {\n }", "public function error_logs() {\n\n\t\t/**\n\t\t * @var wpdb $wpdb\n\t\t */\n\t\tglobal $wpdb;\n\n\t\t$total_file_entries = $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wpbgdc_files' );\n\t\t$total_synced_files = $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wpbgdc_files WHERE file_drive_url != \"\" ' );\n\t\t$total_unsynced_files = $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wpbgdc_files WHERE file_drive_url = \"\" ' );\n\n\t\techo '<h4>' . __( 'Statistics', $this->_google_drive_cdn->get_textdomain() ) . '</h4>';\n\n\t\techo '<p><code>' . $total_file_entries . '</code> ' . __( 'Number of total file entries in the cache database.', $this->_google_drive_cdn->get_textdomain() ) . '</p>';\n\t\techo '<p><code>' . $total_synced_files . '</code> ' . __( 'Number of synced files.', $this->_google_drive_cdn->get_textdomain() ) . '</p>';\n\t\techo '<p><code>' . $total_unsynced_files . '</code> ' . __( 'Number of files that have not yet been synced or can\\'t be synced.', $this->_google_drive_cdn->get_textdomain() ) . '</p>';\n\t\techo '<p><code>' . date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), wp_next_scheduled( 'wpbgdc_hourly_event' ) ) . '</code> ' . __( 'Date of the next automatic sync/update process.', $this->_google_drive_cdn->get_textdomain() ) . '</p>';\n\n\t\t$errors = get_option( 'wpbgdc_error_log', array() );\n\t\tif ( ! is_array( $errors ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count( $errors ) ) {\n\t\t\techo '<h4>' . __( 'Errors & Hints', $this->_google_drive_cdn->get_textdomain() ) . '</h4>';\n\t\t}\n\n\t\tkrsort( $errors );\n\t\tforeach ( $errors as $error ) {\n\t\t\techo $error . '<br />';\n\t\t}\n\t\tif ( count( $errors ) ) {\n\t\t\techo ' <a class=\"button\" href=\"' . admin_url( 'options-general.php?page=wpbgdc&action=delete_error_logs&wpbgdc_nonce=' . wp_create_nonce( 'wpbgdc_delete_error_logs' ) ) . '\">' . __( 'Delete Logs', $this->_google_drive_cdn->get_textdomain() ) . '</a>';\n\t\t}\n\t}", "public function logQueueLookupEvent(QueueLookupEvent $event)\n {\n $this->output->writeln('QueueLookupEvent:: Looking up Job with params' .json_encode(array(\n 'job_id' => $event->getJobId() \n )));\n }", "public function error() {\n // The tests cover errors, so there will be plenty to sift through\n // $msg = func_get_arg(0);\n // $err = 'API ERROR: ' . $msg . PHP_EOL;\n\n // $objs = func_get_args();\n // array_splice($objs, 0, 1);\n\n // ob_start();\n // foreach($objs as $obj) {\n // var_dump($obj);\n // }\n // $strings = ob_get_clean();\n\n // file_put_contents('tests.log', [$err, $strings], FILE_APPEND);\n }", "function _log($msg, $fatal = false){\n\techo $msg.\"\\n\";\n\tif($fatal !== false){\n\t\texit;\n\t}\n}", "public function writeln($messages, $options = 0)\n {\n }" ]
[ "0.6091366", "0.60109645", "0.59499514", "0.5746436", "0.5738425", "0.55802876", "0.5545277", "0.55278695", "0.55278695", "0.5514166", "0.54529333", "0.539734", "0.537468", "0.5358286", "0.53445065", "0.53417164", "0.53377724", "0.5329484", "0.5307096", "0.5286817", "0.5262608", "0.52578264", "0.52550375", "0.5236914", "0.52303356", "0.5230028", "0.52105504", "0.5173236", "0.51538706", "0.5152276", "0.51254267", "0.5122364", "0.51197475", "0.51078165", "0.50920254", "0.508045", "0.5077446", "0.5065382", "0.50542384", "0.5049752", "0.5042798", "0.50401366", "0.50268716", "0.50201416", "0.50030965", "0.49960774", "0.49907872", "0.49880645", "0.49784037", "0.49585402", "0.49460608", "0.49389583", "0.49377504", "0.49252194", "0.4905034", "0.49047345", "0.490463", "0.49025765", "0.48844326", "0.4883669", "0.48747087", "0.48694822", "0.4868926", "0.48420355", "0.4833543", "0.48318943", "0.48315078", "0.4803647", "0.47768894", "0.47761017", "0.47754154", "0.47743005", "0.47701868", "0.47571102", "0.47527906", "0.47508812", "0.47480515", "0.4747824", "0.4747244", "0.47345325", "0.47342777", "0.4733689", "0.47320417", "0.47312805", "0.47307032", "0.4728821", "0.47284472", "0.47264966", "0.47261518", "0.47240153", "0.472196", "0.4720813", "0.47206056", "0.4717361", "0.47141886", "0.47128475", "0.4710957", "0.4706525", "0.47040108", "0.47016898" ]
0.76650935
0
we want to mark migrated classes ,In order not to be migrate again this helper function write in migrated.json file.
public function setMigrationAsMigrated($migrationClassName): void { if ( ! file_exists($this->_dir)) { $this->createFile(); } $migrated = $this->getFileContent(); $migrated[$migrationClassName] = true; $migrated = json_encode($migrated); file_put_contents($this->_dir, $migrated); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function migrateUp($class)\n {\n if ($class === self::BASE_MIGRATION) {\n return true;\n }\n\n $this->stdout(\"*** applying $class\\n\", Console::FG_YELLOW);\n $start = microtime(true);\n $migration = parent::createMigration($class);\n if ($migration->up() !== false) {\n $time = microtime(true) - $start;\n $this->stdout(\"*** applied $class (time: \" . sprintf('%.3f', $time) . \"s)\\n\\n\", Console::FG_GREEN);\n\n return true;\n } else {\n $time = microtime(true) - $start;\n $this->stdout(\"*** failed to apply $class (time: \" . sprintf('%.3f', $time) . \"s)\\n\\n\", Console::FG_RED);\n\n return false;\n }\n }", "private function createNewMigration() {\n // $this->MigrationFieldCollection[$this->getModel()->getShortModelName()];\n $changes = []; //these fields are added or updated if the fieldnames is not in this array delete it.\n foreach ($this->getModel()->getFieldCollection() as $fieldName => $field) {\n //var_dump($this->checkFieldProperties($field)); --mark if the fieldsproperties are default or not\n $this->checkFieldProperties($field);\n var_dump($field);\n\n if (!empty($this->MigrationFieldCollection[$this->getModel()->getShortModelName()][$fieldName])) {\n $reflection = new \\ReflectionObject($field);\n $changes = [];\n $this->checkFieldProperties($field);\n\n foreach ($reflection->getProperties() as $fieldValues) {\n\n }\n //we want to update this field\n } else {\n\n //copy this field since we create\n }\n }\n foreach ($this->MigrationFieldCollection[$this->getModel()->getShortModelName()] as $migrationFieldName => $migrationField) {\n if (!in_array($migrationFieldName, $changes)) {\n $this->newMigrationLines[] = $this->modelFieldToMigrationString($migrationField['dataStructure'], 'delete');\n }\n }\n }", "public function isMigratingUp();", "public function migrate()\n\t{\n\t}", "public function editableClasses()\n\t{\n\t\t//return array(\"Rgs\\CatalogModule\\Entity\\Article\");\n\t\t//return array(\"Article\");\n\t}", "public static function migrate($theme_json)\n {\n }", "protected function silentCacheFrameworkTableSchemaMigration() {}", "public function migrate() {}", "public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }", "public function supportsMigrations();", "function migrate()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public static function createMigration($generation){\n\n $dir = database_path().\"/migrations/\";\n $dir_entities = app_path().\"/\".$generation['head']['directory'];\n\n if (!file_exists($dir)){\n mkdir($dir, 0777, true);\n }\n \n if ($generation){\n \n $function = new Functions();\n $migration = new Migration();\n $sequence = 10;\n foreach($generation['schema']['class'] as $value){\n \n $nameFile = $value->table[\"name\"];\n \n $fullname = (@$generation['head']['namemodel'] == \"Y\") ? \"Y\" : \"N\";\n $nameClass = $function->getNameClass($nameFile,$fullname);\n \n if (!$function->fileExistsContent($dir, \"_create_\".strtolower($nameFile).\"_table\")){\n \n $str = \"\";\n $str .= \"<?php\\n\\n\";\n $str .= self::getHead();\n $str .= \"use Illuminate\\Database\\Schema\\Blueprint;\\n\";\n $str .= \"use Illuminate\\Database\\Migrations\\Migration;\\n\";\n\n if (str_contains($nameFile, \"_\")){\n $class_name = explode(\"_\",$nameFile);\n $nameClass = $function->getNameClassFirstUpperCase($class_name[0]).$function->getNameClassFirstUpperCase($class_name[1]);\n }\n \n $str .= \"class Create\".$function->getNameClassFirstUpperCase($nameFile).\"Table extends Migration\\n\";\n $str .= \"{\\n\";\n $str .= \"\\n\\n\\n\";\n $str .= \"\\t/**\\n\";\n $str .= \"\\t* Run the migrations.\\n\";\n $str .= \"\\t*\\n\";\n $str .= \"\\t* @return void\\n\";\n $str .= \"\\t*/\\n\";\n $str .= \"\\tpublic function up()\\n\";\n $str .= \"\\t{\\n\";\n \n if (@$generation['head']['addcon'] == \"Y\"){\n $str .= \"\\t\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->create('\".$nameFile.\"', function (Blueprint \\$table) {\\n\";\n } else {\n $str .= \"\\t\\t\\tSchema::create('\".$nameFile.\"', function (Blueprint \\$table) {\\n\";\n }\n $tmField = sizeof($value->table[\"fields\"]);\n if ($tmField > 0){\n \n foreach($value->table[\"fields\"] as $field){\n \n $addField = true;\n if (@sizeof($value->table[\"foreign\"]) > 0){\n foreach ($value->table[\"foreign\"] as $vl){\n if ($field->name == $vl->foreign){\n $addField = false;\n break;\n }\n unset($vl);\n }\n }\n if ($addField){\n $str .= \"\\t\\t\\t\\t\".$migration->getMigrationField($field, @$value->table['index']).\"\\n\";\n }\n unset($field);\n }\n \n if (@sizeof($value->table['foreign']) > 0){\n foreach ($value->table['foreign'] as $chave){\n $str .= $migration->getMigrationForeign($chave);\n unset($chave);\n }\n }\n \n $str .= \"\\t\\t\\t\\t\\$table->timestamps();\\n\";\n }\n $str .= \"\\t\\t\\t});\\n\";\n $str .= \"\\t}\\n\";\n \n $str .= \"\\t\\n\\n\\n\";\n $str .= \"\\t/**\\n\";\n $str .= \"\\t * Reverse the migrations.\\n\";\n $str .= \"\\t *\\n\";\n $str .= \"\\t * @return void\\n\";\n $str .= \"\\t */\\n\";\n $str .= \"\\tpublic function down()\\n\";\n $str .= \"\\t{\\n\";\n if ($generation['head']['connection'] != \"\") {\n $str .= \"\\t\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->drop('\".$nameFile.\"');\\n\";\n } else {\n $str .= \"\\t\\t\\tSchema::drop('\".$nameFile.\"');\\n\";\n }\n $str .= \"\\t}\\n\";\n \n $str .= \"\\n\\n}\";\n $micro = microtime();\n $micro = str_ireplace(\".\", \"\", $micro);\n $file_name = date('Y').\"_\".date('m').\"_\".date('d').\"_\".date('Hmisu').$sequence.\"_create_\".strtolower($nameFile).\"_table.php\";\n $sequence++;\n if (!file_exists($dir.$file_name)){\n $fp4 = fopen($dir. $file_name, \"w+\");\n $escreve2 = fwrite($fp4, $str);\n fclose($fp4);\n chmod($dir . $file_name,0777);\n }\n unset($value);\n\n } else {\n\n $name_search = $dir_entities.\"/field/fields_\".strtolower($nameClass).\".php\";\n if (file_exists($name_search)){\n\n $nameclass_alter = date('Y').date('m').date('d').date('Hmisu');\n\n $strFileMigration = \"\";\n $strFileMigration .= \"<?php\\n\";\n $strFileMigration .= self::getHead();\n $strFileMigration .= \"use Illuminate\\Database\\Schema\\Blueprint;\\n\";\n $strFileMigration .= \"use Illuminate\\Database\\Migrations\\Migration;\\n\";\n $strFileMigration .= \"use Illuminate\\Support\\Facades\\Schema;\\n\";\n $strFileMigration .= \"\\n\";\n $strFileMigration .= \"class AddField\".$nameclass_alter.$nameClass.\"Table extends Migration\\n\";\n $strFileMigration .= \"{\\n\";\n $strFileMigration .= \"\\n\";\n $strFileMigration .= \"\\tpublic function up()\\n\";\n $strFileMigration .= \"\\t{\\n\";\n $strFileMigration .= \"\\n\";\n if ($generation['head']['connection'] != \"\") {\n $strFileMigration .= \"\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->table('\".$nameFile.\"', function (\\$table) {\\n\";\n } else {\n $strFileMigration .= \"\\t\\tSchema::table('\".$nameFile.\"', function (\\$table) {\\n\";\n }\n\n $ponteiro = fopen ($dir_entities.\"/field/fields_\".strtolower($nameClass).\".php\",\"r\");\n $stream = \"\";\n while (!feof ($ponteiro)) {\n $stream .= fgets($ponteiro,4096);\n }\n fclose ($ponteiro); \n\n $tmField = sizeof($value->table[\"fields\"]);\n $criaMigration = false;\n if ($tmField > 0){\n \n foreach($value->table[\"fields\"] as $field){\n $addField = false;\n if ($field->name != \"id\"){\n $one_search = \"'\".$field->name.\"'\";\n //$sec_search = \"'\".$field->name.\"'\";\n $find1 = (strpos($stream,$one_search) > -1);\n //$find2 = (strpos($stream, $sec_search) > -1);\n if (($find1 == false)) { //} && ($find2 == false)){\n $addField = true;\n }\n if ($addField){\n $criaMigration = true;\n $strFileMigration .= \"\\t\\t\\t\".$migration->getMigrationField($field, @$value->table['index']).\"\\n\";\n }\n }\n unset($field);\n }\n \n if (@sizeof($value->table['foreign']) > 0){\n foreach ($value->table['foreign'] as $chave){\n $one_search = \"'\".$chave->foreign.\"',\";\n $sec_search = \",'\".$chave->foreign.\"'\";\n $find1 = (strpos($stream,$one_search) > -1);\n $find2 = (strpos($stream, $sec_search) > -1);\n if (($find1 == false) && ($find2 == false)){\n $strFileMigration .= $migration->getMigrationForeign($chave);\n }\n unset($chave);\n }\n }\n } \n\n $strFileMigration .= \"\\t\\t});\\n\";\n $strFileMigration .= \"\\t}\\n\";\n if ($generation['head']['connection'] != \"\") {\n $strFileMigration .= \"\\tpublic function down(){Schema::connection('\".$generation['head']['connection'].\"')->drop('\".$nameFile.\"');}\\n\";\n } else {\n $strFileMigration .= \"\\tpublic function down(){Schema::drop('\".$nameFile.\"');}\\n\";\n }\n \n $strFileMigration .= \"\\t}\\n\";\n\n if ($criaMigration){\n $file_name = date('Y').\"_\".date('m').\"_\".date('d').\"_\".date('Hmisu').$sequence.\"_addField\".$nameclass_alter.strtolower($nameClass).\"_table.php\";\n $sequence++;\n if (!file_exists($dir.\"/\".$file_name)){\n $fp4 = fopen($dir. \"/\" . $file_name, \"w+\");\n $escreve2 = fwrite($fp4, $strFileMigration);\n fclose($fp4);\n chmod($dir. \"/\" . $file_name,0777);\n }\n }\n\n }\n\n }\n \n\n }\n \n }\n\n\n }", "protected function provideTableClassNameMap(): void\n {\n $list = $this->tempMerge('tca.meta.classNameMap', 'tca.classNameMap');\n if (is_array($list)) {\n NamingUtil::$tcaTableClassNameMap = array_merge(NamingUtil::$tcaTableClassNameMap, $list);\n }\n }", "public function collectMigrations(): array;", "private function create_migration(){\n $file = $this->path('migrations') . date('Y_m_d_His') . '_create_slender_table.php';\n $this->write_file($file, static::$migrationCode);\n }", "protected function migrateLegacyImportRecords() {}", "public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}", "public function addClass($name, $admin_id){\n\t\t\t$sql = \"INSERT INTO clazz (id, name, admin_id, created_at) VALUES (NULL, '$name', '$admin_id', NULL)\";\n\t\t\t$this->connection()->exec($sql);\n\t\t\treturn true;\n\t\t}", "public function getMigrationClass()\n {\n return $this->migrationClass;\n }", "private function migration()\n {\n $location = $this->args['location'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR;\n if (!is_dir($location))\n {\n mkdir($location);\n }\n\n $backtrace = debug_backtrace();\n $calling_function = $backtrace[1]['function'];\n\n if ($calling_function === \"model\")\n {\n $class_name = 'Migration_Add_';\n $filename = 'add_';\n $table_name = '';\n\n if (!empty($this->args['subdirectories']))\n {\n $dirs = explode(DIRECTORY_SEPARATOR, $this->args['subdirectories']);\n $dirs = join('_', $dirs);\n $class_name .= strtolower($dirs) . '_';\n $filename .= strtolower($dirs) . '_';\n $table_name .= strtolower($dirs) . '_';\n }\n $args = array(\n 'class_name' => $class_name . Inflector::pluralize($this->args['name']),\n 'table_name' => $table_name . Inflector::pluralize(strtolower($this->args['name'])),\n 'filename' => $filename . Inflector::pluralize(ApplicationHelpers::underscorify($this->args['name'])) . '.php',\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'migration';\n }\n else\n {\n $args = array(\n 'class_name' => 'Migration_' . $this->args['name'],\n 'table_name' => $this->get_table_name_out_of_migration_name(),\n 'filename' => $this->args['filename'],\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'empty_migration';\n }\n\n $template = new TemplateScanner($template_name, $args);\n $migration = $template->parse();\n\n $migration_number = MigrationHelpers::get_migration_number($this->args['location']);\n $filename = $location . $migration_number . '_' . $args['filename'];\n $potential_duplicate_migration_filename = MigrationHelpers::decrement_migration_number($migration_number) . '_' . $args['filename'];\n $potential_duplicate_migration = $location . $potential_duplicate_migration_filename;\n\n $message = \"\\t\";\n if (file_exists($potential_duplicate_migration))\n {\n $message .= 'Migration already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $potential_duplicate_migration_filename;\n }\n else if (file_put_contents($filename, $migration) && MigrationHelpers::add_migration_number_to_config_file($this->args['location'], $migration_number))\n {\n $message .= 'Created Migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $args['filename'];\n }\n else\n {\n $message .= 'Unable to create migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $this->args['filename'];\n }\n\n fwrite(STDOUT, $message . PHP_EOL);\n\n return;\n }", "public function run()\n {\n \n\n \\DB::table('migrations')->delete();\n \n \\DB::table('migrations')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'migration' => '2014_10_12_000000_create_users_table',\n 'batch' => 1,\n ),\n 1 => \n array (\n 'id' => 2,\n 'migration' => '2014_10_12_100000_create_password_resets_table',\n 'batch' => 1,\n ),\n 2 => \n array (\n 'id' => 3,\n 'migration' => '2019_01_29_011038_create_categories_table',\n 'batch' => 1,\n ),\n 3 => \n array (\n 'id' => 4,\n 'migration' => '2019_01_29_011130_create_items_table',\n 'batch' => 1,\n ),\n 4 => \n array (\n 'id' => 5,\n 'migration' => '2019_01_29_011207_create_requests_table',\n 'batch' => 1,\n ),\n 5 => \n array (\n 'id' => 6,\n 'migration' => '2019_01_29_011313_create_statuses_table',\n 'batch' => 1,\n ),\n 6 => \n array (\n 'id' => 7,\n 'migration' => '2019_01_29_011320_create_roles_table',\n 'batch' => 1,\n ),\n 7 => \n array (\n 'id' => 8,\n 'migration' => '2019_01_29_011330_create_userstatuses_table',\n 'batch' => 1,\n ),\n 8 => \n array (\n 'id' => 9,\n 'migration' => '2019_01_29_023302_add_roleid_userstatusid_users',\n 'batch' => 1,\n ),\n 9 => \n array (\n 'id' => 10,\n 'migration' => '2019_01_29_023330_add_categoryid_items',\n 'batch' => 1,\n ),\n 10 => \n array (\n 'id' => 11,\n 'migration' => '2019_01_29_023409_add_userid_statusid_itemid_requests',\n 'batch' => 1,\n ),\n 11 => \n array (\n 'id' => 12,\n 'migration' => '2019_01_29_042432_drop_contactnumber_users',\n 'batch' => 2,\n ),\n 12 => \n array (\n 'id' => 13,\n 'migration' => '2019_01_30_064421_add_statusid_items',\n 'batch' => 3,\n ),\n 13 => \n array (\n 'id' => 14,\n 'migration' => '2019_01_31_013147_rename_requests_to_laptoprequests',\n 'batch' => 4,\n ),\n 14 => \n array (\n 'id' => 15,\n 'migration' => '2019_01_31_014418_rename_laptoprequests',\n 'batch' => 5,\n ),\n ));\n \n \n }", "public function generateAction():void{\n new Migration();\n }", "public function testInvalidMigrationClass(): void\n {\n // This test is designed to test/cover specific implementation rather than functionality and\n // needed to simulate very specific situation.\n\n /** @var Mock $inOut */\n $inOut = Mockery::mock(IoInterface::class);\n $inOut->shouldReceive('writeWarning')->once()->withAnyArgs()->andReturnSelf();\n\n /** @var IoInterface $inOut */\n\n $runner = Mockery::mock(BaseMigrationRunner::class);\n $runner->makePartial();\n\n $container = $this->createContainer();\n\n $method = new ReflectionMethod(BaseMigrationRunner::class, 'setIO');\n $method->setAccessible(true);\n $method->invoke($runner, $inOut);\n\n $method = new ReflectionMethod(BaseMigrationRunner::class, 'createMigration');\n $method->setAccessible(true);\n $nullMigration = $method->invoke($runner, 'non-existing-class', $container);\n\n $this->assertNull($nullMigration);\n }", "public function createMigrationsTable(): void;", "function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }", "public function getMigrations()\n {\n return [\n CreateKeyPairTable::class,\n ];\n }", "public function migrate() : void {\r\n\t\t\t$currentSettings = new ConfigContainer();\r\n\r\n\t\t\tif (file_exists($this->settingsFile)) {\r\n\t\t\t\t$currentSettings = new ConfigContainer(file_get_contents($this->settingsFile));\r\n\t\t\t}\r\n\r\n\t\t\tif (!$currentSettings->has('configVersion')) {\r\n\t\t\t\t$currentSettings->set('configVersion', 0, FieldTypes::INTEGER);\r\n\t\t\t}\r\n\r\n\t\t\t$filesToApply = array();\r\n\t\t\t$currentVersion = $currentSettings->get('configVersion');\r\n\r\n\t\t\tforeach ($this->files as $file) {\r\n\t\t\t\tif ($file->origVersion >= $currentVersion) {\r\n\t\t\t\t\t$filesToApply[] = $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($filesToApply as $file) {\r\n\t\t\t\tforeach ($file->actions as $action) {\r\n\t\t\t\t\tswitch ($action->operator->getValue()) {\r\n\t\t\t\t\t\tcase MigrationOperators::ADD:\r\n\t\t\t\t\t\t\tif (!$currentSettings->has($action->field)) {\r\n\t\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value, $action->type->getValue());\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::CHANGE:\r\n\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::REMOVE:\r\n\t\t\t\t\t\t\t$currentSettings->remove($action->field);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::RENAME:\r\n\t\t\t\t\t\t\t$currentSettings->rename($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreStart\r\n\t\t\t\t\t\tdefault:\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreEnd\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$currentSettings->set('configVersion', intval($file->destVersion));\r\n\t\t\t}\r\n\r\n\t\t\tfile_put_contents($this->settingsFile, json_encode($currentSettings, JSON_PRETTY_PRINT));\r\n\r\n\t\t\treturn;\r\n\t\t}", "public function run()\n {\n \n\n \\DB::table('migrations')->delete();\n \n \\DB::table('migrations')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'migration' => '2019_03_13_181656_create_categories_table',\n 'batch' => 1,\n ),\n 1 => \n array (\n 'id' => 2,\n 'migration' => '2019_03_13_181656_create_failed_jobs_table',\n 'batch' => 1,\n ),\n 2 => \n array (\n 'id' => 3,\n 'migration' => '2019_03_13_181656_create_links_table',\n 'batch' => 1,\n ),\n 3 => \n array (\n 'id' => 4,\n 'migration' => '2019_03_13_181656_create_model_has_permissions_table',\n 'batch' => 1,\n ),\n 4 => \n array (\n 'id' => 5,\n 'migration' => '2019_03_13_181656_create_model_has_roles_table',\n 'batch' => 1,\n ),\n 5 => \n array (\n 'id' => 6,\n 'migration' => '2019_03_13_181656_create_notifications_table',\n 'batch' => 1,\n ),\n 6 => \n array (\n 'id' => 7,\n 'migration' => '2019_03_13_181656_create_password_resets_table',\n 'batch' => 1,\n ),\n 7 => \n array (\n 'id' => 8,\n 'migration' => '2019_03_13_181656_create_permissions_table',\n 'batch' => 1,\n ),\n 8 => \n array (\n 'id' => 9,\n 'migration' => '2019_03_13_181656_create_replies_table',\n 'batch' => 1,\n ),\n 9 => \n array (\n 'id' => 10,\n 'migration' => '2019_03_13_181656_create_role_has_permissions_table',\n 'batch' => 1,\n ),\n 10 => \n array (\n 'id' => 11,\n 'migration' => '2019_03_13_181656_create_roles_table',\n 'batch' => 1,\n ),\n 11 => \n array (\n 'id' => 12,\n 'migration' => '2019_03_13_181656_create_topics_table',\n 'batch' => 1,\n ),\n 12 => \n array (\n 'id' => 13,\n 'migration' => '2019_03_13_181656_create_users_table',\n 'batch' => 1,\n ),\n 13 => \n array (\n 'id' => 14,\n 'migration' => '2019_03_13_181657_add_foreign_keys_to_model_has_permissions_table',\n 'batch' => 1,\n ),\n 14 => \n array (\n 'id' => 15,\n 'migration' => '2019_03_13_181657_add_foreign_keys_to_model_has_roles_table',\n 'batch' => 1,\n ),\n 15 => \n array (\n 'id' => 16,\n 'migration' => '2019_03_13_181657_add_foreign_keys_to_replies_table',\n 'batch' => 1,\n ),\n 16 => \n array (\n 'id' => 17,\n 'migration' => '2019_03_13_181657_add_foreign_keys_to_role_has_permissions_table',\n 'batch' => 1,\n ),\n 17 => \n array (\n 'id' => 18,\n 'migration' => '2019_03_13_181657_add_foreign_keys_to_topics_table',\n 'batch' => 1,\n ),\n ));\n \n \n }", "private function getMigrations()\n\t\t{\n\t\t\tif(self::$migrations)\n\t\t\t{\n\t\t\t\treturn self::$migrations;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach(\\System\\DB\\DataAdapter::create(\"adapter=dir;source=\".__MIGRATIONS_PATH__.\";\")->openDataSet()->rows as $row)\n\t\t\t\t{\n\t\t\t\t\tif(\\strpos($row[\"name\"], '.php'))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire $row[\"path\"];\n\t\t\t\t\t\t$migration = \\str_replace(\".php\", \"\", $row[\"name\"]);\n\t\t\t\t\t\teval(\"\\$migration = new \\\\System\\\\Migrate\\\\{$migration}();\");\n\n\t\t\t\t\t\tself::$migrations[] = new $migration();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$CSort = new MigrationCompare();\n\t\t\t\tusort( self::$migrations, array( &$CSort, 'compareVersion' ));\n\t\t\t\treturn self::$migrations;\n\t\t\t}\n\t\t}", "public function setMigratingUp($isMigratingUp);", "protected function createMigrationFile()\n {\n $fieldObjects = $this->getFields();\n\n if (@$fieldObjects['id']) {\n unset($fieldObjects['id']);\n }\n\n if (@$fieldObjects['created_at'] && @$fieldObjects['updated_at']) {\n $this->addGenericCall((new Base())->timestamps());\n\n unset($fieldObjects['created_at'], $fieldObjects['updated_at']);\n } // if\n\n if (@$fieldObjects['deleted_at']) {\n $this->addGenericCall((new Base())->softDeletes());\n\n unset($fieldObjects['deleted_at']);\n } // if\n\n $schema = implode(', ', $fieldObjects);\n\n if (strpos($schema, 'enum') !== false) {\n $this->getCommand()->info(sprintf('Please change the enum field of table \"%s\" manually.',\n $this->getName()));\n }\n\n if ($this->isPivotTable()) {\n $tables = array_keys($this->getForeignKeys());\n\n Artisan::call(\n 'make:migration:pivot',\n [\n 'tableOne' => $tables[0],\n 'tableTwo' => $tables[1]\n ]\n );\n } else {\n Artisan::call(\n 'make:migration:schema',\n [\n 'name' => \"create_{$this->getName()}_table\",\n '--model' => $this->needsLaravelModel(),\n '--schema' => $fieldObjects ? $schema : ''\n ]\n );\n\n $migrationFiles = glob(\n database_path('migrations') . DIRECTORY_SEPARATOR . \"*_create_{$this->getName()}_table.php\"\n );\n }\n\n return @$migrationFiles ? end($migrationFiles) : '';\n }", "function migrate(){\n\n create_table();\n save_migration_tables();\n\n}", "function importSchema(){\n\t\t\t$this->exportsSchema = false;\n\t\t}", "public function getMigrations(){\n $migrations[] = new migrateTable0001($this->get('db'));\n $migrations[] = new migrateTable0002($this->get('db'));\n $migrations[] = new migrateTableEvent($this->get('db'));\n $migrations[] = new migrateTableMessages($this->get('db'));\n $migrations[] = new migrateTablePerson($this->get('db'));\n $migrations[] = new migrateTable122320151845($this->get('db'));\n\n return $migrations;\n }", "protected function markAsMigrated($migrated_files = [])\n {\n foreach ($migrated_files as $migrated_file) {\n $this->db_adapter->execute(\"\n INSERT INTO $this->migration_table (file) VALUES ('$migrated_file')\n \");\n }\n }", "public function upgradeRecords() {\n foreach ($this->records as $record) {\n $type = $record[$this->Version->Version->alias]['type'];\n $version = $record[$this->Version->Version->alias]['version'];\n\n $mapping = $this->mappings[$type];\n $migration = $mapping[$version];\n\n $this->Version->Version->id = $record[$this->Version->Version->alias]['id'];\n $this->Version->Version->saveField('class', $migration['class']);\n }\n }", "public function save_tree()\n\t{\n\t\tforeach ($this->class_tree as $tree)\n\t\t{\n\t\t\tif (isset($tree['change_flag']))\n\t\t\t{\n\t\t\t\tswitch ($tree['change_flag'])\n\t\t\t\t{\n\t\t\t\t case 'INSERT' :\n\t\t\t\t\t$this->add_new_class($tree);\n\t\t\t\t\tbreak;\n\t\t\t\t case 'UPDATE' :\n\t\t\t\t\t$this->save_edited_class($tree);\n\t\t\t\t\tbreak;\n\t\t\t\t default :\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getMigrations();", "public function migrate() \n {\n\n Masteryl_Migration::createOrUpdateDir(MASTERYL_MIGRATIONS_PATH, $this);\n\n if(!empty($this->modules)) {\n foreach($this->modules as $mod) {\n $dir = $mod['path'].'migrations';\n \n if(file_exists($dir))\n Masteryl_Migration::createOrUpdateDir($dir, $this);\n }\n }\n\n }", "public function setInsert(string $className): void;", "private function applyNewMigration(Migration $migration) {\n $migration->up();\n foreach ($migration->getFields() as $migrationField) {\n if ($migrationField[\"new\"] == TRUE) {\n //new field\n $this->MigrationFieldCollection[$migration->getFileName()][$migrationField[\"field\"]->name][\"dataStructure\"] = $migrationField[\"field\"];\n $this->MigrationFieldCollection[$migration->getFileName()][$migrationField[\"field\"]->name][\"defaults\"] = $this->checkFieldProperties($migrationField[\"field\"]);\n // $this->mi$this->$migrationField[\"field\"];\n } else {\n if (!empty($this->MigrationFieldCollection[$migration->getFileName()][$migrationField[\"field\"]->name])) {\n $checkFieldProperties = $this->checkFieldProperties($migrationField[\"field\"]);\n //We will remove the default value if they are also the default value of the first migration otherwise we will keep it\n foreach ($checkFieldProperties as $key => $checkFieldProperty) {\n //todo: update this check the name value seems to go wrong!\n if (($checkFieldProperty === TRUE && $this->MigrationFieldCollection[$migration->getFileName()][$migrationField[\"field\"]->name][\"defaults\"][$key] === TRUE) || $key == \"name\") {\n unset($checkFieldProperties[$key]);\n }\n }\n //overwrite these fields note: we will not check if values are similar we will just overwrite the field another change check should be done on the last migration that exists\n foreach (array_keys($checkFieldProperties) as $propertyName) {\n $this->MigrationFieldCollection[$migration->getFileName()][$migrationField[\"field\"]->name][\"dataStructure\"]->$propertyName = $migrationField[\"field\"]->$propertyName;\n }\n } else {\n throw new \\Exception(\"trying to update a field that doesn't exist.\");\n }\n }\n }\n }", "public static function ignoreMigrations()\n {\n static::$runsMigrations = false;\n }", "protected function writeMigrations()\n {\n $files = $this->migrator->create($this->options);\n\n foreach($files as $file)\n {\n $path = pathinfo($file, PATHINFO_FILENAME);\n $this->line(\" <fg=green;options=bold>create</fg=green;options=bold> $path\");\n }\n }", "abstract public function enumAppliedMigrationSteps();", "protected function getMigrationClasses()\n {\n $files = glob(sprintf('%s/Migration/Attribute/*Migration.php', $this->getPath()));\n\n $migrationClasses = [];\n foreach ($files as $file) {\n $class = $this->getName() . '\\Migration\\Attribute\\\\' . basename($file, '.php');\n if (class_exists($class)) {\n $migration = new $class;\n if ($migration instanceof AbstractAttributeMigration) {\n $migrationClasses[] = $migration;\n }\n }\n }\n\n return $migrationClasses;\n }", "public function migrateDb();", "public function repositoryAndModelClassNames() {}", "function backup_migrate_crud_types() {\n $out = array(\n 'destination' => array(\n 'class' => 'Drupal\\backup_migrate\\Item\\Destination\\DestinationBase',\n 'include' => 'destinations',\n ),\n 'profile' => array(\n 'class' => 'Drupal\\backup_migrate\\Item\\Profile',\n 'include' => 'profiles',\n ),\n 'schedule' => array(\n 'class' => 'Drupal\\backup_migrate\\Item\\Schedule',\n 'include' => 'schedules',\n ),\n );\n return $out;\n}", "public function registerIncludedTaskClasses()\n {\n foreach (get_declared_classes() as $className) {\n if ($this->classIsTask($className)) {\n $this->registerTaskClass($className);\n }\n }\n }", "protected function get_class_mapper() {\n\t\t$class_mapper = array();\n\n\t\t/*\n\t\t * rsvp\n\t\t * @link https://indieweb.org/rsvp\n\t\t */\n\t\t$class_mapper['rsvp'] = 'rsvp';\n\n\t\t/*\n\t\t * invite\n\t\t * @link https://indieweb.org/invitation\n\t\t */\n\t\t$class_mapper['invitee'] = 'invite';\n\n\t\t/*\n\t\t * repost\n\t\t * @link https://indieweb.org/repost\n\t\t */\n\t\t$class_mapper['repost'] = 'repost';\n\t\t$class_mapper['repost-of'] = 'repost';\n\n\t\t/*\n\t\t * likes\n\t\t * @link https://indieweb.org/likes\n\t\t */\n\t\t$class_mapper['like'] = 'like';\n\t\t$class_mapper['like-of'] = 'like';\n\n\t\t/*\n\t\t * favorite\n\t\t * @link https://indieweb.org/favorite\n\t\t */\n\t\t$class_mapper['favorite'] = 'favorite';\n\t\t$class_mapper['favorite-of'] = 'favorite';\n\n\t\t/*\n\t\t * bookmark\n\t\t * @link https://indieweb.org/bookmark\n\t\t */\n\t\t$class_mapper['bookmark'] = 'bookmark';\n\t\t$class_mapper['bookmark-of'] = 'bookmark';\n\n\t\t/*\n\t\t * tag\n\t\t * @link https://indieweb.org/tag\n\t\t */\n\t\t$class_mapper['tag-of'] = 'tag';\n\t\t$class_mapper['category'] = 'tag';\n\n\t\t/*\n\t\t * read\n\t\t * @link https://indieweb.org/read\n\t\t */\n\t\t$class_mapper['read-of'] = 'read';\n\t\t$class_mapper['read'] = 'read';\n\n\t\t/*\n\t\t * listen\n\t\t * @link https://indieweb.org/listen\n\t\t */\n\t\t$class_mapper['listen-of'] = 'listen';\n\t\t$class_mapper['listen'] = 'listen';\n\n\t\t/*\n\t\t * watch\n\t\t * @link https://indieweb.org/watch\n\t\t */\n\t\t$class_mapper['watch-of'] = 'watch';\n\t\t$class_mapper['watch'] = 'watch';\n\n\t\t/*\n\t\t * follow\n\t\t * @link https://indieweb.org/follow\n\t\t */\n\t\t$class_mapper['follow-of'] = 'follow';\n\n\t\t/*\n\t\t * replies\n\t\t * @link https://indieweb.org/replies\n\t\t */\n\t\t$class_mapper['in-reply-to'] = 'comment';\n\t\t$class_mapper['reply'] = 'comment';\n\t\t$class_mapper['reply-of'] = 'comment';\n\n\t\treturn apply_filters( 'webmention_mf2_class_mapper', $class_mapper );\n\t}", "protected function beforeImport($entities)\n {\n\n }", "protected function afterImport($entities)\n {\n\n }", "function mkdf_re_version_class($classes) {\n\t\t$classes[] = 'mkd-re-'.MIKADO_RE_VERSION;\n\t\t\n\t\treturn $classes;\n\t}", "public function roleTableMigrate()\r\n\t{\r\n\t\t$isRoleTableExist = $this->schema->tableExist('role');\r\n\t\tif (!$isRoleTableExist) {\r\n\r\n\t\t\t$fileName = \"20210408051901_create_roles_table.php\";\r\n\t\t\t$dir = $this->migrationFiles . $fileName;\r\n\t\t\t$content = file_get_contents($this->stubsPath . \"user_roles.stubs\");\r\n\r\n\t\t\tif (!file_exists($dir)) {\r\n\t\t\t\t$handle = fopen($dir, 'w+');\r\n\t\t\t\tfwrite($handle, $content);\r\n\t\t\t\tfclose($handle);\r\n\t\t\t\tchmod($dir, 0777);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function wpbs_register_database_classes_bookings($classes)\n{\n\n $classes['bookings'] = 'WPBS_Object_DB_Bookings';\n $classes['bookingmeta'] = 'WPBS_Object_Meta_DB_Bookings';\n\n return $classes;\n\n}", "public function userTableMigrate()\r\n\t{\r\n\t\t$isUserTableExist = $this->schema->tableExist('users');\r\n\t\tif (!$isUserTableExist) {\r\n\r\n\t\t\t$fileName = \"20210408051901_create_users_table.php\";\r\n\t\t\t$dir = $this->migrationFiles . $fileName;\r\n\t\t\t$content = file_get_contents($this->stubsPath . \"user_migration.stubs\");\r\n\r\n\t\t\tif (!file_exists($dir)) {\r\n\t\t\t\t$handle = fopen($dir, 'w+');\r\n\t\t\t\tfwrite($handle, $content);\r\n\t\t\t\tfclose($handle);\r\n\t\t\t\tchmod($dir, 0777);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function save(){\n\n // Save the name of migration in prop (0000_00_00_000000_prefix.php)\n $this->migrationName = date('Y_m_d_'.Carbon::now()->format('His'),time()) . \"_\". $this->prefixFileName .\".php\";\n\n $this->document = $this->header;\n\n $this->document.= $this->up;\n $this->document.= $this->endUp;\n $this->document.= $this->down;\n $this->document.= $this->footer;\n\n return Storage::disk('migration')->put($this->migrationName, $this->document);\n\n }", "function uvasomcmedept_add_classes( $classes ) {\n\t$classes[] = 'uvasomcmedept';\n\treturn $classes;\n}", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "protected function get_table_classes()\n {\n }", "abstract public function getAdminTableClass();", "public function safeUp() {\n $this->insert('rgentity', array(\n 'dbview' => 'reg_viewjoined',\n 'name' => 'Имя реестра'\n ));\n\n $lastId = $this->dbConnection->getLastInsertID('rgentity_id_seq'); \n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'name',\n 'filtertype' => '0',\n 'alias' => 'Имя атрибута',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'producer_id',\n 'filtertype' => '0',\n 'alias' => 'Ид продюсера',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgentity', array(\n 'dbview' => 'reg_speciality',\n 'name' => 'Имя реестра специальностей большое длинное название неизвестно сколько символов.'\n ));\n \n $lastId = $this->dbConnection->getLastInsertID('rgentity_id_seq'); \n \n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'id',\n 'filtertype' => '0',\n 'alias' => 'Имя атрибута',\n 'enabled' => 'true',\n ));\n\n $this->insert('rgattr', array(\n 'entity_id' => $lastId,\n 'dbname' => 'name',\n 'filtertype' => '0',\n 'alias' => 'какое-тоимя',\n 'enabled' => 'true',\n ));\n }", "public function classes() {\n\t\t$this->ApiClass = ClassRegistry::init('ApiGenerator.ApiClass');\n\t\t$classIndex = $this->ApiClass->getClassIndex();\n\t\t$this->set('classIndex', $classIndex);\n\t}", "protected function updateMigrationTable()\n {\n $migration = str_replace('.php', '', basename(__FILE__));\n $batchResult = \\DB::select(\"SELECT max(batch) as batch FROM {$this->newDbName}.migrations\");\n $batch = $batchResult[0]->batch;\n\n \\DB::getPdo()->exec(\"INSERT INTO {$this->newDbName}.migrations (migration, batch) VALUES ('{$migration}', {$batch} + 1)\");\n }", "protected function loadMapBuilderClasses()\n {\n $this->table = Doctrine::getTable($this->getClassName());\n }", "public function passResetTableMigrate()\r\n\t{\r\n\t\t$isPassResetTableExist = $this->schema->tableExist('password_resets');\r\n\t\tif (!$isPassResetTableExist) {\r\n\r\n\t\t\t$fileName = \"20210408051901_create_password_resets_table.php\";\r\n\t\t\t$dir = $this->migrationFiles . $fileName;\r\n\t\t\t$content = file_get_contents($this->stubsPath . \"password_resets.stubs\");\r\n\r\n\t\t\tif (!file_exists($dir)) {\r\n\t\t\t\t$handle = fopen($dir, 'w+');\r\n\t\t\t\tfwrite($handle, $content);\r\n\t\t\t\tfclose($handle);\r\n\t\t\t\tchmod($dir, 0777);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function update_v14_to_v15() {\n\n echo \"- Update classmap.ser<br>\";\n try {\n Tools::createClassMap();\n } catch (Exception $e) {\n echo \"<span class='error_font'>Could not create classmap: \".$e->getMessage().\"</span><br/>\";\n exit;\n }\n\n $sqlScriptFilename = '../install/codevtt_update_v14_v15.sql';\n if (!file_exists($sqlScriptFilename)) {\n echo \"<span class='error_font'>SQL script not found:$sqlScriptFilename</span><br/>\";\n exit;\n }\n // execute the SQL script\n echo \"- Execute SQL script: $sqlScriptFilename<br>\";\n $retCode = Tools::execSQLscript2($sqlScriptFilename);\n if (0 != $retCode) {\n echo \"<span class='error_font'>Could not execSQLscript: $sqlScriptFilename</span><br/>\";\n exit;\n }\n}", "public function pClassesInDatabase() {\n return get_option('klarnapclasses') ? true : false;\n }", "function __autoload($class_name) {\n require_once '../admin/modelo/'. $class_name . '.php';\n}", "function __autoload($class_name) {\n require_once '../admin/modelo/'. $class_name . '.php';\n}", "function __autoload($class_name) {\n require_once '../admin/modelo/'. $class_name . '.php';\n}", "public function needToMigrateList(): array;", "public function change()\n {\n $this->table('users')\n ->addColumn('first_name', 'string', [\n 'null' => true,\n 'default' => null,\n ])\n ->addColumn('last_name', 'string', [\n 'null' => true,\n 'default' => null,\n ])\n ->addColumn('email', 'string', [\n 'null' => true,\n 'default' => null,\n ])\n ->addColumn('password', 'string', [\n 'null' => false,\n ])\n ->addColumn('active', 'boolean', [\n 'default' => false,\n 'null' => false,\n ])\n ->addColumn('created', 'datetime', [\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'null' => false,\n ])\n ->create();\n\n $this->table('groups')\n ->addColumn('name', 'string', [\n 'null' => false,\n ])\n ->addColumn('created', 'datetime', [\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'null' => false,\n ])\n ->create();\n\n $this->table('groups_users')\n ->addColumn('group_id', 'integer', [\n 'null' => false,\n ])\n ->addColumn('user_id', 'integer', [\n 'null' => false,\n ])\n ->addColumn('role', 'string', [\n 'null' => false,\n 'default' => 'user',\n ])\n ->create();\n\n $this->table('tags')\n ->addColumn('name', 'string', [\n 'null' => false,\n ])\n ->addColumn('occurrence', 'integer', [\n 'null' => false,\n ])\n ->addColumn('created', 'datetime', [\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'null' => false,\n ])\n ->create();\n\n $this->table('tagged')\n ->addColumn('table_alias', 'string', [\n 'null' => false,\n ])\n ->addColumn('foreign_key', 'integer', [\n 'null' => false,\n ])\n ->addColumn('tag_id', 'integer', [\n 'null' => false,\n ])\n ->addColumn('created', 'datetime', [\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'null' => false,\n ])\n ->create();\n\n $this->table('files')\n ->addColumn('group_id', 'integer', [\n 'null' => false,\n ])\n ->addColumn('name', 'string', [\n 'null' => false,\n ])\n ->addColumn('type', 'string', [\n 'null' => false,\n ])\n ->addColumn('path', 'string', [\n 'null' => false,\n ])\n ->addColumn('metadata', 'jsonb', [\n 'null' => true,\n 'default' => null,\n ])\n ->addColumn('created', 'datetime', [\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'null' => false,\n ])\n ->create();\n\n }", "private function moveMigration($arguments){\n\n $migrationPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/schemas/'.$arguments['schema'];\n $newPath=root.'/'.staticPathModel::$storeMigrationsPath.'/schemas/'.$arguments['schema'];\n\n\n $migrationPurePath=str_replace(root.'/','',$migrationPathWillBeMoved);\n $migrationNamespace=str_replace('/','\\\\',$migrationPurePath);\n $newMigrationNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newPath));\n\n\n if(rename($migrationPathWillBeMoved,$newPath)){\n\n foreach (glob($newPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationNamespace=>$newMigrationNamespace\n ]);\n }\n\n echo 'migration named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n echo PHP_EOL;\n }\n\n\n $migrationSeedPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/seeds';\n $newSeedPath=root.'/'.staticPathModel::$storeMigrationsPath.'/seeds';\n\n\n $migrationSeedPurePath=str_replace(root.'/','',$migrationSeedPathWillBeMoved);\n $migrationSeedNamespace=str_replace('/','\\\\',$migrationSeedPurePath);\n $newMigrationSeedNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newSeedPath));\n\n if(rename($migrationSeedPathWillBeMoved,$newSeedPath)){\n\n foreach (glob($newSeedPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationSeedNamespace=>$newMigrationSeedNamespace\n ]);\n }\n\n echo 'migration seeds named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n\n }\n }", "function chargerclasses($class){\n require(\"../dao/\".$class.\".class.php\");\n }", "protected function createMigration($class)\n {\n if ($this->includeModuleMigrations) {\n $this->migrationPath = $this->getMigrationPath($class);\n }\n\n\t\treturn parent::createMigration($class);\n }", "public function testMigrationsOptionsMarkMigrated()\n {\n $this->exec('completion options migrations.migrations mark_migrated');\n $this->assertCount(1, $this->_out->messages());\n $output = $this->_out->messages()[0];\n $expected = '--connection -c --exclude -x --help -h --only -o --plugin -p --quiet -q';\n $expected .= ' --source -s --target -t --verbose -v';\n $outputExplode = explode(' ', trim($output));\n sort($outputExplode);\n $expectedExplode = explode(' ', $expected);\n sort($expectedExplode);\n\n $this->assertEquals($outputExplode, $expectedExplode);\n }", "public function save()\n {\n //set some parameters\n $indexField = [ $this->indexField => $this->data[$this->indexField] ?? '' ];\n $columns = [];\n\n foreach ($this->editSettings as $k => $v) {\n $columns[$k] = $this->data[$k];\n }\n\n $class = $this->classPathBase::updateOrCreate($indexField, $columns);\n }", "public function updateClass_post()\n {\n /* code goes here */\n }", "function sfgov_utilities_deploy_07_field_dept_migration() {\n $rm = new ResourceMigration();\n \n $rm->migrateAboutAndPublicBodyResources();\n $rm->migrateCampaignResources();\n $rm->migrateResourceCollections();\n $rm->migrateTopicsAndDepartments();\n $rm->migrateTopicsAndDepartmentsResourceSubheading();\n}", "protected function beforeSaveInDB(){}", "private function _populateMigrationTable()\n\t{\n\t\t$migrations = array();\n\n\t\t// Add the base one.\n\t\t$migration = new MigrationRecord();\n\t\t$migration->version = craft()->migrations->getBaseMigration();\n\t\t$migration->applyTime = DateTimeHelper::currentUTCDateTime();\n\t\t$migrations[] = $migration;\n\n\t\t$migrationsFolder = craft()->path->getAppPath().'migrations/';\n\t\t$migrationFiles = IOHelper::getFolderContents($migrationsFolder, false, \"(m(\\d{6}_\\d{6})_.*?)\\.php\");\n\n\t\tif ($migrationFiles)\n\t\t{\n\t\t\tforeach ($migrationFiles as $file)\n\t\t\t{\n\t\t\t\tif (IOHelper::fileExists($file))\n\t\t\t\t{\n\t\t\t\t\t$migration = new MigrationRecord();\n\t\t\t\t\t$migration->version = IOHelper::getFileName($file, false);\n\t\t\t\t\t$migration->applyTime = DateTimeHelper::currentUTCDateTime();\n\n\t\t\t\t\t$migrations[] = $migration;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($migrations as $migration)\n\t\t\t{\n\t\t\t\tif (!$migration->save())\n\t\t\t\t{\n\t\t\t\t\tCraft::log('Could not populate the migration table.', LogLevel::Error);\n\t\t\t\t\tthrow new Exception(Craft::t('There was a problem saving to the migrations table: ').$this->_getFlattenedErrors($migration->getErrors()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCraft::log('Migration table populated successfully.');\n\t}", "function __autoload($class_name) {\n require_once '../admin/modelo/' . $class_name . '.php';\n}", "protected function getMigrations()\n {\n $finder = new Finder();\n $files = $finder->files()\n ->name('*table.php')\n ->notName('2014*')\n ->in(database_path() . '/migrations');\n\n foreach ($files as $file) {\n $this->migrations[] = $file->getRealPath() ;\n }\n }", "function ptn_migration_migrate_api() {\n $common_arguments = array(\n\n );\n\n $api = array(\n 'api' => 2,\n 'groups' => array(\n 'ptncustom' => array(\n 'title' => t('PTN custom migrations'),\n ),\n ),\n 'migrations' => array(\n 'PtnBooklet' => $common_arguments + array(\n 'class_name' => 'PtnBookletMigration',\n 'destination_type' => 'booklet',\n 'group_name' => 'ptncustom',\n 'description' => 'Custom migration for booklets',\n 'dependencies' => array(\n ),\n ),\n 'PtnSentence' => $common_arguments + array(\n 'class_name' => 'PtnSentenceMigration',\n 'destination_type' => 'sentence',\n 'group_name' => 'ptncustom',\n 'description' => 'Custom migration for sentences',\n 'dependencies' => array(\n 'PtnBooklet',\n ),\n ),\n ),\n );\n return $api;\n}", "private function registerMigrations()\n {\n $this->loadMigrationsFrom($this->migrations);\n }", "public function isMigrated($migrationClassName): bool\n {\n if ( ! file_exists($this->_dir)) {\n return false;\n }\n\n $migrated = $this->getFileContent();\n\n return isset($migrated[$migrationClassName]);\n }", "protected abstract function registerClasses(): void;", "public function updateClasses() {\n if($this->uninstall) {\n // fluent interface\n return $this;\n }\n \n // create tables\n $this->createTables();\n \n // remove tables\n $this->removeTables();\n \n foreach($this->_allClasses as $classname => $value) {\n $classcontent = $this->_classes[$classname];\n $this->_classWriter->setClass($classname, null, \"ActiveRecord\");\n foreach($classcontent as $attributename => $attributecontent) {\n $this->_classWriter->addAttribute($attributename, \"static\", $attributecontent);\n }\n $this->_classWriter->save();\n }\n $this->_allClasses = array();\n\n // fluent interface\n return $this;\n }", "protected function registerMigrations(): void\n {\n if (Satifest::$runsMigrations) {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n return;\n }\n }", "protected function migrateIncludedObjects() {\n\t\tif (\n\t\t\t! isset( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'] ) &&\n\t\t\t! isset( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'] )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_array( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'] ) ) {\n\t\t\t$this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'] = [];\n\t\t}\n\n\t\tif ( ! is_array( $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'] ) ) {\n\t\t\t$this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'] = [];\n\t\t}\n\n\t\t$publicPostTypes = aioseo()->helpers->getPublicPostTypes( true );\n\t\t$publicTaxonomies = aioseo()->helpers->getPublicTaxonomies( true );\n\n\t\tif ( in_array( 'all', $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'], true ) ) {\n\t\t\taioseo()->options->sitemap->general->postTypes->all = true;\n\t\t\taioseo()->options->sitemap->general->postTypes->included = array_values( $publicPostTypes );\n\t\t} else {\n\t\t\t$allPostTypes = true;\n\t\t\tforeach ( $publicPostTypes as $postType ) {\n\t\t\t\tif ( ! in_array( $postType, $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'], true ) ) {\n\t\t\t\t\t$allPostTypes = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taioseo()->options->sitemap->general->postTypes->all = $allPostTypes;\n\t\t\taioseo()->options->sitemap->general->postTypes->included = array_values(\n\t\t\t\tarray_intersect( $publicPostTypes, $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_posttypes'] )\n\t\t\t);\n\t\t}\n\n\t\tif ( in_array( 'all', $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'], true ) ) {\n\t\t\taioseo()->options->sitemap->general->taxonomies->all = true;\n\t\t\taioseo()->options->sitemap->general->taxonomies->included = array_values( $publicTaxonomies );\n\t\t} else {\n\t\t\t$allTaxonomies = true;\n\t\t\tforeach ( $publicTaxonomies as $taxonomy ) {\n\t\t\t\tif ( ! in_array( $taxonomy, $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'], true ) ) {\n\t\t\t\t\t$allTaxonomies = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\taioseo()->options->sitemap->general->taxonomies->all = $allTaxonomies;\n\t\t\taioseo()->options->sitemap->general->taxonomies->included = array_values(\n\t\t\t\tarray_intersect( $publicTaxonomies, $this->oldOptions['modules']['aiosp_sitemap_options']['aiosp_sitemap_taxonomies'] )\n\t\t\t);\n\t\t}\n\t}", "protected function loadClassFiles() {}", "abstract protected function getEntityClassNames();", "protected function getTemplate($className)\n {\n return sprintf('<?php\n\nnamespace %s;\n\nuse ZfSimpleMigrations\\Library\\AbstractMigration;\nuse Zend\\Db\\Metadata\\MetadataInterface;\n\nclass %s extends AbstractMigration\n{\n public static $description = \"Migration description\";\n\n public function up(MetadataInterface $schema)\n {\n //$this->addSql(/*Sql instruction*/);\n }\n\n public function down(MetadataInterface $schema)\n {\n //throw new \\RuntimeException(\\'No way to go down!\\');\n //$this->addSql(/*Sql instruction*/);\n }\n}\n', $this->migrationNamespace, $className);\n }", "public static function saveClass() {\n $result = array();\n $default = (isset($_GET['default']) && $_GET['default'] == 'on') ? true : false;\n $saved = lC_Weight_classes_Admin::save($_GET, $default);\n if ($saved) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public function change()\n {\n $members = $this->table('members');\n $members->addColumn('password', 'string')\n ->addColumn('com_trading_name_vie', 'string')\n ->addColumn('com_trading_name_eng', 'string')\n ->addColumn('com_trading_name_jpn', 'string')\n ->addColumn('com_short_name_vie', 'string')\n ->addColumn('com_short_name_eng', 'string')\n ->addColumn('com_short_name_jpn', 'string')\n ->addColumn('com_country', 'integer', ['comment' => '1: VN, 2: JP'])\n ->addColumn('com_lang_chosen', 'string', ['comment' => '1: VIE, 2: ENG, 3: JPN'])\n ->addColumn('com_established', 'date')\n ->addColumn('com_tax_code', 'string')\n ->addColumn('com_capital', 'string')\n ->addColumn('com_staff', 'integer')\n ->addColumn('gender', 'integer')\n ->addColumn('image', 'string',['null' =>true])\n ->addColumn('com_business_vie', 'text')\n ->addColumn('com_business_eng', 'text')\n ->addColumn('com_business_jpn', 'text')\n ->addColumn('com_note_vie','text')\n ->addColumn('com_note_eng','text')\n ->addColumn('com_note_jpn','text')\n ->addColumn('address_vie', 'string')\n ->addColumn('address_eng', 'string')\n ->addColumn('address_jpn', 'string')\n ->addColumn('com_pic_department_vie', 'string')\n ->addColumn('com_pic_department_eng', 'string')\n ->addColumn('com_pic_department_jpn', 'string')\n ->addColumn('type_company_id', 'integer')\n ->addColumn('type_business_id', 'integer')\n ->addColumn('mobile', 'string')\n ->addColumn('com_rate', 'string')\n ->addColumn('cooperation_id', 'integer')\n ->addColumn('need_id', 'integer')\n ->addColumn('com_status', 'integer')\n ->addColumn('com_inquiry_vie', 'text')\n ->addColumn('com_inquiry_eng', 'text')\n ->addColumn('com_inquiry_jpn', 'text')\n ->addColumn('com_level', 'integer', ['default' => 2,'comment' => '1: vip member, 2: default member'])\n ->addColumn('com_view', 'integer')\n ->addColumn('com_send_email','integer')\n ->addColumn('com_name_jpn','string')\n ->addColumn('com_name_eng', 'string')\n ->addColumn('manager_eng', 'string')\n ->addColumn('manager_jpn', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true, 'default' => null])\n ->save();\n\n }", "public function dumpClassLoadingInformationCommand() {}", "public function getAllClassNames() \n {\n\n }", "protected function setMigrator()\n {\n $this->migrator = App::make('migrator');\n }", "protected function loadToIgnore(){\n\t\t\t$otherClass=$this->class;\n\t\t\t$this->toIgnore = array();\n\t\t\tif(isset($otherClass::$ignoreProperties) && is_array($otherClass::$ignoreProperties)){\n\t\t\t\t$this->toIgnore = $otherClass::$ignoreProperties;\n\t\t\t}\n\t\t}" ]
[ "0.55805653", "0.55301595", "0.5500356", "0.54755425", "0.54607505", "0.5327683", "0.53254604", "0.5309002", "0.5305589", "0.528958", "0.5268564", "0.52581084", "0.5254144", "0.5202", "0.51881343", "0.51690793", "0.5153159", "0.51367027", "0.51362866", "0.5134876", "0.51163", "0.5110606", "0.509118", "0.50572664", "0.5045271", "0.5041823", "0.50416994", "0.5037232", "0.50328463", "0.50215983", "0.50116843", "0.50062436", "0.49761605", "0.49759933", "0.49628976", "0.49516207", "0.493379", "0.48970997", "0.48877484", "0.48875058", "0.48865536", "0.48859006", "0.4861052", "0.48601395", "0.48591942", "0.48584196", "0.48536986", "0.4839328", "0.48345748", "0.48297307", "0.48279095", "0.4825023", "0.4820075", "0.48190746", "0.4818598", "0.4817273", "0.4817242", "0.48110518", "0.48068404", "0.48056692", "0.48045725", "0.48032072", "0.480058", "0.47960502", "0.4794008", "0.47871238", "0.4786833", "0.47848773", "0.47743118", "0.47743118", "0.47743118", "0.47742286", "0.4773673", "0.47684276", "0.47614828", "0.475869", "0.47500375", "0.47499412", "0.47443345", "0.47434983", "0.47359997", "0.47334296", "0.4727916", "0.472707", "0.47264993", "0.47205347", "0.47201747", "0.47128582", "0.4702902", "0.46972144", "0.46933758", "0.46815377", "0.4679977", "0.46786788", "0.46780723", "0.46752748", "0.4674427", "0.46699554", "0.4668219", "0.46681398" ]
0.6055214
0
check if class migrated or not
public function isMigrated($migrationClassName): bool { if ( ! file_exists($this->_dir)) { return false; } $migrated = $this->getFileContent(); return isset($migrated[$migrationClassName]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isMigratingUp();", "public function migrateUp($class)\n {\n if ($class === self::BASE_MIGRATION) {\n return true;\n }\n\n $this->stdout(\"*** applying $class\\n\", Console::FG_YELLOW);\n $start = microtime(true);\n $migration = parent::createMigration($class);\n if ($migration->up() !== false) {\n $time = microtime(true) - $start;\n $this->stdout(\"*** applied $class (time: \" . sprintf('%.3f', $time) . \"s)\\n\\n\", Console::FG_GREEN);\n\n return true;\n } else {\n $time = microtime(true) - $start;\n $this->stdout(\"*** failed to apply $class (time: \" . sprintf('%.3f', $time) . \"s)\\n\\n\", Console::FG_RED);\n\n return false;\n }\n }", "public function testInvalidMigrationClass(): void\n {\n // This test is designed to test/cover specific implementation rather than functionality and\n // needed to simulate very specific situation.\n\n /** @var Mock $inOut */\n $inOut = Mockery::mock(IoInterface::class);\n $inOut->shouldReceive('writeWarning')->once()->withAnyArgs()->andReturnSelf();\n\n /** @var IoInterface $inOut */\n\n $runner = Mockery::mock(BaseMigrationRunner::class);\n $runner->makePartial();\n\n $container = $this->createContainer();\n\n $method = new ReflectionMethod(BaseMigrationRunner::class, 'setIO');\n $method->setAccessible(true);\n $method->invoke($runner, $inOut);\n\n $method = new ReflectionMethod(BaseMigrationRunner::class, 'createMigration');\n $method->setAccessible(true);\n $nullMigration = $method->invoke($runner, 'non-existing-class', $container);\n\n $this->assertNull($nullMigration);\n }", "public function hasClass(): bool;", "public function supportsMigrations();", "public function pClassesInDatabase() {\n return get_option('klarnapclasses') ? true : false;\n }", "function isUpgrade() {\n\t\tdie ('ABSTRACT CLASS');\n\t}", "protected function isMigrationTableCreated()\n {\n // TODO: Move query to a query factory based on db_adapter\n $resource = $this->db_adapter->query(\"\n SELECT relname \n FROM pg_class \n WHERE relname = '$this->migration_table';\n \");\n\n // TODO: Needs to be abstracted from this class\n $result = pg_fetch_row($resource);\n\n return $result[0];\n }", "public function needsUpgrade() {\n $schema = $this->Version->Version->schema();\n\n // Needs upgrade\n if (isset($schema['version'])) {\n return;\n }\n\n // Do not need, 001 already set it as string\n // Unset actions, records and mappings, so it wont try again\n $this->migration = array(\n 'up' => array(),\n 'down' => array(),\n );\n $this->records = array();\n $this->mappings = array();\n }", "public function getMigrationClass()\n {\n return $this->migrationClass;\n }", "public function migrate()\n\t{\n\t}", "public function shouldRunMigration()\n {\n return $this->canRunMigration()\n && !Mage::getStoreConfigFlag(self::MIGRATION_COMPLETE)\n && !Mage::getStoreConfig('payment/gene_braintree/merchant_id')\n && !Mage::getStoreConfig('payment/gene_braintree/sandbox_merchant_id');\n }", "public function supportsClass($class);", "public function supportsClass($class);", "public function testSupportClass(): void\n {\n self::assertTrue($this->userRepository->supportsClass(User::class));\n self::assertFalse($this->userRepository->supportsClass(UserRepository::class));\n }", "public function supports(string $class): bool;", "public function supportsClass($class)\n {\n return $class === 'Surfnet\\StepupMiddlewareClientBundle\\Identity\\Dto\\Identity';\n }", "public function isCreated(string $className): bool;", "final public function supportsClass($class)\n {\n return $class === User::class;\n }", "private final function ensureObjectInDb()\n {\n # WORKING_ON\n $class_reflection = new ReflectionClass(get_class($this));\n do {\n # use reflection to SKIP abstract classes\n if (!$class_reflection->isInstantiable())\n continue;\n\n if (!$this->getLoadedFromDb($class_reflection->getName())) {\n $this->insert($class_reflection->getName());\n break;\n }\n\n } while (($class_reflection = $class_reflection->getParentClass()) && # get the parent\n $class_reflection->getName() != __CLASS__); # check that we're not hitting the top\n }", "public function supportsClass($class)\n {\n }", "function is_detalhe_core_actived(){\n return class_exists( 'Detalhe_Core' ) ? true : false;\n}", "public function doMigrations() {\n\t\t$tbl = $this->tableManager->doMigrations();\n\t\t$fld = $this->fieldManager->doMigrations();\n\t\t$axs = $this->accessManager->doMigrations();\n\t\treturn $tbl && $fld && $axs;\n\t}", "public function isClass(): bool\n {\n return !is_null($this->namespaceParts);\n }", "public function supportsClass($class)\n {\n return $class === '\\Entity\\User\\User';\n }", "public function setMigratingUp($isMigratingUp);", "public function isClass() : bool\n {\n return $this->simple && !Validators::isBuiltinType($this->types[0]);\n }", "public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }", "function onCheckSchema()\n {\n // Not sure we need a new data class for ContextIO. We should be able\n // to do everything with the existing Foreign_link and Foreign_user\n // table. Maybe.\n\n return true;\n }", "public function canRunMigration()\n {\n return Mage::helper('core')->isModuleEnabled('Braintree_Payments');\n }", "public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}", "public function isCreated($className);", "public function supportsClass($class): bool\n {\n return User::class === $class;\n }", "function isLoadableClass($type, $class) {\n\t\treturn App::import($type, $class);\n\t}", "public function supportsClass($class)\n {\n return $class === \"FData\\SecurityBundle\\User\\User\";\n }", "public function migrate() {}", "public function migrationsNeeded() {\n\t\treturn $this->tableManager->migrationsNeeded() || $this->fieldManager->migrationsNeeded() || $this->accessManager->migrationsNeeded();\n\t}", "public function hasClass($class);", "function _class_check($str){\n }", "public function scopeMigrated($query)\n {\n //TODO: Custom query to improve performance or Cache!\n return $query->has('migration');\n }", "public function checkConvertability()\n {\n }", "private function run() {\n\t\tif ( $this->upgrade_schema->does_table_exist( $this->get_table() ) ) {\n\t\t\tif ( ! $this->upgrade_schema->does_column_exist( $this->get_table(), $this->get_column() ) ) {\n\t\t\t\t$this->upgrade_schema->add_column( $this->get_table(), $this->get_column(), $this->get_column_definition() );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function testIsVendorClassReturnsFalseIfClassOfObjectIsNotLocatedInVendorDirectory()\n {\n $this->assertFalse(VendorResources::isVendorClass(new ContactType()));\n }", "function macro_check_class(&$class)\n{\n $class = ltrim($class, '\\\\');\n\n return \\XLite\\Core\\Operator::isClassExists($class);\n}", "function migrate()\n {\n if (!$this->object->_columns) {\n throw new E_ColumnsNotDefinedException(\"Columns not defined for {$this->get_table_name()}\");\n }\n $added = FALSE;\n $removed = FALSE;\n // Add any missing columns\n foreach ($this->object->_columns as $key => $properties) {\n if (!in_array($key, $this->object->_table_columns)) {\n if ($this->object->_add_column($key, $properties['type'], $properties['default_value'])) {\n $added = TRUE;\n }\n }\n }\n // Remove any columns not defined\n //\t\tforeach ($this->object->_table_columns as $key) {\n //\t\t\tif (!isset($this->object->_columns[$key])) {\n //\t\t\t\t$this->object->_remove_column($key);\n // $removed = TRUE;\n //\t\t\t}\n //\t\t}\n if ($added or $removed) {\n // var_dump($this->object->_table_columns);\n $this->object->lookup_columns();\n // var_dump($added, $removed);\n }\n }", "public function checkConvertability()\n {\n $this->checkConvertabilityCloudConverterTrait();\n }", "public function makeMigration()\n {\n $name = $this->meta['name'];\n if ($this->files->exists($path = $this->getPath($name))) {\n return $this->error($this->type . ' already exists!');\n }\n $this->makeDirectory($path);\n if($this->files->put($path, $this->compileMigrationStub())){\n return true;\n }\n\n return false;\n }", "public function checkIfClassExist($class_name){\n\t\t\t$query = $this->connection()->prepare(\"SELECT name FROM clazz WHERE name='$class_name'\");\n\t\t\t$query->execute();\n\t\t\treturn $query->rowCount();\n\t\t}", "public function hasClass($name);", "public function has_class_method() {\n\t\treturn ! empty( $this->get_class_method() );\n\t}", "public function migrate()\n\t{\n\t\t$old_scorecards = $this->old->table(self::SCORECARD_TABLE_NAME)->where('scorecard_type', 'MASTER')->get();\n\t\t$new_scorecards = $this->new->table(self::SCORECARD_TABLE_NAME)->where('type', 'MASTER')->get();\n\n\t\tforeach($old_scorecards as $key => $old)\n\t\t{\n\t\t \t$this->updateScorecard($old, $new_scorecards[$key]);\n\t\t}\n\n\t\t$this->updateItems();\n\n\t\treturn true;\n\t}", "final private function _isValidSuiteClass ($class) {\n\t\t$ref = new ReflectionClass($class);\n\t\tif ($class === $this->_baseClass or $ref->isSubclassOf($this->_baseClass)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function supportsClass($class)\n {\n return Account::class === $class;\n }", "public function checkDatabaseStructure( );", "public function supportsClass($class)\n {\n return IQUser::class === $class;\n }", "public function removeSourceEntityClass(): bool\n {\n $file = $this->getSourceClassPath();\n $repositoryFile = $this->getRepositoryClassPath();\n $fileSystem = new Filesystem();\n\n if ($fileSystem->exists($file) && is_file($file)) {\n $fileSystem->remove($file);\n /*\n * Delete repository class file too.\n */\n if ($fileSystem->exists($repositoryFile) && is_file($repositoryFile)) {\n $fileSystem->remove($repositoryFile);\n }\n return true;\n }\n\n return false;\n }", "public function supportsClass($class)\n {\n // TODO: Implement supportsClass() method.\n }", "public function hasEntityClass(): bool\n {\n return $this->hasDataItem('entity');\n }", "public function supportsClass($class)\n {\n return $class == George::class;\n }", "public function supportsClass(string $class): bool\n\t{\n\t\treturn User::class === $class || is_subclass_of($class, User::class);\n\t}", "function __autoload($class)\n{\n\tif(SomeLoader::load($class)) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function updateNecessary(): bool\n {\n $upgradeApi = GeneralUtility::makeInstance(UpgradeApi::class);\n $elementCount = 0;\n $tables = explode(',', self::TABLES);\n foreach ($tables as $table) {\n if (!isset($this->tableFields[$table])) {\n continue;\n }\n $fields = $this->tableFields[$table];\n foreach ($fields as $field) { \n $elementCount += \n $upgradeApi->countOfTableFieldMigrations(\n $table,\n $field, \n $field . '_uid', \n ParameterType::STRING,\n \\PDO::PARAM_INT\n );\n if ($elementCount > 0) {\n break;\n }\n }\n if ($elementCount > 0) {\n break;\n }\n }\n return ($elementCount > 0);\n }", "public function supportsClass($class)\r\n {\r\n @trigger_error('Using the UserManager as user provider is deprecated. Use FOS\\UserBundle\\Security\\UserProvider instead.', E_USER_DEPRECATED);\r\n\r\n return $class === $this->getClass();\r\n }", "function exists(string $class_name): bool\n{\n /** @var bool */\n return class_exists($class_name, true);\n}", "abstract protected function assertEntityClass();", "private function createNewMigration() {\n // $this->MigrationFieldCollection[$this->getModel()->getShortModelName()];\n $changes = []; //these fields are added or updated if the fieldnames is not in this array delete it.\n foreach ($this->getModel()->getFieldCollection() as $fieldName => $field) {\n //var_dump($this->checkFieldProperties($field)); --mark if the fieldsproperties are default or not\n $this->checkFieldProperties($field);\n var_dump($field);\n\n if (!empty($this->MigrationFieldCollection[$this->getModel()->getShortModelName()][$fieldName])) {\n $reflection = new \\ReflectionObject($field);\n $changes = [];\n $this->checkFieldProperties($field);\n\n foreach ($reflection->getProperties() as $fieldValues) {\n\n }\n //we want to update this field\n } else {\n\n //copy this field since we create\n }\n }\n foreach ($this->MigrationFieldCollection[$this->getModel()->getShortModelName()] as $migrationFieldName => $migrationField) {\n if (!in_array($migrationFieldName, $changes)) {\n $this->newMigrationLines[] = $this->modelFieldToMigrationString($migrationField['dataStructure'], 'delete');\n }\n }\n }", "protected function checkForValidImplementingClass()\n {\n $this->validateModel();\n $this->validateItemId();\n }", "static function isAvailableUserClass($class) {\n return in_array($class, Users::getAvailableUserClasses());\n }", "protected function is_class($command): bool\n{\n return is_string($command) \n && class_exists($command);\n}", "public function testIfClassCanBeCreated()\n {\n $this->assertInstanceOf(Validator::class, $this->_validator);\n }", "private function isClassExtendsBackendClass(\\ReflectionClass $class)\n {\n while ($parentClass = $class->getParentClass()) {\n if (AbstractAction::class === $parentClass->getName()) {\n return true;\n }\n $class = $parentClass;\n }\n return false;\n }", "public function testIsVendorClassReturnsTrueIfClassOfObjectIsLocatedInVendorDirectory()\n {\n $this->assertTrue(VendorResources::isVendorClass(new ClassLoader()));\n }", "public function isMapping($class) {\n $map = $this->classRegistry->getMap($class);\n \n return !empty($map);\n }", "function NeedDatabaseUpgrade()\n\t{\n\t\tif ($this->database_version == -1) {\n\t\t\t$this->CheckCron();\n\t\t}\n\n\t\tif ($this->database_version < SENDSTUDIO_DATABASE_VERSION) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "protected function _checkRecordInstance()\n {\n if (!$this->_entity)\n {\n $this->_entity = new $this->entityName();\n return false;\n }\n else\n return true; \n }", "function migrate()\r\n\t{\r\n\t\treturn '';\r\n\t}", "public function hasContextClass($class);", "protected function needResourceClass(): bool\n {\n return $this->resourceClass() !== null;\n }", "protected static function check_parent_class( $class ) {\n\t\tif ( is_subclass_of( $class, 'ht_dms\\api\\internal\\actions\\action' ) ) {\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "private function migration()\n {\n $location = $this->args['location'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR;\n if (!is_dir($location))\n {\n mkdir($location);\n }\n\n $backtrace = debug_backtrace();\n $calling_function = $backtrace[1]['function'];\n\n if ($calling_function === \"model\")\n {\n $class_name = 'Migration_Add_';\n $filename = 'add_';\n $table_name = '';\n\n if (!empty($this->args['subdirectories']))\n {\n $dirs = explode(DIRECTORY_SEPARATOR, $this->args['subdirectories']);\n $dirs = join('_', $dirs);\n $class_name .= strtolower($dirs) . '_';\n $filename .= strtolower($dirs) . '_';\n $table_name .= strtolower($dirs) . '_';\n }\n $args = array(\n 'class_name' => $class_name . Inflector::pluralize($this->args['name']),\n 'table_name' => $table_name . Inflector::pluralize(strtolower($this->args['name'])),\n 'filename' => $filename . Inflector::pluralize(ApplicationHelpers::underscorify($this->args['name'])) . '.php',\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'migration';\n }\n else\n {\n $args = array(\n 'class_name' => 'Migration_' . $this->args['name'],\n 'table_name' => $this->get_table_name_out_of_migration_name(),\n 'filename' => $this->args['filename'],\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'empty_migration';\n }\n\n $template = new TemplateScanner($template_name, $args);\n $migration = $template->parse();\n\n $migration_number = MigrationHelpers::get_migration_number($this->args['location']);\n $filename = $location . $migration_number . '_' . $args['filename'];\n $potential_duplicate_migration_filename = MigrationHelpers::decrement_migration_number($migration_number) . '_' . $args['filename'];\n $potential_duplicate_migration = $location . $potential_duplicate_migration_filename;\n\n $message = \"\\t\";\n if (file_exists($potential_duplicate_migration))\n {\n $message .= 'Migration already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $potential_duplicate_migration_filename;\n }\n else if (file_put_contents($filename, $migration) && MigrationHelpers::add_migration_number_to_config_file($this->args['location'], $migration_number))\n {\n $message .= 'Created Migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $args['filename'];\n }\n else\n {\n $message .= 'Unable to create migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $this->args['filename'];\n }\n\n fwrite(STDOUT, $message . PHP_EOL);\n\n return;\n }", "public static function exists($class)\n {\n return isset(ModelBlueprint::$blueprints[$class]);\n }", "public function Upgrade() {\n\n if (!$this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CheckTable($this->\n GetPrefix() . 'userdefn')->\n GetVar()) {\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CreateTable($this->\n GetPrefix() . 'userdefn', array(\n 'user_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false,\n 'primary' => true\n ),\n 'user_login' => array(\n 'type' => 'VARCHAR',\n 'length' => 128,\n 'isnull' => false\n ),\n 'created_on' => array(\n 'type' => 'DATETIME',\n 'isnull' => false\n ),\n 'created_by' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false\n )\n ))->\n Query();\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CreateTable($this->\n GetPrefix() . 'userdata', array(\n 'user_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false,\n 'primary' => true\n ),\n 'eff_dttm' => array(\n 'type' => 'DATETIME',\n 'isnull' => false,\n 'primary' => true\n ),\n 'email' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n ),\n 'first_name' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n ),\n 'last_name' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n ),\n 'middle_name' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => true\n ),\n 'dob' => array(\n 'type' => 'DATE',\n 'isnull' => true\n ),\n 'doa' => array(\n 'type' => 'DATE',\n 'isnull' => true\n ),\n 'active' => array(\n 'type' => 'VARCHAR',\n 'length' => 1,\n 'isnull' => false\n ),\n 'updated_on' => array(\n 'type' => 'DATETIME',\n 'isnull' => false\n ),\n 'updated_by' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false\n )\n ), array(\n 'fk_userdefn_userdata' => array(\n 'indextype' => 'fk',\n 'columns' => array(\n 'user_id'\n ),\n 'referencetable' => $this->\n GetPrefix() . 'userdefn',\n 'referencecolumns' => array(\n 'user_id'\n )\n )\n ))->\n Query();\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CreateTable($this->\n GetPrefix() . 'userpassword', array(\n 'user_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false,\n 'primary' => true\n ),\n 'eff_dttm' => array(\n 'type' => 'DATETIME',\n 'isnull' => false,\n 'primary' => true\n ),\n 'password' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n ),\n 'updated_on' => array(\n 'type' => 'DATETIME',\n 'isnull' => false\n ),\n 'updated_by' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false\n )\n ), array(\n 'fk_userdefn_userpassword' => array(\n 'indextype' => 'fk',\n 'columns' => array(\n 'user_id'\n ),\n 'referencetable' => $this->\n GetPrefix() . 'userdefn',\n 'referencecolumns' => array(\n 'user_id'\n )\n )\n ))->\n Query();\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CreateTable($this->\n GetPrefix() . 'usersalt', array(\n 'salt_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false,\n 'primary' => true\n ),\n 'user_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false\n ),\n 'salt' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n ),\n 'device_name' => array(\n 'type' => 'VARCHAR',\n 'length' => 500,\n 'isnull' => false\n ),\n 'ip_address' => array(\n 'type' => 'VARCHAR',\n 'length' => 15,\n 'isnull' => false\n ),\n 'logged_on' => array(\n 'type' => 'DATETIME',\n 'isnull' => false\n ),\n 'last_access' => array(\n 'type' => 'DATETIME',\n 'isnull' => false\n )\n ), array(\n 'fk_userdefn_usersalt' => array(\n 'indextype' => 'fk',\n 'columns' => array(\n 'user_id'\n ),\n 'referencetable' => $this->\n GetPrefix() . 'userdefn',\n 'referencecolumns' => array(\n 'user_id'\n )\n )\n ))->\n Query();\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n CreateTable($this->\n GetPrefix() . 'userresetsalt', array(\n 'salt_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false,\n 'primary' => true\n ),\n 'user_id' => array(\n 'type' => 'VARCHAR',\n 'length' => 32,\n 'isnull' => false\n ),\n 'salt' => array(\n 'type' => 'VARCHAR',\n 'length' => 256,\n 'isnull' => false\n )\n ), array(\n 'fk_userdefn_userresetsalt' => array(\n 'indextype' => 'fk',\n 'columns' => array(\n 'user_id'\n ),\n 'referencetable' => $this->\n GetPrefix() . 'userdefn',\n 'referencecolumns' => array(\n 'user_id'\n )\n )\n ))->\n Query();\n\n $user = new \\FluitoPHP\\Authentication\\User('');\n\n $user->\n SetUserData(array(\n 'user_login' => 'administrator',\n 'email' => '[email protected]',\n 'first_name' => 'System',\n 'last_name' => 'Administrator'\n ), true);\n\n $user->\n UpdatePassword('administrator@password');\n\n \\FluitoPHP\\Events\\Events::GetInstance()->\n Run('FluitoPHP.Authentication.FirstRun', $this->\n config);\n }\n\n \\FluitoPHP\\Events\\Events::GetInstance()->\n Run('FluitoPHP.Authentication.Upgrade', $this->\n config);\n }", "public function isInstantiable() {\n\t\treturn !is_null($this->domain->class);\n\t}", "public static function canConvert()\n\t{\n\t\t/* Child classes must override this method */\n\t\tthrow new \\BadMethodCallException( 'nothing_to_convert' );\n\t}", "public function is_class_reference() {\n\t\treturn ! empty( $this->get_class() );\n\t}", "private function isExistingDriver($class) {\n if(class_exists(\"phpfastcache_\".$class)) {\n return true;\n }\n return false;\n }", "protected function getMigrationClasses()\n {\n $files = glob(sprintf('%s/Migration/Attribute/*Migration.php', $this->getPath()));\n\n $migrationClasses = [];\n foreach ($files as $file) {\n $class = $this->getName() . '\\Migration\\Attribute\\\\' . basename($file, '.php');\n if (class_exists($class)) {\n $migration = new $class;\n if ($migration instanceof AbstractAttributeMigration) {\n $migrationClasses[] = $migration;\n }\n }\n }\n\n return $migrationClasses;\n }", "public function migrate()\n\t{\n\t\treturn $this->getAdapter()->migrate($this->getTable(), $this->fields);\n\t}", "public function isValid()\r\n {\r\n if (!retGet('class'))\r\n return false;\r\n\r\n if (!in_array(retGet('class'), $this->_available))\r\n return false;\r\n\r\n return true;\r\n }", "public function generateSourceEntityClass(): bool\n {\n $folder = $this->getGeneratedEntitiesFolder();\n $repositoryFolder = $this->getGeneratedRepositoriesFolder();\n $file = $this->getSourceClassPath();\n $repositoryFile = $this->getRepositoryClassPath();\n $fileSystem = new Filesystem();\n\n if (!$fileSystem->exists($folder)) {\n $fileSystem->mkdir($folder, 0775);\n }\n if (!$fileSystem->exists($repositoryFolder)) {\n $fileSystem->mkdir($repositoryFolder, 0775);\n }\n\n if (!$fileSystem->exists($file)) {\n $classGenerator = $this->entityGeneratorFactory->createWithCustomRepository($this->nodeType);\n $repositoryGenerator = $this->entityGeneratorFactory->createCustomRepository($this->nodeType);\n $content = $classGenerator->getClassContent();\n $repositoryContent = $repositoryGenerator->getClassContent();\n\n if (false === @file_put_contents($file, $content)) {\n throw new IOException(\"Impossible to write entity class file (\" . $file . \").\", 1);\n }\n if (false === @file_put_contents($repositoryFile, $repositoryContent)) {\n throw new IOException(\"Impossible to write entity class file (\" . $repositoryFile . \").\", 1);\n }\n /*\n * Force Zend OPcache to reset file\n */\n if (function_exists('opcache_invalidate')) {\n opcache_invalidate($file, true);\n opcache_invalidate($repositoryFile, true);\n }\n if (function_exists('apcu_clear_cache')) {\n apcu_clear_cache();\n }\n\n \\clearstatcache(true, $file);\n \\clearstatcache(true, $repositoryFile);\n\n return true;\n }\n return false;\n }", "protected function checkStorageClass($class) {\n // Nothing to check by default.\n }", "static public function registerMigration($class_name, $machine_name = NULL, array $arguments = array()) {\n if (!$machine_name) {\n $machine_name = self::machineFromClass($class_name);\n }\n\n // See if this migration is already registered\n $migration_row = db_select('migrate_status', 'ms')\n ->fields('ms', array('class_name', 'arguments'))\n ->condition('machine_name', $machine_name)\n ->execute()\n ->fetchObject();\n if (!$migration_row) {\n db_insert('migrate_status')\n ->fields(array(\n 'machine_name' => $machine_name,\n 'class_name' => $class_name,\n 'arguments' => serialize($arguments),\n ))\n ->execute();\n }\n else {\n // TODO: What, if anything, should we do if the pre-existing class_name or\n // arguments don't match?\n }\n }", "public function valid()\n {\n\n if ($this->container['class_name'] === null) {\n return false;\n }\n return true;\n }", "public function supports(string $entityClass): bool;", "public function supportsClass($class)\n {\n return in_array($class, [\n User::class,\n ], true);\n }", "public function isManaged($className)\n {\n return (new \\ReflectionClass($className))->implementsInterface(VersionableInterface::class);\n }", "abstract public function getAdminTableClass();", "public function ensureDbModuleCompat() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('ensureDbModuleCompat', func_get_args()));\n }", "function _wprp_supports_theme_upgrade() {\n\n\tinclude_once ( ABSPATH . 'wp-admin/includes/admin.php' );\n\n\treturn class_exists( 'Theme_Upgrader' );\n\n}", "public function hasColumnType($name);" ]
[ "0.7242361", "0.6956828", "0.63505924", "0.62451595", "0.6155832", "0.61186486", "0.6065068", "0.5946564", "0.5824946", "0.58059615", "0.5773013", "0.5746837", "0.5671892", "0.5671892", "0.5655574", "0.56539196", "0.5651173", "0.56383413", "0.56216514", "0.56096774", "0.55852425", "0.55688983", "0.5564511", "0.5561034", "0.55569863", "0.55430126", "0.55232227", "0.5522414", "0.55182475", "0.5507351", "0.54952985", "0.5492355", "0.5479966", "0.54712355", "0.5470937", "0.54681337", "0.54638124", "0.54428136", "0.54394853", "0.5419172", "0.54155016", "0.5360506", "0.5359205", "0.5357892", "0.5349645", "0.5304273", "0.52970374", "0.5276745", "0.5276731", "0.52686894", "0.5267784", "0.5265478", "0.52646184", "0.52376366", "0.5222277", "0.5192249", "0.51816726", "0.51794565", "0.5178929", "0.5177451", "0.51725036", "0.5172025", "0.51705027", "0.5168355", "0.516823", "0.5165828", "0.5163032", "0.51626295", "0.5150566", "0.5149321", "0.5128333", "0.51246464", "0.5122246", "0.51103264", "0.5108132", "0.5106297", "0.5105295", "0.5087302", "0.50832707", "0.50806403", "0.50780356", "0.5077217", "0.5073532", "0.5071351", "0.506108", "0.50509167", "0.5049957", "0.5046219", "0.5040192", "0.50400996", "0.50365764", "0.5030546", "0.5026445", "0.50238323", "0.5023144", "0.5016965", "0.50067425", "0.5005683", "0.50006914", "0.4997647" ]
0.59977496
7
Static function that can initialize the class and return an instance of itself.
public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function init()\n {\n return new self();\n }", "public static function initialization()\n {\n return new static();\n }", "public static function init()\n {\n return new static;\n }", "public static function initialize()\n {\n if (self::$instance == null)\n {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function init() {\n\t\treturn self::$instance = new self();\n\t}", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "public static function init() {\n\t\tstatic $instance = null;\n\n\t\tif ( is_null( $instance ) ) {\n\t\t\t$instance = new self();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function init() \n {\n if (!isset(self::$o_instance)) \n\t\t{\n $c = __CLASS__;\n self::$o_instance = new $c;\n }\n\n return self::$o_instance;\n }", "public static function init() {\n $class = __CLASS__;\n new $class;\n }", "public static function make() {\n return new self();\n }", "public static function init() : self\n {\n if (is_null(self::$instance)) {\n self::$instance = new self();\n }\n\n self::$instance->applyArguments(func_get_args());\n\n return self::$instance;\n }", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\t}", "public static function init() {\n static $instance = false;\n if ( ! $instance ) {\n $instance = new self();\n }\n return $instance;\n }", "public static function make () {\n return new static;\n }", "public static function make()\n {\n return new static();\n }", "public static function inst()\n {\n return new static();\n }", "public static function getInstance(): self;", "public static function make()\n\t{\n\t\treturn new static;\n\t}", "public static function make()\n {\n return new static;\n }", "public static function make()\n {\n return new static;\n }", "public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\n\t}", "public static function init() {\n static $instance = false;\n\n if ( ! $instance ) {\n $instance = new self();\n }\n\n return $instance;\n }", "public static function init() {\n static $instance = false;\n\n if ( ! $instance ) {\n $instance = new self();\n }\n\n return $instance;\n }", "public static function init() {\n return isset(static::$instance) ? static::$instance : (static::$instance = new static);\n }", "public static function factory()\n {\n return new self;\n }", "public static function init() {\n\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\n\t}", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function init()\n {\n if (self::$instance == null) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "public static function instance() {\n\t\treturn new self;\n\t}", "public static function factory() {\n\t\tstatic $instance = false;\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\t\treturn $instance;\n\t}", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static();\n }", "public static function instance()\n {\n return new static;\n }", "public static function instance()\n {\n return new static;\n }", "public static function init() {\n\n\t\t\tif(self::$single) return self::$single;\n\t\t\telse return self::$single = new static;\n\n\t\t}", "public static function instance() {\n return new static();\n }", "public static function create(): self\n {\n return new static();\n }", "public static function factory() {\n\t\tstatic $instance = false;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }", "public static function inst()\n {\n return static::get_one(__CLASS__);\n }", "public static function getInstance()\n {\n return new self();\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(__CLASS__);\n }", "public static function getInstance() {\n return new self();\n }", "public static function create(): self\n {\n return new static;\n }", "public function newInstance()\n {\n return new self();\n }", "public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}", "public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}", "public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}", "public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}", "public static function instance();", "static public function getInstance() {\n return new static();\n }", "public static function createInstance()\n {\n return new self();\n }", "public static function make()\n {\n return new static(App::getInstance());\n }", "public static function create(): self\n {\n return new self();\n }", "public static function create(): self\n {\n return new self();\n }", "public static function i()\n\t{\n\t\treturn new self;\n\t}", "public static function instance() {\n\t\tif (!Registry::exists($class=get_called_class())) {\n\t\t\t$ref=new \\Reflectionclass($class);\n\t\t\t$args=func_get_args();\n\t\t\tRegistry::set($class,\n\t\t\t\t$args?$ref->newinstanceargs($args):new $class);\n\t\t}\n\t\treturn Registry::get($class);\n\t}", "static function get_instance() {\n\t\tstatic $instance;\n\t\t$class = __CLASS__;\n\t\tif ( ! is_a( $instance, $class ) ) {\n\t\t\t$instance = new $class;\n\t\t}\n\t\treturn $instance;\n\t}", "public static function newInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function instance()\n {\n if (is_null(self::$_instance)) {\n self::$_instance = new static(...func_get_args());\n }\n\n return self::$_instance;\n }", "public static function get_instance() {\n static $instance = null;\n if ( null === $instance ) {\n $instance = new static();\n $instance->setup();\n }\n return $instance;\n }", "public static function new()\n {\n return new static();\n }", "static function factory()\n {\n if (self::$_instance == NULL) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }", "static public function create()\n {\n return new static();\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}", "static public function create()\n\t{\n\t\treturn new static;\n\t}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function init() {\n\n\t\t$class = new self();\n\t\t$class->setup();\n\n\t}", "protected function _init()\n {\n return $this;\n }", "public static abstract function createInstance();", "public static function getInstance() {\n\n static $instance;\n //If the class was already instantiated, just return it\n if (isset($instance))\n return $instance;\n\n $instance = new self;\n\n return $instance;\n }", "public static function getInstance()\n {\n return new static;\n }", "abstract public function instance();", "public static function makeInstance(): self\n {\n if ($traits = TraitCollectorService::collect(static::class)) {\n TraitCollectorService::createClass(\n __NAMESPACE__,\n (new \\ReflectionClass(static::class))->getShortName() . 'TraitCollector',\n static::class,\n $traits\n );\n\n return GeneralUtility::makeInstance(static::class . 'TraitCollector');\n }\n\n // Return default demand object\n return GeneralUtility::makeInstance(static::class);\n }", "public static function setInstance() {\n \n // Try to set an instance\n try {\n // Set instance to new self\n self::$oInstance = new self();\n // Catch any exceptions\n } catch (Exception $oException) {\n // Set error string\n die(\"Error: {$oException->getMessage()}\");\n }\n // Return instance of class\n return self::$oInstance;\n }", "static public function get_instance() {\n\t\tif(!isset(self::$self)) {\n\t\t\tself::$self = new self();\n\t\t}\n\t\treturn self::$self;\n\t}", "public static function new(){\n self::$instance = new self();\n return self::$instance;\n }", "public static function instance(): self\n {\n return static::$instance ??= new static();\n }", "static function create(): self;", "public function instance();", "public static function instance(): self\n {\n return self::$instance ??= new self();\n }", "function &getInstance () {\n\t\tstatic $instance;\n\t\tif (!isset($instance)) {\n\t\t\t$c = __CLASS__;\n\t\t\t$instance = new $c();\n\t\t}\n\t\treturn $instance;\n\t}", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }", "public static function create()\n {\n return new self();\n }" ]
[ "0.8074297", "0.79237956", "0.77660024", "0.7716984", "0.7648251", "0.7639098", "0.75294805", "0.7483072", "0.7480698", "0.7468149", "0.7454364", "0.7246246", "0.7241745", "0.7237624", "0.7212285", "0.72115123", "0.7200524", "0.71830213", "0.71800464", "0.71800464", "0.7179135", "0.7179118", "0.7174944", "0.7174944", "0.71586716", "0.7152645", "0.71443933", "0.71277237", "0.71277237", "0.71186185", "0.7092342", "0.70717216", "0.70440954", "0.70440954", "0.7024993", "0.7024993", "0.70162576", "0.69969237", "0.6973738", "0.6948554", "0.6933963", "0.69280356", "0.6922198", "0.6917159", "0.6914281", "0.69115484", "0.6905125", "0.6903608", "0.6903608", "0.6903608", "0.6903608", "0.6897923", "0.68905526", "0.6888922", "0.6878071", "0.68729883", "0.68729883", "0.68556774", "0.6848638", "0.68385535", "0.6825917", "0.68058985", "0.67992175", "0.6798586", "0.67821884", "0.6776951", "0.6774699", "0.6764449", "0.67566174", "0.6748664", "0.6748664", "0.6748664", "0.67479", "0.67479", "0.67479", "0.67479", "0.67476946", "0.67476946", "0.67476946", "0.6739108", "0.6729837", "0.67286754", "0.671797", "0.6711337", "0.6695836", "0.66956055", "0.6691017", "0.6690125", "0.668746", "0.6680449", "0.66770583", "0.6674089", "0.6664831", "0.66536504", "0.6646566", "0.6646566", "0.6646566", "0.6646566", "0.6646566", "0.6646566", "0.6646566" ]
0.0
-1
Hook into WordPress and other plugins as needed.
private function hooks() { add_filter( 'wpcd_settings_tabs', array( &$this, 'settings_tabs' ) ); // add a new tab to the settings page. add_filter( 'wpcd_settings_metaboxes', array( &$this, 'settings_metaboxes' ) ); // add new metaboxes to our new tab on the settings pages. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "function WordpressConnect(){\n\n\t\t$this->add_init_hook();\n\n\t}", "function add_wp_hooks(){\n\n\t\t$comments = new WordpressConnectComments();\n\t\t$like = new WordpressConnectLikeButton();\n\n\t}", "private function hooks() {\n\n\t\t$plugin_admin = shortbuild_bu_hooks();\n add_filter( 'advanced_import_demo_lists', array( $plugin_admin, 'add_demo_lists' ), 10, 1 );\n add_filter( 'admin_menu', array( $plugin_admin, 'import_menu' ), 10, 1 );\n add_filter( 'wp_ajax_shortbuild_bu_getting_started', array( $plugin_admin, 'install_advanced_import' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_scripts' ), 10, 1 );\n\n /*Replace terms and post ids*/\n add_action( 'advanced_import_replace_term_ids', array( $plugin_admin, 'replace_term_ids' ), 20 );\n }", "public function hook() {\n\t\t// the WPML API is not included by default\n\t\trequire_once ICL_PLUGIN_PATH . '/inc/wpml-api.php';\n\n\t\t$this->hook_actions();\n\t\t$this->hook_filters();\n\t}", "public function add_hook () {\n\n\t\tadd_action( 'plugins_loaded', array(&$this,'check_version') );\n\t\tadd_action( 'wp_loaded', array(&$this,'add_archive_rewrite_rules'), 99 );\n\t\tadd_action( 'wp_loaded', array(&$this,'add_tax_rewrite_rules') );\n\t\tadd_action( 'wp_loaded', array(&$this, \"dequeue_flush_rules\"),100);\n\t\tadd_action( 'parse_request', array(&$this, \"parse_request\") );\n\t\tadd_action( 'registered_post_type', array(&$this,'registered_post_type'), 10, 2 );\n\n\n\t\tif(get_option( \"permalink_structure\") != \"\") {\n\t\t\tadd_filter( 'post_type_link', array(&$this,'post_type_link'), 10, 4 );\n\t\t\tadd_filter( 'getarchives_join', array(&$this,'getarchives_join'), 10, 2 ); // [steve]\n\t\t\tadd_filter( 'getarchives_where', array(&$this,'getarchives_where'), 10 , 2 );\n\t\t\tadd_filter( 'get_archives_link', array(&$this,'get_archives_link'), 20, 1 );\n\t\t\tadd_filter( 'term_link', array(&$this,'term_link'), 10, 3 );\n\t\t\tadd_filter( 'attachment_link', array(&$this, 'attachment_link'), 20 , 2);\n\t\t}\n\n\n\t\tadd_action( 'init', array(&$this,'load_textdomain') );\n\t\tadd_action( 'init', array(&$this, 'update_rules') );\n\t\tadd_action( 'update_option_cptp_version', array(&$this, 'update_rules') );\n\t\tadd_action( 'admin_init', array(&$this,'settings_api_init'), 30 );\n\t\tadd_action( 'admin_enqueue_scripts', array(&$this,'enqueue_css_js') );\n\t\tadd_action( 'admin_footer', array(&$this,'pointer_js') );\n\n\n\t}", "public function set_hooks() {\n\t\tadd_action( 'wp_head', array( $this, 'do_meta_tags' ), 0 );\n\t\t\tadd_filter( 'document_title_parts', array( $this, 'filter__the_title_parts' ), 1, 4 );\n\t}", "public function wp_init() {\n\t\n\t\t// (re)load our settings\n\t\t$this->load_settings();\n\n\t\tload_plugin_textdomain('wp-united', false, 'wp-united/languages/');\n\t\t\n\t\trequire_once($this->get_plugin_path() . 'template-tags.php');\n\t\t\n\t\t// some login integration routines may be needed even when user integration is disabled.\t\n\t\trequire_once($this->get_plugin_path() . 'user-integrator.php'); \n\t\t\n\t\tif($this->get_setting('xposting')) {\t\t\n\t\t\trequire_once($this->get_plugin_path() . 'cross-posting.php');\n\t\t\t$this->xPoster = new WPU_Plugin_XPosting($this->settings);\n\t\t}\n\n\n\t\t// add new actions and filters\n\t\t$this->add_actions();\n\t\t$this->add_filters();\n\t\tunset($this->actions, $this->filters);\n\n\t}", "function add_init_hook(){\n\n\t\t// Hooks need to be always added so that the plugins in the content\n\t\t// can be rendered\n\t\tadd_action( 'init', array( &$this, 'add_wp_hooks' ) );\n\n\t\t$this->add_admin_panel();\n\t\t$this->add_custom_fields();\n\t\t\t\t\t\n\t\t$this->register_shortcodes();\n\n\t\tadd_action( 'wp_head', array( &$this, 'add_og_meta' ) );\n\t\tadd_action( 'wp_footer', array( &$this, 'add_fb_js' ) );\n\n\t\tadd_action( 'switch_theme', array( &$this, 'switch_theme_handler' ) );\n\n\t\tadd_action( 'widgets_init', array( &$this, 'load_widget' ) );\n\t}", "function wp_hooks() \n {\n // Wordpress actions & filters \n add_action( 'admin_menu', array(&$this,'admin_menu_link') );\n add_action( 'admin_head', array(&$this, 'remove_mediabuttons') );\n add_action( 'init', array(&$this, 'add_custom_post_type') );\n add_action( 'admin_init', array(&$this, 'add_metaboxes') );\n add_action( 'save_post', array(&$this, 'save_source_metabox'), 10, 2 );\n add_action( 'manage_posts_custom_column', array(&$this, 'add_custom_columns') ); // sets the row value\n \n $filter = 'manage_edit-' . $this->custom_post_type_name . '_columns';\n add_filter( $filter, array(&$this, 'add_header_columns') );\n add_filter( 'body_class', array(&$this, 'body_classes') );\n add_action('wp_print_styles', array(&$this, 'add_css') );\n\n add_filter( 'enter_title_here', array(&$this, 'change_title_text'), 10, 1 );\n add_filter( 'post_row_actions', array(&$this, 'remove_row_actions'), 10, 1 );\n add_filter( 'post_updated_messages', array(&$this, 'bbquotations_updated_messages') );\n\n add_action( 'admin_print_footer_scripts', array(&$this, 'remove_preview_button') );\n\n // add shortcode\n add_shortcode( 'bbquote', array(&$this, 'shortcode') );\n }", "private function admin_hooks() {\n\t\t\n\t\t// Actions\n\t\t// Load Nav injection\n\t\t$this->add_action ('admin_menu', $this->nav, 'plugin_menu' );\n\t\t\n\t\t// Load Dashboard widget\n\t\t$this->add_action ('wp_dashboard_setup', $this->admin, 'dashboard');\n\t\t\n\t\t// Load Edit Post additions\n\t\t// $this->add_action ('add_meta_boxes', $this->admin, 'post_edit' );\n\n\t\t// Load social toggles on submitbox, if the setting is available\n\t\t// if (get_option('smmp_view_submitbox'))\n\t\t//\t$this->add_action ('post_submitbox_misc_actions', $this->admin, 'admin_post_submitbox' );\n\t\t\n\t\t// On post update/save\n\t\t// $this->add_action ('save_post', $this->admin, 'admin_post_submitbox_submit');\n\t\t\n\t\t\n\t\t// Load Expired Account notice\n\t\t/*try {$this->admin->validate_accounts (); }\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->add_action ('admin_notices', $this->admin, 'notice_accounts' );\n\t\t}*/\n\t\t\n\t\t// Filters\n\t\t// Prevent inner links for flow-drive images\n\t\t$this->add_action ('image_downsize', $this->admin, 'filter_image_downsize', 10, 3);\n\t}", "static public function init() {\n\n\t\tadd_action( 'plugins_loaded', __CLASS__ . '::setup_hooks' );\n\t}", "public static function init()\n {\n add_action('plugins_loaded', array(self::instance(), '_setup'));\n }", "public function setup() {\n\t\tadd_action( 'plugins_loaded', array( $this, 'manually_load_api' ), 100 );\n\t\tadd_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );\n\t\tadd_filter( 'plugin_row_meta', array( $this, 'filter_plugin_row_meta' ), 10, 4 );\n\t\tadd_action( 'admin_notices', array( $this, 'permalink_warning' ) );\n\t\tadd_action( 'admin_init', array( $this, 'flush_rewrites' ), 10000 );\n\t}", "public function installHooks()\n {\n if (\\current_user_can('edit_posts') || $this->isWpCLI()) {\n \\add_action('future_to_publish', [$this, 'handleFutureToPublish']);\n\n foreach ($this->getConfig()->allowedPostTypes() as $postType) {\n \\add_action(\"rest_after_insert_{$postType}\", [$this, 'handleRestUpdatePost']);\n }\n\n \\add_action('save_post', [$this, 'handleSavePost'], 99, 1);\n\n \\add_action('transition_post_status', [$this, 'handleTransitionPostStatus'], 99, 3);\n \\add_action('trashed_post', [$this, 'handleTrashedPost']);\n\n\n \\add_action('swiftype_batch_post_index', [$this, 'handlePostBatchIndex']);\n \\add_action('swiftype_batch_post_delete', [$this, 'handlePostBatchDelete']);\n }\n }", "public function set_hooks()\n\t{\n\t\tadd_action('init', 'register_shortcodes');\n\t}", "private function init_hooks() {\n\n register_activation_hook( __FILE__, array( 'IWJ_Install', 'install' ) );\n register_deactivation_hook( __FILE__, array('IWJ_Install', 'deactive') );\n\n add_action('plugins_loaded', array('IWJ_Install', 'update'));\n add_action('wp_loaded', array('IWJ_Install', 'update2'));\n\n add_action( 'wpmu_new_blog', array( 'IWJ_Install', 'new_blog' ), 10, 6 );\n add_action( 'delete_blog', array( 'IWJ_Install', 'delete_blog' ), 10, 2 );\n\n add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );\n add_action( 'init', array( $this, 'init' ), 0 );\n\n add_action('wp_logout', array($this, 'end_session'));\n add_action('wp_login', array($this, 'end_session'));\n\n //add_action('activated_plugin',array($this, 'active_plugin_error'));\n }", "public function hook() {\n add_filter('pre_get_document_title', [$this, 'getTitle'], 10);\n add_filter('wp_head', [$this, 'outputMetaDescription'], 1);\n add_filter('wp_head', [$this, 'ogTags'], 2 );\n }", "private static function init_hooks() {\n\t\tself::$initiated = true;\n\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'theme_styles' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array('mptheme_functions', 'mptheme_enqueue') );\n\n\t\t// If a Google Analytics ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_google_analytics_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_google_analytics_code' ) );\n\t\t}\n\n\t\t// If a Facebook Pixel ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_facebook_pixel_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_facebook_pixel_code' ) );\n\t\t}\n\n\t}", "public function hook() {\n\t\tadd_action( 'admin_print_scripts', [ $this, 'admin_scripts' ] );\n\t\t// Elementor support.\n\t\tadd_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t// UGH! Beaver Builder hack.\n\t\tif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore\n\t\t\tadd_action( 'wp_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t}\n\n\t\tadd_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/navigation-menu/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t}", "private function setup_bootstrap_hooks() {\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'wp_die_handler',\n\t\t\tstatic function () {\n\t\t\t\treturn '\\WP_CLI\\Utils\\wp_die_handler';\n\t\t\t}\n\t\t);\n\n\t\t// Prevent code from performing a redirect\n\t\tWP_CLI::add_wp_hook( 'wp_redirect', 'WP_CLI\\\\Utils\\\\wp_redirect_handler' );\n\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'nocache_headers',\n\t\t\tstatic function ( $headers ) {\n\t\t\t\t// WordPress might be calling nocache_headers() because of a dead db\n\t\t\t\tglobal $wpdb;\n\t\t\t\tif ( ! empty( $wpdb->error ) ) {\n\t\t\t\t\tUtils\\wp_die_handler( $wpdb->error );\n\t\t\t\t}\n\t\t\t\t// Otherwise, WP might be calling nocache_headers() because WP isn't installed\n\t\t\t\tUtils\\wp_not_installed();\n\t\t\t\treturn $headers;\n\t\t\t}\n\t\t);\n\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'setup_theme',\n\t\t\tstatic function () {\n\t\t\t\t// Polyfill is_customize_preview(), as it is needed by TwentyTwenty to\n\t\t\t\t// check for starter content.\n\t\t\t\tif ( ! function_exists( 'is_customize_preview' ) ) {\n\t\t\t\t\tfunction is_customize_preview() {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t0\n\t\t);\n\n\t\t// ALTERNATE_WP_CRON might trigger a redirect, which we can't handle\n\t\tif ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {\n\t\t\tWP_CLI::add_wp_hook(\n\t\t\t\t'muplugins_loaded',\n\t\t\t\tstatic function () {\n\t\t\t\t\tremove_action( 'init', 'wp_cron' );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Always permit operations against sites, regardless of status\n\t\tWP_CLI::add_wp_hook( 'ms_site_check', '__return_true' );\n\n\t\t// Always permit operations against WordPress, regardless of maintenance mode\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'enable_maintenance_mode',\n\t\t\tstatic function () {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\n\t\t// Use our own debug mode handling instead of WP core\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'enable_wp_debug_mode_checks',\n\t\t\tstatic function ( $ret ) {\n\t\t\t\tUtils\\wp_debug_mode();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\n\t\t// Never load advanced-cache.php drop-in when WP-CLI is operating\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'enable_loading_advanced_cache_dropin',\n\t\t\tstatic function () {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\n\t\t// The APC cache is not available on the command-line, so bail, to prevent cache poisoning\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'muplugins_loaded',\n\t\t\tstatic function () {\n\t\t\t\tif ( $GLOBALS['_wp_using_ext_object_cache'] && class_exists( 'APC_Object_Cache' ) ) {\n\t\t\t\t\tWP_CLI::warning( 'Running WP-CLI while the APC object cache is activated can result in cache corruption.' );\n\t\t\t\t\tWP_CLI::confirm( 'Given the consequences, do you wish to continue?' );\n\t\t\t\t}\n\t\t\t},\n\t\t\t0\n\t\t);\n\n\t\t// Handle --user parameter\n\t\tif ( ! defined( 'WP_INSTALLING' ) ) {\n\t\t\t$config = \\WP_CLI::get_config();\n\t\t\tWP_CLI::add_wp_hook(\n\t\t\t\t'init',\n\t\t\t\tstatic function () use ( $config ) {\n\t\t\t\t\tif ( isset( $config['user'] ) ) {\n\t\t\t\t\t\t$fetcher = new \\WP_CLI\\Fetchers\\User();\n\t\t\t\t\t\t$user = $fetcher->get_check( $config['user'] );\n\t\t\t\t\t\twp_set_current_user( $user->ID );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tadd_action( 'init', 'kses_remove_filters', 11 );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t0\n\t\t\t);\n\t\t}\n\n\t\t// Avoid uncaught exception when using wp_mail() without defined $_SERVER['SERVER_NAME']\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'wp_mail_from',\n\t\t\tstatic function ( $from_email ) {\n\t\t\t\tif ( 'wordpress@' === $from_email ) {\n\t\t\t\t\t$sitename = strtolower( Utils\\parse_url( site_url(), PHP_URL_HOST ) );\n\t\t\t\t\tif ( substr( $sitename, 0, 4 ) === 'www.' ) {\n\t\t\t\t\t\t$sitename = substr( $sitename, 4 );\n\t\t\t\t\t}\n\t\t\t\t\t$from_email = 'wordpress@' . $sitename;\n\t\t\t\t}\n\t\t\t\treturn $from_email;\n\t\t\t}\n\t\t);\n\n\t\t// Don't apply set_url_scheme in get_site_url()\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'site_url',\n\t\t\tstatic function ( $url, $path, $scheme, $blog_id ) {\n\t\t\t\tif ( empty( $blog_id ) || ! is_multisite() ) {\n\t\t\t\t\t$url = get_option( 'siteurl' );\n\t\t\t\t} else {\n\t\t\t\t\tswitch_to_blog( $blog_id );\n\t\t\t\t\t$url = get_option( 'siteurl' );\n\t\t\t\t\trestore_current_blog();\n\t\t\t\t}\n\t\t\t\tif ( $path && is_string( $path ) ) {\n\t\t\t\t\t$url .= '/' . ltrim( $path, '/' );\n\t\t\t\t}\n\t\t\t\treturn $url;\n\t\t\t},\n\t\t\t0,\n\t\t\t4\n\t\t);\n\n\t\t// Set up hook for plugins and themes to conditionally add WP-CLI commands.\n\t\tWP_CLI::add_wp_hook(\n\t\t\t'init',\n\t\t\tstatic function () {\n\t\t\t\tdo_action( 'cli_init' );\n\t\t\t}\n\t\t);\n\t}", "public static function wpInit() {}", "public function registerHooks()\n {\n add_action('wp_enqueue_scripts', [$this, 'load_scripts_n_styles']);\n add_action('after_setup_theme', [$this, 'add_theme_support']);\n add_action('widgets_init', [$this, 'tf_widgets_init']);\n add_action('after_setup_theme', [$this, 'register_menus']);\n\n if( function_exists('acf_add_options_page') ) {\n acf_add_options_page();\n }\n }", "private function add_hooks(){\n\t\n\t\tadd_action( 'plugin_action_links_' . UCLACOMPONENTSWP_PLUGIN_BASE, array( $this, 'add_plugin_action_link' ), 20 );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend_scripts_and_styles' ), 20 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts_and_styles' ), 20 );\n\t\n\t}", "static function boot()\n\t{\n\t\tglobal $wpdb;\n\n\t\t// Static Variables\n\t\tself::$path = plugins_url( '/', self::$plugin );\n\t\tself::$tableFieldMapping = $wpdb->prefix . 'jumplead_mapping';\n\n\t\t// Install\n\t\tregister_activation_hook( self::$plugin, 'Jumplead::handle_activate' );\n\t\tregister_deactivation_hook( self::$plugin, 'Jumplead::handle_deactivate' );\n\t\tregister_uninstall_hook( self::$plugin, 'Jumplead::handle_uninstall' );\n\n\t\t// Admin\n\t\tadd_action( 'admin_menu', 'Jumplead::admin_menu' );\n\n\t\t// Styles\n\t\tadd_action( 'admin_enqueue_scripts', 'Jumplead::styles' );\n\n\t\t// Filters\n\t\tadd_action( 'load-jumplead_page_jumplead_integrations', 'Jumplead::filter_has_tracker_id' );\n\t}", "static function hooks() {\n\t\tadd_action( 'after_setup_theme', __CLASS__ . '::custom_header' );\n\n\t\t// Setup the Theme Customizer settings and controls...\n\t\tadd_action( 'customize_register', __CLASS__ . '::register' );\n\n\t\t// Output custom CSS to live site\n\t\tadd_action( 'wp_head', __CLASS__ . '::header_output' );\n\t}", "public function init()\n {\n add_action('after_setup_theme', [$this, 'themeSetup']);\n }", "private function setup_hooks() {\n\t\tadd_action( 'bp_register_admin_settings', array( $this, 'register_settings' ) );\n\t}", "public function private_theme_functions()\n {\n // Adds plus button\n add_action('in_admin_header', [ & $this, 'addParallaxBlock'], -200);\n\n // Replace the common scripts\n add_action('wp_default_scripts', [$this, 'changeCommonScript'], 11);\n }", "private function define_admin_hooks() {\n\t\t$plugin_admin = new Soisy_Pagamento_Rateale_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n $this->loader->add_filter( 'woocommerce_payment_gateways', $plugin_admin, 'payment_methods' );\n\t\t\n $this->loader->add_filter( 'soisy_settings', $plugin_admin, 'soisy_vars' );\n\t\t\n\t\t$this->loader->add_filter('plugin_action_links', $plugin_admin,'add_soisy_action_links', 10, 2);\n\t\t\n\t\t/*\n\t\t * Payments Gateways extend WC_Payment_Gateway\n\t\t * To have them work properly they must be hooked to 'plugins_loaded'\n\t\t */\n add_action( 'plugins_loaded', 'init_Soisy_Pagamento_Rateale_Gateway_Settings');\n\t}", "private function hooks() {\n\n\t\t\t/** Actions *******************************************************************/\n\n\t\t\t// Build the submenus.\n\t\t\tadd_action( 'admin_menu', array( $this, 'admin_menus' ), 10 );\n\n\t\t\t// Loading the talks edit screen\n\t\t\tadd_action( 'load-edit.php', array( $this, 'load_edit_talk' ) );\n\n\t\t\t// Make sure Editing a plugin's taxonomy highlights the plugin's nav\n\t\t\tadd_action( 'load-edit-tags.php', array( $this, 'taxonomy_highlight' ) );\n\n\t\t\t// Add metaboxes for the post type\n\t\t\tadd_action( \"add_meta_boxes_{$this->post_type}\", array( $this, 'add_metaboxes' ), 10, 1 );\n\t\t\t// Save metabox inputs\n\t\t\tadd_action( \"save_post_{$this->post_type}\", array( $this, 'save_metaboxes' ), 10, 3 );\n\n\t\t\t// Display upgrade notices\n\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices' ) );\n\n\t\t\t// Register the settings\n\t\t\tadd_action( 'admin_init', array( $this, 'register_admin_settings' ) );\n\n\t\t\tadd_action( 'load-settings_page_wc_talks', array( $this, 'settings_load' ) );\n\n\t\t\t// Talks columns (in post row)\n\t\t\tadd_action( \"manage_{$this->post_type}_posts_custom_column\", array( $this, 'column_data' ), 10, 2 );\n\n\t\t\t// Maybe neutralize quick edit\n\t\t\tadd_action( 'post_row_actions', array( $this, 'talk_row_actions' ), 10, 2 );\n\n\t\t\t// Do some global stuff here (custom css rule)\n\t\t\tadd_action( 'admin_head', array( $this, 'admin_head' ), 10 );\n\n\t\t\t/** Filters *******************************************************************/\n\n\t\t\t// Updated message\n\t\t\tadd_filter( 'post_updated_messages', array( $this, 'talks_updated_messages' ), 10, 1 );\n\t\t\tadd_filter( 'bulk_post_updated_messages', array( $this, 'talks_updated_bulk_messages' ), 10, 2 );\n\n\t\t\t// Redirect\n\t\t\tadd_filter( 'redirect_post_location', array( $this, 'redirect_talk_location' ), 10, 2 );\n\n\t\t\t// Filter the WP_List_Table views to include custom views.\n\t\t\tadd_filter( \"views_edit-{$this->post_type}\", array( $this, 'talk_views' ), 10, 1 );\n\n\t\t\t// temporarly remove bulk edit\n\t\t\tadd_filter( \"bulk_actions-edit-{$this->post_type}\", array( $this, 'talk_bulk_actions' ), 10, 1 );\n\n\t\t\t// Talks column headers.\n\t\t\tadd_filter( \"manage_{$this->post_type}_posts_columns\", array( $this, 'column_headers' ) );\n\n\t\t\t// Add a link to About & settings page in plugins list\n\t\t\tadd_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );\n\n\t\t\t/** Specific case: ratings ****************************************************/\n\n\t\t\t// Only sort by rates & display people who voted if ratings is not disabled.\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\tadd_action( \"manage_edit-{$this->post_type}_sortable_columns\", array( $this, 'sortable_columns' ), 10, 1 );\n\n\t\t\t\t// Manage votes\n\t\t\t\tadd_filter( 'wct_admin_get_meta_boxes', array( $this, 'ratings_metabox' ), 9, 1 );\n\t\t\t\tadd_action( 'load-post.php', array( $this, 'maybe_delete_rate' ) );\n\n\t\t\t\t// Custom feedback\n\t\t\t\tadd_filter( 'wct_admin_updated_messages', array( $this, 'ratings_updated' ), 10, 1 );\n\n\t\t\t\t// Help tabs\n\t\t\t\tadd_filter( 'wct_get_help_tabs', array( $this, 'rates_help_tabs' ), 11, 1 );\n\t\t\t}\n\t\t}", "private function init_hooks() {\n\t\tadd_action( 'plugins_loaded', array( $this, 'localization' ) );\n\t\tadd_action( 'plugins_loaded', array( $this, 'includes' ) );\n\t\tadd_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );\n\t\t\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'load_custom_scripts'));\n\n\t}", "public function registerHooks() {\n\t\t// Nothing to do here right now\n\t\t// Others might want to know about this and get a chance to do their own work (like messing with our's :) )\n\t\tdo_action( 'pixelgrade_portfolio_registered_hooks' );\n\t}", "function init_plugin() : void {\n\n\t// CSS/JS.\n\tadd_action( 'enqueue_block_assets', __NAMESPACE__ . '\\load_block_frontend_assets' );\n\tadd_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\load_block_editor_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_full_assets' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\load_messaging_assets' );\n\n\t// Admin-only CSS/JS.\n\tadd_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\Admin\\load_admin_assets' );\n\tadd_filter( 'admin_body_class', __NAMESPACE__ . '\\Admin\\add_admin_body_class' );\n\n\t// Modify output.\n\tadd_filter( 'body_class', __NAMESPACE__ . '\\add_body_class' );\n\tadd_filter( 'the_content', __NAMESPACE__ . '\\Gating\\maybe_restrict_content' );\n\tadd_filter( 'the_title', __NAMESPACE__ . '\\Gating\\maybe_add_padlock_to_title', 10, 2 );\n\tadd_action( 'wp_head', __NAMESPACE__ . '\\print_meta_tag' );\n\n\t// Admin screens and settings.\n\tadd_filter( 'plugin_action_links_coil-web-monetization/plugin.php', __NAMESPACE__ . '\\Admin\\add_plugin_action_links' );\n\tadd_filter( 'plugin_row_meta', __NAMESPACE__ . '\\Admin\\add_plugin_meta_link', 10, 2 );\n\tadd_action( 'admin_menu', __NAMESPACE__ . '\\Settings\\register_admin_menu' );\n\tadd_action( 'admin_init', __NAMESPACE__ . '\\Settings\\register_admin_content_settings' );\n\tadd_action( 'admin_notices', __NAMESPACE__ . '\\Settings\\admin_welcome_notice' );\n\tadd_action( 'wp_ajax_dismiss_welcome_notice', __NAMESPACE__ . '\\Settings\\dismiss_welcome_notice' );\n\n\t// Term meta.\n\tadd_action( 'edit_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'create_term', __NAMESPACE__ . '\\Admin\\maybe_save_term_meta', 10, 3 );\n\tadd_action( 'delete_term', __NAMESPACE__ . '\\Admin\\delete_term_monetization_meta' );\n\tadd_term_edit_save_form_meta_actions();\n\n\t// Customizer settings.\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_messaging_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_options_panel' );\n\tadd_action( 'customize_register', __NAMESPACE__ . '\\Admin\\add_customizer_learn_more_button_settings_panel' );\n\n\t// User profile settings.\n\tadd_action( 'personal_options', __NAMESPACE__ . '\\User\\add_user_profile_payment_pointer_option' );\n\tadd_action( 'personal_options_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_action( 'edit_user_profile_update', __NAMESPACE__ . '\\User\\maybe_save_user_profile_payment_pointer_option' );\n\tadd_filter( 'option_coil_payment_pointer_id', __NAMESPACE__ . '\\User\\maybe_output_user_payment_pointer' );\n\n\t// Metaboxes.\n\tadd_action( 'load-post.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'load-post-new.php', __NAMESPACE__ . '\\Admin\\load_metaboxes' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\Admin\\maybe_save_post_metabox' );\n\n\t// Modal messaging\n\tadd_action( 'wp_footer', __NAMESPACE__ . '\\load_plugin_templates' );\n\n\t// Load order - important.\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_content_meta' );\n\tadd_action( 'init', __NAMESPACE__ . '\\Gating\\register_term_meta' );\n}", "public static function init() {\n\t\tadd_action( 'add_meta_boxes', array( 'ReplyContextPlugin', 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( 'ReplyContextPlugin', 'save_postdata' ), 5, 1 );\n\n\t\tadd_filter( 'webmention_links', array( 'ReplyContextPlugin', 'webmention_links' ), 10, 2 );\n\t\tadd_action( 'loop_start', array( 'ReplyContextPlugin', 'loop_start' ) );\n\t}", "public static function _setup_plugin() {\n\t\t\tadd_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) );\n\t\t\tadd_filter( 'mce_buttons_2', array( __CLASS__, 'mce_buttons_2' ) );\n\t\t\tadd_filter( 'content_save_pre', array( __CLASS__, 'content_save_pre' ), 20 );\n\t\t}", "public function _setup()\n {\n add_action('admin_init', array($this, 'register'));\n add_action('plugin_action_links_' . CD_SLL_NAME, array($this, 'link'));\n }", "protected function setup_hooks(){\n add_action('add_meta_boxes', [$this, 'add_custom_meta_box']);\n add_action('save_post', [$this, 'save_post_meta_data']);\n }", "public function subscribe()\r\n {\r\n /* Fire our meta box setup function on the post editor screen. */\r\n add_action('load-post.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n add_action('load-post-new.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n }", "public function addHooks() {\n\t\tadd_action( 'after_setup_theme', array( $this, 'bufferStart' ) );\n\t\tadd_action( 'wp_shutdown', array( $this, 'bufferEnd' ) );\n\t}", "private function define_admin_hooks() {\n\t\t$plugin_admin = new MySuperCalendar_Admin( $this->get_plugin_name() );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\t\t$this->loader->add_action( 'init', $plugin_admin, 'register_Calendar_post_type' );\n\t\t$this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'add_datepicker_meta_box' );\n\t\t$this->loader->add_action( 'save_post', $plugin_admin, 'save_calendar_post' );\n\t\t$this->loader->add_action( 'admin_menu', $plugin_admin, 'register_plugin_menu_page' );\n\n\n\t}", "private function hooks() {\n\t\t// Register rewrite tags.\n\t\tadd_action( 'wct_add_rewrite_tags', array( $this, 'add_rewrite_tags' ) );\n\n\t\t// Register the rewrite rules\n\t\tadd_action( 'wct_add_rewrite_rules', array( $this, 'add_rewrite_rules' ) );\n\n\t\t// Register the permastructs\n\t\tadd_action( 'wct_add_permastructs', array( $this, 'add_permastructs' ) );\n\t}", "public static function run () {\n if( ! defined('ICL_SITEPRESS_VERSION') ) return;\n\n // init our plugin on the p2p_init action hook\n if(isset($_REQUEST['icl_ajx_action']) && function_exists('_p2p_init') ){\n add_action('init', array(__CLASS__, 'early_init') );\n }\n else {\n add_action('p2p_init', array(__CLASS__, 'init'), 14 );\n }\n\n // shows admin notices\n add_action('admin_notices', array(__CLASS__,'admin_notices') );\n\n }", "function pd_startup()\n{\n add_action('init', 'pd_head_cleanup');\n add_action('after_setup_theme', 'pd_theme_support'); /* end pd theme support */\n}", "private function hooks() {\n\t\t$this->include_tabs();\n\t\t$this->include_tabs_server();\n\n\t\t// Enable the REST API if the settings allow for it.\n\t\tif ( true === (bool) wpcd_get_early_option( 'wordpress_app_rest_api_enable' ) ) {\n\t\t\t$this->include_rest_api();\n\t\t}\n\n\t\t// Make sure WordPress loads up our css and js scripts.\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'wpapp_enqueue_scripts' ), 10, 1 );\n\n\t\t// Show any admin notices related to upgrades.\n\t\tadd_action( 'admin_notices', array( $this, 'wpapp_upgrades_admin_notice' ) );\n\n\t\t// Actions send from the front-end when installing servers and sites.\n\t\tadd_action( \"wpcd_server_{$this->get_app_name()}_action\", array( &$this, 'do_instance_action' ), 10, 3 );\n\t\tadd_action( \"wpcd_app_{$this->get_app_name()}_action\", array( &$this, 'do_app_action' ), 10, 3 );\n\n\t\tadd_filter( \"wpcd_command_{$this->get_app_name()}_logs_done\", array( &$this, 'get_logs_done' ), 10, 4 );\n\t\tadd_filter( \"wpcd_command_{$this->get_app_name()}_logs_intermed\", array( &$this, 'get_logs_intermed' ), 10, 4 );\n\t\tadd_action( \"wpcd_command_{$this->get_app_name()}_completed\", array( &$this, 'command_completed' ), 10, 2 );\n\t\tadd_filter( 'wpcd_server_script_args', array( $this, 'add_script_args_server' ), 10, 2 );\n\t\tadd_filter( 'wpcd_app_script_args', array( $this, 'add_script_args_app' ), 10, 2 );\n\t\tadd_filter( 'wpcd_actions', array( $this, 'add_post_actions' ), 10, 2 );\n\t\tadd_filter( \"wpcd_script_placeholders_{$this->get_app_name()}\", array( $this, 'script_placeholders' ), 10, 6 );\n\t\tadd_filter( 'wpcd_app_server_admin_list_local_status_column', array( &$this, 'app_server_admin_list_local_status_column' ), 10, 2 ); // Show the server status.\n\t\tadd_filter( 'wpcd_app_server_admin_list_local_status_column', array( &$this, 'app_server_admin_list_upgrade_status' ), 11, 2 ); // Show the upgrade status in the local status column - function located in trait file upgrade.php.\n\t\tadd_filter( 'wpcd_app_admin_list_summary_column', array( &$this, 'app_admin_list_upgrade_status' ), 11, 2 ); // Show the upgrade status in the TITLE column of the app list - function located in trait file upgrade.php.\n\n\t\t// Push commands and callbacks from servers.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_status_completed\", array( &$this, 'push_command_server_status_completed' ), 10, 4 ); // When a server sends us it's daily status report, part 1 - see bash script #24.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_sites_status_completed\", array( &$this, 'push_command_sites_status_completed' ), 10, 4 ); // When a server sends us it's daily status report, part 2 - see bash script #24.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_maldet_scan_completed\", array( &$this, 'push_command_maldet_scan_completed' ), 10, 4 ); // When a server sends us a report of maldet scan results - see bash script #26.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_restart_completed\", array( &$this, 'push_command_server_restart_completed' ), 10, 4 ); // When a server sends us a report of restart or shutdown.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_monit_log_completed\", array( &$this, 'push_command_monit_log_completed' ), 10, 4 ); // When a server sends us a monit alert or report.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_start_domain_backup_completed\", array( &$this, 'push_command_domain_backup_v1_started' ), 10, 4 ); // When a server sends us a notification telling us a scheduled backup was started for a domain.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_end_domain_backup_completed\", array( &$this, 'push_command_domain_backup_v1_completed' ), 10, 4 ); // When a server sends us a notification telling us a scheduled backup was completed for a domain.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_config_backup_completed\", array( &$this, 'push_command_server_config_backup' ), 10, 4 ); // When a server sends us a notification telling us a backup of the server configuration has started or ended.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_test_rest_api_completed\", array( &$this, 'push_command_test_rest_api_completed' ), 10, 4 ); // When a server sends us a test notification (initiated from the TOOLS tab on a server screen).\n\n\t\t// Push commands and callbacks from sites.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_schedule_site_sync_completed\", array( &$this, 'push_command_schedule_site_sync' ), 10, 4 ); // When a scheduled site sync has started or ended.\n\n\t\t// After server prepare action hooks.\n\t\t$this->wpcd_after_server_prepare_action_hooks();\n\n\t\t// When we're querying to find out the status of a server.\n\t\tadd_filter( 'wpcd_is_server_available_for_commands', array( &$this, 'wpcd_is_server_available_for_commands' ), 10, 2 );\n\n\t\t// When an app cleanup script is being run.\n\t\tadd_action( 'wpcd_cleanup_app_after', array( $this, 'wpcd_cleanup_app_after' ), 10, 1 );\n\n\t\t// When a server cleanup script is being run.\n\t\tadd_action( 'wpcd_cleanup_server_after', array( $this, 'wpcd_cleanup_server_after' ), 10, 1 );\n\n\t\t// When WP has been installed, add temp domain to DNS if configured.\n\t\tadd_action( 'wpcd_command_wordpress-app_completed_after_cleanup', array( $this, 'wpcd_wpapp_install_complete' ), 10, 4 );\n\n\t\t// Ajax Hooks.\n\t\tadd_action( \"wp_ajax_wpcd_{$this->get_app_name()}\", array( &$this, 'ajax_server' ) ); // For ajax calls dealing with servers in wp-admin.\n\t\tadd_action( \"wp_ajax_wpcd_app_{$this->get_app_name()}\", array( &$this, 'ajax_app' ) ); // for ajax calls dealing with apps in wp-admin.\n\t\tif ( wpcd_is_woocommerce_activated() ) {\n\t\t\tadd_action( 'wp_ajax_wpcd_wpapp_frontend', array( &$this, 'ajax_wpapp_frontend' ) ); // for ajax calls from the front-end - code in trait files.\n\t\t}\n\n\t\t// Add welcome message to the settings screen.\n\t\tadd_filter( 'wpcd_general_settings_after_welcome_message', array( $this, 'welcome_message_settings' ), 10, 1 );\n\n\t\t// Add some additional instructions to the \"no application servers found\" message.\n\t\tadd_filter( 'wpcd_no_app_servers_found_msg', array( $this, 'no_app_servers_found_msg' ), 10, 1 );\n\n\t\t// Add a state called \"WordPress\" to the app when its shown on the app list.\n\t\tadd_filter( 'display_post_states', array( $this, 'display_post_states' ), 20, 2 );\n\n\t\t// Background actions for SERVER.\n\t\tadd_action( 'wpcd_wordpress_deferred_actions_for_server', array( $this, 'do_deferred_actions_for_server' ), 10 );\n\n\t\t// Background actions for APPS.\n\t\tadd_action( 'wpcd_wordpress_deferred_actions_for_apps', array( $this, 'do_deferred_actions_for_app' ), 10 );\n\n\t\t// Delete temp log files.\n\t\tadd_action( 'wpcd_wordpress_file_watcher', array( $this, 'file_watcher_delete_temp_files' ) );\n\n\t\t/* Do not allow WooCommerce to redirect to their account page */\n\t\tadd_filter( 'woocommerce_prevent_admin_access', array( $this, 'wc_subscriber_admin_access' ), 20, 1 );\n\n\t\t/*********************************************\n\t\t* Hooks and filters for screens in wp-admin\n\t\t*/\n\n\t\t// Filter hook to add new columns to the APP list.\n\t\tadd_filter( 'manage_wpcd_app_posts_columns', array( $this, 'app_posts_app_table_head' ), 10, 1 );\n\n\t\t// Action hook to add values in new columns in the APP list.\n\t\tadd_action( 'manage_wpcd_app_posts_custom_column', array( $this, 'app_posts_app_table_content' ), 10, 2 );\n\n\t\t// Filter hook to add new columns to the SERVER list.\n\t\tadd_filter( 'manage_wpcd_app_server_posts_columns', array( $this, 'app_server_table_head' ), 10, 1 );\n\n\t\t// Show some app details in the wp-admin list of apps.\n\t\tadd_filter( 'wpcd_app_admin_list_summary_column', array( &$this, 'app_admin_list_summary_column' ), 10, 2 );\n\n\t\t// Add the INSTALL WordPress button to the server list.\n\t\tadd_filter( 'wpcd_app_server_table_content', array( &$this, 'app_server_table_content' ), 10, 3 );\n\n\t\t// Filter hook to add a REMOVE SITE link to the hover action on an app.\n\t\tadd_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );\n\n\t\t// Meta box display callback.\n\t\tadd_action( 'add_meta_boxes_wpcd_app', array( $this, 'app_admin_add_meta_boxes' ) );\n\n\t\t// Save Meta Values.\n\t\tadd_action( 'save_post', array( $this, 'app_admin_save_meta_values' ), 10, 2 );\n\n\t\t// Add Metabox.IO metaboxes for the WordPress app into the APP details CPT screen.\n\t\tadd_filter( \"wpcd_app_{$this->get_app_name()}_metaboxes\", array( $this, 'add_meta_boxes' ), 10, 1 );\n\n\t\t// Add Metabox.IO metaboxes for the SERVER CPT into the server details CPT screen.\n\t\tadd_filter( 'rwmb_meta_boxes', array( $this, 'register_server_metaboxes' ), 10, 1 ); // Register application metabox stub with filter. Note that this is a METABOX.IO filter, not a core WP filter.\n\t\tadd_filter( \"wpcd_server_{$this->get_app_name()}_metaboxes\", array( $this, 'add_meta_boxes_server' ), 10, 1 );\n\n\t\t// Action hook to fire on new site created on WP Multisite.\n\t\tadd_action( 'wp_initialize_site', array( $this, 'wpapp_schedule_events_for_new_site' ), 10, 2 );\n\n\t\t// Action hook to set transient if directory is readable and .txt files are accessible.\n\t\tadd_action( 'admin_init', array( $this, 'wpapp_admin_init' ) );\n\n\t\t// Action hook to handle ajax request to set transient if user closed the readable notice check.\n\t\tadd_action( 'wp_ajax_set_readable_check', array( $this, 'set_readable_check' ) );\n\n\t\t// Action hook to handle ajax request to set transient if user clicked the \"check again\" option in the \"readable check\" notice.\n\t\tadd_action( 'wp_ajax_readable_check_again', array( $this, 'readable_check_again' ) );\n\n\t\t// Action hook to extend admin filter options.\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'wpapp_wpcd_app_table_filtering' ) );\n\n\t\t// Filter hook to filter app listing on custom meta data.\n\t\tadd_filter( 'parse_query', array( $this, 'wpapp_wpcd_app_parse_query' ), 10, 1 );\n\n\t\t// Action hook to handle ajax request to set transient if user closed the notice for cron check.\n\t\tadd_action( 'wp_ajax_set_cron_check', array( $this, 'set_cron_check' ) );\n\t}", "private function hooks(): void {\n\t\t// Steps loader hooks.\n\n\t\tadd_filter(\n\t\t\t'learndash_breezy_localize_script_data',\n\t\t\t$this->container->callback( Steps\\Loader::class, 'add_scripts_data' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_nopriv_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t}", "function setup() {\n\tadd_action( 'die_setup_theme', __NAMESPACE__ . '\\\\i18n' );\n\tadd_action( 'die_setup_theme', __NAMESPACE__ . '\\\\theme_support' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\\\scripts' );\n\tadd_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\\\styles' );\n}", "protected function setup_hooks() {\n\t\tadd_action( 'wp_ajax_nopriv_load_more', [ $this, 'ajax_script_post_load_more' ] );\n\t\tadd_action( 'wp_ajax_load_more', [ $this, 'ajax_script_post_load_more' ] );\n\n\t\t/**\n\t\t * Create a short code.\n\t\t *\n\t\t * Usage echo do_shortcode('[post_listings]');\n\t\t */\n\t\tadd_shortcode( 'post_listings', [ $this, 'post_script_load_more' ] );\n\t}", "function __construct() {\n\t\tPluginUpdateIgnore::__construct();\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_jquery'));\n\t\tadd_action('admin_head-plugins.php', array(&$this, 'admin_css'));\n\t\tadd_action('admin_footer-plugins.php', array(&$this, 'admin_js'));\n\t}", "function __construct() {\n\t\tadd_action( 'wp_footer', array($this, 'blog_page_code') );\n\t\t//hook to insert code on admin page\n\t\tadd_action( 'admin_menu', array($this, 'plugin_admin_add_page') );\n\t\t//register the script that is common for all tupuk plugins\n\t\twp_register_script( 'tupuk-client-core', plugins_url( 'tupuk-test/common/scripts/tupuk-client-core.js' ));\n\t\twp_register_script( 'tupuk-admin-core', plugins_url( 'tupuk-test/common/scripts/tupuk-admin-core.js' ));\n\t\t\n\t\twp_register_script( 'tupuk-angular', plugins_url( 'tupuk-test/common/scripts/angular.min.js' ));\n\t\twp_register_script( 'tupuk-angular-toggle-switch', plugins_url( 'tupuk-test/common/scripts/angular-toggle-switch.min.js' ));\t\t\n\t\twp_register_script( 'tupuk-bootstrap', plugins_url( 'tupuk-test/common/scripts/bootstrap.min.js'));\n\t\twp_register_script( 'tupuk-angular-animate', plugins_url( 'tupuk-test/common/scripts/angular-animate.min.js' ));\n\t\twp_register_script( 'tupuk-angular-ui-bootstrap', plugins_url( 'tupuk-test/common/scripts/ui-bootstrap-tpls-0.13.4.min.js'));\n\t\twp_register_script( 'tupuk-angular-base64', plugins_url( 'tupuk-test/common/scripts/angular-base64.min.js'));\n\t\twp_register_script( 'tupuk-angular-formly', plugins_url( 'tupuk-test/common/scripts/formly.min.js'));\n\t\twp_register_script( 'tupuk-api-check', plugins_url( 'tupuk-test/common/scripts/api-check.min.js'));\n\t\twp_register_script( 'tupuk-formly-bootstrap', plugins_url( 'tupuk-test/common/scripts/angular-formly-templates-bootstrap.min.js'));\n\n\n\t\twp_register_style( 'tupuk-bootstrap', plugins_url( 'tupuk-test/common/styles/bootstrap.min.css'));\n\t\twp_register_style( 'tupuk-angular-toggle-switch', plugins_url( 'tupuk-test/common/styles/angular-toggle-switch.css'));\n\n\t\twp_register_style( 'tupuk-widget-blank', plugins_url( 'tupuk-test/widget/blank-popup-styles.css'));\n\t\twp_register_style( 'tupuk-widget-yes-no', plugins_url( 'tupuk-test/widget/yesno-popup-styles.css'));\n\n\t\t// Add settings link on plugin page\n\t\t$plugin = plugin_basename(__FILE__); \n\t\tadd_filter(\"plugin_action_links_$plugin\", array($this, 'your_plugin_settings_link') );\n\n\t}", "public function register_hooks() {\n\t\t// This would only happen if a theme supports BOTH site-logo and custom-logo for some reason\n\t\tif ( current_theme_supports( 'custom-logo' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'wp_head', array( $this, 'head_text_styles' ) );\n\t\tadd_action( 'customize_register', array( $this, 'customize_register' ) );\n\t\tadd_action( 'customize_preview_init', array( $this, 'preview_enqueue' ) );\n\t\tadd_action( 'delete_attachment', array( $this, 'reset_on_attachment_delete' ) );\n\t\tadd_filter( 'body_class', array( $this, 'body_classes' ) );\n\t\tadd_filter( 'image_size_names_choose', array( $this, 'media_manager_image_sizes' ) );\n\t\tadd_filter( 'display_media_states', array( $this, 'add_media_state' ) );\n\t}", "private function public_hooks()\n\t{\n\t}", "public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'admin_init' ] );\n\t}", "private function define_hooks() {\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'hook_add_meta_boxes' ), 10, 1 );\n\n\t\tadd_action( 'save_post', array( $this, 'hook_save_post' ), 10, 1 );\n\n\t\treturn;\n\t}", "function registerHooks()\n{\n add_action('after_setup_theme', 'setupTheme');\n add_action('rest_api_init', 'registerEndpoints');\n}", "public function init() {\n\t\tif (is_admin()) {\n\t\t\tadd_action('admin_init', array($this, 'autoupdate'));\n\n\t\t\t$pages = array(\n\t\t\t\t'post',\n\t\t\t\t'post-new',\n\t\t\t);\n\t\t\tif (in_array(self::$page_base, $pages)) {\n\t\t\t\tadd_action('add_meta_boxes', array($this, 'add_meta_box'));\n\t\t\t\tadd_action('save_post', array($this, 'save_meta_data'));\n\t\t\t}\n\n\t\t\tif ('plugins' === self::$page_base)\n\t\t\t\tadd_action('in_plugin_update_message-'.basename(dirname(__FILE__)).'/'.basename(__FILE__), array($this, 'update_message'), 10, 2);\n\t\t} else {\n\t\t\tadd_action('wp_enqueue_scripts', array($this, 'enqueue_additional_css_file'));\n\t\t\tadd_action('wp_print_styles', array($this, 'print_additional_css'));\n\t\t}\n\t}", "public static function setup_actions() {\n\t\tadd_action( 'after_switch_theme', array( __CLASS__, 'after_switch_theme' ), 10, 2 );\n\t}", "public function add_hooks() {\n\t\tadd_action( 'pre_post_update', array( $this, 'migrate_location' ) );\n\t\tadd_action( 'save_post', array( $this, 'queue_save_post_actions' ), PHP_INT_MAX, 2 );\n\t\tadd_action( 'wpml_pb_resave_post_translation', array( $this, 'resave_post_translation_in_shutdown' ), 10, 1 );\n\t\tadd_action( 'icl_st_add_string_translation', array( $this, 'new_translation' ), 10, 1 );\n\t\tadd_action( 'wpml_pb_finished_adding_string_translations', array( $this, 'process_pb_content_with_hidden_strings_only' ), 9, 2 );\n\t\tadd_action( 'wpml_pb_finished_adding_string_translations', array( $this, 'save_translations_to_post' ), 10 );\n\t\tadd_action( 'wpml_pro_translation_completed', array( $this, 'cleanup_strings_after_translation_completed' ), 10, 3 );\n\n\t\tadd_filter( 'wpml_tm_translation_job_data', array( $this, 'rescan' ), 9, 2 );\n\n\t\tadd_action( 'wpml_pb_register_all_strings_for_translation', [ $this, 'register_all_strings_for_translation' ] );\n\t\tadd_filter( 'wpml_pb_register_strings_in_content', [ $this, 'register_strings_in_content' ], 10, 3 );\n\t\tadd_filter( 'wpml_pb_update_translations_in_content', [ $this, 'update_translations_in_content'], 10, 2 );\n\n\t\tadd_action( 'wpml_start_GB_register_strings', [ $this, 'initialize_string_clean_up' ], 10, 1 );\n\t\tadd_action( 'wpml_end_GB_register_strings', [ $this, 'clean_up_strings' ], 10, 1 );\n\t}", "private function define_admin_hooks()\n {\n $this->loader->add_action('init',$this,'load_options');\n $this->loader->add_action('plugins_loaded','WordPress_Reactro_Admin', 'load_framework');\n }", "public function initialize() {\n\n // callback to run after theme is loaded\n add_action(\"init\", function() {\n $this->addServiceProvider( FractalProvider::class );\n $this->addServiceProvider( RouterProvider::class );\n });\n\n\n /**\n * This causes the plugin's routes to kick in only if WordPress experiences a 404\n */\n add_action(\"wp\", function() {\n\n if( is_404() )\n $this->dispatch();\n\n });\n\n // code to run when admin is loaded\n add_action(\"admin_init\", function() {\n $this->addServiceProvider( PlatesProvider::class );\n });\n\n //\n add_action(\"admin_menu\", function() {\n\n new SettingsPage($this);\n\n });\n }", "public function hook()\n {\n // Add the settings tab\n// $this->on('!wprss_options_tabs', array($this, 'addTab'), null, 100);\n // Register the settings option, sections and fields\n// $this->on('!wprss_admin_init', array($this, 'register'));\n\n parent::hook();\n }", "private function define_admin_hooks() {\n\n\t\t//$theme_admin = new Wpt_Custom_Theme_Admin( $this->get_theme_name(), $this->get_version() );\n\n\t\t//$this->loader->add_action( 'admin_enqueue_scripts', $theme_admin, 'enqueue_styles' );\n\n\t}", "public function init_hooks() {\n add_action( 'dokan_settings_form_bottom', [ $this, 'dokan_live_chat_seller_settings' ], 15, 2 );\n add_action( 'dokan_store_profile_saved', [ $this, 'dokan_live_chat_save_seller_settings' ], 15 );\n }", "function init_setup() {\n require get_template_directory() . '/includes/navwalker.php';\n require get_template_directory() . '/includes/widget.php';\n require get_template_directory() . '/includes/options.php';\n require get_template_directory() . '/includes/plugin.php';\n add_filter('show_admin_bar', '__return_false');\n /**\n * Make theme available for translation.\n * Translations can be placed in the /languages/ directory.\n */\n load_theme_textdomain( 'initializr', get_template_directory() . '/languages' );\n \n /**\n * Add default posts and comments RSS feed links to <head>.\n */\n add_theme_support( 'automatic-feed-links' );\n \n /**\n * Enable support for post thumbnails and featured images.\n */\n add_theme_support( 'post-thumbnails' );\n \n /**\n * Add support for two custom navigation menus.\n */\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'initializr' ),\n 'secondary' => __('Secondary Menu', 'initializr' )\n ) );\n \n /**\n * Enable support for the following post formats:\n * aside, gallery, quote, image, and video\n */\n add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );\n }", "function setHooks() {\n add_filter('manage_pages_columns', array($this, 'addColumn')); \n add_action('manage_pages_custom_column', array($this,'displayTemplateColumn'), 10, 2);\n\n // Hooks for filtering pages by available templates\n add_action('restrict_manage_posts', array($this, 'displayFilterOptions'));\n add_filter('parse_query', array($this, 'getPagesByTemplate'));\n }", "function wp_init() \n\t\t{\n\t\t\tif (is_admin()) {\n\t\t\t\tadd_action('admin_init', array($this, 'vmt_init'));\n\t\t\t\tadd_action('admin_menu', array($this, 'vmt_options_page'));\n\t\t\t}\n\t\t\tadd_action('wp_head', array($this, 'vmt_head'));\n\t\t}", "public function wp_loaded()\n {\n }", "public function initWpHooks(): void\n {\n parent::initWpHooks();\n\n // let all fields register their WP-hook implementations\n foreach ($this->getFields() as $field) {\n $field->initWpHooks();\n }\n }", "public function hooks() {\n $service = new Service($this->license_base);\n add_action('admin_menu', array($this, 'register_license_page'));\n add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10);\n // Validate service\n add_action('wp_ajax_validate_service', array($service, 'validate_service'), 10);\n }", "function allonsy_hook_init() {\n\n\t/**\n\t * Adds the excerpt field UI to pages, which do not have this field by default.\n\t * Good for pages that link to child pages and need to include a description.\n\t *\n\t * @see https://codex.wordpress.org/Function_Reference/add_post_type_support\n\t *\n\t * @since 3.0\n\t */\n\n\tadd_post_type_support( 'page', array( 'excerpt', 'thumbnail' ) );\n\n\n\t/**\n\t * Remove custom field UI on pages and posts.\n\t * Custom field output needs to be built into the theme and ACF is often used for creating field UI.\n\t *\n\t * @see https://codex.wordpress.org/Function_Reference/remove_post_type_support\n\t *\n\t * @since 3.0\n\t */\n\n\tremove_post_type_support( 'post', 'custom-fields' );\n\tremove_post_type_support( 'page', 'custom-fields' );\n\n}", "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t\tregister_activation_hook( __FILE__, array( $this, 'activate' ) );\n\n\t\t\t// Plugin update notifications\n\t\t\tadd_action( 'admin_init', array( $this, 'plugin_update' ) );\n\t\t}", "function mpfy_plugin_init() {\n\tinclude_once(MAPIFY_PLUGIN_DIR . '/options/post-types.php');\n\n\t// Flush rewrite rules after an update to make sure that the custom post types are included in rewrite rules\n\tif (get_option('mpfy_flush_required') === 'y') {\n\t\tupdate_option('mpfy_flush_required', 'n');\n\n\t\tif (function_exists('flush_rewrite_rules')) {\n\t\t\tflush_rewrite_rules();\n\t\t} else {\n\t\t\tadd_action('wp', 'flush_rewrite_rules');\n\t\t}\n\t}\n\n\t// enqueue generic dependencies\n\twp_enqueue_script('jquery');\n}", "public function init() {\n\t\tadd_filter( 'plugin_action_links_meta-box/meta-box.php', [ $this, 'plugin_links' ], 20 );\n\n\t\t// Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.\n\t\tadd_action( 'admin_menu', [ $this, 'add_menu' ], 5 );\n\t\tadd_action( 'admin_menu', [ $this, 'add_submenu' ], 5 );\n\n\t\t// If no admin menu, then hide the About page.\n\t\tadd_action( 'admin_head', [ $this, 'hide_page' ] );\n\n\t\t// Redirect to about page after activation.\n\t\tadd_action( 'activated_plugin', [ $this, 'redirect' ], 10, 2 );\n\t}", "function _wp_call_all_hook($args)\n {\n }", "public static function init() {\n\t\tHeadway::load('admin/admin-meta-boxes');\n\t\t\t\t\n\t\tadd_action('delete_post', array(__CLASS__, 'delete_post'));\n\n\t\tadd_filter('get_sample_permalink_html', array(__CLASS__, 'open_in_visual_editor_button'), 10, 4);\n\t\t\n\t}", "public function plugin_activate(){\n\t\t\n\t\t//call our custom content type function\n\t \t$this->register_location_content_type();\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Admin_Hook( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t}", "public function define_hooks()\n\t{\n\t\t$base = new Base;\n\t\t$this->loader->add_action('init', $base, 'add_post_types');\n\t}", "public function initialize_hooks() {\n\t\t\n add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_post' ) );\n\t\t\n\t}", "function init_hooks() {\n\tregister_activation_hook( __FILE__, __NAMESPACE__ . '\\activate_plugin' );\n\tregister_deactivation_hook( __FILE__, __NAMESPACE__ . '\\deactivate_plugin' );\n\tregister_uninstall_hook( __FILE__, __NAMESPACE__ . '\\uninstall_plugin' );\n}", "public function register_hooks() {\n\t\t\t\n\t\t\tif ( ! is_single() )\n\t\t\t\treturn;\n\n\t\t\tif ( 'podcast' !== get_post_type() )\n\t\t\t\treturn;\n\n\t\t\tadd_filter( 'language_attributes', function ( $output = '' ) {\n\t\t\t\treturn $output . ' prefix=\"og: http://ogp.me/ns#\"';\n\t\t\t} );\n\n\t\t\tadd_action( 'wp_head', array( $this, 'insert_' ) );\n\t\t}", "protected function wp_hooks() {\n\t\tadd_action( 'category_add_form_fields', array( &$this, 'setup_add_category_form_view' ), 10 );\n\n\t\t// Display populated custom form fields while editing a category\n\t\tadd_action( 'category_edit_form_fields', array( &$this, 'setup_edit_category_form_view' ), 10, 2 );\n\n\t\t// Save custom form field data when category is created\n\t\tadd_action( 'created_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Save custom form field data when category is edited\n\t\tadd_action( 'edited_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Delete custom form field data when a category is deleted\n\t\tadd_action( 'delete_category', array( &$this, 'delete_category_form_data' ) );\n\n\t}", "public function hooks() {\n\t\t\\add_filter( 'the_generator', '__return_false' );\n\t\t\\remove_action('wp_head', 'wp_generator');\n\t}", "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t}", "public function register_hooks() {\n\t\tadd_filter( 'acf/pre_render_fields', array( $this, 'fields_on_translated_options_page' ), 10, 2 );\n\t\tadd_filter( 'acf/update_value', array( $this, 'overwrite_option_value' ), 10, 4 );\n\t\tadd_filter( 'acf/validate_post_id', [ $this, 'append_language_code_for_option_pages' ] );\n\t}", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = MailChimp_WooCommerce_Admin::instance();\n\n\t\t$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');\n\t\t$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');\n\n\t\t// Add menu item\n\t\t$this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_admin_menu');\n\n\t\t// Add Settings link to the plugin\n\t\t$plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_name . '.php');\n\t\t$this->loader->add_filter('plugin_action_links_' . $plugin_basename, $plugin_admin, 'add_action_links');\n\n\t\t// make sure we're listening for the admin init\n\t\t$this->loader->add_action('admin_init', $plugin_admin, 'options_update');\n\n\t\t// put the menu on the admin top bar.\n\t\t//$this->loader->add_action('admin_bar_menu', $plugin_admin, 'admin_bar', 100);\n\n $this->loader->add_action('plugins_loaded', $plugin_admin, 'update_db_check');\n $this->loader->add_action('admin_init', $plugin_admin, 'setup_survey_form');\n $this->loader->add_action('admin_footer', $plugin_admin, 'inject_sync_ajax_call');\n\n // update MC store information when woocommerce general settings are saved\n $this->loader->add_action('woocommerce_settings_save_general', $plugin_admin, 'mailchimp_update_woo_settings');\n \n // update MC store information if \"WooCommerce Multi-Currency Extension\" settings are saved\n if ( class_exists( 'WOOMULTI_CURRENCY_F' ) ) {\n $this->loader->add_action('villatheme_support_woo-multi-currency', $plugin_admin, 'mailchimp_update_woo_settings');\n }\n }", "function bg_startPlugin(){\n add_action( 'init', 'bg_PatchEditor' );\n add_action( 'admin_init', 'bg_AddAdminSettings' );\n add_action( 'admin_menu', 'bg_AddPluginMenu' );\n}", "private function define_admin_hooks() {\n\n add_action('init', array($this, 'image_sizes'), 10, 0);\n add_action('admin_init', array($this, 'get_to_demo_data'), 10);\n\n add_action('admin_enqueue_scripts', array($this, 'admin_style_scripts'));\n add_action('wp_enqueue_scripts', array($this, 'front_style_scripts'), 95);\n\n add_action('add_meta_boxes', 'careerfy_page_header_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_subheader_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_view_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_title_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_layout_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_post_layout_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_post_settings_meta_boxes');\n }", "function install_hooks() {\n // Info that the plugin is activated.\n update_option( 'DB_Plugin_Hooks', true );\n }", "private function __construct() {\n global $wp_version;\n\n // Load plugin text domain\n add_action('init', array($this, 'load_plugin_textdomain'));\n\n // Load public-facing style sheet and JavaScript.\n add_action('wp_enqueue_scripts', array($this, 'enqueue_styles_and_scripts'));\n\n // Add support for h5p shortcodes.\n add_shortcode('h5p', array($this, 'shortcode'));\n\n // Adds JavaScript settings to the bottom of the page.\n add_action('wp_footer', array($this, 'add_settings'));\n\n // Clean up tmp editor files\n add_action('h5p_daily_cleanup', array($this, 'remove_old_tmp_files'));\n\n // Check for library updates\n add_action('h5p_daily_cleanup', array($this, 'get_library_updates'));\n\n // Remove old log messages\n add_action('h5p_daily_cleanup', array($this, 'remove_old_log_events'));\n\n // Always check if the plugin has been updated to a newer version\n add_action('init', array('H5P_Plugin', 'check_for_updates'), 1);\n\n // Add menu options to admin bar.\n add_action('admin_bar_menu', array($this, 'admin_bar'), 999);\n\n // REST API\n add_action('rest_api_init', array($this, 'rest_api_init'));\n\n // Removes all H5P data for this blog\n if (version_compare($wp_version, '5.1', '>=')) {\n add_action('wp_delete_site', array($this, 'delete_site'));\n }\n else {\n // Deprecated since 5.1\n add_action('delete_blog', array($this, 'delete_blog'));\n }\n }", "public function boot() {\n\n\t\tadd_action( 'init', array( $this, 'hook_init' ) );\n\n\t}", "function load() {\n\tadd_action( 'after_setup_theme', __NAMESPACE__ . '\\\\setup' );\n\tadd_action( 'after_setup_theme', __NAMESPACE__ . '\\\\setup_theme', 100 );\n}", "private function dc_define_admin_hooks() {\n\n\t\t$plugin_admin = new Dorancafe_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'dc_enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'dc_enqueue_scripts' );\n\n\t}", "private function define_public_hooks() {\n\t\t\n\t\t$plugin_public = new Soisy_Pagamento_Rateale_Public( $this->get_plugin_name(), $this->get_version() );\n\t\t\n\t\t\n\t\t$this->loader->add_action( 'woocommerce_before_cart_table', $plugin_public, 'updated_cart' );\n\t\t$this->loader->add_action( 'woocommerce_before_checkout_form', $plugin_public, 'updated_cart' );\n\t\t//$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'wp_footer', $plugin_public, 'enqueue_scripts' );\n\t\t$this->loader->add_action( 'wp', $plugin_public, 'soisy_available' , 10);\n\t\t$this->loader->add_action( 'init', $plugin_public, 'shortcodes' , 10);\n\t\t$this->loader->add_filter( 'soisy_settings', $plugin_public, 'get_options',99);\n\t\t$this->loader->add_action( 'wp', $plugin_public, 'init_soisy_widget' );\n\t\t$this->loader->add_action( 'woocommerce_before_single_product', $plugin_public, 'product_hooks' );\n\t\t//$this->loader->add_action( 'woocommerce_before_main_content', $plugin_public, 'product_hooks' );\n\t\t$this->loader->add_action( 'woocommerce_proceed_to_checkout', $plugin_public, 'checkout_hooks', 1 );\n\t\t$this->loader->add_action( 'woocommerce_review_order_before_order_total', $plugin_public, 'order_review_hooks', 1 );\n\t\t$this->loader->add_action( 'soisy_render_widget', $plugin_public, 'render_widget', 1 );\n\t\t//ajax actions\n\t\t$this->loader->add_action( 'soisy_ajax_order_status', $plugin_public, 'parseRemoteRequest');\n\t\t\n\t}", "function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) \t\t\t);\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) \t\t\t);\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) \t\t\t);\n\tadd_action( 'wp_head', $n( 'header_meta' ) \t\t\t);\n\tadd_action( 'after_setup_theme', $n( 'rss_feed_links' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'title_tag_support' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'post_thumbnail_support' ));\n\tadd_action( 'after_setup_theme', $n( 'image_sizes' ) );\n\tadd_action( 'after_setup_theme', $n( 'nav_menu_register' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'html5_elements' )\t\t);\n\tadd_action( 'wp_head', $n( 'add_custom_fonts' ) );\n\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\tremove_action('wp_head', 'rsd_link' );\n\tremove_action('wp_head', 'wp_generator' );\n\tremove_action('wp_head', 'feed_links', 2 );\n\tremove_action('wp_head', 'index_rel_link' );\n\tremove_action('wp_head', 'wlwmanifest_link' );\n\tremove_action('wp_head', 'feed_links_extra', 3 );\n\tremove_action('wp_head', 'start_post_rel_link', 10, 0 );\n\tremove_action('wp_head', 'parent_post_rel_link', 10, 0 );\n\tremove_action('wp_head', 'adjacent_posts_rel_link', 10, 0 );\n}", "public function admin_init(){\n\t\t\t/* Add theme update data */\n\t\t\tif('plugin' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_themes', array($this, 'add_theme_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Add plugin update data */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_plugins', array($this, 'add_plugin_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Plugin Information */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('plugins_api_result', array($this, 'plugin_info'), 10, 3);\n\t\t\t}\n\t\t}", "public function add_hooks() {\n\t\tadd_action( 'types_leagacy_editor_callback_init', array( $this, 'remove_presscore_hooks' ) );\n\t}", "function wp_scripts()\n {\n }", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Service_Tracker_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'localize_scripts' );\n\n\t\t$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_page' );\n\n\t}" ]
[ "0.7649757", "0.76279014", "0.7539664", "0.7471914", "0.7323744", "0.72685397", "0.7261366", "0.7242826", "0.7211023", "0.71347237", "0.71150756", "0.71105105", "0.7108266", "0.71046007", "0.70763564", "0.7058203", "0.7049491", "0.70033854", "0.6993044", "0.69537956", "0.6946138", "0.6945689", "0.6940752", "0.6938636", "0.6938172", "0.69206357", "0.6916417", "0.6903336", "0.6896307", "0.68904424", "0.6872687", "0.6858345", "0.6855775", "0.68541837", "0.68446565", "0.6836906", "0.6829228", "0.6812543", "0.6801733", "0.67893", "0.6786417", "0.6785996", "0.6778373", "0.6775767", "0.67684793", "0.67607975", "0.6756719", "0.67386746", "0.67056656", "0.66979945", "0.66889673", "0.6683476", "0.6683413", "0.66825145", "0.66813457", "0.6680774", "0.667593", "0.66700697", "0.6664348", "0.66634876", "0.6660839", "0.66573477", "0.66543955", "0.66526484", "0.6648844", "0.6643178", "0.6640257", "0.66363704", "0.6636038", "0.6633393", "0.6633265", "0.6631697", "0.66258734", "0.66257936", "0.6624835", "0.6616755", "0.6605615", "0.65964556", "0.6594781", "0.6588639", "0.6585974", "0.65858513", "0.65842587", "0.6583292", "0.6579424", "0.6576006", "0.65736234", "0.6567693", "0.656409", "0.65621114", "0.6561343", "0.6559217", "0.655704", "0.6550536", "0.6550455", "0.65496033", "0.65454215", "0.65451485", "0.6544716", "0.6543542" ]
0.6744704
47
Add a new tab to the settings page Filter hook: wpcd_settings_tabs
public function settings_tabs( $tabs ) { $new_tab = array( 'app-vpn' => __( 'APP: VPN - Settings', 'wpcd' ) ); $tabs = $tabs + $new_tab; return $tabs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "public function add_settings_tab($settings_tabs){\n $settings_tabs['opening-hours'] = __('Opening Hours', 'woocommerce-opening-hours');\n return $settings_tabs;\n }", "public function add_settings_tab($settings_tabs){\n $settings_tabs['opening_hours'] = __('Opening Hours', 'woocommerce-opening-hours');\n return $settings_tabs;\n }", "public function add_settings_tab( $settings_tabs ) {\n\n\t\t$settings_tabs[ $this->settings_tab_id ] = __( 'Pre-Orders', WC_Pre_Orders::TEXT_DOMAIN );\n\n\t\treturn $settings_tabs;\n\t}", "public function add_settings( $tabs ) {\n\n\t\t/**\n\t\t * Allow developers to change number of redirections to process at once.\n\t\t *\n\t\t * @param int $number\n\t\t */\n\t\tHelper::add_json( 'redirectionPastedContent', $this->do_filter( 'redirections/pastedContent', 100 ) );\n\n\t\tArr::insert(\n\t\t\t$tabs,\n\t\t\t[\n\t\t\t\t'redirections' => [\n\t\t\t\t\t'icon' => 'rm-icon rm-icon-redirection',\n\t\t\t\t\t'title' => esc_html__( 'Redirections', 'rank-math' ),\n\t\t\t\t\t/* translators: Link to kb article */\n\t\t\t\t\t'desc' => sprintf( esc_html__( 'Easily create redirects without fiddling with tedious code. %s.', 'rank-math' ), '<a href=\"' . \\RankMath\\KB::get( 'redirections-settings' ) . '\" target=\"_blank\">' . esc_html__( 'Learn more', 'rank-math' ) . '</a>' ),\n\t\t\t\t\t'file' => $this->directory . '/views/options.php',\n\t\t\t\t],\n\t\t\t],\n\t\t\t8\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function add_settings_tab($settings_tabs) {\r\n $settings_tabs[$this->id] = __('SMS-EI', 'woocommerce-twilio-estatic');\r\n return $settings_tabs;\r\n }", "public function add_tabs() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$video_map = array(\n\t\t\t'wc-settings' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-general' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-products' => array(\n\t\t\t\t'title' => __( 'Product Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-tax' => array(\n\t\t\t\t'title' => __( 'Tax Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout' => array(\n\t\t\t\t'title' => __( 'Checkout Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-account' => array(\n\t\t\t\t'title' => __( 'Account Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-email' => array(\n\t\t\t\t'title' => __( 'Email Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-api' => array(\n\t\t\t\t'title' => __( 'Webhook Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_paypal' => array(\n\t\t\t\t'title' => __( 'PayPal Standard', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_simplify_commerce' => array(\n\t\t\t\t'title' => __( 'Simplify Commerce', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping' => array(\n\t\t\t\t'title' => __( 'Shipping Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_free_shipping' => array(\n\t\t\t\t'title' => __( 'Free Shipping', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/po191fmvy9?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_delivery' => array(\n\t\t\t\t'title' => __( 'Local Delivery', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/5qjepx9ozj?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_pickup' => array(\n\t\t\t\t'title' => __( 'Local Pickup', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/pe95ph0apb?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_cat' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_tag' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_shipping_class' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product_attributes' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t'title' => __( 'Simple Products', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-status' => array(\n\t\t\t\t'title' => __( 'System Status', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-reports' => array(\n\t\t\t\t'title' => __( 'Reports', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t)\n\t\t);\n\n\t\t$page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] );\n\t\t$tab = empty( $_GET['tab'] ) ? '' : sanitize_title( $_GET['tab'] );\n\t\t$section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab, $section ) ) ) : $screen->id;\n\n\t\t// Fallback for sections\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab ) ) ) : $screen->id;\n\t\t}\n\n\t\t// Fallback for tabs\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? $page : $screen->id;\n\t\t}\n\n\t\tif ( isset( $video_map[ $video_key ] ) ) {\n\t\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'woocommerce_101_tab',\n\t\t\t\t'title' => __( 'WooCommerce 101', 'woocommerce' ),\n\t\t\t\t'content' =>\n\t\t\t\t\t'<h2><a href=\"http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Videos&utm_campaign=Onboarding\">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .\n\t\t\t\t\t'<iframe data-src=\"' . esc_url( $video_map[ $video_key ]['url'] ) . '\" src=\"\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" class=\"wistia_embed\" name=\"wistia_embed\" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width=\"480\" height=\"298\"></iframe>'\n\t\t\t) );\n\t\t}\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_docs_tab',\n\t\t\t'title' => __( 'Documentation', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Documentation', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'Should you need help understanding, using, or extending WooCommerce, please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.' , 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'WooCommerce Documentation', 'woocommerce' ) . '</a> <a href=\"' . 'http://docs.woothemes.com/wc-apidocs/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=APIDocs&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'Developer API Docs', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_support_tab',\n\t\t\t'title' => __( 'Support', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Support', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'After %sreading the documentation%s, for further assistance you can use the %scommunity forums%s on WordPress.org to talk with other users. If however you are a WooThemes customer, or need help with premium add-ons sold by WooThemes, please %suse our helpdesk%s.', 'woocommerce' ), '<a href=\"http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding\">', '</a>', '<a href=\"https://wordpress.org/support/plugin/woocommerce\">', '</a>', '<a href=\"http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding\">', '</a>' ) . '</p>' .\n\t\t\t\t'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button button-primary\">' . __( 'System Status', 'woocommerce' ) . '</a> <a href=\"' . 'https://wordpress.org/support/plugin/woocommerce' . '\" class=\"button\">' . __( 'WordPress.org Forums', 'woocommerce' ) . '</a> <a href=\"' . 'http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'WooThemes Customer Support', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_education_tab',\n\t\t\t'title' => __( 'Education', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Education', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course ran by one of our educational partners.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/educational-partners/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=EduPartners&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'View Education Partners', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_bugs_tab',\n\t\t\t'title' => __( 'Found a bug?', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href=\"%s\">Github issues</a>. Ensure you read the <a href=\"%s\">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href=\"%s\">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '\" class=\"button button-primary\">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button\">' . __( 'System Status', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t\t'title' => __( 'Setup Wizard', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Setup Wizard', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'index.php?page=wc-setup' ) . '\" class=\"button button-primary\">' . __( 'Setup Wizard', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->set_help_sidebar(\n\t\t\t'<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WooCommerceProductPage&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://wordpress.org/extend/plugins/woocommerce/' . '\" target=\"_blank\">' . __( 'WordPress.org Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce' . '\" target=\"_blank\">' . __( 'Github Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/themes/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCThemes&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Themes', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/woocommerce-extensions/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCExtensions&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Extensions', 'woocommerce' ) . '</a></p>'\n\t\t);\n\t}", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "public function add_tab( $tab ) {\n $this->settings_tabs[] = $tab;\n\n return $this;\n }", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "private function hooks() {\n\n\t\tadd_filter( 'wpcd_settings_tabs', array( &$this, 'settings_tabs' ) ); // add a new tab to the settings page.\n\n\t\tadd_filter( 'wpcd_settings_metaboxes', array( &$this, 'settings_metaboxes' ) ); // add new metaboxes to our new tab on the settings pages.\n\n\t}", "function change_tabs($tabs){\n $tabs['additional_information']['title'] = 'Характеристики';\n return $tabs;\n}", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}", "function settings_nav( $tabs ) {\n\n $tabs[ 'admin_tools' ] = array(\n 'slug' => 'admin_tools',\n 'title' => __( 'Developer', 'wpp' )\n );\n\n return $tabs;\n\n }", "function isms_component_messages_addtab($cbtype, &$cbdata)\n{\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n $enabled = grab_array_var($settings, \"enabled\", 0);\n if ($enabled != 1)\n return;\n\n $newtab = array(\n \"id\" => \"isms\",\n \"title\" => \"iSMS\",\n );\n\n $cbdata[\"tabs\"][] = $newtab;\n}", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "public function settings_page() {\n do_action( 'rewardpoint_settings_start' );\n $current_tab = empty( $_GET['tab'] ) ? 'behavior' : sanitize_title( $_GET['tab'] );\n $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n $tabs = apply_filters( 'woocommerce_settings_tabs_array', array(\n 'behavior' => 'Behaviors',\n 'purchase' => 'Purchases',\n 'referral' => 'Referrals',\n 'invite' => 'Invite and Share',\n 'user-point' => 'Use Reward Points',\n ) );\n include 'views/html-admin-page.php';\n\t}", "protected function createTabs() {}", "function woocommerce_product_write_panel_tabs(){\n ?>\n <li class=\"custom_tab\">\n <a href=\"#custom_tab_data_ctabs\">\n <?php _e('Custom Tabs', 'GWP'); ?>\n </a>\n </li>\n <?php\n }", "public function bp_settingssubnav_tab_action() {\n\t\techo \\do_shortcode( '[wcfm endpoint=\"wcfm-settings\"]' );\n\t}", "protected function _registerSettingsPage()\n {\n // Add action to register field sections to tab\n $this->on('!wprss_add_settings_fields_sections',\n array($this, '_renderSettingsPage'), 10, 1);\n }", "function jr_wp_pagenavi_add_tab( $result ) {\r\n\t$tab = jr_dashboard_curr_page_tab();\r\n\treturn add_query_arg( $tab, $result );\r\n}", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "function pcptab_civicrm_tabs( &$tabs, $contactID ) {\n\n $url = CRM_Utils_System::url( 'civicrm/contact/view/pcps',\n \"reset=1&cid={$contactID}&snippet=1\" );\n\n $tabs[] = array( 'id' => 'pcps-tab',\n 'url' => $url,\n 'title' => 'Personal Campaign Pages',\n\t\t\t\t 'count' => CRM_Pcptab_BAO_PCPs::getPCPsCount($contactID),\n 'weight' => 1000 );\n}", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function add_woocommerce_settings_tab( $settings ) {\n\t\t$settings[] = include( 'includes/admin/class-alg-wc-settings-custom-order-numbers.php' );\n\t\treturn $settings;\n\t}", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "function classiera_add_settings_page() { \r\n add_theme_page('Categories Custom Fields', 'Categories Custom Fields', 'manage_options', 'settings', 'classiera_theme_settings_page'); \r\n}", "public static function hookData() {\n return array_merge_recursive( array (\n 'settings' => \n array (\n 0 => \n array (\n 'selector' => '#elSettingsTabs > div.ipsColumns.ipsColumns_collapsePhone.ipsColumns_bothSpacing > div.ipsColumn.ipsColumn_wide > div.ipsSideMenu > ul.ipsSideMenu_list',\n 'type' => 'add_inside_end',\n 'content' => '{template=\"accountSettingsTab\" group=\"settings\" location=\"front\" app=\"teamspeak\" params=\"$tab\"}',\n ),\n ),\n), parent::hookData() );\n}", "public function register_tab( $tabs, $current ) {\n\t\t$query = array();\n\n\t\t$query['autofocus[panel]'] = 'helpful';\n\n\t\t$section_link = add_query_arg( $query, admin_url( 'customize.php' ) );\n\n\t\t$tabs['design'] = array(\n\t\t\t'id' => 'design',\n\t\t\t'name' => esc_html_x( 'Design', 'tab name', 'helpful' ),\n\t\t\t'href' => $section_link,\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "protected function setup_tabs() {\n\n\t\t// If there's a remote info file give it priority and override any existing parameters.\n\t\tif ( $url = $this->browser_args['remote_info'] ) {\n\t\t\t$info = $this->get_remote_info( $url );\n\n\t\t\tif ( ! empty( $info ) ) {\n\t\t\t\t$this->browser_args = wp_parse_args( $info, $this->browser_args );\n\t\t\t}\n\n\t\t}\n\n\t\t// Display the 'popular' tab if enabled.\n\t\tif ( 'true' == $this->browser_args['show_popular'] ) {\n\n\t\t\t$this->browser_args['tabs']['popular'] = array(\n\t\t\t\t'name' => __( 'Popular', 'wp-shp-browser' ),\n\t\t\t\t'url' => ''\n\t\t\t);\n\n\t\t}\n\n\t\t// Set the default tab if not already set.\n\t\tif ( ! $this->browser_args['default_tab'] ) {\n\t\t\t$default_tab = array_keys( $this->browser_args['tabs'] );\n\t\t\t$default_tab = $default_tab[0];\n\n\t\t\t$this->browser_args['default_tab'] = $default_tab;\n\t\t}\n\n\t}", "function rc_add_woocommerce_product_data_tab( $tabs ) {\n\n\t$tabs['access'] = array(\n\t\t'label' => __( 'Access Control', 'restrict-content' ),\n\t\t'target' => 'rc_access_control',\n\t\t'class' => array(),\n\t);\n\n\treturn $tabs;\n}", "public function add_product_tab( $tabs ) {\n\n $tabs['simple'] = array(\n 'label' => __( 'DM bookable', 'mvr' ),\n 'target' => 'dm_bookable_product_options',\n 'class' => 'show_if_simple',\n );\n\n unset( $tabs['shipping'] );\n\n return $tabs;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function insta_f_create_menu(){\n\tadd_options_page('Instagram Portfolio Settings', 'Instagram Portfolio', 'manage_options', INSTA_FOLIO_SETTINGS_PAGE, 'insta_f_settings_page');\t\n}", "function the_media_upload_tabs()\n {\n }", "function add_from_tab() {\n ?>\n <a href=\"#wpuf-metabox-qr-code\" class=\"nav-tab\" id=\"wpuf-qr-code-tab\"><?php _e( 'QR Code', 'wpuf-pro' ); ?></a>\n <?php\n }", "function cpjr3_settings_page() {\n\n add_options_page( __( 'Click Points Settings', 'cpjr3' ), __( 'Click Points', 'cpjr3' ), 'administrator', __FILE__, 'cpjr3_settings_fn' );\n\n}", "public function add_admin_page( $tab, $action ) {\n\t\tif ( 'git_updater_addons' === $tab ) {\n\t\t\t$this->action = add_query_arg( 'tab', $tab, $action );\n\t\t\t$this->admin_page_notices();\n\t\t\tdo_settings_sections( 'git_updater_addons_settings' );\n\t\t}\n\t}", "function deposit_tab_options_tab() \n {\n ?> <li class=\"deposit_tab\"><a href=\"#deposit_tab_data\"><?php _e('Deposit Options', 'woothemes'); ?></a></li> <?php\n }", "public function woo_new_product_tab( $tabs ) {\n\n\t\t// Adds the new tab\n\n\t\t$tabs['contents'] = array(\n\t\t\t'title' => __( 'Contents', 'woocommerce' ),\n\t\t\t'priority' => 20,\n\t\t\t'callback' => array( $this, 'contents_tab_content' )\n\t\t);\n\n\t\t$tabs['authors'] = array(\n\t\t\t'title' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t'priority' => 30,\n\t\t\t'callback' => array( $this, 'authors_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['reviews'] ); // Remove the reviews information tab\n\n\t\t$tabs['heweb17reviews'] = array(\n\t\t\t'title' => __( 'Reviews', 'woocommerce' ),\n\t\t\t'priority' => 40,\n\t\t\t'callback' => array( $this, 'reviews_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['additional_information'] ); // Remove the additional information tab\n\n\t\treturn $tabs;\n\n\t}", "function add_staff_tab() {\n\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'mtheme-block-9999';\n\n\t\t\t//default key/value for the tab\n\t\t\t$tab = array(\n\t\t\t\t'social_text' => __('Social Site Name','mthemelocal'),\n\t\t\t\t'social_icon' => '',\n\t\t\t\t'social_link' => ''\n\t\t\t);\n\n\t\t\tif($count) {\n\t\t\t\t$this->tab($tab, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\n\t\t\tdie();\n\t\t}", "function add_from_tab_content () {\n require_once dirname(__FILE__).'/templates/form-tab-content.php';\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "protected function _addTab(\n TDProject_Core_Interfaces_Block_Widget_Tab $tab) {\n \t$this->addBlock($tab);\n \treturn $tab;\n }", "function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\n }", "function spsn_admin_tab() {\n\n add_menu_page('Share blog post with social network', 'Share blog post with social network', 'manage_options', __FILE__, 'spsn_admin_page');\n}", "public function create_plugin_settings_page() {\n \t$page_title = 'My Awesome Settings Page';\n \t$menu_title = 'Awesome Plugin';\n \t$capability = 'manage_options';\n \t$slug = 'smashing_fields';\n \t$callback = array( $this, 'plugin_settings_page_content' );\n \t$icon = 'dashicons-admin-plugins';\n \t$position = 100;\n\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "function wikiembed_options_add_page() {\n\t$awaiting_mod = 4;\n\tadd_object_page( \"Wiki-Press Embed\", \"Wiki-Press Embed\", \"publish_pages\", \"wiki-embed\", \"wikiembed_list_page\", plugins_url('/rdp-wiki-press-embed/resources/img/icons_menu.gif'), 28 );\n\t$list_page = add_submenu_page( \"wiki-embed\", 'Wiki Embed List', 'Wiki Embed List ', \"publish_pages\", \"wiki-embed\", \"wikiembed_list_page\" );\n\t\n\t$settings_page = add_submenu_page( \"wiki-embed\", \"Settings\", \"Settings\", \"publish_pages\", \"wikiembed_settings_page\", \"wikiembed_settings_page\" );\n\tadd_action( 'admin_print_styles-'.$list_page, 'wikiembed_admin_styles_list_page' );\n\tadd_action( 'admin_print_styles-'.$settings_page, 'wikiembed_admin_styles_list_page' );\n}", "function admin_init() {\n\t\t\twp_enqueue_script('common');\n\t\t\twp_enqueue_script('wp-lists');\n\t\t\twp_enqueue_script('postbox');\n\n\t\t\t// Group = setings_fields, name of options, validation callback\n\t\t\tregister_setting( 'subpages_as_tabs_options', 'subpages_as_tabs_options', array( $this, 'options_validate' ) );\n\t\t\t// Unique ID, section title displayed, section callback, page name = do_settings_section\n\t\t\tadd_settings_section( 'subpages_tabs_section', '', array( $this, 'main_section' ), 'subpage_tabs_plugin' );\n\t\t\t// Unique ID, Title, function callback, page name = do_settings_section, section name\n\t\t\tadd_settings_field( 'spat_active_tab_background', __( 'Active Tab Background' ), array( $this, 'active_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t/**/\n\t\t\tadd_settings_field( 'spat_active_tab_foreground', __('Active Tab Text' ), array( $this, 'active_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_background', __( 'Inactive Tab Background' ), array( $this, 'inactive_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_foreground', __('Inactive Tab Text' ), array( $this, 'inactive_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\n\t\t\tadd_settings_field( 'border', __('Border' ), array( $this, 'border'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t//*/\n\t\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function bp_settings_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->account_centre_landing();\n\t}", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "function add_settings_page() {\n\tadd_menu_page( __( 'Theme Options' ), __( 'Theme Options' ), 'manage_options', 'settings', 'theme_settings_page');\n}", "function strl_add_settings_page() {\n\t$strl_icon_svg = file_get_contents( get_template_directory() . '/assets/img/icon-STRL-wit.svg' );\n\n\tif ( function_exists( 'acf_add_options_page' ) ) {\n\t\tacf_add_options_page(\n\t\t\tarray(\n\t\t\t\t'page_title' => __( 'STRL Global', 'strl' ),\n\t\t\t\t'menu_title' => __( 'STRL Global', 'strl' ),\n\t\t\t\t'menu_slug' => 'strl-general-settings',\n\t\t\t\t'capability' => 'edit_posts',\n\t\t\t\t'redirect' => false,\n\t\t\t\t'icon_url' => 'data:image/svg+xml;base64,' . base64_encode( $strl_icon_svg ), // phpcs:disable\n\t\t\t)\n\t\t);\n\t}\n\n\t// Set up the layout fields for the blocks area.\n\t$strl_settings_fields = array(\n\t\t// General Settings.\n\t\tarray(\n\t\t\t'key' => 'strl-general-tab',\n\t\t\t'label' => __( 'General', 'strl' ),\n\t\t\t'name' => 'strl-general-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-general',\n\t\t\t'label' => __( 'General', 'strl' ),\n\t\t\t'name' => 'strl-general',\n\t\t\t'type' => 'group',\n\t\t),\n\t\t// Standard Pages.\n\t\tarray(\n\t\t\t'key' => 'strl-standard-pages-tab',\n\t\t\t'label' => __( 'Standard Pages', 'strl' ),\n\t\t\t'name' => 'strl-standard-pages-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-standard-pages',\n\t\t\t'label' => __( 'Standard Pages', 'strl' ),\n\t\t\t'name' => 'strl-standard-pages',\n\t\t\t'type' => 'group',\n\t\t\t'placement' => 'left',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-standard-404',\n\t\t\t\t\t'label' => __( '404', 'strl' ),\n\t\t\t\t\t'instructions' => __( 'This is the page visitors will see when they visit a link that doesn\\'t exist (anymore).', 'strl' ),\n\t\t\t\t\t'name' => 'strl-standard-404',\n\t\t\t\t\t'type' => 'relationship',\n\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t0 => 'page',\n\t\t\t\t\t),\n\t\t\t\t\t'filters' => array(\n\t\t\t\t\t\t0 => 'search',\n\t\t\t\t\t),\n\t\t\t\t\t'max' => 1,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-standard-search',\n\t\t\t\t\t'label' => __( 'Search', 'strl' ),\n\t\t\t\t\t'name' => 'strl-standard-search',\n\t\t\t\t\t'type' => 'relationship',\n\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t0 => 'page',\n\t\t\t\t\t),\n\t\t\t\t\t'filters' => array(\n\t\t\t\t\t\t0 => 'search',\n\t\t\t\t\t),\n\t\t\t\t\t'max' => 1,\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t// Social Media Accounts.\n\t\tarray(\n\t\t\t'key' => 'strl-contact-tab',\n\t\t\t'label' => __( 'Contact Information', 'strl' ),\n\t\t\t'name' => 'strl-contact-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-socials',\n\t\t\t'label' => __( 'Socials', 'strl' ),\n\t\t\t'name' => 'strl-socials',\n\t\t\t'instructions' => __( 'Enter only your username. You can toggle social icons in the Footer settings.', 'strl' ),\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-socials-instagram',\n\t\t\t\t\t'label' => '<i class=\"fab fa-instagram\"></i>' . ' ' . __( 'Instagram', 'strl' ),\n\t\t\t\t\t'name' => 'strl-socials-instagram',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-socials-facebook',\n\t\t\t\t\t'label' => '<i class=\"fab fa-facebook-f\"></i>' . ' ' . __( 'Facebook', 'strl' ),\n\t\t\t\t\t'name' => 'strl-socials-facebook',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-contact-info',\n\t\t\t'label' => __( 'Contact Info', 'strl' ),\n\t\t\t'name' => 'strl-contact-info',\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-contact-phone',\n\t\t\t\t\t'label' => '<i class=\"fas fa-phone\"></i>' . ' ' . __( 'Phone No.', 'strl' ),\n\t\t\t\t\t'name' => 'strl-contact-phone',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-contact-email',\n\t\t\t\t\t'label' => '<i class=\"fas fa-envelope\"></i>' . ' ' . __( 'Email', 'strl' ),\n\t\t\t\t\t'name' => 'strl-contact-email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t\t// Footer Settings.\n\t\tarray(\n\t\t\t'key' => 'strl-footer-tab',\n\t\t\t'label' => __( 'Footer', 'strl' ),\n\t\t\t'name' => 'strl-footer-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-footer-icons',\n\t\t\t'label' => __( 'Footer Icons', 'strl' ),\n\t\t\t'name' => 'strl-footer-icons',\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array (\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-footer-toggle-socials',\n\t\t\t\t\t'label' => __( 'Show Socials', 'strl' ),\n\t\t\t\t\t'name' => 'strl-footer-toggle-socials',\n\t\t\t\t\t'required' => 1,\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'show' => __( 'Yes, show social icons in the footer.', 'strl' ),\n\t\t\t\t\t\t'hide' => __( 'No, don\\'t show social icons in the footer.', 'strl' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t);\n\n\t// Adds ACF blocks to the Edit Page screen.\n\tacf_add_local_field_group(\n\t\tarray(\n\t\t\t'key' => 'strl-settings-area',\n\t\t\t'title' => __( 'STRL Settings', 'strl' ),\n\t\t\t'fields' => $strl_settings_fields,\n\t\t\t'location' => array(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t'operator' => '===',\n\t\t\t\t\t\t'value' => 'strl-general-settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'position' => 'normal',\n\t\t)\n\t);\n}", "function ig_es_add_comments_tab_settings( $tab_options ) {\n\t// If you don't want to hide. do not use following code or set value as 'yes'\n\t/*\n\tif ( ! empty( $tab_options['indicator_option'] ) ) {\n\t\tupdate_option( $tab_options['indicator_option'], 'yes' ); // yes/no\n\t}\n\t*/\n\n\t$info = array(\n\t\t'type' => 'info'\n\t);\n\n\tob_start();\n\t?>\n\t<div class=\"\">\n\t\t<h2><?php _e( 'Sync Comment Users', 'email-subscribers' ) ?></h2>\n\t\t<p><?php _e( 'Quickly add to your mailing list when someone post a comment on your website.', 'email-subscribers' ) ?></p>\n\t\t<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>\n\t\t<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a href=\"https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsell#sync_comment_users\"><?php _e( 'Email Subscribers Starter', 'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Comment user sync and select the list in which you want to add people whenever someone post a\n\t\tcomment.', 'email-subscribers' ) ?></p>\n\t\t<hr>\n\t\t<p class=\"help\"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a href=\"https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsell#sync_comment_users\"><?php _e( 'Email Subscribers Starter', 'email-subscribers' ) ?></a> <?php _e( 'now', 'email-subscribers' ) ?></p>\n\t</div>\n\t<?php\n\n\t$content = ob_get_clean();\n\n\t?>\n\t<a target=\"_blank\" href=\"https://www.icegram.com/quickly-add-people-to-your-mailing-list-whenever-someone-post-a-comment/?utm_source=in_app&utm_medium=es_comment_upsale&utm_campaign=es_upsell#sync_comment_users\">\n\t\t<img src=\" <?php echo ES_PLUGIN_URL . 'lite/admin/images/es-comments.png' ?> \"/>\n\t</a>\n\t<?php\n\tES_Common::prepare_information_box( $info, $content );\n}", "public function add_page_fields()\r\n {\r\n // /**\r\n // * theme_option\r\n // * Option\r\n // */\r\n // register_setting(\r\n // 'theme_option', // Option group\r\n // 'theme_option', // Option name\r\n // array($this, 'sanitize_save') // Sanitize\r\n // );\r\n\r\n // /**\r\n // * theme_section_tab1\r\n // * Section\r\n // * Option > Section\r\n // */\r\n // add_settings_section(\r\n // 'theme_section_tab1', // ID\r\n // 'Tab Settings 1', // Title\r\n // array($this, 'print_section_html'), // Callback\r\n // 'theme_sections' // Page (sections)\r\n // );\r\n\r\n // /**\r\n // * theme_section_tab2\r\n // * Section\r\n // * Option > Section\r\n // */\r\n // add_settings_section(\r\n // 'theme_section_tab2', // ID\r\n // 'Tab Settings 2', // Title\r\n // array($this, 'print_section_html'), // Callback\r\n // 'theme_sections' // Page (sections)\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'id_number', // ID\r\n // 'ID Number', // Title\r\n // array($this, 'id_number_callback'), // Callback\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab1' // Section\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'title',\r\n // 'Title',\r\n // array($this, 'title_callback'),\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab1'\r\n // );\r\n\r\n // /**\r\n // * Field\r\n // * Option > Section > Field\r\n // */\r\n // add_settings_field(\r\n // 'theme_field_slug',\r\n // 'Text',\r\n // array($this, 'text_callback'),\r\n // 'theme_sections', // Page (sections)\r\n // 'theme_section_tab2',\r\n // array(\r\n // 'label_for' => 'theme_field_slug',\r\n // 'class' => 'theme_field_slug',\r\n // 'field_name' => 'theme_field_slug',\r\n // 'option_name' => 'theme_option',\r\n // )\r\n // );\r\n\r\n foreach ($this->conf as $s_key => $section) {\r\n add_settings_section(\r\n $section['name'], // Section ID\r\n $section['label'], // Section Title\r\n // array($this, $section['html']), // Callback (String)\r\n array($this, function($section){\r\n echo $section['html'];\r\n }), // Callback (String)\r\n $section['name'] // Page (sections)\r\n );\r\n foreach ($section['fields'] as $f_key => $field) {\r\n register_setting(\r\n $field['name'], // Option group\r\n $field['name'], // Option name\r\n array($this, $field['option_sanitize']) // Sanitize\r\n );\r\n add_settings_field(\r\n $field['name'], // Field ID\r\n $field['label'], // Field Title\r\n array($this, $field['html'] . '_callback'), // Callback (Type)\r\n $section['name'], // Page (sections)\r\n $section['name'], // Section ID\r\n array(\r\n 'label_for' => $field['name'],\r\n 'class' => $field['name'],\r\n 'field_name' => $field['name'],\r\n 'option_name' => $field['name'],\r\n )\r\n );\r\n }\r\n }\r\n }", "private function settingsTab()\r\n {\r\n $availableTabs = array('general');\r\n $tab = 'general';\r\n if (isset($_GET['tab']) and in_array($_GET['tab'], $availableTabs)) {\r\n $tab = $_GET['tab'];\r\n }\r\n return $tab;\r\n }", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "function add_admin() {\n\t\t\t$this->pagehook = add_options_page(\n\t\t\t\t\t__( \"Subpages as Tabs\" )\n\t\t\t\t\t, __( \"Subpages as Tabs\" )\n\t\t\t\t\t, 'manage_options'\n\t\t\t\t\t, 'subpage_tabs_plugin'\n\t\t\t\t\t, array( $this, 'plugin_options_page' )\n\t\t\t\t);\n\n\t\t\t//register callback to gets call prior your options_page rendering\n\t\t\tadd_action( 'load-' . $this->pagehook, array( &$this, 'add_the_meta_boxes' ) );\n\t\t}", "public function addTab() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])) \n );\n\t}", "function register_plugin_menu(){\r\n add_menu_page( 'Aw Social Tabs', 'Aw Social Tabs', 'manage_options', 'awsocialtabs', array('AwstAdminPages', 'plugin_homepage'), 'dashicons-share', 6 );\r\n add_submenu_page('awsocialtabs', 'Aw Social Tabs | settings', 'Settings', 'manage_options','awst_settings', array('AwstAdminPages', 'awst_settings'));\r\n add_submenu_page('', 'Aw Social Tabs | Likes', 'Likes', 'manage_options','awst_likes', array('AwstAdminPages', 'awst_likes'));\r\n add_submenu_page('', 'Aw Social Tabs | Ratings', 'Ratings', 'manage_options','awst_ratings', array('AwstAdminPages', 'awst_ratings'));\r\n add_submenu_page('', 'Aw Social Tabs | Review', 'Review', 'manage_options','awst_review', array('AwstAdminPages', 'awst_review'));\r\n }", "function activity_tabs_pagesetup($event, $object_type, $object){\n // register filter tabs\n $context = elgg_get_context();\n \n if(elgg_is_logged_in() && ($context == 'activity' || $context == 'activity_tabs')){\n $user = elgg_get_logged_in_user_entity();\n $filter_context = get_input('filter_context', FALSE);\n $collections = get_user_access_collections($user->guid);\n $groups = $user->getGroups('', 0);\n \n // iterate through collections and add tabs as necessary\n foreach($collections as $collection){\n $name = $collection->name;\n \n // ignore group acls, they will be done in the groups section\n if(substr($name, 0, 7) == 'Group: ') {\n continue; \n }\n \n $collectionid = \"collection_\" . $collection->id;\n $enable = elgg_get_plugin_user_setting($collectionid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($collectionid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $collectionid,\n 'text' => $name,\n 'href' => \"activity_tabs/collection/{$collection->id}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $collectionid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n \n // iterate through groups and add tabs as necessary\n foreach($groups as $group){\n $name = $group->name;\n \n $groupid = \"group_\" . $group->guid;\n $enable = elgg_get_plugin_user_setting($groupid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($groupid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $groupid,\n 'text' => $name,\n 'href' => \"activity_tabs/group/{$group->guid}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $groupid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n // register menu item for configuring tabs\n $link = array(\n 'name' => 'configure_activity_tabs',\n 'text' => elgg_echo('activity_tabs:configure'),\n 'href' => 'settings/plugins/' . $user->username,\n );\n \n elgg_register_menu_item('page', $link);\n }\n}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "function rename_tab( $tabs ) \n{\n\t$tabs['additional_information']['title'] = __( 'O Produto' );\n\treturn $tabs;\n}", "public function add_tab( $args ) {\n $defaults = array(\n 'title' => false,\n 'id' => false,\n 'content' => '',\n 'callback' => false,\n 'url' => false\n );\n $args = wp_parse_args( $args, $defaults );\n\n $args['id'] = sanitize_html_class( $args['id'] );\n\n // Ensure we have an ID and title.\n if ( ! $args['id'] || ! $args['title'] )\n return;\n\n // Allows for overriding an existing tab with that ID.\n $this->_tabs[ $args['id'] ] = $args;\n\n return $this;\n }", "public function add_location_tab( $tabs ) {\n\n\t\t$tabs['location'] = array(\n\t\t\t'title' => __( 'Location', 'blox' ),\n\t\t\t'scope' => 'global' // all, local, or global\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function media_upload_tabs()\n {\n }", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "function ajb_options_add_page() {\n\tadd_theme_page( __( 'Homepage Options', 'ajb' ), __( 'Theme Options', 'ajb' ), ajb_get_options_page_cap(), 'ajb_options', 'ajb_options_do_page' );\n}", "public function add_settings_page() {\n add_options_page( \n \"WP BXSlider Settings\", // $page_title\n \"WP BXSlider\", // $menu_title\n \"manage_options\", // $capability (ie: permissions)\n $this->name, // $menu_slug\n array($this, 'render_admin_page') // callback to render view\n );\n }", "function webplayer_admin_tabs($current = 'webplayer') {\r\n\t$tabs = array('webplayer' => 'HD Webplayer', 'videos' => 'Videos', 'playlist' => 'Playlist', 'license' => 'License', 'documentation' => 'Documentation');\r\n\t$links = array();\r\n\t\r\n\tforeach( $tabs as $tab => $name ) {\r\n\t\tif( $tab == $current) {\r\n\t\t\t$links[] = \"<a class='nav-tab nav-tab-active' href='?page=$tab'>$name</a>\";\r\n\t\t} else {\r\n\t\t\t$links[] = \"<a class='nav-tab' href='?page=$tab'>$name</a>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\techo '<div id=\"icon-upload\" class=\"icon32\"></div>';\r\n\techo \"<h2 class='nav-tab-wrapper'>\";\r\n\tforeach( $links as $link ) {\r\n\t\techo $link;\r\n\t}\r\n\techo \"</h2>\";\r\n\t\r\n}", "function jb_register_settings() {\n\tregister_setting( JB_SETTINGS_FIELD, JB_SETTINGS_FIELD );\n\tadd_option( JB_SETTINGS_FIELD , jb_option_defaults() );\n\tadd_settings_section('jb_main','Main Settings', 'jb_main_section_text', JB_SETTINGS_FIELD );\n\tadd_settings_field('jb_featured_cat', 'Featured Category', 'jb_featured_cat_slug_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_featured_content_limit', 'Homepage Featured Post Word Count Limit', 'jb_featured_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n\tadd_settings_field('jb_post_content_limit', 'Post Word Count Limit', 'jb_post_content_limit_setting', JB_SETTINGS_FIELD , 'jb_main');\n}", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "function coolRahulSoni_custom_settings_add_menu() {\n add_menu_page( 'CoolRahulSoni Custom Settings', 'CoolRahulSoni Custom Settings', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99 );\n}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "public function add_settings_page() {\n\t\tadd_submenu_page(\n\t\t\t'case27/tools.php',\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t'manage_options',\n\t\t\t'theme-mapservice-settings',\n\t\t\tfunction() {\n\t\t\t\t$config = $this->get_config();\n\t\t\t\trequire locate_template( 'templates/admin/theme-options/map-services.php' );\n\t\t\t}\n\t\t);\n\t}", "function hankart_add_manual_tab( $tabs ) {\n\t$tabs['pdf_manual'] = array(\n\t\t'title' \t=> __( 'Manual', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_manual_tab_content'\n\t);\n\treturn $tabs;\n}", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "function hankart_add_tech_spec( $tabs ) {\n\t$tabs['tech_spec'] = array(\n\t\t'title' \t=> __( 'Technical specifications', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_tech_spec_content'\n\t);\n\treturn $tabs;\n}", "function media_upload_tabs($tabs) {\n\t\tif ( $this->is_sp_widget_context() ) {\n\t\t\tunset($tabs['type_url']);\n\t\t}\n\t\treturn $tabs;\n\t}", "function plugin_admin_add_page() {\n\t\tadd_options_page('Tupuk Sample Plugin Settings', 'Tupuk Sample Plugin', 'manage_options', 'tupuk_sample_plugin', array($this, 'plugin_options_page'));\n\t\tadd_action( 'admin_init', array($this, 'register_mysettings') ); //call register settings function\n\t}", "function pu_theme_menu() {\n add_theme_page('Theme Option', 'Theme Options', 'manage_options', 'pu_theme_options.php', 'pu_theme_page');\n}", "function pu_theme_menu()\n{\n add_theme_page('Theme Option', 'Theme Options', 'manage_options', 'pu_theme_options.php', 'pu_theme_page');\n}", "function wpclients_settings() {\r\n if ( isset( $_GET['tab'] ) && 'addons' == $_GET['tab'] )\r\n include 'forms/lite_form.php';\r\n elseif ( isset( $_GET['tab'] ) && 'pages' == $_GET['tab'] )\r\n include 'forms/settings_pages.php';\r\n elseif ( isset( $_GET['tab'] ) && 'capabilities' == $_GET['tab'] )\r\n include 'forms/lite_form.php';\r\n else\r\n include 'forms/settings.php';\r\n }", "function gssettings_theme_options() {\n global $_gssettings_settings_pagehook;\n $_gssettings_settings_pagehook = add_submenu_page( 'genesis', 'Sandbox Settings', 'Sandbox Settings', 'edit_theme_options', GSSETTINGS_SETTINGS_FIELD, 'gssettings_theme_options_page' );\n \n //add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_styles' );\n add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_scripts' );\n add_action( 'load-'.$_gssettings_settings_pagehook, 'gssettings_settings_boxes' );\n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "private function include_tabs() {\n\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tabs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/general.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/backup.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/ssl.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/cache.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/sftp.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/clone-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/copy-to-existing-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-sync.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/crons.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/php-options.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/change-domain.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/misc.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tweaks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tools.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/theme-and-plugin-updates.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/phpmyadmin.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/6g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/7g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/statistics.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/logs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/redirect-rules.php';\n\n\t\tif ( defined( 'WPCD_SHOW_SITE_USERS_TAB' ) && WPCD_SHOW_SITE_USERS_TAB ) {\n\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-system-users.php';\n\t\t}\n\n\t\t/**\n\t\t * Need to add new tabs or add data to existing tabs from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_app_tabs' );\n\n\t}", "function advsettings($tab = 0) {\n $this->auth(WL_ADM_LEVEL);\n $data['title'] = 'advanced settings';\n $data['tab'] = $tab;\n $wl_id = $this->session->userdata('wl_id');\n $data['wl'] = $this->m_white_label->getById($wl_id);\n $this->load->view('include/v_header', $data);\n $this->load->view('admin/adv_settings/v_main');\n $this->load->view('include/v_footer');\n }", "function settings_gui(){\n\t$tabs = new tabs('system_settings');\n\t$tabs->add('capabilities','Brukerroller');\n\t\n\t$tabs->draw();\n\tglobal $hd_active_tab;\n\tswitch($hd_active_tab) {\n\t\tcase 'capabilities':\n\t\t\trequire_once('gui.capabilites.settings.php');\n\t\t\tgui_capas();\n\t\t\tbreak;\n\t}\n}" ]
[ "0.7991635", "0.74204534", "0.73688424", "0.73630756", "0.7267792", "0.7226878", "0.70674956", "0.70353335", "0.70174813", "0.698998", "0.681375", "0.6784946", "0.6768893", "0.6741165", "0.67408603", "0.67306745", "0.6683071", "0.667896", "0.6609416", "0.6606206", "0.6578303", "0.65669024", "0.65663546", "0.6553906", "0.64628595", "0.6459215", "0.6441049", "0.6425782", "0.6424375", "0.64202684", "0.641056", "0.6386813", "0.6380079", "0.63241225", "0.62123686", "0.62099814", "0.61827415", "0.61684424", "0.6166393", "0.6166075", "0.6151637", "0.61402833", "0.6136199", "0.6119114", "0.6093185", "0.60874844", "0.6081002", "0.6072855", "0.6072083", "0.607003", "0.60277504", "0.6019483", "0.6016365", "0.60076874", "0.6002371", "0.59989417", "0.5994271", "0.59929246", "0.5991252", "0.59905505", "0.5990009", "0.59792596", "0.59756577", "0.597086", "0.59626245", "0.59554446", "0.5948007", "0.5934272", "0.5931319", "0.5931018", "0.592594", "0.59230834", "0.5920929", "0.59201", "0.59191144", "0.5918369", "0.5917853", "0.5913224", "0.5913224", "0.5906462", "0.59057575", "0.5904545", "0.5887163", "0.5883007", "0.5881855", "0.5864994", "0.5861586", "0.58593947", "0.5855519", "0.58476883", "0.58454293", "0.5837158", "0.58309877", "0.5826843", "0.5824794", "0.5821863", "0.5821053", "0.58198947", "0.58177686", "0.5812038" ]
0.6981702
10
Add a new metaboxes to the settings page See the Metabox.IO website for documentation on the structure of the metabox settings array. Filter hook: wpcd_settings_metaboxes
public function settings_metaboxes( $metaboxes ) { $metaboxes[] = array( 'id' => 'vpn', 'title' => __( 'All VPN Settings', 'wpcd' ), 'settings_pages' => 'wpcd_settings', 'tab' => 'app-vpn', // this is the top level tab on the setttings screen, not to be confused with the tabs inside a metabox as we're defining below. // List of tabs in the metabox, in one of the following formats. // 1) key => label. // 2) key => array( 'label' => Tab label, 'icon' => Tab icon ). 'tabs' => $this->metabox_tabs(), 'tab_style' => 'left', 'tab_wrapper' => true, 'fields' => $this->all_fields(), ); return $metaboxes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_metaboxes(){}", "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "public function add_meta_boxes() {\r\n\t\tadd_meta_box( 'zakra-page-setting', esc_html__( 'Page Settings', 'zakra' ), 'Zakra_Meta_Box_Page_Settings::render', array(\r\n\t\t\t'post',\r\n\t\t\t'page',\r\n\t\t) );\r\n\t}", "public function register_metaboxes(){\n\t\tif ($this->options('use_metabox')){\n\t\t\t$metabox = $this->metabox();\n\t\t\tadd_meta_box(\n\t\t\t\t$metabox['id'],\n\t\t\t\t$metabox['title'],\n\t\t\t\t'show_meta_boxes',\n\t\t\t\t$metabox['page'],\n\t\t\t\t$metabox['context'],\n\t\t\t\t$metabox['priority']\n\t\t\t);\n\t\t}\n\t}", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "function register_metaboxes() {\n\n\t\t$this->metaboxes = array(\n\t\t\t'example-metabox' => array(\n\t\t\t\t'title' => 'Example Post Type Metabox',\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'description',\n\t\t\t\t\t'date'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tparent::register_metaboxes();\n\n\t}", "public function add_meta_boxes()\n \t{\n\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('WP_Custom_Login_Profile_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray(&$this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\n\n \t}", "function mustsee_register_theme_settings_metaboxes( $_genesis_theme_settings_pagehook ) {\n\tadd_meta_box('mustsee-social-settings', 'Social Links and Contact Info', 'mustsee_social_settings_box', $_genesis_theme_settings_pagehook, 'main', 'high');\n}", "public function add_meta_boxes()\n \t{\n \t\t// Add this metabox to every selected post\n \t\tadd_meta_box( \n \t\t\tsprintf('wp_plugin_template_%s_section', self::POST_TYPE),\n \t\t\tsprintf('%s Information', ucwords(str_replace(\"_\", \" \", self::POST_TYPE))),\n \t\t\tarray($this, 'add_inner_meta_boxes'),\n \t\t\tself::POST_TYPE\n \t );\t\t\t\t\t\n \t}", "function pafd_action_add_metaboxes() {\n\n\tglobal $pafd_textdomain;\n\n\t// Add the file metabox\n\tadd_meta_box(\n\t\t'customdiv-pafd-file'\n\t\t, __( 'File', $pafd_textdomain )\n\t\t, 'pafd_metabox_file_cb'\n\t\t, 'pa_file'\n\t\t, 'normal'\n\t\t, 'core'\n\t);\n\n\t// Add the file status metabox\n\tadd_meta_box(\n\t\t'customdiv-pafd-status'\n\t\t, __( 'File Status', $pafd_textdomain )\n\t\t, 'pafd_metabox_status_cb'\n\t\t, 'pa_file'\n\t\t, 'side'\n\t\t, 'core'\n\t);\n}", "public function bulk_settings_metabox() {\r\n\t\t$fields = $this->settings->get_bulk_fields();\r\n\r\n\t\t// Remove backups setting, as it's added separately.\r\n\t\t$key = array_search( 'backup', $fields, true );\r\n\t\tif ( false !== $key ) {\r\n\t\t\tunset( $fields[ $key ] );\r\n\t\t}\r\n\r\n\t\t$this->view(\r\n\t\t\t'bulk-settings/meta-box',\r\n\t\t\tarray(\r\n\t\t\t\t'basic_features' => Settings::$basic_features,\r\n\t\t\t\t'cdn_enabled' => $this->settings->get( 'cdn' ),\r\n\t\t\t\t'grouped_settings' => $fields,\r\n\t\t\t\t'settings' => $this->settings->get(),\r\n\t\t\t\t'settings_data' => WP_Smush::get_instance()->core()->settings,\r\n\t\t\t)\r\n\t\t);\r\n\t}", "function admin_metaboxes() {\r\n\r\n// \t\t\t/** Check if wpeo_log_select_post_type exist */\r\n// \t\t\tif( !empty(\t$this->wpeologs_settings['post_type'] ) ) {\r\n// \t\t\t\tforeach ( $this->wpeologs_settings['post_type'] as $post_type ) {\r\n\r\n// \t\t\t\t\t//add_meta_box( 'wpeologs_metabox_' . $post_type, __( 'Logs', 'wpeologs-i18n'), array( &$this, 'associated_post_type_metabox' ), $post_type, 'normal' );\r\n// \t\t\t\t}\r\n// \t\t\t}\r\n\t\t}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function thememove_metaboxes( array $meta_boxes ) {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = 'thememove_';\n\n\t/**\n\t * Sample metabox to demonstrate each field type included\n\t */\n\t$meta_boxes['page_metabox'] = array(\n\t\t'id' => 'page_metabox',\n\t\t'title' => __( 'Page Settings', 'thememove' ),\n\t\t'object_types' => array( 'page' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t// 'cmb_styles' => false, // false to disable the CMB stylesheet\n\t\t// 'closed' => true, // true to keep the metabox closed by default\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Bread Crumb', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for breadcrumb', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'bread_crumb_enable',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'enable' => __( 'Enable', 'thememove' ),\n\t\t\t\t\t'disable' => __( 'Disable', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Uncover Footer', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for uncover footer option', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'uncover_enable',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'enable' => __( 'Enable', 'thememove' ),\n\t\t\t\t\t'disable' => __( 'Disable', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Top Area', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for header top area', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'header_top',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'enable' => __( 'Enable', 'thememove' ),\n\t\t\t\t\t'disable' => __( 'Disable', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Sticky Header', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for sticky header', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'sticky_header',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'enable' => __( 'Enable', 'thememove' ),\n\t\t\t\t\t'disable' => __( 'Disable', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Custom Logo', 'thememove' ),\n\t\t\t\t'desc' => __( 'Upload an image or enter a URL for logo', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'custom_logo',\n\t\t\t\t'type' => 'file',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Header Presets', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for header presets', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'header_preset',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'header-preset-01' => __( 'Preset 01', 'thememove' ),\n\t\t\t\t\t'header-preset-02' => __( 'Preset 02', 'thememove' ),\n\t\t\t\t\t'header-preset-03' => __( 'Preset 03', 'thememove' ),\n\t\t\t\t\t'header-preset-04' => __( 'Preset 04', 'thememove' ),\n\t\t\t\t\t'header-preset-05' => __( 'Preset 05', 'thememove' ),\n\t\t\t\t\t'header-preset-06' => __( 'Preset 06', 'thememove' ),\n\t\t\t\t\t'header-preset-07' => __( 'Preset 07', 'thememove' ),\n\t\t\t\t\t'header-preset-08' => __( 'Preset 08', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Color Scheme', 'thememove' ),\n\t\t\t\t'desc' => __( 'Custom settings for color scheme', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'color_scheme',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'scheme1' => __( 'Color Scheme for Header Preset 01', 'thememove' ),\n\t\t\t\t\t'scheme2' => __( 'Color Scheme for Header Preset 02', 'thememove' ),\n\t\t\t\t\t'scheme3' => __( 'Color Scheme for Header Preset 03', 'thememove' ),\n\t\t\t\t\t'scheme4' => __( 'Color Scheme for Header Preset 04', 'thememove' ),\n\t\t\t\t\t'scheme5' => __( 'Color Scheme for Header Preset 05', 'thememove' ),\n\t\t\t\t\t'scheme6' => __( 'Color Scheme for Header Preset 06', 'thememove' ),\n\t\t\t\t\t'scheme7' => __( 'Color Scheme for Header Preset 07', 'thememove' ),\n\t\t\t\t\t'scheme8' => __( 'Color Scheme for Home V2 Default', 'thememove' ),\n\t\t\t\t\t'scheme9' => __( 'Color Scheme for Home V2 Black', 'thememove' ),\n\t\t\t\t\t'scheme10' => __( 'Color Scheme for Home V2 White', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Page Layout', 'thememove' ),\n\t\t\t\t'desc' => __( 'Choose a layout you want', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'page_layout_private',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'default' => __( 'Default', 'thememove' ),\n\t\t\t\t\t'full-width' => __( 'Full width', 'thememove' ),\n\t\t\t\t\t'content-sidebar' => __( 'Content-Sidebar', 'thememove' ),\n\t\t\t\t\t'sidebar-content' => __( 'Sidebar-Content', 'thememove' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Disable Title',\n\t\t\t\t'desc' => 'Check this box to disable the title of the page',\n\t\t\t\t'id' => $prefix . 'disable_title',\n\t\t\t\t'type' => 'checkbox'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Title Background', 'thememove' ),\n\t\t\t\t'desc' => __( 'Upload an image or enter a URL for heading title', 'thememove' ),\n\t\t\t\t'id' => $prefix . 'heading_image',\n\t\t\t\t'type' => 'file',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Alternative Title',\n\t\t\t\t'desc' => 'Enter your alternative title here',\n\t\t\t\t'id' => $prefix . 'alt_title',\n\t\t\t\t'type' => 'textarea_small'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Disable Parallax',\n\t\t\t\t'desc' => 'Check this box to disable parallax effect for heading title',\n\t\t\t\t'id' => $prefix . 'disable_parallax',\n\t\t\t\t'type' => 'checkbox'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Contact Adress',\n\t\t\t\t'desc' => 'Enter your address here and it will display on map in contact page',\n\t\t\t\t'id' => $prefix . 'contact_address',\n\t\t\t\t'type' => 'text'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'Custom Class',\n\t\t\t\t'desc' => 'Enter custom class for this page',\n\t\t\t\t'id' => $prefix . 'custom_class',\n\t\t\t\t'type' => 'text'\n\t\t\t),\n\t\t),\n\t);\n\n\treturn $meta_boxes;\n}", "public function apb_add_meta_boxes() {\r\n\t}", "function add_metaboxes() \n {\n // add a metabox to the Event using the callback add_time_date_metabox \n add_meta_box( \n \"bbquotations-source\",\n __(\"Quote source url\", $this->localization_domain),\n array(&$this, \"add_source_metabox\"), $this->custom_post_type_name, \"normal\", \"high\"\n );\n\n add_meta_box( \n \"bbquotations-cheatsheet\",\n __(\"Quotes usage cheatsheet\", $this->localization_domain),\n array(&$this, \"add_cheatsheet_metabox\"), $this->custom_post_type_name, \"side\", \"high\"\n );\n }", "function siteorigin_panels_metaboxes() {\n\tforeach( siteorigin_panels_setting( 'post-types' ) as $type ){\n\t\tadd_meta_box( 'so-panels-panels', __( 'Page Builder', 'positive-panels' ), 'siteorigin_panels_metabox_render', $type, 'advanced', 'high' );\n\t}\n}", "public function add_meta_boxes() {\n\t\t// Create the Slide Meta Boxes\n\t\tadd_meta_box( 'justart-slider-slide-settings-group', 'Slides', array( $this, 'create_slide_settings_meta_box' ), 'justart-slider', 'normal', 'default' );\n\t\tadd_filter( 'postbox_classes_justart-slider-slide-settings-group', array( $this, 'add_metabox_classes' ) );\n\t\t\n\t\t// Create the Shortcode Meta Box\n\t\tadd_meta_box( 'justart-slider-shortcode-group', 'Shortcode', array( $this, 'create_shortcode_meta_box' ), 'justart-slider', 'side', 'high' );\n\t\t\n\t\t// Create the Global Settings Meta Box\n\t\tadd_meta_box( 'justart-slider-global-settings-group', 'Global settings', array( $this, 'create_global_settings_meta_box' ), 'justart-slider', 'side', 'default' );\n\t}", "public function add_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t$this->plugin_slug . '-post-metabox',\n\t\t\tesc_html__( 'Review Settings', $this->plugin_slug ),\n\t\t\tarray( $this, 'review_settings_view' ),\n\t\t\t'post',\n\t\t\t'normal',\n\t\t\t'core'\n \t \t);\n\t}", "function add_options_page_metabox() {\r\n\r\n\t\t$cmb = new_cmb2_box( array(\r\n\t\t\t'id' => $this->metabox_id,\r\n\t\t\t'hookup' => false,\r\n\t\t\t'cmb_styles' => false,\r\n\t\t\t'show_on' => array(\r\n\t\t\t\t// These are important, don't remove\r\n\t\t\t\t'key' => 'options-page',\r\n\t\t\t\t'value' => array( $this->key)\r\n\t\t\t),\r\n\t\t) );\r\n\r\n\t\t/* metaboxes are added here */\r\n\t\tif($this->metaboxes) {\r\n\r\n\t\t\tforeach ($this->metaboxes as $key => $input) {\r\n\t\t\t\t/* group metaboxes, added support for multiple repeating groups in same array of metaboxes */\r\n\t\t\t\tif($key === 'group' || $key === 'group[0]' || $key === 'group[1]' || $key === 'group[2]' || $key === 'group[3]' || $key === 'group[4]' || $key === 'group[5]' || $key === 'group[6]' || $key === 'group[7]') {\r\n\t\t\t\t\t/* loop through each group */\r\n\t\t\t\t\tforeach ($this->metaboxes[$key] as $id => $group) {\r\n\t\t\t\t\t\t/* loop through each group metaboxes */\r\n\t\t\t\t\t\t$setup = $cmb->add_field($group['setup']);\r\n\t\t\t\t\t\tforeach ($group as $g => $meta) {\r\n\t\t\t\t\t\t\tif($g !== 'setup')\r\n\t\t\t\t\t\t\t\t$cmb->add_group_field( $setup, $meta);\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\telse {\r\n\t\t\t\t\t/* this is not a repeating group so its just a normal metabox */\r\n\t\t\t\t\t$cmb->add_field($input);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function add_meta_boxes()\n {\n\n $this->_add_bitly_meta_box();\n\n }", "function add_meta_boxes()\n {\n }", "public function setMetaboxes() {\n $metaboxTemp = new Metabox();\n\n $args = array(\n // ## Certification ##\n array(\n 'id' => self::MTB_CERT,\n 'title' => 'Certification Type',\n 'callback' => array($metaboxTemp, 'certification'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n // ## Target ##\n array(\n 'id' => self::MTB_TARGET,\n 'title' => 'Target Type',\n 'callback' => array($metaboxTemp, 'target'),\n 'screen' => self::POST_TYPE_BADGES,\n 'context' => 'side',\n 'priority' => 'high',\n ),\n );\n\n $this->settings->loadMetaBoxes($args);\n }", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Word linkages',\n\t\t\t'Word linkages',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'linkages_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'Answers',\n\t\t\t'Answers',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'answers_meta_box',\n\t\t\t),\n\t\t\t'questions',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "public function add_meta_boxes() {\n\t\tforeach ( $this->screens as $screen ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'event-settings',\n\t\t\t\t__( 'Event Settings', 'lps_wp' ),\n\t\t\t\tarray( $this, 'add_meta_box_callback' ),\n\t\t\t\t$screen,\n\t\t\t\t'advanced',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "public function addMultipleMetaBoxes()\n {\n\n $options = get_option( 'niloy_plugin_cf' ) ?: array();\n\n add_meta_box( 'field_options', 'Field Options', array( $this, 'renderMultipleMetaBoxes'), $options['related_posts'], 'normal', 'default' );\n\n }", "public function addMetaboxes() {}", "public function add_metaboxes() {\n\t\tadd_meta_box(\n\t\t\t'codes',\n\t\t\t__( 'Codes' ),\n\t\t\tarray( $this, 'render_codes_metabox' )\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'edit-codes',\n\t\t\t__( 'Edit codes' ),\n\t\t\tarray( $this, 'render_edit_metabox' )\n\t\t);\n\t}", "public static function createMetaBox() {\r\n add_meta_box( \r\n \\WPDisablePage\\Setup::PLUGIN_ID, // Metabox ID\r\n \\WPDisablePage\\Setup::PLUGIN_NAME, // Metabox Name\r\n array( __CLASS__, 'createView' ), // Metabox Callback\r\n apply_filters( strtolower( \\WPDisablePage\\Setup::PLUGIN_ID ) . '__post_types', self::POST_TYPES ), // Metabox Post Types\r\n self::POSITION, // Metabox Position\r\n self::PRIORITY // Metabox Priority\r\n );\r\n }", "function carrousel_metaboxes(){\n add_meta_box(\"MonCarrousel\", \"lien\", \"carrousel_metabox\");\n}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "function snax_mashshare_add_post_types_to_metaboxes( $metaboxes ) {\n\t$metaboxes[0]['pages'][] = 'snax_quiz';\n\treturn $metaboxes;\n}", "function add_metabox() {\n\tadd_meta_box(\n\t\t'external-connection-groups',\n\t\t__( 'External Connection Groups', 'distributor' ),\n\t\t__NAMESPACE__ . '\\render_metabox',\n\t\t\\Distributor\\Waves\\get_distributable_custom_post_types(),\n\t\t'side',\n\t\t'high'\n\t);\n\n}", "Function Wp_meta_box_store(){\n\n\t$mult_posts = array( 'post', 'page' );\n\n\tforeach ($mult_posts as $mult_post) {\n\t\tadd_meta_box(\n\t\t\t'meta_box_id', \t\t\t\t\t# metabox id\n\t\t\t__('Author Bio', 'textdomain'),\t# Title \n\t\t\t'wp_meta_box_call_back_func_store', \t# Callback Function \n\t\t\t$mult_post, \t\t\t\t\t# Post Type\n\t\t\t'normal'\t\t\t\t\t\t# textcontent\n\t\t);\n\t}\n\t\n}", "public static function add_meta_box() {\n add_meta_box( \"CBMTheme\", \"CBM Theme Meta Box\", \"CBMAdmin::posts_page\" );\n }", "function wck_add_metabox() {\r\n\t\t\r\n\t\tglobal $pb_wck_pages_hooknames;\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' ){\r\n\t\t\tif( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){\r\n\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $this->args['post_type'], $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t/* add class to meta box */\r\n\t\t\t\tadd_filter( \"postbox_classes_\".$this->args['post_type'].\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t}\r\n\t\t\telse{\t\t\t\t\r\n\t\t\t\tif( !empty( $_GET['post'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_GET['post'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse if( !empty( $_POST['post_ID'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_POST['post_ID'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse \r\n\t\t\t\t\t$post_id = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tif( $this->args['post_id'] != '' && $this->args['page_template'] != '' ){\r\n\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] == $post_id && $template_file == $this->args['page_template'] )\r\n\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\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( $this->args['post_id'] != '' ){\r\n\t\t\t\t\t\tif( $this->args['post_id'] == $post_id ){\r\n\t\t\t\t\t\t\t$post_type = get_post_type( $post_id );\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $post_type, $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_\".$post_type.\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\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\tif( $this->args['page_template'] != '' ){\r\n\t\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\r\n\t\t\t\t\t\tif ( $template_file == $this->args['page_template'] ){\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\telse if( $this->args['context'] == 'option' ){\r\n if( !empty( $pb_wck_pages_hooknames[$this->args['post_type']] ) ) {\r\n add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array(&$this, 'wck_content'), $pb_wck_pages_hooknames[$this->args['post_type']], $this->args['mb_context'], 'high', array('meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']));\r\n /* add class to meta box */\r\n add_filter(\"postbox_classes_\" . $pb_wck_pages_hooknames[$this->args['post_type']] . \"_\" . $this->args['metabox_id'], array(&$this, 'wck_add_metabox_classes'));\r\n }\r\n\t\t}\r\n\t}", "public function add_metabox() {\r\n\t\tadd_meta_box(\r\n\t\t\t'stats', // ID\r\n\t\t\t'Stats', // Title\r\n\t\t\tarray(\r\n\t\t\t\t$this,\r\n\t\t\t\t'meta_box', // Callback to method to display HTML\r\n\t\t\t),\r\n\t\t\t'spam-stats', // Post type\r\n\t\t\t'normal', // Context, choose between 'normal', 'advanced', or 'side'\r\n\t\t\t'core' // Position, choose between 'high', 'core', 'default' or 'low'\r\n\t\t);\r\n\t}", "public function admin_init()\n \t{\t\t\t\n \t\t// Add metaboxes\n \t\t//add_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n \t}", "public function add_admin_meta_boxes() {\n\t\tadd_meta_box(\n\t\t\t'content_directory_options',\n\t\t\t__( 'Change Content Directory', 'it-l10n-ithemes-security-pro' ),\n\t\t\tarray( $this, 'metabox_advanced_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_advanced',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\t}", "public static function create_meta_box() {\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( $content_types_array as $content_type ) {\n\t\t\tadd_meta_box( 'custom-content-type-mgr-custom-fields'\n\t\t\t\t, __('Custom Fields', CCTM::txtdomain )\n\t\t\t\t, 'StandardizedCustomFields::print_custom_fields'\n\t\t\t\t, $content_type\n\t\t\t\t, 'normal'\n\t\t\t\t, 'high'\n\t\t\t\t, $content_type \n\t\t\t);\n\t\t}\n\t}", "function axiom_init_pagebuilder_meta_box(){\n // add custom sidebar metabox to following types\n $types = array('page', 'axi_product', 'portfolio', 'service', 'staff');\n \n foreach ($types as $key => $value) {\n add_meta_box(\"axiom_pagebuilder_metabox\", \n __(\"Smart Page Builder\", 'default'), \n \"axiom_display_pagebuilder_meta\", \n $value, \n \"normal\", \n \"high\");\n }\n \n // Save custom sidebar meta\n add_action('save_post', 'axiom_save_pagebuilder_data');\n \n}", "private function add_meta_boxes() {\n\t\t$post_types = $this->post->get_types();\n\n\t\tforeach ( $post_types as $post_type => $value ) {\n\t\t\tadd_meta_box( 'subway_comment_metabox',\n\t\t\t\tesc_html__( 'Memberships Discussion', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->discussion( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t\tadd_meta_box( 'subway_visibility_metabox',\n\t\t\t\tesc_html__( 'Memberships Access', 'subway' ),\n\t\t\t\tfunction ( $post ) {\n\t\t\t\t\t$this->visibility( $post );\n\t\t\t\t},\n\t\t\t\t$post_type, 'side', 'high'\n\t\t\t);\n\t\t}\n\n\t}", "function rng_METANAME_metabox_init() {\n}", "final public function add_meta_boxes()\n {\n foreach ((array)$this->GetHooks() as $hook) :\n if (!$hook['edit']) {\n continue;\n }\n foreach ((array)$hook['permalink'] as $post_type) :\n remove_meta_box('tagsdiv-' . $this->Archive, $post_type, 'side');\n remove_meta_box($this->Archive . 'div', $post_type, 'side');\n endforeach;\n endforeach;\n }", "function tower_register_meta_boxes() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n $meta = $custom_type['meta'];\n add_meta_box(\n $meta['handle'],\n $meta['title'],\n $meta['callback'],\n $key\n );\n }\n}", "function ppes_admin_init(){\r\n\tadd_meta_box(\"et_post_meta\", \"ET Settings\", \"et_post_meta\", \"auctions\", \"normal\", \"high\");\r\n}", "function init_metabox() {\n\tadd_action( 'add_meta_boxes', __NAMESPACE__ . '\\add_metabox' );\n\tadd_action( 'save_post', __NAMESPACE__ . '\\save_metabox', 10, 2 );\n\n}", "public function add_admin_meta_boxes() {\n\n\t\t$id = 'away_mode_options';\n\t\t$title = __( 'Away Mode', 'it-l10n-ithemes-security-pro' );\n\n\t\tadd_meta_box(\n\t\t\t$id,\n\t\t\t$title,\n\t\t\tarray( $this, 'metabox_away_mode_settings' ),\n\t\t\t'security_page_toplevel_page_itsec_settings',\n\t\t\t'advanced',\n\t\t\t'core'\n\t\t);\n\n\t\t$this->core->add_toc_item(\n\t\t array(\n\t\t\t 'id' => $id,\n\t\t\t 'title' => $title,\n\t\t )\n\t\t);\n\n\t}", "public function registerMetaBoxes()\n\t {\n\t \t$dataMetas = self::getDataMetas();\n\n\t \tif ( !empty($dataMetas) ) {\n\t \t\tforeach ($dataMetas as $key => $meta) {\n\t \t\t\t/* CHECK IF HAS PAGES */\n\t \t\t\tif ( isset($meta[\"_pages\"]) && !empty($meta[\"_pages\"][0]) ) {\n\t \t\t\t\tself::createMetasPages($meta);\n\t \t\t\t}\n\n\t \t\t\t/* POSTS TYPES REGISTER METAS */\n\t \t\t\tif ( isset($meta[\"_posts_types\"]) && !empty($meta[\"_posts_types\"][0]) ) {\n\t \t\t\t\tself::createMetasPostTypes($meta);\n\t \t\t\t}\n\n\t \t\t\t/* CHECK IF ALL POSTS IS true */\n\t \t\t\tif ( isset($meta[\"_all_posts\"]) && $meta['_all_posts'] == 'yes' ) {\n\t \t\t\t\tself::createMetasPosts($meta);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t }", "function cnew_custom_metabox_add() {\r\n add_meta_box(\r\n 'cnew_custom_metabox_workshop', \r\n __( 'Informações da Oficina', 'cnew' ), \r\n 'cnew_workshop_custom_metabox_callback', \r\n 'cnew_workshop', \r\n 'normal',\r\n 'high'\r\n );\r\n\r\n add_meta_box(\r\n 'cnew_custom_metabox_registration', \r\n __( 'Formulário de Inscrição', 'cnew' ), \r\n 'cnew_registration_custom_metabox_callback', \r\n 'cnew_registration', \r\n 'normal',\r\n 'high'\r\n );\r\n }", "public function add_meta_boxes() {\n\t\tforeach ( $this->screens as $screen ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'video-settings',\n\t\t\t\t__( 'Video Settings', 'lpw_wp' ),\n\t\t\t\tarray( $this, 'add_meta_box_callback' ),\n\t\t\t\t$screen,\n\t\t\t\t'advanced',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "public function add_options_page_metabox()\n {\n // hook in our save notices\n add_action(\"cmb2_save_options-page_fields_{$this->metabox_id}\", array($this, 'settings_notices'), 10, 2);\n $cmb = new_cmb2_box(array(\n 'id' => $this->metabox_id,\n 'hookup' => false,\n 'cmb_styles' => false,\n 'show_on' => array(\n // These are important, don't remove\n 'key' => 'options-page',\n 'value' => array($this->key),\n ),\n ));\n // Set our CMB2 fields\n // $cmb->add_field(array(\n // 'name' => __('營業時間', 'domo'),\n // 'id' => $this->metabox_id . 'working',\n // 'type' => 'textarea',\n // ));\n $cmb->add_field(array(\n 'name' => __('LOGO', 'domo'),\n 'id' => $this->metabox_id . 'logo',\n 'type' => 'file',\n ));\n $cmb->add_field(array(\n 'name' => __('LOGO深色畫面用', 'domo'),\n 'id' => $this->metabox_id . 'logo_dark',\n 'type' => 'file',\n\n ));\n $cmb->add_field(array(\n 'name' => __('LOGO淺色畫面用', 'domo'),\n 'id' => $this->metabox_id . 'logo_light',\n 'type' => 'textarea',\n 'type' => 'file',\n ));\n // $cmb->add_field(array(\n // 'name' => __('預設Banner', 'domo'),\n // 'desc' => __('Tag、作者、搜尋結果...使用', 'domo'),\n // 'id' => $this->metabox_id . 'banner',\n // 'type' => 'file',\n // ));\n // $cmb->add_field(array(\n // 'name' => __('竹職人刊登網址', 'domo'),\n // // 'desc' => __('Tag、作者、搜尋結果...使用', 'domo'),\n // 'id' => $this->metabox_id . 'contact_link',\n // 'type' => 'text',\n // ));\n $cmb->add_field(array(\n 'name' => __('Company name', 'domo'),\n 'id' => $this->metabox_id . 'name',\n 'type' => 'text',\n ));\n $cmb->add_field(array(\n 'name' => __('TEL', 'domo'),\n 'id' => $this->metabox_id . 'tel',\n 'type' => 'text',\n ));\n $cmb->add_field(array(\n 'name' => __('Skype', 'domo'),\n 'id' => $this->metabox_id . 'skype',\n 'type' => 'text',\n ));\n\n $cmb->add_field(array(\n 'name' => __('Address', 'domo'),\n 'id' => $this->metabox_id . 'address',\n 'type' => 'text',\n ));\n $cmb->add_field(array(\n 'name' => __('Business', 'domo'),\n 'id' => $this->metabox_id . 'business',\n 'type' => 'text',\n ));\n $cmb->add_field(array(\n 'name' => __('EMAIL', 'domo'),\n 'id' => $this->metabox_id . 'email',\n 'type' => 'text',\n ));\n // $cmb->add_field(array(\n // 'name' => __('Facebook url', 'domo'),\n // 'id' => $this->metabox_id . 'facebook',\n // 'type' => 'text',\n // ));\n // $cmb->add_field(array(\n // 'name' => __('Youtube url', 'domo'),\n // 'id' => $this->metabox_id . 'youtube',\n // 'type' => 'text',\n // ));\n // $cmb->add_field(array(\n // 'name' => __('Instagram url', 'domo'),\n // 'id' => $this->metabox_id . 'instagram',\n // 'type' => 'text',\n // ));\n // $cmb->add_field(array(\n // 'name' => __('Line url', 'domo'),\n // 'id' => $this->metabox_id . 'line',\n // 'type' => 'text',\n // ));\n\n // $cmb->add_field( array(\n // 'name' => __( '訂購單', 'domo' ),\n // 'id' => $this->metabox_id.'order_form',\n // 'type' => 'file',\n // ) );\n\n }", "public function add_meta_boxes() {\n\n global $post;\n\n // Check we're on an Envira Gallery\n if ( 'envira' != $post->post_type ) {\n return;\n }\n\n // Let's remove all of those dumb metaboxes from our post type screen to control the experience.\n $this->remove_all_the_metaboxes();\n \n // Add our metaboxes to Envira CPT.\n\n // Types Metabox\n // Allows the user to upload images or choose an External Gallery Type\n // We don't display this if the Gallery is a Dynamic or Default Gallery, as these settings don't apply\n $type = $this->get_config( 'type', $this->get_config_default( 'type' ) );\n if ( ! in_array( $type, array( 'defaults', 'dynamic' ) ) ) {\n add_meta_box( 'envira-gallery', __( 'Envira Gallery', 'envira-gallery' ), array( $this, 'meta_box_gallery_callback' ), 'envira', 'normal', 'high' );\n }\n\n // Settings Metabox\n add_meta_box( 'envira-gallery-settings', __( 'Envira Gallery Settings', 'envira-gallery' ), array( $this, 'meta_box_callback' ), 'envira', 'normal', 'high' );\n \n // Preview Metabox\n // Displays the images to be displayed when using an External Gallery Type\n // In the future, this could include a 'live' preview of the gallery theme options etc.\n add_meta_box( 'envira-gallery-preview', __( 'Envira Gallery Preview', 'envira-gallery' ), array( $this, 'meta_box_preview_callback' ), 'envira', 'normal', 'high' );\n \n // Display the Gallery Code metabox if we're editing an existing Gallery\n if ( $post->post_status != 'auto-draft' ) {\n add_meta_box( 'envira-gallery-code', __( 'Envira Gallery Code', 'envira-gallery' ), array( $this, 'meta_box_gallery_code_callback' ), 'envira', 'side', 'default' );\n }\n\n // Output 'Select Files from Other Sources' button on the media uploader form\n add_action( 'post-plupload-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n add_action( 'post-html-upload-ui', array( $this, 'append_media_upload_form' ), 1 );\n \n }", "public function add_meta_boxes() {\n\t\t\t// Address\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_address', \n\t\t\t\t'Adresse',\n\t\t\t\tarray( $this, 'meta_box_address' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Location\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_location', \n\t\t\t\t'Location',\n\t\t\t\tarray( $this, 'meta_box_location' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Geodata\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_geodata', \n\t\t\t\t'Geodaten',\n\t\t\t\tarray( $this, 'meta_box_geodata' ),\n\t\t\t\t'wpmeetups', 'side', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Date\n\t\t\tadd_meta_box(\n\t\t\t\t'wpmeetup_dates', \n\t\t\t\t'Datum und Zeit der Meetups',\n\t\t\t\tarray( $this, 'meta_box_date' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t\t\n\t\t\t// Gallery\n\t\t\tadd_meta_box(\n\t\t\t\t'meetup_gallery',\n\t\t\t\t'Gallerie',\n\t\t\t\tarray( $this, 'meta_box_gallery' ),\n\t\t\t\t'wpmeetups', 'advanced', 'default'\n\t\t\t);\n\t\t}", "public function add_meta_boxes() {\n global $current_screen;\n\n $page_main = $this->_admin_pages['swpm'];\n\n if ($current_screen->id == $page_main && isset($_REQUEST['form'])) {\n add_meta_box('swpm_form_items_meta_box', __('Form Items', 'swpm-form-builder'), array(&$this, 'meta_box_form_items'), $page_main, 'side', 'high');\n }\n }", "public function register_metabox(){\n add_filter( 'attachment_fields_to_edit', array($this, 'add_metabox'), 10, 2 );\n /* Saves the field value*/\n add_action( 'edit_attachment', array($this->meta_field, 'save_metabox'), 20, 2 );\n }", "public function add_metaboxes( $talk = null ) {\n\t\t\t/**\n\t\t\t * @see $this->ratings_metabox() for an example of use\n\t\t\t * @param array $metaboxes list of metaboxes to add\n\t\t\t */\n\t\t\t$this->metaboxes = apply_filters( 'wct_admin_get_meta_boxes', array() );\n\n\t\t\tif ( empty( $this->metaboxes ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $this->metaboxes as $metabox ) {\n\t\t\t\t$m = array_merge( array(\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'title' => '',\n\t\t\t\t\t'callback' => '',\n\t\t\t\t\t'context' => '',\n\t\t\t\t\t'priority' => '',\n\t\t\t\t\t'callback_args' => array()\n\t\t\t\t), $metabox );\n\n\t\t\t\tif ( empty( $m['id'] ) || empty( $m['title'] ) || empty( $m['callback'] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Add the metabox\n\t\t\t\tadd_meta_box(\n\t\t\t\t\t$m['id'],\n\t\t\t\t\t$m['title'],\n\t\t\t\t\t$m['callback'],\n\t\t\t\t\t$this->post_type,\n\t\t\t\t\t$m['context'],\n\t\t\t\t\t$m['priority'],\n\t\t\t\t\t$m['callback_args']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param WP_Post $talk the talk object\n\t\t\t */\n\t\t\tdo_action( 'wct_add_metaboxes', $talk );\n\t\t}", "public function add_post_metaboxes() {\n\t\tif( empty( $this->push_syndicate_settings['selected_post_types'] ) )\n\t\t\treturn;\n\n\t\tif( !$this->current_user_can_syndicate() )\n\t\t\treturn;\n\n\t\t$selected_post_types = $this->push_syndicate_settings[ 'selected_post_types' ];\n\t\tforeach( $selected_post_types as $selected_post_type ) {\n\t\t\tadd_meta_box( 'syndicatediv', __( ' Syndicate ' ), array( $this, 'add_syndicate_metabox' ), $selected_post_type, 'side', 'high' );\n\t\t\t//add_meta_box( 'syndicationstatusdiv', __( ' Syndication Status ' ), array( $this, 'add_syndication_status_metabox' ), $selected_post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "public function register_meta_boxes()\n {\n }", "function add_options_page_metabox() {\n\n\t\t// hook in our save notices\n\t\tadd_action( \"cmb2_save_options-page_fields_{$this->metabox_id}\", array( $this, 'settings_notices' ), 10, 2 );\n\n\t\t$cmb = new_cmb2_box( array(\n\t\t\t'id' => $this->metabox_id,\n\t\t\t'hookup' => false,\n\t\t\t'cmb_styles' => false,\n\t\t\t'show_on' => array(\n\t\t\t\t// These are important, don't remove\n\t\t\t\t'key' => 'options-page',\n\t\t\t\t'value' => array( $this->key, )\n\t\t\t),\n\t\t) );\n\n\t\t// Set our CMB2 fields\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Cleaner admin', 'startup' ),\n\t\t\t'id' => 'cleaner',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product logo for login screen 320x180 for best results.', 'startup' ),\n\t\t\t'id' => 'product_logo',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product logo for admin bar if different. Optimal size is 24x24 or 48x48 for retina support.', 'startup' ),\n\t\t\t'id' => 'product_logo_top',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Full logo. Optimal size is 166x60 or 332x120 for retina support. Cleaner admin must be turned on.', 'startup' ),\n\t\t\t'id' => 'product_logo_full',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product menu item', 'startup' ),\n\t\t\t'id' => 'product_menu',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n\t\t$cmb->add_field( array(\n\t\t\t'desc' => __( 'Product name', 'startup' ),\n\t\t\t'id' => 'product_name',\n\t\t\t'type' => 'text',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product url', 'startup' ),\n\t\t\t'id' => 'product_url',\n\t\t\t'type' => 'text',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product version', 'startup' ),\n\t\t\t'id' => 'product_version',\n\t\t\t'type' => 'text',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Product footer', 'startup' ),\n\t\t\t'id' => 'product_footer',\n\t\t\t'type' => 'text',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Use dashboard', 'startup' ),\n\t\t\t'id' => 'dashboard',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Use blog', 'startup' ),\n\t\t\t'id' => 'blog',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Use wall', 'startup' ),\n\t\t\t'id' => 'wall',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Show help page', 'startup' ),\n\t\t\t'id' => 'help',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Show notices', 'startup' ),\n\t\t\t'id' => 'notices',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Help notice', 'startup' ),\n\t\t\t'id' => 'notice_help',\n\t\t\t'type' => 'text',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'ID columns', 'startup' ),\n\t\t\t'id' => 'id_columns',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Login screen slideshow', 'startup' ),\n\t\t\t'id' => 'login_slideshow',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Login screen background or slideshow overlay color', 'startup' ),\n\t\t\t'id' => 'login_overlay',\n\t\t\t'default' => '#ff4500',\n 'type' => 'colorpicker',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Login screen slideshow overlay opacity (0-1)', 'startup' ),\n\t\t\t'id' => 'login_opacity',\n\t\t\t'default' => '0.85',\n 'type' => 'text_small',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Choose an image for the login screen slideshow.', 'startup' ),\n\t\t\t'id' => 'login_01',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Choose another one.', 'startup' ),\n\t\t\t'id' => 'login_02',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'desc' => __( 'Choose one more.', 'startup' ),\n\t\t\t'id' => 'login_03',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'id' => 'login_04',\n\t\t\t'type' => 'file',\n\t\t) );\n \n $cmb->add_field( array(\n\t\t\t'id' => 'login_05',\n\t\t\t'type' => 'file',\n\t\t) );\n \n// $cmb->add_field( array(\n//\t\t\t'desc' => __( 'Force admin color scheme', 'startup' ),\n//\t\t\t'id' => 'color',\n//\t\t\t'type' => 'select',\n// 'show_option_none' => true,\n// 'default' => '',\n// 'options' => array(\n// 'fresh' => __( 'Fresh', 'startup' ),\n// 'light' => __( 'Light', 'startup' ),\n// 'blue' => __( 'Blue', 'startup' ),\n// 'coffee' => __( 'Coffee', 'startup' ),\n// 'ectoplasm' => __( 'Ectoplasm', 'startup' ),\n// 'midnight' => __( 'Midnight', 'startup' ),\n// 'ocean' => __( 'Ocean', 'startup' ),\n// 'sunrise' => __( 'Sunrise', 'startup' ),\n// ),\n//\t\t) );\n\n\n\t}", "function bizpanda_step_to_step_metaboxes($metaboxes)\n\t{\n\t\t$metaboxes[] = array(\n\t\t\t'class' => 'BZDA_STS_ADN_CombinationMetabox',\n\t\t\t'path' => BZDA_STS_ADN_PLUGIN_DIR . '/admin/metaboxes/combination.php'\n\t\t);\n\t\t\n\t\treturn $metaboxes;\n\t}", "function opt_post_metaboxes ( array $meta_boxes ) {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = '_opt_';\n\n\t/**\n\t * Metaboxes for the 'op_tool_type' post type\n\t */\n\t$meta_boxes['opt_post_metabox'] = array(\n\t\t'id' => 'opt_post_metabox',\n\t\t'title' => __( 'OP Tool Post Options', 'op_tool' ),\n\t\t'pages' => array( 'op_tool_type', ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t// 'cmb_styles' => true, // Enqueue the CMB stylesheet on the frontend\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Delay', 'op_tool' ),\n\t\t\t\t'desc' => __( 'Enter the number of seconds to delay before allowing user to continue.', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'read_delay',\n\t\t\t\t'type' => 'text_small',\n\t\t\t\t'default' => '5',\n\t\t\t\t// 'repeatable' => true,\n\t\t\t),\n\t\t),\n\t);\n\n\t// Add other metaboxes as needed\n\n\treturn $meta_boxes;\n}", "function greater_jackson_habitat_add_page_metaboxes() {\n\t\n\tglobal $post;\n\t\n\t// Each page except the Home Page\n\tif ( greater_jackson_habitat_is_editing_home() ) return;\n\t\n\tif ( get_post_meta( $post->ID, '_wp_page_template', true ) !== 'page-templates/about.php' ) {\n\t\n\t\tadd_meta_box(\n\t\t\t'gjh-subtitle',\n\t\t\t__( 'Subtitle', 'greater-jackson-habitat-theme' ),\n\t\t\t'greater_jackson_habitat_subtitle_metabox_content',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t\t\n\t}\n\t\n\t/*\n\t\n\tadd_meta_box(\n\t\t'gjh-extra-meta',\n\t\t__( 'Extra Section', 'greater-jackson-habitat-theme' ),\n\t\t'greater_jackson_habitat_extra_metabox_content',\n\t\t'page',\n\t\t'normal',\n\t\t'low'\n\t);\n\t\n\t*/\n \n}", "function mobile_kiosk_add_post_meta_boxes() {\n\t\n\t// Gallery Options\n\tadd_meta_box(\n\t\t'gallery-options',\n\t\tesc_html__( 'Gallery Options', 'gallery-options' ),\n\t\t'mobile_kiosk_gallery_options_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'high' \n\t);\n\t\n\t// Gallery Slides\n\tadd_meta_box(\n\t\t'gallery-slides',\n\t\tesc_html__( 'Gallery Slides', 'gallery-slides' ),\n\t\t'mobile_kiosk_gallery_slides_meta_box', \n\t\t'kioskgallery', \n\t\t'normal', \n\t\t'low' \n\t);\n\t\n}", "function careers_metabox() {\n\t\t\tforeach (careers_fields() as $key => $value) {\n\t\t\t\t$id = 'careers_'.$value['slug'];\n\t\t\t\t$title = __( $value['name'], 'careers_textdomain' );\n\t\t\t\tadd_meta_box($id, $title, 'careers_callback', 'Careers', 'normal', 'low',$value);\n\t\t\t}\n\t\t}", "public function create_meta_box() {\n\t\tadd_meta_box( 'slider_meta', 'Example metabox', array( $this, 'slider_meta_fields_callback' ), [ 'Page', 'post' ] );\n\n\t}", "public function register_metaboxes() {\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_gallery',\n\t\t\t\t'title' => esc_html__( 'Gallery', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_single_large_thumb' => array(\n\t\t\t\t\t\t'type' => 'media',\n\t\t\t\t\t\t'title' => esc_html__( 'Single Large Image', 'wapu-core' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_clear_caches',\n\t\t\t\t'title' => esc_html__( 'Clear Caches', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'side',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_clear_reviews_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Reviews Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Reviews Cache</a><br><br>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_rating_cache' ) )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'_wapu_clear_terms_cache' => array(\n\t\t\t\t\t\t'type' => 'html',\n\t\t\t\t\t\t'title' => esc_html__( 'Clear Terms Cache', 'wapu-core' ),\n\t\t\t\t\t\t'html' => sprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\" class=\"button\">Clear Terms Cache</a>',\n\t\t\t\t\t\t\tadd_query_arg( array( 'clear_meta_cache' => '_terms_cache' ) )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-post-meta', array(\n\t\t\t\t'id' => 'wapu_misc',\n\t\t\t\t'title' => esc_html__( 'Misc Options', 'wapu-core' ),\n\t\t\t\t'page' => array( $this->post_type ),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'callback_args' => false,\n\t\t\t\t'fields' => apply_filters(\n\t\t\t\t\t'wapu-core/edd/metabxes/misc',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'_wapu_ld_url' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Live Demo URL', 'wapu-core' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\twapu_core()->get_core()->init_module( 'cherry-term-meta', array(\n\t\t\t\t'tax' => 'download_category',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'fields' => array(\n\t\t\t\t\t'_wapu_category_home' => array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => 'Home URL for current category (for breadcrumbs)',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t}", "public function add_meta_boxes() {\n\t\tforeach ( $this->screens as $screen ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'scheduled-course-settings',\n\t\t\t\t__( 'Scheduled Course Settings', 'Scheduled Course' ),\n\t\t\t\tarray( $this, 'add_meta_box_callback' ),\n\t\t\t\t$screen,\n\t\t\t\t'advanced',\n\t\t\t\t'default'\n\t\t\t);\n\t\t}\n\t}", "public function kiwip_add_meta_box(){\t\t\t\n\t\tadd_meta_box(\n\t\t\t$this->id,\n\t\t\t$this->title,\n\t\t\tarray(&$this, 'kiwip_metabox_callback'),\n\t\t\t$this->cpt_name,\n\t\t\t$this->context,\n\t\t\t$this->priority\n\t\t);\n\t}", "function caviar_add_meta_box() {\n\n\t$screens = array('page' );\n\n\tforeach ( $screens as $screen ) {\n\n\t\tadd_meta_box(\n\t\t\t'caviar_sectionid',\n\t\t\tesc_html__( 'Caviar Metabox Field Example', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box_callback',\n\t\t\t$screen\n\t\t);\n\n\t\tadd_meta_box(\n\t\t\t'caviar_2',\n\t\t\tesc_html__( 'Caviar Metabox 2', 'caviar_textdomain' ),\n\t\t\t'caviar_meta_box2_callback',\n\t\t\t$screen\n\t\t);\n\t}\n}", "public function add_settings_meta_boxes() {\n\n\t\t// Get the settings.\n\t\t$settings = conference_schedule()->get_settings();\n\n\t\t// About this Plugin.\n\t\tadd_meta_box( 'conf-schedule-about-mb', __( 'About this Plugin', 'conf-schedule' ), array(\n\t\t\t$this,\n\t\t\t'print_settings_meta_boxes'\n\t\t), $this->settings_page_id, 'side', 'core', array(\n\t\t\t'id' => 'about',\n\t\t\t'settings' => $settings,\n\t\t));\n\n\t\t// Spread the Love.\n\t\tadd_meta_box( 'conf-schedule-promote-mb', __( 'Spread the Love', 'conf-schedule' ), array(\n\t\t\t$this,\n\t\t\t'print_settings_meta_boxes'\n\t\t), $this->settings_page_id, 'side', 'core', array(\n\t\t\t'id' => 'promote',\n\t\t\t'settings' => $settings,\n\t\t));\n\n\t\t// Session Fields.\n\t\tadd_meta_box( 'conf-schedule-fields-mb', __( 'Session Fields', 'conf-schedule' ), array(\n\t\t\t$this,\n\t\t\t'print_settings_meta_boxes'\n\t\t), $this->settings_page_id, 'normal', 'core', array(\n\t\t\t'id' => 'fields',\n\t\t\t'settings' => $settings,\n\t\t));\n\n\t\t// Displaying the Schedule.\n\t\tadd_meta_box( 'conf-schedule-display-schedule-mb', __( 'Displaying The Schedule', 'conf-schedule' ), array(\n\t\t\t$this,\n\t\t\t'print_settings_meta_boxes'\n\t\t), $this->settings_page_id, 'normal', 'core', array(\n\t\t\t'id' => 'display-schedule',\n\t\t\t'settings' => $settings,\n\t\t));\n\n\t}", "public static function registerMetaBoxes() {\n add_meta_box( 'mail_settings', __('Email Settings', WPXTREME_TEXTDOMAIN ), array( __CLASS__, 'display_mail_settings' ), WPXTREME_MAIL_CPT_KEY, 'normal', 'high');\n }", "public function add_metabox() {\n\t\tadd_meta_box(\n\t\t\t'Translation',\n\t\t\t'Translation',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'meta_box',\n\t\t\t),\n\t\t\t'words',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function cspm_add_locations_metabox(){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Add Locations Metabox options */\r\n\t\t\t \r\n\t\t\t$cspm_add_locations_metabox_options = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_add_locations_metabox',\r\n\t\t\t\t'title' => esc_attr__( 'Progress Map: Add locations', 'cspm' ),\r\n\t\t\t\t'object_types' => isset($this->plugin_settings['post_types']) ? $this->plugin_settings['post_types'] : array(), // Post types\r\n\t\t\t\t'priority' => 'high',\r\n\t\t\t\t//'context' => 'side',\r\n\t\t\t\t'show_names' => true, // Show field names on the left\t\t\r\n\t\t\t\t'closed' => false,\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Create post type Metabox */\r\n\t\t\t\t \r\n\t\t\t\t$cspm_add_locations_metabox = new_cmb2_box( $cspm_add_locations_metabox_options );\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Display Add Locations Metabox fields */\r\n\t\t\t\r\n\t\t\t\t$this->cspm_add_locations_tabs($cspm_add_locations_metabox, $cspm_add_locations_metabox_options);\r\n\t\t\t\r\n\t\t}", "function tabify_add_meta_boxes($post_type)\n {\n }", "function master_sidebar_post_type_meta_boxes() {\n\t\n\t$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'object' );\n\t$admin_page_name = 'appearance_page_custom_theme_sidebars';\n\n\tif ( ! $post_types ) {\n\t\treturn;\n\t}\n\n\t// Add metabox for each posttype\n\tforeach ( $post_types as $post_type ) {\n\t\t$post_type = apply_filters( 'master_sidebar_meta_box_object', $post_type );\n\t\tif ( $post_type ) {\n\t\t\t$id = $post_type->name;\n\t\t\tadd_meta_box( \n\t\t\t\t\"master-add-{$id}\", \n\t\t\t\t$post_type->labels->name, \n\t\t\t\t'master_sidebar_item_post_type_meta_box', \n\t\t\t\t$admin_page_name, \n\t\t\t\t'side', \n\t\t\t\t'default', \n\t\t\t\t$post_type \n\t\t\t);\n\t\t}\n\t}\n}", "public function add_meta_boxes()\n {\n /* Author Name */\n add_meta_box(\n 'testimonial_options',\n 'Testimonial Options',\n array ( $this , 'render_features_box'),\n 'testimonial',\n 'side',\n 'default'\n );\n /* Author email */\n /* approved [checkbox] */\n /* featured [checkbox] */\n }", "function admin() {\n \n add_action( 'genesis_theme_settings_metaboxes', array( $this, 'register_metabox' ) );\n add_filter( 'cmb_meta_boxes', array( $this, 'create_metaboxes' ) );\n add_action( 'init', array( $this, 'initialize_cmb_meta_boxes' ), 50 );\n \n }", "function zilla_metabox_posts() {\n $meta_box = array(\n 'id' => 'zilla-metabox-post-gallery',\n 'title' => __('Gallery Settings', 'zilla'),\n 'description' => __('Set up your gallery.', 'zilla'),\n 'page' => 'post',\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'name' => __('Upload Images', 'zilla'),\n 'desc' => __('Click to upload images.', 'zilla'),\n 'id' => '_zilla_gallery_upload',\n 'type' => 'images',\n 'std' => __('Upload Images', 'zilla')\n )\n )\n );\n zilla_add_meta_box( $meta_box );\n\n /* Create a quote metabox -----------------------------------------------------*/\n $meta_box = array(\n 'id' => 'zilla-metabox-post-quote',\n 'title' => __('Quote Settings', 'zilla'),\n 'description' => __('Input your quote.', 'zilla'),\n 'page' => 'post',\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'name' => __('The Quote', 'zilla'),\n 'desc' => __('Input your quote.', 'zilla'),\n 'id' => '_zilla_quote_quote',\n 'type' => 'textarea',\n 'std' => ''\n ),\n array(\n 'name' => __('The Author', 'zilla'),\n 'desc' => __('Input the quote\\'s author.', 'zilla'),\n 'id' => '_zilla_quote_author',\n 'type' => 'text',\n 'std' => ''\n ),\n array(\n 'name' => __('Author Description', 'zilla'),\n 'desc' => __('Input a description for the quote\\'s author.', 'zilla'),\n 'id' => '_zilla_quote_description',\n 'type' => 'text',\n 'std' => ''\n )\n )\n );\n zilla_add_meta_box( $meta_box );\n\n /* Create a link metabox ----------------------------------------------------*/\n $meta_box = array(\n 'id' => 'zilla-metabox-post-link',\n 'title' => __('Link Settings', 'zilla'),\n 'description' => __('Input your link', 'zilla'),\n 'page' => 'post',\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'name' => __('', 'zilla'),\n 'desc' => __('', 'zilla'),\n 'id' => '_zilla_link_url',\n 'type' => 'text',\n 'std' => ''\n )\n )\n );\n zilla_add_meta_box( $meta_box );\n\n /* Create a video metabox -------------------------------------------------------*/\n $meta_box = array(\n 'id' => 'zilla-metabox-post-video',\n 'title' => __('Video Settings', 'zilla'),\n 'description' => __('These settings enable you to embed videos into your posts.', 'zilla'),\n 'page' => 'post',\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'name' => __('M4V File URL', 'zilla'),\n 'desc' => __('The URL to the .m4v video file', 'zilla'),\n 'id' => '_zilla_video_m4v',\n 'type' => 'file',\n 'std' => ''\n ),\n array(\n 'name' => __('OGV File URL', 'zilla'),\n 'desc' => __('The URL to the .ogv video file', 'zilla'),\n 'id' => '_zilla_video_ogv',\n 'type' => 'file',\n 'std' => ''\n ),\n array(\n 'name' => __('MP4 File URL', 'zilla'),\n 'desc' => __('The URL to the .mp4 video file', 'zilla'),\n 'id' => '_zilla_video_mp4',\n 'type' => 'file',\n 'std' => ''\n ),\n array(\n 'name' => __('Poster Image', 'zilla'),\n 'desc' => __('The preview image.', 'zilla'),\n 'id' => '_zilla_video_poster_url',\n 'type' => 'text',\n 'std' => ''\n ),\n array(\n 'name' => __('Embedded Code', 'zilla'),\n 'desc' => __('If you are using something other than self hosted video such as Youtube or Vimeo, paste the embed code here. Width is best at 600px with any height.<br><br> This field will override the above.', 'zilla'),\n 'id' => '_zilla_video_embed_code',\n 'type' => 'textarea',\n 'std' => ''\n )\n )\n );\n zilla_add_meta_box( $meta_box );\n\n /* Create an audio metabox ------------------------------------------------------*/\n $meta_box = array(\n 'id' => 'zilla-metabox-post-audio',\n 'title' => __('Audio Settings', 'zilla'),\n 'description' => __('These settings enable you to embed audio into your posts.', 'zilla'),\n 'page' => 'post',\n 'context' => 'normal',\n 'priority' => 'high',\n 'fields' => array(\n array(\n 'name' => __('MP3 File URL', 'zilla'),\n 'desc' => __('The URL to the .mp3 audio file', 'zilla'),\n 'id' => '_zilla_audio_mp3',\n 'type' => 'file',\n 'std' => ''\n ),\n array(\n 'name' => __('OGA File URL', 'zilla'),\n 'desc' => __('The URL to the .oga, .ogg audio file', 'zilla'),\n 'id' => '_zilla_audio_ogg',\n 'type' => 'file',\n 'std' => ''\n )\n )\n );\n zilla_add_meta_box( $meta_box );\n}", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function add_meta_boxes() {\n\t\t// init tooltips here since at this time the meta-box pre-registration is done,\n\t\t// we already know the current screen and the 'condition()' has been checked\n\t\t$this->init_tooltips();\n\n\t\t// Avoid appearance own meta fields on the standard Custom Fields metabox.\n\t\tadd_filter( 'is_protected_meta', array( $this, 'is_protected_meta' ), 10, 2 );\n\t}", "public function register_metabox() {\n\t\t$fm = new Fieldmanager_Group( [\n\t\t\t'name' => 'hero_fields', // \"name\" id deceiving, used as the key/ID.\n\t\t\t'serialize_data' => false,\n\t\t\t'add_to_prefix' => false,\n\t\t\t'children' => [\n\t\t\t\t'_headline' => new Fieldmanager_RichTextArea( 'Main Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t\t'_subheadline' => new Fieldmanager_RichTextArea( 'Sub Headline', [\n\t\t\t\t\t'buttons_1' => [ 'bold', 'italic', 'strikethrough' ],\n\t\t\t\t\t'editor_settings' => [\n\t\t\t\t\t\t'media_buttons' => false,\n\t\t\t\t\t],\n\t\t\t\t] ),\n\t\t\t],\n\t\t] );\n\n\t\t/**\n\t\t * Initiate the metabox\n\t\t */\n\t\t$fm->add_meta_box( 'Hero', 'page' );\n\t}", "function add_homepage_metaboxes(){\n global $post,$homepage_metabox,$features_metabox,$map_metabox;\n $homepage_metabox = new WPAlchemy_MetaBox(array\n (\n 'id' => '_homepage',\n 'title' => 'Home Page Sliders',\n 'types' => array('page'),\n 'context' => 'normal', // same as above, defaults to \"normal\"\n 'priority' => 'high', // same as above, defaults to \"high\"\n 'template' => get_stylesheet_directory() . '/lib/template/metabox-homepage.php',\n 'autosave' => TRUE,\n 'mode' => WPALCHEMY_MODE_EXTRACT, // defaults to WPALCHEMY_MODE_ARRAY\n 'prefix' => '_msdlab_', // defaults to NULL\n 'include_template' => 'front-page.php',\n ));\n $features_metabox = new WPAlchemy_MetaBox(array\n (\n 'id' => '_homepage_features',\n 'title' => 'Home Page Features',\n 'types' => array('page'),\n 'context' => 'normal', // same as above, defaults to \"normal\"\n 'priority' => 'high', // same as above, defaults to \"high\"\n 'template' => get_stylesheet_directory() . '/lib/template/metabox-features.php',\n 'autosave' => TRUE,\n 'mode' => WPALCHEMY_MODE_EXTRACT, // defaults to WPALCHEMY_MODE_ARRAY\n 'prefix' => '_msdlab_', // defaults to NULL\n 'include_template' => 'front-page.php',\n ));\n $map_metabox = new WPAlchemy_MetaBox(array\n (\n 'id' => '_homepage_map',\n 'title' => 'Home Page Map Area',\n 'types' => array('page'),\n 'context' => 'normal', // same as above, defaults to \"normal\"\n 'priority' => 'high', // same as above, defaults to \"high\"\n 'template' => get_stylesheet_directory() . '/lib/template/metabox-map.php',\n 'autosave' => TRUE,\n 'mode' => WPALCHEMY_MODE_EXTRACT, // defaults to WPALCHEMY_MODE_ARRAY\n 'prefix' => '_msdlab_', // defaults to NULL\n 'include_template' => 'front-page.php',\n ));\n}", "function add_meta_boxes($post_type, $post)\n {\n }", "function badgeos_gravityforms_custom_metaboxes( array $meta_boxes ) {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = '_badgeos_';\n\n\t// Setup our $post_id, if available\n\t$post_id = isset( $_GET[ 'post' ] ) ? $_GET[ 'post' ] : 0;\n\n\t// New Achievement Types\n\t$meta_boxes[] = array(\n\t\t'id' => 'gravityforms_achievement_type_data',\n\t\t'title' => __( 'Gravity Forms Entry', 'badgeos-gravityforms' ),\n\t\t'pages' => array( 'achievement-type' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Roadmap Achievements', 'badgeos-gravityforms' ),\n\t\t\t\t'desc' => ' ' . __( 'Display earned achievements of this type in the LearnLife \"My Roadmap\" section.', 'badgeos-gravityforms' ),\n\t\t\t\t'id' => $prefix . 'show_in_myroadmap',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t),\n\t\t)\n\t);\n\n\treturn $meta_boxes;\n\n}", "function create_meta_post_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-post-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' POST SETTINGS', 'new_meta_post_boxes', 'post', 'normal', 'high' );\n\t}\n}", "public static function register_meta_boxes() {\n // Get meta boxes to register.\n $meta_boxes = apply_filters( 'rwmb_meta_boxes', array() );\n\n\n if ( is_array( $meta_boxes ) ) {\n // Load all custom fields.\n static $loaded;\n\n if ( ! isset( $loaded ) ) {\n foreach ( glob( implode( '/', array_slice( explode( '/', str_replace( '\\\\', '/', __FILE__ ) ), 0, -1 ) ) . '/fields/*.php' ) as $file ) {\n include_once $file;\n }\n\n $loaded = true;\n }\n\n // Instantiate all meta boxes.\n foreach ( $meta_boxes as $meta_box ) {\n $meta_box = new self( $meta_box );\n }\n }\n }", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "public function add_meta_boxes() {\n\t\tglobal $current_screen;\n\n\t\t$page_main = $this->_admin_pages[ 'vfb-pro' ];\n\n\t\tif ( $current_screen->id == $page_main && isset( $_REQUEST['form'] ) ) {\n\t\t\tadd_meta_box( 'vfb_form_switcher', __( 'Quick Switch', 'visual-form-builder-pro' ), array( &$this, 'meta_box_switch_form' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_items_meta_box', __( 'Form Items', 'visual-form-builder-pro' ), array( &$this, 'meta_box_form_items' ), $page_main, 'side', 'high' );\n\t\t\tadd_meta_box( 'vfb_form_media_button_tip', __( 'Display Forms', 'visual-form-builder-pro' ), array( &$this, 'meta_box_display_forms' ), $page_main, 'side', 'low' );\n\t\t}\n\t}", "function tumi_metaboxes() {\n\n // Start with an underscore to hide fields from custom fields list\n $prefix = '_tumi_';\n\n /**\n * Initiate the metabox\n */\n $tumi_event_metabox = new_cmb2_box( array(\n 'id' => 'tumi_event_metabox',\n 'title' => __( 'Event Metabox', 'cmb2' ),\n 'object_types' => array( 'events', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n // 'cmb_styles' => false, // false to disable the CMB stylesheet\n // 'closed' => true, // Keep the metabox closed by default\n ) );\n $tumi_portfolio_metabox = new_cmb2_box( array(\n 'id' => 'tumi_portfolio_metabox',\n 'title' => __( 'Portfolio Metabox', 'cmb2' ),\n 'object_types' => array( 'portfolis', ), // Post type\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true,\n ) );\n\n // Regular text field\n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Sub-Title', 'cmb2' ),\n 'desc' => __( 'Put your sub-tile here', 'cmb2' ),\n 'id' => $prefix . 'event_sub_title',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Lorem '\n // 'sanitization_cb' => 'my_custom_sanitization', // custom sanitization callback parameter\n // 'escape_cb' => 'my_custom_escaping', // custom escaping callback parameter\n // 'on_front' => false, // Optionally designate a field to wp-admin only\n // 'repeatable' => true,\n ) );\n\n // URL text field\n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Date', 'cmb2' ),\n 'desc' => __( 'Put event date', 'cmb2' ),\n 'id' => $prefix . 'event_date',\n 'type' => 'text_date',\n // 'protocols' => array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'), // Array of allowed protocols\n // 'repeatable' => true,\n ) );\n\n // event format \n $tumi_event_metabox->add_field( array(\n 'name' => __( 'Event Format', 'cmb2' ),\n 'desc' => __( 'select event format', 'cmb2' ),\n 'id' => $prefix . 'event_format',\n 'type' => 'select',\n\t\t'options' => array(\n\t\t\t'1' => __( 'Left Image & Right Content', 'cmb2' ),\n\t\t\t'2' => __( 'Right Image & Left Content', 'cmb2' ),\n\t\t),\t\t\n ) );\n\n\t$tumi_event_metabox->add_field( array(\n\t\t'name' => __( 'Event Taxonomy Select', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'event_taxonomy_select',\n\t\t'type' => 'taxonomy_select',\n\t\t'taxonomy' => 'events_cat', // Taxonomy Slug\n\t) );\n\n $tumi_portfolio_metabox->add_field( array(\n 'name' => __( 'Portfolio Thin Title', 'cmb2' ),\n 'desc' => __( 'Put your thin-title here', 'cmb2' ),\n 'id' => $prefix . 'portfolio_thin_title',\n 'type' => 'text',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Zoe '\n ) );\n\t\n\t$tumi_portfolio_metabox->add_field( array(\n\t\t'name' => __( 'Portfolio Link', 'cmb2' ),\n\t\t'desc' => __( 'Put your link here', 'cmb2' ),\n\t\t'id' => $prefix . 'portfolio_link',\n\t\t'type' => 'text_url',\n\t\t'default' => 'http://google.com'\n\t) );\n\n $tumi_portfolio_metabox->add_field( array(\n 'name' => __( 'Portfolio Content', 'cmb2' ),\n 'desc' => __( 'Put your content here', 'cmb2' ),\n 'id' => $prefix . 'portfolio_details',\n 'type' => 'textarea',\n 'show_on_cb' => 'cmb2_hide_if_no_cats', // function should return a bool value\n\t\t'default' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing'\n ) );\t\n\t\n}", "function create_meta_box() {\n\tif ( function_exists('add_meta_box') ) {\n\t\tadd_meta_box( 'new-meta-boxes', '<div class=\"icon-small\"></div> '.PEXETO_THEMENAME.' PAGE SETTINGS', 'new_meta_boxes', 'page', 'normal', 'high' );\n\t}\n}", "function moutheme_register_meta_boxes()\n{\n\tglobal $meta_boxes;\n\n\t// Make sure there's no errors when the plugin is deactivated or during upgrade\n\tif ( class_exists( 'RW_Meta_Box' ) ) {\n\t\tforeach ( $meta_boxes as $meta_box ) {\n\t\t\tnew RW_Meta_Box( $meta_box );\n\t\t}\n\t}\n}", "function mobile_kiosk_post_meta_boxes_setup() {\n\t// hook adding the meta boxes \n\tadd_action( 'add_meta_boxes', 'mobile_kiosk_add_post_meta_boxes' );\n\t\n\t// Hook saving the meta boxes\n\tadd_action('save_post', 'mobile_kiosk_save_post_meta_boxes', 10, 2);\n}", "function config_stm_metaboxes( array $meta_boxes ) {\r\n\t// Start with an underscore to hide fields from custom fields list\r\n\t$prefix = '_stm_';\r\n\r\n\r\n\t/**\r\n\t * Sample metabox to demonstrate each field type included\r\n\t */\r\n\t$meta_boxes['task_specifications_metabox'] = array(\r\n\t\t'id' => 'task_specifications',\r\n\t\t'title' => __( 'More Information', 'cmb' ),\r\n\t\t'pages' => array( 'tasks', ), // Post type\r\n\t\t'context' => 'normal',\r\n\t\t'priority' => 'high',\r\n\t\t'show_names' => true, // Show field names on the left\r\n\t\t// 'cmb_styles' => true, // Enqueue the CMB stylesheet on the frontend\r\n\t\t'fields' => array(\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Hours', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'hours',\r\n\t\t\t\t'type' => 'text_small',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Due Date', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'due_date',\r\n\t\t\t\t'type' => 'select',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'Monday' => __( 'Monday', 'cmb' ),\r\n\t\t\t\t\t'Tuesday' => __( 'Tuesday', 'cmb' ),\r\n\t\t\t\t\t'Wednesday' => __( 'Wednesday', 'cmb' ),\r\n\t\t\t\t\t'Thursday' => __( 'Thursday', 'cmb' ),\r\n\t\t\t\t\t'Friday' => __( 'Friday', 'cmb' ),\r\n\t\t\t\t),\r\n\t\t\t\t'default' => 'Monday',\r\n\t\t\t)\r\n\t\t),\r\n\t);\r\n\r\n\t$meta_boxes['task_assignee_metabox'] = array(\r\n\t\t'id' => 'task_assignee_metabox_id',\r\n\t\t'title' => __( 'Assignee', 'cmb' ),\r\n\t\t'pages' => array( 'tasks', ), // Post type\r\n\t\t'context' => 'side',\r\n\t\t'priority' => 'high',\r\n\t\t'show_names' => false, // Show field names on the left\r\n\t\t// 'cmb_styles' => true, // Enqueue the CMB stylesheet on the frontend\r\n\t\t'fields' => array(\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Assignee', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'assignee',\r\n\t\t\t\t'type' => 'select',\r\n\t\t\t\t'options' => get_employee_arrays_for_cmb_metabox('employee'),\r\n\t\t\t\t// 'inline' => true, // Toggles display to inline\r\n\t\t\t)\r\n\t\t),\r\n\t);\r\n\r\n\tif(current_user_can('manage_options')){\r\n\t\t$meta_boxes['emp_permission_metabox'] = array(\r\n\t\t\t'id' => 'emp_permission_metabox_id',\r\n\t\t\t'title' => __( 'Permmission', 'cmb' ),\r\n\t\t\t'pages' => array( 'user', ), // Post type\r\n\t\t\t'show_names' => true,\r\n\t\t\t'cmb_styles' => false, // Show cmb bundled styles.. not needed on user profile page\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' => __( 'Allow assign task to other', 'cmb' ),\r\n\t\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t\t'id' => $prefix . 'assign_to_other_permission',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' => __( 'Allow user to assign their own tasks', 'cmb' ),\r\n\t\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t\t'id' => $prefix . 'assign_own_tasks',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}\r\n\r\n\t$args = array('role__in' => array('team_leader'));\r\n\t$users = get_users( $args );\r\n\t$team_leaders = array('0'=>'N/A');\r\n\tforeach($users as $user){\r\n\t\t$team_leaders[$user->ID] = get_user_meta($user->ID, 'last_name', true);\r\n\t}\r\n\t//print_r($team_leaders);\r\n\t/**\r\n\t * Metabox for the user profile screen\r\n\t */\r\n\t$meta_boxes['user_edit'] = array(\r\n\t\t'id' => 'user_edit',\r\n\t\t'title' => __( 'Employee Profile', 'cmb' ),\r\n\t\t'pages' => array( 'user' ), // Tells CMB to use user_meta vs post_meta\r\n\t\t'show_names' => true,\r\n\t\t'cmb_styles' => false, // Show cmb bundled styles.. not needed on user profile page\r\n\t\t'fields' => array(\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Available Hours Monday:', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'available_hours_monday',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Available Hours Tuesday:', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'available_hours_tuesday',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Available Hours Wednesday:', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'available_hours_wednesday',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Available Hours Thursday:', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'available_hours_thursday',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Available Hours Friday:', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'available_hours_friday',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Team', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'team',\r\n\t\t\t\t'type' => 'select',\r\n\t\t\t\t'options' => $team_leaders,\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'name' => __( 'Skills', 'cmb' ),\r\n\t\t\t\t'desc' => __( '', 'cmb' ),\r\n\t\t\t\t'id' => $prefix . 'skills',\r\n\t\t\t\t'type' => 'multicheck',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'S.F. calcs/exhibits' => __( 'S.F. calcs/exhibits', 'cmb' ),\r\n\t\t\t\t\t'BOMA charts' => __( 'BOMA charts ', 'cmb' ),\r\n\t\t\t\t\t'LSBs' => __( 'LSBs', 'cmb' ),\r\n\t\t\t\t\t'Mktg plans' => __( 'Mktg plans', 'cmb' ),\r\n\t\t\t\t\t'Stacking plans' => __( 'Stacking plans', 'cmb' ),\r\n\t\t\t\t\t'Surveys' => __( 'Surveys', 'cmb' ),\r\n\t\t\t\t\t'Space plans' => __( 'Space plans', 'cmb' ),\r\n\t\t\t\t\t'Pricing plans' => __( 'Pricing plans', 'cmb' ),\r\n\t\t\t\t\t'Int. Design - high' => __( 'Int. Design - high', 'cmb' ),\r\n\t\t\t\t\t'Int. Design - moderate' => __( 'Int. Design - moderate', 'cmb' ),\r\n\t\t\t\t\t'Int. CDs' => __( 'Int. CDs', 'cmb' ),\r\n\t\t\t\t\t'Int. Detailing' => __( 'Int. Detailing', 'cmb' ),\r\n\t\t\t\t\t'CA/submittals' => __( 'CA/submittals', 'cmb' ),\r\n\t\t\t\t\t'Arch. Design' => __( 'Arch. Design', 'cmb' ),\r\n\t\t\t\t\t'Arch. CDs' => __( 'Arch. CDs', 'cmb' ),\r\n\t\t\t\t\t'Arch. Detailing' => __( 'Arch. Detailing', 'cmb' ),\r\n\t\t\t\t\t'Finish boards' => __( 'Finish boards', 'cmb' ),\r\n\t\t\t\t\t'Illustrator - high' => __( 'Illustrator - high', 'cmb' ),\r\n\t\t\t\t\t'Illustrator - moderate' => __( 'Illustrator - moderate', 'cmb' ),\r\n\t\t\t\t\t'Photoshop - high' => __( 'Photoshop - high', 'cmb' ),\r\n\t\t\t\t\t'Photoshop - moderate' => __( 'Photoshop - moderate', 'cmb' ),\r\n\t\t\t\t\t'Sketchup - high' => __( 'Sketchup - high', 'cmb' ),\r\n\t\t\t\t\t'Sketchup - moderate' => __( 'Sketchup - moderate', 'cmb' ),\r\n\t\t\t\t\t'TDLR' => __( 'TDLR', 'cmb' ),\r\n\t\t\t\t\t'IECC' => __( 'IECC', 'cmb' ),\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t)\r\n\t);\r\n\r\n\r\n\t// Add other metaboxes as needed\r\n\treturn $meta_boxes;\r\n}", "function add_options_page_metabox() {\n\t\t// hook in our save notices\n\t\tadd_action( \"cmb2_save_options-page_fields_{$this->metabox_id}\", array( $this, 'settings_notices' ), 10, 2 );\n\t\t$cmb = new_cmb2_box( array(\n\t\t\t'id' => $this->metabox_id,\n\t\t\t'hookup' => false,\n\t\t\t'cmb_styles' => false,\n\t\t\t'show_on' => array(\n\t\t\t\t// These are important, don't remove\n\t\t\t\t'key' => 'options-page',\n\t\t\t\t'value' => array( $this->key, )\n\t\t\t),\n\t\t) );\n\n\t\t\t\n\t\t/*============================\n\t\t\tSTART GENERAL OPTIONS\n\t\t=============================*/\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'General Theme Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'general_options',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Logo', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'Defaults to Site Title under Settings',\n\t\t\t'id' => 'logo',\n\t\t\t'type' => 'file'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Favicon', 'cmb2-example-theme' ),\n\t\t\t//'desc' => 'Defaults to Site Title under Settings',\n\t\t\t'id' => 'favicon',\n\t\t\t'type' => 'file'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => '#404040'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'This needs to be customized by the developer for position and mobile rendering. ',\n\t\t\t'id' => 'bkg_img',\n\t\t\t'type' => 'file'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Repeat', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t\t 1.) No Repeat\n\t\t\t\t\t\t\t\t\t\t 2.) Repeat\n\t\t\t\t\t\t\t\t\t\t 3.) Repeat-X\n\t\t\t\t\t\t\t\t\t\t 3.) Repeat-Y\n\t\t\t\t\t\t\t\t\t\t 4.) Space\n\t\t\t\t\t\t\t\t\t\t 5.) Round\n\t\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'bkg_img_repeat',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'none',\n\t\t\t'options' => array(\n\t\t\t\t'no-repeat' => __( 'No Repeat', 'cmb2' ),\n\t\t\t\t'repeat' => __( 'Repeat', 'cmb2' ),\n\t\t\t\t'repeat-x' => __( 'Repeat X', 'cmb2' ),\n\t\t\t\t'repeat-y' => __( 'Repeat Y', 'cmb2' ),\n\t\t\t\t'space' => __( 'Space', 'cmb2' ),\n\t\t\t\t'round' => __( 'Round', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Position', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t\t 1.) Center Center\n\t\t\t\t\t\t\t\t\t\t 2.) Top Left\n\t\t\t\t\t\t\t\t\t\t 3.) Top Center\n\t\t\t\t\t\t\t\t\t\t 3.) Top Right\n\t\t\t\t\t\t\t\t\t\t 4.) Bottom Left\n\t\t\t\t\t\t\t\t\t\t 5.) Bottom Center\n\t\t\t\t\t\t\t\t\t\t\t6.) Bottom Right\n\t\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'bkg_img_pos',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => '100-100',\n\t\t\t'options' => array(\n\t\t\t\t'100-100' => __( '100% 100%', 'cmb2' ),\n\t\t\t\t'center-center' => __( 'Center Center', 'cmb2' ),\n\t\t\t\t'top-left' => __( 'Top Left', 'cmb2' ),\n\t\t\t\t'top-center' => __( 'Top Center', 'cmb2' ),\n\t\t\t\t'top-right' => __( 'Top Right', 'cmb2' ),\n\t\t\t\t'bottom-left' => __( 'Bottom Left', 'cmb2' ),\n\t\t\t\t'bottom-center' => __( 'Bottom Center', 'cmb2' ),\n\t\t\t\t'bottom-right' => __( 'Bottom Right', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Size', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t 1.) None\n\t\t\t\t\t\t\t\t\t 2.) Cover\n\t\t\t\t\t\t\t\t\t 3.) 100% 100%\n\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'bkg_img_size',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'cover',\n\t\t\t'options' => array(\n\t\t\t\t'auto' => __( 'None', 'cmb2' ),\n\t\t\t\t'cover' => __( 'Cover', 'cmb2' ),\n\t\t\t\t'100-100' => __( '100% 100%', 'cmb2' ),\n\t\t\t\t'contain' => __( 'Contain', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Attachment Fixed', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'Check this box if you want the background image to be fixed / parallax effect.',\n\t\t\t'id' => 'bkg_img_fixed_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Content color (body,p)', 'cmb2-example-theme' ),\n\t\t\t'id' => 'content_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => '#ffffff'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Footer Widget Areas', 'cmb2-example-theme' ),\n\t\t\t'id' => 'footer_widget_areas',\n\t\t\t'type' => 'radio',\n\t\t\t'default' => 0,\n\t\t\t'options' => array(\n\t\t\t\t0 => __( 'None', 'cmb2-example-theme' ),\n\t\t\t\t1 => __( 'One', 'cmb2-example-theme' ),\n\t\t\t\t2 => __( 'Two', 'cmb2-example-theme' ),\n\t\t\t\t3 => __( 'Three', 'cmb2-example-theme' ),\n\t\t\t\t4 => __( 'Four', 'cmb2-example-theme' ),\n\t\t\t)\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Global fullwith container',\n\t\t\t'desc' => 'Check this box if you want the website to have a Full Width Container.',\n\t\t\t'id' => 'full_container_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Boxed Layout ',\n\t\t\t'desc' => 'Check this box if you want the website to appear in a boxed layout.',\n\t\t\t'id' => 'boxed_layout_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Left Align Sidebar',\n\t\t\t'desc' => 'Check this box if you want the sidebar to show up on the left instead of the right.',\n\t\t\t'id' => 'sidebar_left_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Both Sidebars',\n\t\t\t'desc' => 'Make sure Left Align Sidebar option is checked.',\n\t\t\t'id' => 'both_sidebar_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Page Loader?',\n\t\t\t'desc' => 'Check this box if you would like to remove the Page Loader from the webpage.',\n\t\t\t'id' => 'page_loader_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable WPADMIN Bar',\n\t\t\t'desc' => 'Check this box if you would like to remove the WP Admin bar from the frontend.',\n\t\t\t'id' => 'wp_admin_bar_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Top Bar Checkbox',\n\t\t\t'desc' => 'Check this box to enable Top Bar',\n\t\t\t'id' => 'top_header_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Breadcrumbs',\n\t\t\t'desc' => 'Check this box if you want breadcrumbs to appear',\n\t\t\t'id' => 'bread_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'WooCommerce Theme?',\n\t\t\t'desc' => 'Check this box if you will be selling products using woocommerce',\n\t\t\t'id' => 'woo_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable Page Header?',\n\t\t\t'desc' => 'Check this box if you would like to remove the Page Title from the top of each page.',\n\t\t\t'id' => 'page_header_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable Comments Globally?',\n\t\t\t'desc' => 'Check this box if you would like to remove comments on all pages.',\n\t\t\t'id' => 'disable_comment_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable back to top button',\n\t\t\t'desc' => 'Check this box to enable Back to top',\n\t\t\t'id' => 'back_to_top',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\n\t\t/*============================\n\t\t\tECOMMERCE\n\t\t=============================*/\n\t\t\t\n\t\t\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'E-Commerce Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'ecommerce_options',\n\t\t\t\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable Shop Link?',\n\t\t\t'desc' => 'Check this box if you want to disable the shop link in the header',\n\t\t\t'id' => 'shop_link_chk',\n\t\t\t'type' => 'checkbox',\n\t\t\t\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Keep User and Cart Menu in Top bar',\n\t\t\t'desc' => 'Check this box if you want to keep the User Menu and Cart Menu in the top header',\n\t\t\t'id' => 'woo_menu_top_chk',\n\t\t\t'type' => 'checkbox',\n\t\t\t\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable User Menu?',\n\t\t\t'desc' => 'Check this box if you want to disable the user menu',\n\t\t\t'id' => 'user_menu_chk',\n\t\t\t'type' => 'checkbox',\n\t\t\t\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable Cart Menu?',\n\t\t\t'desc' => 'Check this box if you want to disable cart menu',\n\t\t\t'id' => 'cart_menu_chk',\n\t\t\t'type' => 'checkbox',\n\t\t\t\n\t\t) ); \n\t\t\n\t\t/*============================\n\t\t\tTOP HEADER \n\t\t=============================*/\n\t\t// TOP HEADER OPTIONS\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Top Bar Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'top_header_title'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Top Bar Background Color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'top_bar_bkg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Top Bar Font color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'top_bar_font_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Top Column Count', 'cmb2-example-theme' ),\n\t\t\t//'desc' => '',\n\t\t\t'id' => 'top_column_count',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 2,\n\t\t\t'options' => array(\n\t\t\t\t2 => __( 'Two', 'cmb2' ),\n\t\t\t\t3 => __( 'Three', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Top Header Outer Container',\n\t\t\t'desc' => 'Check this box to make the Top header wrapped with a container.',\n\t\t\t'id' => 'top_header_container',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Left Area Content', 'cmb2' ),\n\t\t\t'desc' => __( 'Phone number or email in top bar on left.', 'cmb2' ),\n\t\t\t'default' => '<a href=\"tel:555-555-5555\" class=\"phone\">(555) 555-5555</a> <a href=\"mailto:[email protected]\" class=\"mail\">[email protected]</a>',\n\t\t\t'id' => 'toparea_left_code',\n\t\t\t'type' => 'textarea_code',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Center Area Content', 'cmb2' ),\n\t\t\t'desc' => __( 'Middle content for top bar.', 'cmb2' ),\n\t\t\t'default' => 'BUSINESS NAME HERE',\n\t\t\t'id' => 'toparea_center_code',\n\t\t\t'type' => 'textarea_code',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Right Area Content', 'cmb2' ),\n\t\t\t'desc' => __( 'Right content for top bar.', 'cmb2' ),\n\t\t\t'default' => 'Shortcode or Text here',\n\t\t\t'id' => 'toparea_right_code',\n\t\t\t'type' => 'textarea_code',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Social Icons enable',\n\t\t\t'desc' => 'Check this box if you want social menu to show up on right hand side of Top bar. Make sure you assign the social media menu.',\n\t\t\t'id' => 'top_social_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t\n\t\t/*============================\n\t\t\tGENERAL HEADER OPTIONS\n\t\t=============================*/\n\t\t// GENERAL HEADER OPTIONS\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'header_title'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header Select',\n\t\t\t'desc' => '<strong>Choose between:<br>\n\t\t\t\t\t\t\t\t\t 1.) Header one - Logo Above Navbar, Navbar opaque, MegaMenu, and social media menu.(IDEAL for large menu systems because of its MEGAMENU)<br>\n\t\t\t\t\t\t\t\t\t 2.) Header two - Logo Inside (left) Navbar, transparent navigation, and with social media menu (good for small logos and simple design)<br>\n\t\t\t\t\t\t\t\t\t 3.) Header three - Fixed Fullwidth Fancy Header, transparent navigation, sidebar mobile nav (not good for a lot of menu items), special page options for small or large header.<br>\n\t\t\t\t\t\t\t\t\t 4.) Header four - Bottom Sticky Fullwidth Fancy Header, transparent navigation, sidebar mobile nav (not good for a lot of menu items)<br>\n\t\t\t\t\t\t\t\t\t 5.) Header five.\n\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'header_select',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'header-one',\n\t\t\t'options' => array(\n\t\t\t\t'header-one' => __( 'Header One', 'cmb2' ),\n\t\t\t\t'header-two' => __( 'Header Two', 'cmb2' ),\n\t\t\t\t//'header-three' => __( 'Header Three', 'cmb2' ),\n\t\t\t\t//'header-four' => __( 'Header Four', 'cmb2' ),\n\t\t\t\t//'header-five' => __( 'Header Five', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Mobile Hamberger Menu Color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'mobile_toggle_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Header Bkg color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'header_bkg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t'desc' => 'This is for the entire background of the header.',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Social Icons enable',\n\t\t\t'desc' => 'Check this if you want the social icons to appear in the header.',\n\t\t\t'id' => 'nav_social_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Search Box enable',\n\t\t\t'desc' => 'Check this if you want the search to appear in the header.',\n\t\t\t'id' => 'search_box_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Fixed Navigation',\n\t\t\t'desc' => 'Check this box to make the the header fixed. This also enables the absolute menu.',\n\t\t\t'id' => 'header_fixed_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Sticky Navigation',\n\t\t\t'desc' => 'This only works for Header Two',\n\t\t\t'id' => 'header_sticky_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'More Menu', 'cmb2-example-theme' ),\n\t\t\t'id' => 'header_more_chk',\n\t\t\t'type' => 'checkbox',\n\t\t\t'desc' => 'Check this if you need additional menu items in the navigation. Then make sure to add another menu in the Appearence->Menus section and assign it to more menu. ',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'More Menu Widget Areas', 'cmb2-example-theme' ),\n\t\t\t'id' => 'more_menu_widget_areas',\n\t\t\t'type' => 'radio',\n\t\t\t'default' => 'two',\n\t\t\t'options' => array(\n\t\t\t\t0 => __( 'None', 'cmb2-example-theme' ),\n\t\t\t\t1 => __( 'One', 'cmb2-example-theme' ),\n\t\t\t\t2 => __( 'Two', 'cmb2-example-theme' ),\n\t\t\t\t3 => __( 'Three', 'cmb2-example-theme' ),\n\t\t\t\t4 => __( 'Four', 'cmb2-example-theme' ),\n\t\t\t)\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Mega Menu: Navs or Widgets ',\n\t\t\t'desc' => '<strong></strong>',\n\t\t\t'id' => 'menus_vs_widgets_select',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'navs',\n\t\t\t'options' => array(\n\t\t\t\t'navs' => __( 'Navigation Menus', 'cmb2' ),\n\t\t\t\t'widgets' => __( 'Widgets', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\n\t\t/*============================\n\t\t\tHEADER ONE AND TWO\n\t\t=============================*/\n\t\t\n\t \n\t\t// HEADER ONE AND HEADER TWO OPTIONS\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header One and Two Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'header_one_title',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Center Logo',\n\t\t\t'desc' => 'Check this box to make the logo centered. This only works on Header One.',\n\t\t\t'id' => 'logo_centered',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Justify Nav Menu',\n\t\t\t'desc' => 'Check this box to make the links in the navigation centered.',\n\t\t\t'id' => 'nav_justify',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Right Align Nav Items',\n\t\t\t'desc' => 'Check this box to make the links in the navigation show up on the right while in desktop mode.',\n\t\t\t'id' => 'nav_right',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header Outer Container',\n\t\t\t'desc' => 'Check this box to make the header wrapped with a container.',\n\t\t\t'id' => 'header_container',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Nav Inner Fullwidth Container',\n\t\t\t'desc' => 'Enable the Fullwidth container inside the header. This overrides the Global Setting.',\n\t\t\t'id' => 'nav_inner_container_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\n\n\t\t/*============================\n\t\t\tHEADER THREE AND FOUR\n\t\t=============================*/\n\t\t\n\t\t// HEADER THREE\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header Three and Four Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'header_three_title'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Right align nav menu items',\n\t\t\t'desc' => 'Check this box to make the navigation items float right',\n\t\t\t'id' => 'header_three_right_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Disable fixed header',\n\t\t\t'desc' => 'By default this header has a fixed top navigation bar and sidebar menu for mobile. Check this box to make the navigation no longer remain fixed at the top.',\n\t\t\t'id' => 'header_three_disable_fixed_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Mobile Background color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'header_three_mobile_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t'desc' => 'This is the background of the sidebar nav on mobile.',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Scroll Bkg color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'header_three_scroll_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t'desc' => 'The color of the background after the user has scrolled down 200 pixels.',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Scroll Nav Item Color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'header_three_scroll_item_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t\n\t\t/*============================\n\t\t\tNAVIGATION \n\t\t=============================*/\n\t\t// NAVIGATION OPTIONS\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Navigation Options',\n\t\t\t//'desc' => 'Make sure you have CMB2 RGBa Colorpicker plugin installed.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'nav_title'\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Bootstrap Nav Color Scheme',\n\t\t\t'desc' => 'none, navbar-light, navbar-dark',\n\t\t\t'id' => 'nav_color_scheme',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'none',\n\t\t\t'options' => array(\n\t\t\t\t'none' => __( 'None', 'cmb2' ),\n\t\t\t\t'navbar-light' => __( 'Navbar Light', 'cmb2' ),\n\t\t\t\t'navbar-dark' => __( 'Navbar Dark', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Global Bootstrap Nav Type',\n\t\t\t'desc' => 'This adjusts the breakpoint at which the menu changes to a mobile menu. navbar-expand, navbar-expand-sm, navbar-expand-md, navbar-expand-lg, navbar-expand-xl',\n\t\t\t'id' => 'global_nav_viewport_break',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'navbar-expand-md',\n\t\t\t'options' => array(\n\t\t\t\t'none' => __( 'None', 'cmb2' ),\n\t\t\t\t'navbar-expand' => __( 'Navbar Expand', 'cmb2' ),\n\t\t\t\t'navbar-expand-sm' => __( 'Expand Small', 'cmb2' ),\n\t\t\t\t'navbar-expand-md' => __( 'Expand Medium', 'cmb2' ),\n\t\t\t\t'navbar-expand-lg' => __( 'Expand Large', 'cmb2' ),\n\t\t\t\t'navbar-expand-xl' => __( 'Expand X-Large', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Bootstrap Nav Utility Class',\n\t\t\t'desc' => 'bg-light, bg-dark, bg-faded, bg-primary',\n\t\t\t'id' => 'nav_color_utility',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'bg-light',\n\t\t\t'options' => array(\n\t\t\t\t'none' => __( 'None', 'cmb2' ),\n\t\t\t\t'bg-light' => __( 'Background Light', 'cmb2' ),\n\t\t\t\t'bg-dark' => __( 'Background Dark', 'cmb2' ),\n\t\t\t\t'bg-faded' => __( 'Background Faded', 'cmb2' ),\n\t\t\t\t'bg-primary' => __( 'Background Primary', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Nav Background color', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'Make sure select \"None\" for the option above ( Boostrap Nav Utility Class ).',\n\t\t\t'id' => 'nav_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Nav Item color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'nav_item_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => '#dedede'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Sub-Menu Background color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'sub_nav_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Sub-Menu Item color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'sub_nav_item_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => '#dedede'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Hover Background/Text Decision', 'cmb2-example-theme' ),\n\t\t\t'id' => 'hover_chk_decision',\n\t\t\t'type' => 'checkbox',\n\t\t\t'desc'\t=> 'This decides whether to use the default option of background color, or if you want the text to show up a different color on hover you would check this box.',\n\t\t\t//'default' => '#dedede'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Hover Background/Text color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'hover_bg_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => '#dedede'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Active/Current Menu Item color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'current_item_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t//'default' => 'blue'\n\t\t) );\n\n\t\t/*============================\n\t\t\tADDITIONAL HEADER OPTIONS\n\t\t=============================*/\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Additional Header Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'additional_header_title'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Global Page Additional Header Choice',\n\t\t\t'desc' => 'no-header, spacer, sml-header, lrg-header ',\n\t\t\t'id' => 'global_additional_header_option',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'none',\n\t\t\t'options' => array(\n\t\t\t\t'no-header' => __( 'No Header - No Spacing', 'cmb2' ),\n\t\t\t\t'space' => __( 'No Header - Just Spacing', 'cmb2' ),\n\t\t\t\t'sml-header' => __( 'Small Header - With Parallax', 'cmb2' ),\n\t\t\t\t'lrg-header' => __( 'Large Header - Full Width and Height', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Additional Header Background color', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'This shows by default when no header option is selected on the backend of a page. You must select short or large header on the page options to disable this.',\n\t\t\t'id' => 'global_add_header_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'rgba(0,0,0,0)'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Overlay color', 'cmb2-example-theme' ),\n\t\t\t//'desc' => '',\n\t\t\t'id' => 'global_add_header_overlay_color',\n\t\t\t'type' => 'colorpicker',\n\t\t\t'default' => '#303543'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Overlay Opacity',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'global_add_header_overlay_opacity',\n\t\t\t'type' => 'text',\n\t\t\t'default' => '0.4'\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'NoSpacer Padding',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'global_nospacer_padding',\n\t\t\t'type' => 'text',\n\t\t\t'default' => '55px 0'\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Additional Header Image', 'cmb2-example-theme' ),\n\t\t\t//'desc' => 'Defaults to Site Title under Settings',\n\t\t\t'id' => 'global_add_header_image',\n\t\t\t'type' => 'file'\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Disable Parallax', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'Check this box if you want to disable parallax effect.',\n\t\t\t'id' => 'global_add_header_disable_parralax_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Repeat', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t\t 1.) No Repeat\n\t\t\t\t\t\t\t\t\t\t 2.) Repeat\n\t\t\t\t\t\t\t\t\t\t 3.) Repeat-X\n\t\t\t\t\t\t\t\t\t\t 3.) Repeat-Y\n\t\t\t\t\t\t\t\t\t\t 4.) Space\n\t\t\t\t\t\t\t\t\t\t 5.) Round\n\t\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'global_add_header_bkg_img_repeat',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'none',\n\t\t\t'options' => array(\n\t\t\t\t'no-repeat' => __( 'No Repeat', 'cmb2' ),\n\t\t\t\t'repeat' => __( 'Repeat', 'cmb2' ),\n\t\t\t\t'repeat-x' => __( 'Repeat X', 'cmb2' ),\n\t\t\t\t'repeat-y' => __( 'Repeat Y', 'cmb2' ),\n\t\t\t\t'space' => __( 'Space', 'cmb2' ),\n\t\t\t\t'round' => __( 'Round', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Position', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t\t 1.) Center Center\n\t\t\t\t\t\t\t\t\t\t 2.) Top Left\n\t\t\t\t\t\t\t\t\t\t 3.) Top Center\n\t\t\t\t\t\t\t\t\t\t 3.) Top Right\n\t\t\t\t\t\t\t\t\t\t 4.) Bottom Left\n\t\t\t\t\t\t\t\t\t\t 5.) Bottom Center\n\t\t\t\t\t\t\t\t\t\t\t6.) Bottom Right\n\t\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'global_add_header_bkg_img_pos',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => '50-0',\n\t\t\t'options' => array(\n\t\t\t\t'50-0' => __( '50% 0', 'cmb2' ),\n\t\t\t\t'100-100' => __( '100% 100%', 'cmb2' ),\n\t\t\t\t'center-center' => __( 'Center Center', 'cmb2' ),\n\t\t\t\t'top-left' => __( 'Top Left', 'cmb2' ),\n\t\t\t\t'top-center' => __( 'Top Center', 'cmb2' ),\n\t\t\t\t'top-right' => __( 'Top Right', 'cmb2' ),\n\t\t\t\t'bottom-left' => __( 'Bottom Left', 'cmb2' ),\n\t\t\t\t'bottom-center' => __( 'Bottom Center', 'cmb2' ),\n\t\t\t\t'bottom-right' => __( 'Bottom Right', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Image Size', 'cmb2-example-theme' ),\n\t\t\t'desc' => '<strong>Choose between:\n\t\t\t\t\t\t\t\t\t 1.) None\n\t\t\t\t\t\t\t\t\t 2.) Cover\n\t\t\t\t\t\t\t\t\t 3.) 100% 100%\n\t\t\t\t\t\t\t\t\t</strong>',\n\t\t\t'id' => 'global_add_header_bkg_img_size',\n\t\t\t'type' => 'select',\n\t\t\t'show_option_none' => false,\n\t\t\t'default' => 'cover',\n\t\t\t'options' => array(\n\t\t\t\t'auto' => __( 'None', 'cmb2' ),\n\t\t\t\t'cover' => __( 'Cover', 'cmb2' ),\n\t\t\t\t'100-100' => __( '100% 100%', 'cmb2' ),\n\t\t\t\t'contain' => __( 'Contain', 'cmb2' ),\n\t\t\t),\n\t\t) );\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Background Attachment Fixed', 'cmb2-example-theme' ),\n\t\t\t'desc' => 'Check this box if you want the background image to be fixed / parallax effect.',\n\t\t\t'id' => 'global_add_header_bkg_img_fixed_chk',\n\t\t\t'type' => 'checkbox',\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Header Content wysiwyg', 'cmb2' ),\n\t\t\t//'desc' => __( 'This will show up in the Additional Header select area.', 'cmb2' ),\n\t\t\t'id' => 'global_page_header_wysiwyg',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'options' => array( 'textarea_rows' => 5, ),\n\t\t) );\n\n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Header Content color', 'cmb2' ),\n\t\t\t//'desc' => '',\n\t\t\t'id' => 'global_page_header_wysiwyg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t'default' => '#fff'\n\t\t) );\n\n\n\t\t/*============================\n\t\t\tFOOTER\n\t\t=============================*/\n\t\t// FOOTER\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Footer Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'footer_title'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable top border',\n\t\t\t'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'footer_hr_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Footer Bkg color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'footer_bkg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'blue'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => __( 'Bottom Footer Background color', 'cmb2-example-theme' ),\n\t\t\t'id' => 'bottom_footer_bg_color',\n\t\t\t'type' => 'rgba_colorpicker',\n\t\t\t//'default' => 'blue'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Fullwidth Bottom Bar',\n\t\t\t//'desc' => 'Check this box to make the logo centered',\n\t\t\t'id' => 'footer_fullwidth_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Custom Footer Copywrite',\n\t\t\t//'desc' => 'field description (optional)',\n\t\t\t//'default' => '.selector { property: attribute; }',\n\t\t\t'id' => 'footer_copy_textareacode',\n\t\t\t'type' => 'textarea_code'\n\t\t) ); \n\t\t\n\t\t\n\t\t/*============================\n\t\t\tADDITIONAL OPTIONS\n\t\t=============================*/\n\t\t// ADDITIONAL\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Additional Options',\n\t\t\t//'desc' => 'Please fill out the fields below to tell us how you want the header formatted.',\n\t\t\t'type' => 'title',\n\t\t\t'id' => 'additional_title'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Custom CSS Code',\n\t\t\t'desc' => '.selector { property: attribute; }',\n\t\t\t//'default' => '.selector { property: attribute; }',\n\t\t\t'id' => 'custom_css_textareacode',\n\t\t\t'type' => 'textarea_code'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Header Custom Code',\n\t\t\t'desc' => 'This will show up right after the logo before the menu.',\n\t\t\t//'default' => '.selector { property: attribute; }',\n\t\t\t'id' => 'custom_top_textareacode',\n\t\t\t'type' => 'textarea_code'\n\t\t) ); \n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Bottom Custom Code',\n\t\t\t'desc' => 'This will show up right before the footer widgets under the content.',\n\t\t\t//'default' => '.selector { property: attribute; }',\n\t\t\t'id' => 'custom_bottom_textareacode',\n\t\t\t'type' => 'textarea_code'\n\t\t) ); \n\t\t\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Portfolio Custom Post Type',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'cpt_portfolio_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Staff Custom Post Type',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'cpt_staff_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Testimonial Custom Post Type',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'cpt_testimonial_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\t\t\n\t\t$cmb->add_field( array(\n\t\t\t'name' => 'Enable Logo Slider Custom Post Type',\n\t\t\t//'desc' => 'If there is no color on your footer, enable this so that the footer is easily identifiable.',\n\t\t\t'id' => 'cpt_logo_slider_checkbox',\n\t\t\t'type' => 'checkbox',\n\t\t) ); \n\n\t}", "function add_engagements_metaboxes() {\n\tadd_meta_box('wpt_engagements_date', 'Engagements Date', 'wpt_engagements_date', 'engagements', 'normal', 'default');\n add_meta_box('wpt_engagements_event_page_link', 'Engagements Event Page Link', 'wpt_engagements_event_page_link', 'engagements', 'normal', 'default');\n add_meta_box('wpt_engagements_buy_ticket_link', 'Engagements Buy Ticket Link', 'wpt_engagements_buy_ticket_link', 'engagements', 'normal', 'default');\n add_meta_box('wpt_engagements_type', 'Engagement Type', 'wpt_engagements_type', 'engagements', 'side', 'default');\n}", "function agnosia_post_meta_boxes_setup() {\r\n\r\n\t\t/* Add meta boxes on the 'add_meta_boxes' hook. */\r\n\t\tadd_action( 'add_meta_boxes', 'agnosia_add_post_meta_boxes' );\r\n\r\n\t\t/* Save post meta on the 'save_post' hook. */\r\n\t\tadd_action( 'save_post', 'agnosia_save_post_meta', 10 , 2 );\r\n\r\n\t}", "function koelsch_register_theme_settings_metabox() {\n\n\t/**\n\t * Registers options page menu item and form.\n\t */\n\t$k_settings = new_cmb2_box( array(\n\t\t'id' => 'koelsch_settings_metabox',\n\t\t'title' => esc_html__( 'Koelsch Settings', 'koelsch' ),\n\t\t'object_types' => array( 'options-page' ),\n\n\t\t/*\n\t\t * The following parameters are specific to the options-page box\n\t\t * Several of these parameters are passed along to add_menu_page()/add_submenu_page().\n\t\t */\n\n\t\t'option_key' => 'koelsch_settings', // The option key and admin menu page slug.\n\t\t// 'icon_url' => 'dashicons-palmtree', // Menu icon. Only applicable if 'parent_slug' is left empty.\n\t\t// 'menu_title' => esc_html__( 'Options', 'myprefix' ), // Falls back to 'title' (above).\n\t\t// 'parent_slug' => 'themes.php', // Make options page a submenu item of the themes menu.\n\t\t// 'capability' => 'manage_options', // Cap required to view options-page.\n\t\t// 'position' => 1, // Menu position. Only applicable if 'parent_slug' is left empty.\n\t\t// 'admin_menu_hook' => 'network_admin_menu', // 'network_admin_menu' to add network-level options page.\n\t\t// 'display_cb' => false, // Override the options-page form output (CMB2_Hookup::options_page_output()).\n\t\t// 'save_button' => esc_html__( 'Save Theme Options', 'myprefix' ), // The text for the options-page save button. Defaults to 'Save'.\n\t) );\n\n //Koelsch address\n $address = $k_settings->add_field( array(\n 'id' => 'address',\n 'type' => 'group',\n 'description' => __( 'Koelsch home office info', 'koelsch' ),\n 'repeatable' => false, // use false if you want non-repeatable group\n 'options' => array(\n 'closed' => false,\n ),\n ) );\n $k_settings->add_group_field( $address, array(\n 'name' => 'Company Name',\n 'default' => __( 'Koelsch Communities', 'koelsch' ),\n 'id' => 'company_name',\n 'type' => 'text',\n ) );\n $k_settings->add_group_field( $address, array(\n 'name' => 'Street Address',\n //'desc' => __( 'Home office Street Address', 'koelsch' ),\n 'id' => 'street',\n 'type' => 'text',\n ) );\n $k_settings->add_group_field( $address, array(\n 'name' => 'Street Address 2',\n //'desc' => __( 'Home office Street Address', 'koelsch' ),\n 'id' => 'street_2',\n 'type' => 'text',\n ) );\n $k_settings->add_group_field( $address, array(\n 'name' => __( 'City', 'koelsch' ),\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'city',\n 'type' => 'text_medium',\n ) );\n\n $k_settings->add_group_field( $address, array(\n 'name' => __( 'State', 'koelsch' ),\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'state',\n 'type' => 'select',\n 'options' => STATES_LIST,\n 'show_option_none' => true,\n ) );\n\n $k_settings->add_group_field( $address, array(\n 'name' => __( 'Zipcode', 'koelsch' ),\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'zipcode',\n 'type' => 'text_small',\n ) );\n\n $k_settings->add_group_field( $address, array(\n 'name' => __( 'Phone', 'koelsch' ),\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'phone',\n 'type' => 'text_medium',\n ) );\n\n $k_settings->add_group_field( $address, array(\n 'name' => __( 'Contact Email', 'koelsch' ),\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'email',\n 'type' => 'text_email',\n ) );\n\n /*\n * Options fields ids only need\n * to be unique within this box.\n * Prefix is not needed.\n */\n $living_types = $k_settings->add_field( array(\n 'id' => 'living_types',\n 'type' => 'group',\n 'description' => __( 'Koelsch living types', 'koelsch' ),\n // 'repeatable' => false, // use false if you want non-repeatable group\n 'options' => array(\n 'group_title' => __( 'Living Type {#}', 'koelsch' ), // since version 1.1.4, {#} gets replaced by row number\n 'add_button' => __( 'Add Living Type', 'koelsch' ),\n 'remove_button' => __( 'Remove Living Type', 'koelsch' ),\n 'sortable' => false,\n 'closed' => true, // true to have the groups closed by default\n // 'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'cmb2' ), // Performs confirmation before removing group.\n ),\n ) );\n $k_settings->add_group_field( $living_types, array(\n 'name' => 'Name',\n 'id' => 'name',\n 'type' => 'text',\n // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types)\n ) );\n $k_settings->add_group_field( $living_types, array(\n 'name' => 'Slug/ID',\n 'id' => 'id',\n 'type' => 'text',\n // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types)\n ) );\n $k_settings->add_group_field( $living_types, array(\n 'name' => 'Individual Living Types',\n 'desc' => 'Check all the the living types that apply',\n 'id' => 'living_types',\n 'type' => 'multicheck',\n 'select_all_button' => false,\n 'options' => array(\n 'IL' => 'Independent Living',\n 'AL' => 'Assisted Living',\n 'MC' => 'Memory Care',\n ),\n) );\n $k_settings->add_group_field( $living_types, array(\n 'name' => 'Seal',\n 'id' => 'seal',\n 'type' => 'select',\n 'show_option_none' => true,\n 'options'=>array(\n 'IL_seal.svg'=>'Signature Independent Living',\n 'AL_seal.svg'=>'Distinctive Assisted Living',\n 'MC_seal.svg'=>'Distinctive Memory Care',\n 'SL_seal.svg'=>'Signature Senior Living'\n )\n // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types)\n ) );\n $k_settings->add_group_field( $living_types, array(\n 'name' => 'Resources Footer Menu',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'resources_menu_id',\n 'type' => 'select',\n 'options' => menu_select_options(),\n 'show_option_none' => true,\n ) );\n\n\n //page settings\n $pages = $k_settings->add_field( array(\n 'id' => 'page_settings',\n 'type' => 'group',\n 'description' => __( 'Page settings', 'koelsch' ),\n 'repeatable' => false, // use false if you want non-repeatable group\n 'options' => array(\n 'closed' => false,\n ),\n ) );\n $k_settings->add_group_field($pages, array(\n 'name' => 'Resources Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'resources_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Find A Community Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'find_community_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Careers Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'careers_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Contact Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'contact_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Independent Living Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'IL_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Assisted Living Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'AL_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n $k_settings->add_group_field($pages, array(\n 'name' => 'Memory Care Page',\n // 'desc' => __( 'Street Address', 'koelsch' ),\n 'id' => 'MC_page',\n 'type' => 'select',\n 'options' => koelsch_pages_list(),\n 'show_option_none' => true,\n ));\n\n}", "function wpcpolls_add_metaboxes() {\n add_meta_box('wpcpolls_metabox', __('Poll Options', 'wordpress-custom-polls'), 'wpcpolls_metaboxes_handler', 'wpcpolls_polls', 'normal', 'high', NULL);\n}" ]
[ "0.8125675", "0.77773815", "0.7773782", "0.7752894", "0.76953095", "0.7571508", "0.75650275", "0.75632906", "0.75483036", "0.75255734", "0.7501606", "0.7474144", "0.7473745", "0.7461713", "0.73919576", "0.73699224", "0.7361965", "0.73501", "0.7342387", "0.7335543", "0.7308547", "0.7295453", "0.7288998", "0.7281248", "0.727975", "0.7278576", "0.7275011", "0.7271149", "0.7255006", "0.7234556", "0.7234069", "0.7228348", "0.7182334", "0.71797544", "0.71529806", "0.7141512", "0.71125257", "0.7085624", "0.7080631", "0.70793694", "0.7057698", "0.70570993", "0.70311725", "0.7025616", "0.70232856", "0.70193857", "0.70131075", "0.7007361", "0.6996932", "0.69965506", "0.6982673", "0.6981616", "0.6964752", "0.6949159", "0.6945351", "0.69285136", "0.6921709", "0.6917554", "0.69168645", "0.6909619", "0.6904496", "0.69027853", "0.69001794", "0.6896308", "0.689454", "0.6892434", "0.6885348", "0.6884431", "0.68829656", "0.6881426", "0.68807083", "0.68700564", "0.6865932", "0.6865003", "0.6862828", "0.68586224", "0.6855038", "0.68484247", "0.6846006", "0.682751", "0.6825626", "0.68134147", "0.6812983", "0.6812305", "0.68060744", "0.6804455", "0.6797143", "0.679515", "0.67909855", "0.67786264", "0.6778193", "0.6777416", "0.67707574", "0.6766175", "0.67657757", "0.67631507", "0.6762133", "0.6761615", "0.67561775", "0.67477614" ]
0.73435515
18
Return a list of tabs that will go inside the metabox.
public function metabox_tabs() { $tabs = array( 'vpn-general' => array( 'label' => 'General', 'icon' => 'dashicons-text', ), 'vpn-scripts' => array( 'label' => 'Scripts', 'icon' => 'dashicons-format-aside', ), 'vpn-promotions' => array( 'label' => 'Promotions', 'icon' => 'dashicons-testimonial', ), ); return $tabs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "public function get_tabs() {\n return $this->_tabs;\n }", "public static function getTabs() {\r\n\t\treturn self::getModulesForUser(Config::$sis_tab_folder);\r\n\t}", "public function getTabs(): array\n {\n return $this->tabs;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function getTabs()\n {\n // so we need to set current handler object for rendering. \n $tabs = static::$tabs;\n foreach ($tabs as $tab) {\n $tab->setHandler($this);\n }\n return $tabs;\n }", "public function getMyTabs() {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab'=>'core_form_tab'],'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs'=>$this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach($oMyTabsDB as $oTab) {\n # Order By Form\n if(!array_key_exists($oTab->form,$aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public function getMyTabs()\n {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab' => 'core_form_tab'], 'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs' => $this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach ($oMyTabsDB as $oTab) {\n # Order By Form\n if (! array_key_exists($oTab->form, $aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public static function getAll() {\r\n $result = db_select(\"{md_megamenu_tabs}\", \"mt\")\r\n ->fields(\"mt\")\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, \"MDMegaTab\");\r\n\r\n foreach ($result as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast(\"MDMegaTab\", $tab);\r\n $tab->initialize();\r\n }\r\n\r\n return $result;\r\n }", "protected function getTabs()\n {\n return $this->_tabs;\n }", "public function getTabs()\n\t\t{\n\t\t\treturn $this->_tabs;\n\t\t}", "public function getMetaboxes()\n\t{\n\t\treturn $this->_metaboxes;\n\t}", "public function tabs()\r\n\t{\r\n\t\tif(!$this->tabs instanceof \\Zbase\\Models\\Ui\\Tabs)\r\n\t\t{\r\n\t\t\t$className = zbase_model_name('ui.tabs', null, '\\Zbase\\Models\\Ui\\Tabs');\r\n\t\t\t$this->tabs = new $className;\r\n\t\t}\r\n\t\treturn $this->tabs;\r\n\t}", "public function tabsAction()\n {\n\t\treturn array();\n }", "protected function get_tabs_for_filter_dialog() {\n\t\treturn array();\n\t}", "public function getTabPageNames()\n {\n return $this->getChildren()->getTypedControlNames(true, \"TabPage\");\n }", "protected function _getNavigationTabs()\n {\n return array(\n 'bible' => array(\n 'title' => new XenForo_Phrase('th_bible_bible'),\n 'href' => XenForo_Link::buildPublicLink('bible'),\n 'position' => 'middle',\n 'linksTemplate' => 'th_navigation_tabs_bible'\n )\n );\n }", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public static function getAllPortalTabs()\n {\n\n $tabs = array('Home');\n\n $browser = new SugarPortalBrowser();\n $browser->loadModules();\n foreach ($browser->modules as $moduleName => $sugarPortalModule) {\n if (!empty($sugarPortalModule->views['list.php'])) {\n $tabs[] = $moduleName;\n }\n }\n\n return $tabs;\n }", "public function metaboxes()\n\t{\n\t\t$this->admin()->metaboxes();\n\t}", "public function get_settings_tabs() {\n\t\t// Sort by order, where higher number means earlier output.\n\t\tusort(\n\t\t\t$this->arr_settings_tabs,\n\t\t\tfunction( $a, $b ) {\n\t\t\t\t$a_order = $a['order'] ?? 0;\n\t\t\t\t$b_order = $b['order'] ?? 0;\n\t\t\t\treturn $b_order <=> $a_order;\n\t\t\t}\n\t\t);\n\n\t\treturn $this->arr_settings_tabs;\n\t}", "abstract protected function tabs();", "protected function getTabOptions() {\n $options = [\n 'members' => $this->t('Members'),\n 'admins' => $this->t('Administrators'),\n ];\n if (($this->currentUser->hasPermission('manage circle spaces') &&\n $this->moduleHandler->moduleExists('living_spaces_circles')) ||\n $this->moduleHandler->moduleExists('living_spaces_subgroup')\n ) {\n $options['inherit'] = $this->t('Inherited');\n }\n return $options;\n }", "public function get_help_tabs()\n {\n }", "public static function getPortalTabs()\n {\n $modules = array();\n $administration = BeanFactory::newBean('Administration');\n // TODO: Refactor this to use the method provided to select `portal`\n // settings.\n $q = \"SELECT value FROM config WHERE category='MySettings' AND name = 'tab' AND platform = 'portal'\";\n $row = $administration->db->query($q);\n $MySettings_tab = $administration->db->fetchByAssoc($row, false);\n if (!empty($MySettings_tab['value'])) {\n $modules = json_decode($MySettings_tab['value']);\n } else {\n $modules = self::getAllPortalTabs();\n self::setPortalTabs($modules);\n }\n\n return $modules;\n }", "public function metabox(){\n\t\tif ($this->options('use_metabox')){\n\t\t\treturn array(\n\t\t\t\t'id' => $this->options('name').'_metabox',\n\t\t\t\t'title' => __($this->options('singular_name').' Fields'),\n\t\t\t\t'page' => $this->options('name'),\n\t\t\t\t'context' => 'normal',\n\t\t\t\t'priority' => 'high',\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}", "function getTabs($action) \n { \n if (isset($this->m_results[\"getTabs\"])) \n return $this->m_results[\"getTabs\"]; \n return parent::getTabs($action);\n }", "public function menu_local_tabs()\n {\n return menu_local_tabs();\n }", "public function getBoxes()\n\t{\n\t\t$boxes = array();\n\t\tforeach($this->getData() as $data){\n\t\t\tif($this->idAllowed($data['id'])){\n\t\t\t\t$boxes[] = array(\n\t\t\t\t\t'class' => sprintf('Webwijs\\Admin\\Metabox\\%s', $data['type']), \n\t\t\t\t\t'settings' => array('id' => $this->getMetaboxId($data['id']), 'title' => $data['title'])\n\t\t\t\t);\t\n\t\t\t}\n\t\t};\n\t\treturn $boxes;\n\t}", "function dt_admin_get_metabox_list( $opts = array() ) {\n\tglobal $wp_meta_boxes;\n\n\t$defaults = array(\n\t\t'id' => 'dt_page_box',\n\t\t'page' => 'page'\n\t);\n\t$opts = wp_parse_args( $opts, $defaults );\n\n\t$meta_boxes = array();\n\n\tforeach( array('side', 'normal') as $context ) {\n\t\tforeach( array('high', 'sorted', 'core', 'default', 'low') as $priority ) {\n\t\t\tif( isset($wp_meta_boxes[$opts['page']][$context][$priority]) ) {\n\t\t\t\tforeach ( (array) $wp_meta_boxes[$opts['page']][$context][$priority] as $id=>$box ) {\n\t\t\t\t\tif( false !== strpos( $id, $opts['id']) ) {\n\t\t\t\t\t\t$meta_boxes[] = $id; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $meta_boxes;\n}", "public function getTabularItems()\n {\n return SATabularListM::model()->findAll(array('order'=>'tabularlist_block'),array('tabularlist_aktif'=>TRUE));\n // return Yii::app()->db->createCommand('SELECT tabularlist_id, tabularlist_block FROM tabularlist_m WHERE tabularlist_aktif=TRUE')->queryAll();\n }", "function getCustomTabsInfo(){\n $custom_tabs_info = array(array('name' => 'Tab1', 'url' => 'javascript://'),\n array('name' => 'Tab2', 'url' => 'javascript://'),\n array('name' => 'Tab3', 'url' => 'javascript://'), );\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n mysql_select_db(DB_NAME);\n $sql = \"select * from healingcrystals_user_custom_tabs where user_id='\" . $this->getId() . \"'\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result)){\n while($entry = mysql_fetch_assoc($result)){\n $custom_tabs_info[$entry['tab_index']-1]['name'] = $entry['tab_description'];\n $custom_tabs_info[$entry['tab_index']-1]['url'] = $entry['tab_link'];\n }\n }\n mysql_close($link);\n return $custom_tabs_info;\n }", "protected function _listTabs($type, $dn = NULL)\n {\n $this->checkAccess($type, NULL, $dn);\n\n if ($dn === NULL) {\n $tabobject = objects::create($type);\n } else {\n $tabobject = objects::open($dn, $type);\n }\n\n $tabs = array();\n foreach ($tabobject->by_object as $tab => $obj) {\n $tabs[$tab] = array(\n 'name' => $tabobject->by_name[$tab],\n 'active' => ($obj->is_account || $obj->ignore_account)\n );\n }\n return $tabs;\n }", "public function getTabs(array $params)\n {\n $tabs = parent::getTabs($params);\n\n unset($tabs['usersadmin_add']);\n unset($tabs['usersadmin_search']);\n\n return $tabs;\n }", "public function IndexGet() {\n $resp = array();\n $dtos = SiteTabService::GetTabList(999);\n $resp['dtos'] = $dtos;\n $resp['dto'] = SiteTabService::NewTabGroup();\n return $resp;\n }", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "public function metabox_content() {\n\t\t\n\t\t\n\t\t\n\t}", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "public function get_system_tabs($filter = true)\n {\n global $moduleList;\n\n $system_tabs_result = null;\n\n $administration = Administration::getSettings('MySettings', true);\n if (isset($administration->settings) && isset($administration->settings['MySettings_tab'])) {\n $tabs = $administration->settings['MySettings_tab'];\n $trimmed_tabs = trim($tabs);\n //make sure serialized string is not empty\n if (!empty($trimmed_tabs)) {\n // TODO: decode JSON rather than base64\n $tabs = base64_decode($tabs);\n $tabs = unserialize($tabs, ['allowed_classes' => false]);\n //Ensure modules saved in the prefences exist.\n foreach ($tabs as $id => $tab) {\n\t\t\t\t\tif (!in_array($tab, $moduleList))\n unset($tabs[$id]);\n }\n if ($filter) {\n $tabs = SugarACL::filterModuleList($tabs, 'access', true);\n }\n $system_tabs_result = $this->get_key_array($tabs);\n } else {\n $system_tabs_result = $this->get_key_array($moduleList);\n }\n } else {\n $system_tabs_result = $this->get_key_array($moduleList);\n }\n\n return $system_tabs_result;\n }", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "public function describeTabs();", "public function getAdminTabs($package)\n {\n if ($package->meta->type == 'domain') {\n return [\n 'tabWhois' => Language::_('Ispapi.tab_whois.title', true),\n 'tabNameservers' => Language::_('Ispapi.tab_nameservers.title', true),\n 'tabSettings' => Language::_('Ispapi.tab_settings.title', true),\n ];\n } else {\n # Handle other services than ''domain'. for eg: ssl certificates\n }\n }", "function bp_dynamic_tab_content() {\n\treturn BP_Dynamic_User_Tab_Content::get_instance();\n}", "protected function createTabs() {}", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "function _getTabs($tabs, $showTabs = true, $selectedGroup='All')\n {\n if($selectedGroup=='All')\n \t$selectedGroup=translate('LBL_TABGROUP_ALL');\n\n \t// Set up a mapping from subpanelID, found in the $tabs list, to the source module name\n \t// As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two\n \t// when constructing the subpanel tabs\n \t// Note that we can't use the very similar GroupedTabStructure class as it lacks this mapping, and logically, it is designed\n \t// for use when constructing the module by module tabs, not the subpanel tabs, as we move away from using module names to represent\n \t// subpanels, and use unique subpanel IDs instead.\n\n \t$moduleNames = array () ;\n \tforeach ( $tabs as $subpanelID )\n \t{\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n // use object property instead new object to have ability run unit test (can override subpanel_definitions)\n $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID );\n \t\tif ($subpanel !== false)\n \t\t $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ;\n \t}\n\n \t$groups = array () ;\n \t$found = array () ;\n\n foreach( $GLOBALS['tabStructure'] as $mainTab => $subModules)\n {\n foreach( $subModules['modules'] as $key => $subModule )\n {\n \t\t\tforeach ( $tabs as $subpanelID )\n if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0)\n {\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ;\n \t$found [ $subpanelID ] = true ;\n \t}\n }\n }\n\n // Put all the remaining subpanels into the 'Other' tab.\n\n foreach( $tabs as $subpanelID )\n {\n \tif ( ! isset ( $found [ $subpanelID ] ) )\n\t \t$groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ;\n }\n\n /* Move history to same tab as activities */\n if(in_array('history', $tabs) && in_array('activities', $tabs))\n {\n foreach($groups as $mainTab => $group)\n {\n \tif(in_array('activities', array_map('strtolower', $group['modules'])))\n {\n \tif(!in_array('history', array_map('strtolower', $group['modules'])))\n {\n \t/* Move hist from there to here */\n $groups[$mainTab]['modules'] []= 'history';\n }\n }\n else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules']))))\n {\n unset($groups[$mainTab]['modules'][$i]);\n if(empty($groups[$mainTab]['modules']))\n {\n \tunset($groups[$mainTab]);\n }\n }\n }\n }\n\n /* Add the 'All' group.\n * Note that if a tab group already exists with the name 'All',\n * it will be overwritten in this union operation.\n */\n if(count($groups) <= 1)\n \t$groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs));\n else\n $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups;\n /* Note - all $display checking and array_intersects with $tabs\n * are now redundant (thanks to GroupedTabStructure), and could\n * be removed for performance, but for now can stay to help ensure\n * that the tabs get renedered correctly.\n */\n\n $retTabs = array();\n if($showTabs)\n {\n \trequire_once('include/SubPanel/SugarTab.php');\n \t$sugarTab = new SugarTab();\n\n $displayTabs = array();\n $otherTabs = array();\n\n \t foreach ($groups as $key=>$tab)\n \t\t{\n $display = false;\n foreach($tab['modules'] as $subkey=>$subtab)\n {\n if(in_array(strtolower($subtab), $tabs))\n {\n $display = true;\n break;\n }\n }\n\n $selected = '';\n\n if($selectedGroup == $key)\n {\n $selected = 'current';\n }\n\n if($display)\n {\n $relevantTabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $key);\n\n $sugarTabs[$key] = array(//'url'=>'index.php?module=' . $_REQUEST['module'] . '&record=' . $_REQUEST['record'] . '&action=' . $_REQUEST['action']. '&subpanel=' . $key.'#tabs',\n //'url'=>\"javascript:SUGAR.util.retrieveAndFill('index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$_REQUEST['module']}&record={$_REQUEST['record']}&subpanel=$key','subpanel_list',null,null,null);\",\n 'label'=>( !empty($tab['label']) ? $tab['label']: $key ),\n 'type'=>$selected);\n\n $otherTabs[$key] = array('key'=>$key, 'tabs'=>array());\n\n $orderedTabs = array_intersect($relevantTabs, array_map('strtolower', $groups[$key]['modules']));\n\n foreach($orderedTabs as $subkey => $subtab)\n {\n $otherTabs[$key]['tabs'][$subkey] = array('key'=>$subtab, 'label'=>translate($this->subpanel_definitions->layout_defs['subpanel_setup'][$subtab]['title_key']));\n }\n\n if($selectedGroup == $key)\n {\n $displayTabs = $otherTabs[$key]['tabs'];\n $retTabs = $orderedTabs;\n }\n }\n \t\t}\n\n if(empty($displayTabs) && !empty($otherTabs))\n {\n //WDong Bug: 12258 \"All\" tab in the middle of a record's detail view is not localized.\n $selectedGroup = translate('LBL_TABGROUP_ALL');\n $displayTabs = $otherTabs[$selectedGroup]['tabs'];\n $sugarTabs[$selectedGroup]['type'] = 'current';\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n if (!empty($sugarTabs) || !empty($otherTabs) ) {\n \t$sugarTab->setup($sugarTabs, $otherTabs, $displayTabs, $selectedGroup);\n \t$sugarTab->display();\n }\n }\n else\n {\n $tabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $selectedGroup);\n\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n\t\treturn $retTabs;\n\t}", "public function metabox() {\n\n\t\t/**\n\t\t * Initialize the metabox\n\t\t */\n\t\t$cmb = new_cmb2_box( [\n\t\t\t'id' => 'expedia_hotel_data_metabox',\n\t\t\t'title' => __( 'Expedia Hotel Data', 'cmb2' ),\n\t\t\t'object_types' => [ 'hawaii-hotels' ], // Post type\n\t\t\t'context' => 'normal',\n\t\t\t'priority' => 'low',\n\t\t\t'show_names' => false, // Show field names on the left\n\t\t\t'closed' => true, // Metabox is closed by default\n\t\t\t'show_on_cb' => [ $this, 'excludeFromPages' ],\n\t\t] );\n\t}", "public function auction_meta_tab( $tabs ) { \n\n\t\t$tabs[ 'simple_auction' ] = array( \n\t\t\t\t\t'label' => __( 'Auction', 'wcvendors-pro-simple-auctions' ), \n\t\t\t\t\t'target' => 'auction',\n\t\t\t\t\t'class' => array( 'auction_tab', 'show_if_auction', 'hide_if_grouped', 'hide_if_external', 'hide_if_variable', 'hide_if_simple' ),\n\t\t\t\t);\n\n\t\treturn $tabs; \n\t\n\t}", "public function get_tab( $tabs ) {\n\t\t$tabs['tweaks'] = array(\n\t\t\t'label' => __( 'Tweaks', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-car-tilt',\n\t\t);\n\t\treturn $tabs;\n\t}", "public function metabox( $post, $box ) {\r\n\t\t$defaults = array('taxonomy' => 'category');\r\n\t\tif ( !isset($box['args']) || !is_array($box['args']) )\r\n\t\t\t$args = array();\r\n\t\telse\r\n\t\t\t$args = $box['args'];\r\n\t\textract( wp_parse_args($args, $defaults), EXTR_SKIP );\r\n\r\n\t\t$tax = get_taxonomy($taxonomy);\r\n\r\n\t\t//get current terms\r\n\t\t$checked_terms = $post->ID ? get_the_terms( $post->ID, $taxonomy) : array();\r\n\r\n\t\t//get first term object\r\n $current_term = ! empty( $checked_terms ) && ! is_wp_error( $checked_terms ) ? array_pop( $checked_terms ) : false;\r\n $current_id = ( $current_term ) ? $current_term->term_id : '';\r\n\r\n\t\t?>\r\n\t\t<div id=\"taxonomy-<?php echo $taxonomy; ?>\" class=\"radio-buttons-for-taxonomies\">\r\n\t\t\t<ul id=\"<?php echo $taxonomy; ?>-tabs\" class=\"category-tabs\">\r\n\t\t\t\t<li class=\"tabs\"><a href=\"#<?php echo $taxonomy; ?>-all\" tabindex=\"3\"><?php echo $tax->labels->all_items; ?></a></li>\r\n\t\t\t\t<li class=\"hide-if-no-js\"><a href=\"#<?php echo $taxonomy; ?>-pop\" tabindex=\"3\"><?php _e( 'Most Used' ); ?></a></li>\r\n\t\t\t</ul>\r\n\r\n\t\t\t<style>\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.categorychecklist, .radio-buttons-for-taxonomies ul.tagchecklist { margin: 0; }\r\n\t\t\t\t.radio-buttons-for-taxonomies ul.children { margin-left: 18px; }\r\n\t\t\t</style>\r\n\r\n\t\t\t<?php wp_nonce_field( 'radio_nonce-' . $taxonomy, '_radio_nonce-' . $taxonomy ); ?>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-pop\" class=\"wp-tab-panel tabs-panel\" style=\"display: none;\">\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist-pop\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\" >\r\n\t\t\t\t\t<?php $popular = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );\r\n\r\n\t\t\t\t\t\tif ( ! current_user_can($tax->cap->assign_terms) )\r\n\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\"';\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$disabled = '';\r\n\r\n\t\t\t\t\t\t$popular_ids = array(); ?>\r\n\r\n\t\t\t\t\t\t<?php foreach( $popular as $term ){\r\n\r\n\t\t\t\t\t\t\t$popular_ids[] = $term->term_id;\r\n\r\n\t\t\t\t\t $value = is_taxonomy_hierarchical( $taxonomy ) ? $term->term_id : $term->slug;\r\n\t\t\t\t\t $id = 'popular-'.$taxonomy.'-'.$term->term_id;\r\n\r\n\t\t\t\t\t echo \"<li id='$id'><label class='selectit'>\";\r\n\t\t\t\t\t echo \"<input type='radio' id='in-{$id}'\" . checked( $current_id, $term->term_id, false ) . \" value='{$value}' {$disabled} />&nbsp;{$term->name}<br />\";\r\n\r\n\t\t\t\t\t echo \"</label></li>\";\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"<?php echo $taxonomy; ?>-all\" class=\"wp-tab-panel tabs-panel\">\r\n\t\t\t\t<?php\r\n\t $name = 'radio_tax_input[' . $taxonomy . ']';\r\n\t echo \"<input type='hidden' name='{$name}[]' value='0' />\"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.\r\n\t ?>\r\n\t\t\t\t<ul id=\"<?php echo $taxonomy; ?>checklist\" data-wp-lists=\"list:<?php echo $taxonomy?>\" class=\"<?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'categorychecklist'; } else { echo 'tagchecklist';} ?> form-no-clear\">\r\n\t\t\t\t\t<?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<?php if ( current_user_can( $tax->cap->edit_terms ) ) : ?>\r\n\t\t\t\t<div id=\"<?php echo $taxonomy; ?>-adder\" class=\"wp-hidden-children\">\r\n\t\t\t\t\t<h4>\r\n\t\t\t\t\t\t<a id=\"<?php echo $taxonomy; ?>-add-toggle\" href=\"#<?php echo $taxonomy; ?>-add\" class=\"hide-if-no-js\" tabindex=\"3\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t/* translators: %s: add new taxonomy label */\r\n\t\t\t\t\t\t\t\tprintf( __( '+ %s' ), $tax->labels->add_new_item );\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</h4>\r\n\t\t\t\t\t<p id=\"<?php echo $taxonomy; ?>-add\" class=\"category-add wp-hidden-child\">\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>\"><?php echo $tax->labels->add_new_item; ?></label>\r\n\t\t\t\t\t\t<input type=\"text\" name=\"new<?php echo $taxonomy; ?>\" id=\"new<?php echo $taxonomy; ?>\" class=\"form-required form-input-tip\" value=\"<?php echo esc_attr( $tax->labels->new_item_name ); ?>\" aria-required=\"true\"/>\r\n\t\t\t\t\t\t<label class=\"screen-reader-text\" for=\"new<?php echo $taxonomy; ?>_parent\">\r\n\t\t\t\t\t\t\t<?php echo $tax->labels->parent_item_colon; ?>\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t<?php if( is_taxonomy_hierarchical($taxonomy) ) {\r\n\t\t\t\t\t\t\twp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) );\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t<input type=\"button\" id=\"<?php echo $taxonomy; ?>-add-submit\" data-wp-lists=\"add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add\" class=\"button <?php if ( is_taxonomy_hierarchical ( $taxonomy ) ) { echo 'category-add-submit'; } else { echo 'radio-add-submit';} ?>\" value=\"<?php echo esc_attr( $tax->labels->add_new_item ); ?>\" tabindex=\"3\" />\r\n\t\t\t\t\t\t<?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy ); ?>\r\n\t\t\t\t\t\t<span id=\"<?php echo $taxonomy; ?>-ajax-response\"></span>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t</div>\r\n\t<?php\r\n\t}", "public function get_tab( $tabs ) {\n\t\t$tabs['goaccess'] = array(\n\t\t\t'label' => __( 'Goaccess', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-user-chart',\n\t\t);\n\t\treturn $tabs;\n\t}", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "public static function get_tabs_by_menus($mids) {\r\n $results = array();\r\n\r\n $results = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('mid', $mids, 'IN')\r\n ->orderBy('position')\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if ($results) {\r\n foreach ($results as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n $tab->initialize();\r\n }\r\n }\r\n\r\n return $results;\r\n }", "function tab($courseid, $blockid, $forum, $chatid, $groupid, $current_tab = 'description') {\n global $CFG;\n\n $tabs = array();\n $row = array();\n $inactive = array();\n $activated = array();\n\n if (!$groupid) { // Imprime o map somente se houver grupo.\n $inactive[] = 'map';\n }\n\n $row[] = new tabobject('description',\n $CFG->wwwroot.'/blocks/pbltool/view.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid,\n get_string('description', 'block_pbltool'));\n $row[] = new tabobject('tasks',\n $CFG->wwwroot.'/blocks/pbltool/view_tasks.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid ,\n get_string('tasks', 'block_pbltool'));\n $row[] = new tabobject('map',\n $CFG->wwwroot.'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\"\n onclick=\"this.target=\\'map\\'; return\n openpopup(\\'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\\'\n ,\\'map\\', \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('map', 'block_pbltool'));\n $row[] = new tabobject('forum', $CFG->wwwroot.'/mod/forum/view.php?f='.$forum . '&group=' . $groupid . '\"\n onclick=\"this.target=\\'forum\\';\n return openpopup(\\'/mod/forum/view.php?f='.$forum .'&group=' . $groupid .'\\' ,\\'forum\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=1000,height=600\\');',\n get_string('forum', 'block_pbltool'));\n\n if ($groupid) {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('groupchat', 'block_pbltool'));\n } else {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('Chat', 'block_pbltool'));\n }\n\n if (count($row) > 1) {\n $tabs[] = $row;\n return print_tabs($tabs, $current_tab, $inactive, $activated, true);\n }\n}", "function media_upload_tabs($tabs) {\n\t\tif ( $this->is_sp_widget_context() ) {\n\t\t\tunset($tabs['type_url']);\n\t\t}\n\t\treturn $tabs;\n\t}", "public static function getTabsByMenu($menu_id) {\r\n $results = array();\r\n\r\n $results = db_select('{md_megamenu_tabs}', 'mgmt')\r\n ->fields('mgmt')\r\n ->condition('mid', $menu_id, '=')\r\n ->orderBy('position')\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, 'MDMegaTab');\r\n\r\n if ($results) {\r\n foreach ($results as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast('MDMegaTab', $tab);\r\n $tab->initialize();\r\n }\r\n }\r\n\r\n return $results;\r\n }", "public static function metabox() {\n\t\techo SimpleTags_Admin::getDefaultContentBox();\n\t}", "public function metabox_locations() {\n\t\t\tif ( empty( $this->tabs ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\techo '<div id=\"wpseo-local-metabox\">';\n\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\n\t\t\t// Adding a tabbed UI to match the options pages even more.\n\t\t\t$this->tab_navigation();\n\t\t\t$this->tabs_panels();\n\n\t\t\t// Noncename needed to verify where the data originated.\n\t\t\techo '<input type=\"hidden\" name=\"locationsmeta_noncename\" id=\"locationsmeta_noncename\" value=\"' . esc_attr( wp_create_nonce( plugin_basename( __FILE__ ) ) ) . '\" />';\n\n\t\t\techo '</div>';\n\t\t\techo '</div><!-- .wpseo-metabox-content -->';\n\t\t}", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "public function media_upload_tabs($tabs)\n\t{\n\t\tif($_GET['type'] == 'picasa')\n\t\t\treturn array('picasa_upload' => 'Upload', 'picasa_list' => 'Pictures');\n\n\t\treturn $tabs;\n\t}", "public function getMeta(){\n return $this->tabMeta;\n }", "function bp_gtm_tabs($group = false) {\n global $bp, $groups_template;\n $bp_gtm = get_option('bp_gtm');\n if (!$group)\n $group = ( $groups_template->group ) ? $groups_template->group : $bp->groups->current_group;\n\n $bp_gtm_group_settings = get_option('bp_gtm_g_' . $bp->groups->current_group->id . '_settings');\n\n $current_tab = $bp->action_variables[0];\n $gtm_link = bp_get_group_permalink() . $bp->gtm->slug;\n ?>\n\n <?php if (bp_gtm_check_access('project_view')) { ?>\n <li<?php if ('projects' == $current_tab || empty($current_tab)) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/projects\"><?php _e('Projects', 'bp_gtm') ?></a></li>\n <?php } ?>\n\n <?php if (bp_gtm_check_access('task_view')) { ?>\n <li<?php if ('tasks' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/tasks\"><?php _e('Tasks', 'bp_gtm') ?></a></li>\n <?php } ?>\n\n <?php if (bp_gtm_check_access('taxon_view')) { ?>\n <li<?php if ('terms' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/terms\"><?php _e('Classifier', 'bp_gtm') ?></a></li>\n <?php } ?>\n\n <?php if (bp_gtm_check_access('involved_view')) { ?>\n <li<?php if ('involved' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/involved\"><?php _e('Involved', 'bp_gtm') ?></a></li>\n <?php } ?>\n <?php\n if (bp_gtm_check_access('files_view') && $bp_gtm['files'] == 'on') {\n// unlink(WP_CONTENT_DIR.'/uploads/gtm/files/discuss/28_bbpress.2.0.2.zip')\n ?>\n <li<?php if ('files' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/files\"><?php _e('Files', 'bp_gtm') ?></a></li>\n <?php } ?>\n <?php if ($bp_gtm_group_settings['discuss'] == 'on' && bp_gtm_check_access('discuss_view')) { ?>\n <li<?php if ('discuss' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/discuss\"><?php _e('Discussions', 'bp_gtm') ?></a></li>\n <?php } ?>\n\n <?php if (bp_gtm_check_access('settings_view')) { ?>\n <li<?php if ('settings' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/settings\"><?php _e('Settings', 'bp_gtm') ?></a></li>\n <?php } ?>\n\n\n\n <?php do_action('bp_gtm_tabs', $current_tab, $group->slug) ?>\n\n <?php if (bp_gtm_check_access('delete_all')) { ?>\n <li<?php if ('delete' == $current_tab) : ?> class=\"current\"<?php endif; ?>><a href=\"<?php echo $gtm_link ?>/delete\"><?php _e('Delete', 'bp_gtm') ?></a></li>\n <?php\n }\n}", "function the_media_upload_tabs()\n {\n }", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "public function getWizardItems() {}", "public static function getModules()\n\t{\n\t\treturn (new \\App\\Db\\Query())->select(['vtiger_tab.tabid', 'vtiger_tab.tablabel', 'tabname' => 'vtiger_tab.name'])->from('vtiger_field')\n\t\t\t->innerJoin('vtiger_tab', 'vtiger_field.tabid = vtiger_tab.tabid')->where(['uitype' => [15, 16, 33, 115], 'vtiger_field.presence' => [0, 2], 'vtiger_tab.presence' => 0])\n\t\t\t->distinct('vtiger_tab.tabid')->orderBy(['vtiger_tab.tabid' => SORT_ASC])->createCommand()->queryAllByGroup(1);\n\t}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "public function settings_tabs( $tabs ) {\n\t\t$new_tab = array( 'app-vpn' => __( 'APP: VPN - Settings', 'wpcd' ) );\n\t\t$tabs = $tabs + $new_tab;\n\t\treturn $tabs;\n\t}", "public function getContainers()\n\t\t{\n\t\t\treturn $this->getTab( '_options_tab' )->getContainers();\n\t\t}", "function cspm_add_locations_tabs($metabox_object, $metabox_options){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Setting tabs */\r\n\t\t\t \r\n\t\t\t$tabs_setting = array(\r\n\t\t\t\t'args' => $metabox_options,\r\n\t\t\t\t'tabs' => array()\r\n\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Tabs array */\r\n\t\t\t\t \r\n\t\t\t\t$cspm_tabs = array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t \t * Coordinates */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_coordinates', \r\n\t\t\t\t\t\t'title' => 'GPS Coordinates', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_coordinates_fields'\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 \t * Marker */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_marker', \r\n\t\t\t\t\t\t'title' => 'Marker', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_marker_fields'\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 \t * Marker Label\r\n\t\t\t\t\t * @since 5.5 */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_marker_label', \r\n\t\t\t\t\t\t'title' => 'Marker Label', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_marker_label_fields'\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t/**\r\n\t\t\t\t \t * Format & Media */\r\n\t\t\t\t\t \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'id' => 'post_format_and_media', \r\n\t\t\t\t\t\t'title' => 'Format & Media', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_format_and_media'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\r\n\t\t\t\t);\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Custom Fields of the extension \"Submit locations\"\r\n\t\t\t\t * @since 5.3 */\r\n\t\t\t\t\r\n\t\t\t\tif(class_exists('CspmSubmitLocations')){ \r\n\t\t\t\t\t$cspm_tabs[] = array(\r\n\t\t\t\t\t\t'id' => 'post_submited_custom_fields', \r\n\t\t\t\t\t\t'title' => 'Custom Fields', \r\n\t\t\t\t\t\t'callback' => 'cspm_post_submit_locations_custom_fields'\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tforeach($cspm_tabs as $tab_data){\r\n\t\t\t\t \r\n\t\t\t\t\t$tabs_setting['tabs'][] = array(\r\n\t\t\t\t\t\t'id' => 'cspm_' . $tab_data['id'],\r\n\t\t\t\t\t\t'title' => '<span class=\"cspm_tabs_menu_image\"><img src=\"'.$this->plugin_url.'admin/img/add-locations-metabox/'.str_replace('_', '-', $tab_data['id']).'.png\" style=\"width:20px;\" /></span> <span class=\"cspm_tabs_menu_item\">'.esc_attr__( $tab_data['title'], 'cspm' ).'</span>',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'fields' => call_user_func(array($this, $tab_data['callback'])),\r\n\t\t\t\t\t);\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Set tabs */\r\n\t\t\t \r\n\t\t\t$metabox_object->add_field( array(\r\n\t\t\t\t'id' => 'cspm_add_locations_tabs',\r\n\t\t\t\t'type' => 'tabs',\r\n\t\t\t\t'tabs' => $tabs_setting\r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\treturn $metabox_object;\r\n\t\t\t\r\n\t\t}", "public function providerTestHorizontalTabsLabels() {\n return array_reduce($this->themeList, function (array $carry, string $theme_name) {\n $carry[$theme_name] = [\n 'theme_name' => $theme_name,\n ];\n return $carry;\n }, []);\n }", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "public function getClientTabs($package) \n {\n return [\n 'tabClientActions' => Language::_('Cwatch.tab_client_actions', true),\n 'tabClientMalWare' => Language::_('Cwatch.site.malware', true)\n ];\n }", "public function getTabOrder() {}", "public function children() {\n\t\treturn $this->fieldset_children;\n\t}", "function admin_get_settings_sections() {\n $sections = array(\n \n array(\n 'id' => 'wcsales_general_tabs',\n 'title' => esc_html__( 'General', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_settings_tabs',\n 'title' => esc_html__( 'Settings', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_fakes_data_tabs',\n 'title' => esc_html__( 'Fake Data', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_plugins_tabs',\n 'title' => esc_html__( 'Our Plugins', 'wc-sales-notification-pro' )\n ),\n\n );\n return $sections;\n }", "public function meta_box( $post, $metabox ) {\n\t\t$sidebars = get_option( 'ups_sidebars' );\n\t\t$sidebar_id = esc_attr( $metabox['args']['id'] );\n\t\t$sidebar = $sidebars[$sidebar_id];\n\n\t\t$options_fields = array(\n\t\t\t'name' => 'Name',\n\t\t\t'description' => __('Description', self::TEXT_DOMAIN),\n\t\t\t'before_title' => __('Before Title', self::TEXT_DOMAIN),\n\t\t\t'after_title' => __('After Title', self::TEXT_DOMAIN),\n\t\t\t'before_widget' => __('Before Widget', self::TEXT_DOMAIN),\n\t\t\t'after_widget' => __('After Widget', self::TEXT_DOMAIN),\n\t\t\t'children' => __('Child Behavior', self::TEXT_DOMAIN),\n\t\t);\n\n\t\t$post_types = get_post_types( array( '_builtin' => false ), 'objects' );\n\t\t$post_types = array_merge( $post_types, array( 'page' => get_post_type_object( 'page' ), 'post' => get_post_type_object( 'post' ) ) );\n\t\t?>\n\t\t<div style=\"float: left; width: 25%;\">\n\t\t\t<ul class=\"wp-tab-bar\">\n\t\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t\t<li <?php echo ($i == 0) ? 'class=\"wp-tab-active\"' : ''; ?>>\n\t\t\t\t\t\t<a href=\"#post-type-<?php echo esc_attr( $post_type->name ); ?>\">\n\t\t\t\t\t\t\t<?php echo esc_html( $post_type->labels->name ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t<?php ++$i; endforeach; ?>\n\t\t\t</ul>\n\t\t\t<?php $i = 0; foreach ( $post_types as $post_type ) : ?>\n\t\t\t\t<div class=\"wp-tab-panel\" id=\"post-type-<?php echo esc_attr( $post_type->name ); ?>\" <?php echo ($i > 0) ? 'style=\"display: none;\"' : ''; ?>>\n\t\t\t\t\t<?php\n\t\t\t\t\t$items = new WP_Query( array(\n\t\t\t\t\t\t'offset' => 0,\n\t\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t\t'orderby' => 'title',\n\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t'post_type' => $post_type->name,\n\t\t\t\t\t\t'suppress_filters' => true,\n\t\t\t\t\t\t'update_post_term_cache' => false,\n\t\t\t\t\t\t'update_post_meta_cache' => false,\n\t\t\t\t\t\t'no_found_posts' => true,\n\t\t\t\t\t) );\n\t\t\t\t\tif ( $items->have_posts() ) : ?>\n\t\t\t\t\t\t<ul id=\"<?php echo esc_attr( $post_type->name ); ?>checklist\" class=\"categorychecklist form-no-clear\">\n\t\t\t\t\t\t\t<?php while ( $items->have_posts() ) : $items->the_post(); ?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t<?php $name = 'ups_sidebars[' . $sidebar_id . '][locations][' . $post_type->name . '][' . get_the_ID() . ']'; ?>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" class=\"menu-item-checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( get_the_title( get_the_ID() ) ); ?>\" <?php echo ( isset( $sidebar['locations'][$post_type->name] ) && array_key_exists( get_the_ID(), $sidebar['locations'][$post_type->name] ) ) ? 'checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( get_the_title( get_the_ID() ) ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t<?php endwhile; ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t<?php ++$i; endforeach; ?>\n\t\t</div>\n\t\t<script>\n\t\tjQuery(document).ready( function($) {\n\t\t\t// WP tabs\n\t\t\t$('.wp-tab-bar a').click(function(event){\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// Limit effect to the container element.\n\t\t\t\tvar context = $(this).parents('.wp-tab-bar').first().parent();\n\t\t\t\t$('.wp-tab-bar li', context).removeClass('wp-tab-active');\n\t\t\t\t$(this).parents('li').first().addClass('wp-tab-active');\n\t\t\t\t$('.wp-tab-panel', context).hide();\n\t\t\t\t$( $(this).attr('href'), context ).show();\n\t\t\t});\n\n\t\t\t// Make setting wp-tab-active optional.\n\t\t\t$('.wp-tab-bar').each(function(){\n\t\t\t\tif ( $('.wp-tab-active', this).length )\n\t\t\t\t\t$('.wp-tab-active', this).click();\n\t\t\t\telse $('a', this).first().click();\n\t\t\t});\n\t\t});\n\t\t</script>\n\t\t<div style=\"float: right; width: 70%;\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php foreach ( $options_fields as $id => $label ) : ?>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><label for=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"><?php echo esc_html( $label ); ?></label></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t<?php if ( 'children' == $id ) : ?>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( array_key_exists( 'children', $sidebar ) && $sidebar['children'] == 'on' ) {\n\t\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"on\" id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\"<?php echo $checked; ?> />\n\t\t\t\t\t\t<span class=\"description\"><?php _e('Set page children to use the parent page sidebar by default?', self::TEXT_DOMAIN) ?></span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<input id=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" class=\"regular-text\" type=\"text\" name=\"ups_sidebars[<?php echo esc_attr( $sidebar_id ); ?>][<?php echo esc_attr( $id ); ?>]\" value=\"<?php echo esc_html( $sidebar[$id] ); ?>\" />\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"clear submitbox\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save all sidebars', self::TEXT_DOMAIN) ?>\" />&nbsp;&nbsp;&nbsp;\n\t\t\t<label><input type=\"checkbox\" name=\"ups_sidebars[delete]\" value=\"<?php echo esc_attr( $sidebar_id ); ?>\" /> <?php _e('Delete this sidebar?', self::TEXT_DOMAIN) ?></label>\n\t\t</div>\n\t\t<?php\n\t}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "public function getToolbarItems();", "public function getShowGroups(): array;", "function activity_tabs_filtermenu($hook, $type, $returnvalue, $params){\n if(elgg_get_context() == 'activity_tabs' && elgg_is_logged_in()){\n $check = $returnvalue;\n \n foreach($check as $key => $item){\n switch($item->getName()){\n case 'all':\n $url = elgg_get_site_url() . 'activity/all';\n $item->setHref($url);\n $returnvalue[$key] = $item;\n break;\n case 'mine':\n $url = elgg_get_site_url() . 'activity/owner/' . elgg_get_logged_in_user_entity()->username;\n $item->setHref($url);\n $returnvalue[$key] = $item;\n break;\n case 'friend':\n $url = elgg_get_site_url() . 'activity/friends/' . elgg_get_logged_in_user_entity()->username;\n $item->setHref($url);\n $returnvalue[$key] = $item;\n break;\n default:\n break;\n }\n }\n \n return $returnvalue;\n }\n}", "function group_get_menu_tabs() {\n global $USER;\n static $menu;\n\t\n $group = group_current_group();\n if (!$group) {\n return null;\n }\n\t\n\t//Start-Anusha\n\tif($group->outcome){\n\t\t$groupmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t//End-Anusha\n\t\n\t//Start-Eshwari\n\tif($group->courseoutcome){\n\t\t$groupcoursemem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t//End-Eshwari\n\t//Start-Eshwari\n\t\n\tif($group->courseoffering){\n\t\t$groupofferingmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t/*\n $menu = array(\n 'info' => array(\n 'path' => 'coursetemplate/info',\n 'url' => 'coursetemplate/view.php?id='.$group->id,\n\n 'title' => 'About',\n 'weight' => 20\n ),\n\t);\n\t*/\n\t//End-Eshwari\n\t $menu = array(\n 'info' => array(\n 'path' => 'groups/info',\n 'url' => 'group/view.php?id='.$group->id,\n 'title' => get_string('About', 'group'),\n\n\n 'weight' => 20\n ),\n\t);\n//Start-Anusha\n\tif($groupmem){\n\t\tif($groupmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n//End-Anusha\n\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n//Start-Anusha\n\t}\n\t//Start-Eshwari \n\t\n\tif($groupcoursemem){\n\t\tif($groupcoursemem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\tif($groupofferingmem){\n\t\tif($groupofferingmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\t\n\t//End-Eshwari\n\t/*\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'coursetemplate/subgroups',\n\t\t\t\t'url' => 'coursetemplate/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Template',\n\t\t\t\t'weight' => 35\n\t\t);\n\t//End of subgroup logic by Shashank\n\t*/\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'groups/subgroups',\n\t\t\t\t'url' => 'group/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Groups',\n\t\t\t\t'weight' => 35\n\t\t);\n//End of subgroup logic by Shashank\n//End-Anusha\t\n if ($group->public || group_user_access($group->id)) {\n $menu['forums'] = array( // @todo: get this from a function in the interaction plugin (or better, make forums an artefact plugin)\n 'path' => 'groups/forums',\n 'url' => 'interaction/forum/index.php?group='.$group->id,\n 'title' => get_string('nameplural', 'interaction.forum'),\n 'weight' => 40,\n );\n }\n\t/*\n $menu['views'] = array(\n 'path' => 'coursetemplate/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n\n 'title' => 'Views',\n 'weight' => 50,\n );\n\t*/\n\t $menu['views'] = array(\n 'path' => 'groups/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n 'title' => get_string('Views', 'group'),\n\n\n 'weight' => 50,\n );\n//Start-Anusha\nif($group->outcome){\n $menu['outcome'] = array(\n 'path' => 'groups/outcomes',\n 'url' => 'group/groupoutcome.php?group='.$group->id,\n 'title' => 'Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Anusha\n//Start-Eshwari\n\nif($group->courseoutcome){\n $menu['courseoutcome'] = array(\n 'path' => 'groups/courseofferings',\n 'url' => 'group/groupcourseoffering.php?group='.$group->id,\n 'title' => 'Course offering Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Eshwari\n\n\n if (group_user_access($group->id)) {\n safe_require('grouptype', $group->grouptype);\n $artefactplugins = call_static_method('GroupType' . $group->grouptype, 'get_group_artefact_plugins');\n if ($plugins = get_records_array('artefact_installed', 'active', 1)) {\n foreach ($plugins as &$plugin) {\n if (!in_array($plugin->name, $artefactplugins)) {\n continue;\n }\n safe_require('artefact', $plugin->name);\n $plugin_menu = call_static_method(generate_class_name('artefact',$plugin->name), 'group_tabs', $group->id);\n $menu = array_merge($menu, $plugin_menu);\n }\n }\n }\n\n if (defined('MENUITEM')) {\n $key = substr(MENUITEM, strlen('groups/'));\n if ($key && isset($menu[$key])) {\n $menu[$key]['selected'] = true;\n }\n }\n\n return $menu;\n}", "function activity_tabs_pagesetup($event, $object_type, $object){\n // register filter tabs\n $context = elgg_get_context();\n \n if(elgg_is_logged_in() && ($context == 'activity' || $context == 'activity_tabs')){\n $user = elgg_get_logged_in_user_entity();\n $filter_context = get_input('filter_context', FALSE);\n $collections = get_user_access_collections($user->guid);\n $groups = $user->getGroups('', 0);\n \n // iterate through collections and add tabs as necessary\n foreach($collections as $collection){\n $name = $collection->name;\n \n // ignore group acls, they will be done in the groups section\n if(substr($name, 0, 7) == 'Group: ') {\n continue; \n }\n \n $collectionid = \"collection_\" . $collection->id;\n $enable = elgg_get_plugin_user_setting($collectionid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($collectionid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $collectionid,\n 'text' => $name,\n 'href' => \"activity_tabs/collection/{$collection->id}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $collectionid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n \n // iterate through groups and add tabs as necessary\n foreach($groups as $group){\n $name = $group->name;\n \n $groupid = \"group_\" . $group->guid;\n $enable = elgg_get_plugin_user_setting($groupid, $user->guid, 'mt_activity_tabs');\n $order = elgg_get_plugin_user_setting($groupid . \"_priority\", $user->guid, 'mt_activity_tabs');\n $priority = 500;\n if(is_numeric($order)){\n $priority += $order;\n }\n \n if($enable == 'yes'){\n // we need to create a tab\n $tab = array(\n 'name' => $groupid,\n 'text' => $name,\n 'href' => \"activity_tabs/group/{$group->guid}/\" . elgg_get_friendly_title($name),\n 'selected' => ($filter_context == $groupid),\n 'priority' => $priority,\n );\n \n elgg_register_menu_item('filter', $tab);\n }\n }\n \n // register menu item for configuring tabs\n $link = array(\n 'name' => 'configure_activity_tabs',\n 'text' => elgg_echo('activity_tabs:configure'),\n 'href' => 'settings/plugins/' . $user->username,\n );\n \n elgg_register_menu_item('page', $link);\n }\n}", "public function add_the_meta_boxes() {\n\t add_meta_box(\n\t 'spat_options_metabox'\t\t\t\t\t// ID\n\t , __( 'Subpages As Tabs Options' ) \t\t// Title\n\t , array( $this, 'plugin_options_form' ) // Render Code function\n\t , $this->pagehook\t\t\t\t\t\t\t// Page hook\n\t , 'normal'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\n\t add_meta_box(\n\t 'spat_demo_metabox'\t\t\t\t\t// ID\n\t , __( 'Preview' )\t\t\t\t\t\t\t// Title\n\t , array( $this, 'plugin_demo_page' ) \t// Render Code Function\n\t , $this->pagehook\t\t\t\t\t\t// Page hook\n\t , 'side'\t\t\t\t\t\t\t\t// Context\n\t , 'core'\t\t\t\t\t\t\t\t// ??\n\t );\n\t }", "function tabify_add_meta_boxes($post_type)\n {\n }", "function get_settings(){\n $settings = array(\n 'section_title' => array(\n 'name' => __('GWP Custom Tabs','GWP'),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wc_'.$this->id.'_section_title'\n ),\n 'title' => array(\n 'name' => __( 'Global Custom Tabs', 'GWP' ),\n 'type' => $this->post_type,\n 'desc' => __( 'Start typing the Custom Tab name, Used for including custom tabs on all products.', 'GWP' ),\n 'desc_tip' => true,\n 'default' => '',\n 'id' => 'wc_'.$this->id.'_globals'\n ),\n 'section_end' => array(\n 'type' => 'sectionend',\n 'id' => 'wc_'.$this->id.'_section_end'\n )\n );\n return apply_filters( 'wc_'.$this->id.'_settings', $settings );\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "public function metabox_start( $post ) {\n\t\t\tif ( ! $post ) global $post;\n\n\t\t\tif ( ! in_array( $post->post_type, $this->_meta_box['pages'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$pageTpl = null;\n\t\t\t$tabbed = ( $this->_meta_box['tabs'] ) ? ( ' jquery-ui-tabs' ) : ( '' );\n\t\t\t$metaFields = $this->_fields;\n\n\t\t\tif ( 'page' == $post->post_type ) {\n\t\t\t\t$pageTpl = get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\t\tif ( $post->ID == get_option( 'page_for_posts' ) )\n\t\t\t\t\t$pageTpl = 'blog-page';\n\t\t\t}\n\n\t\t\twp_nonce_field( 'wm-' . $post->post_type . '-metabox-nonce', $post->post_type . '-metabox-nonce' );\n\n\t\t\t//display meta box form HTML\n\t\t\t$out = '<div class=\"wm-wrap meta meta-special' . $tabbed . '\">';\n\n\t\t\t\t//tabs\n\t\t\t\tif ( $tabbed ) {\n\t\t\t\t\t$out .= '<ul class=\"tabs no-js\">';\n\t\t\t\t\t$out .= '<li class=\"item-0 visual-editor\"><a href=\"#wm-meta-visual-editor\">' . __( 'Content', 'clifden_domain_adm' ) . '</a></li>';\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ( $metaFields as $tab ) {\n\t\t\t\t\t\tif ( 'section-open' == $tab['type'] ) {\n\t\t\t\t\t\t\t$hideThis = null;\n\t\t\t\t\t\t\tif ( 'page' == $post->post_type && isset( $tab['exclude'] ) && in_array( $pageTpl, $tab['exclude'] ) ) {\n\t\t\t\t\t\t\t\t$hideThis = ' hide';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= '<li class=\"item-' . ++$i . $hideThis . ' ' . $tab['section-id'] . '\"><a href=\"#wm-meta-' . $tab['section-id'] . '\">' . $tab['title'] . '</a></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$out .= '</ul> <!-- /tabs -->';\n\t\t\t\t}\n\n\t\t\techo $out;\n\n\t\t\t$editorTabContent = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"section-open\",\n\t\t\t\t\t\"section-id\" => \"visual-editor\",\n\t\t\t\t\t\"exclude\" => array( 'page-template/redirect.php', 'tpl-redirect.php' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//Content\n\t\t\twm_render_form( $editorTabContent, 'meta', $pageTpl );\n\t\t}", "private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }", "function get_posts_tabs() { ?>\n\t<div id=\"custom-post-tabs\">\n\t<ul class=\"tab-links\">\n\t <li><a href=\"#recommended-posts\">Recommended Posts</a></li>\n\t <li><a href=\"#popular-posts\">Popular Posts</a></li>\n\t <li><a href=\"#latest-posts\">Latest Posts</a></li>\n\t <?php \n\t get_recommended_posts();\n\t get_popular_posts();\n\t get_latest_posts();\n\t ?>\n \t</ul>\n\t</div>\n<?php }", "public function getCMSFields()\n {\n // Obtain Field Objects (from parent):\n \n $fields = parent::getCMSFields();\n \n // Create Options Tab:\n \n $fields->findOrMakeTab('Root.Options', $this->fieldLabel('Options'));\n \n // Create Options Fields:\n \n $fields->addFieldsToTab(\n 'Root.Options',\n [\n FieldSection::create(\n 'PortfolioOptions',\n $this->fieldLabel('Portfolio'),\n [\n TextField::create(\n 'DetailsHeading',\n $this->fieldLabel('DetailsHeading')\n )\n ]\n )\n ]\n );\n \n // Answer Field Objects:\n \n return $fields;\n }", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}" ]
[ "0.7050983", "0.7008031", "0.690626", "0.6795968", "0.674689", "0.67398816", "0.6668108", "0.6623027", "0.65878767", "0.65535724", "0.65348864", "0.6534217", "0.6385173", "0.63541055", "0.632926", "0.62576264", "0.6234833", "0.6197593", "0.61965984", "0.61478937", "0.61330837", "0.6103112", "0.60866266", "0.5984418", "0.59585977", "0.59401834", "0.58926594", "0.5867581", "0.5863615", "0.5830513", "0.5819103", "0.5804553", "0.580239", "0.5800339", "0.57976675", "0.57551914", "0.57495636", "0.57483655", "0.5722863", "0.5686896", "0.5665582", "0.5664377", "0.5661658", "0.56421906", "0.5640181", "0.5584834", "0.5561535", "0.55572414", "0.5525711", "0.55198735", "0.55111206", "0.54973525", "0.5486732", "0.54607064", "0.54484427", "0.54472435", "0.5432765", "0.5427298", "0.5425647", "0.5413704", "0.540793", "0.5363245", "0.5358366", "0.53553593", "0.53548604", "0.5330816", "0.5325078", "0.52978015", "0.5277139", "0.52747875", "0.5270105", "0.5259801", "0.5257852", "0.52576506", "0.5229666", "0.5225751", "0.5225512", "0.5223584", "0.5223495", "0.5219294", "0.52020305", "0.5193928", "0.51937133", "0.5188144", "0.51871425", "0.5186432", "0.517643", "0.5176181", "0.5169099", "0.51677483", "0.51616365", "0.5157495", "0.5153777", "0.5153544", "0.5150821", "0.51497036", "0.5142496", "0.5133612", "0.5124815", "0.51225954" ]
0.80395633
0
Return an array that combines all fields that will go on all tabs.
public function all_fields() { $general_fields = $this->general_fields(); $promo_fields = $this->promotional_fields(); $script_fields = $this->scripts_fields(); $all_fields = array_merge( $general_fields, $promo_fields, $script_fields ); return $all_fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getFields()\n {\n return array(\n 'xf_tab_name' => array(\n 'tab_name_id' => array(\n 'type' => self::TYPE_UINT,\n 'autoIncrement' => true\n ), /* END 'tab_name_id' */\n 'display_order' => array(\n 'type' => self::TYPE_UINT,\n 'default' => 0\n ), /* END 'display_order' */\n )\n );\n }", "public function getMyTabs() {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab'=>'core_form_tab'],'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs'=>$this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach($oMyTabsDB as $oTab) {\n # Order By Form\n if(!array_key_exists($oTab->form,$aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public function getMyTabs()\n {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab' => 'core_form_tab'], 'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs' => $this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach ($oMyTabsDB as $oTab) {\n # Order By Form\n if (! array_key_exists($oTab->form, $aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }", "public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "function getTableFields(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $sql = \"SELECT field_name, field_label\n\t\t FROM export_tabs_fields\n\t\t WHERE source_id = '\".$this->penelopeTabID.\"' ORDER BY field_num ; \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$tableFields = array();\n\t\t\t\t$tableFields[] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t\t\t\n\t\t\t\t$tableFieldsTemp = array();\n\t\t\t\t$tableFieldsTemp[self::primaryKeyField] = self::primaryKeyFieldLabel; //always start with the primary key\n\t\t \n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $tableFields[] = $row[\"field_label\"];\n\t\t\t\t\t $tableFieldsTemp[$row[\"field_name\"]] = $row[\"field_label\"];\n\t\t\t\t}\n\t\t\t\t$this->tableFieldsTemp = $tableFieldsTemp;\n\t\t\t\t$this->tableFields = $tableFields;\n\t\t }\n\t\t else{\n\t\t\t\treturn false;\n\t\t }\n\t\t \n\t }", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "function acf_get_combined_field_group_settings_tabs() {\n\t$default_field_group_settings_tabs = array(\n\t\t'location_rules' => __( 'Location Rules', 'acf' ),\n\t\t'presentation' => __( 'Presentation', 'acf' ),\n\t\t'group_settings' => __( 'Group Settings', 'acf' ),\n\t);\n\n\t$field_group_settings_tabs = (array) apply_filters( 'acf/field_group/additional_group_settings_tabs', array() );\n\n\t// remove any default tab values from the filter tabs.\n\tforeach ( $field_group_settings_tabs as $key => $tab ) {\n\t\tif ( isset( $default_field_group_settings_tabs[ $key ] ) ) {\n\t\t\tunset( $field_group_settings_tabs[ $key ] );\n\t\t}\n\t}\n\n\t$combined_field_group_settings_tabs = array_merge( $default_field_group_settings_tabs, $field_group_settings_tabs );\n\n\treturn $combined_field_group_settings_tabs;\n}", "private function getTabsThatUseAssignmentFilters() {\n $result = array();\n\n $assignment_filter_tabs = DB::execute(\"SELECT id, raw_additional_properties FROM \" . TABLE_PREFIX . \"homescreen_tabs WHERE type = 'AssignmentFiltersHomescreenTab'\");\n if($assignment_filter_tabs) {\n foreach($assignment_filter_tabs as $assignment_filter_tab) {\n $tab_properties = $assignment_filter_tab['raw_additional_properties'] ? unserialize($assignment_filter_tab['raw_additional_properties']) : null;\n\n $tab_filter_id = $tab_properties && isset($tab_properties['assignment_filter_id']) && $tab_properties['assignment_filter_id'] ? (integer) $tab_properties['assignment_filter_id'] : 0;\n\n if($tab_filter_id) {\n if(array_key_exists($tab_filter_id, $result)) {\n $result[$tab_filter_id][] = (integer) $assignment_filter_tab['id'];\n } else {\n $result[$tab_filter_id] = array((integer) $assignment_filter_tab['id']);\n } // if\n } // if\n } // foreach\n } // if\n\n return $result;\n }", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "public function getTabs(): array\n {\n return $this->tabs;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function fields(){\n\t\treturn array();\n\t}", "private function set_fields() {\r\n\r\n\t\t$fields = array();\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_billing' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_shipping' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_additional' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\treturn $fields;\r\n\t}", "public function getUniqueActiveFields(): array\n {\n return ['field', 'otherfield'];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "protected function get_tabs_for_filter_dialog() {\n\t\treturn array();\n\t}", "public function getFields(): array\n {\n $group = [\n 'id' => $this->id,\n 'name' => $this->name,\n 'status' => $this->status,\n 'owner_id' => $this->owner_id,\n 'rejected_at' => $this->rejected_at,\n 'deleted_at' => $this->deleted_at\n ];\n\n if (get_class($this->owner) !== Reference::class) {\n $group['owner'] = $this->owner->getFields();\n }\n\n return $group;\n }", "public static function getDataHtmlFields(): array\n {\n $data = [];\n\n if ($records = PqrHtmlField::findAllByAttributes([\n 'active' => 1\n ])) {\n foreach ($records as $PqrHtmlField) {\n $data[] = $PqrHtmlField->getDataAttributes();\n }\n }\n\n return $data;\n }", "public function fields()\n {\n return [ \n ];\n }", "public function getFields()\n\t{\n\t\treturn [];\n\t}", "public function getFieldsArray() {\n\t\t\treturn $this->fields_array;\n\t\t}", "private function getFields()\n {\n return [\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"first_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"last_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"happy\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"select\",\n \"field_name\" => \"character\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => [\n [\"value\" => \"biff\", \"label\" => \"Biff\"],\n [\"value\" => \"marty\", \"label\" => \"Marty\"],\n [\"value\" => \"doc\", \"label\" => \"Doc Brown\"],\n [\"value\" => \"jennifer\", \"label\" => \"Jennifer\"],\n [\"value\" => \"needles\", \"label\" => \"Needles\"],\n ]\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"kids\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n ];\n }", "public function get_fields()\n {\n return [\n \"isys_catg_shares_list__title\" => \"LC__CMDB__CATG__SHARES__SHARE_NAME\",\n \"object\" => \"LC__POPUP__BROWSER__SELECTED_OBJECT\",\n \"isys_catg_share_access_list__mountpoint\" => \"LC__CMDB__CATG__SHARE_ACCESS__MOUNTPOINT\"\n ];\n }", "public function getFields() : array\n {\n return get_object_vars($this);\n }", "public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }", "public function getAllFields()\n {\n return array_merge($this->_fields, $this->_changedFields);\n }", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }", "public function admin_get_fields($tableName)\n {\n $output = [];\n $columns_res = $this->query('SHOW FULL COLUMNS FROM `' . $tableName . '`');\n if ($columns_res !== false) {\n while ($fieldRow = $columns_res->fetch_assoc()) {\n $output[$fieldRow['Field']] = $fieldRow;\n }\n $columns_res->free();\n }\n return $output;\n }", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function getTerminalFieldsObjects() {}", "public function getAllFields();", "public function get_fields()\n {\n return [\n \"isys_catg_invoice_list__denotation\" => \"LC__CMDB__CATG__TITLE\",\n \"isys_catg_invoice_list__amount\" => \"LC__CMDB__CATG__INVOICE__AMOUNT\",\n \"isys_catg_invoice_list__date\" => \"LC__CMDB__CATG__INVOICE__DATE\",\n \"isys_catg_invoice_list__edited\" => \"LC__CMDB__CATG__INVOICE__EDITED\",\n \"isys_catg_invoice_list__financial_accounting_delivery\" => \"LC__CMDB__CATG__INVOICE__FINANCIAL_ACCOUNTING_DELIVERY\",\n \"isys_catg_invoice_list__charged\" => \"LC__CMDB__CATG__INVOICE__CHARGED\",\n ];\n }", "public function get_fields()\n {\n return [\n \"isys_cats_chassis_slot_list__title\" => \"LC__CMDB__LOGBOOK__TITLE\",\n \"isys_chassis_connector_type__title\" => \"LC__CMDB__CATS__CHASSIS__CONNECTOR_TYPE\",\n \"isys_cats_chassis_slot_list__insertion\" => \"LC__CMDB__CATS__CHASSIS__INSERTION\",\n \"assigned_items\" => \"LC__CMDB__CATS__CHASSIS__ASSIGNED_DEVICES\"\n ];\n }", "function ywccp_get_all_custom_fields(){\r\n\t\t\r\n\t\t$fields = array();\r\n\t\t// get billing\r\n\t\t$fields['billing'] = ywccp_get_custom_fields('billing');\r\n\t\t// get shipping\r\n\t\t$fields['shipping'] = ywccp_get_custom_fields('shipping');\r\n\t\t// get additional\r\n\t\t$fields['additional'] = ywccp_get_custom_fields('additional');\r\n\t\t\r\n\t\treturn $fields;\r\n\t}", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "function _get_fields()\n\t{\n\t\tglobal $DB;\n\t\n\t\tif ( ! isset($this->cache['fields']))\n\t\t{\n\t\t\t$this->cache['fields'] = array();\n\n\t\t\t$query = $DB->query('SELECT field_id FROM exp_weblog_fields\n\t\t\t WHERE field_type = \"ftype_id_'.$this->_fieldtype_id.'\"');\n\t\t\tif ($query->num_rows)\n\t\t\t{\n\t\t\t\tforeach($query->result as $row)\n\t\t\t\t{\n\t\t\t\t\t$this->cache['fields'][] = 'field_id_'.$row['field_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->cache['fields'];\n\t}", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'storeId' => function ($model) {\n return (string)$model->storeId;\n },\n 'phone', 'badge', 'name', 'gender', 'birthday','channel','qrcodeUrl',\n 'isActivated' => function ($model) {\n $status = $model->isActivated ? 'ENABLE' : 'DISABLE';\n return $status;\n },\n 'accountId' => function ($model) {\n return (string) $model->accountId;\n },\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt, 'Y-m-d H:i:s');\n },\n ]\n );\n }", "public function get_tabs() {\n return $this->_tabs;\n }", "public function Fields()\n {\n foreach ($this->getExtraFields() as $field) {\n if (!$this->fields->fieldByName($field->getName())) {\n $this->fields->push($field);\n }\n }\n\n return $this->fields;\n }", "public function getCurrentDisplayFields(){\n\t\treturn array(\n\t\t\t'Number'=>'Number',\n\t\t\t'Title'=>'Title',\n\t\t\t'ParentName'=>'Flowchart Page'\n\t\t);\n\t}", "public function get_fields()\n {\n $l_table = $this->m_cat_dao->get_table();\n $l_properties = $this->m_cat_dao->get_properties();\n\n return [\n $l_table . '__id' => 'ID',\n $l_table . '__key' => $l_properties['key'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__value' => $l_properties['value'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__group' => $l_properties['group'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n 'isys_catg_identifier_type__title' => $l_properties['type'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE]\n ];\n }", "public function get_fields()\n {\n return [\n 'isys_catg_emergency_plan_list__title' => 'LC__CMDB__CATG__EMERGENCY_PLAN_TITLE',\n 'isys_obj_type__title' => 'LC__CMDB__OBJTYPE',\n 'isys_obj__title' => 'LC__CMDB__CATG__GLOBAL_TITLE',\n 'isys_cats_emergency_plan_list__calc_time_need' => 'LC__CMDB__CATS__EMERGENCY_PLAN_CALC_TIME_NEEDED',\n 'practice_date' => 'LC__CMDB__CATS__EMERGENCY_PLAN_PRACTICE_ACTUAL_DATE'\n ];\n }", "public function getFieldsData()\n {\n $cacheKey = $this->getCacheKey();\n\n if (isset($this->getFieldsDataCache[$cacheKey])) {\n\n return $this->getFieldsDataCache[$cacheKey];\n }\n\n $data = array();\n $db = \\Database::getInstance()->prepare(\"\n SELECT * FROM (\n SELECT\n ld.master_id AS id,\n IFNULL(ff.name, ld.name) AS name,\n IF(ff.label IS NULL OR ff.label='', ld.name, ff.label) AS label,\n ff.type,\n ff.options,\n ld.field_id,\n ld.sorting\n FROM tl_lead_data ld\n LEFT JOIN tl_form_field ff ON ff.id=ld.master_id\n LEFT JOIN tl_lead l ON ld.pid=l.id\n WHERE l.master_id=?\" . (!empty($this->fieldIds) ? (\" AND ld.field_id IN (\" . implode(',', $this->fieldIds) . \")\") : \"\") . \"\n ORDER BY l.master_id!=l.form_id\n ) ld\n GROUP BY field_id\n ORDER BY \" . (!empty($this->fieldIds) ? \\Database::getInstance()->findInSet(\"ld.field_id\", $this->fieldIds) : \"sorting\")\n )->execute($this->formId);\n\n while ($db->next()) {\n $data[$db->id] = $db->row();\n }\n\n $this->getFieldsDataCache[$cacheKey] = $data;\n\n return $data;\n }", "public function fields()\n {\n $fields = array();\n\n foreach ($this->_data as $field => $row)\n {\n $fields[$field] = $row['value'];\n }\n\n return $fields;\n }", "public function get_settings_tabs() {\n\t\t// Sort by order, where higher number means earlier output.\n\t\tusort(\n\t\t\t$this->arr_settings_tabs,\n\t\t\tfunction( $a, $b ) {\n\t\t\t\t$a_order = $a['order'] ?? 0;\n\t\t\t\t$b_order = $b['order'] ?? 0;\n\t\t\t\treturn $b_order <=> $a_order;\n\t\t\t}\n\t\t);\n\n\t\treturn $this->arr_settings_tabs;\n\t}", "abstract public function getFields(): array;", "public function getFields(): array\n {\n $fields = [];\n\n foreach ($this->getGroups() as $group) {\n foreach ($group->fields as $field) {\n $fields[$field->id ?? \\count($fields)] = $field;\n }\n }\n\n return $fields;\n }", "public function fields(): array\n {\n return MyField::withSlug('name', MyField::withMeta([\n MyField::relation('categories')\n ->fromModel(ProductCategory::class, 'name')\n ->multiple(),\n MyField::uploadMedia(),\n MyField::input('price')\n ->step(0.001)\n ->required(),\n MyField::input('discount')\n ->step(0.001)\n ->required(),\n MyField::quill('body'),\n MyField::switcher('is_active')\n ->value(true)\n ]));\n }", "function get_field_list()\n\t{\n\t\t$fields = array();\n\n\n\t\t$this->xhr_output($fields);\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "protected function _getSectionsFields()\n {\n $arr = array(\n 'general' => array( // This is a section. See `getSectionId()` for how it gets transformed into an actual section name.\n 'label' => $this->__('General Settings'),\n 'header' => $this->__('General settings about imported posts.'),\n // If 'header' is present, it will be used. If it's a callable, its return value will be used.\n 'fields' => array( // An array of fields, by field code\n 'post_type' => array(\n 'label' => $this->__('Post Type'),\n 'type' => 'select',\n // Type can be one of the existing renderer types (select, checkbox, number, text), or make your own! See `_getFieldRenderers()`\n 'value' => $this->createCommand(array($this, 'getApiLoginOptions')),\n // If no value, it is automatically taken from the local data with the field's ID as key!\n // If value is present, it will be used. If it's a callable, its return value will be used.\n )\n ),\n ),\n );\n return $arr;\n }", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "public function getAllFields()\n {\n return $this->fields;\n }", "public static function getFields() {\n return array(\n new TextField( array(\n 'name' => 'name',\n 'public' => array(\n 'title' => 'Title',\n 'description' => 'The name of the link that the\n element will describe',\n ),\n ) ),\n new TextField( array(\n 'name' => 'blurb',\n 'public' => array(\n 'title' => 'Blurb',\n 'description' => 'Short blurb that can be displayed about\n the nature of the link',\n ),\n ) ),\n new TextField( array(\n 'name' => 'image',\n 'public' => array(\n 'title' => 'Image',\n 'description' => 'The image to be dispalyed on the front.',\n ),\n ) ),\n new TextField( array(\n 'name' => 'link',\n 'public' => array(\n 'title' => 'Link',\n 'description' => 'The actual link clicking the element will\n result in.',\n ),\n ) ),\n );\n }", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "public function fields(): array\n {\n return [];\n }", "protected function _getFields()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t\t'bookmark_content'\t=> array(\r\n\t\t\t\t'bookmark_id'\t\t=> array('type' => self::TYPE_UINT, 'autoIncrement' => true),\r\n\t\t\t\t'bookmark_tag'\t\t=> array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 25),\r\n\t\t\t\t'content_type' \t=> array('type' => self::TYPE_STRING, 'maxLength' => 25, 'required' => true),\r\n\t\t\t\t'content_id' \t => array('type' => self::TYPE_UINT, 'required' => true),\r\n\t\t\t\t'content_user_id' => array('type' => self::TYPE_UINT, 'required' => true),\r\n\t\t\t\t'bookmark_user_id' => array('type' => self::TYPE_UINT, 'default' => XenForo_Visitor::getUserId()),\r\n\t\t\t\t'bookmark_date'\t\t=> array('type' => self::TYPE_UINT, 'default' => XenForo_Application::$time),\r\n\t\t\t\t'bookmark_note' \t=> array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 150),\r\n\t\t\t\t'public' \t=> array('type' => self::TYPE_UINT, 'default' => 0),\r\n\t\t\t\t'sticky' \t=> array('type' => self::TYPE_UINT, 'default' => 0),\r\n\t\t\t\t'quick_link' \t=> array('type' => self::TYPE_UINT, 'default' => 0)\r\n\t\t\t)\r\n\t\t);\r\n\t}", "public function toArray()\n {\n $fields = array(); \n foreach ($GLOBALS['InfusionsoftApp']->fields[$this->_table] as $field)\n {\n $fields[$field] = $this->$field;\n } \n return $fields;\n }", "private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "public function tabsAction()\n {\n\t\treturn array();\n }", "public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}", "public function getFieldList()\n {\n $sObjectName = $this->getShopObjectName();\n\n if ($sObjectName) {\n $oShopObject = oxNew($sObjectName);\n } else {\n $oShopObject = oxNew('oxbase');\n $oShopObject->init($this->getTableName());\n }\n\n if ($oShopObject instanceof oxI18n) {\n $oShopObject->setLanguage(0);\n $oShopObject->setEnableMultilang(false);\n }\n\n $sViewName = $oShopObject->getViewName();\n $sFields = str_ireplace('`' . $sViewName . \"`.\", \"\", strtoupper($oShopObject->getSelectFields()));\n $sFields = str_ireplace(array(\" \", \"`\"), array(\"\", \"\"), $sFields);\n $this->_aFieldList = explode(\",\", $sFields);\n\n return $this->_aFieldList;\n }", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'date', 'origin', 'originName', 'total',\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt);\n }\n ]\n );\n }", "private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "private function getCampos()\n {\n \t$fields \t= [];\n \tif ( !empty( $this->parametros['campos'] ) )\n \t{\n if ( is_string($this->parametros['campos']) )\n {\n $fields = explode(',', $this->parametros['campos'] );\n }\n \t} else\n \t{\n \t\t$tabela = $this->parametros['tabela'];\n \t\t$fields = [$this->Controller->$tabela->primaryKey(), $this->Controller->$tabela->displayField() ];\n \t}\n\n \treturn $fields;\n }", "protected function _getNavigationTabs()\n {\n return array(\n 'bible' => array(\n 'title' => new XenForo_Phrase('th_bible_bible'),\n 'href' => XenForo_Link::buildPublicLink('bible'),\n 'position' => 'middle',\n 'linksTemplate' => 'th_navigation_tabs_bible'\n )\n );\n }", "public static function getAll() {\r\n $result = db_select(\"{md_megamenu_tabs}\", \"mt\")\r\n ->fields(\"mt\")\r\n ->execute()\r\n ->fetchAll(PDO::FETCH_CLASS, \"MDMegaTab\");\r\n\r\n foreach ($result as &$tab) {\r\n if ($tab instanceof stdClass)\r\n $tab = _megamenu_recast(\"MDMegaTab\", $tab);\r\n $tab->initialize();\r\n }\r\n\r\n return $result;\r\n }", "function getAdditionalValuesAsArray() {\n\t\t$values = parent::getAdditionalValuesAsArray ();\n\t\t$tables = array_keys ($this->owner);\n\t\t$values ['owner'] = Array ();\n\t\tforeach ($tables as $table) {\n\t\t\tforeach ($this->owner [$table] as $id) {\n\t\t\t\t$values ['owner'] [$table] [$id] = $id;\n\t\t\t}\n\t\t}\n\t\t$values ['headerstyle'] = $this->row ['headerstyle'];\n\t\t$values ['bodystyle'] = $this->row ['bodystyle'];\n\t\treturn $values;\n\t}", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "protected function getFields()\n {\n $fields = parent::getFields();\n unset($fields['unread']);\n unset($fields['total']);\n unset($fields['outdated']);\n\n return $fields;\n }", "private function getPreviewFields() \r\n\t{\r\n\t\t$sql = \"select field1, field2, field3, field4, field5 \r\n\t\t\t\tfrom redcap_ddp_preview_fields where project_id = \" . $this->project_id;\r\n\t\t$q = db_query($sql);\r\n\t\tif (db_num_rows($q)) {\r\n\t\t\t// Remove all blank instances\r\n\t\t\t$preview_fields = db_fetch_assoc($q);\r\n\t\t\tforeach ($preview_fields as $key=>$field) {\r\n\t\t\t\tif ($field == '') unset($preview_fields[$key]);\r\n\t\t\t}\r\n\t\t\treturn array_values($preview_fields);\r\n\t\t} else {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "static public function getFieldsList () {\n return self::_getInstance()->_fieldsList;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public static function getFieldMasterList()\n {\n return [\n 'form_fields' => [\n // LA fields\n 'transaction_type',\n 'type_of_plate',\n 'vin',\n 'vehicle_type',\n 'model_year',\n 'mortgage_fee',\n 'street_address',\n 'zip',\n 'county',\n 'city_limits',\n 'number_of_passengers',\n 'empty_weight',\n 'trailer_weight',\n 'carrying_capacity',\n 'gvw',\n 'gvwr',\n 'sales_price',\n 'rebate_discount',\n 'trade_in_value',\n 'sales_tax_credit',\n 'taxable_value',\n 'date_of_sale',\n\n // TX Fields\n // transaction type -- present\n 'new_or_used',\n // vin -- present\n // model_year -- present\n // dealer_address -- present\n // zip -- present\n 'resident_county',\n 'processing_county',\n // empty_weight -- present\n // trailer_weight -- present\n // carrying_capacity -- present\n // 'gvw', -- present\n // 'gvwr', -- present\n 'inspection_type',\n 'freight',\n 'miscellaneous_fee',\n 'fuel_type',\n // date_of_sale -- present\n\n // Arkansas Fields.\n // transaction type -- present.\n // vin -- present\n // 'vehicle_type',-- present\n // 'model_year',-- present\n // dealer_address -- present\n // zip -- present\n // empty_weight -- present\n // trailer_weight -- present\n // carrying_capacity -- present\n // 'gvw', -- present\n // 'gvwr', -- present\n 'number_of_axles',\n 'accessories',\n 'warranty'\n // rebate_discount -- present\n // trade_in_value -- present\n // taxable_value -- present\n // date_of_sale -- present\n ],\n 'calculator_options' => [\n // Louisiana\n 'no_fees',\n 'temp_tag',\n 'farm_use',\n 'did_pull_a_trailer',\n 'exempt_from_sales_tax',\n 'include_late_fees',\n\n // Texas\n // 'no_fees', -- present\n // 'temp_tag', -- present\n 'is_trade_in_leased',\n 'farm_ranch',\n 'member_of_military',\n 'off_highway_use',\n 'rebuilt_salvage',\n // exempt_from_sales_tax -- present\n // did_pull_a_trailer -- present\n 'include_inspection_fee',\n 'include_vit_tax',\n // include_late_fees -- present\n\n // Arkansas\n // 'no_fees', -- present\n // 'temp_tag', -- present\n // exempt_from_sales_tax -- present\n 'transfer_plate',\n 'vehicle_financed',\n // farm_use -- present\n 'off_road_motorcycle',\n 'add_accessories',\n 'add_warranty',\n // include_late_fees -- present\n ]\n ];\n }" ]
[ "0.69516116", "0.6815694", "0.6688871", "0.6645328", "0.6579256", "0.6473842", "0.6402275", "0.63490415", "0.62971205", "0.6265576", "0.6220663", "0.6211978", "0.6190917", "0.61830825", "0.6142174", "0.6137402", "0.6132245", "0.6132245", "0.6132245", "0.6132245", "0.6132245", "0.61277026", "0.6117392", "0.6081117", "0.6078286", "0.6064902", "0.6061031", "0.6056961", "0.60436624", "0.60368294", "0.6017697", "0.59982437", "0.5970239", "0.5969151", "0.5969151", "0.5969151", "0.596129", "0.5957799", "0.59446496", "0.59315765", "0.59129417", "0.5906465", "0.5906401", "0.5906014", "0.58979875", "0.58979875", "0.58979875", "0.58979875", "0.58979875", "0.58979875", "0.58729976", "0.58697695", "0.5853219", "0.58531535", "0.5846765", "0.58339345", "0.58314246", "0.5825483", "0.58197415", "0.5817661", "0.58166414", "0.581529", "0.5814039", "0.580898", "0.58089733", "0.58089733", "0.58089733", "0.5803244", "0.57982314", "0.5793971", "0.57931215", "0.57918054", "0.5790586", "0.578532", "0.5783868", "0.5783338", "0.57823974", "0.57723886", "0.57631665", "0.5761882", "0.57614416", "0.5761436", "0.57568824", "0.57510006", "0.57510006", "0.5750143", "0.5739425", "0.5739325", "0.57390445", "0.57373476", "0.57373476", "0.57373476", "0.57373476", "0.57373476", "0.57363087", "0.5715646", "0.57126826", "0.57119834", "0.57119834", "0.5711908" ]
0.6840257
1
Return array portion of field settings for use in the script fields tab.
public function scripts_fields() { $fields = array( array( 'id' => 'vpn_script_version', 'type' => 'text', 'name' => __( 'Version of scripts', 'wpcd' ), 'desc' => __( 'Version of scripts to run. Default is V1. Updates to plugins that contain new scripts will NOT usually change this value so if you want to use new scripts on plugin updates, you should change this version number.', 'wpcd' ), 'tab' => 'vpn-scripts', ), array( 'id' => 'vpn_commands_after_server_install', 'type' => 'textbox', 'name' => __( 'After provisioning commands', 'wpcd' ), 'desc' => __( '<b>NOT active yet</b> Run these commands after the server has been provisioned.', 'wpcd' ), 'tab' => 'vpn-scripts', ), ); return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mace_admin_get_settings_fields() {\n\t$fields = array();\n\t$settings_pages = mace_get_settings_pages();\n\n\tforeach( $settings_pages as $page_id => $page_config ) {\n\t\t$fields[ $page_id ] = $page_config['fields'];\n\t}\n\n\treturn (array) apply_filters( 'mace_admin_get_settings_fields', $fields );\n}", "abstract public function getSettingsFields();", "public function get_settings_fields() {\n\n\n\t\t/*\n\t\t * name ( name of the field)\n\t\t * type ( type of the field which help to call call class back)\n\t\t * label ( [optional] if you want to display any think the description )\n\t\t * default ( [optional] default values)\n\t\t * options ( [optional] options we use when type is select mostly but this use to give option to fields)\n\t\t * link ( [optional] in case you send a link to field)\n\t\t * sanitize_callback ( [optional] sanitize call back of the field)\n\t\t * priority [ [optional] use to giving parity to the user]\n\t\t * page ( page name we use menu slug this fields belong to this page)\n\t\t *\n\t\t * */\n\n\n\t\t// setting files index key is ( section => array( fields ))\n\t\t$settings_fields = array(\n\t\t\t'test_1' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'name',\n\t\t\t\t\t'label' => __( 'Enter the name', 'sharaz_settings' ),\n\t\t\t\t\t'desc' => __( '<h4>Sharaz Setting Api</h4>if you like please share to others', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '5',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'salary',\n\t\t\t\t\t'label' => 'Select your salary range',\n\t\t\t\t\t'type' => 'ss_select',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '2000',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'1000' => '1000',\n\t\t\t\t\t\t'2000' => '2000',\n\t\t\t\t\t\t'3000' => '3000',\n\t\t\t\t\t),\n\t\t\t\t\t'priority' => '10'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'advance_bonus',\n\t\t\t\t\t'label' => __( 'Receving advance bonus', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_checkbox',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '15',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'your_color',\n\t\t\t\t\t'label' => __( 'Your Setting', 'sharaz-setting' ),\n\t\t\t\t\t'type' => 'ss_color',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'priority' => '20',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'test_2' => array(\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'suggestion',\n\t\t\t\t\t\t'label' => __( 'Ang suggestion', 'sharaz_settings' ),\n\t\t\t\t\t\t'desc' => __( '<h4>Please type some</h4>if you like suggest some thing to us', 'sharaz_settings' ),\n\t\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t\t'page' =>'ss_page1',\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t\t'priority' => '5',\n\t\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\treturn $settings_fields;\n\t}", "protected function getFields() {\n return $this->getConfiguration()['settings']['fields'];\n }", "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' => 'app_id',\n\t\t\t\t\t\t'label' => esc_html__( 'Application ID', 'gravityformsicontact' ),\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'name' => 'api_username',\n\t\t\t\t\t\t'label' => esc_html__( 'Account Username', 'gravityformsicontact' ),\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'name' => 'api_password',\n\t\t\t\t\t\t'label' => esc_html__( 'API Password', 'gravityformsicontact' ),\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'input_type' => 'password',\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'name' => 'client_folder',\n\t\t\t\t\t\t'label' => esc_html__( 'Client Folder', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'choices' => version_compare( GFForms::$version, '2.5-dev-1', '>=' ) ? array( $this, 'client_folders_for_plugin_setting' ) : $this->client_folders_for_plugin_setting(),\n\t\t\t\t\t\t'dependency' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Client Folders.', 'gravityformsicontact' ),\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__( 'iContact settings have been updated.', 'gravityformsicontact' )\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}", "function snax_admin_get_settings_fields() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_fields', array(\n\n\t\t/** General Section **************************************************** */\n\n\t\t'snax_settings_general' => array(\n\t\t\t'snax_active_formats' => array(\n\t\t\t\t'title' => __( 'Active formats', 'snax' ) . '<br /><span style=\"font-weight: normal;\">' . __( '(drag to reorder)', 'snax' ) . '</span>',\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_formats_order' => array(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t),\n\t\t\t'snax_featured_media_required' => array(\n\t\t\t\t'title' => __( 'Featured image field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_featured_media_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_required' => array(\n\t\t\t\t'title' => __( 'Category field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_multi' => array(\n\t\t\t\t'title' => __( 'Multiple categories selection?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_multi',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_whitelist' => array(\n\t\t\t\t'title' => __( 'Category whitelist', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_whitelist',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_auto_assign' => array(\n\t\t\t\t'title' => __( 'Auto assign to categories', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_auto_assign',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_allow_snax_authors_to_add_referrals' => array(\n\t\t\t\t'title' => __( 'Referral link field ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_allow_snax_authors_to_add_referrals',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_list_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in open lists', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_list_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_single_post_page_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Single Post Page', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_featured_images_for_formats' => array(\n\t\t\t\t'title' => __( 'Show featured images for single:', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_show_featured_images_for_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_display_comments_on_lists' => array(\n\t\t\t\t'title' => __( 'Display items comments on list view ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_display_comments_on_lists',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_origin' => array(\n\t\t\t\t'title' => __( 'Show the \"This post was created with our nice and easy submission form.\" text', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_show_origin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_misc_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Misc', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_item_count_in_title' => array(\n\t\t\t\t'title' => __( 'Show items count in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_count_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_admin_bar' => array(\n\t\t\t\t'title' => __( 'Disable admin bar for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_admin_bar',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_dashboard_access' => array(\n\t\t\t\t'title' => __( 'Disable Dashboard access for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_dashboard_access',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_wp_login' => array(\n\t\t\t\t'title' => __( 'Disable WP login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_wp_login',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_enable_login_popup' => array(\n\t\t\t\t'title' => __( 'Enbable the login popup ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_enable_login_popup',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_skip_verification' => array(\n\t\t\t\t'title' => __( 'Moderate new posts?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_skip_verification',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_mail_notifications' => array(\n\t\t\t\t'title' => __( 'Send mail to admin when new post/item was added?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_mail_notifications',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Lists Section ****************************************************** */\n\n\t\t'snax_settings_lists' => array(\n\t\t\t'snax_active_item_forms' => array(\n\t\t\t\t'title' => __( 'Item forms', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_item_forms',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_open_list_in_title' => array(\n\t\t\t\t'title' => __( 'Show list status in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_list_status_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Pages Section ***************************************************** */\n\n\t\t'snax_settings_pages' => array(\n\t\t\t// Frontend Submission.\n\t\t\t'snax_frontend_submission_page_id' => array(\n\t\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_frontend_submission_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Terms & Conditions.\n\t\t\t'snax_legal_page_id' => array(\n\t\t\t\t'title' => __( 'Terms and Conditions', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_legal_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Report.\n\t\t\t'snax_report_page_id' => array(\n\t\t\t\t'title' => __( 'Report', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_report_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Voting Section **************************************************** */\n\n\t\t'snax_settings_voting' => array(\n\t\t\t'snax_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Enable voting?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_guest_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Guests can vote?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_guest_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_voting_post_types' => array(\n\t\t\t\t'title' => __( 'Allow users to vote on post types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_post_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_fake_vote_count_base' => array(\n\t\t\t\t'title' => __( 'Fake vote count base', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_fake_vote_count_base',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Limits Section **************************************************** */\n\n\t\t'snax_settings_limits' => array(\n\n\t\t\t/* IMAGES UPLOAD */\n\n\t\t\t'snax_limits_image_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Image upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_image_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_image_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\n\t\t\t/* AUDIO UPLOAD */\n\n\t\t\t'snax_limits_audio_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Audio upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_audio_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\n\t\t\t/* VIDEO UPLOAD */\n\n\t\t\t'snax_limits_video_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Video upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_video_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\n\t\t\t/* POSTS */\n\n\t\t\t'snax_limits_posts_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Posts', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_items_per_page' => array(\n\t\t\t\t'title' => __( 'List items per page', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_items_per_page',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_posts_per_day' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_posts_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_new_post_items_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_post_items_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_submission_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_user_submission_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_tags_limit' => array(\n\t\t\t\t'title' => __( 'Tags', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_tags_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_description_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_description_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_content_max_length' => array(\n\t\t\t\t'title' => __( 'Content length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\n\t\t\t/* ITEMS */\n\n\t\t\t'snax_limits_items_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Items', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_content_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_source_max_length' => array(\n\t\t\t\t'title' => __( 'Source length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_source_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_ref_link_max_length' => array(\n\t\t\t\t'title' => __( 'Referral link length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_ref_link_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Auth Section ***************************************************** */\n\n\t\t'snax_settings_auth' => array(\n\t\t\t'snax_facebook_app_id' => array(\n\t\t\t\t'title' => __( 'Facebook App ID', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_facebook_app_id',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_login_recaptcha' => array(\n\t\t\t\t'title' => __( 'reCaptcha for login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_login_recaptcha',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_site_key' => array(\n\t\t\t\t'title' => __( 'reCaptcha Site Key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_site_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_secret' => array(\n\t\t\t\t'title' => __( 'reCaptcha Secret', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_secret',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Demo Section ***************************************************** */\n\n\t\t'snax_settings_demo' => array(\n\t\t\t'snax_demo_mode' => array(\n\t\t\t\t'title' => __( 'Enable demo mode?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_mode',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_demo_image_post_id' => array(\n\t\t\t\t'title' => __( 'Image', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'image' ),\n\t\t\t),\n\t\t\t'snax_demo_gallery_post_id' => array(\n\t\t\t\t'title' => __( 'Gallery', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'gallery' ),\n\t\t\t),\n\t\t\t'snax_demo_embed_post_id' => array(\n\t\t\t\t'title' => __( 'Embed', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'embed' ),\n\t\t\t),\n\t\t\t'snax_demo_list_post_id' => array(\n\t\t\t\t'title' => __( 'List', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'list' ),\n\t\t\t),\n\t\t\t'snax_demo_meme_post_id' => array(\n\t\t\t\t'title' => __( 'Meme', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'meme' ),\n\t\t\t),\n\t\t),\n\n\t\t/** Embedly Section ********************************************** */\n\n\t\t'snax_settings_embedly' => array(\n\t\t\t'snax_embedly_enable' => array(\n\t\t\t\t'title' => __( 'Enable Embedly support?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_enable',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_dark_skin' => array(\n\t\t\t\t'title' => __( 'Dark skin', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_dark_skin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_buttons' => array(\n\t\t\t\t'title' => __( 'Share buttons', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_buttons',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_width' => array(\n\t\t\t\t'title' => __( 'Width', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_width',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_alignment' => array(\n\t\t\t\t'title' => __( 'Alignment', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_alignment',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_api_key' => array(\n\t\t\t\t'title' => __( 'Embedly cards API key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_api_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t\t/** Permalinks Section ********************************************** */\n\n\t\t'snax_permalinks' => array(\n\t\t\t'snax_item_slug' => array(\n\t\t\t\t'title' => __( 'Item url', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_item_slug',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_url_var_prefix' => array(\n\t\t\t\t'title' => __( 'URL variable', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_url_var_prefix',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t) );\n}", "public function get_settings_fields() {\n $settings_fields = array(\n 'grocery-general' => array(\n 'popup_logo' => array(\n 'name' => 'popup_logo',\n 'label' => __( 'Popup Logo', 'fondendpost' ),\n 'desc' => __( 'Logo to show in the popup.', 'fondendpost' ),\n 'type' => 'file',\n ),\n ),\n );\n \n return $settings_fields;\n\n }", "public static function get_output_fields() {\n\t\t$output_fields = [];\n\n\t\t/**\n\t\t * Get the allowed setting groups and their fields\n\t\t */\n\t\t$allowed_setting_groups = DataSource::get_allowed_settings_by_group();\n\n\t\tif ( ! empty( $allowed_setting_groups ) && is_array( $allowed_setting_groups ) ) {\n\t\t\tforeach ( $allowed_setting_groups as $group => $setting_type ) {\n\n\t\t\t\t$replaced_group = preg_replace( '[^a-zA-Z0-9 -]', ' ', $group );\n\n\t\t\t\tif ( ! empty( $replaced_group ) ) {\n\t\t\t\t\t$group = $replaced_group;\n\t\t\t\t}\n\n\t\t\t\t$setting_type = lcfirst( $group );\n\t\t\t\t$setting_type = lcfirst( str_replace( '_', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( '-', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( ' ', '', ucwords( $setting_type, ' ' ) ) );\n\n\t\t\t\t$output_fields[ $setting_type . 'Settings' ] = [\n\t\t\t\t\t'type' => $setting_type . 'Settings',\n\t\t\t\t\t'resolve' => function () use ( $setting_type ) {\n\t\t\t\t\t\treturn $setting_type;\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Get all of the settings, regardless of group\n\t\t */\n\t\t$output_fields['allSettings'] = [\n\t\t\t'type' => 'Settings',\n\t\t\t'resolve' => function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t];\n\n\t\treturn $output_fields;\n\t}", "private function getSectionSettingFields(){\n\t\t\t\n\t\t\t$fields = array(\n\n\t\t\t\tField::text(\n\t\t\t\t\t'name',\n\t\t\t\t\t__( 'Template name', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t\tField::text( \n\t\t\t\t\t'classes',\n\t\t\t\t\t__( 'CSS Classes', 'chefsections' ),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'placeholder' => __( 'Seperate with commas\\'s', 'chefsections' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\tField::checkbox(\n\t\t\t\t\t'hide_container',\n\t\t\t\t\t__( 'Hide Container', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\t$fields = apply_filters( 'chef_sections_setting_fields', $fields, $this );\n\n\t\t\treturn $fields;\n\t\t}", "function get_form_editor_field_settings() {\n\t\treturn array(\n\t\t\t'label_setting',\n\t\t\t'description_setting',\n\t\t\t'rules_setting',\n\t\t\t'placeholder_setting',\n\t\t\t'input_class_setting',\n\t\t\t'css_class_setting',\n\t\t\t'size_setting',\n\t\t\t'admin_label_setting',\n\t\t\t'default_value_setting',\n\t\t\t'visibility_setting',\n\t\t\t'conditional_logic_field_setting',\n\t\t);\n\t}", "public static function get_input_fields() {\n\t\t$allowed_settings = DataSource::get_allowed_settings();\n\n\t\t$input_fields = [];\n\n\t\tif ( ! empty( $allowed_settings ) ) {\n\n\t\t\t/**\n\t\t\t * Loop through the $allowed_settings and build fields\n\t\t\t * for the individual settings\n\t\t\t */\n\t\t\tforeach ( $allowed_settings as $key => $setting ) {\n\n\t\t\t\t/**\n\t\t\t\t * Determine if the individual setting already has a\n\t\t\t\t * REST API name, if not use the option name.\n\t\t\t\t * Sanitize the field name to be camelcase\n\t\t\t\t */\n\t\t\t\tif ( ! empty( $setting['show_in_rest']['name'] ) ) {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $setting['show_in_rest']['name'], '_' ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $key, '_' ) ) );\n\t\t\t\t}\n\n\t\t\t\t$replaced_setting_key = preg_replace( '[^a-zA-Z0-9 -]', ' ', $individual_setting_key );\n\n\t\t\t\tif ( ! empty( $replaced_setting_key ) ) {\n\t\t\t\t\t$individual_setting_key = $replaced_setting_key;\n\t\t\t\t}\n\n\t\t\t\t$individual_setting_key = lcfirst( $individual_setting_key );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '_', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '-', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( ' ', '', ucwords( $individual_setting_key, ' ' ) ) );\n\n\t\t\t\t/**\n\t\t\t\t * Dynamically build the individual setting,\n\t\t\t\t * then add it to the $input_fields\n\t\t\t\t */\n\t\t\t\t$input_fields[ $individual_setting_key ] = [\n\t\t\t\t\t'type' => $setting['type'],\n\t\t\t\t\t'description' => $setting['description'],\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\treturn $input_fields;\n\t}", "protected function get_settings_array() {\n\t\t$plugin_path = Tribe__Events__Main::instance()->plugin_path;\n\t\treturn (array) include $plugin_path . 'src/admin-views/tribe-options-timezones.php';\n\t}", "public function plugin_settings_fields() {\n\n\t\t// Get current plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t// Prepare base fields.\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'accessToken',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'customAppEnable',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => null,\n\t\t\t\t'label' => null,\n\t\t\t\t'type' => 'auth_token_button',\n\t\t\t),\n\t\t);\n\n\t\t// If API is initialized, add custom app key/secret fields.\n\t\tif ( $this->initialize_api() ) {\n\t\t\t$fields[] = array( 'name' => 'customAppKey', 'type' => 'hidden' );\n\t\t\t$fields[] = array( 'name' => 'customAppSecret', 'type' => 'hidden' );\n\t\t}\n\n\t\t// Setup base fields.\n\t\treturn array( array( 'fields' => $fields ) );\n\n\t}", "private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }", "public function get_settings_fields() {\n\t\treturn tml_redirection_admin_get_settings_fields();\n\t}", "public function getSettings() : array;", "function get_settings_fields() {\n global $wrr_pro;\n $settings_fields = array(\n \n 'wc_segmented_ratings' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Segmented Ratings?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable. Please note, it will not work, if product rating is disabled from <a href=\"' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '\">WooCommerce setting</a>.',\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable segmented ratings for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'params_per',\n 'label' => 'Parameter Base',\n 'desc' => 'How do you want to set rating parameters for your products? <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'radio',\n 'options' => array(\n 'site' => 'Same parameters for all products',\n 'category' => 'Different parameters for each category',\n 'product' => 'Different parameters for each product',\n ),\n 'default' => 'site',\n 'disabled' => true,\n ),\n array(\n 'name' => 'fields',\n 'label' => 'Rating Parameters',\n 'desc' => 'If \\'<strong><label for=\"mdc-wc_segmented_ratings[params_per][site]\">Same parameters for all products</label></strong>\\' choosen for \\'Parameter Base\\' above. Ignore otherwise.<br />Type one segment per line. Separate \\'key\\' and \\'label\\' with a pipe symbol (\\'|\\').',\n 'type' => 'textarea',\n 'default' => 'price|Price'.PHP_EOL.'quality|Quality',\n ),\n ),\n 'wc_rich_editor' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Rich Editor?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable rich editor (<a href=\"https://en.wikipedia.org/wiki/WYSIWYG\">WYSIWYG</a>) in product review <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'disabled' => true,\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable rich editor for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'teeny',\n 'label' => 'Teeny Mode?',\n 'desc' => 'Check to enable teeny mode. It\\'ll hide some features of WYSIWYG editor. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'quicktags',\n 'label' => 'Enable Text editor?',\n 'desc' => 'Check to enable quick tag mode. It\\'ll show \\'Text\\' tab in WYSIWYG editor to write/view HTML. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'media_buttons',\n 'desc' => 'Check to allow reviewers to upload/attach media files with review. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'label' => 'Enable Media Uploader?',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n ), \n );\n\n return $settings_fields;\n }", "protected function getSettingArray()\n {\n return $this->container->get($this->getSettingKey());\n }", "private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "public function fields(): array{\n\t\treturn [\n\t\t\t'id' => [\n\t\t\t\t'type' => Type::nonNull(Type::int()),\n\t\t\t\t'description' => 'The id of the user',\n\t\t\t],\n\t\t\t'uid' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'description' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'Description of the setting',\n\t\t\t],\n\t\t\t'type' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'status' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'properties' => [\n\t\t\t\t'type' => GraphQL::type('property'),\n\t\t\t\t'description' => 'A list of the property',\n\t\t\t\t'is_relation' => false,\n\t\t\t],\n\n\t\t];\n\t}", "protected function getConfigFieldsValues()\n {\n return array(\n $this->mod_prefix.'SHOW_WEBPAGE' => Configuration::get($this->mod_prefix.'SHOW_WEBPAGE'),\n $this->mod_prefix.'SHOW_WEBSITE' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE'),\n $this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX'),\n $this->mod_prefix.'SHOW_ORGANIZATION' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION'),\n $this->mod_prefix.'SHOW_ORGANIZATION_LOGO' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_LOGO'),\n $this->mod_prefix.'SHOW_ORGANIZATION_CONTACT' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_CONTACT'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE'),\n $this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'SHOW_LOCALBUSINESS' => Configuration::get($this->mod_prefix.'SHOW_LOCALBUSINESS'),\n $this->mod_prefix.'LOCALBUSINESS_TYPE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_TYPE'),\n $this->mod_prefix.'LOCALBUSINESS_STORENAME' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STORENAME'),\n $this->mod_prefix.'LOCALBUSINESS_DESC' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_DESC'),\n $this->mod_prefix.'LOCALBUSINESS_VAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_VAT'),\n $this->mod_prefix.'LOCALBUSINESS_PHONE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PHONE'),\n $this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW'),\n //$this->mod_prefix.'LOCALBUSINESS_PRANGE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE'),\n $this->mod_prefix.'LOCALBUSINESS_STREET' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STREET'),\n $this->mod_prefix.'LOCALBUSINESS_COUNTRY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_COUNTRY'),\n $this->mod_prefix.'LOCALBUSINESS_REGION' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_REGION'),\n $this->mod_prefix.'LOCALBUSINESS_CODE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_CODE'),\n $this->mod_prefix.'LOCALBUSINESS_LOCALITY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_LOCALITY'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_SHOW'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LAT'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LON' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LON')\n );\n }", "function bdpp_settings_tab() {\n\t\n\t$result_arr = array();\n\n\t$settings_arr = apply_filters('bdpp_settings_tab', array(\n\t\t\t\t\t\t\t'general'\t=> __('General', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'trending'\t=> __('Trending Post', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'taxonomy'\t=> __('Taxonomy', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'sharing'\t=> __('Sharing', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'css'\t\t=> __('CSS', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'misc'\t\t=> __('Misc', 'blog-designer-pack'),\n\t\t\t\t\t\t));\n\n\tforeach ($settings_arr as $sett_key => $sett_val) {\n\t\tif( !empty($sett_key) && !empty($sett_val) ) {\n\t\t\t$result_arr[trim($sett_key)] = trim($sett_val);\n\t\t}\n\t}\n\n\treturn $result_arr;\n}", "public function getSettings() : array\n {\n return $this->settings;\n }", "public function getOptions(): array {\n\t\t$field_options = [];\n\n\t\tif (!empty($this->fieldoptions)) {\n\t\t\t$field_options = elgg_string_to_array($this->fieldoptions);\n\t\t\t$field_options = array_combine(array_values($field_options), $field_options); // input radio and checkbox require non-numeric keys\n\t\t}\n\n\t\treturn $field_options;\n\t}", "function GetFieldSettings($i){\n if ($this->debug_mode)\n echo $this->ClassName . \"::GetFieldSettings($i);\" . \"<HR>\";\n $_field = array();\n $_field[\"number\"] = $i;\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_NAME\")) {\n $_field[\"field_name\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_NAME\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_FIELDNAME_SETTINGS\", array(\n $i), true);\n }\n //set database column parameters\n for ($k = 0; $k < sizeof($this->Storage->columnparameters); $k ++)\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"DBFIELD_\" . strtoupper($this->Storage->columnparameters[$k]))) {\n $_field[\"dbfield_\" . strtolower($this->Storage->columnparameters[$k])] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"DBFIELD_\" . strtoupper($this->Storage->columnparameters[$k]));\n }\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"EDIT_CONTROL\")) {\n $_field[\"control\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"EDIT_CONTROL\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_EDIT_CONTROL_SETTINGS\", array($i), true);\n }\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"LENGTH\")) {\n $_field[\"length\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"LENGTH\");\n }\n else {\n $_field[\"length\"] = \"\";\n }\n\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_DUBLICATE\")) {\n $_field[\"field_dublicate\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_DUBLICATE\");\n }\n else {\n $_field[\"field_dublicate\"] = false;\n }\n\n //--check if have additional events\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_EVENT\")) {\n $_field[\"field_event\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_EVENT\");\n }\n\n //-- if field belong of any additional groups\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"GROUP\")) {\n $_field[\"group\"] = strtoupper($this->listSettings->GetItem(\"FIELD_\" . $i, \"GROUP\"));\n }\n switch ($_field[\"control\"]) {\n case \"date\":\n EditPageHelper::GetDateSettings($i, $_field, $this);\n break;\n case \"text\":\n case \"password\":\n EditPageHelper::GetTextSettings($i, $_field, $this);\n break;\n\n case \"textarea\":\n EditPageHelper::GetTextAreaSettings($i, $_field, $this);\n break;\n case \"machtmleditor\":\n EditPageHelper::GetMacHtmlEditorSettings($i, $_field, $this);\n break;\n\n case \"checkbox\":\n case \"radio\":\n EditPageHelper::GetCheckboxSettings($i, $_field, $this);\n break;\n\n case \"radiogroup\":\n case \"checkboxgroup\":\n case \"caption\":\n case \"combobox\":\n EditPageHelper::GetComboSettings($i, $_field, $this);\n break; //select\n\n\n case \"dbtext\":\n case \"dbstatictext\":\n EditPageHelper::GetDbTextSettings($i, $_field, $this);\n\n case \"dbcombobox\":\n case \"dbtreecombobox\":\n case \"dbtreetext\":\n case \"dbradiogroup\":\n case \"dbcheckboxgroup\":\n //case \"checkboxgroup\":\n EditPageHelper::GetDbComplexSettings($i, $_field, $this);\n break;\n case \"dbeditblock2\":\n EditPageHelper::GetDbEditBlockSettings($i, $_field, $this);\n break;\n\n case \"dbtreepath\":\n EditPageHelper::GetDbTreePathSettings($i, $_field, $this);\n break;\n\n case \"file\":\n EditPageHelper::GetFileSettings($i, $_field, $this);\n break;\n case \"file2\":\n EditPageHelper::GetFile2Settings($i, $_field, $this);\n break;\n\n case \"fileslistbox\":\n EditPageHelper::GetFilesListBoxSettings($i, $_field, $this);\n break;\n\n case \"hidden\":\n EditPageHelper::GetHiddenSettings($i, $_field, $this);\n break;\n case \"spaweditor\":\n case \"extrahtmleditor\":\n EditPageHelper::GetExtraHtmlEditorSettings($i, $_field, $this);\n break;\n\n case \"autocomplete\":\n EditPageHelper::GetAutocompleteSettings($i, $_field, $this);\n break;\n\n default: $this->GetCustomFieldSettings($i, $_field); break;\n } // switch\n //Get\n //if this is multilanguage field\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"IS_MULTILANG\") && $this->listSettings->GetItem(\"FIELD_\" . $i, \"IS_MULTILANG\")) {\n for ($j = 0; $j < sizeof($this->Kernel->Languages); $j ++) {\n $_field1 = $_field;\n $_field1[\"field_name\"] = sprintf($_field1[\"field_name\"], $this->Kernel->Languages[$j]);\n $_field1[\"lang_version\"] = $this->Kernel->Languages[$j];\n $this->form_fields[$this->Kernel->Languages[$j]][] = $_field1;\n }\n }\n else {\n if (strlen($_field[\"group\"]) == 0) {\n $_group = \"main\";\n }\n else {\n $_group = $_field[\"group\"];\n }\n $this->form_fields[$_group][] = $_field;\n //if this is password\n if ($_field[\"control\"] == \"password\") {\n $old_field = $_field;\n $_field[\"field_name\"] = $_field[\"field_name\"] . \"_2\";\n if ($_field[\"field_dublicate\"]) {\n $this->Storage->setColumnParameter($old_field[\"field_name\"], \"dublicate\", 1);\n $_field[\"notnull\"] = 1;\n $this->form_fields[$_group][] = $_field;\n }\n }\n }\n }", "public function settingsData() {\n\n $arraySettings = array (\n 'Generic Param' => $this->_genericParam\n );\n\n return $arraySettings;\n\n }", "function getSettingsList(){\n\t\treturn array(\n\t\t'institute_name',\n\t\t'institute_phone',\n\t\t'institute_address',\n\t\t'email',\n\t\t'notifications',\n\t\t'facebook_url',\n\t\t'linkedin_url',\n\t\t'twitter_url',\n\t\t'youtube_url',\n\t\t'copyright',\n\t\t'metatags'\n\t\t);\n\t}", "public function feed_settings_fields() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'title' => '',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_name',\n\t\t\t\t\t\t'label' => esc_html__( 'Feed Name', 'gravityformsicontact' ),\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'tooltip' => '<h6>'. esc_html__( 'Name', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'default_value' => $this->get_default_feed_name(),\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'list',\n\t\t\t\t\t\t'label' => esc_html__( 'iContact List', 'gravityformsicontact' ),\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->lists_for_feed_setting(),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Lists.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'iContact List', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which iContact list this feed will add contacts to.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'fields',\n\t\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t\t'field_map' => $this->fields_for_feed_mapping(),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Map Fields', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which Gravity Form fields pair with their respective iContact fields.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'custom_fields',\n\t\t\t\t\t\t'label' => '',\n\t\t\t\t\t\t'type' => 'dynamic_field_map',\n\t\t\t\t\t\t'field_map' => version_compare( GFForms::$version, '2.5-dev-1', '<' ) ? $this->custom_fields_for_feed_setting() : array( $this, 'custom_fields_for_feed_setting' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'create_new_custom_fields' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Opt-In Condition', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable', 'gravityformsicontact' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Export to iContact if', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Opt-In Condition', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'When the opt-in condition is enabled, form submissions will only be exported to iContact when the condition is met. When disabled, all form submissions will be exported.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t)\t\n\t\t\t)\n\t\t);\n\t\t\n\t}", "private function set_fields() {\r\n\r\n\t\t$fields = array();\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_billing' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_shipping' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_additional' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\treturn $fields;\r\n\t}", "public function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['early_global'] = array('c', array(\n\t\t 'member_id' => \"global_member_id\",\n\t\t 'group_id' => \"global_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t $settings['early_logged_in'] = array('c', array(\n\t\t 'member_id' => \"logged_in_member_id\",\n\t\t 'group_id' => \"logged_in_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t // for demo, include some others\n\t $settings['include_other'] = array('c', array(\n\t\t 'include_other' => \"Include other member variables\",\n\t\t), array());\n\t\t\n \t\t$settings['others'] = array('ms', array(\n\t\t 'username' => 'username',\n\t\t 'screen_name' => 'screen_name',\n\t\t 'email' => 'email',\n\t\t // 'last_visit' => 'last_visit',\n\t\t 'access_cp' => 'access_cp',\n\t\t // defaults\n\t\t), array());\n\n\t\t$settings['handy'] = array('c', array(\n\t\t 'comment_edit_time_limit' => \"comment_edit_time_limit\",\n\t\t), array('comment_edit_time_limit'));\n\n\t\treturn $settings;\n\t}", "public function get_settings() {\n $this->create_object_settings();\n return array($this->settings);\n }", "public function getSettings()\n {\n $aValidSettings = $this->getValidSettings();\n $aSettings = array();\n\n foreach ( $aValidSettings as $sSettingName ) {\n $aSettings[$sSettingName] = $this->getSetting( $sSettingName );\n }\n\n return $aSettings;\n }", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "public function getPluginSettings()\n {\n # Get common and specific settings\n $combine = array_merge($this->common_settings, $this->getSettingsFields());\n $settings = [];\n \n $key = strtolower($this->getKey());\n foreach($combine as $k => $v){\n $settings[$key . '_' . $k] = $v;\n }\n\n # Add Feature list of options \n $this->addSettingsOptions('features', $settings, $this->getFeatures());\n\n # Add Feature list of options\n $this->addSettingsOptions('filters', $settings, $this->getFilters()); \n\n # Add Feature list of options\n $this->addSettingsOptions('weight_by', $settings, $this->getWeightFeatures(), true);\n \n return $settings;\n \n }", "abstract public function settings(): array;", "public function getValues(){\n\t\treturn $this->_settings;\n\t}", "public function feed_settings_fields() {\n\n return array(\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Configurações do Feed BuddyPress', 'gravityformsbuddy' ),\n\t\t\t\t'description' => '',\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__( 'Nome', 'gravityformsbuddy' ),\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__( 'Nome', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Entre com um nome para o Feed para identificá-lo.', 'gravityformsbuddy' )\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' => 'toUser',\n\t\t\t\t\t\t'label' => esc_html__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'select_custom',\n\t\t\t\t\t\t'choices' => $this->get_buddy_users_as_choices( 'outgoing_numbers' ),\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'input_class' => 'merge-tag-support mt-position-right',\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__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Usuário o qual receberá as notificações', 'gravityformsbuddy' )\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' => 'pathUrl',\n\t\t\t\t\t\t'label' => esc_html__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => false,\n\t\t\t\t\t\t'class' \t => '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__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Link que será redirecionado para quando o usuário clicar na notificação', 'gravityformsbuddy' )\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' => 'message',\n\t\t\t\t\t\t'label' => esc_html__( 'Mensagem Padrão', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'class' => 'medium merge-tag-support mt-position-right',\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__( 'Mensagem', 'gravityformstwilio' ),\n\t\t\t\t\t\t\tesc_html__( 'Escreva uma mensagem que será mostrada como notificação', 'gravityformsbuddy' )\n\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}", "static public function get_raw_settings() {\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\treturn $settings;\n\t}", "static function getGeneralSettingsValues(){\r\n\t\t\r\n\t\t$arrValues = get_option('revslider-global-settings', '');\r\n\t\t\r\n\t\t$arrValues = maybe_unserialize($arrValues);\r\n\r\n\t\treturn($arrValues);\r\n\t}", "public function feed_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\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'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Name', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsdropbox' )\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' => 'fileUploadField',\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'label' => esc_html__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'choices' => $this->get_file_upload_field_choices(),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the specific File Upload field that you want to be uploaded to Dropbox.', 'gravityformsdropbox' )\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' => 'destinationFolder',\n\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s<br /><br />%s',\n\t\t\t\t\t\t\tesc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the folder in your Dropbox account where the files will be uploaded to.', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'By default, all files are stored in the \"Gravity Forms Add-On\" folder within the Dropbox Apps folder in your Dropbox account.', 'gravityformsdropbox' )\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' => 'feedCondition',\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Upload Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Upload to Dropbox if', 'gravityformsdropbox' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t}", "private function settings_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Global Settings', 'formidable' ) . '</h3>'\n\t\t\t\t. '<p><strong>' . __( 'General', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )\n\t\t\t\t. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )\n \t . '</p>',\n\t\t\t'prev_page' => 'import',\n\t\t\t'next_page' => 'addons',\n\t\t);\n\t}", "private function get_settings_fields() {\n\n\t\t$fields = array();\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_api_key',\n\t\t\t'type' => 'password',\n\t\t\t'settings_label' => __( 'Sherpa API Key', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Enter an API Key and save your changes for the other fields to appear', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t);\n\n\t\tif ( ! $api_key = get_option( 'vibrant_life_sherpa_api_key' ) ) {\n\n\t\t\treturn $fields;\n\n\t\t}\n\n\t\tif ( ! $form = get_theme_mod( 'vibrant_life_schedule_a_visit_form' ) ) {\n\n\t\t\t$forms = wp_list_pluck( RGFormsModel::get_forms( null, 'title' ), 'title', 'id' );\n\n\t\t\t$fields[] = array(\n\t\t\t\t'name' => 'schedule_a_visit_to_sherpa_form',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'settings_label' => __( 'Which Form is the Schedule a Visit Form?', 'schedule-a-visit-form' ),\n\t\t\t\t'no_init' => true,\n\t\t\t\t'option_field' => true,\n\t\t\t\t'option_none' => __( '-- Choose a Gravity Form --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t'options' => $forms,\n\t\t\t);\n\n\t\t}\n\n\t\t$locations_query = new WP_Query( array(\n\t\t\t'post_type' => 'facility',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t) );\n\n\t\t$locations = wp_list_pluck( $locations_query->posts, 'post_title', 'ID' );\n\n\t\t$sherpa_communities = apply_filters( 'schedule_a_visit_to_sherpa_communities', array(\n\t\t\t2 => __( 'Lodges of Durand', 'schedule-a-visit-to-sherpa' ),\n\t\t\t4 => __( 'New Friends Memory Care Kalamazoo', 'schedule-a-visit-to-sherpa' ),\n\t\t\t1 => __( 'Vibrant Life Superior Township', 'schedule-a-visit-to-sherpa' ),\n\t\t\t3 => __( 'Vibrant Life Temperance', 'schedule-a-visit-to-sherpa' ),\n\t\t) );\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_mapping',\n\t\t\t'type' => 'repeater',\n\t\t\t'settings_label' => __( 'Location/Sherpa Mapping', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Associate each Location with each Community within Sherpa', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t\t'fields' => array(\n\t\t\t\t'location_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Location', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $locations,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Location --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'community_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Sherpa Community', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $sherpa_communities,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Community from Sherpa --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t\t'description' => '<p class=\"description\">' . __( 'These values are hardcoded. We cannot add or remove Sherpa Communities without updating the plugin.', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t\t\t\t'description_tip' => false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'schedule_a_visit_to_sherpa_settings_fields', $fields );\n\n\t}", "protected function _getSectionsFields()\n {\n $arr = array(\n 'general' => array( // This is a section. See `getSectionId()` for how it gets transformed into an actual section name.\n 'label' => $this->__('General Settings'),\n 'header' => $this->__('General settings about imported posts.'),\n // If 'header' is present, it will be used. If it's a callable, its return value will be used.\n 'fields' => array( // An array of fields, by field code\n 'post_type' => array(\n 'label' => $this->__('Post Type'),\n 'type' => 'select',\n // Type can be one of the existing renderer types (select, checkbox, number, text), or make your own! See `_getFieldRenderers()`\n 'value' => $this->createCommand(array($this, 'getApiLoginOptions')),\n // If no value, it is automatically taken from the local data with the field's ID as key!\n // If value is present, it will be used. If it's a callable, its return value will be used.\n )\n ),\n ),\n );\n return $arr;\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "protected function getFieldOptions()\n {\n return explode(',', $this->option('fields'));\n }", "function get_settings(){\n $settings = array(\n 'section_title' => array(\n 'name' => __('GWP Custom Tabs','GWP'),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wc_'.$this->id.'_section_title'\n ),\n 'title' => array(\n 'name' => __( 'Global Custom Tabs', 'GWP' ),\n 'type' => $this->post_type,\n 'desc' => __( 'Start typing the Custom Tab name, Used for including custom tabs on all products.', 'GWP' ),\n 'desc_tip' => true,\n 'default' => '',\n 'id' => 'wc_'.$this->id.'_globals'\n ),\n 'section_end' => array(\n 'type' => 'sectionend',\n 'id' => 'wc_'.$this->id.'_section_end'\n )\n );\n return apply_filters( 'wc_'.$this->id.'_settings', $settings );\n }", "public function getFields():array\n {\n return [\n 'x_login' => 'text',\n 'x_trans_key' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "public function getSettings() {\n return $this->settings == null ? array() : json_decode($this->settings, true);\n }", "public function get_settings() {\n $data = array(\n 'settings' => $this->js_settings\n );\n \n return $data;\n }", "public function getSettings(): array {\n\t\treturn [\n\t\t\t// Enable debug mode (to print errors).\n\t\t\t'debug' => !empty(elgg_get_config('debug')),\n\t\t\t'security' => [\n\t\t\t\t'requestedAuthnContext' => false,\n\t\t\t],\n\t\t\t// Service Provider Data that we are deploying.\n\t\t\t'sp' => $this->getSPSettings(),\n\t\t\t\n\t\t\t// Identity Provider Data that we want connected with our SP.\n\t\t\t'idp' => $this->getIDPSettings(),\n\t\t];\n\t}", "public function getConfigFieldsValues()\n {\n return array(\n 'SEND_SMS_API' => Tools::getValue('SEND_SMS_API', Configuration::get('ONEHOP_SEND_SMS_API')),\n 'ADMIN_MOBILE' => Tools::getValue('ADMIN_MOBILE', Configuration::get('ONEHOP_ADMIN_MOBILE'))\n );\n }", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function getFields(): array\n {\n if ($this->_fields !== null) {\n return $this->_fields;\n }\n\n try {\n $id = $this->getFieldLayoutId();\n } catch (InvalidConfigException $e) {\n return [];\n }\n\n return $this->_fields = Craft::$app->getFields()->getFieldsByLayoutId($id);\n }", "function get_meta_array( $settings ){\n\t\t$settings[ $this->id ] = array(\n\t\t\t\t'name' => $this->multiple_up.' Lud',\n\t\t\t\t//'icon' => $this->icon,\n\t\t\t\t'opts' => $this->sec_site_options(),\n\t\t);\n\t\treturn $settings;\n\t}", "public function getConfigFieldsValues()\n {\n $id_shop = Shop::getContextShopID(true);\n $id_shop_group = Shop::getContextShopGroupID(true);\n\n $fields_values = array();\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n foreach (Language::getLanguages(false) as $lang) {\n $values = Tools::getValue($input['name'].'_'.$lang['id_lang'], (Configuration::hasKey($input['name'], $lang['id_lang']) ? Configuration::get($input['name'], $lang['id_lang'], (int)$id_shop_group, (int)$id_shop) : $input['default']));\n $fields_values[$input['name']][$lang['id_lang']] = $values;\n }\n } else {\n if ($input['type'] == 'checkbox' && isset($input['values'])) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n $values = (Configuration::hasKey($input['name'], null, (int)$id_shop_group, (int)$id_shop) ? Tools::jsonDecode(Configuration::get($input['name']), true) : $input['default']);\n\n if (is_array($values)) {\n foreach ($input['values']['query'] as $id_cms => $val) {\n if (in_array($id_cms, $values)) {\n $fields_values[$input['name'].'[]_'.$id_cms] = $id_cms;\n }\n }\n }\n } else {\n $values = Tools::getValue($input['name'], (Configuration::hasKey($input['name'], null, (int)$id_shop_group, (int)$id_shop) ? Configuration::get($input['name']) : $input['default']));\n $fields_values[$input['name']] = $values;\n }\n }\n }\n }\n\n $this->assignCustomConfigs($fields_values);\n\n return $fields_values;\n }", "public function getSettings(): array\n {\n return [];\n }", "protected static function getSettings()\r\n {\r\n if(!self::$avail_settings)\r\n {\r\n $data = self::db()->query(\r\n 'SELECT * FROM `:prefix:rbac_user_settings` AS `t1` '\r\n . 'JOIN `:prefix:forms_fieldtypes` AS `t2` '\r\n . 'ON `t1`.`fieldtype`=`t2`.`type_id` '\r\n . 'WHERE `is_editable`=? '\r\n . 'ORDER BY `fieldset` ASC, `position` ASC',\r\n array('Y')\r\n );\r\n if($data)\r\n {\r\n self::$avail_settings = $data->fetchAll();\r\n }\r\n }\r\n return self::$avail_settings;\r\n }", "protected function getSettings(): array\n {\n static $settings = null;\n\n if ($settings === null) {\n $settings = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);\n }\n\n return $settings ?? [];\n }", "function inspiry_get_submit_fields() {\n\t\t$inspiry_submit_property_fields = get_option( 'inspiry_submit_property_fields' );\n\t\tif ( ! empty( $inspiry_submit_property_fields ) && is_array( $inspiry_submit_property_fields ) ) {\n\t\t\treturn $inspiry_submit_property_fields;\n\t\t} else {\n\t\t\t// All fields - To handle the case where related setting is not saved after theme update\n\t\t\treturn array(\n\t\t\t\t'title',\n\t\t\t\t'description',\n\t\t\t\t'property-type',\n\t\t\t\t'property-status',\n\t\t\t\t'locations',\n\t\t\t\t'bedrooms',\n\t\t\t\t'bathrooms',\n\t\t\t\t'garages',\n\t\t\t\t'property-id',\n\t\t\t\t'price',\n\t\t\t\t'price-postfix',\n\t\t\t\t'area',\n\t\t\t\t'area-postfix',\n\t\t\t\t'lot-size',\n\t\t\t\t'lot-size-postfix',\n\t\t\t\t'video',\n\t\t\t\t'images',\n\t\t\t\t'address-and-map',\n\t\t\t\t'attachments',\n\t\t\t\t'additional-details',\n\t\t\t\t'featured',\n\t\t\t\t'features',\n\t\t\t\t'agent',\n\t\t\t\t'parent',\n\t\t\t\t'reviewer-message',\n\t\t\t\t'floor-plans',\n\t\t\t);\n\t\t}\n\t}", "public function getSettingParameters() : array\n {\n \treturn $this->settings['parameters'];\n }", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "protected function getOptionFieldsConfig()\n {\n $fields['custom_option_group'] = $this->getCustomOptionGroupFieldConfig();\n\n return $fields;\n }", "public function getAdditionalFields() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\tif ($this->installed()) {\n\t\t\t$ro_settings = $this->config->get('related_options');\n\t\t\t$std_fields = array('sku', 'upc', 'ean', 'location');\n\t\t\tforeach ($std_fields as $field) {\n\t\t\t\tif ( isset($ro_settings['spec_'.$field]) && $ro_settings['spec_'.$field] ) {\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "public function getFieldsArray() {\n\t\t\treturn $this->fields_array;\n\t\t}", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "function getCustomFields($settings, $which)\n\t{\n\t\tif (IsSet($settings->saml_settings[$which]))\n\t\t{\n\t\t\treturn array_keys($settings->saml_settings[$which]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$empty = array();\n\t\t\treturn $empty;\n\t\t}\n\t}", "public function get_custom_fields_settings()\n {\n $fields = [];\n\n $fields['quiz_title'] = [\n 'name' => __('Quiz Title', $this->token),\n 'description' => __('The title that will be displayed for your quiz.', $this->token),\n 'placeholder' => 'Can chirotherapy treat your pain?',\n 'type' => 'text',\n 'default' => 'Can chirotherapy treat your pain?',\n 'section' => 'info'\n ];\n\n $fields['show_fields'] = [\n 'name' => __('Show Opt-In Before Score', $this->token),\n 'description' => __('If set to no, opt-in fields will be shown after the users see their score.', $this->token),\n 'placeholder' => '',\n 'type' => 'select',\n 'default' => 'yes',\n 'options' => ['no', 'yes'],\n 'section' => 'info'\n ];\n\n $fields['legal_broker'] = [\n 'name' => __('Your Business Name', $this->token),\n 'description' => __('This will be displayed on the bottom of each page.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['api_key'] = [\n 'name' => __('Custom API Key', $this->token),\n 'description' => __('This API key will be used for submitting leads to your CRM. Leave blank to use default API key.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['email'] = [\n 'name' => __('Notification Email', $this->token),\n 'description' => __('This address will be emailed when a user opts-into your ad. If left empty, emails will be sent to the default address for your site.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['retargeting'] = [\n 'name' => __('Facebook Pixel - Retargeting (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow retargeting of people that view this quiz.', $this->token),\n 'placeholder' => __('Ex: 4123423454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['conversion'] = [\n 'name' => __('Facebook Pixel - Conversion (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow conversion tracking of people that submit this quiz.', $this->token),\n 'placeholder' => __('Ex: 170432123454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['primary_color'] = [\n 'name' => __('Primary Color', $this->token),\n 'description' => __('Change the primary color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['hover_color'] = [\n 'name' => __('Hover Color', $this->token),\n 'description' => __('Change the button hover color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n return apply_filters($this->token . '_fields', $fields);\n }", "private function get_additional_fields_raw() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\tif ( ! is_array( $options ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\tif ( array_key_exists( 'additional_fields_raw', $options ) ) {\n\t\t\t\t$additional_fields = $options['additional_fields_raw'];\n\t\t\t\t$fields = explode( ',', $additional_fields );\n\t\t\t} else {\n\t\t\t\t$fields = array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields_raw', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "public function getSettingsAll ()\n {\n \tglobal $debug;\n \t\n \t$settings = array();\n \t$select_string = \"select settings_key,settings_value from \".$this->table_prefix.$this->quiz_tables['settings'];\n \t$settings = $this->db_object->getKeyValue ($select_string, \"settings_key\", \"settings_value\");\n \treturn $settings;\n }", "protected function getDynamicConfigFields()\n {\n $statuses = $this->statusCollectionFactory->create()->toOptionArray();\n $dynamicConfigFields = [];\n foreach ($statuses as $status) {\n $configId = 'sendsms_settings_status_'.$status['value'];\n $dynamicConfigFields[$configId] = [\n 'id' => $configId,\n 'type' => 'textarea',\n 'sortOrder' => 10,\n 'showInDefault' => '1',\n 'showInWebsite' => '0',\n 'showInStore' => '0',\n 'label' => 'Mesaj: '.$status['label'],\n 'comment' => 'Variabile disponibile: {billing_first_name}, {billing_last_name}, {shipping_first_name}, {shipping_last_name}, {order_number}, {order_date}, {order_total}<p class=\"sendsms-char-count\">160 caractere ramase</p>',\n '_elementType' => 'field',\n 'path' => 'sendsms/sendsms'\n ];\n }\n return $dynamicConfigFields;\n }", "public function getSettings(): array\n {\n $settings = static::find()->where(['status' => true])->asArray()->all();\n return array_merge_recursive(\n ArrayHelper::map($settings, 'key', 'value', 'category'),\n ArrayHelper::map($settings, 'key', 'type', 'category')\n );\n }", "static public function get_settings() {\n\n\t\t$settings[] = array();\n\n\t\t$settings = array(\n\t\t\t'default_tab' => array(\n\t\t\t\t'default_tab_settings' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Header', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'header'\n\t\t\t\t),\n\t\t\t\t'missing_callback' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Missing Callback', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'non-exisit'\n\t\t\t\t),\n\t\t\t\t'checkbox' => array(\n\t\t\t\t\t'name' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t),\n\t\t\t\t'multicheck' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'multicheck_without_options' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'radio' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'radio_without_options' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'text' => array(\n\t\t\t\t\t'name' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'text_with_std' => array(\n\t\t\t\t\t'name' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'email' => array(\n\t\t\t\t\t'name' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'type' => 'email'\n\t\t\t\t),\n\t\t\t\t'url' => array(\n\t\t\t\t\t'name' => __( 'URL', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'By default, only http & https are allowed', self::$plugin_name ),\n\t\t\t\t\t'type' => 'url'\n\t\t\t\t),\n\t\t\t\t'password' => array(\n\t\t\t\t\t'name' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'type' => 'password'\n\t\t\t\t),\n\t\t\t\t'number' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'number_with_attributes' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Max: 1000, Min: 20, Step: 30', self::$plugin_name ),\n\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t'min' => 20,\n\t\t\t\t\t'step' => 30,\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'textarea' => array(\n\t\t\t\t\t'name' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'textarea_with_std' => array(\n\t\t\t\t\t'name' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'select' => array(\n\t\t\t\t\t'name' => __( 'Select', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Select with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'select'\n\t\t\t\t),\n\t\t\t\t'rich_editor' => array(\n\t\t\t\t\t'name' => __( 'Rich Editor', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Rich Editor save as HTML markups', self::$plugin_name ),\n\t\t\t\t\t'type' => 'rich_editor'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'second_tab' => array(\n\t\t\t\t'extend_me' => array(\n\t\t\t\t\t'name' => 'Extend me',\n\t\t\t\t\t'desc' => __( 'You can extend me via hooks and filters.', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn self::apply_tab_slug_filters( $settings );\n\t}", "private function getFields()\n {\n return [\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"first_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"text\",\n \"field_name\" => \"last_name\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"happy\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n [\n \"field_type\" => \"select\",\n \"field_name\" => \"character\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => [\n [\"value\" => \"biff\", \"label\" => \"Biff\"],\n [\"value\" => \"marty\", \"label\" => \"Marty\"],\n [\"value\" => \"doc\", \"label\" => \"Doc Brown\"],\n [\"value\" => \"jennifer\", \"label\" => \"Jennifer\"],\n [\"value\" => \"needles\", \"label\" => \"Needles\"],\n ]\n ],\n [\n \"field_type\" => \"checkbox\",\n \"field_name\" => \"kids\",\n \"field_editable\" => rand(0,1000) % 2 === 0 ? true : false,\n \"field_values\" => null,\n ],\n ];\n }", "function getFieldValues()\n {\n $myvalues = $this->m_oPageHelper->getFieldValues($this->m_protocol_shortname);\n return $myvalues;\n }", "function getSettings()\r\n {\r\n global $objDatabase;\r\n $query = \"SELECT name, value FROM \".DBPREFIX.\"module_banner_settings\";\r\n $objResult = $objDatabase->Execute($query);\r\n while (!$objResult->EOF) {\r\n $this->arrSettings[$objResult->fields['name']] = $objResult->fields['value'];\r\n $objResult->MoveNext();\r\n }\r\n }", "public static function get_settings()\n\t{\n\t\tif (! isset(self::$_settings) || self::$_settings == null)\n\t\t{\n\t\t\t$settings = array();\n\t\t\t//Get the actual saved settings\n\t\t\t$query = ee()->db->get(self::$_settings_table_name);\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$settings[$row[\"setting_name\"]] = $row[\"setting_value\"];\n\t\t\t}\n\t\t\tself::$_settings = array_merge(self::_get_default_settings(), $settings);\n\t\t}\n\t\treturn self::$_settings;\n\t}", "public function grid_display_settings($settings)\n {\n return array('field_options' => $this->_fieldSettings($settings));\n }", "protected function getConfigFormValuesSearchLayer()\n {\n $fields = [];\n $fields['DF_INSTALLATION_ID'] = Configuration::get('DF_INSTALLATION_ID');\n $fields['DF_SHOW_LAYER'] = Configuration::get('DF_SHOW_LAYER', null, null, null, true);\n $fields['DF_SHOW_LAYER_MOBILE'] = Configuration::get('DF_SHOW_LAYER_MOBILE', null, null, null, true);\n\n return $fields;\n }", "public function getShopFields()\n {\n return $this->config->pluginFields;\n }", "function get_settings()\n {\n #global $pdo, $db_settings;\n #$database = Database::getInstance();\n $result = Database::$content->query(\"SELECT name, value FROM \".Database::$db_settings['settings_table']);\n while($line = $result->fetch())\n {\n $settings[$line['name']] = $line['value'];\n }\n return $settings;\n }", "protected function getFieldsetConfig()\n {\n return [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Editor Note'),\n 'componentType' => Fieldset::NAME,\n 'dataScope' => static::DATA_SCOPE_PRODUCT, // save data in the product data\n 'provider' => static::DATA_SCOPE_PRODUCT . '_data_source',\n 'ns' => static::FORM_NAME,\n 'collapsible' => true,\n 'sortOrder' => 50,\n 'opened' => false,\n ],\n ],\n ],\n 'children' => [\n static::NOTE_TITLE_FIELD_TEXT => $this->getTitleFieldConfig(10),\n static::NOTE_DESC_FIELD_TEXT => $this->getDescTextFieldConfig(20),\n static::IS_NOTE_DISPLAY => $this->getIsDisplayFieldConfig(30),\n ],\n ];\n }", "public function toArray()\n\t{\n\t\t$data = [];\n\t\tforeach ($this->settings() as $setting) {\n\t\t\t$data[$setting->key()] = $setting->value();\n\t\t}\n\t\treturn $data;\n\t}", "public function getCopy() : array\n {\n return (array)$this->settings;\n }", "public static function parseSettings()\n\t{\n\t\t$settings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sd_googlemaps']);\n\n\t\tif (!is_array($settings)) {\n\t\t\t$settings = [];\n\t\t}\n\t\treturn $settings;\n\t}", "public function settings()\n\t{\n\t\t$settings = array(\n\t\t\t'user_id' \t=> '',\n\t\t\t'private_key' \t=> '',\n\t\t\t'debug'\t=> array('r',\n\t\t\t\tarray(\n\t\t\t\t\t'y' => lang('yes'),\n\t\t\t\t\t'n' => lang('no')\n\t\t\t\t),\n\t\t\t\t'n'\n\t\t\t)\n\t\t);\n\n\t\treturn $settings;\n\t}", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "public function settings_list()\n {\n return [\n 'anonymous_urls' => 1,\n 'registration' => 1,\n 'private_site' => 0,\n 'show_guests_latests_urls' => 1,\n 'hash_ip' => 1,\n 'website_name' => 'UrlHum',\n 'anonymize_ip' => 1,\n 'reservedShortUrls' => '',\n 'deleted_urls_can_be_recreated' => 1,\n 'privacy_policy' => '',\n 'enable_privacy_policy' => 0,\n 'terms_of_use' => '',\n 'enable_terms_of_use' => 0,\n 'custom_html' => '',\n ];\n }", "protected function admin_fields_settings() {\n\n $settings_fields = array(\n\n 'wcsales_general_tabs' => array(),\n \n 'wcsales_settings_tabs' => array(\n\n array(\n 'name' => 'enableresalenotification',\n 'label' => __( 'Enable / Disable Sale Notification', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Enable', 'wc-sales-notification-pro' ),\n 'type' => 'checkbox',\n 'default' => 'off',\n 'class'=>'woolentor_table_row',\n ),\n\n array(\n 'name' => 'notification_content_type',\n 'label' => __( 'Notification Content Type', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Select Content Type', 'wc-sales-notification-pro' ),\n 'type' => 'radio',\n 'default' => 'actual',\n 'options' => array(\n 'actual' => __('Real','wc-sales-notification-pro'),\n 'fakes' => __('Fakes','wc-sales-notification-pro'),\n )\n ),\n\n array(\n 'name' => 'notification_pos',\n 'label' => __( 'Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Sale Notification Position on frontend.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'bottomleft',\n 'options' => array(\n 'topleft' =>__( 'Top Left','wc-sales-notification-pro' ),\n 'topright' =>__( 'Top Right','wc-sales-notification-pro' ),\n 'bottomleft' =>__( 'Bottom Left','wc-sales-notification-pro' ),\n 'bottomright' =>__( 'Bottom Right','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_layout',\n 'label' => __( 'Image Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Layout.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'imageleft',\n 'options' => array(\n 'imageleft' =>__( 'Image Left','wc-sales-notification-pro' ),\n 'imageright' =>__( 'Image Right','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real'\n ),\n\n array(\n 'name' => 'notification_loadduration',\n 'label' => __( 'Loading Time', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Loading duration.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '3',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '3' =>__( '3 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_time_int',\n 'label' => __( 'Time Interval', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Time between notifications.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '4',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_limit',\n 'label' => __( 'Limit', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Order Limit for notification.', 'wc-sales-notification-pro' ),\n 'min' => 1,\n 'max' => 100,\n 'default' => '5',\n 'step' => '1',\n 'type' => 'number',\n 'sanitize_callback' => 'number',\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_uptodate',\n 'label' => __( 'Order Upto', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Do not show purchases older than.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '7',\n 'options' => array(\n '1' =>__( '1 day','wc-sales-notification-pro' ),\n '2' =>__( '2 days','wc-sales-notification-pro' ),\n '3' =>__( '3 days','wc-sales-notification-pro' ),\n '4' =>__( '4 days','wc-sales-notification-pro' ),\n '5' =>__( '5 days','wc-sales-notification-pro' ),\n '6' =>__( '6 days','wc-sales-notification-pro' ),\n '7' =>__( '1 week','wc-sales-notification-pro' ),\n '10' =>__( '10 days','wc-sales-notification-pro' ),\n '14' =>__( '2 weeks','wc-sales-notification-pro' ),\n '21' =>__( '3 weeks','wc-sales-notification-pro' ),\n '28' =>__( '4 weeks','wc-sales-notification-pro' ),\n '35' =>__( '5 weeks','wc-sales-notification-pro' ),\n '42' =>__( '6 weeks','wc-sales-notification-pro' ),\n '49' =>__( '7 weeks','wc-sales-notification-pro' ),\n '56' =>__( '8 weeks','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_inanimation',\n 'label' => __( 'Animation In', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Enter Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeInLeft',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceIn' =>__( 'bounceIn','wc-sales-notification-pro' ),\n 'bounceInDown' =>__( 'bounceInDown','wc-sales-notification-pro' ),\n 'bounceInLeft' =>__( 'bounceInLeft','wc-sales-notification-pro' ),\n 'bounceInRight' =>__( 'bounceInRight','wc-sales-notification-pro' ),\n 'bounceInUp' =>__( 'bounceInUp','wc-sales-notification-pro' ),\n 'fadeIn' =>__( 'fadeIn','wc-sales-notification-pro' ),\n 'fadeInDown' =>__( 'fadeInDown','wc-sales-notification-pro' ),\n 'fadeInDownBig' =>__( 'fadeInDownBig','wc-sales-notification-pro' ),\n 'fadeInLeft' =>__( 'fadeInLeft','wc-sales-notification-pro' ),\n 'fadeInLeftBig' =>__( 'fadeInLeftBig','wc-sales-notification-pro' ),\n 'fadeInRight' =>__( 'fadeInRight','wc-sales-notification-pro' ),\n 'fadeInRightBig' =>__( 'fadeInRightBig','wc-sales-notification-pro' ),\n 'fadeInUp' =>__( 'fadeInUp','wc-sales-notification-pro' ),\n 'fadeInUpBig' =>__( 'fadeInUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipInX' =>__( 'flipInX','wc-sales-notification-pro' ),\n 'flipInY' =>__( 'flipInY','wc-sales-notification-pro' ),\n 'lightSpeedIn' =>__( 'lightSpeedIn','wc-sales-notification-pro' ),\n 'rotateIn' =>__( 'rotateIn','wc-sales-notification-pro' ),\n 'rotateInDownLeft' =>__( 'rotateInDownLeft','wc-sales-notification-pro' ),\n 'rotateInDownRight' =>__( 'rotateInDownRight','wc-sales-notification-pro' ),\n 'rotateInUpLeft' =>__( 'rotateInUpLeft','wc-sales-notification-pro' ),\n 'rotateInUpRight' =>__( 'rotateInUpRight','wc-sales-notification-pro' ),\n 'slideInUp' =>__( 'slideInUp','wc-sales-notification-pro' ),\n 'slideInDown' =>__( 'slideInDown','wc-sales-notification-pro' ),\n 'slideInLeft' =>__( 'slideInLeft','wc-sales-notification-pro' ),\n 'slideInRight' =>__( 'slideInRight','wc-sales-notification-pro' ),\n 'zoomIn' =>__( 'zoomIn','wc-sales-notification-pro' ),\n 'zoomInDown' =>__( 'zoomInDown','wc-sales-notification-pro' ),\n 'zoomInLeft' =>__( 'zoomInLeft','wc-sales-notification-pro' ),\n 'zoomInRight' =>__( 'zoomInRight','wc-sales-notification-pro' ),\n 'zoomInUp' =>__( 'zoomInUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n 'jackInTheBox' =>__( 'jackInTheBox','wc-sales-notification-pro' ),\n 'rollIn' =>__( 'rollIn','wc-sales-notification-pro' ),\n 'rollOut' =>__( 'rollOut','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_outanimation',\n 'label' => __( 'Animation Out', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Out Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeOutRight',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceOut' =>__( 'bounceOut','wc-sales-notification-pro' ),\n 'bounceOutDown' =>__( 'bounceOutDown','wc-sales-notification-pro' ),\n 'bounceOutLeft' =>__( 'bounceOutLeft','wc-sales-notification-pro' ),\n 'bounceOutRight' =>__( 'bounceOutRight','wc-sales-notification-pro' ),\n 'bounceOutUp' =>__( 'bounceOutUp','wc-sales-notification-pro' ),\n 'fadeOut' =>__( 'fadeOut','wc-sales-notification-pro' ),\n 'fadeOutDown' =>__( 'fadeOutDown','wc-sales-notification-pro' ),\n 'fadeOutDownBig' =>__( 'fadeOutDownBig','wc-sales-notification-pro' ),\n 'fadeOutLeft' =>__( 'fadeOutLeft','wc-sales-notification-pro' ),\n 'fadeOutLeftBig' =>__( 'fadeOutLeftBig','wc-sales-notification-pro' ),\n 'fadeOutRight' =>__( 'fadeOutRight','wc-sales-notification-pro' ),\n 'fadeOutRightBig' =>__( 'fadeOutRightBig','wc-sales-notification-pro' ),\n 'fadeOutUp' =>__( 'fadeOutUp','wc-sales-notification-pro' ),\n 'fadeOutUpBig' =>__( 'fadeOutUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipOutX' =>__( 'flipOutX','wc-sales-notification-pro' ),\n 'flipOutY' =>__( 'flipOutY','wc-sales-notification-pro' ),\n 'lightSpeedOut' =>__( 'lightSpeedOut','wc-sales-notification-pro' ),\n 'rotateOut' =>__( 'rotateOut','wc-sales-notification-pro' ),\n 'rotateOutDownLeft' =>__( 'rotateOutDownLeft','wc-sales-notification-pro' ),\n 'rotateOutDownRight' =>__( 'rotateOutDownRight','wc-sales-notification-pro' ),\n 'rotateOutUpLeft' =>__( 'rotateOutUpLeft','wc-sales-notification-pro' ),\n 'rotateOutUpRight' =>__( 'rotateOutUpRight','wc-sales-notification-pro' ),\n 'slideOutUp' =>__( 'slideOutUp','wc-sales-notification-pro' ),\n 'slideOutDown' =>__( 'slideOutDown','wc-sales-notification-pro' ),\n 'slideOutLeft' =>__( 'slideOutLeft','wc-sales-notification-pro' ),\n 'slideOutRight' =>__( 'slideOutRight','wc-sales-notification-pro' ),\n 'zoomOut' =>__( 'zoomOut','wc-sales-notification-pro' ),\n 'zoomOutDown' =>__( 'zoomOutDown','wc-sales-notification-pro' ),\n 'zoomOutLeft' =>__( 'zoomOutLeft','wc-sales-notification-pro' ),\n 'zoomOutRight' =>__( 'zoomOutRight','wc-sales-notification-pro' ),\n 'zoomOutUp' =>__( 'zoomOutUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n ),\n ),\n \n array(\n 'name' => 'background_color',\n 'label' => __( 'Background Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Background Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'heading_color',\n 'label' => __( 'Heading Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Heading Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'content_color',\n 'label' => __( 'Content Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Content Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'cross_color',\n 'label' => __( 'Cross Icon Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Cross Icon Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color'\n ),\n\n ),\n\n 'wcsales_fakes_data_tabs' => array(),\n 'wcsales_plugins_tabs' => array(),\n\n );\n \n return array_merge( $settings_fields );\n }", "public function extra_settings()\n\t{\n\t\t$itemSettings = array( 0 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_max_num',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_size'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 1 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_1',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_height'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 2 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_2',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_width'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\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 3 => array( 'form_type' => 'formMultiDropdown',\n\t\t\t\t\t\t\t\t\t\t 'field' \t=> 'si_extra_settings_3',\n\t\t\t\t\t\t\t\t\t\t 'words' \t=> $this->lang->words['emoticon_image_formats'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> '',\n\t\t\t\t\t\t\t\t\t\t 'type' => 'image_types'\n\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 );\n\t\t\n\t\treturn $itemSettings;\n\t}", "protected function _getFields()\n {\n return array(\n 'xf_tab_name' => array(\n 'tab_name_id' => array(\n 'type' => self::TYPE_UINT,\n 'autoIncrement' => true\n ), /* END 'tab_name_id' */\n 'display_order' => array(\n 'type' => self::TYPE_UINT,\n 'default' => 0\n ), /* END 'display_order' */\n )\n );\n }", "public function load_settings_fields() {\n\t\t\t$this->setting_option_fields = array(\n\t\t\t\t'admin_mail_from_name' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_from_email' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_email'] ) ? $this->setting_option_values['admin_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_to' => array(\n\t\t\t\t\t'name' => 'admin_mail_to',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Mail To', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Separate multiple email addresses with a comma, e.g. [email protected], [email protected].', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_to'] ) ? $this->setting_option_values['admin_mail_to'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_subject' => array(\n\t\t\t\t\t'name' => 'admin_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_subject'] ) ? $this->setting_option_values['admin_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_message' => array(\n\t\t\t\t\t'name' => 'admin_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_message'] ) ? stripslashes( $this->setting_option_values['admin_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[admin_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_admin_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'admin_mail_html' => array(\n\t\t\t\t\t'name' => 'admin_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_html'] ) ? $this->setting_option_values['admin_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'user_mail_from_name' => array(\n\t\t\t\t\t'name' => 'user_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_from_email' => array(\n\t\t\t\t\t'name' => 'user_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_from_email'] ) ? $this->setting_option_values['user_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_subject' => array(\n\t\t\t\t\t'name' => 'user_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_subject'] ) ? $this->setting_option_values['user_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_message' => array(\n\t\t\t\t\t'name' => 'user_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_message'] ) ? stripslashes( $this->setting_option_values['user_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[user_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_user_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'user_mail_html' => array(\n\t\t\t\t\t'name' => 'user_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_html'] ) ? $this->setting_option_values['user_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}", "private function get_additional_fields() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\t$additional_fields = $options['additional_fields'];\n\n\t\t\t$fields = explode( ',', $additional_fields );\n\n\t\t\tforeach ( $fields as $key => $field ) {\n\n\t\t\t\t$fields[ $key ] = str_replace( ' ', '_', $field );\n\n\t\t\t}\n\n\t\t\tif ( ! is_array( $fields ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "protected function configFieldItems(): array\n {\n return [\n 'iso' => [\n 'display' => 'Currency',\n 'instructions' => 'Select which currency you want to use for the field.',\n 'type' => 'select',\n 'default' => 'USD',\n 'options' => collect(Currencies::$currencyList)\n ->map(fn($item, $key) => Arr::get($item, 'name') . \" ($key)\")\n ->sortBy(fn($val) => $val),\n 'width' => 50\n ],\n ];\n }", "function pajaxReadSettings(){\r\r\n\r\r\n\tif(file_exists(PAJAXSETTINGFILE)){\r\r\n\r\r\n\t\t$settings = file_get_contents(PAJAXSETTINGFILE);\r\r\n\r\r\n\t\treturn explode(\"||\", $settings);\r\r\n\r\r\n\t}\r\r\n\r\r\n\treturn $settings = array();\r\r\n\r\r\n\r\r\n\r\r\n}", "public function get_editor_fields() {\n return array('cloudpoodll' => get_string('pluginname', constants::M_COMPONENT));\n }", "public function getConfigFieldsValues()\n {\n return array(\n 'PRIVAT24_MERCHANT_ID' => Tools::getValue('PRIVAT24_MERCHANT_ID', Configuration::get('PRIVAT24_MERCHANT_ID')),\n 'PRIVAT24_MERCHANT_PASSWORD' => Tools::getValue('PRIVAT24_MERCHANT_PASSWORD', Configuration::get('PRIVAT24_MERCHANT_PASSWORD')),\n 'PRIVAT24_DEBUG_MODE' => Tools::getValue('PRIVAT24_DEBUG_MODE', Configuration::get('PRIVAT24_DEBUG_MODE')),\n 'PRIVAT24_PAYMENT_NOTIFY' => Tools::getValue('PRIVAT24_PAYMENT_NOTIFY', Configuration::get('PRIVAT24_PAYMENT_NOTIFY')),\n 'PRIVAT24_NOTIFY_EMAILS' => Tools::getValue('PRIVAT24_NOTIFY_EMAILS', Configuration::get('PRIVAT24_NOTIFY_EMAILS')),\n );\n }" ]
[ "0.77598584", "0.7529695", "0.72780126", "0.7182987", "0.7170281", "0.71687263", "0.7119809", "0.6981577", "0.6966827", "0.6937861", "0.68980175", "0.68972653", "0.68909657", "0.6869143", "0.68313134", "0.6825593", "0.68201965", "0.67860216", "0.67735314", "0.6694806", "0.6684982", "0.6652405", "0.662965", "0.661841", "0.6603015", "0.65855485", "0.65802485", "0.6566426", "0.6564886", "0.65641683", "0.656237", "0.65565896", "0.6555573", "0.65525484", "0.6547263", "0.654488", "0.6538364", "0.653202", "0.6518252", "0.6516158", "0.65059525", "0.6493436", "0.6482876", "0.64760834", "0.6474786", "0.6472665", "0.64668745", "0.64663607", "0.64651674", "0.64535725", "0.6438611", "0.6434834", "0.6409587", "0.6407554", "0.64047325", "0.63981897", "0.6396776", "0.6396769", "0.63945514", "0.63941175", "0.6381677", "0.63714623", "0.63587224", "0.6352348", "0.63519526", "0.6351468", "0.6351468", "0.6351468", "0.6342603", "0.6331176", "0.6328008", "0.6327968", "0.63232476", "0.63207144", "0.63193697", "0.6289132", "0.6287984", "0.6286474", "0.6285974", "0.62801266", "0.6275111", "0.6268611", "0.62643147", "0.62632257", "0.6259092", "0.6257906", "0.6256595", "0.6255914", "0.6251142", "0.6249334", "0.6248994", "0.62430066", "0.62380314", "0.6234751", "0.62302154", "0.6227819", "0.6225023", "0.6222861", "0.62185234", "0.62164223" ]
0.6438893
50
Return array portion of field settings for use in the promotional fields tab.
public function promotional_fields() { $fields = array( array( 'id' => 'vpn_promo_item01_url', 'type' => 'text', 'name' => __( 'URL To First Product Being Promoted', 'wpcd' ), 'std' => 'https://spinupvpn.com/help', 'tooltip' => __( 'You can add a link to the top of all subscriptions in the users VPN Account screen. This link can be to your store page or to a specific item. Do NOT use a link that automatically adds a product to the cart.', 'wpcd' ), 'tab' => 'vpn-promotions', ), array( 'id' => 'vpn_promo_item01_text', 'type' => 'textarea', 'name' => __( 'What is the text that the user should see for the promotional link?', 'wpcd' ), 'tooltip' => __( 'Example: Add a new server', 'wpcd' ), 'tab' => 'vpn-promotions', ), array( 'id' => 'vpn_promo_item01_button_option', 'type' => 'checkbox', 'name' => __( 'Make the above promo a button?', 'wpcd' ), 'tooltip' => __( 'You can make the promo a button or just a standard text link. A button is more obvious but might annoy your users so be careful with this choice.', 'wpcd' ), 'tab' => 'vpn-promotions', ), array( 'id' => 'vpn_promo_item02_url', 'type' => 'text', 'name' => __( 'URL To Second Product Being Promoted', 'wpcd' ), 'std' => 'https://spinupvpn.com/help', 'tooltip' => __( 'You can add a link to the top of the VPN instances page when there are no instances on the page. This link can be to your store page or to a specific item. Do NOT use a link that automatically adds a product to the cart.', 'wpcd' ), 'tab' => 'vpn-promotions', ), array( 'id' => 'vpn_promo_item02_text', 'type' => 'textarea', 'name' => __( 'What is the text that the user should see for the promotional link?', 'wpcd' ), 'tooltip' => __( 'Example: Add a new server', 'wpcd' ), 'tab' => 'vpn-promotions', ), array( 'id' => 'vpn_promo_item02_button_option', 'type' => 'checkbox', 'name' => __( 'Make the above promo a button?', 'wpcd' ), 'tooltip' => __( 'You can make the promo a button or just a standard text link. A button is more obvious but might annoy your users so be careful with this choice.', 'wpcd' ), 'tab' => 'vpn-promotions', ), ); return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mace_admin_get_settings_fields() {\n\t$fields = array();\n\t$settings_pages = mace_get_settings_pages();\n\n\tforeach( $settings_pages as $page_id => $page_config ) {\n\t\t$fields[ $page_id ] = $page_config['fields'];\n\t}\n\n\treturn (array) apply_filters( 'mace_admin_get_settings_fields', $fields );\n}", "abstract public function getSettingsFields();", "function snax_admin_get_settings_fields() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_fields', array(\n\n\t\t/** General Section **************************************************** */\n\n\t\t'snax_settings_general' => array(\n\t\t\t'snax_active_formats' => array(\n\t\t\t\t'title' => __( 'Active formats', 'snax' ) . '<br /><span style=\"font-weight: normal;\">' . __( '(drag to reorder)', 'snax' ) . '</span>',\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_formats_order' => array(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t),\n\t\t\t'snax_featured_media_required' => array(\n\t\t\t\t'title' => __( 'Featured image field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_featured_media_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_required' => array(\n\t\t\t\t'title' => __( 'Category field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_multi' => array(\n\t\t\t\t'title' => __( 'Multiple categories selection?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_multi',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_whitelist' => array(\n\t\t\t\t'title' => __( 'Category whitelist', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_whitelist',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_auto_assign' => array(\n\t\t\t\t'title' => __( 'Auto assign to categories', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_auto_assign',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_allow_snax_authors_to_add_referrals' => array(\n\t\t\t\t'title' => __( 'Referral link field ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_allow_snax_authors_to_add_referrals',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_list_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in open lists', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_list_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_single_post_page_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Single Post Page', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_featured_images_for_formats' => array(\n\t\t\t\t'title' => __( 'Show featured images for single:', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_show_featured_images_for_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_display_comments_on_lists' => array(\n\t\t\t\t'title' => __( 'Display items comments on list view ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_display_comments_on_lists',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_origin' => array(\n\t\t\t\t'title' => __( 'Show the \"This post was created with our nice and easy submission form.\" text', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_show_origin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_misc_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Misc', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_item_count_in_title' => array(\n\t\t\t\t'title' => __( 'Show items count in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_count_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_admin_bar' => array(\n\t\t\t\t'title' => __( 'Disable admin bar for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_admin_bar',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_dashboard_access' => array(\n\t\t\t\t'title' => __( 'Disable Dashboard access for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_dashboard_access',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_wp_login' => array(\n\t\t\t\t'title' => __( 'Disable WP login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_wp_login',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_enable_login_popup' => array(\n\t\t\t\t'title' => __( 'Enbable the login popup ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_enable_login_popup',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_skip_verification' => array(\n\t\t\t\t'title' => __( 'Moderate new posts?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_skip_verification',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_mail_notifications' => array(\n\t\t\t\t'title' => __( 'Send mail to admin when new post/item was added?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_mail_notifications',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Lists Section ****************************************************** */\n\n\t\t'snax_settings_lists' => array(\n\t\t\t'snax_active_item_forms' => array(\n\t\t\t\t'title' => __( 'Item forms', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_item_forms',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_open_list_in_title' => array(\n\t\t\t\t'title' => __( 'Show list status in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_list_status_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Pages Section ***************************************************** */\n\n\t\t'snax_settings_pages' => array(\n\t\t\t// Frontend Submission.\n\t\t\t'snax_frontend_submission_page_id' => array(\n\t\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_frontend_submission_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Terms & Conditions.\n\t\t\t'snax_legal_page_id' => array(\n\t\t\t\t'title' => __( 'Terms and Conditions', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_legal_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Report.\n\t\t\t'snax_report_page_id' => array(\n\t\t\t\t'title' => __( 'Report', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_report_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Voting Section **************************************************** */\n\n\t\t'snax_settings_voting' => array(\n\t\t\t'snax_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Enable voting?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_guest_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Guests can vote?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_guest_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_voting_post_types' => array(\n\t\t\t\t'title' => __( 'Allow users to vote on post types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_post_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_fake_vote_count_base' => array(\n\t\t\t\t'title' => __( 'Fake vote count base', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_fake_vote_count_base',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Limits Section **************************************************** */\n\n\t\t'snax_settings_limits' => array(\n\n\t\t\t/* IMAGES UPLOAD */\n\n\t\t\t'snax_limits_image_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Image upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_image_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_image_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\n\t\t\t/* AUDIO UPLOAD */\n\n\t\t\t'snax_limits_audio_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Audio upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_audio_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\n\t\t\t/* VIDEO UPLOAD */\n\n\t\t\t'snax_limits_video_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Video upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_video_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\n\t\t\t/* POSTS */\n\n\t\t\t'snax_limits_posts_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Posts', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_items_per_page' => array(\n\t\t\t\t'title' => __( 'List items per page', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_items_per_page',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_posts_per_day' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_posts_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_new_post_items_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_post_items_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_submission_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_user_submission_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_tags_limit' => array(\n\t\t\t\t'title' => __( 'Tags', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_tags_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_description_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_description_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_content_max_length' => array(\n\t\t\t\t'title' => __( 'Content length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\n\t\t\t/* ITEMS */\n\n\t\t\t'snax_limits_items_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Items', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_content_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_source_max_length' => array(\n\t\t\t\t'title' => __( 'Source length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_source_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_ref_link_max_length' => array(\n\t\t\t\t'title' => __( 'Referral link length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_ref_link_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Auth Section ***************************************************** */\n\n\t\t'snax_settings_auth' => array(\n\t\t\t'snax_facebook_app_id' => array(\n\t\t\t\t'title' => __( 'Facebook App ID', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_facebook_app_id',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_login_recaptcha' => array(\n\t\t\t\t'title' => __( 'reCaptcha for login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_login_recaptcha',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_site_key' => array(\n\t\t\t\t'title' => __( 'reCaptcha Site Key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_site_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_secret' => array(\n\t\t\t\t'title' => __( 'reCaptcha Secret', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_secret',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Demo Section ***************************************************** */\n\n\t\t'snax_settings_demo' => array(\n\t\t\t'snax_demo_mode' => array(\n\t\t\t\t'title' => __( 'Enable demo mode?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_mode',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_demo_image_post_id' => array(\n\t\t\t\t'title' => __( 'Image', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'image' ),\n\t\t\t),\n\t\t\t'snax_demo_gallery_post_id' => array(\n\t\t\t\t'title' => __( 'Gallery', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'gallery' ),\n\t\t\t),\n\t\t\t'snax_demo_embed_post_id' => array(\n\t\t\t\t'title' => __( 'Embed', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'embed' ),\n\t\t\t),\n\t\t\t'snax_demo_list_post_id' => array(\n\t\t\t\t'title' => __( 'List', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'list' ),\n\t\t\t),\n\t\t\t'snax_demo_meme_post_id' => array(\n\t\t\t\t'title' => __( 'Meme', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'meme' ),\n\t\t\t),\n\t\t),\n\n\t\t/** Embedly Section ********************************************** */\n\n\t\t'snax_settings_embedly' => array(\n\t\t\t'snax_embedly_enable' => array(\n\t\t\t\t'title' => __( 'Enable Embedly support?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_enable',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_dark_skin' => array(\n\t\t\t\t'title' => __( 'Dark skin', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_dark_skin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_buttons' => array(\n\t\t\t\t'title' => __( 'Share buttons', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_buttons',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_width' => array(\n\t\t\t\t'title' => __( 'Width', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_width',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_alignment' => array(\n\t\t\t\t'title' => __( 'Alignment', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_alignment',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_api_key' => array(\n\t\t\t\t'title' => __( 'Embedly cards API key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_api_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t\t/** Permalinks Section ********************************************** */\n\n\t\t'snax_permalinks' => array(\n\t\t\t'snax_item_slug' => array(\n\t\t\t\t'title' => __( 'Item url', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_item_slug',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_url_var_prefix' => array(\n\t\t\t\t'title' => __( 'URL variable', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_url_var_prefix',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t) );\n}", "public function get_settings_fields() {\n $settings_fields = array(\n 'grocery-general' => array(\n 'popup_logo' => array(\n 'name' => 'popup_logo',\n 'label' => __( 'Popup Logo', 'fondendpost' ),\n 'desc' => __( 'Logo to show in the popup.', 'fondendpost' ),\n 'type' => 'file',\n ),\n ),\n );\n \n return $settings_fields;\n\n }", "protected function getFields() {\n return $this->getConfiguration()['settings']['fields'];\n }", "public function get_settings_fields() {\n\n\n\t\t/*\n\t\t * name ( name of the field)\n\t\t * type ( type of the field which help to call call class back)\n\t\t * label ( [optional] if you want to display any think the description )\n\t\t * default ( [optional] default values)\n\t\t * options ( [optional] options we use when type is select mostly but this use to give option to fields)\n\t\t * link ( [optional] in case you send a link to field)\n\t\t * sanitize_callback ( [optional] sanitize call back of the field)\n\t\t * priority [ [optional] use to giving parity to the user]\n\t\t * page ( page name we use menu slug this fields belong to this page)\n\t\t *\n\t\t * */\n\n\n\t\t// setting files index key is ( section => array( fields ))\n\t\t$settings_fields = array(\n\t\t\t'test_1' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'name',\n\t\t\t\t\t'label' => __( 'Enter the name', 'sharaz_settings' ),\n\t\t\t\t\t'desc' => __( '<h4>Sharaz Setting Api</h4>if you like please share to others', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '5',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'salary',\n\t\t\t\t\t'label' => 'Select your salary range',\n\t\t\t\t\t'type' => 'ss_select',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '2000',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'1000' => '1000',\n\t\t\t\t\t\t'2000' => '2000',\n\t\t\t\t\t\t'3000' => '3000',\n\t\t\t\t\t),\n\t\t\t\t\t'priority' => '10'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'advance_bonus',\n\t\t\t\t\t'label' => __( 'Receving advance bonus', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_checkbox',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '15',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'your_color',\n\t\t\t\t\t'label' => __( 'Your Setting', 'sharaz-setting' ),\n\t\t\t\t\t'type' => 'ss_color',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'priority' => '20',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'test_2' => array(\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'suggestion',\n\t\t\t\t\t\t'label' => __( 'Ang suggestion', 'sharaz_settings' ),\n\t\t\t\t\t\t'desc' => __( '<h4>Please type some</h4>if you like suggest some thing to us', 'sharaz_settings' ),\n\t\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t\t'page' =>'ss_page1',\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t\t'priority' => '5',\n\t\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\treturn $settings_fields;\n\t}", "function get_settings_fields() {\n global $wrr_pro;\n $settings_fields = array(\n \n 'wc_segmented_ratings' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Segmented Ratings?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable. Please note, it will not work, if product rating is disabled from <a href=\"' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '\">WooCommerce setting</a>.',\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable segmented ratings for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'params_per',\n 'label' => 'Parameter Base',\n 'desc' => 'How do you want to set rating parameters for your products? <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'radio',\n 'options' => array(\n 'site' => 'Same parameters for all products',\n 'category' => 'Different parameters for each category',\n 'product' => 'Different parameters for each product',\n ),\n 'default' => 'site',\n 'disabled' => true,\n ),\n array(\n 'name' => 'fields',\n 'label' => 'Rating Parameters',\n 'desc' => 'If \\'<strong><label for=\"mdc-wc_segmented_ratings[params_per][site]\">Same parameters for all products</label></strong>\\' choosen for \\'Parameter Base\\' above. Ignore otherwise.<br />Type one segment per line. Separate \\'key\\' and \\'label\\' with a pipe symbol (\\'|\\').',\n 'type' => 'textarea',\n 'default' => 'price|Price'.PHP_EOL.'quality|Quality',\n ),\n ),\n 'wc_rich_editor' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Rich Editor?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable rich editor (<a href=\"https://en.wikipedia.org/wiki/WYSIWYG\">WYSIWYG</a>) in product review <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'disabled' => true,\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable rich editor for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'teeny',\n 'label' => 'Teeny Mode?',\n 'desc' => 'Check to enable teeny mode. It\\'ll hide some features of WYSIWYG editor. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'quicktags',\n 'label' => 'Enable Text editor?',\n 'desc' => 'Check to enable quick tag mode. It\\'ll show \\'Text\\' tab in WYSIWYG editor to write/view HTML. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'media_buttons',\n 'desc' => 'Check to allow reviewers to upload/attach media files with review. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'label' => 'Enable Media Uploader?',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n ), \n );\n\n return $settings_fields;\n }", "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' => 'app_id',\n\t\t\t\t\t\t'label' => esc_html__( 'Application ID', 'gravityformsicontact' ),\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'name' => 'api_username',\n\t\t\t\t\t\t'label' => esc_html__( 'Account Username', 'gravityformsicontact' ),\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'name' => 'api_password',\n\t\t\t\t\t\t'label' => esc_html__( 'API Password', 'gravityformsicontact' ),\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'input_type' => 'password',\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'name' => 'client_folder',\n\t\t\t\t\t\t'label' => esc_html__( 'Client Folder', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'choices' => version_compare( GFForms::$version, '2.5-dev-1', '>=' ) ? array( $this, 'client_folders_for_plugin_setting' ) : $this->client_folders_for_plugin_setting(),\n\t\t\t\t\t\t'dependency' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Client Folders.', 'gravityformsicontact' ),\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__( 'iContact settings have been updated.', 'gravityformsicontact' )\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}", "private function set_fields() {\r\n\r\n\t\t$fields = array();\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_billing' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_shipping' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_additional' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\treturn $fields;\r\n\t}", "public function getSettings() : array;", "public function get_settings_fields() {\n\t\treturn tml_redirection_admin_get_settings_fields();\n\t}", "public static function get_output_fields() {\n\t\t$output_fields = [];\n\n\t\t/**\n\t\t * Get the allowed setting groups and their fields\n\t\t */\n\t\t$allowed_setting_groups = DataSource::get_allowed_settings_by_group();\n\n\t\tif ( ! empty( $allowed_setting_groups ) && is_array( $allowed_setting_groups ) ) {\n\t\t\tforeach ( $allowed_setting_groups as $group => $setting_type ) {\n\n\t\t\t\t$replaced_group = preg_replace( '[^a-zA-Z0-9 -]', ' ', $group );\n\n\t\t\t\tif ( ! empty( $replaced_group ) ) {\n\t\t\t\t\t$group = $replaced_group;\n\t\t\t\t}\n\n\t\t\t\t$setting_type = lcfirst( $group );\n\t\t\t\t$setting_type = lcfirst( str_replace( '_', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( '-', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( ' ', '', ucwords( $setting_type, ' ' ) ) );\n\n\t\t\t\t$output_fields[ $setting_type . 'Settings' ] = [\n\t\t\t\t\t'type' => $setting_type . 'Settings',\n\t\t\t\t\t'resolve' => function () use ( $setting_type ) {\n\t\t\t\t\t\treturn $setting_type;\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Get all of the settings, regardless of group\n\t\t */\n\t\t$output_fields['allSettings'] = [\n\t\t\t'type' => 'Settings',\n\t\t\t'resolve' => function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t];\n\n\t\treturn $output_fields;\n\t}", "protected function getConfigFieldsValues()\n {\n return array(\n $this->mod_prefix.'SHOW_WEBPAGE' => Configuration::get($this->mod_prefix.'SHOW_WEBPAGE'),\n $this->mod_prefix.'SHOW_WEBSITE' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE'),\n $this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX'),\n $this->mod_prefix.'SHOW_ORGANIZATION' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION'),\n $this->mod_prefix.'SHOW_ORGANIZATION_LOGO' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_LOGO'),\n $this->mod_prefix.'SHOW_ORGANIZATION_CONTACT' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_CONTACT'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE'),\n $this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'SHOW_LOCALBUSINESS' => Configuration::get($this->mod_prefix.'SHOW_LOCALBUSINESS'),\n $this->mod_prefix.'LOCALBUSINESS_TYPE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_TYPE'),\n $this->mod_prefix.'LOCALBUSINESS_STORENAME' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STORENAME'),\n $this->mod_prefix.'LOCALBUSINESS_DESC' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_DESC'),\n $this->mod_prefix.'LOCALBUSINESS_VAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_VAT'),\n $this->mod_prefix.'LOCALBUSINESS_PHONE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PHONE'),\n $this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW'),\n //$this->mod_prefix.'LOCALBUSINESS_PRANGE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE'),\n $this->mod_prefix.'LOCALBUSINESS_STREET' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STREET'),\n $this->mod_prefix.'LOCALBUSINESS_COUNTRY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_COUNTRY'),\n $this->mod_prefix.'LOCALBUSINESS_REGION' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_REGION'),\n $this->mod_prefix.'LOCALBUSINESS_CODE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_CODE'),\n $this->mod_prefix.'LOCALBUSINESS_LOCALITY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_LOCALITY'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_SHOW'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LAT'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LON' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LON')\n );\n }", "private function getSectionSettingFields(){\n\t\t\t\n\t\t\t$fields = array(\n\n\t\t\t\tField::text(\n\t\t\t\t\t'name',\n\t\t\t\t\t__( 'Template name', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t\tField::text( \n\t\t\t\t\t'classes',\n\t\t\t\t\t__( 'CSS Classes', 'chefsections' ),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'placeholder' => __( 'Seperate with commas\\'s', 'chefsections' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\tField::checkbox(\n\t\t\t\t\t'hide_container',\n\t\t\t\t\t__( 'Hide Container', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\t$fields = apply_filters( 'chef_sections_setting_fields', $fields, $this );\n\n\t\t\treturn $fields;\n\t\t}", "function get_form_editor_field_settings() {\n\t\treturn array(\n\t\t\t'label_setting',\n\t\t\t'description_setting',\n\t\t\t'rules_setting',\n\t\t\t'placeholder_setting',\n\t\t\t'input_class_setting',\n\t\t\t'css_class_setting',\n\t\t\t'size_setting',\n\t\t\t'admin_label_setting',\n\t\t\t'default_value_setting',\n\t\t\t'visibility_setting',\n\t\t\t'conditional_logic_field_setting',\n\t\t);\n\t}", "protected function getSettingArray()\n {\n return $this->container->get($this->getSettingKey());\n }", "public function plugin_settings_fields() {\n\n\t\t// Get current plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t// Prepare base fields.\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'accessToken',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'customAppEnable',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => null,\n\t\t\t\t'label' => null,\n\t\t\t\t'type' => 'auth_token_button',\n\t\t\t),\n\t\t);\n\n\t\t// If API is initialized, add custom app key/secret fields.\n\t\tif ( $this->initialize_api() ) {\n\t\t\t$fields[] = array( 'name' => 'customAppKey', 'type' => 'hidden' );\n\t\t\t$fields[] = array( 'name' => 'customAppSecret', 'type' => 'hidden' );\n\t\t}\n\n\t\t// Setup base fields.\n\t\treturn array( array( 'fields' => $fields ) );\n\n\t}", "public function fields(): array{\n\t\treturn [\n\t\t\t'id' => [\n\t\t\t\t'type' => Type::nonNull(Type::int()),\n\t\t\t\t'description' => 'The id of the user',\n\t\t\t],\n\t\t\t'uid' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'description' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'Description of the setting',\n\t\t\t],\n\t\t\t'type' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'status' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'properties' => [\n\t\t\t\t'type' => GraphQL::type('property'),\n\t\t\t\t'description' => 'A list of the property',\n\t\t\t\t'is_relation' => false,\n\t\t\t],\n\n\t\t];\n\t}", "function bdpp_settings_tab() {\n\t\n\t$result_arr = array();\n\n\t$settings_arr = apply_filters('bdpp_settings_tab', array(\n\t\t\t\t\t\t\t'general'\t=> __('General', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'trending'\t=> __('Trending Post', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'taxonomy'\t=> __('Taxonomy', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'sharing'\t=> __('Sharing', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'css'\t\t=> __('CSS', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'misc'\t\t=> __('Misc', 'blog-designer-pack'),\n\t\t\t\t\t\t));\n\n\tforeach ($settings_arr as $sett_key => $sett_val) {\n\t\tif( !empty($sett_key) && !empty($sett_val) ) {\n\t\t\t$result_arr[trim($sett_key)] = trim($sett_val);\n\t\t}\n\t}\n\n\treturn $result_arr;\n}", "public static function get_input_fields() {\n\t\t$allowed_settings = DataSource::get_allowed_settings();\n\n\t\t$input_fields = [];\n\n\t\tif ( ! empty( $allowed_settings ) ) {\n\n\t\t\t/**\n\t\t\t * Loop through the $allowed_settings and build fields\n\t\t\t * for the individual settings\n\t\t\t */\n\t\t\tforeach ( $allowed_settings as $key => $setting ) {\n\n\t\t\t\t/**\n\t\t\t\t * Determine if the individual setting already has a\n\t\t\t\t * REST API name, if not use the option name.\n\t\t\t\t * Sanitize the field name to be camelcase\n\t\t\t\t */\n\t\t\t\tif ( ! empty( $setting['show_in_rest']['name'] ) ) {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $setting['show_in_rest']['name'], '_' ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $key, '_' ) ) );\n\t\t\t\t}\n\n\t\t\t\t$replaced_setting_key = preg_replace( '[^a-zA-Z0-9 -]', ' ', $individual_setting_key );\n\n\t\t\t\tif ( ! empty( $replaced_setting_key ) ) {\n\t\t\t\t\t$individual_setting_key = $replaced_setting_key;\n\t\t\t\t}\n\n\t\t\t\t$individual_setting_key = lcfirst( $individual_setting_key );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '_', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '-', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( ' ', '', ucwords( $individual_setting_key, ' ' ) ) );\n\n\t\t\t\t/**\n\t\t\t\t * Dynamically build the individual setting,\n\t\t\t\t * then add it to the $input_fields\n\t\t\t\t */\n\t\t\t\t$input_fields[ $individual_setting_key ] = [\n\t\t\t\t\t'type' => $setting['type'],\n\t\t\t\t\t'description' => $setting['description'],\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\treturn $input_fields;\n\t}", "public function getPluginSettings()\n {\n # Get common and specific settings\n $combine = array_merge($this->common_settings, $this->getSettingsFields());\n $settings = [];\n \n $key = strtolower($this->getKey());\n foreach($combine as $k => $v){\n $settings[$key . '_' . $k] = $v;\n }\n\n # Add Feature list of options \n $this->addSettingsOptions('features', $settings, $this->getFeatures());\n\n # Add Feature list of options\n $this->addSettingsOptions('filters', $settings, $this->getFilters()); \n\n # Add Feature list of options\n $this->addSettingsOptions('weight_by', $settings, $this->getWeightFeatures(), true);\n \n return $settings;\n \n }", "public function getAdditionalFields() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\tif ($this->installed()) {\n\t\t\t$ro_settings = $this->config->get('related_options');\n\t\t\t$std_fields = array('sku', 'upc', 'ean', 'location');\n\t\t\tforeach ($std_fields as $field) {\n\t\t\t\tif ( isset($ro_settings['spec_'.$field]) && $ro_settings['spec_'.$field] ) {\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "public function feed_settings_fields() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'title' => '',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_name',\n\t\t\t\t\t\t'label' => esc_html__( 'Feed Name', 'gravityformsicontact' ),\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'tooltip' => '<h6>'. esc_html__( 'Name', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'default_value' => $this->get_default_feed_name(),\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'list',\n\t\t\t\t\t\t'label' => esc_html__( 'iContact List', 'gravityformsicontact' ),\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->lists_for_feed_setting(),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Lists.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'iContact List', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which iContact list this feed will add contacts to.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'fields',\n\t\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t\t'field_map' => $this->fields_for_feed_mapping(),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Map Fields', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which Gravity Form fields pair with their respective iContact fields.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'custom_fields',\n\t\t\t\t\t\t'label' => '',\n\t\t\t\t\t\t'type' => 'dynamic_field_map',\n\t\t\t\t\t\t'field_map' => version_compare( GFForms::$version, '2.5-dev-1', '<' ) ? $this->custom_fields_for_feed_setting() : array( $this, 'custom_fields_for_feed_setting' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'create_new_custom_fields' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Opt-In Condition', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable', 'gravityformsicontact' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Export to iContact if', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Opt-In Condition', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'When the opt-in condition is enabled, form submissions will only be exported to iContact when the condition is met. When disabled, all form submissions will be exported.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t)\t\n\t\t\t)\n\t\t);\n\t\t\n\t}", "protected function _getSectionsFields()\n {\n $arr = array(\n 'general' => array( // This is a section. See `getSectionId()` for how it gets transformed into an actual section name.\n 'label' => $this->__('General Settings'),\n 'header' => $this->__('General settings about imported posts.'),\n // If 'header' is present, it will be used. If it's a callable, its return value will be used.\n 'fields' => array( // An array of fields, by field code\n 'post_type' => array(\n 'label' => $this->__('Post Type'),\n 'type' => 'select',\n // Type can be one of the existing renderer types (select, checkbox, number, text), or make your own! See `_getFieldRenderers()`\n 'value' => $this->createCommand(array($this, 'getApiLoginOptions')),\n // If no value, it is automatically taken from the local data with the field's ID as key!\n // If value is present, it will be used. If it's a callable, its return value will be used.\n )\n ),\n ),\n );\n return $arr;\n }", "function get_meta_array( $settings ){\n\t\t$settings[ $this->id ] = array(\n\t\t\t\t'name' => $this->multiple_up.' Lud',\n\t\t\t\t//'icon' => $this->icon,\n\t\t\t\t'opts' => $this->sec_site_options(),\n\t\t);\n\t\treturn $settings;\n\t}", "protected function get_settings_array() {\n\t\t$plugin_path = Tribe__Events__Main::instance()->plugin_path;\n\t\treturn (array) include $plugin_path . 'src/admin-views/tribe-options-timezones.php';\n\t}", "function inspiry_get_submit_fields() {\n\t\t$inspiry_submit_property_fields = get_option( 'inspiry_submit_property_fields' );\n\t\tif ( ! empty( $inspiry_submit_property_fields ) && is_array( $inspiry_submit_property_fields ) ) {\n\t\t\treturn $inspiry_submit_property_fields;\n\t\t} else {\n\t\t\t// All fields - To handle the case where related setting is not saved after theme update\n\t\t\treturn array(\n\t\t\t\t'title',\n\t\t\t\t'description',\n\t\t\t\t'property-type',\n\t\t\t\t'property-status',\n\t\t\t\t'locations',\n\t\t\t\t'bedrooms',\n\t\t\t\t'bathrooms',\n\t\t\t\t'garages',\n\t\t\t\t'property-id',\n\t\t\t\t'price',\n\t\t\t\t'price-postfix',\n\t\t\t\t'area',\n\t\t\t\t'area-postfix',\n\t\t\t\t'lot-size',\n\t\t\t\t'lot-size-postfix',\n\t\t\t\t'video',\n\t\t\t\t'images',\n\t\t\t\t'address-and-map',\n\t\t\t\t'attachments',\n\t\t\t\t'additional-details',\n\t\t\t\t'featured',\n\t\t\t\t'features',\n\t\t\t\t'agent',\n\t\t\t\t'parent',\n\t\t\t\t'reviewer-message',\n\t\t\t\t'floor-plans',\n\t\t\t);\n\t\t}\n\t}", "public function getSettings() : array\n {\n return $this->settings;\n }", "public function feed_settings_fields() {\n\n return array(\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Configurações do Feed BuddyPress', 'gravityformsbuddy' ),\n\t\t\t\t'description' => '',\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__( 'Nome', 'gravityformsbuddy' ),\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__( 'Nome', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Entre com um nome para o Feed para identificá-lo.', 'gravityformsbuddy' )\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' => 'toUser',\n\t\t\t\t\t\t'label' => esc_html__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'select_custom',\n\t\t\t\t\t\t'choices' => $this->get_buddy_users_as_choices( 'outgoing_numbers' ),\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'input_class' => 'merge-tag-support mt-position-right',\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__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Usuário o qual receberá as notificações', 'gravityformsbuddy' )\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' => 'pathUrl',\n\t\t\t\t\t\t'label' => esc_html__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => false,\n\t\t\t\t\t\t'class' \t => '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__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Link que será redirecionado para quando o usuário clicar na notificação', 'gravityformsbuddy' )\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' => 'message',\n\t\t\t\t\t\t'label' => esc_html__( 'Mensagem Padrão', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'class' => 'medium merge-tag-support mt-position-right',\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__( 'Mensagem', 'gravityformstwilio' ),\n\t\t\t\t\t\t\tesc_html__( 'Escreva uma mensagem que será mostrada como notificação', 'gravityformsbuddy' )\n\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}", "static function getGeneralSettingsValues(){\r\n\t\t\r\n\t\t$arrValues = get_option('revslider-global-settings', '');\r\n\t\t\r\n\t\t$arrValues = maybe_unserialize($arrValues);\r\n\r\n\t\treturn($arrValues);\r\n\t}", "function get_settings(){\n $settings = array(\n 'section_title' => array(\n 'name' => __('GWP Custom Tabs','GWP'),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wc_'.$this->id.'_section_title'\n ),\n 'title' => array(\n 'name' => __( 'Global Custom Tabs', 'GWP' ),\n 'type' => $this->post_type,\n 'desc' => __( 'Start typing the Custom Tab name, Used for including custom tabs on all products.', 'GWP' ),\n 'desc_tip' => true,\n 'default' => '',\n 'id' => 'wc_'.$this->id.'_globals'\n ),\n 'section_end' => array(\n 'type' => 'sectionend',\n 'id' => 'wc_'.$this->id.'_section_end'\n )\n );\n return apply_filters( 'wc_'.$this->id.'_settings', $settings );\n }", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "public function getSettings(): array\n {\n $settings = static::find()->where(['status' => true])->asArray()->all();\n return array_merge_recursive(\n ArrayHelper::map($settings, 'key', 'value', 'category'),\n ArrayHelper::map($settings, 'key', 'type', 'category')\n );\n }", "abstract public function settings(): array;", "function getSettingsList(){\n\t\treturn array(\n\t\t'institute_name',\n\t\t'institute_phone',\n\t\t'institute_address',\n\t\t'email',\n\t\t'notifications',\n\t\t'facebook_url',\n\t\t'linkedin_url',\n\t\t'twitter_url',\n\t\t'youtube_url',\n\t\t'copyright',\n\t\t'metatags'\n\t\t);\n\t}", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "public function getShopFields()\n {\n return $this->config->pluginFields;\n }", "public function getConfigFieldsValues()\n {\n $id_shop = Shop::getContextShopID(true);\n $id_shop_group = Shop::getContextShopGroupID(true);\n\n $fields_values = array();\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n foreach (Language::getLanguages(false) as $lang) {\n $values = Tools::getValue($input['name'].'_'.$lang['id_lang'], (Configuration::hasKey($input['name'], $lang['id_lang']) ? Configuration::get($input['name'], $lang['id_lang'], (int)$id_shop_group, (int)$id_shop) : $input['default']));\n $fields_values[$input['name']][$lang['id_lang']] = $values;\n }\n } else {\n if ($input['type'] == 'checkbox' && isset($input['values'])) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n $values = (Configuration::hasKey($input['name'], null, (int)$id_shop_group, (int)$id_shop) ? Tools::jsonDecode(Configuration::get($input['name']), true) : $input['default']);\n\n if (is_array($values)) {\n foreach ($input['values']['query'] as $id_cms => $val) {\n if (in_array($id_cms, $values)) {\n $fields_values[$input['name'].'[]_'.$id_cms] = $id_cms;\n }\n }\n }\n } else {\n $values = Tools::getValue($input['name'], (Configuration::hasKey($input['name'], null, (int)$id_shop_group, (int)$id_shop) ? Configuration::get($input['name']) : $input['default']));\n $fields_values[$input['name']] = $values;\n }\n }\n }\n }\n\n $this->assignCustomConfigs($fields_values);\n\n return $fields_values;\n }", "public function settingsData() {\n\n $arraySettings = array (\n 'Generic Param' => $this->_genericParam\n );\n\n return $arraySettings;\n\n }", "public function getConfigFieldsValues()\n {\n return array(\n 'SEND_SMS_API' => Tools::getValue('SEND_SMS_API', Configuration::get('ONEHOP_SEND_SMS_API')),\n 'ADMIN_MOBILE' => Tools::getValue('ADMIN_MOBILE', Configuration::get('ONEHOP_ADMIN_MOBILE'))\n );\n }", "protected function admin_fields_settings() {\n\n $settings_fields = array(\n\n 'wcsales_general_tabs' => array(),\n \n 'wcsales_settings_tabs' => array(\n\n array(\n 'name' => 'enableresalenotification',\n 'label' => __( 'Enable / Disable Sale Notification', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Enable', 'wc-sales-notification-pro' ),\n 'type' => 'checkbox',\n 'default' => 'off',\n 'class'=>'woolentor_table_row',\n ),\n\n array(\n 'name' => 'notification_content_type',\n 'label' => __( 'Notification Content Type', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Select Content Type', 'wc-sales-notification-pro' ),\n 'type' => 'radio',\n 'default' => 'actual',\n 'options' => array(\n 'actual' => __('Real','wc-sales-notification-pro'),\n 'fakes' => __('Fakes','wc-sales-notification-pro'),\n )\n ),\n\n array(\n 'name' => 'notification_pos',\n 'label' => __( 'Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Sale Notification Position on frontend.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'bottomleft',\n 'options' => array(\n 'topleft' =>__( 'Top Left','wc-sales-notification-pro' ),\n 'topright' =>__( 'Top Right','wc-sales-notification-pro' ),\n 'bottomleft' =>__( 'Bottom Left','wc-sales-notification-pro' ),\n 'bottomright' =>__( 'Bottom Right','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_layout',\n 'label' => __( 'Image Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Layout.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'imageleft',\n 'options' => array(\n 'imageleft' =>__( 'Image Left','wc-sales-notification-pro' ),\n 'imageright' =>__( 'Image Right','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real'\n ),\n\n array(\n 'name' => 'notification_loadduration',\n 'label' => __( 'Loading Time', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Loading duration.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '3',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '3' =>__( '3 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_time_int',\n 'label' => __( 'Time Interval', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Time between notifications.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '4',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_limit',\n 'label' => __( 'Limit', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Order Limit for notification.', 'wc-sales-notification-pro' ),\n 'min' => 1,\n 'max' => 100,\n 'default' => '5',\n 'step' => '1',\n 'type' => 'number',\n 'sanitize_callback' => 'number',\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_uptodate',\n 'label' => __( 'Order Upto', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Do not show purchases older than.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '7',\n 'options' => array(\n '1' =>__( '1 day','wc-sales-notification-pro' ),\n '2' =>__( '2 days','wc-sales-notification-pro' ),\n '3' =>__( '3 days','wc-sales-notification-pro' ),\n '4' =>__( '4 days','wc-sales-notification-pro' ),\n '5' =>__( '5 days','wc-sales-notification-pro' ),\n '6' =>__( '6 days','wc-sales-notification-pro' ),\n '7' =>__( '1 week','wc-sales-notification-pro' ),\n '10' =>__( '10 days','wc-sales-notification-pro' ),\n '14' =>__( '2 weeks','wc-sales-notification-pro' ),\n '21' =>__( '3 weeks','wc-sales-notification-pro' ),\n '28' =>__( '4 weeks','wc-sales-notification-pro' ),\n '35' =>__( '5 weeks','wc-sales-notification-pro' ),\n '42' =>__( '6 weeks','wc-sales-notification-pro' ),\n '49' =>__( '7 weeks','wc-sales-notification-pro' ),\n '56' =>__( '8 weeks','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_inanimation',\n 'label' => __( 'Animation In', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Enter Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeInLeft',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceIn' =>__( 'bounceIn','wc-sales-notification-pro' ),\n 'bounceInDown' =>__( 'bounceInDown','wc-sales-notification-pro' ),\n 'bounceInLeft' =>__( 'bounceInLeft','wc-sales-notification-pro' ),\n 'bounceInRight' =>__( 'bounceInRight','wc-sales-notification-pro' ),\n 'bounceInUp' =>__( 'bounceInUp','wc-sales-notification-pro' ),\n 'fadeIn' =>__( 'fadeIn','wc-sales-notification-pro' ),\n 'fadeInDown' =>__( 'fadeInDown','wc-sales-notification-pro' ),\n 'fadeInDownBig' =>__( 'fadeInDownBig','wc-sales-notification-pro' ),\n 'fadeInLeft' =>__( 'fadeInLeft','wc-sales-notification-pro' ),\n 'fadeInLeftBig' =>__( 'fadeInLeftBig','wc-sales-notification-pro' ),\n 'fadeInRight' =>__( 'fadeInRight','wc-sales-notification-pro' ),\n 'fadeInRightBig' =>__( 'fadeInRightBig','wc-sales-notification-pro' ),\n 'fadeInUp' =>__( 'fadeInUp','wc-sales-notification-pro' ),\n 'fadeInUpBig' =>__( 'fadeInUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipInX' =>__( 'flipInX','wc-sales-notification-pro' ),\n 'flipInY' =>__( 'flipInY','wc-sales-notification-pro' ),\n 'lightSpeedIn' =>__( 'lightSpeedIn','wc-sales-notification-pro' ),\n 'rotateIn' =>__( 'rotateIn','wc-sales-notification-pro' ),\n 'rotateInDownLeft' =>__( 'rotateInDownLeft','wc-sales-notification-pro' ),\n 'rotateInDownRight' =>__( 'rotateInDownRight','wc-sales-notification-pro' ),\n 'rotateInUpLeft' =>__( 'rotateInUpLeft','wc-sales-notification-pro' ),\n 'rotateInUpRight' =>__( 'rotateInUpRight','wc-sales-notification-pro' ),\n 'slideInUp' =>__( 'slideInUp','wc-sales-notification-pro' ),\n 'slideInDown' =>__( 'slideInDown','wc-sales-notification-pro' ),\n 'slideInLeft' =>__( 'slideInLeft','wc-sales-notification-pro' ),\n 'slideInRight' =>__( 'slideInRight','wc-sales-notification-pro' ),\n 'zoomIn' =>__( 'zoomIn','wc-sales-notification-pro' ),\n 'zoomInDown' =>__( 'zoomInDown','wc-sales-notification-pro' ),\n 'zoomInLeft' =>__( 'zoomInLeft','wc-sales-notification-pro' ),\n 'zoomInRight' =>__( 'zoomInRight','wc-sales-notification-pro' ),\n 'zoomInUp' =>__( 'zoomInUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n 'jackInTheBox' =>__( 'jackInTheBox','wc-sales-notification-pro' ),\n 'rollIn' =>__( 'rollIn','wc-sales-notification-pro' ),\n 'rollOut' =>__( 'rollOut','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_outanimation',\n 'label' => __( 'Animation Out', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Out Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeOutRight',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceOut' =>__( 'bounceOut','wc-sales-notification-pro' ),\n 'bounceOutDown' =>__( 'bounceOutDown','wc-sales-notification-pro' ),\n 'bounceOutLeft' =>__( 'bounceOutLeft','wc-sales-notification-pro' ),\n 'bounceOutRight' =>__( 'bounceOutRight','wc-sales-notification-pro' ),\n 'bounceOutUp' =>__( 'bounceOutUp','wc-sales-notification-pro' ),\n 'fadeOut' =>__( 'fadeOut','wc-sales-notification-pro' ),\n 'fadeOutDown' =>__( 'fadeOutDown','wc-sales-notification-pro' ),\n 'fadeOutDownBig' =>__( 'fadeOutDownBig','wc-sales-notification-pro' ),\n 'fadeOutLeft' =>__( 'fadeOutLeft','wc-sales-notification-pro' ),\n 'fadeOutLeftBig' =>__( 'fadeOutLeftBig','wc-sales-notification-pro' ),\n 'fadeOutRight' =>__( 'fadeOutRight','wc-sales-notification-pro' ),\n 'fadeOutRightBig' =>__( 'fadeOutRightBig','wc-sales-notification-pro' ),\n 'fadeOutUp' =>__( 'fadeOutUp','wc-sales-notification-pro' ),\n 'fadeOutUpBig' =>__( 'fadeOutUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipOutX' =>__( 'flipOutX','wc-sales-notification-pro' ),\n 'flipOutY' =>__( 'flipOutY','wc-sales-notification-pro' ),\n 'lightSpeedOut' =>__( 'lightSpeedOut','wc-sales-notification-pro' ),\n 'rotateOut' =>__( 'rotateOut','wc-sales-notification-pro' ),\n 'rotateOutDownLeft' =>__( 'rotateOutDownLeft','wc-sales-notification-pro' ),\n 'rotateOutDownRight' =>__( 'rotateOutDownRight','wc-sales-notification-pro' ),\n 'rotateOutUpLeft' =>__( 'rotateOutUpLeft','wc-sales-notification-pro' ),\n 'rotateOutUpRight' =>__( 'rotateOutUpRight','wc-sales-notification-pro' ),\n 'slideOutUp' =>__( 'slideOutUp','wc-sales-notification-pro' ),\n 'slideOutDown' =>__( 'slideOutDown','wc-sales-notification-pro' ),\n 'slideOutLeft' =>__( 'slideOutLeft','wc-sales-notification-pro' ),\n 'slideOutRight' =>__( 'slideOutRight','wc-sales-notification-pro' ),\n 'zoomOut' =>__( 'zoomOut','wc-sales-notification-pro' ),\n 'zoomOutDown' =>__( 'zoomOutDown','wc-sales-notification-pro' ),\n 'zoomOutLeft' =>__( 'zoomOutLeft','wc-sales-notification-pro' ),\n 'zoomOutRight' =>__( 'zoomOutRight','wc-sales-notification-pro' ),\n 'zoomOutUp' =>__( 'zoomOutUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n ),\n ),\n \n array(\n 'name' => 'background_color',\n 'label' => __( 'Background Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Background Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'heading_color',\n 'label' => __( 'Heading Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Heading Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'content_color',\n 'label' => __( 'Content Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Content Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'cross_color',\n 'label' => __( 'Cross Icon Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Cross Icon Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color'\n ),\n\n ),\n\n 'wcsales_fakes_data_tabs' => array(),\n 'wcsales_plugins_tabs' => array(),\n\n );\n \n return array_merge( $settings_fields );\n }", "public function feed_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\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'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Name', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsdropbox' )\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' => 'fileUploadField',\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'label' => esc_html__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'choices' => $this->get_file_upload_field_choices(),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the specific File Upload field that you want to be uploaded to Dropbox.', 'gravityformsdropbox' )\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' => 'destinationFolder',\n\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s<br /><br />%s',\n\t\t\t\t\t\t\tesc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the folder in your Dropbox account where the files will be uploaded to.', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'By default, all files are stored in the \"Gravity Forms Add-On\" folder within the Dropbox Apps folder in your Dropbox account.', 'gravityformsdropbox' )\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' => 'feedCondition',\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Upload Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Upload to Dropbox if', 'gravityformsdropbox' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t}", "public function getOptions(): array {\n\t\t$field_options = [];\n\n\t\tif (!empty($this->fieldoptions)) {\n\t\t\t$field_options = elgg_string_to_array($this->fieldoptions);\n\t\t\t$field_options = array_combine(array_values($field_options), $field_options); // input radio and checkbox require non-numeric keys\n\t\t}\n\n\t\treturn $field_options;\n\t}", "public function get_settings() {\n $this->create_object_settings();\n return array($this->settings);\n }", "public function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['early_global'] = array('c', array(\n\t\t 'member_id' => \"global_member_id\",\n\t\t 'group_id' => \"global_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t $settings['early_logged_in'] = array('c', array(\n\t\t 'member_id' => \"logged_in_member_id\",\n\t\t 'group_id' => \"logged_in_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t // for demo, include some others\n\t $settings['include_other'] = array('c', array(\n\t\t 'include_other' => \"Include other member variables\",\n\t\t), array());\n\t\t\n \t\t$settings['others'] = array('ms', array(\n\t\t 'username' => 'username',\n\t\t 'screen_name' => 'screen_name',\n\t\t 'email' => 'email',\n\t\t // 'last_visit' => 'last_visit',\n\t\t 'access_cp' => 'access_cp',\n\t\t // defaults\n\t\t), array());\n\n\t\t$settings['handy'] = array('c', array(\n\t\t 'comment_edit_time_limit' => \"comment_edit_time_limit\",\n\t\t), array('comment_edit_time_limit'));\n\n\t\treturn $settings;\n\t}", "protected function getFieldOptions()\n {\n return explode(',', $this->option('fields'));\n }", "public function getSettings(): array {\n\t\treturn [\n\t\t\t// Enable debug mode (to print errors).\n\t\t\t'debug' => !empty(elgg_get_config('debug')),\n\t\t\t'security' => [\n\t\t\t\t'requestedAuthnContext' => false,\n\t\t\t],\n\t\t\t// Service Provider Data that we are deploying.\n\t\t\t'sp' => $this->getSPSettings(),\n\t\t\t\n\t\t\t// Identity Provider Data that we want connected with our SP.\n\t\t\t'idp' => $this->getIDPSettings(),\n\t\t];\n\t}", "protected function getOptionFieldsConfig()\n {\n $fields['custom_option_group'] = $this->getCustomOptionGroupFieldConfig();\n\n return $fields;\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function getSettings()\n\t{\n\t\t// Create an empty array\n\t\t$settings = array();\n\n\t\t// Get the Twilio settings\n\t\t$settings['twilio_account_sid'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/account_sid');\n\t\t$settings['twilio_auth_token'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/auth_token');\n\t\t$settings['twilio_sender_number'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/sender_number');\n\n\t\t// Get the general settings\n\t\t$settings['country_code_filter'] = Mage::getStoreConfig('smsnotifications/general/country_code_filter');\n\n\t\t// Get the order notification settings\n\t\t$settings['order_noficication_recipients'] = Mage::getStoreConfig('smsnotifications/order_notification/recipients');\n\t\t$settings['order_noficication_recipients'] = explode(';', $settings['order_noficication_recipients']);\n\t\t$settings['order_notification_status'] = Mage::getStoreConfig('smsnotifications/order_notification/order_status');\n\n\t\t// Get the shipment notification settings\n\t\t$settings['shipment_notification_message'] = Mage::getStoreConfig('smsnotifications/shipment_notification/message');\n\n\t\t// Return the settings\n\t\treturn $settings;\n\t}", "private function settings_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Global Settings', 'formidable' ) . '</h3>'\n\t\t\t\t. '<p><strong>' . __( 'General', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )\n\t\t\t\t. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )\n \t . '</p>',\n\t\t\t'prev_page' => 'import',\n\t\t\t'next_page' => 'addons',\n\t\t);\n\t}", "public function get_custom_fields_settings()\n {\n $fields = [];\n\n $fields['quiz_title'] = [\n 'name' => __('Quiz Title', $this->token),\n 'description' => __('The title that will be displayed for your quiz.', $this->token),\n 'placeholder' => 'Can chirotherapy treat your pain?',\n 'type' => 'text',\n 'default' => 'Can chirotherapy treat your pain?',\n 'section' => 'info'\n ];\n\n $fields['show_fields'] = [\n 'name' => __('Show Opt-In Before Score', $this->token),\n 'description' => __('If set to no, opt-in fields will be shown after the users see their score.', $this->token),\n 'placeholder' => '',\n 'type' => 'select',\n 'default' => 'yes',\n 'options' => ['no', 'yes'],\n 'section' => 'info'\n ];\n\n $fields['legal_broker'] = [\n 'name' => __('Your Business Name', $this->token),\n 'description' => __('This will be displayed on the bottom of each page.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['api_key'] = [\n 'name' => __('Custom API Key', $this->token),\n 'description' => __('This API key will be used for submitting leads to your CRM. Leave blank to use default API key.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['email'] = [\n 'name' => __('Notification Email', $this->token),\n 'description' => __('This address will be emailed when a user opts-into your ad. If left empty, emails will be sent to the default address for your site.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['retargeting'] = [\n 'name' => __('Facebook Pixel - Retargeting (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow retargeting of people that view this quiz.', $this->token),\n 'placeholder' => __('Ex: 4123423454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['conversion'] = [\n 'name' => __('Facebook Pixel - Conversion (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow conversion tracking of people that submit this quiz.', $this->token),\n 'placeholder' => __('Ex: 170432123454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['primary_color'] = [\n 'name' => __('Primary Color', $this->token),\n 'description' => __('Change the primary color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['hover_color'] = [\n 'name' => __('Hover Color', $this->token),\n 'description' => __('Change the button hover color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n return apply_filters($this->token . '_fields', $fields);\n }", "public function grid_display_settings($settings)\n {\n return array('field_options' => $this->_fieldSettings($settings));\n }", "public function getSettings()\n {\n $aValidSettings = $this->getValidSettings();\n $aSettings = array();\n\n foreach ( $aValidSettings as $sSettingName ) {\n $aSettings[$sSettingName] = $this->getSetting( $sSettingName );\n }\n\n return $aSettings;\n }", "protected function configFieldItems(): array\n {\n return [\n 'iso' => [\n 'display' => 'Currency',\n 'instructions' => 'Select which currency you want to use for the field.',\n 'type' => 'select',\n 'default' => 'USD',\n 'options' => collect(Currencies::$currencyList)\n ->map(fn($item, $key) => Arr::get($item, 'name') . \" ($key)\")\n ->sortBy(fn($val) => $val),\n 'width' => 50\n ],\n ];\n }", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "public function get_settings() {\n\n\t\tif($this->settings) {\n\t\t\treturn $this->settings;\n\t\t}\n\n\t\t$query = $this->db->get('shortee_settings');\n\t\t$this->settings = $query->row_array();\n\t\t$this->domain_list = explode(',',$this->settings['short_domain']);\n\n\t\treturn $this->settings;\n\t}", "private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }", "public function getValues(){\n\t\treturn $this->_settings;\n\t}", "public function extra_settings()\n\t{\n\t\t$itemSettings = array( 0 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_max_num',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_size'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 1 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_1',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_height'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 2 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_2',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_width'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\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 3 => array( 'form_type' => 'formMultiDropdown',\n\t\t\t\t\t\t\t\t\t\t 'field' \t=> 'si_extra_settings_3',\n\t\t\t\t\t\t\t\t\t\t 'words' \t=> $this->lang->words['emoticon_image_formats'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> '',\n\t\t\t\t\t\t\t\t\t\t 'type' => 'image_types'\n\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 );\n\t\t\n\t\treturn $itemSettings;\n\t}", "private function getConfigFieldsValues()\n {\n $config = [];\n foreach (ConfigFieldsNames::getConfigFields() as $key) {\n $config[$key] = Configuration::get($key);\n }\n for ($i = 1; $i < TPAY_CARD_MIDS; $i++) {\n foreach (ConfigFieldsNames::getCardConfigFields() as $key) {\n $config[$key.$i] = Configuration::get($key.$i);\n }\n }\n\n return $config;\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "public function getCustomizationFields()\n {\n $customization_fields = array();\n $customization_data = $this->product->getCustomizationFields($this->context->language->id);\n $is_customizable = \"0\";\n\n if ($customization_data && is_array($customization_data)) {\n $index = 0;\n foreach ($customization_data as $data) {\n if ($data['type'] == 1) {\n $is_customizable = \"1\";\n $customization_fields[$index] = array(\n 'id_customization_field' => $data['id_customization_field'],\n 'required' => $data['required'],\n 'title' => $data['name'],\n 'type' => 'text'\n );\n $index++;\n } elseif ($data['type'] == 0 && $data['required'] == 1) {\n $this->has_file_field = 1;\n }\n }\n }\n\n return array('is_customizable' => $is_customizable, 'customizable_items' => $customization_fields);\n }", "protected function getDynamicConfigFields()\n {\n $statuses = $this->statusCollectionFactory->create()->toOptionArray();\n $dynamicConfigFields = [];\n foreach ($statuses as $status) {\n $configId = 'sendsms_settings_status_'.$status['value'];\n $dynamicConfigFields[$configId] = [\n 'id' => $configId,\n 'type' => 'textarea',\n 'sortOrder' => 10,\n 'showInDefault' => '1',\n 'showInWebsite' => '0',\n 'showInStore' => '0',\n 'label' => 'Mesaj: '.$status['label'],\n 'comment' => 'Variabile disponibile: {billing_first_name}, {billing_last_name}, {shipping_first_name}, {shipping_last_name}, {order_number}, {order_date}, {order_total}<p class=\"sendsms-char-count\">160 caractere ramase</p>',\n '_elementType' => 'field',\n 'path' => 'sendsms/sendsms'\n ];\n }\n return $dynamicConfigFields;\n }", "public function get_options_settings() {\n $default_options = $this->get_default_option_settings();\n\n $settings = array(\n array(\n 'name' => 'qr_type',\n 'title' => __( 'Allowed Types', 'wpuf-pro' ),\n 'type' => 'checkbox',\n 'section' => 'advanced',\n 'priority' => 15,\n 'help_text' => __( 'Some details text about the section', 'wpuf-pro' ),\n 'options' => array(\n 'url' => __( 'URL', 'wpuf-pro' ),\n 'text' => __( 'Text', 'wpuf-pro' ),\n 'geo' => __( 'Location', 'wpuf-pro' ),\n 'sms' => __( 'SMS', 'wpuf-pro' ),\n 'wifi' => __( 'Wifi', 'wpuf-pro' ),\n 'card' => __( 'Card', 'wpuf-pro' ),\n 'email' => __( 'Email', 'wpuf-pro' ),\n 'calendar' => __( 'Calendar', 'wpuf-pro' ),\n 'phone' => __( 'Phone', 'wpuf-pro' ),\n )\n ),\n );\n\n return array_merge( $default_options, $settings );\n }", "public static function get_current_options(){\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\n\t\t\t$settings = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings); \n\t\t\t\n\t\t\t$arr_opt = array();\n\t\t\tif(!empty($settings)){\n\t\t\t\t\tforeach($settings as $key => $val){\n\t\t\t\t\t\t$arr_opt[] = $val->rs_postid;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_lang;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_posttype;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_type;\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn $arr_opt;\n\t\n\t\t}", "private function get_settings_fields() {\n\n\t\t$fields = array();\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_api_key',\n\t\t\t'type' => 'password',\n\t\t\t'settings_label' => __( 'Sherpa API Key', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Enter an API Key and save your changes for the other fields to appear', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t);\n\n\t\tif ( ! $api_key = get_option( 'vibrant_life_sherpa_api_key' ) ) {\n\n\t\t\treturn $fields;\n\n\t\t}\n\n\t\tif ( ! $form = get_theme_mod( 'vibrant_life_schedule_a_visit_form' ) ) {\n\n\t\t\t$forms = wp_list_pluck( RGFormsModel::get_forms( null, 'title' ), 'title', 'id' );\n\n\t\t\t$fields[] = array(\n\t\t\t\t'name' => 'schedule_a_visit_to_sherpa_form',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'settings_label' => __( 'Which Form is the Schedule a Visit Form?', 'schedule-a-visit-form' ),\n\t\t\t\t'no_init' => true,\n\t\t\t\t'option_field' => true,\n\t\t\t\t'option_none' => __( '-- Choose a Gravity Form --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t'options' => $forms,\n\t\t\t);\n\n\t\t}\n\n\t\t$locations_query = new WP_Query( array(\n\t\t\t'post_type' => 'facility',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t) );\n\n\t\t$locations = wp_list_pluck( $locations_query->posts, 'post_title', 'ID' );\n\n\t\t$sherpa_communities = apply_filters( 'schedule_a_visit_to_sherpa_communities', array(\n\t\t\t2 => __( 'Lodges of Durand', 'schedule-a-visit-to-sherpa' ),\n\t\t\t4 => __( 'New Friends Memory Care Kalamazoo', 'schedule-a-visit-to-sherpa' ),\n\t\t\t1 => __( 'Vibrant Life Superior Township', 'schedule-a-visit-to-sherpa' ),\n\t\t\t3 => __( 'Vibrant Life Temperance', 'schedule-a-visit-to-sherpa' ),\n\t\t) );\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_mapping',\n\t\t\t'type' => 'repeater',\n\t\t\t'settings_label' => __( 'Location/Sherpa Mapping', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Associate each Location with each Community within Sherpa', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t\t'fields' => array(\n\t\t\t\t'location_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Location', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $locations,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Location --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'community_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Sherpa Community', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $sherpa_communities,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Community from Sherpa --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t\t'description' => '<p class=\"description\">' . __( 'These values are hardcoded. We cannot add or remove Sherpa Communities without updating the plugin.', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t\t\t\t'description_tip' => false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'schedule_a_visit_to_sherpa_settings_fields', $fields );\n\n\t}", "protected static function getSettings()\r\n {\r\n if(!self::$avail_settings)\r\n {\r\n $data = self::db()->query(\r\n 'SELECT * FROM `:prefix:rbac_user_settings` AS `t1` '\r\n . 'JOIN `:prefix:forms_fieldtypes` AS `t2` '\r\n . 'ON `t1`.`fieldtype`=`t2`.`type_id` '\r\n . 'WHERE `is_editable`=? '\r\n . 'ORDER BY `fieldset` ASC, `position` ASC',\r\n array('Y')\r\n );\r\n if($data)\r\n {\r\n self::$avail_settings = $data->fetchAll();\r\n }\r\n }\r\n return self::$avail_settings;\r\n }", "public function toArray()\n\t{\n\t\t$data = [];\n\t\tforeach ($this->settings() as $setting) {\n\t\t\t$data[$setting->key()] = $setting->value();\n\t\t}\n\t\treturn $data;\n\t}", "public function getSettings() {\n return $this->settings == null ? array() : json_decode($this->settings, true);\n }", "public function getFields(): array\n {\n if ($this->_fields !== null) {\n return $this->_fields;\n }\n\n try {\n $id = $this->getFieldLayoutId();\n } catch (InvalidConfigException $e) {\n return [];\n }\n\n return $this->_fields = Craft::$app->getFields()->getFieldsByLayoutId($id);\n }", "public function getSettings(): array\n {\n return [];\n }", "private function get_additional_fields_raw() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\tif ( ! is_array( $options ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\tif ( array_key_exists( 'additional_fields_raw', $options ) ) {\n\t\t\t\t$additional_fields = $options['additional_fields_raw'];\n\t\t\t\t$fields = explode( ',', $additional_fields );\n\t\t\t} else {\n\t\t\t\t$fields = array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields_raw', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "public function getSettingsAll ()\n {\n \tglobal $debug;\n \t\n \t$settings = array();\n \t$select_string = \"select settings_key,settings_value from \".$this->table_prefix.$this->quiz_tables['settings'];\n \t$settings = $this->db_object->getKeyValue ($select_string, \"settings_key\", \"settings_value\");\n \treturn $settings;\n }", "protected function getFieldsetConfig()\n {\n return [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Editor Note'),\n 'componentType' => Fieldset::NAME,\n 'dataScope' => static::DATA_SCOPE_PRODUCT, // save data in the product data\n 'provider' => static::DATA_SCOPE_PRODUCT . '_data_source',\n 'ns' => static::FORM_NAME,\n 'collapsible' => true,\n 'sortOrder' => 50,\n 'opened' => false,\n ],\n ],\n ],\n 'children' => [\n static::NOTE_TITLE_FIELD_TEXT => $this->getTitleFieldConfig(10),\n static::NOTE_DESC_FIELD_TEXT => $this->getDescTextFieldConfig(20),\n static::IS_NOTE_DISPLAY => $this->getIsDisplayFieldConfig(30),\n ],\n ];\n }", "public function getSettings()\n {\n $data = [];\n $settings = Setting::where('section', 'seo')->get();\n foreach ($settings as $setting) {\n $data[$setting->settingkey] = ($setting->val != '') ? unserialize($setting->val) : [];\n }\n\n return $data;\n }", "protected function getSettings(): array\n {\n static $settings = null;\n\n if ($settings === null) {\n $settings = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);\n }\n\n return $settings ?? [];\n }", "public function get_settings() {\n $data = array(\n 'settings' => $this->js_settings\n );\n \n return $data;\n }", "public static function get_option_setting()\n\t\t{ \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\t$opt_list = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings);\n\t\t\t\t\n\t\t\t\t$option =array();\n\t\t\t\t\n\t\t\t\tif(!empty($opt_list)){\n\t\t\t\t\t\n\t\t\t\t\tforeach($opt_list as $key => $val){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_lang;\n\t\t\t\t\t\t\t$option[] = $val->rs_type;\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_postid;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $option;\n\t\t\t\t\n\t\t}", "public function getSettings($module): array\n {\n $moduleSettings = parent::getSettings($module);\n // Do the if one by one, so that the SELECT do not get evaluated unless needed\n if ($module === self::SINGLE_ENDPOINT) {\n $option = ModuleSettingOptions::PATH;\n $moduleSettings[] = [\n Properties::INPUT => $option,\n Properties::NAME => $this->getSettingOptionName(\n $module,\n $option\n ),\n Properties::TITLE => \\__('Endpoint path', 'graphql-api'),\n Properties::DESCRIPTION => \\__('URL path to expose the single GraphQL endpoint', 'graphql-api'),\n Properties::TYPE => Properties::TYPE_STRING,\n ];\n } elseif ($module === self::CUSTOM_ENDPOINTS) {\n $option = ModuleSettingOptions::PATH;\n $moduleSettings[] = [\n Properties::INPUT => $option,\n Properties::NAME => $this->getSettingOptionName(\n $module,\n $option\n ),\n Properties::TITLE => \\__('Base path', 'graphql-api'),\n Properties::DESCRIPTION => \\__('URL base path to expose the Custom Endpoint', 'graphql-api'),\n Properties::TYPE => Properties::TYPE_STRING,\n ];\n } elseif ($module === self::PERSISTED_QUERIES) {\n $option = ModuleSettingOptions::PATH;\n $moduleSettings[] = [\n Properties::INPUT => $option,\n Properties::NAME => $this->getSettingOptionName(\n $module,\n $option\n ),\n Properties::TITLE => \\__('Base path', 'graphql-api'),\n Properties::DESCRIPTION => \\__('URL base path to expose the Persisted Query', 'graphql-api'),\n Properties::TYPE => Properties::TYPE_STRING,\n ];\n }\n return $moduleSettings;\n }", "public function getConfigurationFields()\n {\n return [\n 'restApiKey' => [\n //Should be replaced by a password formType but which doesn't\n //empty the field at each edit\n 'type' => 'text',\n 'options' => [\n 'required' => true,\n 'help' => 'pim_prestashop_connector.export.restApiKey.help',\n 'label' => 'pim_prestashop_connector.export.restApiKey.label',\n ],\n ],\n 'prestashopUrl' => [\n 'options' => [\n 'required' => true,\n 'help' => 'pim_prestashop_connector.export.prestashopUrl.help',\n 'label' => 'pim_prestashop_connector.export.prestashopUrl.label',\n ],\n ],\n 'httpLogin' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.httpLogin.help',\n 'label' => 'pim_prestashop_connector.export.httpLogin.label',\n ],\n ],\n 'httpPassword' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.httpPassword.help',\n 'label' => 'pim_prestashop_connector.export.httpPassword.label',\n ],\n ],\n 'defaultStoreView' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.defaultStoreView.help',\n 'label' => 'pim_prestashop_connector.export.defaultStoreView.label',\n 'data' => $this->getDefaultStoreView(),\n ],\n ],\n ];\n }", "function getCustomFields($settings, $which)\n\t{\n\t\tif (IsSet($settings->saml_settings[$which]))\n\t\t{\n\t\t\treturn array_keys($settings->saml_settings[$which]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$empty = array();\n\t\t\treturn $empty;\n\t\t}\n\t}", "protected function getConfigFormValuesSearchLayer()\n {\n $fields = [];\n $fields['DF_INSTALLATION_ID'] = Configuration::get('DF_INSTALLATION_ID');\n $fields['DF_SHOW_LAYER'] = Configuration::get('DF_SHOW_LAYER', null, null, null, true);\n $fields['DF_SHOW_LAYER_MOBILE'] = Configuration::get('DF_SHOW_LAYER_MOBILE', null, null, null, true);\n\n return $fields;\n }", "public function getBillingFields()\n {\n if (!isset($this->arrCache['billingFields'])) {\n\n $this->arrCache['billingFields'] = array_filter(array_map(\n function($field) {\n return $field['enabled'] ? $field['value'] : null;\n },\n $this->getBillingFieldsConfig()\n ));\n\n }\n\n return $this->arrCache['billingFields'];\n }", "public function getBillingFieldsConfig()\n {\n if (!isset($this->arrCache['billingFieldsConfig'])) {\n\n $this->arrCache['billingFieldsConfig'] = array();\n $arrFields = deserialize($this->address_fields);\n\n if (is_array($arrFields)) {\n foreach ($arrFields as $arrField) {\n\n $this->arrCache['billingFieldsConfig'][] = array(\n 'value' => $arrField['name'],\n 'enabled' => ($arrField['billing'] != 'disabled'),\n 'mandatory' => ($arrField['billing'] == 'mandatory'),\n );\n }\n }\n }\n\n return $this->arrCache['billingFieldsConfig'];\n }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "function snax_admin_get_settings_sections() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_sections', array(\n\t\t'snax_settings_general' => array(\n\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_general_section_description',\n\t\t\t'page' => 'snax-general-settings',\n\t\t),\n\t\t'snax_settings_lists' => array(\n\t\t\t'title' => __( 'Lists', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_lists_section_description',\n\t\t\t'page' => 'snax-lists-settings',\n\t\t),\n\t\t'snax_settings_pages' => array(\n\t\t\t'title' => __( 'Pages', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_pages_section_description',\n\t\t\t'page' => 'snax-pages-settings',\n\t\t),\n\t\t'snax_settings_voting' => array(\n\t\t\t'title' => __( 'Voting', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_voting_section_description',\n\t\t\t'page' => 'snax-voting-settings',\n\t\t),\n\t\t'snax_settings_limits' => array(\n\t\t\t'title' => __( 'General', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_limits_section_description',\n\t\t\t'page' => 'snax-limits-settings',\n\t\t),\n\t\t'snax_settings_auth' => array(\n\t\t\t'title' => __( 'Auth', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_auth_section_description',\n\t\t\t'page' => 'snax-auth-settings',\n\t\t),\n\t\t'snax_settings_demo' => array(\n\t\t\t'title' => __( 'Demo', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_demo_section_description',\n\t\t\t'page' => 'snax-demo-settings',\n\t\t),\n\t\t'snax_settings_embedly' => array(\n\t\t\t'title' => __( 'Embedly', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_embedly_section_description',\n\t\t\t'page' => 'snax-embedly-settings',\n\t\t),\n\t\t'snax_permalinks' => array(\n\t\t\t'title' => _x( 'Snax', 'Permalink Settings', 'snax' ),\n\t\t\t'callback' => 'snax_permalinks_section_description',\n\t\t\t'page' => 'permalink',\n\t\t),\n\t) );\n}", "private function get_additional_fields() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\t$additional_fields = $options['additional_fields'];\n\n\t\t\t$fields = explode( ',', $additional_fields );\n\n\t\t\tforeach ( $fields as $key => $field ) {\n\n\t\t\t\t$fields[ $key ] = str_replace( ' ', '_', $field );\n\n\t\t\t}\n\n\t\t\tif ( ! is_array( $fields ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "function admin_get_settings_sections() {\n $sections = array(\n \n array(\n 'id' => 'wcsales_general_tabs',\n 'title' => esc_html__( 'General', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_settings_tabs',\n 'title' => esc_html__( 'Settings', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_fakes_data_tabs',\n 'title' => esc_html__( 'Fake Data', 'wc-sales-notification-pro' )\n ),\n\n array(\n 'id' => 'wcsales_plugins_tabs',\n 'title' => esc_html__( 'Our Plugins', 'wc-sales-notification-pro' )\n ),\n\n );\n return $sections;\n }", "public function toArray()\n {\n $options = array();\n \n $fields = array_keys(get_object_vars($this));\n foreach ($fields as $field) {\n if (isset($this->{$field})) {\n if ($this->{$field} instanceof Setting\\Alpha) {\n $options[$field] = $this->{$field}->getValue();\n } elseif ($this->{$field} instanceof Setting\\Text) {\n $color = $this->{$field}->getColor();\n if ($color) {\n $options['color'] = $color->toString();\n }\n } else {\n $options[$field] = $this->{$field};\n }\n }\n }\n \n return $options;\n }", "public function getSettings()\n {\n return collect($this->settings())->mapWithKeys(function ($settings, $key) {\n return [$key => PaymentGatewaySettings::get($key)];\n });\n }", "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'ems_ecommerce';\n\n\t\treturn $settings;\n\t}", "public function getCopy() : array\n {\n return (array)$this->settings;\n }", "public function getForStorage()\n {\n $data = [];\n\n foreach ($this->config->getFields() as $key => $params) {\n\n // skip field if flag is set\n if (!empty($params['skip'])) {\n continue;\n }\n\n if($params['type'] == 'slug')\n {\n $data[$key . '_slug'] = str_slug($this->getStringData($key));\n }\n\n // set field to null, if not in POSTed data array (checkboxes)\n $this->nullIfOmitted($key, $this->data);\n\n // get data as string by flattening arrays\n $data[$key] = $this->getStringData($key);\n }\n\n return $data;\n }", "public function getFields():array\n {\n return [\n 'x_login' => 'text',\n 'x_trans_key' => 'text',\n 'secret_key' => 'password',\n ];\n }", "public function getFieldsArray() {\n\t\t\treturn $this->fields_array;\n\t\t}", "static public function get_raw_settings() {\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\treturn $settings;\n\t}" ]
[ "0.76832485", "0.7503711", "0.72409046", "0.7214906", "0.7173017", "0.7046966", "0.6913948", "0.6805758", "0.6710659", "0.6708123", "0.6699678", "0.6691206", "0.6680509", "0.6670287", "0.6653076", "0.6639047", "0.6629856", "0.66230613", "0.6621794", "0.6596281", "0.65601325", "0.65419406", "0.65269905", "0.6512168", "0.6483838", "0.6480481", "0.646932", "0.64528084", "0.64518553", "0.6444129", "0.64380217", "0.6425298", "0.64224666", "0.6421859", "0.6419554", "0.6417592", "0.64082664", "0.6406006", "0.6402751", "0.6402052", "0.63987976", "0.63973194", "0.63938665", "0.6393798", "0.6392615", "0.6390693", "0.63886434", "0.638705", "0.63661724", "0.6358124", "0.63360214", "0.6332506", "0.63257486", "0.6322355", "0.632031", "0.6319124", "0.63141567", "0.6307438", "0.6302718", "0.63025284", "0.6293082", "0.6288097", "0.62871206", "0.62859887", "0.62853", "0.62847793", "0.6280802", "0.62782246", "0.6277473", "0.62765926", "0.62723696", "0.6271641", "0.62701786", "0.6264661", "0.6263459", "0.6262819", "0.62599665", "0.6246288", "0.62346554", "0.6231093", "0.62262505", "0.62215394", "0.6214313", "0.62112784", "0.62100315", "0.6208114", "0.62069637", "0.62023026", "0.62023026", "0.62023026", "0.6199691", "0.61986303", "0.61960375", "0.61930805", "0.6191475", "0.6190252", "0.617358", "0.6164991", "0.61606985", "0.615804", "0.61523753" ]
0.0
-1
Return array portion of field settings for use in the general fields tab.
public function general_fields() { $fields = array( array( 'id' => 'vpn_general_help_url', 'type' => 'text', 'name' => __( 'URL To Help Pages', 'wpcd' ), 'default' => 'https://spinupvpn.com/help', 'tooltip' => __( 'Certain error messages will be more helpful to your users if it includes a link to additional help resources. Add that link here.', 'wpcd' ), 'tab' => 'vpn-general', ), array( 'id' => 'vpn_general_wc_thank_you_text_before', 'type' => 'textarea', 'name' => __( 'WooCommerce Thank You Page Text', 'wpcd' ), 'tooltip' => __( 'You will likely need to give the user some instructions on how to proceed after checking out. This will go at the top of the thank-you page after checkout - it will not completely replace any existing text though!', 'wpcd' ), 'rows' => '10', 'tab' => 'vpn-general', ), array( 'id' => 'vpn_general_wc_show_acct_link_ty_page', 'type' => 'checkbox', 'name' => __( 'Show a link to the VPN account screen on the thank you page?', 'wpcd' ), 'tooltip' => __( 'You can offer the user an option to go straight to their account page after checkout. Turn this on and fill out the two boxes below to enable this. IMPORTANT: For this to work, you do need the token ##VPNACCOUNTPAGE## in the thank you text above.', 'wpcd' ), 'tab' => 'vpn-general', ), array( 'id' => 'vpn_general_wc_ty_acct_link_url', 'type' => 'text', 'name' => __( 'URL to VPN Account Page', 'wpcd' ), 'default' => 'https://spinupvpn.com/account/vpn/', 'tooltip' => __( 'You can offer the user an option to go straight to their account page after checkout. This link is the account page link you will send them to.', 'wpcd' ), 'tab' => 'vpn-general', ), array( 'id' => 'vpn_general_wc_ty_acct_link_text', 'type' => 'text', 'name' => __( 'Text that the user should see for the account link on the thank you page', 'wpcd' ), 'tooltip' => __( 'Example: Go to your account page now', 'wpcd' ), 'size' => '90', 'tab' => 'vpn-general', ), array( 'id' => 'vpn_general_notes', 'type' => 'textarea', 'name' => __( 'Settings Notes', 'wpcd' ), 'tooltip' => __( 'Use this to store any private notes related to VPN configurations. This is a notational field only.', 'wpcd' ), 'rows' => '10', 'tab' => 'vpn-general', ), ); return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mace_admin_get_settings_fields() {\n\t$fields = array();\n\t$settings_pages = mace_get_settings_pages();\n\n\tforeach( $settings_pages as $page_id => $page_config ) {\n\t\t$fields[ $page_id ] = $page_config['fields'];\n\t}\n\n\treturn (array) apply_filters( 'mace_admin_get_settings_fields', $fields );\n}", "abstract public function getSettingsFields();", "function snax_admin_get_settings_fields() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_fields', array(\n\n\t\t/** General Section **************************************************** */\n\n\t\t'snax_settings_general' => array(\n\t\t\t'snax_active_formats' => array(\n\t\t\t\t'title' => __( 'Active formats', 'snax' ) . '<br /><span style=\"font-weight: normal;\">' . __( '(drag to reorder)', 'snax' ) . '</span>',\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_formats_order' => array(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t),\n\t\t\t'snax_featured_media_required' => array(\n\t\t\t\t'title' => __( 'Featured image field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_featured_media_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_required' => array(\n\t\t\t\t'title' => __( 'Category field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_multi' => array(\n\t\t\t\t'title' => __( 'Multiple categories selection?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_multi',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_whitelist' => array(\n\t\t\t\t'title' => __( 'Category whitelist', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_whitelist',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_auto_assign' => array(\n\t\t\t\t'title' => __( 'Auto assign to categories', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_auto_assign',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_allow_snax_authors_to_add_referrals' => array(\n\t\t\t\t'title' => __( 'Referral link field ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_allow_snax_authors_to_add_referrals',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_list_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in open lists', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_list_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_single_post_page_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Single Post Page', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_featured_images_for_formats' => array(\n\t\t\t\t'title' => __( 'Show featured images for single:', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_show_featured_images_for_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_display_comments_on_lists' => array(\n\t\t\t\t'title' => __( 'Display items comments on list view ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_display_comments_on_lists',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_origin' => array(\n\t\t\t\t'title' => __( 'Show the \"This post was created with our nice and easy submission form.\" text', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_show_origin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_misc_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Misc', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_item_count_in_title' => array(\n\t\t\t\t'title' => __( 'Show items count in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_count_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_admin_bar' => array(\n\t\t\t\t'title' => __( 'Disable admin bar for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_admin_bar',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_dashboard_access' => array(\n\t\t\t\t'title' => __( 'Disable Dashboard access for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_dashboard_access',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_wp_login' => array(\n\t\t\t\t'title' => __( 'Disable WP login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_wp_login',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_enable_login_popup' => array(\n\t\t\t\t'title' => __( 'Enbable the login popup ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_enable_login_popup',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_skip_verification' => array(\n\t\t\t\t'title' => __( 'Moderate new posts?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_skip_verification',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_mail_notifications' => array(\n\t\t\t\t'title' => __( 'Send mail to admin when new post/item was added?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_mail_notifications',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Lists Section ****************************************************** */\n\n\t\t'snax_settings_lists' => array(\n\t\t\t'snax_active_item_forms' => array(\n\t\t\t\t'title' => __( 'Item forms', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_item_forms',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_open_list_in_title' => array(\n\t\t\t\t'title' => __( 'Show list status in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_list_status_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Pages Section ***************************************************** */\n\n\t\t'snax_settings_pages' => array(\n\t\t\t// Frontend Submission.\n\t\t\t'snax_frontend_submission_page_id' => array(\n\t\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_frontend_submission_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Terms & Conditions.\n\t\t\t'snax_legal_page_id' => array(\n\t\t\t\t'title' => __( 'Terms and Conditions', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_legal_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Report.\n\t\t\t'snax_report_page_id' => array(\n\t\t\t\t'title' => __( 'Report', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_report_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Voting Section **************************************************** */\n\n\t\t'snax_settings_voting' => array(\n\t\t\t'snax_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Enable voting?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_guest_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Guests can vote?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_guest_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_voting_post_types' => array(\n\t\t\t\t'title' => __( 'Allow users to vote on post types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_post_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_fake_vote_count_base' => array(\n\t\t\t\t'title' => __( 'Fake vote count base', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_fake_vote_count_base',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Limits Section **************************************************** */\n\n\t\t'snax_settings_limits' => array(\n\n\t\t\t/* IMAGES UPLOAD */\n\n\t\t\t'snax_limits_image_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Image upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_image_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_image_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\n\t\t\t/* AUDIO UPLOAD */\n\n\t\t\t'snax_limits_audio_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Audio upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_audio_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\n\t\t\t/* VIDEO UPLOAD */\n\n\t\t\t'snax_limits_video_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Video upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_video_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\n\t\t\t/* POSTS */\n\n\t\t\t'snax_limits_posts_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Posts', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_items_per_page' => array(\n\t\t\t\t'title' => __( 'List items per page', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_items_per_page',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_posts_per_day' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_posts_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_new_post_items_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_post_items_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_submission_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_user_submission_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_tags_limit' => array(\n\t\t\t\t'title' => __( 'Tags', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_tags_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_description_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_description_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_content_max_length' => array(\n\t\t\t\t'title' => __( 'Content length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\n\t\t\t/* ITEMS */\n\n\t\t\t'snax_limits_items_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Items', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_content_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_source_max_length' => array(\n\t\t\t\t'title' => __( 'Source length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_source_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_ref_link_max_length' => array(\n\t\t\t\t'title' => __( 'Referral link length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_ref_link_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Auth Section ***************************************************** */\n\n\t\t'snax_settings_auth' => array(\n\t\t\t'snax_facebook_app_id' => array(\n\t\t\t\t'title' => __( 'Facebook App ID', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_facebook_app_id',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_login_recaptcha' => array(\n\t\t\t\t'title' => __( 'reCaptcha for login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_login_recaptcha',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_site_key' => array(\n\t\t\t\t'title' => __( 'reCaptcha Site Key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_site_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_secret' => array(\n\t\t\t\t'title' => __( 'reCaptcha Secret', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_secret',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Demo Section ***************************************************** */\n\n\t\t'snax_settings_demo' => array(\n\t\t\t'snax_demo_mode' => array(\n\t\t\t\t'title' => __( 'Enable demo mode?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_mode',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_demo_image_post_id' => array(\n\t\t\t\t'title' => __( 'Image', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'image' ),\n\t\t\t),\n\t\t\t'snax_demo_gallery_post_id' => array(\n\t\t\t\t'title' => __( 'Gallery', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'gallery' ),\n\t\t\t),\n\t\t\t'snax_demo_embed_post_id' => array(\n\t\t\t\t'title' => __( 'Embed', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'embed' ),\n\t\t\t),\n\t\t\t'snax_demo_list_post_id' => array(\n\t\t\t\t'title' => __( 'List', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'list' ),\n\t\t\t),\n\t\t\t'snax_demo_meme_post_id' => array(\n\t\t\t\t'title' => __( 'Meme', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'meme' ),\n\t\t\t),\n\t\t),\n\n\t\t/** Embedly Section ********************************************** */\n\n\t\t'snax_settings_embedly' => array(\n\t\t\t'snax_embedly_enable' => array(\n\t\t\t\t'title' => __( 'Enable Embedly support?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_enable',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_dark_skin' => array(\n\t\t\t\t'title' => __( 'Dark skin', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_dark_skin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_buttons' => array(\n\t\t\t\t'title' => __( 'Share buttons', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_buttons',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_width' => array(\n\t\t\t\t'title' => __( 'Width', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_width',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_alignment' => array(\n\t\t\t\t'title' => __( 'Alignment', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_alignment',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_api_key' => array(\n\t\t\t\t'title' => __( 'Embedly cards API key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_api_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t\t/** Permalinks Section ********************************************** */\n\n\t\t'snax_permalinks' => array(\n\t\t\t'snax_item_slug' => array(\n\t\t\t\t'title' => __( 'Item url', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_item_slug',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_url_var_prefix' => array(\n\t\t\t\t'title' => __( 'URL variable', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_url_var_prefix',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t) );\n}", "public function get_settings_fields() {\n $settings_fields = array(\n 'grocery-general' => array(\n 'popup_logo' => array(\n 'name' => 'popup_logo',\n 'label' => __( 'Popup Logo', 'fondendpost' ),\n 'desc' => __( 'Logo to show in the popup.', 'fondendpost' ),\n 'type' => 'file',\n ),\n ),\n );\n \n return $settings_fields;\n\n }", "public function get_settings_fields() {\n\n\n\t\t/*\n\t\t * name ( name of the field)\n\t\t * type ( type of the field which help to call call class back)\n\t\t * label ( [optional] if you want to display any think the description )\n\t\t * default ( [optional] default values)\n\t\t * options ( [optional] options we use when type is select mostly but this use to give option to fields)\n\t\t * link ( [optional] in case you send a link to field)\n\t\t * sanitize_callback ( [optional] sanitize call back of the field)\n\t\t * priority [ [optional] use to giving parity to the user]\n\t\t * page ( page name we use menu slug this fields belong to this page)\n\t\t *\n\t\t * */\n\n\n\t\t// setting files index key is ( section => array( fields ))\n\t\t$settings_fields = array(\n\t\t\t'test_1' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'name',\n\t\t\t\t\t'label' => __( 'Enter the name', 'sharaz_settings' ),\n\t\t\t\t\t'desc' => __( '<h4>Sharaz Setting Api</h4>if you like please share to others', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '5',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'salary',\n\t\t\t\t\t'label' => 'Select your salary range',\n\t\t\t\t\t'type' => 'ss_select',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '2000',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'1000' => '1000',\n\t\t\t\t\t\t'2000' => '2000',\n\t\t\t\t\t\t'3000' => '3000',\n\t\t\t\t\t),\n\t\t\t\t\t'priority' => '10'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'advance_bonus',\n\t\t\t\t\t'label' => __( 'Receving advance bonus', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_checkbox',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '15',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'your_color',\n\t\t\t\t\t'label' => __( 'Your Setting', 'sharaz-setting' ),\n\t\t\t\t\t'type' => 'ss_color',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'priority' => '20',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'test_2' => array(\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'suggestion',\n\t\t\t\t\t\t'label' => __( 'Ang suggestion', 'sharaz_settings' ),\n\t\t\t\t\t\t'desc' => __( '<h4>Please type some</h4>if you like suggest some thing to us', 'sharaz_settings' ),\n\t\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t\t'page' =>'ss_page1',\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t\t'priority' => '5',\n\t\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\treturn $settings_fields;\n\t}", "protected function getFields() {\n return $this->getConfiguration()['settings']['fields'];\n }", "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' => 'app_id',\n\t\t\t\t\t\t'label' => esc_html__( 'Application ID', 'gravityformsicontact' ),\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'name' => 'api_username',\n\t\t\t\t\t\t'label' => esc_html__( 'Account Username', 'gravityformsicontact' ),\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'name' => 'api_password',\n\t\t\t\t\t\t'label' => esc_html__( 'API Password', 'gravityformsicontact' ),\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'input_type' => 'password',\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'name' => 'client_folder',\n\t\t\t\t\t\t'label' => esc_html__( 'Client Folder', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'choices' => version_compare( GFForms::$version, '2.5-dev-1', '>=' ) ? array( $this, 'client_folders_for_plugin_setting' ) : $this->client_folders_for_plugin_setting(),\n\t\t\t\t\t\t'dependency' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Client Folders.', 'gravityformsicontact' ),\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__( 'iContact settings have been updated.', 'gravityformsicontact' )\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}", "public function get_settings_fields() {\n\t\treturn tml_redirection_admin_get_settings_fields();\n\t}", "public function getSettings() : array;", "function get_form_editor_field_settings() {\n\t\treturn array(\n\t\t\t'label_setting',\n\t\t\t'description_setting',\n\t\t\t'rules_setting',\n\t\t\t'placeholder_setting',\n\t\t\t'input_class_setting',\n\t\t\t'css_class_setting',\n\t\t\t'size_setting',\n\t\t\t'admin_label_setting',\n\t\t\t'default_value_setting',\n\t\t\t'visibility_setting',\n\t\t\t'conditional_logic_field_setting',\n\t\t);\n\t}", "public function plugin_settings_fields() {\n\n\t\t// Get current plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t// Prepare base fields.\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'accessToken',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'customAppEnable',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => null,\n\t\t\t\t'label' => null,\n\t\t\t\t'type' => 'auth_token_button',\n\t\t\t),\n\t\t);\n\n\t\t// If API is initialized, add custom app key/secret fields.\n\t\tif ( $this->initialize_api() ) {\n\t\t\t$fields[] = array( 'name' => 'customAppKey', 'type' => 'hidden' );\n\t\t\t$fields[] = array( 'name' => 'customAppSecret', 'type' => 'hidden' );\n\t\t}\n\n\t\t// Setup base fields.\n\t\treturn array( array( 'fields' => $fields ) );\n\n\t}", "private function getSectionSettingFields(){\n\t\t\t\n\t\t\t$fields = array(\n\n\t\t\t\tField::text(\n\t\t\t\t\t'name',\n\t\t\t\t\t__( 'Template name', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t\tField::text( \n\t\t\t\t\t'classes',\n\t\t\t\t\t__( 'CSS Classes', 'chefsections' ),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'placeholder' => __( 'Seperate with commas\\'s', 'chefsections' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\tField::checkbox(\n\t\t\t\t\t'hide_container',\n\t\t\t\t\t__( 'Hide Container', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\t$fields = apply_filters( 'chef_sections_setting_fields', $fields, $this );\n\n\t\t\treturn $fields;\n\t\t}", "protected function _getSectionsFields()\n {\n $arr = array(\n 'general' => array( // This is a section. See `getSectionId()` for how it gets transformed into an actual section name.\n 'label' => $this->__('General Settings'),\n 'header' => $this->__('General settings about imported posts.'),\n // If 'header' is present, it will be used. If it's a callable, its return value will be used.\n 'fields' => array( // An array of fields, by field code\n 'post_type' => array(\n 'label' => $this->__('Post Type'),\n 'type' => 'select',\n // Type can be one of the existing renderer types (select, checkbox, number, text), or make your own! See `_getFieldRenderers()`\n 'value' => $this->createCommand(array($this, 'getApiLoginOptions')),\n // If no value, it is automatically taken from the local data with the field's ID as key!\n // If value is present, it will be used. If it's a callable, its return value will be used.\n )\n ),\n ),\n );\n return $arr;\n }", "static function getGeneralSettingsValues(){\r\n\t\t\r\n\t\t$arrValues = get_option('revslider-global-settings', '');\r\n\t\t\r\n\t\t$arrValues = maybe_unserialize($arrValues);\r\n\r\n\t\treturn($arrValues);\r\n\t}", "public static function get_output_fields() {\n\t\t$output_fields = [];\n\n\t\t/**\n\t\t * Get the allowed setting groups and their fields\n\t\t */\n\t\t$allowed_setting_groups = DataSource::get_allowed_settings_by_group();\n\n\t\tif ( ! empty( $allowed_setting_groups ) && is_array( $allowed_setting_groups ) ) {\n\t\t\tforeach ( $allowed_setting_groups as $group => $setting_type ) {\n\n\t\t\t\t$replaced_group = preg_replace( '[^a-zA-Z0-9 -]', ' ', $group );\n\n\t\t\t\tif ( ! empty( $replaced_group ) ) {\n\t\t\t\t\t$group = $replaced_group;\n\t\t\t\t}\n\n\t\t\t\t$setting_type = lcfirst( $group );\n\t\t\t\t$setting_type = lcfirst( str_replace( '_', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( '-', ' ', ucwords( $setting_type, '_' ) ) );\n\t\t\t\t$setting_type = lcfirst( str_replace( ' ', '', ucwords( $setting_type, ' ' ) ) );\n\n\t\t\t\t$output_fields[ $setting_type . 'Settings' ] = [\n\t\t\t\t\t'type' => $setting_type . 'Settings',\n\t\t\t\t\t'resolve' => function () use ( $setting_type ) {\n\t\t\t\t\t\treturn $setting_type;\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Get all of the settings, regardless of group\n\t\t */\n\t\t$output_fields['allSettings'] = [\n\t\t\t'type' => 'Settings',\n\t\t\t'resolve' => function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t];\n\n\t\treturn $output_fields;\n\t}", "function get_settings_fields() {\n global $wrr_pro;\n $settings_fields = array(\n \n 'wc_segmented_ratings' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Segmented Ratings?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable. Please note, it will not work, if product rating is disabled from <a href=\"' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '\">WooCommerce setting</a>.',\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable segmented ratings for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'params_per',\n 'label' => 'Parameter Base',\n 'desc' => 'How do you want to set rating parameters for your products? <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'radio',\n 'options' => array(\n 'site' => 'Same parameters for all products',\n 'category' => 'Different parameters for each category',\n 'product' => 'Different parameters for each product',\n ),\n 'default' => 'site',\n 'disabled' => true,\n ),\n array(\n 'name' => 'fields',\n 'label' => 'Rating Parameters',\n 'desc' => 'If \\'<strong><label for=\"mdc-wc_segmented_ratings[params_per][site]\">Same parameters for all products</label></strong>\\' choosen for \\'Parameter Base\\' above. Ignore otherwise.<br />Type one segment per line. Separate \\'key\\' and \\'label\\' with a pipe symbol (\\'|\\').',\n 'type' => 'textarea',\n 'default' => 'price|Price'.PHP_EOL.'quality|Quality',\n ),\n ),\n 'wc_rich_editor' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Rich Editor?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable rich editor (<a href=\"https://en.wikipedia.org/wiki/WYSIWYG\">WYSIWYG</a>) in product review <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'disabled' => true,\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable rich editor for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'teeny',\n 'label' => 'Teeny Mode?',\n 'desc' => 'Check to enable teeny mode. It\\'ll hide some features of WYSIWYG editor. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'quicktags',\n 'label' => 'Enable Text editor?',\n 'desc' => 'Check to enable quick tag mode. It\\'ll show \\'Text\\' tab in WYSIWYG editor to write/view HTML. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'media_buttons',\n 'desc' => 'Check to allow reviewers to upload/attach media files with review. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'label' => 'Enable Media Uploader?',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n ), \n );\n\n return $settings_fields;\n }", "private function settings_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Global Settings', 'formidable' ) . '</h3>'\n\t\t\t\t. '<p><strong>' . __( 'General', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )\n\t\t\t\t. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'\n\t\t\t\t. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )\n \t . '</p>',\n\t\t\t'prev_page' => 'import',\n\t\t\t'next_page' => 'addons',\n\t\t);\n\t}", "public function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['early_global'] = array('c', array(\n\t\t 'member_id' => \"global_member_id\",\n\t\t 'group_id' => \"global_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t $settings['early_logged_in'] = array('c', array(\n\t\t 'member_id' => \"logged_in_member_id\",\n\t\t 'group_id' => \"logged_in_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t // for demo, include some others\n\t $settings['include_other'] = array('c', array(\n\t\t 'include_other' => \"Include other member variables\",\n\t\t), array());\n\t\t\n \t\t$settings['others'] = array('ms', array(\n\t\t 'username' => 'username',\n\t\t 'screen_name' => 'screen_name',\n\t\t 'email' => 'email',\n\t\t // 'last_visit' => 'last_visit',\n\t\t 'access_cp' => 'access_cp',\n\t\t // defaults\n\t\t), array());\n\n\t\t$settings['handy'] = array('c', array(\n\t\t 'comment_edit_time_limit' => \"comment_edit_time_limit\",\n\t\t), array('comment_edit_time_limit'));\n\n\t\treturn $settings;\n\t}", "public function settingsData() {\n\n $arraySettings = array (\n 'Generic Param' => $this->_genericParam\n );\n\n return $arraySettings;\n\n }", "public static function get_input_fields() {\n\t\t$allowed_settings = DataSource::get_allowed_settings();\n\n\t\t$input_fields = [];\n\n\t\tif ( ! empty( $allowed_settings ) ) {\n\n\t\t\t/**\n\t\t\t * Loop through the $allowed_settings and build fields\n\t\t\t * for the individual settings\n\t\t\t */\n\t\t\tforeach ( $allowed_settings as $key => $setting ) {\n\n\t\t\t\t/**\n\t\t\t\t * Determine if the individual setting already has a\n\t\t\t\t * REST API name, if not use the option name.\n\t\t\t\t * Sanitize the field name to be camelcase\n\t\t\t\t */\n\t\t\t\tif ( ! empty( $setting['show_in_rest']['name'] ) ) {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $setting['show_in_rest']['name'], '_' ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$individual_setting_key = lcfirst( $setting['group'] . 'Settings' . str_replace( '_', '', ucwords( $key, '_' ) ) );\n\t\t\t\t}\n\n\t\t\t\t$replaced_setting_key = preg_replace( '[^a-zA-Z0-9 -]', ' ', $individual_setting_key );\n\n\t\t\t\tif ( ! empty( $replaced_setting_key ) ) {\n\t\t\t\t\t$individual_setting_key = $replaced_setting_key;\n\t\t\t\t}\n\n\t\t\t\t$individual_setting_key = lcfirst( $individual_setting_key );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '_', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( '-', ' ', ucwords( $individual_setting_key, '_' ) ) );\n\t\t\t\t$individual_setting_key = lcfirst( str_replace( ' ', '', ucwords( $individual_setting_key, ' ' ) ) );\n\n\t\t\t\t/**\n\t\t\t\t * Dynamically build the individual setting,\n\t\t\t\t * then add it to the $input_fields\n\t\t\t\t */\n\t\t\t\t$input_fields[ $individual_setting_key ] = [\n\t\t\t\t\t'type' => $setting['type'],\n\t\t\t\t\t'description' => $setting['description'],\n\t\t\t\t];\n\n\t\t\t}\n\t\t}\n\n\t\treturn $input_fields;\n\t}", "abstract public function settings(): array;", "public function feed_settings_fields() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'title' => '',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_name',\n\t\t\t\t\t\t'label' => esc_html__( 'Feed Name', 'gravityformsicontact' ),\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'tooltip' => '<h6>'. esc_html__( 'Name', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'default_value' => $this->get_default_feed_name(),\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'list',\n\t\t\t\t\t\t'label' => esc_html__( 'iContact List', 'gravityformsicontact' ),\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->lists_for_feed_setting(),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Lists.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'iContact List', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which iContact list this feed will add contacts to.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'fields',\n\t\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t\t'field_map' => $this->fields_for_feed_mapping(),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Map Fields', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which Gravity Form fields pair with their respective iContact fields.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'custom_fields',\n\t\t\t\t\t\t'label' => '',\n\t\t\t\t\t\t'type' => 'dynamic_field_map',\n\t\t\t\t\t\t'field_map' => version_compare( GFForms::$version, '2.5-dev-1', '<' ) ? $this->custom_fields_for_feed_setting() : array( $this, 'custom_fields_for_feed_setting' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'create_new_custom_fields' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Opt-In Condition', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable', 'gravityformsicontact' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Export to iContact if', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Opt-In Condition', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'When the opt-in condition is enabled, form submissions will only be exported to iContact when the condition is met. When disabled, all form submissions will be exported.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t)\t\n\t\t\t)\n\t\t);\n\t\t\n\t}", "function bdpp_settings_tab() {\n\t\n\t$result_arr = array();\n\n\t$settings_arr = apply_filters('bdpp_settings_tab', array(\n\t\t\t\t\t\t\t'general'\t=> __('General', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'trending'\t=> __('Trending Post', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'taxonomy'\t=> __('Taxonomy', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'sharing'\t=> __('Sharing', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'css'\t\t=> __('CSS', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'misc'\t\t=> __('Misc', 'blog-designer-pack'),\n\t\t\t\t\t\t));\n\n\tforeach ($settings_arr as $sett_key => $sett_val) {\n\t\tif( !empty($sett_key) && !empty($sett_val) ) {\n\t\t\t$result_arr[trim($sett_key)] = trim($sett_val);\n\t\t}\n\t}\n\n\treturn $result_arr;\n}", "protected function getSettingArray()\n {\n return $this->container->get($this->getSettingKey());\n }", "protected function get_settings_array() {\n\t\t$plugin_path = Tribe__Events__Main::instance()->plugin_path;\n\t\treturn (array) include $plugin_path . 'src/admin-views/tribe-options-timezones.php';\n\t}", "private function set_fields() {\r\n\r\n\t\t$fields = array();\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_billing' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_shipping' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\t$temp_fields = get_option( 'wc_fields_additional' );\r\n\r\n\t\tif ( $temp_fields !== false ) {\r\n\t\t\t$fields = array_merge( $fields, $temp_fields );\r\n\t\t}\r\n\r\n\t\treturn $fields;\r\n\t}", "protected function getConfigFieldsValues()\n {\n return array(\n $this->mod_prefix.'SHOW_WEBPAGE' => Configuration::get($this->mod_prefix.'SHOW_WEBPAGE'),\n $this->mod_prefix.'SHOW_WEBSITE' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE'),\n $this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX' => Configuration::get($this->mod_prefix.'SHOW_WEBSITE_SEARCHBOX'),\n $this->mod_prefix.'SHOW_ORGANIZATION' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION'),\n $this->mod_prefix.'SHOW_ORGANIZATION_LOGO' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_LOGO'),\n $this->mod_prefix.'SHOW_ORGANIZATION_CONTACT' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_CONTACT'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_EMAIL'),\n $this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE' => Configuration::get($this->mod_prefix.'ORGANIZATION_CONTACT_TELEPHONE'),\n $this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'SHOW_ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'ORGANIZATION_FACEBOOK' => Configuration::get($this->mod_prefix.'ORGANIZATION_FACEBOOK'),\n $this->mod_prefix.'SHOW_LOCALBUSINESS' => Configuration::get($this->mod_prefix.'SHOW_LOCALBUSINESS'),\n $this->mod_prefix.'LOCALBUSINESS_TYPE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_TYPE'),\n $this->mod_prefix.'LOCALBUSINESS_STORENAME' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STORENAME'),\n $this->mod_prefix.'LOCALBUSINESS_DESC' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_DESC'),\n $this->mod_prefix.'LOCALBUSINESS_VAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_VAT'),\n $this->mod_prefix.'LOCALBUSINESS_PHONE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PHONE'),\n $this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE_SHOW'),\n //$this->mod_prefix.'LOCALBUSINESS_PRANGE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_PRANGE'),\n $this->mod_prefix.'LOCALBUSINESS_STREET' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_STREET'),\n $this->mod_prefix.'LOCALBUSINESS_COUNTRY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_COUNTRY'),\n $this->mod_prefix.'LOCALBUSINESS_REGION' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_REGION'),\n $this->mod_prefix.'LOCALBUSINESS_CODE' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_CODE'),\n $this->mod_prefix.'LOCALBUSINESS_LOCALITY' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_LOCALITY'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_SHOW' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_SHOW'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LAT' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LAT'),\n $this->mod_prefix.'LOCALBUSINESS_GPS_LON' => Configuration::get($this->mod_prefix.'LOCALBUSINESS_GPS_LON')\n );\n }", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "public function getSettings() : array\n {\n return $this->settings;\n }", "private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "function getSettingsList(){\n\t\treturn array(\n\t\t'institute_name',\n\t\t'institute_phone',\n\t\t'institute_address',\n\t\t'email',\n\t\t'notifications',\n\t\t'facebook_url',\n\t\t'linkedin_url',\n\t\t'twitter_url',\n\t\t'youtube_url',\n\t\t'copyright',\n\t\t'metatags'\n\t\t);\n\t}", "public function get_settings() {\n $this->create_object_settings();\n return array($this->settings);\n }", "public function feed_settings_fields() {\n\n return array(\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Configurações do Feed BuddyPress', 'gravityformsbuddy' ),\n\t\t\t\t'description' => '',\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__( 'Nome', 'gravityformsbuddy' ),\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__( 'Nome', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Entre com um nome para o Feed para identificá-lo.', 'gravityformsbuddy' )\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' => 'toUser',\n\t\t\t\t\t\t'label' => esc_html__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'select_custom',\n\t\t\t\t\t\t'choices' => $this->get_buddy_users_as_choices( 'outgoing_numbers' ),\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'input_class' => 'merge-tag-support mt-position-right',\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__( 'Para quem enviar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Usuário o qual receberá as notificações', 'gravityformsbuddy' )\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' => 'pathUrl',\n\t\t\t\t\t\t'label' => esc_html__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => false,\n\t\t\t\t\t\t'class' \t => '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__( 'URL para redirecionar?', 'gravityformsbuddy' ),\n\t\t\t\t\t\t\tesc_html__( 'Link que será redirecionado para quando o usuário clicar na notificação', 'gravityformsbuddy' )\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' => 'message',\n\t\t\t\t\t\t'label' => esc_html__( 'Mensagem Padrão', 'gravityformsbuddy' ),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'class' => 'medium merge-tag-support mt-position-right',\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__( 'Mensagem', 'gravityformstwilio' ),\n\t\t\t\t\t\t\tesc_html__( 'Escreva uma mensagem que será mostrada como notificação', 'gravityformsbuddy' )\n\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}", "static public function get_raw_settings() {\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\treturn $settings;\n\t}", "function get_settings(){\n $settings = array(\n 'section_title' => array(\n 'name' => __('GWP Custom Tabs','GWP'),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wc_'.$this->id.'_section_title'\n ),\n 'title' => array(\n 'name' => __( 'Global Custom Tabs', 'GWP' ),\n 'type' => $this->post_type,\n 'desc' => __( 'Start typing the Custom Tab name, Used for including custom tabs on all products.', 'GWP' ),\n 'desc_tip' => true,\n 'default' => '',\n 'id' => 'wc_'.$this->id.'_globals'\n ),\n 'section_end' => array(\n 'type' => 'sectionend',\n 'id' => 'wc_'.$this->id.'_section_end'\n )\n );\n return apply_filters( 'wc_'.$this->id.'_settings', $settings );\n }", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "public function fields(): array{\n\t\treturn [\n\t\t\t'id' => [\n\t\t\t\t'type' => Type::nonNull(Type::int()),\n\t\t\t\t'description' => 'The id of the user',\n\t\t\t],\n\t\t\t'uid' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The name or value of the setting',\n\t\t\t],\n\t\t\t'description' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'Description of the setting',\n\t\t\t],\n\t\t\t'type' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'status' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t\t'description' => 'The type of setting',\n\t\t\t],\n\t\t\t'properties' => [\n\t\t\t\t'type' => GraphQL::type('property'),\n\t\t\t\t'description' => 'A list of the property',\n\t\t\t\t'is_relation' => false,\n\t\t\t],\n\n\t\t];\n\t}", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "function GetFieldSettings($i){\n if ($this->debug_mode)\n echo $this->ClassName . \"::GetFieldSettings($i);\" . \"<HR>\";\n $_field = array();\n $_field[\"number\"] = $i;\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_NAME\")) {\n $_field[\"field_name\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_NAME\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_FIELDNAME_SETTINGS\", array(\n $i), true);\n }\n //set database column parameters\n for ($k = 0; $k < sizeof($this->Storage->columnparameters); $k ++)\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"DBFIELD_\" . strtoupper($this->Storage->columnparameters[$k]))) {\n $_field[\"dbfield_\" . strtolower($this->Storage->columnparameters[$k])] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"DBFIELD_\" . strtoupper($this->Storage->columnparameters[$k]));\n }\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"EDIT_CONTROL\")) {\n $_field[\"control\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"EDIT_CONTROL\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_EDIT_CONTROL_SETTINGS\", array($i), true);\n }\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"LENGTH\")) {\n $_field[\"length\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"LENGTH\");\n }\n else {\n $_field[\"length\"] = \"\";\n }\n\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_DUBLICATE\")) {\n $_field[\"field_dublicate\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_DUBLICATE\");\n }\n else {\n $_field[\"field_dublicate\"] = false;\n }\n\n //--check if have additional events\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"FIELD_EVENT\")) {\n $_field[\"field_event\"] = $this->listSettings->GetItem(\"FIELD_\" . $i, \"FIELD_EVENT\");\n }\n\n //-- if field belong of any additional groups\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"GROUP\")) {\n $_field[\"group\"] = strtoupper($this->listSettings->GetItem(\"FIELD_\" . $i, \"GROUP\"));\n }\n switch ($_field[\"control\"]) {\n case \"date\":\n EditPageHelper::GetDateSettings($i, $_field, $this);\n break;\n case \"text\":\n case \"password\":\n EditPageHelper::GetTextSettings($i, $_field, $this);\n break;\n\n case \"textarea\":\n EditPageHelper::GetTextAreaSettings($i, $_field, $this);\n break;\n case \"machtmleditor\":\n EditPageHelper::GetMacHtmlEditorSettings($i, $_field, $this);\n break;\n\n case \"checkbox\":\n case \"radio\":\n EditPageHelper::GetCheckboxSettings($i, $_field, $this);\n break;\n\n case \"radiogroup\":\n case \"checkboxgroup\":\n case \"caption\":\n case \"combobox\":\n EditPageHelper::GetComboSettings($i, $_field, $this);\n break; //select\n\n\n case \"dbtext\":\n case \"dbstatictext\":\n EditPageHelper::GetDbTextSettings($i, $_field, $this);\n\n case \"dbcombobox\":\n case \"dbtreecombobox\":\n case \"dbtreetext\":\n case \"dbradiogroup\":\n case \"dbcheckboxgroup\":\n //case \"checkboxgroup\":\n EditPageHelper::GetDbComplexSettings($i, $_field, $this);\n break;\n case \"dbeditblock2\":\n EditPageHelper::GetDbEditBlockSettings($i, $_field, $this);\n break;\n\n case \"dbtreepath\":\n EditPageHelper::GetDbTreePathSettings($i, $_field, $this);\n break;\n\n case \"file\":\n EditPageHelper::GetFileSettings($i, $_field, $this);\n break;\n case \"file2\":\n EditPageHelper::GetFile2Settings($i, $_field, $this);\n break;\n\n case \"fileslistbox\":\n EditPageHelper::GetFilesListBoxSettings($i, $_field, $this);\n break;\n\n case \"hidden\":\n EditPageHelper::GetHiddenSettings($i, $_field, $this);\n break;\n case \"spaweditor\":\n case \"extrahtmleditor\":\n EditPageHelper::GetExtraHtmlEditorSettings($i, $_field, $this);\n break;\n\n case \"autocomplete\":\n EditPageHelper::GetAutocompleteSettings($i, $_field, $this);\n break;\n\n default: $this->GetCustomFieldSettings($i, $_field); break;\n } // switch\n //Get\n //if this is multilanguage field\n if ($this->listSettings->HasItem(\"FIELD_\" . $i, \"IS_MULTILANG\") && $this->listSettings->GetItem(\"FIELD_\" . $i, \"IS_MULTILANG\")) {\n for ($j = 0; $j < sizeof($this->Kernel->Languages); $j ++) {\n $_field1 = $_field;\n $_field1[\"field_name\"] = sprintf($_field1[\"field_name\"], $this->Kernel->Languages[$j]);\n $_field1[\"lang_version\"] = $this->Kernel->Languages[$j];\n $this->form_fields[$this->Kernel->Languages[$j]][] = $_field1;\n }\n }\n else {\n if (strlen($_field[\"group\"]) == 0) {\n $_group = \"main\";\n }\n else {\n $_group = $_field[\"group\"];\n }\n $this->form_fields[$_group][] = $_field;\n //if this is password\n if ($_field[\"control\"] == \"password\") {\n $old_field = $_field;\n $_field[\"field_name\"] = $_field[\"field_name\"] . \"_2\";\n if ($_field[\"field_dublicate\"]) {\n $this->Storage->setColumnParameter($old_field[\"field_name\"], \"dublicate\", 1);\n $_field[\"notnull\"] = 1;\n $this->form_fields[$_group][] = $_field;\n }\n }\n }\n }", "public function getPluginSettings()\n {\n # Get common and specific settings\n $combine = array_merge($this->common_settings, $this->getSettingsFields());\n $settings = [];\n \n $key = strtolower($this->getKey());\n foreach($combine as $k => $v){\n $settings[$key . '_' . $k] = $v;\n }\n\n # Add Feature list of options \n $this->addSettingsOptions('features', $settings, $this->getFeatures());\n\n # Add Feature list of options\n $this->addSettingsOptions('filters', $settings, $this->getFilters()); \n\n # Add Feature list of options\n $this->addSettingsOptions('weight_by', $settings, $this->getWeightFeatures(), true);\n \n return $settings;\n \n }", "public function feed_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\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'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Name', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsdropbox' )\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' => 'fileUploadField',\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'label' => esc_html__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'choices' => $this->get_file_upload_field_choices(),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\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__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the specific File Upload field that you want to be uploaded to Dropbox.', 'gravityformsdropbox' )\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' => 'destinationFolder',\n\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s<br /><br />%s',\n\t\t\t\t\t\t\tesc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the folder in your Dropbox account where the files will be uploaded to.', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'By default, all files are stored in the \"Gravity Forms Add-On\" folder within the Dropbox Apps folder in your Dropbox account.', 'gravityformsdropbox' )\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' => 'feedCondition',\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Upload Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Upload to Dropbox if', 'gravityformsdropbox' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t}", "public function grid_display_settings($settings)\n {\n return array('field_options' => $this->_fieldSettings($settings));\n }", "public function extra_settings()\n\t{\n\t\t$itemSettings = array( 0 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_max_num',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_size'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 1 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_1',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_height'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 2 => array( 'form_type' \t=> 'formsimpleinput',\n\t\t\t\t\t\t\t\t\t\t 'field' \t\t=> 'si_extra_settings_2',\n\t\t\t\t\t\t\t\t\t\t 'words' \t\t=> $this->lang->words['max_emoticon_width'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> ''\n\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 3 => array( 'form_type' => 'formMultiDropdown',\n\t\t\t\t\t\t\t\t\t\t 'field' \t=> 'si_extra_settings_3',\n\t\t\t\t\t\t\t\t\t\t 'words' \t=> $this->lang->words['emoticon_image_formats'],\n\t\t\t\t\t\t\t\t\t\t 'desc' \t\t=> '',\n\t\t\t\t\t\t\t\t\t\t 'type' => 'image_types'\n\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 );\n\t\t\n\t\treturn $itemSettings;\n\t}", "public function getOptions(): array {\n\t\t$field_options = [];\n\n\t\tif (!empty($this->fieldoptions)) {\n\t\t\t$field_options = elgg_string_to_array($this->fieldoptions);\n\t\t\t$field_options = array_combine(array_values($field_options), $field_options); // input radio and checkbox require non-numeric keys\n\t\t}\n\n\t\treturn $field_options;\n\t}", "private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "public function getAdditionalFields() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\tif ($this->installed()) {\n\t\t\t$ro_settings = $this->config->get('related_options');\n\t\t\t$std_fields = array('sku', 'upc', 'ean', 'location');\n\t\t\tforeach ($std_fields as $field) {\n\t\t\t\tif ( isset($ro_settings['spec_'.$field]) && $ro_settings['spec_'.$field] ) {\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "public function getSettings(): array {\n\t\treturn [\n\t\t\t// Enable debug mode (to print errors).\n\t\t\t'debug' => !empty(elgg_get_config('debug')),\n\t\t\t'security' => [\n\t\t\t\t'requestedAuthnContext' => false,\n\t\t\t],\n\t\t\t// Service Provider Data that we are deploying.\n\t\t\t'sp' => $this->getSPSettings(),\n\t\t\t\n\t\t\t// Identity Provider Data that we want connected with our SP.\n\t\t\t'idp' => $this->getIDPSettings(),\n\t\t];\n\t}", "public function getSettings(): array\n {\n return [];\n }", "public function getSettingsAll ()\n {\n \tglobal $debug;\n \t\n \t$settings = array();\n \t$select_string = \"select settings_key,settings_value from \".$this->table_prefix.$this->quiz_tables['settings'];\n \t$settings = $this->db_object->getKeyValue ($select_string, \"settings_key\", \"settings_value\");\n \treturn $settings;\n }", "protected static function getSettings()\r\n {\r\n if(!self::$avail_settings)\r\n {\r\n $data = self::db()->query(\r\n 'SELECT * FROM `:prefix:rbac_user_settings` AS `t1` '\r\n . 'JOIN `:prefix:forms_fieldtypes` AS `t2` '\r\n . 'ON `t1`.`fieldtype`=`t2`.`type_id` '\r\n . 'WHERE `is_editable`=? '\r\n . 'ORDER BY `fieldset` ASC, `position` ASC',\r\n array('Y')\r\n );\r\n if($data)\r\n {\r\n self::$avail_settings = $data->fetchAll();\r\n }\r\n }\r\n return self::$avail_settings;\r\n }", "function get_meta_array( $settings ){\n\t\t$settings[ $this->id ] = array(\n\t\t\t\t'name' => $this->multiple_up.' Lud',\n\t\t\t\t//'icon' => $this->icon,\n\t\t\t\t'opts' => $this->sec_site_options(),\n\t\t);\n\t\treturn $settings;\n\t}", "protected function getOptionFieldsConfig()\n {\n $fields['custom_option_group'] = $this->getCustomOptionGroupFieldConfig();\n\n return $fields;\n }", "public function getSettings(): array\n {\n $settings = static::find()->where(['status' => true])->asArray()->all();\n return array_merge_recursive(\n ArrayHelper::map($settings, 'key', 'value', 'category'),\n ArrayHelper::map($settings, 'key', 'type', 'category')\n );\n }", "public function getSettings()\n {\n $aValidSettings = $this->getValidSettings();\n $aSettings = array();\n\n foreach ( $aValidSettings as $sSettingName ) {\n $aSettings[$sSettingName] = $this->getSetting( $sSettingName );\n }\n\n return $aSettings;\n }", "public function get_settings() {\n\n\t\tif($this->settings) {\n\t\t\treturn $this->settings;\n\t\t}\n\n\t\t$query = $this->db->get('shortee_settings');\n\t\t$this->settings = $query->row_array();\n\t\t$this->domain_list = explode(',',$this->settings['short_domain']);\n\n\t\treturn $this->settings;\n\t}", "public function get_options_settings() {\n $default_options = $this->get_default_option_settings();\n\n $settings = array(\n array(\n 'name' => 'qr_type',\n 'title' => __( 'Allowed Types', 'wpuf-pro' ),\n 'type' => 'checkbox',\n 'section' => 'advanced',\n 'priority' => 15,\n 'help_text' => __( 'Some details text about the section', 'wpuf-pro' ),\n 'options' => array(\n 'url' => __( 'URL', 'wpuf-pro' ),\n 'text' => __( 'Text', 'wpuf-pro' ),\n 'geo' => __( 'Location', 'wpuf-pro' ),\n 'sms' => __( 'SMS', 'wpuf-pro' ),\n 'wifi' => __( 'Wifi', 'wpuf-pro' ),\n 'card' => __( 'Card', 'wpuf-pro' ),\n 'email' => __( 'Email', 'wpuf-pro' ),\n 'calendar' => __( 'Calendar', 'wpuf-pro' ),\n 'phone' => __( 'Phone', 'wpuf-pro' ),\n )\n ),\n );\n\n return array_merge( $default_options, $settings );\n }", "public function getFields(): array\n {\n return [\n 'user_id' => 'text',\n 'api_key' => 'text',\n 'shop_id' => 'text',\n 'secret_key' => 'password',\n ];\n }", "static public function get_settings() {\n\n\t\t$settings[] = array();\n\n\t\t$settings = array(\n\t\t\t'default_tab' => array(\n\t\t\t\t'default_tab_settings' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Header', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'header'\n\t\t\t\t),\n\t\t\t\t'missing_callback' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Missing Callback', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'non-exisit'\n\t\t\t\t),\n\t\t\t\t'checkbox' => array(\n\t\t\t\t\t'name' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t),\n\t\t\t\t'multicheck' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'multicheck_without_options' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'radio' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'radio_without_options' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'text' => array(\n\t\t\t\t\t'name' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'text_with_std' => array(\n\t\t\t\t\t'name' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'email' => array(\n\t\t\t\t\t'name' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'type' => 'email'\n\t\t\t\t),\n\t\t\t\t'url' => array(\n\t\t\t\t\t'name' => __( 'URL', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'By default, only http & https are allowed', self::$plugin_name ),\n\t\t\t\t\t'type' => 'url'\n\t\t\t\t),\n\t\t\t\t'password' => array(\n\t\t\t\t\t'name' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'type' => 'password'\n\t\t\t\t),\n\t\t\t\t'number' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'number_with_attributes' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Max: 1000, Min: 20, Step: 30', self::$plugin_name ),\n\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t'min' => 20,\n\t\t\t\t\t'step' => 30,\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'textarea' => array(\n\t\t\t\t\t'name' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'textarea_with_std' => array(\n\t\t\t\t\t'name' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'select' => array(\n\t\t\t\t\t'name' => __( 'Select', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Select with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'select'\n\t\t\t\t),\n\t\t\t\t'rich_editor' => array(\n\t\t\t\t\t'name' => __( 'Rich Editor', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Rich Editor save as HTML markups', self::$plugin_name ),\n\t\t\t\t\t'type' => 'rich_editor'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'second_tab' => array(\n\t\t\t\t'extend_me' => array(\n\t\t\t\t\t'name' => 'Extend me',\n\t\t\t\t\t'desc' => __( 'You can extend me via hooks and filters.', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn self::apply_tab_slug_filters( $settings );\n\t}", "public function getValues(){\n\t\treturn $this->_settings;\n\t}", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "function getCustomFields($settings, $which)\n\t{\n\t\tif (IsSet($settings->saml_settings[$which]))\n\t\t{\n\t\t\treturn array_keys($settings->saml_settings[$which]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$empty = array();\n\t\t\treturn $empty;\n\t\t}\n\t}", "protected function getGeneralAdditionalFields() {\n\t\t$additionalFields = array();\n\n\t\t$fieldId = 'configuredWidgets';\n\t\t$count = (count($this->availableWidgetList) <= 10 ?\n\t\t\tcount($this->availableWidgetList) :\n\t\t\t10);\n\t\t$fieldCode = $this->getSelect($fieldId, '', $this->availableWidgetList, $this->currentWidgetList, TRUE, $count);\n\n\t\t$additionalFields[$fieldId] = array(\n\t\t\t'code' => $fieldCode,\n\t\t\t'label' => 'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.configuredWidgets',\n\t\t\t'cshKey' => '_MOD_tools_txgeckoboardM1',\n\t\t\t'cshLabel' => 'task_' . $fieldId\n\t\t);\n\n\t\treturn $additionalFields;\n\t}", "public function getFields():array\n {\n return [\n 'x_login' => 'text',\n 'x_trans_key' => 'text',\n 'secret_key' => 'password',\n ];\n }", "function inspiry_get_submit_fields() {\n\t\t$inspiry_submit_property_fields = get_option( 'inspiry_submit_property_fields' );\n\t\tif ( ! empty( $inspiry_submit_property_fields ) && is_array( $inspiry_submit_property_fields ) ) {\n\t\t\treturn $inspiry_submit_property_fields;\n\t\t} else {\n\t\t\t// All fields - To handle the case where related setting is not saved after theme update\n\t\t\treturn array(\n\t\t\t\t'title',\n\t\t\t\t'description',\n\t\t\t\t'property-type',\n\t\t\t\t'property-status',\n\t\t\t\t'locations',\n\t\t\t\t'bedrooms',\n\t\t\t\t'bathrooms',\n\t\t\t\t'garages',\n\t\t\t\t'property-id',\n\t\t\t\t'price',\n\t\t\t\t'price-postfix',\n\t\t\t\t'area',\n\t\t\t\t'area-postfix',\n\t\t\t\t'lot-size',\n\t\t\t\t'lot-size-postfix',\n\t\t\t\t'video',\n\t\t\t\t'images',\n\t\t\t\t'address-and-map',\n\t\t\t\t'attachments',\n\t\t\t\t'additional-details',\n\t\t\t\t'featured',\n\t\t\t\t'features',\n\t\t\t\t'agent',\n\t\t\t\t'parent',\n\t\t\t\t'reviewer-message',\n\t\t\t\t'floor-plans',\n\t\t\t);\n\t\t}\n\t}", "private function get_settings_fields() {\n\n\t\t$fields = array();\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_api_key',\n\t\t\t'type' => 'password',\n\t\t\t'settings_label' => __( 'Sherpa API Key', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Enter an API Key and save your changes for the other fields to appear', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t);\n\n\t\tif ( ! $api_key = get_option( 'vibrant_life_sherpa_api_key' ) ) {\n\n\t\t\treturn $fields;\n\n\t\t}\n\n\t\tif ( ! $form = get_theme_mod( 'vibrant_life_schedule_a_visit_form' ) ) {\n\n\t\t\t$forms = wp_list_pluck( RGFormsModel::get_forms( null, 'title' ), 'title', 'id' );\n\n\t\t\t$fields[] = array(\n\t\t\t\t'name' => 'schedule_a_visit_to_sherpa_form',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'settings_label' => __( 'Which Form is the Schedule a Visit Form?', 'schedule-a-visit-form' ),\n\t\t\t\t'no_init' => true,\n\t\t\t\t'option_field' => true,\n\t\t\t\t'option_none' => __( '-- Choose a Gravity Form --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t'options' => $forms,\n\t\t\t);\n\n\t\t}\n\n\t\t$locations_query = new WP_Query( array(\n\t\t\t'post_type' => 'facility',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t) );\n\n\t\t$locations = wp_list_pluck( $locations_query->posts, 'post_title', 'ID' );\n\n\t\t$sherpa_communities = apply_filters( 'schedule_a_visit_to_sherpa_communities', array(\n\t\t\t2 => __( 'Lodges of Durand', 'schedule-a-visit-to-sherpa' ),\n\t\t\t4 => __( 'New Friends Memory Care Kalamazoo', 'schedule-a-visit-to-sherpa' ),\n\t\t\t1 => __( 'Vibrant Life Superior Township', 'schedule-a-visit-to-sherpa' ),\n\t\t\t3 => __( 'Vibrant Life Temperance', 'schedule-a-visit-to-sherpa' ),\n\t\t) );\n\n\t\t$fields[] = array(\n\t\t\t'name' => 'vibrant_life_sherpa_mapping',\n\t\t\t'type' => 'repeater',\n\t\t\t'settings_label' => __( 'Location/Sherpa Mapping', 'schedule-a-visit-to-sherpa' ),\n\t\t\t'no_init' => true,\n\t\t\t'option_field' => true,\n\t\t\t'description' => '<p class=\"description\">' . __( 'Associate each Location with each Community within Sherpa', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t'description_tip' => false,\n\t\t\t'fields' => array(\n\t\t\t\t'location_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Location', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $locations,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Location --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'community_id' => array(\n\t\t\t\t\t'type' => 'select',\t\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'label' => '<strong>' . __( 'Sherpa Community', 'schedule-a-visit-to-sherpa' ) . '</strong>',\n\t\t\t\t\t\t'options' => $sherpa_communities,\n\t\t\t\t\t\t'option_none' => __( '-- Choose a Community from Sherpa --', 'schedule-a-visit-to-sherpa' ),\n\t\t\t\t\t\t'input_class' => 'regular-text',\n\t\t\t\t\t\t'description' => '<p class=\"description\">' . __( 'These values are hardcoded. We cannot add or remove Sherpa Communities without updating the plugin.', 'schedule-a-visit-to-sherpa' ) . '</p>',\n\t\t\t\t\t\t'description_tip' => false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'schedule_a_visit_to_sherpa_settings_fields', $fields );\n\n\t}", "private function get_additional_fields_raw() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\tif ( ! is_array( $options ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\tif ( array_key_exists( 'additional_fields_raw', $options ) ) {\n\t\t\t\t$additional_fields = $options['additional_fields_raw'];\n\t\t\t\t$fields = explode( ',', $additional_fields );\n\t\t\t} else {\n\t\t\t\t$fields = array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields_raw', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'ogone_orderstandard';\n\n\t\treturn $settings;\n\t}", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "protected function getFieldOptions()\n {\n return explode(',', $this->option('fields'));\n }", "public function getFields(): array\n {\n if ($this->_fields !== null) {\n return $this->_fields;\n }\n\n try {\n $id = $this->getFieldLayoutId();\n } catch (InvalidConfigException $e) {\n return [];\n }\n\n return $this->_fields = Craft::$app->getFields()->getFieldsByLayoutId($id);\n }", "public function defineSettings(){\n return array();\n }", "private function getSettings()\n {\n return array(\n 'frontpage' => array(\n 'name' => 'Frontpage',\n 'key' => 'frontpage',\n 'type' => 'text',\n 'help' => 'Type the slug of the home page'\n ),\n\n );\n }", "public function getSettings() {\n return $this->settings == null ? array() : json_decode($this->settings, true);\n }", "protected function getSettings(): array\n {\n static $settings = null;\n\n if ($settings === null) {\n $settings = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get($this->extKey);\n }\n\n return $settings ?? [];\n }", "public function getAllFull() {\n $data=[];\n\n foreach($this->settings AS $name=>$value) {\n $data[$name]=$this->getFull($name);\n }\n\n return $data;\n }", "public function getGeneralSettingsDefaultData()\n {\n $settings = array(\n 'enabled' => 1,\n 'pull_out' => 1,\n 'display_interval' => 1,\n 'custom_css' => '',\n 'wheel_sound' => 1,\n 'show_fireworks' => 0,\n 'pull_out_image_url' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'vss_spinandwin' . DS . 'gift.png'\n );\n return $settings;\n }", "public static function option_fields() {\n\n // Only need to initiate the array once per page-load\n if ( ! empty( self::$theme_options ) )\n return self::$theme_options;\n\n self::$theme_options = array(\n 'id' => 'theme_options',\n 'show_on' => array( 'key' => 'options-page', 'value' => array( self::$key, ), ),\n 'show_names' => true,\n 'fields' => array(\n array(\n 'name' => __( 'Place Name', 'myprefix' ),\n 'desc' => __( 'field description (optional)', 'myprefix' ),\n 'id' => 'place_name',\n 'type' => 'text_medium',\n ),\n\t\t\t\tarray(\n\t\t\t\t 'name' => __( 'Facebook page URL', 'cmb' ),\n\t\t\t\t 'id' => $prefix . 'facebook_url',\n\t\t\t\t 'type' => 'text_url',\n\t\t\t\t // 'protocols' => array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' ), // Array of allowed protocols\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t 'name' => __( 'Twitter URL', 'cmb' ),\n\t\t\t\t 'id' => $prefix . 'twitter_url',\n\t\t\t\t 'type' => 'text_url',\n\t\t\t\t // 'protocols' => array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' ), // Array of allowed protocols\n\t\t\t\t),\n array(\n 'name' => __( 'Test Color Picker', 'myprefix' ),\n 'desc' => __( 'field description (optional)', 'myprefix' ),\n 'id' => 'test_colorpicker',\n 'type' => 'colorpicker',\n 'default' => '#ffffff'\n ),\n array(\n 'name' => __( 'Footer Text', 'myprefix' ),\n 'desc' => __( 'field description (optional)', 'myprefix' ),\n 'id' => 'footer_text',\n 'type' => 'text',\n ),\n ),\n );\n return self::$theme_options;\n }", "public static function get_current_options(){\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\n\t\t\t$settings = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings); \n\t\t\t\n\t\t\t$arr_opt = array();\n\t\t\tif(!empty($settings)){\n\t\t\t\t\tforeach($settings as $key => $val){\n\t\t\t\t\t\t$arr_opt[] = $val->rs_postid;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_lang;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_posttype;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_type;\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn $arr_opt;\n\t\n\t\t}", "public function settings()\n\t{\n\t\t$settings = array(\n\t\t\t'user_id' \t=> '',\n\t\t\t'private_key' \t=> '',\n\t\t\t'debug'\t=> array('r',\n\t\t\t\tarray(\n\t\t\t\t\t'y' => lang('yes'),\n\t\t\t\t\t'n' => lang('no')\n\t\t\t\t),\n\t\t\t\t'n'\n\t\t\t)\n\t\t);\n\n\t\treturn $settings;\n\t}", "public static function getAllSettings() {\n $db = Database::instance();\n $rows = $db->select()\n ->from('settings')\n ->query()\n ->fetchAll();\n\n $data = array();\n foreach($rows as $row) {\n $data[$row['param_name']] = $row['param_value'];\n }\n \n return $data;\n }", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "public function getFieldsArray() {\n\t\t\treturn $this->fields_array;\n\t\t}", "public function get_custom_fields_settings()\n {\n $fields = [];\n\n $fields['quiz_title'] = [\n 'name' => __('Quiz Title', $this->token),\n 'description' => __('The title that will be displayed for your quiz.', $this->token),\n 'placeholder' => 'Can chirotherapy treat your pain?',\n 'type' => 'text',\n 'default' => 'Can chirotherapy treat your pain?',\n 'section' => 'info'\n ];\n\n $fields['show_fields'] = [\n 'name' => __('Show Opt-In Before Score', $this->token),\n 'description' => __('If set to no, opt-in fields will be shown after the users see their score.', $this->token),\n 'placeholder' => '',\n 'type' => 'select',\n 'default' => 'yes',\n 'options' => ['no', 'yes'],\n 'section' => 'info'\n ];\n\n $fields['legal_broker'] = [\n 'name' => __('Your Business Name', $this->token),\n 'description' => __('This will be displayed on the bottom of each page.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['api_key'] = [\n 'name' => __('Custom API Key', $this->token),\n 'description' => __('This API key will be used for submitting leads to your CRM. Leave blank to use default API key.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['email'] = [\n 'name' => __('Notification Email', $this->token),\n 'description' => __('This address will be emailed when a user opts-into your ad. If left empty, emails will be sent to the default address for your site.', $this->token),\n 'placeholder' => '',\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['retargeting'] = [\n 'name' => __('Facebook Pixel - Retargeting (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow retargeting of people that view this quiz.', $this->token),\n 'placeholder' => __('Ex: 4123423454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['conversion'] = [\n 'name' => __('Facebook Pixel - Conversion (optional)', $this->token),\n 'description' => __('Facebook Pixel to allow conversion tracking of people that submit this quiz.', $this->token),\n 'placeholder' => __('Ex: 170432123454', $this->token),\n 'type' => 'text',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['primary_color'] = [\n 'name' => __('Primary Color', $this->token),\n 'description' => __('Change the primary color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n $fields['hover_color'] = [\n 'name' => __('Hover Color', $this->token),\n 'description' => __('Change the button hover color of the quiz.', $this->token),\n 'placeholder' => '',\n 'type' => 'color',\n 'default' => '',\n 'section' => 'info'\n ];\n\n return apply_filters($this->token . '_fields', $fields);\n }", "public function getSettings()\n\t{\n\t\t// Create an empty array\n\t\t$settings = array();\n\n\t\t// Get the Twilio settings\n\t\t$settings['twilio_account_sid'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/account_sid');\n\t\t$settings['twilio_auth_token'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/auth_token');\n\t\t$settings['twilio_sender_number'] = Mage::getStoreConfig('smsnotifications/twilio_api_credentials/sender_number');\n\n\t\t// Get the general settings\n\t\t$settings['country_code_filter'] = Mage::getStoreConfig('smsnotifications/general/country_code_filter');\n\n\t\t// Get the order notification settings\n\t\t$settings['order_noficication_recipients'] = Mage::getStoreConfig('smsnotifications/order_notification/recipients');\n\t\t$settings['order_noficication_recipients'] = explode(';', $settings['order_noficication_recipients']);\n\t\t$settings['order_notification_status'] = Mage::getStoreConfig('smsnotifications/order_notification/order_status');\n\n\t\t// Get the shipment notification settings\n\t\t$settings['shipment_notification_message'] = Mage::getStoreConfig('smsnotifications/shipment_notification/message');\n\n\t\t// Return the settings\n\t\treturn $settings;\n\t}", "public function getConfigFieldsValues()\n {\n return array(\n 'SEND_SMS_API' => Tools::getValue('SEND_SMS_API', Configuration::get('ONEHOP_SEND_SMS_API')),\n 'ADMIN_MOBILE' => Tools::getValue('ADMIN_MOBILE', Configuration::get('ONEHOP_ADMIN_MOBILE'))\n );\n }", "public function settings_list()\n {\n return [\n 'anonymous_urls' => 1,\n 'registration' => 1,\n 'private_site' => 0,\n 'show_guests_latests_urls' => 1,\n 'hash_ip' => 1,\n 'website_name' => 'UrlHum',\n 'anonymize_ip' => 1,\n 'reservedShortUrls' => '',\n 'deleted_urls_can_be_recreated' => 1,\n 'privacy_policy' => '',\n 'enable_privacy_policy' => 0,\n 'terms_of_use' => '',\n 'enable_terms_of_use' => 0,\n 'custom_html' => '',\n ];\n }", "function snax_admin_get_settings_sections() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_sections', array(\n\t\t'snax_settings_general' => array(\n\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_general_section_description',\n\t\t\t'page' => 'snax-general-settings',\n\t\t),\n\t\t'snax_settings_lists' => array(\n\t\t\t'title' => __( 'Lists', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_lists_section_description',\n\t\t\t'page' => 'snax-lists-settings',\n\t\t),\n\t\t'snax_settings_pages' => array(\n\t\t\t'title' => __( 'Pages', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_pages_section_description',\n\t\t\t'page' => 'snax-pages-settings',\n\t\t),\n\t\t'snax_settings_voting' => array(\n\t\t\t'title' => __( 'Voting', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_voting_section_description',\n\t\t\t'page' => 'snax-voting-settings',\n\t\t),\n\t\t'snax_settings_limits' => array(\n\t\t\t'title' => __( 'General', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_limits_section_description',\n\t\t\t'page' => 'snax-limits-settings',\n\t\t),\n\t\t'snax_settings_auth' => array(\n\t\t\t'title' => __( 'Auth', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_auth_section_description',\n\t\t\t'page' => 'snax-auth-settings',\n\t\t),\n\t\t'snax_settings_demo' => array(\n\t\t\t'title' => __( 'Demo', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_demo_section_description',\n\t\t\t'page' => 'snax-demo-settings',\n\t\t),\n\t\t'snax_settings_embedly' => array(\n\t\t\t'title' => __( 'Embedly', 'snax' ),\n\t\t\t'callback' => 'snax_admin_settings_embedly_section_description',\n\t\t\t'page' => 'snax-embedly-settings',\n\t\t),\n\t\t'snax_permalinks' => array(\n\t\t\t'title' => _x( 'Snax', 'Permalink Settings', 'snax' ),\n\t\t\t'callback' => 'snax_permalinks_section_description',\n\t\t\t'page' => 'permalink',\n\t\t),\n\t) );\n}", "private function _get_general_section_settings() {\r\n\r\n global $WWOF_SETTINGS_SORT_BY, $WWOF_SETTINGS_DEFAULT_PPP;\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'General Options', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_main_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Use Alternate View Of Wholesale Page?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Checkbox on the right side of each product, and add to cart button at the bottom of the list' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_use_alternate_view_of_wholesale_page'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Disable Pagination?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Shows all products by lazy loading them in when the user scrolls down. The form will load in groups of products based on the number specified in the Products Per Page setting.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_disable_pagination'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Products Per Page' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'number',\r\n 'desc_tip' => sprintf( __( 'Number of products to display per page (for pagination) or how many products to load at a time (for lazy loading). Default is 12 products when left empty.' , 'woocommerce-wholesale-order-form' ) , $WWOF_SETTINGS_DEFAULT_PPP ),\r\n 'id' => 'wwof_general_products_per_page',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show In Stock Quantity?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display product stock quantity on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_stock_quantity'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Product SKU?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display product sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_sku'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Allow Product SKU Search?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we allow searching for products via sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_allow_product_sku_search'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Product Thumbnail?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display a small product thumbnail on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_thumbnail'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Product Thumbnail Size', 'woocommerce-wholesale-order-form' ),\r\n 'desc' => __( 'This size is used in wholesale product listings', 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_product_thumbnail_image_size',\r\n 'css' => '',\r\n 'type' => 'wwof_image_dimension',\r\n 'default' => array(\r\n 'width' => '48',\r\n 'height' => '48'\r\n ),\r\n 'desc_tip' => true,\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display the product details in a lightbox popup on click?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( \"Should the product details be displayed in a popup or redirect the user to the product's page?\" , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_product_details_on_popup'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display Zero Inventory Products?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Zero inventory products are products that are out of inventory and do not allow backorders. This also includes non simple products whose composition requires a certain products that have zero inventory.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_zero_products'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Hide wholesale quantity discount prices.' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => sprintf( __( 'Hides the small table printed under the wholesale price when quantity based discounts are available for that product. Only used when <a href=\"%1$s\" target=\"blank\">WooCommerce Wholesale Prices Premium</a> is active.' , 'woocommerce-wholesale-order-form' ) , 'https://wholesalesuiteplugin.com/product/woocommerce-wholesale-prices-premium/' ),\r\n 'id' => 'wwof_general_hide_quantity_discounts'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Sort By' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_sort_by',\r\n 'class' => 'chosen_select',\r\n 'options' => $WWOF_SETTINGS_SORT_BY\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Sort Order' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_sort_order',\r\n 'class' => 'chosen_select',\r\n 'options' => array(\r\n 'asc' => __( 'Ascending' , 'woocommerce-wholesale-order-form' ),\r\n 'desc' => __( 'Descending' , 'woocommerce-wholesale-order-form' )\r\n )\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display Cart Subtotal?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Display cart subtotal at the bottom of the order form' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_cart_subtotal'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Cart Sub Total Prices Display' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => __( 'Either to include or exclude price on sub total. Only used if \"Display Cart Sub Total\" option above is enabled.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_general_cart_subtotal_prices_display',\r\n 'class' => 'chosen_select',\r\n 'options' => array (\r\n 'incl' => __( 'Including tax' , 'woocommerce-wholesale-order-form' ),\r\n 'excl' => __( 'Excluding tax' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'default' => 'incl'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'List product variation individually' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Enabling this setting will list down each product variation individually and have its own row in the wholesale order form.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_list_product_variation_individually',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Wholesale Order Requirements Message in Order Form' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => __( 'Only works if there are Order Requirements set in WooCommerce Wholesale Prices Premium plugin settings.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_display_wholesale_price_requirement',\r\n 'class' => 'chosen_select',\r\n 'options' => array (\r\n 'yes' => __( 'Yes' , 'woocommerce-wholesale-order-form' ),\r\n 'no' => __( 'No' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'default' => 'yes'\r\n ),\r\n \r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_general_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "public static function get_settings()\n\t{\n\t\tif (! isset(self::$_settings) || self::$_settings == null)\n\t\t{\n\t\t\t$settings = array();\n\t\t\t//Get the actual saved settings\n\t\t\t$query = ee()->db->get(self::$_settings_table_name);\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$settings[$row[\"setting_name\"]] = $row[\"setting_value\"];\n\t\t\t}\n\t\t\tself::$_settings = array_merge(self::_get_default_settings(), $settings);\n\t\t}\n\t\treturn self::$_settings;\n\t}", "public static function get_option_setting()\n\t\t{ \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\t$opt_list = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings);\n\t\t\t\t\n\t\t\t\t$option =array();\n\t\t\t\t\n\t\t\t\tif(!empty($opt_list)){\n\t\t\t\t\t\n\t\t\t\t\tforeach($opt_list as $key => $val){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_lang;\n\t\t\t\t\t\t\t$option[] = $val->rs_type;\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_postid;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $option;\n\t\t\t\t\n\t\t}", "public function getCopy() : array\n {\n return (array)$this->settings;\n }", "public function toArray()\n\t{\n\t\t$data = [];\n\t\tforeach ($this->settings() as $setting) {\n\t\t\t$data[$setting->key()] = $setting->value();\n\t\t}\n\t\treturn $data;\n\t}", "protected function getFieldsetConfig()\n {\n return [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Editor Note'),\n 'componentType' => Fieldset::NAME,\n 'dataScope' => static::DATA_SCOPE_PRODUCT, // save data in the product data\n 'provider' => static::DATA_SCOPE_PRODUCT . '_data_source',\n 'ns' => static::FORM_NAME,\n 'collapsible' => true,\n 'sortOrder' => 50,\n 'opened' => false,\n ],\n ],\n ],\n 'children' => [\n static::NOTE_TITLE_FIELD_TEXT => $this->getTitleFieldConfig(10),\n static::NOTE_DESC_FIELD_TEXT => $this->getDescTextFieldConfig(20),\n static::IS_NOTE_DISPLAY => $this->getIsDisplayFieldConfig(30),\n ],\n ];\n }", "public function globalData() {\n $globalData = array();\n\n $this->db->select('*');\n $this->db->from('settings');\n $result = $this->db->get();\n foreach ($result->result_array() as $value) {\n $global[$value['setting_name']] = $value['setting_value'];\n }\n return $global;\n }", "protected function admin_fields_settings() {\n\n $settings_fields = array(\n\n 'wcsales_general_tabs' => array(),\n \n 'wcsales_settings_tabs' => array(\n\n array(\n 'name' => 'enableresalenotification',\n 'label' => __( 'Enable / Disable Sale Notification', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Enable', 'wc-sales-notification-pro' ),\n 'type' => 'checkbox',\n 'default' => 'off',\n 'class'=>'woolentor_table_row',\n ),\n\n array(\n 'name' => 'notification_content_type',\n 'label' => __( 'Notification Content Type', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Select Content Type', 'wc-sales-notification-pro' ),\n 'type' => 'radio',\n 'default' => 'actual',\n 'options' => array(\n 'actual' => __('Real','wc-sales-notification-pro'),\n 'fakes' => __('Fakes','wc-sales-notification-pro'),\n )\n ),\n\n array(\n 'name' => 'notification_pos',\n 'label' => __( 'Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Sale Notification Position on frontend.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'bottomleft',\n 'options' => array(\n 'topleft' =>__( 'Top Left','wc-sales-notification-pro' ),\n 'topright' =>__( 'Top Right','wc-sales-notification-pro' ),\n 'bottomleft' =>__( 'Bottom Left','wc-sales-notification-pro' ),\n 'bottomright' =>__( 'Bottom Right','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_layout',\n 'label' => __( 'Image Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Layout.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'imageleft',\n 'options' => array(\n 'imageleft' =>__( 'Image Left','wc-sales-notification-pro' ),\n 'imageright' =>__( 'Image Right','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real'\n ),\n\n array(\n 'name' => 'notification_loadduration',\n 'label' => __( 'Loading Time', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Loading duration.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '3',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '3' =>__( '3 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_time_int',\n 'label' => __( 'Time Interval', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Time between notifications.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '4',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_limit',\n 'label' => __( 'Limit', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Order Limit for notification.', 'wc-sales-notification-pro' ),\n 'min' => 1,\n 'max' => 100,\n 'default' => '5',\n 'step' => '1',\n 'type' => 'number',\n 'sanitize_callback' => 'number',\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_uptodate',\n 'label' => __( 'Order Upto', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Do not show purchases older than.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '7',\n 'options' => array(\n '1' =>__( '1 day','wc-sales-notification-pro' ),\n '2' =>__( '2 days','wc-sales-notification-pro' ),\n '3' =>__( '3 days','wc-sales-notification-pro' ),\n '4' =>__( '4 days','wc-sales-notification-pro' ),\n '5' =>__( '5 days','wc-sales-notification-pro' ),\n '6' =>__( '6 days','wc-sales-notification-pro' ),\n '7' =>__( '1 week','wc-sales-notification-pro' ),\n '10' =>__( '10 days','wc-sales-notification-pro' ),\n '14' =>__( '2 weeks','wc-sales-notification-pro' ),\n '21' =>__( '3 weeks','wc-sales-notification-pro' ),\n '28' =>__( '4 weeks','wc-sales-notification-pro' ),\n '35' =>__( '5 weeks','wc-sales-notification-pro' ),\n '42' =>__( '6 weeks','wc-sales-notification-pro' ),\n '49' =>__( '7 weeks','wc-sales-notification-pro' ),\n '56' =>__( '8 weeks','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_inanimation',\n 'label' => __( 'Animation In', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Enter Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeInLeft',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceIn' =>__( 'bounceIn','wc-sales-notification-pro' ),\n 'bounceInDown' =>__( 'bounceInDown','wc-sales-notification-pro' ),\n 'bounceInLeft' =>__( 'bounceInLeft','wc-sales-notification-pro' ),\n 'bounceInRight' =>__( 'bounceInRight','wc-sales-notification-pro' ),\n 'bounceInUp' =>__( 'bounceInUp','wc-sales-notification-pro' ),\n 'fadeIn' =>__( 'fadeIn','wc-sales-notification-pro' ),\n 'fadeInDown' =>__( 'fadeInDown','wc-sales-notification-pro' ),\n 'fadeInDownBig' =>__( 'fadeInDownBig','wc-sales-notification-pro' ),\n 'fadeInLeft' =>__( 'fadeInLeft','wc-sales-notification-pro' ),\n 'fadeInLeftBig' =>__( 'fadeInLeftBig','wc-sales-notification-pro' ),\n 'fadeInRight' =>__( 'fadeInRight','wc-sales-notification-pro' ),\n 'fadeInRightBig' =>__( 'fadeInRightBig','wc-sales-notification-pro' ),\n 'fadeInUp' =>__( 'fadeInUp','wc-sales-notification-pro' ),\n 'fadeInUpBig' =>__( 'fadeInUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipInX' =>__( 'flipInX','wc-sales-notification-pro' ),\n 'flipInY' =>__( 'flipInY','wc-sales-notification-pro' ),\n 'lightSpeedIn' =>__( 'lightSpeedIn','wc-sales-notification-pro' ),\n 'rotateIn' =>__( 'rotateIn','wc-sales-notification-pro' ),\n 'rotateInDownLeft' =>__( 'rotateInDownLeft','wc-sales-notification-pro' ),\n 'rotateInDownRight' =>__( 'rotateInDownRight','wc-sales-notification-pro' ),\n 'rotateInUpLeft' =>__( 'rotateInUpLeft','wc-sales-notification-pro' ),\n 'rotateInUpRight' =>__( 'rotateInUpRight','wc-sales-notification-pro' ),\n 'slideInUp' =>__( 'slideInUp','wc-sales-notification-pro' ),\n 'slideInDown' =>__( 'slideInDown','wc-sales-notification-pro' ),\n 'slideInLeft' =>__( 'slideInLeft','wc-sales-notification-pro' ),\n 'slideInRight' =>__( 'slideInRight','wc-sales-notification-pro' ),\n 'zoomIn' =>__( 'zoomIn','wc-sales-notification-pro' ),\n 'zoomInDown' =>__( 'zoomInDown','wc-sales-notification-pro' ),\n 'zoomInLeft' =>__( 'zoomInLeft','wc-sales-notification-pro' ),\n 'zoomInRight' =>__( 'zoomInRight','wc-sales-notification-pro' ),\n 'zoomInUp' =>__( 'zoomInUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n 'jackInTheBox' =>__( 'jackInTheBox','wc-sales-notification-pro' ),\n 'rollIn' =>__( 'rollIn','wc-sales-notification-pro' ),\n 'rollOut' =>__( 'rollOut','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_outanimation',\n 'label' => __( 'Animation Out', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Out Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeOutRight',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceOut' =>__( 'bounceOut','wc-sales-notification-pro' ),\n 'bounceOutDown' =>__( 'bounceOutDown','wc-sales-notification-pro' ),\n 'bounceOutLeft' =>__( 'bounceOutLeft','wc-sales-notification-pro' ),\n 'bounceOutRight' =>__( 'bounceOutRight','wc-sales-notification-pro' ),\n 'bounceOutUp' =>__( 'bounceOutUp','wc-sales-notification-pro' ),\n 'fadeOut' =>__( 'fadeOut','wc-sales-notification-pro' ),\n 'fadeOutDown' =>__( 'fadeOutDown','wc-sales-notification-pro' ),\n 'fadeOutDownBig' =>__( 'fadeOutDownBig','wc-sales-notification-pro' ),\n 'fadeOutLeft' =>__( 'fadeOutLeft','wc-sales-notification-pro' ),\n 'fadeOutLeftBig' =>__( 'fadeOutLeftBig','wc-sales-notification-pro' ),\n 'fadeOutRight' =>__( 'fadeOutRight','wc-sales-notification-pro' ),\n 'fadeOutRightBig' =>__( 'fadeOutRightBig','wc-sales-notification-pro' ),\n 'fadeOutUp' =>__( 'fadeOutUp','wc-sales-notification-pro' ),\n 'fadeOutUpBig' =>__( 'fadeOutUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipOutX' =>__( 'flipOutX','wc-sales-notification-pro' ),\n 'flipOutY' =>__( 'flipOutY','wc-sales-notification-pro' ),\n 'lightSpeedOut' =>__( 'lightSpeedOut','wc-sales-notification-pro' ),\n 'rotateOut' =>__( 'rotateOut','wc-sales-notification-pro' ),\n 'rotateOutDownLeft' =>__( 'rotateOutDownLeft','wc-sales-notification-pro' ),\n 'rotateOutDownRight' =>__( 'rotateOutDownRight','wc-sales-notification-pro' ),\n 'rotateOutUpLeft' =>__( 'rotateOutUpLeft','wc-sales-notification-pro' ),\n 'rotateOutUpRight' =>__( 'rotateOutUpRight','wc-sales-notification-pro' ),\n 'slideOutUp' =>__( 'slideOutUp','wc-sales-notification-pro' ),\n 'slideOutDown' =>__( 'slideOutDown','wc-sales-notification-pro' ),\n 'slideOutLeft' =>__( 'slideOutLeft','wc-sales-notification-pro' ),\n 'slideOutRight' =>__( 'slideOutRight','wc-sales-notification-pro' ),\n 'zoomOut' =>__( 'zoomOut','wc-sales-notification-pro' ),\n 'zoomOutDown' =>__( 'zoomOutDown','wc-sales-notification-pro' ),\n 'zoomOutLeft' =>__( 'zoomOutLeft','wc-sales-notification-pro' ),\n 'zoomOutRight' =>__( 'zoomOutRight','wc-sales-notification-pro' ),\n 'zoomOutUp' =>__( 'zoomOutUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n ),\n ),\n \n array(\n 'name' => 'background_color',\n 'label' => __( 'Background Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Background Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'heading_color',\n 'label' => __( 'Heading Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Heading Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'content_color',\n 'label' => __( 'Content Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Content Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'cross_color',\n 'label' => __( 'Cross Icon Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Cross Icon Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color'\n ),\n\n ),\n\n 'wcsales_fakes_data_tabs' => array(),\n 'wcsales_plugins_tabs' => array(),\n\n );\n \n return array_merge( $settings_fields );\n }", "private function get_additional_fields() {\n\n\t\ttry {\n\n\t\t\t$options = get_option( 'clerk_options' );\n\n\t\t\t$additional_fields = $options['additional_fields'];\n\n\t\t\t$fields = explode( ',', $additional_fields );\n\n\t\t\tforeach ( $fields as $key => $field ) {\n\n\t\t\t\t$fields[ $key ] = str_replace( ' ', '_', $field );\n\n\t\t\t}\n\n\t\t\tif ( ! is_array( $fields ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $fields;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$this->logger->error( 'ERROR get_additional_fields', array( 'error' => $e->getMessage() ) );\n\n\t\t}\n\n\t}", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getShopFields()\n {\n return $this->config->pluginFields;\n }" ]
[ "0.7805314", "0.77778196", "0.7426598", "0.73898333", "0.7273434", "0.7260431", "0.7170247", "0.7062616", "0.7038545", "0.69498265", "0.6913637", "0.6888897", "0.6861408", "0.68607813", "0.68584275", "0.6858261", "0.6854229", "0.6848117", "0.6836817", "0.682377", "0.68192244", "0.67951685", "0.67580795", "0.6743759", "0.67422163", "0.6709542", "0.67014676", "0.6692108", "0.6682116", "0.6671432", "0.66693723", "0.66546166", "0.6646579", "0.66461414", "0.66251177", "0.662376", "0.66206384", "0.6615107", "0.6614958", "0.66002107", "0.65972453", "0.65853345", "0.65799046", "0.65794957", "0.6570984", "0.65655226", "0.65634686", "0.6546582", "0.65421265", "0.65278184", "0.65242285", "0.65162563", "0.6510822", "0.65050113", "0.647745", "0.6476154", "0.64758605", "0.6463685", "0.6454742", "0.64531267", "0.6447876", "0.644642", "0.64198923", "0.64119786", "0.64095", "0.640882", "0.6408492", "0.6399", "0.6397818", "0.6397818", "0.6397818", "0.63955516", "0.63945997", "0.6390822", "0.6389641", "0.6384073", "0.6383388", "0.63827866", "0.6376479", "0.6374022", "0.6372041", "0.6371858", "0.63714916", "0.6362962", "0.6355276", "0.63485444", "0.63483995", "0.6346502", "0.63441044", "0.6342874", "0.63389975", "0.6338575", "0.6336271", "0.63305014", "0.6330205", "0.6325723", "0.6323542", "0.6322495", "0.63219637", "0.6320767", "0.63152355" ]
0.0
-1
Display a listing of the resource.
public function index() { $products=Products::orderBy('id','asc')->paginate(5); return view('products.index',compact('products')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('products.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $request->validate([ 'quality' => 'required', 'product' => 'required', 'description' => 'required', 'code' => 'required', 'bill' => 'required', 'date' => 'required', 'number' => 'required', 'date_out' => 'required', 'person' => 'required', 'place' => 'required', ]); Products::create($request->all()); return redirect()->route('products.index') ->with('success','Product Registered'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $products = Products::all(); $pdf = PDF::loadview('products.mostrar', compact('products')); return $pdf->stream(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $products=product::find($id); return view('products.edit',compact('product')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $request->validate([ 'quality' => 'required', 'product' => 'required', 'description' => 'required', 'code' => 'required', 'bill' => 'required', 'date' => 'required', 'number' => 'required', 'date_out' => 'required', 'person' => 'required', 'place' => 'required', ]); Products::find($id)->update($request->all()); return redirect()->route('products.index')->with('success','Actualizacion'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { Products::find($id)->delete(); return redirect()->route('products.index')->with('success','El producto fue Eliminado correctamente'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
/ | | Login Controller | | | This controller handles authenticating users for the application and | redirecting them to your home screen. The controller uses a trait | to conveniently provide its functionality to your applications. | use AuthenticatesUsers; Where to redirect users after login.
public function login1(\Illuminate\Http\Request $request) { //dd(); $mail = $request->get("Email"); $pass = $request->get("Password"); //dd(bcrypt($pass)); $use= User::Validator($mail,$pass); dd($use); //dd(Auth::attempt(['email' => $request->get("Email"), 'password' => $request->get("Password")])); if (!empty($use[0]) && $use[0]['email']!="" ){ //Auth::attempt(['email' => $email, 'password' => $pass])) { // Authentication passed... //login logic session(['userID' => $use[0]['name']]); session(['patient_id' => $use[0]['id']]); session(['email' => $mail]); session(['logintime' => time()]); session(['methode' => 'Doctor']); //parent::login($request); $hospitals=App\patientportal\modal\Hospital::all(); return redirect()->intended('index')->with('hospitals',$hospitals);; // $LoginUserId=Session::put('LoginUserId', Auth::user()['id']); // dd($LoginUserId); // session(['userID' => Auth::user()['name']]); //session(['patient_id' => Auth::user()['id']]); // session(['email' => $mail]); //session(['logintime' => time()]); // session(['methode' => 'Doctor']); // dd(Session::get('userID')); // //parent::login($request); // $hospitals = App\patientportal\modal\Hospital::all(); return redirect()->intended('index')->with('hospitals', $hospitals); //return view('index'); /** * Create a new controller instance. * * @return void */ }else{ return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function index() {\n redirect(\"auth/login\", \"refresh\");\n }", "public function do_login()\n {\n $input = array(\n 'email' => Input::get( 'username' ), // May be the username too\n 'username' => Input::get( 'username' ), // so we have to pass both\n 'password' => Input::get( 'password' ),\n 'remember' => Input::get( 'remember' ),\n );\n\n // If you wish to only allow login from confirmed users, call logAttempt\n // with the second parameter as true.\n // logAttempt will check if the 'email' perhaps is the username.\n // Get the value from the config file instead of changing the controller\n if ( Confide::logAttempt( $input, Config::get('confide::signup_confirm') ) ) \n {\n // Redirect the user to the URL they were trying to access before\n // caught by the authentication filter IE Redirect::guest('user/login').\n // Otherwise fallback to '/'\n // Fix pull #145\n return Redirect::intended('/member'); // change it to '/admin', '/dashboard' or something\n }\n else\n {\n $user = new User;\n\n // Check if there was too many login attempts\n if( Confide::isThrottled( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.too_many_attempts');\n }\n elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.not_confirmed');\n }\n else\n {\n $err_msg = Lang::get('confide::confide.alerts.wrong_credentials');\n }\n \n return Redirect::action('UserController@login')\n ->withInput(Input::except('password'))\n ->with( 'error', $err_msg );\n }\n }", "public function loginAction()\n {\n // URL after successfull login.\n $redirectUrl = (string) $this->params()->fromQuery('redirectUrl', '');\n if (strlen($redirectUrl) > 2048) {\n throw new \\Exception(\"Too long redirectUrl argument passed\");\n }\n // Check if we do not have users in database at all. If so, create\n // the 'default' user.\n $this->userManager->createDefaultUserIfNotExists();\n // Create login form\n $form = $this->FormUsersForm()->getLoginForm();\n $form->get('submit')->setLabel('Sign In');\n $form->get('redirect_url')->setValue($redirectUrl);\n // Store login status.\n $isLoginError = false;\n // Check if user has submitted the form\n if ($this->getRequest()->isPost()) {\n // Fill in the form with POST data\n $data = $this->params()->fromPost();\n $form->setData($data);\n // Validate form\n if ($form->isValid()) {\n // Get filtered and validated data\n $data = $form->getData();\n if (! array_key_exists('remember_me', $data)) {\n $data['remember_me'] = null;\n }\n // Perform login attempt.\n $result = $this->authManager->login($data['identity_field'], $data['password'], $data['remember_me']);\n\n // Check result.\n if ($result->getCode() == Result::SUCCESS) {\n // Get redirect URL.\n $redirectUrl = $this->params()->fromPost('redirect_url', '');\n if (! empty($redirectUrl)) {\n // The below check is to prevent possible redirect attack\n // (if someone tries to redirect user to another domain).\n $uri = new Uri($redirectUrl);\n if (! $uri->isValid() || $uri->getHost() != null)\n throw new \\Exception('Incorrect redirect URL: ' . $redirectUrl);\n }\n // If redirect URL is provided, redirect the user to that URL;\n // otherwise redirect to Home page.\n if (empty($redirectUrl)) {\n return $this->redirect()->toRoute('home');\n } else {\n $this->redirect()->toUrl($redirectUrl);\n }\n } else {\n $isLoginError = true;\n }\n }\n }\n return new ViewModel([\n 'form' => $form,\n 'isLoginError' => $isLoginError,\n 'redirectUrl' => $redirectUrl\n ]);\n }", "public function login()\n\t{\n\t\t$validator = Validator::make(Input::all(), array('email' => 'required','password' => 'required'));\n\t\t\n\t\t//Si el formulario valida\n\t\tif(! $validator->fails())\n\t\t{\n\n\t\t\t//Autenticar al usuario según el campo email\n\t\t\t$auth = array('email' => Input::get('email'), 'password' => Input::get('password'));\n\n\t\t\t//Si logramos autenticar correctamente\n\t\t\tif( Auth::attempt( $auth ) )\n\t\t\t{\n\t\t\t\t//Redireccionar al perfil del usuario\n\t\t\t\treturn Redirect::route('home' );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSession::flash( 'message', 'El nombre de usuario y la contraseña no coinciden, por favor intenta de nuevo.' );\n\t\t\t\t//Redireccionar al home\n\t\t\t\treturn Redirect::route('index', array('message' => \"ERROR-IN\"));//->withErrors($validator)->withInput();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Redireccionar hacia el home, incluyendo mensajes de error de validador\n\t\t\t//return Redirect::route('index')->withErrors($validator)->withInput();\n\t\t\treturn Redirect::route('index', array('message' => \"ERROR\"));\n\t\t}\n\t}", "public function login()\n {\n\n \t// only login if not already logged in\n \tif (Auth::guest())\n \t{\n \t\treturn view('login');\n\n \t}\n \t\n \t// send user to root if already logged in\n \treturn redirect('/');\n\n }", "public function loginAction() {\n if ($user = $this->identity()) {\n\n return $this->redirect()->toRoute('user-index',array('action' => 'dashboard'));\n }\n\n\n return new ViewModel();\n }", "public function login()\n {\n if( Confide::user() )\n {\n // If user is logged, redirect to internal \n // page, change it to '/admin', '/dashboard' or something\n return Redirect::to('/member');\n }\n else\n {\n return View::make(Config::get('confide::login_form'));\n }\n }", "public function index()\n {\n try\n {\n $data = $this->dispatch(\n new DisplayLogIn()\n );\n }\n catch (NotAuthorizedException $e)\n {\n // user is not logged in yet\n return view('login');\n }\n catch (\\Exception $e)\n {\n return view('login');\n }\n\n // direct to home\n return redirect()->route('home', $data);\n }", "public function loginAction() {\n $user_session = new Container('user');\n $user_session->username = 'Andy0708';\n \n return $this->redirect()->toRoute('welcome');\n }", "public function login()\n {\n $formLoginEnabled = true;\n $this->set('formLoginEnabled', $formLoginEnabled);\n\n $this->request->allowMethod(['get', 'post']);\n $result = $this->Authentication->getResult();\n // regardless of POST or GET, redirect if user is logged in\n if ($result->isValid()) {\n // redirect to /users after login success\n // TODO: redirect to /users/profile after login success [cakephp 2.x -> 4.x migration]\n $redirect = $this->request->getQuery('redirect', [\n 'controller' => 'Admin',\n 'action' => 'users/index', \n ]);\n\n return $this->redirect($redirect);\n }\n // display error if user submitted and authentication failed\n if ($this->request->is('post') && !$result->isValid()) {\n $this->Flash->error(__('Invalid username or password'));\n }\n }", "public function login() {\n if ($this->request->is('post')) {\n if ($this->Auth->login()) {\n return $this->redirect($this->Auth->redirectUrl());\n }\n $this->Flash->error(__('Invalid username or password, try again'));\n }\n\n $this->render('index');\n }", "public function index() {\n // if user is logged in redirect to main-page, if not show the view\n if (Session::userIsLoggedIn()) {\n Redirect::to('login/loginHome');\n } else {\n $this->View->render('login/index');\n }\n }", "public function loginHome() {\n Auth::checkAuthentication();\n Redirect::to('index/about');\n }", "public function doLogin()\n\t{\n $userData = array(\n 'username' => \\Input::get('username'),\n 'password' => \\Input::get('password'),\n );\n\t\t\n\t\t$rememberMe = \\Input::get('remember-me');\n\t\t\n // Declare the rules for the form validation.\n $rules = array(\n 'username' => 'Required',\n 'password' => 'Required'\n );\n\n // Validate the inputs.\n $validator = \\Validator::make($userData, $rules);\n\n // Check if the form validates with success.\n if ($validator->passes())\n {\n // Try to log the user in.\n if (\\Auth::attempt($userData, (bool)$rememberMe))\n {\n // Redirect to dashboard\n\t\t\t\treturn \\Redirect::intended(route('dashboard'));\n }\n else\n {\n // Redirect to the login page.\n return \\Redirect::route('login')->withErrors(array('password' => \\Lang::get('site.password-incorrect')))->withInput(\\Input::except('password'));\n }\n }\n\n // Something went wrong.\n return \\Redirect::route('login')->withErrors($validator)->withInput(\\Input::except('password'));\n\t}", "public function action_login(){\n\t\t$username = Input::get('username');\n\t\t$password = Input::get('password');\n\n\t\t//check username and password on database\n\t\t$users = DB::table('users')\n\t\t->where('username','=',$username)\n\t\t->where('password','=',$password)\n\t\t->get();\n\n\t\tif($users != NULL){\n\t\t\treturn View::make('home.registered')\n\t\t\t->with('username', $username);\n\t\t}else {\n\t\t\t//TODO: put user in the registration page\n\t\t\t$errorMessage = \"Sorry, you are not registered!\";\n\t\t\treturn View::make('home.login')\n\t\t\t->with('loginMessage',$errorMessage);\n\t\t}\n\t}", "public function login()\n\t{\t\t\n\t\t$credentials['email'] = Input::get('email');\n\t\t$credentials['password'] = Input::get('password');\n\t\t$remember = (is_null(Input::get('remember'))?false:true);\t\t\n\n\t\t$user = $this->repo->login($credentials, $remember);\t\t\n\t\tif (!$user)\n\t\t{\n\t\t\tRedirect::route('login')->withInput(Input::except('password'));\n\t\t}\n\t\tif(Session::has('redirect'))\n\t\t{\n\t\t\t$url = Session::get('redirect');\n\t\t\tSession::forget('redirect');\t\t\t\n\t\t\treturn Redirect::to(Session::get('redirect'))->with('afterlogin', true);\t\n\t\t}\n\t\treturn Redirect::route('home')->with('afterlogin', true);\n\t}", "function login()\n {\n // run the login() method in the login-model, put the result in $login_successful (true or false)\n $login_model = $this->loadModel('Login');\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = $login_model->login();\n\n // check login status\n if ($login_successful) {\n // if YES, then move user to dashboard/index\n // please note: this is a browser-redirection, not a rendered view\n header('location: ' . URL . 'dashboard/index');\n } else {\n // if NO, then show the login/index (login form) again\n $this->view->render('login/index');\n }\n }", "public function doLogin() {\n //Make validation for login\n $validator = Validator::make(Input::all(), array(\n 'username' => 'required|alphaNum|min:2',\n 'password' => 'required|alphaNum|min:4'\n ));\n //Check validation for login form\n if ($validator->fails()) {\n //Get all error message array\n $messages = $validator->messages()->all(\"<li>:message</li>\");\n //Convert all error in a String (HTML list)\n $error = \"<ul>\". implode(\"\", $messages).\"</ul>\";\n //Redirecto to login with error\n return Redirect::to('/user/login')->with('error', $error)->withInput(array(\"username\"=>Input::get('username')));\n } else {\n //Get data from form\n $data = array(\"username\" => Input::get(\"username\"), \"password\" => Input::get(\"password\"));\n //Try login\n if (Auth::attempt($data)) {\n //If login is correct, redirecto to user's profile\n return Redirect::intended(action('UserController@profile', array('username' => Auth::user()->username )));\n } else {\n //Username or password incorrect, redirecto to login form\n return Redirect::to('/user/login')->with('error', trans('app.error_signin') )->withInput(array(\"username\"=>Input::get('username')));\n }\n }\n }", "public function index()\n\t{\n\t\tif(Auth::check()) {\n\t\t\treturn Redirect::to('admin');\n\t\t}\n\t\t\n\t\treturn View::make('login.index');\n\t}", "public function login()\r\n\t{\r\n\t\t$this->is_logged_in();\r\n\r\n\t\tif( $this->is_logged_in() )\r\n\t\t\r\n\t\t\treturn redirect('dashboard','refresh');\r\n\t\t\r\n\t\t// Method should not be directly accessible\r\n\t\tif( $this->uri->uri_string() == 'examples/login')\r\n\t\t\tshow_404();\r\n\r\n\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\r\n\t\t\t$this->require_min_level(1);\r\n\r\n\t\t$this->setup_login_form();\r\n\r\n\r\n\treturn $this->load->view('users/login');\r\n\r\n\r\n\r\n\t}", "public function loginAction()\n {\n // If user has already signed in, redirect to home page\n if( $this->authService->hasIdentity() ){\n return $this->redirect()->toRoute('home');\n }\n // Define layout for this\n $this->layout()->setTemplate('layout/auth');\n // Retrieve the redirect URL (if passed). We will redirect the user to this\n // URL after successfull login.\n $redirectUrl = (string)$this->params()->fromQuery('redirectUrl', '');\n if (strlen($redirectUrl)>2048) {\n throw new \\Exception(\"Too long redirectUrl argument passed\");\n }\n // Create login form\n $form = new LoginForm();\n $form->get('redirect_url')->setValue($redirectUrl);\n \n // Store login status.\n $isLoginError = false;\n \n // Check if user has submitted the form\n if ($this->getRequest()->isPost()) {\n // Fill in the form with POST data\n $data = $this->params()->fromPost();\n $form->setData($data);\n // Validate form\n if( $form->isValid() ) {\n \n // Get filtered and validated data\n $data = $form->getData();\n $login = $data['user'];\n \n // Perform login attempt.\n /** @var \\Zend\\Authentication\\Adapter\\DbTable $adapter */\n $adapter = $this->authService->getAdapter();\n $adapter->setIdentity( $login );\n $adapter->setCredential( md5($data['password']) );\n $adapter->getDbSelect()->where( ['active = ?' => 1] ); // MUST be an active account\n //echo ($adapter->getDbSelect()->getSqlString());\n $result = $this->authService->authenticate();\n \n // Check result.\n if ($result->isValid()) {\n if( $data['remember_me'] ) {\n // Remember for 7 days\n $session = new SessionManager(); \n // Session cookie will expire in 1 month (7 days).\n $session->rememberMe(60*60*24*7); \n }\n // Update last login date and store information in session\n $this->updateLastLogin($login);\n // Get redirect URL.\n $redirectUrl = $this->params()->fromPost('redirect_url', '');\n if (!empty($redirectUrl)) {\n // The below check is to prevent possible redirect attack\n // (if someone tries to redirect user to another domain).\n $uri = new Uri($redirectUrl);\n if (!$uri->isValid() || $uri->getHost()!=null)\n throw new \\Exception('Incorrect redirect URL: ' . $redirectUrl);\n }\n // If redirect URL is provided, redirect the user to that URL;\n // otherwise redirect to Home page.\n if(empty($redirectUrl)) {\n return $this->redirect()->toRoute('home');\n } else {\n $this->redirect()->toUrl($redirectUrl);\n }\n } else {\n $isLoginError = true;\n }\n } else {\n $isLoginError = true;\n } \n } \n return new ViewModel([\n 'form' => $form,\n 'isLoginError' => $isLoginError,\n 'redirectUrl' => $redirectUrl\n ]); \n }", "public function index ()\n {\n if (Session::has('_user_')) {\n return redirect()->route('admin.dashboard');\n // return redirect()->intended('dashboard');\n } else {\n return view('auth.login', []);\n }\n }", "public function index()\r\n\t{\r\n\t\tif( $this->is_logged_in() )\r\n\t\t{\r\n\t\t\treturn redirect('dashboard','refresh');\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\t return redirect('login','refresh');\r\n\t\t}\r\n\t}", "public function login()\n {\n require_once(app_path().'/config/id.php');\n\n // if user is already logged in, redirect to current page\n if (Session::has('user'))\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n }\n\n // else redirect user to CS50 ID\n else\n {\n //store url in session\n Session::put('redirect', URL::previous());\n\n return Redirect::to(CS50::getLoginUrl(TRUST_ROOT, RETURN_TO));\n }\n }", "public function login()\n\t{\n\t\t$this->view('/');\n\t}", "public function index()\n {\n if ($this->input->post()) {\n $this->m_user->doLogin();\n } else {\n redirect(site_url('auth/login'));\n }\n }", "public function actionIndex()\n {\n $model = new UserLoginForm();\n\n if (app()->user->isGuest == false && app()->user->identity->email != false) {\n return $this->redirect(['dashboard/index']);\n }\n\n /* if form is submitted */\n if ($model->load(request()->post()) && $model->login()) {\n return $this->redirect(['dashboard/index']);\n }\n\n app()->view->title = t('app', 'Admin Login') . ' - ' . options()->get('app.settings.common.siteName', 'EasyAds');\n\n /* custom body class */\n $this->view->params['bodyClasses'] .= ' login-page';\n\n /* render the view */\n return $this->render('index', [\n 'model' => $model,\n ]);\n }", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "public function login()\n {\n $login = new Login();\n\n $path = '/inloggen';\n if (CSRF::validate() && $login->check()) {\n // try to send the user to the reservation form or sign up for meet the expert page\n $path = Session::get('path');\n unset($_SESSION['path']);\n\n if (empty($path)) {\n $path = '/';\n }\n }\n\n return new RedirectResponse($path);\n }", "public function getLogin() {\n\t\tif (Auth::check()) {\n\t\t\treturn Redirect::to('/');\n\t\t}\n\n\t\t$user = new User;\n\t\treturn View::make('login')->with('user', $user);\n\t}", "public function login()\n\t{\n\t\treturn view(\"auth/login\", [\n\t\t\t'title' => \"Login\"\n\t\t]);\n\t}", "public function login(){\n\t\tif(Session::get('admin_user_id'))\n\t\t\treturn redirect('/admin');\n\t\telse\n\t\t\treturn view('admin.login');\n\t}", "function login() {\n\n $this->redirect(\"/staff/users/alllogin\");\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\t\t\t\n\t\t}\n\t\t// Redirect the logged in user to respective pages\n\t\t$this->setLoginRedirects();\n\t}", "public function Login(){\n \t$usuarios=new UsuariosModel();\n \n \t//Conseguimos todos los usuarios\n \t$allusers=$usuarios->getLogin();\n \t \n \t//Cargamos la vista index y l e pasamos valores\n \t$this->view(\"Login\",array(\n \t\t\t\"allusers\"=>$allusers\n \t));\n }", "public function login(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t/*if($this->Auth->login())\n\t\t\t{\n\t\t\t\tif($current_user['role'] == 'admin')\n\t\t\t\t{\n\t\t\t\t\treturn $this->redirect(array('controller' => 'teams','action' => 'index'));\n\t\t\t\t}\n\t\t\t} */\n\t\t\tif($this->Auth->login())\n\t\t\t{\n\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t}\n\t\t\t$this->Session->setFlash('Usuario incorrecto');\n\t\t}\n\t}", "public function loginAction(LoginUser $request)\n {\n\n try {\n\n if (Auth::guard('user')->attempt(['email' => $request->email, 'password' => $request->password, 'role' => ['user']])) {\n\n return redirect()->route('user.homeifLogin')->with('message-success', 'User is logged in Successfully.');\n } else {\n\n return redirect()->back()->with('message-error', 'User is invalid');\n }\n } catch (Exception $e) {\n\n return redirect()->back()->with('message-error', 'Something Went Wrong. Please try after some time.');\n }\n }", "public function index()\n {\n if (Auth::check()) {\n //return redirect('/dashboard');\n return view('auth.login');\n } else {\n return view('auth.login');\n }\n }", "public function authenticateAction() {\n\t\ttry {\n $this->authenticationManager->authenticate();\n $this->redirect('index', 'Overview');\n } catch (\\TYPO3\\Flow\\Security\\Exception\\AuthenticationRequiredException $exception) {\n\t\t\t$this->addFlashMessage('Wrong username or password.', 'Login failed', \\TYPO3\\Flow\\Error\\Message::SEVERITY_ERROR);\n $this->redirect('index');\n }\n\t}", "public function postLogin() {\n $input = array(\n 'email' => Input::get( 'email' ), // May be the username too\n 'username' => Input::get( 'email' ), // May be the username too\n 'password' => Input::get( 'password' ),\n 'remember' => Input::get( 'remember' ),\n );\n\n // If you wish to only allow login from confirmed users, call logAttempt\n // with the second parameter as true.\n // logAttempt will check if the 'email' perhaps is the username.\n // Check that the user is confirmed.\n if ( Confide::logAttempt( $input, true ) )\n {\n return Redirect::intended('/');\n }\n else\n {\n // Check if there was too many login attempts\n if ( Confide::isThrottled( $input ) ) {\n $err_msg = Lang::get('confide::confide.alerts.too_many_attempts');\n } elseif ( $this->user->checkUserExists( $input ) && ! $this->user->isConfirmed( $input ) ) {\n $err_msg = Lang::get('confide::confide.alerts.not_confirmed');\n } else {\n $err_msg = Lang::get('confide::confide.alerts.wrong_credentials');\n }\n\n return Redirect::to('user/login')\n ->withInput(Input::except('password'))\n ->with( 'error', $err_msg );\n }\n }", "public function login() {\n if(Auth::check()){\n return redirect()->intended('/');\n }else {\n return view('auth.login');\n }\n }", "public function login()\n {\n //die if application login is requested outside of authorised domains\n $domain = str_replace(['http://', 'https://'], \"\", Router::fullBaseUrl());\n $isAllowed = $this->Settings->isDomainWhitelisted($domain);\n if (!$isAllowed) {\n $this->response = $this->response->withType('text/plain');\n $this->response = $this->response->withStringBody('Not Allowed!');\n return $this->response;\n }\n\n if (Cache::read('first_run', 'quick_burn') === true) {\n return $this->redirect(['controller' => 'installers', 'action' => 'configure']);\n }\n\n $dbDriver = ($this->Users->getConnection())->getDriver();\n if ($dbDriver instanceof Sqlite) {\n $caseSensitive = true;\n } else {\n $caseSensitive = false;\n }\n $this->set('caseSensitive', $caseSensitive);\n\n $this->viewBuilder()->setLayout('login');\n\n //see if they are already logged in\n if ($this->Auth->user()) {\n return $this->redirect($this->Auth->redirectUrl());\n }\n\n $user = $this->Users->newEntity();\n\n if ($this->request->is('post')) {\n\n //allow switching between email and username for authentication\n if (Validation::email($this->request->getData('username'))) {\n $this->Auth->setConfig('authenticate', [\n 'Form' => [\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ]);\n $this->Auth->constructAuthenticate();\n } else {\n $this->Auth->setConfig('authenticate', [\n 'Form' => [\n 'fields' => ['username' => 'username', 'password' => 'password']\n ]\n ]);\n $this->Auth->constructAuthenticate();\n }\n\n $userDetails = $this->Auth->identify();\n\n //check if need to reset password\n if ($userDetails) {\n if ($this->Users->isPasswordExpired($userDetails)) {\n $this->Flash->warning(__('Your password has expired, please enter a new password.'));\n $options = [\n 'expiration' => new FrozenTime('+ 1 hour'),\n 'user_link' => $userDetails['id'],\n ];\n $autoLoginToken = $this->Seeds->createSeedReturnToken($options);\n\n $options = [\n 'url' => ['controller' => 'users', 'action' => 'reset', '{token}', $autoLoginToken],\n 'expiration' => new FrozenTime('+ 1 hour'),\n 'user_link' => $userDetails['id'],\n ];\n $token = $this->Seeds->createSeedReturnToken($options);\n\n return $this->redirect(['controller' => 'users', 'action' => 'reset', $token, $autoLoginToken]);\n }\n }\n\n //login process\n if ($userDetails) {\n $accountStatus = $this->Users->validateAccountStatus($userDetails);\n if ($accountStatus) {\n $this->Auth->setUser($userDetails);\n $this->Auditor->trackLogin($userDetails);\n return $this->redirect($this->Auth->redirectUrl());\n } else {\n $messages = $this->Users->getAuthError();\n foreach ($messages as $message) {\n $this->Flash->error($message);\n }\n }\n } else {\n $this->Flash->error(__('Invalid username or password, try again.'));\n }\n }\n\n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n\n return null;\n }", "public function redirectLogin()\n {\n return redirect()->to('/login');\n }", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "public function login()\n\t{\n\t\tif ($this->isPostRequest()) { \n\t\t $validator = $this->getLoginValidator();\n \n\t\t if ($validator->passes()) { \n\t\t \t$credentials = $this->getLoginCredentials();\n\n\t\t\t if (Auth::attempt($credentials, (Input::get(\"rememberme\") == 'true') ? true : false)) {\n\t\t\t \treturn Redirect::to(\"admin/dashboard\");\n\t\t\t }\t\n\t\t\t \t\t\n\t\t\t return Redirect::back()->withErrors(array(\n\t\t\t \"password\" => [\"Username or Password is incorrect. Please try again.\"]\n\t\t\t ));\n\t\t \t} else { \n\t\t\t return Redirect::back()->withInput()->withErrors($validator);\n\t\t\t }\n\t\t\t\t\t\n\t\t}\n\n\t\tif(Auth::check()){\n\t\t\treturn Redirect::to(\"admin/dashboard\");\n\t\t}\n\n\t\treturn View::make('admin.login');\n\t}", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "public function login()\n\t{\n\t\treturn View::make('user.login');\n\t}", "function authenticate()\n {\n if(!$this->Session->check('User'))\n {\n $this->redirect(array('controller' => 'Users', 'action' => 'login_form'));\n exit();\n }\n }", "public function maverickLoginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authMaverickLogin' );\n }", "function login() {\n $this->layout = \"no_header\";\n $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', \"home\");\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "public function actionLogin()\n {\n // user is logged in, he doesn't need to login\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n // get setting value for 'Login With Email'\n $lwe = Yii::$app->params['lwe'];\n\n // if 'lwe' value is 'true' we instantiate LoginForm in 'lwe' scenario\n $model = $lwe ? new LoginForm(['scenario' => 'lwe']) : new LoginForm();\n\n // monitor login status\n $successfulLogin = true;\n\n // posting data or login has failed\n if (!$model->load(Yii::$app->request->post()) || !$model->login()) {\n $successfulLogin = false;\n }\n\n // if user's account is not activated, he will have to activate it first\n if ($model->status === User::STATUS_INACTIVE && $successfulLogin === false) {\n Yii::$app->session->setFlash('error', Yii::t('app', \n 'You have to activate your account first. Please check your email.'));\n return $this->refresh();\n } \n\n // if user is not denied because he is not active, then his credentials are not good\n if ($successfulLogin === false) {\n return $this->render('login', ['model' => $model]);\n }\n\n // login was successful, let user go wherever he previously wanted\n return $this->goBack();\n }", "public function index()\n {\n return view('user.login');\n }", "public function login()\r\n { \r\n return view('user.login');\r\n }", "public function doLogin()\r\n {\r\n $input = Request::all();\r\n \r\n if (Auth::attempt(['username' => $input['email'], 'password' => $input['password'], 'deleted_at' => null, 'user_type' => 1]))\r\n {\r\n \r\n $user = Auth::user();\r\n Session::set('current_user_id',$user->id);\r\n return Redirect::intended('/dashboard');\r\n }\r\n else { \r\n Session::flash(\r\n 'systemMessages', ['error' => Lang::get('pages.login.errors.wrong_credentials')]\r\n );\r\n return Redirect::action('UserController@login')\r\n ->withInput(Request::except('password'));\r\n }\r\n }", "public function actionLogin()\n\t{\n\t\t$model=new LoginForm;\n\t\t// display the login form\n\t\t$user = new Usuario();\n\t\t// if it is ajax validation request\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='login-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\t\n\t\t//si se cargo el formulario\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t//le paso los atributos del formulario al modelo\n\t\t\t$model->attributes=$_POST['LoginForm'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\t\n\t\t\tif( $model->login() && $model->validate()){ \n\t\t\t\t$user = Usuario::model()->find('email=?',array($model->email));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tYii::app()->user->setState('estadousuario', $user);\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\n\t\t$this->render('index',array('model'=>$model,'user'=>$user));\n\t\t\n\t\t\n\t}", "public function indexAction()\n {\n $redirectionUri = $this->backendRedirectionService->getAfterLoginRedirectionUri($this->request);\n if ($redirectionUri === null) {\n $redirectionUri = $this->uriBuilder->uriFor('index', array(), 'Login', 'Neos.Neos');\n }\n $this->redirectToUri($redirectionUri);\n }", "public function actionLogin() {\n\t\t// If user is already logged in, go to \"todos\" page\n\t\tif( Yii::app()->user->isGuest===false )\n\t\t\t$this->redirect(array('todo/index'));\n\t\t\n\t\t$loginModel = new LoginForm();\n\t\t$registerModel = new RegisterForm();\n\t\t\n\t\t// Check if login data is present & login if so\n\t\tif( isset($_POST['LoginForm'])===true ) {\n\t\t\t// Populate login model with post data.\n\t\t\t$loginModel->attributes = $_POST['LoginForm'];\n\t\t\t\n\t\t\t// validate user input and redirect to the todo page\n\t\t\tif( $loginModel->validate()===true && $this->login($_POST['LoginForm'])===true )\n\t\t\t\t$this->redirect(array('todo/index'));\n\t\t}\n\t\t\n\t\t// Check if register data is present & register a new user if so.\n\t\tif( isset($_POST['RegisterForm'])===true ) {\n\t\t\t// Populate register model with post data.\n\t\t\t$registerModel->attributes = $_POST['RegisterForm'];\n\t\t\t\n\t\t\t// Validate the model & create a new user if the validation was ok.\n\t\t\tif( $registerModel->validate()===true ) {\n\t\t\t\t$user = new User();\n\t\t\t\t// User can be populated with the register form's post data since the\n\t\t\t\t// attribute names match together.\n\t\t\t\t$user->attributes = $_POST['RegisterForm'];\n\t\t\t\t\n\t\t\t\t// Save the user & login. Then redirect to the \"todos\" page.\n\t\t\t\tif( $user->save()===true && $this->login($_POST['RegisterForm'])===true )\n\t\t\t\t\t$this->redirect(array('todo/index'));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Render the login page.\n\t\t$this->render('login', array(\n\t\t\t'loginModel'=>$loginModel,\n\t\t\t'registerModel'=>$registerModel,\n\t\t));\n\t}", "public function index()\n {\n //加载模板,登录页面\n return view('User.login');\n }", "public function indexAction()\n {\n if ($this->auth->hasIdentity()) {\n $this->response->redirect();\n }\n\n $form = new LoginForm();\n\n if ($this->request->isPost() == true) {\n try {\n if ($form->isValid($this->request->getPost()) == true) {\n $this->auth->login([\n 'login' => $this->request->getPost('login'),\n 'password' => $this->request->getPost('password')\n ]);\n\n $this->dispatcher->forward([\n 'controller' => 'index',\n 'action' => 'index'\n ]);\n }\n } catch (AuthException $e) {\n $this->flash->error($e->getMessage());\n }\n }\n\n $this->view->setVar('form', $form);\n }", "public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }", "public function index() {\n return view('auth.login');\n }", "public function index() {\n return view('auth.login');\n }", "public function index()\n {\n return view('auth/login');\n }", "public function login() {\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\treturn $this->redirect($this->Auth->redirect());\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password, try again'));\n\t\t\t}\n\t\t}\n\t}", "public function login(Request $request){\n\t\t$credentials = $request->only(['email','password']);\n\t\tif(!Auth::attempt($credentials)){\n\t\t\treturn redirect()->back()->withErrors('Usuário e/ou senha incorretos');\n\t\t}\n\t\t$usuario = $request->user();\n\t\t$request->session()->put('usuario', $usuario);\n\t\t\n\t\treturn redirect()->route('listarCategorias');\n\t}", "public function postLogin()\n {\n $input = array(\n 'email' => Input::get( 'email' ), // May be the username too\n 'username' => Input::get( 'email' ), // so we have to pass both\n 'password' => Input::get( 'password' ),\n 'remember' => Input::get( 'remember' ),\n );\n\n // If you wish to only allow login from confirmed users, call logAttempt\n // with the second parameter as true.\n // logAttempt will check if the 'email' perhaps is the username.\n if ( Confide::logAttempt( $input ) )\n {\n // If the session 'loginRedirect' is set, then redirect\n // to that route. Otherwise redirect to '/'\n $r = Session::get('loginRedirect');\n if (!empty($r))\n {\n Session::forget('loginRedirect');\n return Redirect::to($r);\n }\n\n return Redirect::to('/'); // change it to '/admin', '/dashboard' or something\n }\n else\n {\n $user = new User;\n\n // Check if there was too many login attempts\n if( Confide::isThrottled( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.too_many_attempts');\n }\n elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n {\n $err_msg = Lang::get('confide::confide.alerts.not_confirmed');\n }\n else\n {\n $err_msg = Lang::get('confide::confide.alerts.wrong_credentials');\n }\n\n return Redirect::to('user/login')\n ->withInput(Input::except('password'))\n ->with( 'error', $err_msg );\n }\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->redirect([ 'site/index' ]);\n }\n $referer = \\Yii::$app->request->get('referer', \\Yii::$app->request->referrer);\n if (empty( $referer )) {\n $referer = Url::to([ 'cabinet/main' ], true);\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return Yii::$app->getResponse()\n ->redirect($referer);\n } else {\n return $this->render(\n 'login',\n [\n 'model' => $model,\n ]\n );\n }\n }", "public function actionLogin()\n\t{\n\t\tif ($this->getUser()->isLoggedIn())\n\t\t\t$this->redirect('Administration:default');\n\t}", "public function authenticated()\n {\n $user = $this->Auth->identify();\n if ($user) {\n $this->Auth->setUser($user);\n\n return $this->redirect($this->Auth->redirectUrl());\n }\n\n return $this->redirect($this->Auth->getConfig('loginAction'));\n }", "public function login() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['login'])){\n // try verifying the user\n if($this->User->login($_POST['username'], $_POST['password'])) {\n session_write_close();\n header(\"Location: \".app::site_url(array(config::get('default_controller'), 'index')));\n exit(0);\n } else {\n $flash = \"That username and/or password is not valid.\";\n }\n }\n return array(\n 'flash' => $flash,\n 'title' => 'Login'\n );\n }", "public function actionLogin() {\n $model = new LoginForm;\n // collect user input data\n if (Yii::app()->user->isGuest) {\n if ($this->getPost('LoginForm') != null) {\n $model->setAttributes($this->getPost('LoginForm'));\n // validate user input and redirect to the previous page if valid\n $validate = $model->validate();\n $login = $model->login();\n if ($validate && $login) {\n if (Yii::app()->session['Rol'] == \"Cliente\") {\n if (Yii::app()->session['Usuario']->Activo == 1)\n $this->redirect(Yii::app()->user->returnUrl);\n else\n $this->redirect('Logout');\n }else {\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }\n }\n // display the login form\n $this->render('login', array('model' => $model));\n } else {\n $this->redirect(Yii::app()->homeUrl);\n }\n }", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function index()\n {\n if (Session::has('admin.id'))\n return redirect('/dashboard');\n\n \treturn view('backend.login');\n }", "public function index()\n {\n if ($this->session->userdata('email')) {\n redirect('user');\n }\n // prepare data of document\n $data['title'] = 'Login';\n // set rules form validation\n $this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email');\n $this->form_validation->set_rules('password', 'Password', 'required|trim');\n // form validation caught illegal action\n if ($this->form_validation->run() == false) {\n // load all views registration\n $this->load->view('templates/auth_header', $data);\n $this->load->view('auth/login');\n $this->load->view('templates/auth_footer');\n }\n // form validation uncaught illegal action\n else {\n $this->Auth_model->loginUser();\n }\n }", "public function index()\n {\n return view('auth.login');\n }", "public function userLoginIndex() {\n return view('login');\n }", "function redirectLogin()\n\t{\n\t\tredirect('auth/login');\n\t}", "public function index() {\n $this->login();\n }", "public function doLogin() {\n $rules = array(\n 'email' => 'required|email', // make sure the email is an actual email\n 'password' => 'required|alphaNum|min:3' // password can only be alphanumeric and has to be greater than 3 characters\n );\n\n // run the validation rules on the inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n\n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('login')\n ->withErrors($validator) // send back all errors to the login form\n ->withInput(Input::except('password')); // send back the input (not the password) so that we can repopulate the form\n } \n else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n\n // attempt to do the login\n if (Auth::attempt($userdata)) {\n\n // validation successful!\n // redirect them to the secure section or whatever\n // return Redirect::to('secure');\n // for now we'll just echo success (even though echoing in a controller is bad)\n echo 'SUCCESS!';\n\n } \n else { \n // validation not successful, send back to form \n return Redirect::to('login');\n }\n }\n }", "public function doLogin()\n {\n $rules = array(\n 'email' => 'required|email',\n 'password' => 'required|alphaNum|min:3'\n );\n \n // validate inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n \n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('/')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n \n // attempt to do the login\n $response = $this->requestLoginApi($userdata);\n\n if ($response->status == true) {\n // validation successful, save cookie!\n return Redirect::to('showsearch')\n ->withCookie(Cookie::make('accessToken', $response->data->accessToken, 60))\n ->with('message', 'Auth OK! (Token created)');\n \n } else {\n // validation fail, send back to login form\n return Redirect::to('/')\n ->withErrors(\"Invalid credentials\")\n ->withInput(Input::except('password'));\n }\n }\n }", "public function login()\n\t{\n\t \tif(User::all()->count() == 0){\n\t \t\t$users = [\n\t\t\t [\n\t\t\t \t\"SEG_Usuarios_Nombre\" => \"Administrador\",\n\t\t\t \"SEG_Usuarios_Username\" => \"admin\",\n\t\t\t \"SEG_Usuarios_Contrasena\" => Hash::make(\"hola123\"),\n\t\t\t \"SEG_Usuarios_Email\" => \"[email protected]\",\n\t\t\t \"SEG_Usuarios_Activo\" => true,\n\t\t\t \"SEG_Roles_SEG_Roles_ID\" => 1,\n\t\t\t ]\n\t\t ];\n\t\t \n\t\t foreach ($users as $user) {\n\t\t User::create($user);\n\t\t }\n\t \t}\n\n\t \t//Autentica\n\t if ($this->isPostRequest()) {\n\t \t$validator = $this->getLoginValidator();\t \n\t \tif ($validator->passes()) {\n\t\t $credentials = $this->getLoginCredentials();\n\t\t $credentials[\"SEG_Usuarios_Activo\"] = 1; // Agrega al array el elemento para verificar si usuario esta activo\n\t\t if (Auth::attempt($credentials)) {\n\n\t\t \tif (Auth::user()->SEG_Usuarios_FechaDeExpiracion == null) {\n\t\t\t\t\t\treturn Redirect::to('Auth/Cambio');\n\t\t\t\t\t}\n\n\t\t \t$datetimeUser = new DateTime(Auth::user()->SEG_Usuarios_FechaDeExpiracion);\n\t\t\t\t\t$datetimeHoy = new DateTime(date('Y-m-d h:i:s'));\n\t\t\t\t\t$diff = date_diff($datetimeUser, $datetimeHoy);\n\n\t\t \tif ($diff->format(\"%d\") <= 5 && $diff->format(\"%d\") > 0) {\n\t\t\t\t\t\treturn View::make(\"Usuarios.mensaje\");\n\t\t \t} \n\n\t\t \tif ($diff->format(\"%d\") <= 0) {\n\t\t \t\tAuth::logout();\n\t\t \t\treturn Redirect::back()->withErrors([\n\t\t \t\t\t\"errors\" => [\"Su contraseña ha expirado, contacte a su administrador.\"]\n\t\t \t\t]);\n\t\t \t}\n\t\t \t \t\n\t\t \tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n\t\t\t\t\t $ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t\t\t\t} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t\t\t $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t\t\t} else {\n\t\t\t\t\t $ip = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$UserAct = User::find(Auth::user()->SEG_Usuarios_ID);\n\t\t\t\t\t$UserAct->SEG_Usuarios_IP3 = $UserAct->SEG_Usuarios_IP2;\n\t\t\t\t\t$UserAct->SEG_Usuarios_IP2 = $UserAct->SEG_Usuarios_IP1;\n\t\t\t\t\t$UserAct->SEG_Usuarios_IP1 = $ip;\n\t\t\t\t\t$UserAct->SEG_Usuarios_UltimaSesion = date(\"Y-m-d h:i:s\");\n\t\t\t\t\t$UserAct->save();\n\t\t\t\t\t\n\t\t\t\t\treturn View::make(\"hello\");\n\t\t }\n\t\t return Redirect::back()->withErrors([\n\t\t \t\"errors\" => [\"Sus credenciales no concuerdan.\"]\n\t\t ]);\n\t \t} else {\n\t \treturn Redirect::back()\n\t\t ->withInput()\n\t\t ->withErrors($validator);\n\t \t}\n\t }\n\n\t //Recoge la IP del cliente y la guarda en la base de datos\n\t return View::make(\"Usuarios.login\");\n \t}", "public function actionLogin() {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->redirect(['admin/index']);\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function login()\n\t{\n\t\treturn View::make('auth.login');\n\t}", "public function login() {\n\t\t//Automatically redirect the user if they've already logged in\n\t\t$this->Auth->autoRedirect = false;\n\t\tif($this->Auth->user()){\n\t\t\t$this->redirect($this->Auth->redirect());\n\t\t}\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t//Update lastLogin and currentLogin times\n\t\t\t\t$user = $this->Auth->user();\n\t\t\t\t$this->User->read(null,$user['id']);\n\t\t\t\tif(empty($user['currentLogin'])){\n\t\t\t\t\t$user['currentLogin'] = date('Y-m-d H:i:s');\n\t\t\t\t}\n\t\t\t\t$this->User->set(array(\n\t\t\t\t\t\t\t\t\t'lastLogin' => $user['currentLogin'],\n\t\t\t\t\t\t\t\t\t'currentLogin' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t\t\t));\n\t\t\t\tif(!$this->User->save()){\n\t\t\t\t\t//There was an error updating the login times.\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($this->here == $this->Auth->loginRedirect) {\n\t\t\t\t\t$this->Auth->loginRedirect = '/';\n\t\t\t\t}\n\n\t\t\t\t/*$this->Session->setFlash(sprintf(__d('users', '%s you have successfully logged in'), $this->Auth->user('username')));\n\t\t\t\tif (!empty($this->request->data)) {\n\t\t\t\t\t$data = $this->request->data[$this->modelClass];\n\t\t\t\t\t$this->_setCookie();\n\t\t\t\t}*/\n\n\t\t\t\tif (empty($data['return_to'])) {\n\t\t\t\t\t$data['return_to'] = null;\n\t\t\t\t}\n\t\t\t\treturn $this->redirect($this->Auth->redirect($data['return_to']));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password, try again'));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($this->request->params['named']['return_to'])) {\n\t\t\t$this->set('return_to', urldecode($this->request->params['named']['return_to']));\n\t\t} else {\n\t\t\t$this->set('return_to', false);\n\t\t}\n\t}", "public function postLogin()\n\t{\n\t\tif (Auth::attempt(Input::only('email', 'password')))\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('You have successfully logged in!');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('Invalid Credentials')->withInput();\n\t\t}\n\n\t}", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function CASLogin()\n {\n // if student, then redirect to the student dashboard, if sponsor redirect to sponsor dashboard\n // else admin, redirect to admin page\n if(Auth::user()->roleID === 1)\n {\n return redirect()->action('Dashboard\\DashboardController@getStudentDashboard');\n }\n elseif(Auth::user()->roleID === 2)\n {\n return redirect()->action('Dashboard\\DashboardController@getSponsorDashboard');\n }\n else\n {\n return redirect('/admin');\n }\n }", "public function postLogin()\n\t{\n\n\t\t$input = array(\n\t\t 'email' => \\Input::get( 'email' ),\n\t\t 'password' => \\Input::get( 'password' ),\n\t\t 'remember' => \\Input::get( 'remember' ),\n\t\t);\n\n\t\t// If you wish to only allow login from confirmed users, call logAttempt\n\t\t// with the second parameter as true.\n\t\t// logAttempt will check if the 'email' perhaps is the username.\n\t\tif ( \\Confide::logAttempt( $input, true ) ) \n\t\t{\n\t\t return \\Redirect::intended('/company'); \n\t\t}\n\t\telse\n\t\t{\n\t\t $user = new \\User;\n\n\t\t // Check if there was too many login attempts\n\t\t if( \\Confide::isThrottled( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.too_many_attempts');\n\t\t }\n\t\t elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.not_confirmed');\n\t\t }\n\t\t else\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.wrong_credentials');\n\t\t }\n\n\t\t return \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t ->withInput(\\Input::except('password'))\n\t\t ->with( 'error', $err_msg );\n\t\t}\n\n\t}", "public function postLogin()\n\t{\n\t\tif (Auth::attempt(array('username' => Input::get('username'), 'password' => Input::get('password')), Input::get('remember_me')))\n\t\t\treturn Redirect::intended('/');\n\t\treturn Redirect::to('login')->with('message', 'Login failed!');\n\t}", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "public function index()\n {\n // echo '这是前台登陆页面';die;\n return view('home.login.login');\n }", "public function home()\r\n\t{\r\n\t\tif( $this->is_logged_in() )\r\n\t\t{\r\n\t\t\treturn redirect('dashboard','refresh');\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\t return redirect('login','refresh');\r\n\t\t}\r\n\t}", "public function index()\n {\n //Display Admin Login Form\n return view('admin.user.login');\n }", "public function index() {\n\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'admin/dashboard', 'refresh');\n\n if ($this->session->userdata('teacher_login') == 1)\n redirect(base_url() . 'teacher/dashboard', 'refresh');\n\n if ($this->session->userdata('student_login') == 1)\n redirect(base_url() . 'student/dashboard', 'refresh');\n\n if ($this->session->userdata('parent_login') == 1)\n redirect(base_url() . 'parents/dashboard', 'refresh');\n\n if ($this->session->userdata('librarian_login') == 1)\n redirect(base_url() . 'librarian/dashboard', 'refresh');\n\n if ($this->session->userdata('accountant_login') == 1)\n redirect(base_url() . 'accountant/dashboard', 'refresh');\n\n $this->load->view('backend/login');\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function index()\n {\n\n return view('auth.login');\n }", "public function login(Request $request)\n\t{\n\t\t$user=User::where('username',$request->username)->first();\n\t\tif(\\Hash::check($request->password, $user->password))\n\t\t\t{\n\t\t\t\\Auth::login($user);\n\t\t\treturn redirect('orders');\n\t\t\t//return view('layouts.orders');\n\t\t\t//return back();\t\n\t\t}\n\n\t\treturn back();\n\t\t\n\t}" ]
[ "0.71996725", "0.7197968", "0.71171093", "0.709945", "0.7094928", "0.70014274", "0.6984527", "0.6959346", "0.69347906", "0.68900394", "0.68663454", "0.6863219", "0.68391293", "0.6812528", "0.6811022", "0.6802307", "0.677561", "0.6771732", "0.67522204", "0.67434293", "0.67290634", "0.6724505", "0.6723369", "0.6706591", "0.670551", "0.6699414", "0.66984457", "0.6698112", "0.6695281", "0.66860497", "0.6639044", "0.6637544", "0.66232187", "0.6611799", "0.6606323", "0.66036546", "0.66035926", "0.6602513", "0.6596919", "0.6594297", "0.6592248", "0.65920794", "0.6584774", "0.6581865", "0.65800035", "0.65778244", "0.65777", "0.6576701", "0.6571267", "0.65659636", "0.65623623", "0.6562286", "0.6553314", "0.6547462", "0.6545609", "0.65417856", "0.6538472", "0.65372366", "0.65343744", "0.6534091", "0.6532047", "0.65304613", "0.65295404", "0.6525343", "0.6525343", "0.6524398", "0.6518096", "0.6516055", "0.6513559", "0.6512853", "0.65113556", "0.6505701", "0.6503262", "0.6502396", "0.65012753", "0.649949", "0.64965546", "0.6493117", "0.6493031", "0.6485391", "0.647942", "0.6476519", "0.64743835", "0.6469716", "0.6464587", "0.64606625", "0.64604235", "0.64592105", "0.64587677", "0.6458721", "0.6458675", "0.64574134", "0.64562947", "0.6455315", "0.64553034", "0.6452718", "0.6447409", "0.64473176", "0.64432865", "0.6440989", "0.64386106" ]
0.0
-1
1ta id ni olib info qaytaradigan and bir nechta id ni olib bir nechta qaytaradigan and hammasini olib qaytaradigan and bittasini olib o'zgartiradigan bittasini o'chiradigan bitta tabledan id va amaillarni olib bersin
public function reninfo($id){ $rent = TestMirshod::findOne($id); $rent->email = '[email protected]'; $rent->save(); return $rent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTroopAli_ctc($ali_id, $dtk_id, $art){\n\tglobal $db, $lang;\n\t$parse = $lang;\n\t\n\tfor($i=1; $i<=3; $i++){\n\t\t$parse['a_h_'.$i] = 0;\n\t\t$parse['a_h_c_'.$i] = \"c\";\t\t\n\t}\n\t\n\tfor($i=1; $i<=33; $i++){\n\t\t$parse['a_'.$i] = 0;\n\t\t$parse['a_c_'.$i] = \"c\";\n\t}\n\t\n\t//Lay thong tin hero\n\t$sql = \"SELECT\n\t\t\t\t\twg_heros.troop_id\n\t\t\t\tFROM\n\t\t\t\t\twg_heros ,\n\t\t\t\t\twg_ctc_heros ,\n\t\t\t\t\twg_villages ,\n\t\t\t\t\twg_users\n\t\t\t\tWHERE\n\t\t\t\t\twg_heros.id = wg_ctc_heros.hero_id AND\n\t\t\t\t\twg_ctc_heros.village_id = wg_villages.id AND\n\t\t\t\t\twg_villages.user_id = wg_users.id AND\n\t\t\t\t\twg_users.alliance_id = '$ali_id' AND\n\t\t\t\t\twg_ctc_heros.dtk_id = '$dtk_id'\n\t\t\t\tGROUP BY\n\t\t\t\t\twg_heros.id\";\n\t$db->setQuery($sql);\n\t$hs = $db->loadObjectList();\n\tif($hs){\n\t\tforeach($hs as $h){\n\t\t\tswitch($art[$h->troop_id]['nation_id']){\n\t\t\t\tcase 1:\n\t\t\t\t\t$parse['a_h_2']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_2']++;\n\t\t\t\t\t\t$parse['a_h_c_2'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$parse['a_h_3']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_3']++;\n\t\t\t\t\t\t$parse['a_h_c_3'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$parse['a_h_1']++;\n\t\t\t\t\tif($h->die==1){\n\t\t\t\t\t\t$parse['c_a_h_1']++;\n\t\t\t\t\t\t$parse['a_h_c_1'] = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//Lay thong tin linh\n\t$sql = \"SELECT\n\t\t\t\t\twg_ctc_troops.troop_id,\n\t\t\t\t\twg_ctc_troops.num\n\t\t\t\tFROM\n\t\t\t\t\twg_ctc_troops ,\n\t\t\t\t\twg_villages ,\n\t\t\t\t\twg_users\n\t\t\t\tWHERE\n\t\t\t\t\twg_ctc_troops.village_id = wg_villages.id AND\n\t\t\t\t\twg_villages.user_id = wg_users.id AND\n\t\t\t\t\twg_users.alliance_id = '$ali_id' AND\n\t\t\t\t\twg_ctc_troops.dtk_id = '$dtk_id'\n\t\t\t\tGROUP BY\n\t\t\t\t\twg_ctc_troops.id\";\n\t$db->setQuery($sql);//die($sql);\n\t$ts = $db->loadObjectList();\n\tif($ts){\n\t\tforeach($ts as $t){\n\t\t\tif($t->num>0){\n\t\t\t\t$parse['a_'.$t->troop_id] += $t->num;\n\t\t\t\t$parse['a_c_'.$t->troop_id] = \"\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//echo \"<pre>\"; print_r($hs); die();\n\t\n\treturn parsetemplate(gettemplate(\"ctc/ctc_troop_ali\"), $parse);\n}", "function analyze_nucleotide($row, $i)\n {\n $props = get_object_vars($row);\n\n $extreme_case = false;\n foreach ($props as $key => $value) {\n\n if (array_key_exists($key,$this->low_is_good)) {\n if ($value > $this->avg[$key]) {\n $extreme_case = true;\n break;\n }\n } else {\n if ($value < $this->avg[$key]) {\n $extreme_case = true;\n break;\n }\n\n }\n\n\n // high b values are bad, so we highlight them\n// $pos = strpos($key,'iso');\n// if ( $pos != false and $value > $this->avg[$key] ) {\n// $extreme_case = true;\n// break;\n// }\n// if ( array_key_exists($key,$this->avg) and $value < $this->avg[$key] ) {\n// $extreme_case = true;\n// break;\n// }\n }\n\n if ($extreme_case == true) {\n return array(\n $i,\n $this->make_checkbox($row->loop_id,$row->nt_ids),\n '<a class=\"pdb\">' . substr($row->nt_id,0,4) . '</a> ' . substr($row->nt_id,10),\n anchor_popup(site_url(array('motif/view/0.5',$row->motif_id)),$row->motif_id,array('width'=>'1000')),\n $this->make_label($row->sfcheck_correlation,'sfcheck_correlation'),\n $this->make_label($row->sfcheck_correlation_side_chain,'sfcheck_correlation_side_chain'),\n $this->make_label($row->sfcheck_real_space_R,'sfcheck_real_space_R'),\n $this->make_label($row->sfcheck_real_space_R_side_chain,'sfcheck_real_space_R_side_chain'),\n $this->make_label($row->sfcheck_connect,'sfcheck_connect'),\n $this->make_label($row->sfcheck_shift,'sfcheck_shift'),\n $this->make_label($row->sfcheck_shift_side_chain,'sfcheck_shift_side_chain'),\n $this->make_label($row->sfcheck_density_index_main_chain,'sfcheck_density_index_main_chain'),\n $this->make_label($row->sfcheck_density_index_side_chain,'sfcheck_density_index_side_chain'),\n $this->make_label($row->sfcheck_B_iso_main_chain,'sfcheck_B_iso_main_chain'),\n $this->make_label($row->sfcheck_B_iso_side_chain,'sfcheck_B_iso_side_chain'),\n $this->make_label($row->mapman_correlation,'mapman_correlation'),\n $this->make_label($row->mapman_real_space_R,'mapman_real_space_R'),\n $this->make_label($row->mapman_Biso_mean,'mapman_Biso_mean'),\n $this->make_label($row->mapman_occupancy_mean,'mapman_occupancy_mean')\n );\n } else {\n return array();\n }\n\n }", "public function Dn($id_soal)\n {\n require 'koneksi.php';\n $stemmerFactory = new StemmerFactory;\n $stemmer = $stemmerFactory->createStemmer();\n\n mysqli_query($connection, \"TRUNCATE TABLE tbdn\");\n\n $sql = mysqli_query($connection, \"SELECT id_jawaban,jawaban FROM jawaban WHERE id_soal='$id_soal'\") or die(mysqli_error($connection));\n $tbjudul = [];\n while ($result = mysqli_fetch_assoc($sql)) {\n array_push($tbjudul, $result);\n }\n $tbtoken = $this->ambilToken();\n foreach ($tbjudul as $judul) {\n $output = $stemmer->stem($judul['jawaban']);\n $keywordsArray = $this->tokenize($output);\n // var_dump($output);\n foreach ($tbtoken as $token) {\n mysqli_query($connection, \"INSERT into tbdn (idtoken,idjudul,count) values($token[id],$judul[id_jawaban],0)\") or die(mysqli_error($connection));\n foreach ($keywordsArray as $word) {\n if ($token['term'] == $word) {\n mysqli_query($connection, \"UPDATE tbdn set count = count + 1 where idtoken = $token[id] and idjudul = $judul[id_jawaban]\") or die(mysqli_error($connection));\n }\n }\n }\n }\n }", "function traduire($mot,$temps,$type,$personne){\n //type = 1affirm - 2neg - 3question;\n //personne = 1;\n \n \n \n $fin1 = substr($mot, -1);\n $fin2 = substr($mot,-2,1);\n $liaison = \"\";\n $passe = 'd';\n $kconsonne = false;\n $consonne = false;\n switch ($fin1) {\n case 'a':\n case 'ı':\n $voyelle = 'ı';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n $liaison = 'y';\n break;\n case 'e':\n case 'i':\n $voyelle = 'i';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n $liaison = 'y';\n break;\n case 'o':\n case 'u':\n $voyelle = 'u';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n $liaison = 'y';\n break;\n case 'ü':\n case 'ö':\n $voyelle = 'ü';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n $liaison = 'y';\n break;\n case 'k':\n $passe = 't';\n $consonne = 'true';\n $kconsonne ='true';\n break;\n case 't':\n case 'p':\n case 'ç':\n case 'h':\n case 'f':\n case 's':\n case 'ş':\n $passe = 't';\n $consonne = 'true';\n break;\n default : \n $consonne = 'true';\n break;\n \n }\n \n if($consonne == 'true'){\n \n switch ($fin2) {\n case 'a':\n case 'ı':\n $voyelle = 'ı';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n \n break;\n case 'e':\n case 'i':\n $voyelle = 'i';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n \n break;\n case 'o':\n case 'u':\n $voyelle = 'u';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n \n break;\n case 'ü':\n case 'ö':\n $voyelle = 'ü';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n \n break;\n }\n \n }\n \n \n \n switch ($temps) {\n // passé\n case 1 :\n switch($type){\n // passe affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"m\";\n break;\n case 2:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"n\";\n break;\n case 3:\n $traduction = $traduction.$liaison.$passe.$voyelle;\n break;\n case 4:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"k\";\n break;\n case 5:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\".\"d\".$dvoyelle;\n break;\n }\n break;\n // passe neg\n case 2:\n $traduction = $mot.\" değil\";\n switch($personne){\n case 1:\n $traduction = $traduction.\"dim\";\n break;\n case 2:\n $traduction = $traduction.\"din\";\n break;\n case 3:\n $traduction = $traduction.\"di\";\n break;\n case 4:\n $traduction = $traduction.\"dik\";\n break;\n case 5:\n $traduction = $traduction.\"diniz\";\n break;\n case 6:\n $traduction = $traduction.\"diler\";\n break;\n }\n break;\n // passe quest\n case 3:\n $traduction = $mot. \" m\".$voyelle.\"yd\".$voyelle;\n switch($personne){\n case 1:\n $traduction = $traduction.\"m\";\n break;\n case 2:\n $traduction = $traduction.\"n\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n $traduction = $traduction.\"k\";\n break;\n case 5:\n $traduction = $traduction.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\";\n break;\n }\n \n break;\n }\n break;\n \n // présent \n case 0 :\n switch($type){\n // present affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n if($kconsonne=='true'){\n $traduction = $traduction.substr($traduction,0,-1);\n $traduction = $traduction.\"ğ\".$voyelle.\"m\";\n }else{\n $traduction = $traduction.$liaison.$voyelle.\"m\";\n }\n \n break;\n case 2:\n $traduction = $traduction.\"s\".$voyelle.\"n\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n if($kconsonne=='true'){\n $traduction = $traduction.substr($traduction,0,-1);\n $traduction = $traduction.\"ğ\".$voyelle.\"z\";\n }else{\n $traduction = $traduction.$liaison.$voyelle.\"z\";\n }\n \n break;\n case 5:\n $traduction = $traduction.\"s\".$voyelle.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\";\n break;\n }\n break;\n // present nega\n case 2:\n $traduction = $mot.\" değil\";\n switch($personne){\n case 1:\n $traduction = $traduction.\"im\";\n break;\n case 2:\n $traduction = $traduction.\"sin\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n $traduction = $traduction.\"iz\";\n break;\n case 5:\n $traduction = $traduction.\"siniz\";\n break;\n case 6:\n $traduction = $traduction.\"ler\";\n break;\n }\n break;\n \n //present question\n case 3:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction. \" m\".$voyelle.\"y\".$voyelle.\"m ?\";\n break;\n case 2:\n $traduction = $traduction. \" m\".$voyelle.\"s\".$voyelle.\"n ?\";\n break;\n case 3:\n $traduction = $traduction. \" m\".$voyelle.\" ?\";\n break;\n case 4:\n $traduction = $traduction. \" m\".$voyelle.\"y\".$voyelle.\"z ?\";\n break;\n case 5:\n $traduction = $traduction. \" m\".$voyelle.\"s\".$voyelle.\"n\".$voyelle.\"z ?\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\". \" m\".$voyelle .\" ?\";\n break;\n }\n break;\n }\n break;\n \n //futur\n case 2 :\n switch($type){\n //futur affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.\" olacağım\";\n break;\n case 2:\n $traduction = $traduction. \" olacaksın\";\n break;\n case 3:\n $traduction = $traduction. \" olacak\";\n break;\n case 4:\n $traduction = $traduction. \" olacağız\";\n break;\n case 5:\n $traduction = $traduction. \" olacaksınız\";\n break;\n case 6:\n $traduction = $traduction. \" olacaklar\";\n break;\n }\n break;\n //futur negation\n case 2:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.\" olmayacağım\";\n break;\n case 2:\n $traduction = $traduction. \" olmayacaksın\";\n break;\n case 3:\n $traduction = $traduction. \" olmayacak\";\n break;\n case 4:\n $traduction = $traduction. \" olmayacağız\";\n break;\n case 5:\n $traduction = $traduction. \" olmayacaksınız\";\n break;\n case 6:\n $traduction = $traduction. \" olmayacaklar\";\n break;\n }\n break;\n case 3:\n $traduction = $mot. \" olacak\";\n switch($personne){\n case 1:\n $traduction = $traduction.\" mıyım ?\";\n break;\n case 2:\n $traduction = $traduction. \" mısın ?\";\n break;\n case 3:\n $traduction = $traduction. \" mı ?\";\n break;\n case 4:\n $traduction = $traduction. \" mıyız ?\";\n break;\n case 5:\n $traduction = $traduction. \" mısınız ?\";\n break;\n case 6:\n $traduction = $traduction. \"lar mı ?\";\n break;\n }\n break;\n }\n break;\n }\n return $traduction;\n }", "function TampilkanHeaderNilai($mnux='') {\r\n $prodiku = $_SESSION['_ProdiID'];\r\n $arrprodi = explode(',', $prodiku);\r\n $whr = array();\r\n foreach ($arrprodi as $val) {\r\n $whr[] = \"INSTR(j.ProdiID, '.$val.')>0\";\r\n }\r\n $_whr = \" (\". implode(' or ', $whr) . \") \";\r\n // query\r\n $s = \"select j.JadwalID, j.MKKode, j.Nama, j.JenisJadwalID, j.NamaKelas, j.DosenID,\r\n concat(d.Nama, ', ', d.Gelar) as DSN\r\n from jadwal j\r\n left outer join dosen d on j.DosenID=d.Login\r\n where TahunID='$_SESSION[tahun]' \r\n and $_whr \r\n and j.JadwalSer = 0\r\n group by j.JadwalID, j.MKKode, j.JenisJadwalID, j.NamaKelas\r\n order by j.MKKode, j.NamaKelas, j.JenisJadwalID\";\r\n $r = _query($s);\r\n // buat option\r\n $opt = \"<option>--</option>\";\r\n while ($w = _fetch_array($r)) {\r\n $sel = ($w['JadwalID'] == $_SESSION['JadwalID']) ? \"selected\" : \"\";\r\n $opt .= \"<option value='$w[JadwalID]' $sel>$w[MKKode] $w[Nama] - $w[NamaKelas] ($w[JenisJadwalID]) - $w[DSN]</option>\\r\";\r\n }\r\n // Tampilkan opsi\r\n echo \"<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' methos=POST>\r\n <input type=hidden name='mnux' value='$mnux'>\r\n <tr><td class=inp>Tahun :</td><td class=ul><input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10> <input type=submit name='Tampilkan' value='Tampilkan'></td></tr>\r\n <tr><td class=inp>Jadwal :</td><td class=ul><select name='JadwalID' onChange='this.form.submit()'>$opt</select></td></tr>\r\n </form></table></p>\";\r\n}", "public function get_hypernyms ($tag){\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive\n// => head of state, chief of state\n// => representative\n// => negotiator, negotiant, treater\n// => communicator\n// => person, individual, someone, somebody, mortal, soul\n// => organism, being\n// => living thing, animate thing\n// => object, physical object\n// => physical entity\n// => entity\n// => causal agent, cause, causal agency\n// => physical entity\n// => entity\n//\n//Sense 2\n//Kennedy, Kennedy Interrnational, Kennedy International Airport\n// INSTANCE OF=> airport, airdrome, aerodrome, drome\n// => airfield, landing field, flying field, field\n// => facility, installation\n// => artifact, artefact\n// => whole, unit\n// => object, physical object\n// => physical entity\n// => entity';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n//\n// $raw_synonims1 = 'Sense 1\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n// exit();\n ini_set(\"xdebug.var_display_max_children\", -1);\n ini_set(\"xdebug.var_display_max_data\", -1);\n ini_set(\"xdebug.var_display_max_depth\", -1);\n\n // cmd commend\n $wn_command = '\"C:/Program Files (x86)/WordNet/2.1/bin/wn\" \"'.$tag.'\" \"-hypen\"';\n $raw_synonims = shell_exec ($wn_command);\n\n // if the word exist\n if (! $raw_synonims) {\n return null;\n }\n\n // get the result of cmmend\n $matches = array ();\n preg_match_all (\"/\\s+(.+)\\s+.+?=>/\",\n $raw_synonims, $matches, PREG_PATTERN_ORDER);\n\n // if no matched result\n if(!isset($matches[1][0])){\n return null;\n }\n\n// dd($matches);\n // get all accepted words\n $expanded_query = array();\n\n foreach ($matches[1] as $match){\n $match = explode (\", \", $match);\n foreach ($match as $word){\n array_push($expanded_query, strtolower($word));\n }\n }\n\n // remove repeated element\n $expanded_query = array_unique($expanded_query);\n\n // return the word\n return $expanded_query;\n }", "function konjugacija($ige) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|t|v)'); \r\n $av1 = '';\r\n $av2 = '';\r\n $h1 = harmony1($ige);\r\n $h2 = ($h1 === 'o') ? 'u' : 'ü';\r\n $h3 = ($h1 === 'o') ? 'o' : 'e';\r\n $ai = ($h1 === 'o') ? 'a' : 'i';\r\n $aai = ($h1 === 'o') ? 'á' : 'i';\r\n $ae = a_e($h1);\r\n $aaee = aa_ee($h1);\r\n $ik = check_ik($ige);\r\n $it = check_it($ige);\r\n $ige1 = filter_ige_past1($ige,$h1);\r\n $ige2 = filter_ige_past2($ige, $h1); \r\n $ige3 = filter_ige($ige);\r\n $te = te($ige3,$h1);\r\n $duplo1 = check_duplo1($ige, $h1);\r\n $duplo2 = check_duplo2($ige);\r\n $z = check_z($ige);\r\n $z2 = check_z2($ige, $h1);\r\n $inf = inf($ige, $ae);\r\n $cond = str_replace(substr($inf,-1),'',$inf);\r\n $imp = imperativ($ige);\r\n $imp2 = imperativ2($imp);\r\n \r\n if ($it === 1) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n echo \"<h2>Osnovni oblik: \" . \"<strong>\" . $ige . \r\n \"</strong></h2>\" . \"<br>\" . \"<h3>Infinitiv: $inf</h3><br>\";\r\n \r\n echo \"<table id=\\\"sad\\\">\" .\r\n \"<tr><td>én</td><td>\" . $ige3 . $z . $h1 . \"k\" . \"</td>\" .\r\n \"<td>\" . $ige3 . $z . $h1 . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige3 . $z . $av2 . $te . \"</td>\"\r\n . \"<td>\" . $ige3 . $z . $h1 . \"d</td></tr>\" .\r\n \"<tr><td>Ön,ő</td><td>\" . $ige3 . $z . $ik . \"</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $ai . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige3 . $z . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige3 . $duplo2 . $h2 . \"k</td></tr>\"\r\n . \"<tr><td>ti</td><td>\" . $ige3 . $z . $av1 . \"t\" . $h1 . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td>\" . \"<td>\" . $ige3 . $z . $av2 . \"n\" . $ae . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"k</td></tr>\" .\r\n \"</table>\";\r\n \r\n echo \"<table id=\\\"pro\\\">\" . \r\n \"<tr><td>én</td><td>\" . $ige1 . $ae . \"m\" . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige1. $aaee . \"l</td>\" .\r\n \"<td>\" .$ige1 . $ae . \"d</td></tr>\" . \r\n \"<tr><td>Ön,ő</td><td>\" . $ige2 . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige1 . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige1 . $h2 . \"k</td></tr>\" . \r\n \"<tr><td>ti</td><td>\" . $ige1 . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $ige1 . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $ige1 . $ae . \"k</td><td>\" \r\n . $ige1 . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"kond\\\"><tr><td>én</td><td>\" . $cond . \"ék\" . \r\n \"</td><td>\" . $cond . $aaee . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $cond . $aaee . \"l</td><td>\" .\r\n $cond . $aaee . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $cond . $ae . \"</td><td>\" . $cond . $aaee . \r\n \"</td></tr><tr><td>mi</td><td>\" . $cond . $aaee . \r\n \"nk</td><td>\" . $cond . $aaee . \"nk</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $cond . $aaee . \"t\" . $h3 . \"k</td><td>\"\r\n . $cond . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $cond . $aaee . \"n\" . $ae . \r\n \"k</td><td>\" . $cond . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"imp\\\"><tr><td>én</td><td>\" . $imp . $ae . \r\n \"k</td><td>\" . $imp . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $imp . \"(\" . $aaee . \"l)</td><td>\" .\r\n $imp2 . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $imp . $h1 . \"n</td><td>\" . $imp . $ae . \r\n \"</td></tr><tr><td>mi</td><td>\" . $imp . $h2 . \r\n \"nk</td><td>\" . $imp . $h2 . \"k</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $imp . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $imp . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $imp . $ae . \"n\" . $ae . \r\n \"k</td><td>\" . $imp . $aaee . \"k</td></tr></table>\";\r\n }", "public function etc()\n\t{\n\t\tif (preg_match('/^\\[scnzbefnet\\] (.+?) \\[\\d+\\/(\\d+\\]) - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //..:[DoAsYouLike]:.. 116,12 MB \"Graphite v8.9.17 SP4R4.nfo\" 3,00 kB yEnc\n\t\tif (preg_match('/^.+\\[DoAsYouLike\\].+\\d+[.,]\\d+ [kKmMgG][bB].+\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' (\\d+[.,])?\\d+ ([kKmMgG])?[bB][-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(047/550) \"Enf.S02E02.G.D.D.W.7.H.x2-e.vol105+99.PAR2\" - 36,13 GB -Enf.S02.G.D.D.W.7.H.x2-e yEnc\n\t\t//[3/3] - \"Mayle Peter - Der Coup von Marseille.epub.vol0+1.par2\" - 956,83 kB {UR} yEnc\n\t\tif (preg_match('/^[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<Old but Sold>>> <<< >< >< \"German Top 50 ODC - 12.08.2013.nfo\" >< 02/33 (541,61 MB) >< 10,93 kB > yEnc\n\t\tif (preg_match('/^.+Old but Sold.+>< \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' >< \\d+\\/\\d+ \\(\\d+[.,]\\d+ [kKmMgG][bB]\\).+ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<THOR for Usenet-Space-Cowboys>>> - 1Password V1.0.9.236 Setup Key.PAR2 yEnc\n\t\tif (preg_match('/^.+Usenet-Space-Cowboys.+> - ([A-Z0-9][a-zA-Z0-9\\. ]{6,})([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+ yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //704900999555666777123978 - [398/415] - \"Jormungand Complete [720p] mHD.part31.rar\" yEnc\n\t\tif (preg_match('/^\\d+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<< old but sold >>>> < USC> <\"K11 - Kommissare im Einsatz (DE) NDS.part3.rar\">[04/11] 74,54 MB yEnc\n\t\tif (preg_match('/^.+old but sold.+([\\w. ()-]{8,}?\\b)' . $this->e0 .\n\t\t\t\t\t '>\\[\\d+\\/\\d+\\][-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB][-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-ACDC.Let.There.Be.Rock.1980.720p.BluRay.DD5.1.x264-DON(00/47]\"rock.ac3.720p.nzb\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-([\\w. ()-]{8,}?\\b)[\\(\\[]\\d+\\/\\d+\\]\".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bitsum.Technologies.Process.Lasso.Pro.v6.5.00.Cracked-EAT - [3/4] - \"eat.vol0+1.par2\" yEnc\n\t\tif (preg_match('/^([\\w.()-]{8,})[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<usenet-space-cowboys.info>>> USC <<<Powered by https://secretusenet.com><Medieval Wii Pal>< \"Medieval Wii Pal.vol108+29.par2\" >< 60/60 (4,82 GB) >< 95,77 MB > yEnc\n\t\tif (preg_match('/^.+?usenet-space.+?Powered by.+? \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '.+? \\d+\\/(\\d+.+?)$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-ACDC.Let.There.Be.Rock.1980.720p.BluRay.DD5.1.x264-DON(00/47]\"rock.ac3.720p.nzb\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-([\\w. ()-]{8,}?\\b)[\\(\\[]\\d+\\/\\d+\\]\".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bitsum.Technologies.Process.Lasso.Pro.v6.5.00.Cracked-EAT - [3/4] - \"eat.vol0+1.par2\" yEnc\n\t\tif (preg_match('/^([\\w.()-]{8,})[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //<<<usenet-space-cowboys.info>>> USC <<<Powered by https://secretusenet.com><Medieval Wii Pal>< \"Medieval Wii Pal.vol108+29.par2\" >< 60/60 (4,82 GB) >< 95,77 MB > yEnc\n\t\tif (preg_match('/^.+?usenet-space.+?Powered by.+? ([\\w. ()-]{8,}?\\b)' . $this->e0 .\n\t\t\t\t\t '.+? \\d+\\/(\\d+.+?)$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //W33d5.S01.720p.BluRay.x264 - \"W33d5.S01.720p.BluRay.x264.part63.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>GOU<< XUS Clock Plus v1.5.0 with Key [TorDigger].PAR2 >>www.SSL-News.info< yEnc\n\t\tif (preg_match('/^>GOU<< ([\\w.\\[\\]() -]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rarr|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+www\\.SSL-News\\.info<[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE - [02/38] - \"Man.Of.Steel.2013.BRRip.x264.AC3-UNiQUE.part01.rar\" yEnc\n\t\tif (preg_match('/^[\\w. -]+[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"([\\w.()-]{8,}?\\b)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //>GOU<< XUS Clock Plus v1.5.0 with Key [TorDigger].PAR2 >>www.SSL-News.info< yEnc\n\t\tif (preg_match('/^>GOU<< ([\\w.\\[\\]() -]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rarr|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}).+www\\.SSL-News\\.info<[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"Drains_READNFO-VACE.nfo\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function text_arabic($sura,$aya,$text){\n\t\t$table_per_kata\t= get_table(\"SELECT * FROM terjemah_kata WHERE sura='$sura' \n\t\t\t\t\t\t\t\t\tAND aya='$aya'\");\n\t\t// inisialisasi\n\t\t$arr_terjemah = array();\n\t\tforeach($table_per_kata as $j => $row_per_kata){\n\t\t\t$m = $j+1;\n\t\t\t$arr_terjemah[$m] \t\t= $row_per_kata[indonesia]; \n\t\t\t$arr_arab_harokat[$m] \t= $row_per_kata[arab_harokat]; \n\t\t}\n\t\t\n\t\t// explode aya text into word\n\t\t$arr_kata_arab\t= explode(\" \",$text);\n\t\t\n\t\t//menampilkan tiap kata beserta terjemahnya\n\t\t/*echo \"\n\t\t<pre>\n\t\t$sura:$aya \";*/\n\t\t\n\t\t$m = 1;\n\t\tforeach($arr_kata_arab as $k => $kata_arab){\n\t\t\t$event_aya_word =\"\";\n\t\t\t//menampilkan terjemahan per kata\n\t\t\t//echo \"$kata_arab {$arr_arab[$m]}<br>\";\n\t\t\tif($kata_arab==$arr_arab_harokat[$m] ){\n\t\t\t\t$output .= \"\n\t\t\t\t<span id='terjemah_{$sura}_{$aya}_{$m}' \n\t\t\t\t\tstyle='visibility:hidden;position:absolute;width:0px;height:0px;' >\n\t\t\t\t\t{$arr_terjemah[$m]}\n\t\t\t\t</span>\n\t\t\t\t\";\n\t\t\t\t$event_aya_word =\"\n\t\t\t\tonmousemove='move_terjemah($sura,$aya,$m,event)' \n\t\t\t\tonmouseout='hide_terjemah($sura,$aya,$m)'\n\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$id_kata = \"kata_{$sura}_{$aya}_{$m}\";\n\t\t\t\t$m++;\n\t\t\t}\n\t\t\t//menampilkan kata arab\n\t\t\t$output .= \"\n\t\t\t<span \n\t\t\t\tid='$id_kata'\n\t\t\t\tclass='aya_word'\n\t\t\t\t$event_aya_word >\n\t\t\t\t\".repair_ar($kata_arab).\"\n\t\t\t</span>\n\t\t\t\";\n\t\t}\n\t\treturn $output;\n\t}", "function lebih($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\t/* -----------------------------*/\n\t\tif(empty($r_tiket_result)) {\n\t\t\techo \"<script> \t\n \talert('Anda belum mengisi SPD Rampung!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\n\t\tif($sbu_tiket<$r_tiket) {\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor:'.$nomor.' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa : input alasan lebih here',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Tiket '.$rute.' (PP) dengan jumlah tiket pesawat di bawah ini melebihi dengan',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\n\t\t\t$counterrr = 1;\n\t\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute. \" (PP)\",\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t\t$counterrr++;\n\t\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp ','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t\n\t\t\t//end of table\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Bahwa tiket '.$rute.' (PP) dengan jumlah uang tersebut pada angka (1)',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi jumlah SBU dan benar - benar dikeluarkan dengan bukti rill kuitansi tiket',0,1);\n\t\t\t$pdf->Cell(5,7,'',0,0);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(18,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'R');\n\t\t\t$pdf->Cell(100,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(50,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(100,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(100,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(100,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(72.5,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Lebih - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t} else {\n\t\t\techo \"<script> \t\n \talert('Tidak bisa mencetak karena biaya tiket tidak lebih dari SBU!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t}\n\t}", "public function tes()\n\t{\n\t\t$tes = \"^ & %aku% ak4 $ 12 Trilyun2 Enak2 banget2 ya Tragedi ular kembali memakan korban. Kali ini seorang bocah laki2 di Bandung tewas setelah dipatuk ular weling.--Insiden itu menimpa Andi Ramdani (11), bocah asal Jalan Nagrog, Gang Keramat RT 04/09, Kelurahan Pasirjati, Kecamatan Ujungberung, Kota Bandung. Andi tewas saat dilarikan ke rumah sakit umum daerah (RSUD) Bandung pada Rabu (23/1) siang.--Bagaimana awal mula kejadiannya? Simak selengkapnya di link yang ada di stories!--Sumber: detiknews--#detikcom #ularweling #dipatukular\";\n\t\t$tes1 = \"'DANAR' Dono y nyiyir gak ga adalah..,./ seorang...!! @mahasiswa2%&& :D z!! @mas danar_dono\";\n\t\t$cek = $this->case_folding($tes);\n\t\t$cek = $this->cleansing($cek);\n\t\t$cek = $this->stemmer($cek);\n\t\t$cek = $this->stopword($cek);\n\t\t$cek = preg_split('/ /',$cek);\n\t\t$count = count($cek);\n\t\tfor($i=0;$i<$count;$i++){\n\t\t\t$cek[$i] = $this->hilangkan_kataberulang($cek[$i]);\n\t\t}\n\t}", "private function generateNilaiAkhir($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n \r\n $setting = $this->M_setting->getSetting()->row();\r\n\r\n // Bobot masing masing nilai\r\n $bobot_bimbingan = $setting->bobot_bimbingan;\r\n $bobot_moderator = $setting->bobot_moderator;\r\n $bobot_penguji1 = $setting->bobot_penguji1;\r\n $bobot_penguji2 = $setting->bobot_penguji2;\r\n $kom_a = $setting->kom_a;\r\n $kom_b = $setting->kom_b;\r\n $kom_c = $setting->kom_c;\r\n $kom_d = $setting->kom_d;\r\n // Bobot masing masing nilai\r\n\r\n // nilai bimbingan\r\n $bimb = ( $bobot_bimbingan/100 ) * $dataAnggota->nilai_bimb;\r\n // nilai bimbingan\r\n\r\n // nilai moderator\r\n $kom_a_mod = ( $kom_a/100 ) * $dataAnggota->nilai_11;\r\n $kom_b_mod = ( $kom_b/100 ) * $dataAnggota->nilai_12;\r\n $kom_c_mod = ( $kom_c/100 ) * $dataAnggota->nilai_13;\r\n $kom_d_mod = ( $kom_d/100 ) * $dataAnggota->nilai_14;\r\n\r\n $tot_mod = ( $kom_a_mod + $kom_b_mod + $kom_c_mod + $kom_d_mod ) * ( $bobot_moderator/100 );\r\n // nilai moderator\r\n \r\n // nilai penguji 1\r\n $kom_a_p1 = ( $kom_a/100 ) * $dataAnggota->nilai_21;\r\n $kom_b_p1 = ( $kom_b/100 ) * $dataAnggota->nilai_22;\r\n $kom_c_p1 = ( $kom_c/100 ) * $dataAnggota->nilai_23;\r\n $kom_d_p1 = ( $kom_d/100 ) * $dataAnggota->nilai_24;\r\n\r\n $tot_p1 = ( $kom_a_p1 + $kom_b_p1 + $kom_c_p1 + $kom_d_p1 ) * ( $bobot_penguji1/100 );\r\n // nilai penguji 1\r\n \r\n // nilai penguji 2\r\n $kom_a_p2 = ( $kom_a/100 ) * $dataAnggota->nilai_31;\r\n $kom_b_p2 = ( $kom_b/100 ) * $dataAnggota->nilai_32;\r\n $kom_c_p2 = ( $kom_c/100 ) * $dataAnggota->nilai_33;\r\n $kom_d_p2 = ( $kom_d/100 ) * $dataAnggota->nilai_34;\r\n\r\n $tot_p2 = ( $kom_a_p2 + $kom_b_p2 + $kom_c_p2 + $kom_d_p2 ) * ( $bobot_penguji2/100 );\r\n // nilai penguji 2\r\n\r\n // Perhitungan nilai kahir\r\n $totalNilai = $bimb + $tot_mod + $tot_p1 + $tot_p2;\r\n // Perhitungan nilai kahir\r\n \r\n $dataUpdate = ['nilai_akhir' => $totalNilai];\r\n $updateNilaiAkhir = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateNilaiAkhir ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "static function ProcessHindiPhonetic($word)\n\t\t{\n\t\t\t$word=strtolower($word);\n\t\t\t$k=1;\n\t\t\t$word1=\"D\";\t\n\t\t\t$n=strlen($word);\n\t\t\t$word1[0]=$word[0];\n\t\t\tfor($i=1;$i<=($n-1);$i++)\n\t\t\t{\n\t\t\t\tif($word[$i]!='e' && $word[$i]!='o')\n\t\t\t\t{\n\t\t\t\t\tif($word[$i]==$word[$i-1]);\n\t\t\t\t\telse $word1[$k++]=$word[$i];\n\t\t\t\t}\n\t\t\t\telse $word1[$k++]=$word[$i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/* Process the word */\n\t\t\t\n\t\t\t$word=$word1;\n\t\t\t$n=strlen($word);\n\t\t\t$result=\"S\";\n\t\t\t$k=0;\n\t\t\t//if($word[0]=='e') $word[0]='i';\n\t\t\tif($word==\"mein\" || $word==\"main\")\n\t\t\t{\n\t\t\t\t$result=\"me\";\n\t\t\t}\n\t\t\telse if($word==\"hain\" || $word==\"hai\")\n\t\t\t{\n\t\t\t\t$result=\"he\";\n\t\t\t}\n\t\t\telse if ($word==\"hun\" || $word==\"hoon\")\n\t\t\t{\n\t\t\t\t$result=\"hu\";\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\tfor($i=0;$i<(strlen($word)+1);$i++)\n\t\t\t{\n switch($word[$i])\n {\n case 'a' :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($i==0)\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\t\t//$result[$k++]='a';\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\t\t\tif($word[$i+1]=='e')\n {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo Hello;\n $result[$k++]='e';\n $i++;\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($word[$i+1]=='i')\n {\n if($i+2==$n)\n {\n $result[$k++]='a';\n $result[$k++]='i';\n $i++;\n }\n else \n {\n $result[$k++]='e';\n $i++;\n }\n }\n else if($word[$i+1]=='y' && $i+2==$n)\n {\n $result[$k++]='a';\n $result[$k++]='i';\n $i++;\n }\n \n else if($word[$i+1]=='u')\n {\n $result[$k++]='o';\n $i++;\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($i+1==$n)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$result[$k++]='a';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse $result[$k++]='a';\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\telse \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\tif($word[$i+1]=='e')\n {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo Hello;\n $result[$k++]='e';\n $i++;\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($word[$i+1]=='i')\n {\n if($i+2==$n)\n {\n $result[$k++]='a';\n $result[$k++]='i';\n $i++;\n }\n else \n {\n $result[$k++]='e';\n $i++;\n }\n }\n else if($word[$i+1]=='y' && $i+2==$n)\n {\n $result[$k++]='a';\n $result[$k++]='i';\n $i++;\n }\n \n else if($word[$i+1]=='u')\n {\n $result[$k++]='o';\n $i++;\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse if($i+1==$n)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$result[$k++]='a';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n break;\n \n case 'b' : $result[$k++]='b'; break;\n case 'c' : $result[$k++]='c'; break;\n case 'd' : $result[$k++]='d'; break;\n case 'e' : if($i==0)\n\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\t\t\t\t\t\t$result[$k++]='i';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n else if($word[$i+1]=='e')\n {\n if($word[$i+2]=='y');\n else $result[$k++]='i';\n $i++;\n }\n else if($word[$i+1]=='i' && $word[$i+2]=='n')\n {\n $result[$k++]='e';\n $i=$i+2;\n }\n else if($word[$i+1]=='i')\n {\n $result[$k++]='i';\n $i++;\n }\n else $result[$k++]='e'; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n break;\n \n case 'f' : $result[$k++]='f'; break;\n case 'g' : if($word[$i+1]=='h')\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\t\t$result[$k++]='g';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\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\telse $result[$k++]='g'; break;\n case 'h' : \n \n if($i+1==$n && ($word[$i-1]=='a' || $word[$i-1]=='e' || $word[$i-1]=='g' || $word[$i-1]=='j' || $word[$i-1]=='u'));\n else $result[$k++]='h';\n break;\n \n case 'i' : if($word[$i+1]=='y') ;\n \n else $result[$k++]='i'; break;\n case 'j' : if($word[$i+1]=='h')\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\t\t$result[$k++]='j';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\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\telse $result[$k++]='j'; break;\n case 'k' : $result[$k++]='k'; break;\n case 'l' : $result[$k++]= 'l'; break;\n case 'm' : $result[$k++]='m'; break;\n case 'n' : $result[$k++]='n'; break;\n case 'o' :if($word[$i+1]=='n' && $i==$n-2)\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\t\t$result[$k++]='o';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n else if($word[$i+1]=='w' || $word[$i+1]=='v' || $word[$i+1]=='u')\n {\n \n $result[$k++]='o';\n $i++;\n }\n else if($word[$i+1]=='o')\n {\n if($word[$i-1]=='r' && ($word[$i-2]=='m' || $word[$i-2]=='n' || $word[$i-2]=='v' || $word[$i-2]=='b' || $word[$i-2]=='g' || $word[$i-2]=='k'))\n {\n $result[$k++]='i';\n }\n else $result[$k++]='u';\n $i++;\n } \n else $result[$k++]='o'; break;\n case 'p' : \n if ($word[$i+1]=='h')\n {\n $result[$k++]='f';\n $i++;\n }\n else $result[$k++]='p';\n break;\n \n case 'q' : $result[$k++]='k'; break;\n case 'r' : $result[$k++]='r'; break;\n case 's' : if($word[$i+1]=='h')\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\t\t$result[$k++]='s';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\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\telse $result[$k++]='s'; break;\n case 't' : if($word[$i+1]=='h')\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\t\t$result[$k++]='t';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\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\telse $result[$k++]='t'; break;\n case 'u' : \n if($word[$i-1]=='r' && ($word[$i-2]=='m' || $word[$i-2]=='n' || $word[$i-2]=='v' || $word[$i-2]=='b' || $word[$i-2]=='g' || $word[$i-2]=='k'))\n {\n $result[$k++]='i';\n }\n else $result[$k++]='u'; break; \n case 'v' : $result[$k++]='v'; break;\n case 'w' : $result[$k++]='v'; break;\n case 'x' : \n $result[$k++]='k';\n $result[$k++]='s';\n break;\n \n case 'y' : \n if($i==strlen($word)-1)\n $result[$k++]='i';\n else $result[$k++]='y';\n break;\n case 'z' : if($word[$i+1]=='h')\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\t\t$result[$k++]='g';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$i++;\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\telse $result[$k++]='j'; break;\n case '1' : $result[$k++]='1'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '2' : $result[$k++]='2'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '3' : $result[$k++]='3'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '4' : $result[$k++]='4'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '5' : $result[$k++]='5'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '6' : $result[$k++]='6'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '7' : $result[$k++]='7'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '8' : $result[$k++]='8'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '9' : $result[$k++]='9'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t case '0' : $result[$k++]='0'; break;\n\t\t\t\t\t\t\t\t\t\t\t\t default : ;\n }\n }\n\t\t\t}\n return $result;\n\t\t}", "function extractGoodsCodeFromSINHYUPOrderGoods($str){\r\n\r\n $list = new LinkedList();\r\n $cnt=strlen($str);\r\n $max=0;\r\n $start=-1;\r\n for($i=0; $i<$cnt; $i++){\r\n $list->insertAtBack(ord(substr($str,$i,1)));\r\n }\r\n // echo \"size of List :\".$list->sizeOfList().\"<br>\";\r\n // echo \"cnt : $cnt<br>\";\r\n $curNode=$list->getHead();\r\n $i=0;\r\n while($curNode!=null){\r\n if($curNode->getData()>=48 && $curNode->getData()<=57 && $max!=3){//숫자라면\r\n if($start<0){\r\n $start=$i;\r\n }\r\n $max++;\r\n // echo $max.\"<br>\";\r\n\r\n }\r\n else{//숫자가 아니라면\r\n if($curNode->getData()==45 && $max==3){\r\n $max++;\r\n // echo $max.\"<br>\";\r\n }\r\n else{\r\n $max=0;\r\n $start=-1;\r\n }\r\n\r\n }\r\n if($max==10){\r\n\r\n $goodsCode=substr($str,$start,$max);\r\n // echo \"complete! goodsCode : \".$goodsCode.\"<br>\";\r\n $list=null;\r\n return $goodsCode;\r\n }\r\n $curNode=$curNode->getNext();\r\n $i++;\r\n\r\n }\r\n $goodsCode=\"\";\r\n $list=null;\r\n return $goodsCode;\r\n }", "function encodeTuulo'Esse($text)\r\n\t{\r\n\t\t// Activate tanya following line manka antaed\r\n\t\t// $text = \"=?{$sina->charSet}?B?\".base64_encode($text).\"?=\";\r\n\t\treturn $text;\r\n\t}", "function _gaiabb_autocompresp($string) {\n\n $matches = array();\n $result = db_select('gbb_gresp', 'c')\n ->fields('c', array('nomu'))\n ->condition('nomu', '%' . db_like($string) . '%', 'LIKE')\n ->distinct()\n ->range(0, 10)\n ->execute();\n foreach ($result as $r) {\n $matches[$r->nomu] = $r->nomu;\n }\n $count = $result->rowCount();\n if ($count > 9) $matches[' '] = '..... Et bien d\\'autres .....';\n drupal_json_output($matches);\n}", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "function Sandi_X_Dark_and_KangRepot(\r\n\t$_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199){$_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199=gzinflate(base64_decode($_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199));for($error=0;$error<strlen($_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199);$error++){$_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199[$error] = chr(ord($_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199[$error])-1);}return $_220eo0so0Ow00O0O0O0OO00OOOO00aiDf9Zxc9qi9991919191919919owk9kw19NjErrorScript091129929288284738382838383838382828282828282828201110110110Error0222111011101111011101111011101111011110111011111011111101111011111110111101111101111011110111011110000029293939292929191919191919199191919191191919199119919191919191919191919191913Usererrorr001010101010929292993919220201010101010101010101010101010110100110010100010101010101010100101010101010100101019101010101001011001010101919101091019101910191019919191919191222291991010101001010101010011001010101000101010101010101001010101010010101010101001010101010011001010101010101001010101010100101010101001010101010100110101xxxp1p1p01p10101p10101010101010100101010101010p1p1p1p1p1p1p1pp1p1p1p1p1ppp1p1p1peerorre10101010010192928e9192999298282828382829djd929iejdjdbsknzoanozka0kqnOMOAJOKAOnokqk99Skidiapapap0IjanOo01iei9947222222299993929292929292929292929292929292929292992292929292929010101010111181818skidpa1038i191919191919191919191919191919911919199;}", "function get_pengeluaran_by_akun5digitl3($data){\n// var_dump($data);die;\n $str_ = '';\n if(count($data['array_id']) > 1){\n foreach($data['array_id'] as $id){\n $str_ .= \"rsa_2018.rsa_kuitansi.id_kuitansi = '{$id}' OR \" ;\n }\n $str_ = substr($str_,0, strlen($str_) - 3 );\n }else{\n $str_ = \"rsa_2018.rsa_kuitansi.id_kuitansi = '{$data['array_id'][0]}'\" ;\n }\n // echo $str_ ; die;\n $str = \"SELECT SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,10) AS rka,rsa_2018.rsa_kuitansi.id_kuitansi,SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,10) AS kode_usulan_rkat,rba_2018.komponen_input.nama_komponen,rba_2018.subkomponen_input.nama_subkomponen,rba_2018.akun_belanja.nama_akun5digit,\"\n . \"rsa_2018.rsa_kuitansi.kode_akun5digit,SUM(rsa_2018.rsa_kuitansi_detail.volume*rsa_2018.rsa_kuitansi_detail.harga_satuan) AS pengeluaran \"\n . \"FROM rsa_2018.rsa_kuitansi \"\n . \"JOIN rsa_2018.rsa_kuitansi_detail \"\n . \"ON rsa_2018.rsa_kuitansi_detail.id_kuitansi = rsa_2018.rsa_kuitansi.id_kuitansi \"\n . \"JOIN rba_2018.komponen_input ON rba_2018.komponen_input.kode_kegiatan = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,2) \"\n . \"AND rba_2018.komponen_input.kode_output = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,9,2) \"\n . \"AND rba_2018.komponen_input.kode_program = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,11,2) \"\n . \"AND rba_2018.komponen_input.kode_komponen = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,13,2) \"\n . \"JOIN rba_2018.subkomponen_input ON rba_2018.subkomponen_input.kode_kegiatan = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,2) \"\n . \"AND rba_2018.subkomponen_input.kode_output = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,9,2) \"\n . \"AND rba_2018.subkomponen_input.kode_program = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,11,2) \"\n . \"AND rba_2018.subkomponen_input.kode_komponen = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,13,2) \"\n . \"AND rba_2018.subkomponen_input.kode_subkomponen = SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,15,2) \"\n . \"JOIN rba_2018.akun_belanja ON rba_2018.akun_belanja.kode_akun5digit = rsa_2018.rsa_kuitansi.kode_akun5digit \"\n . \"AND rba_2018.akun_belanja.kode_akun = rsa_2018.rsa_kuitansi.kode_akun \"\n . \"AND rba_2018.akun_belanja.sumber_dana = rsa_2018.rsa_kuitansi.sumber_dana \"\n . \"WHERE rsa_2018.rsa_kuitansi.kode_unit = '{$data['kode_unit_subunit']}' \"\n . \"AND rsa_2018.rsa_kuitansi.jenis = 'L3' \"\n . \"AND ( \" . $str_ . \" ) \"\n . \"AND rsa_2018.rsa_kuitansi.tahun = '{$data['tahun']}' \"\n . \"GROUP BY SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,10),SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,19,5) \"\n . \"ORDER BY SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,7,10) ASC,SUBSTR(rsa_2018.rsa_kuitansi.kode_usulan_belanja,19,5) ASC\";\n\n // echo $str;die;\n// var_dump($str);die;\n\n $q = $this->db->query($str);\n // var_dump($q->num_rows());die;\n if($q->num_rows() > 0){\n return $q->result();\n }else{\n return '';\n }\n }", "public function getNominaEtau4($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau4 \n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function getNominaEtau3($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau3\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function barbarella()\n\t{\n\t\tif (preg_match('/^([a-zA-Z0-9].+?) - \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Die.Nacht.Der.Creeps.THEATRICAL.GERMAN.1986.720p.BluRay.x264-GH - \"gh-notcreepskf720.nfo\" yEnc\n\t\t//The.Fast.and.the.Furious.Tokyo.Drift.2006.German.1080p.BluRay.x264.iNTERNAL-MWS - \"mws-tfatftd-1080p.nfo\" yEnc\n\t\tif (preg_match('/^([\\w.-]+)\\s+-\\s+\".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64<><>DRM<><> - (10/48) \"CorelDRAW Technical Suite X6-16.3.0.1114 x32-x64.part09.rar\" - 2,01 GB - yEnc\n\t\t//AnyDVD_7.1.9.3_-_HD-BR - Beta<>give-me-all.org<>DRM<><> - (1/3) \"AnyDVD_7.1.9.3_-_HD-BR - Beta.par2\" - 14,53 MB - yEnc\n\t\t//Android Softarchive.net Collection Pack 27^^give-me-all.org^^^^DRM^^^^ - (01/26) \"Android Softarchive.net Collection Pack 27.par2\" - 1,01 GB - yEnc\n\t\t//WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL <> give-me-all.org <> DRM <> <> PW <> - (154/155) \"WIN7_ULT_SP1_x86_x64_IE10_19_05_13_TRIBAL.vol57+11.par2\" - 7,03 GB - yEnc\n\t\t//[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45 <> DRM <> - (1/3) \"[Android].Ultimate.iOS7.Apex.Nova.Theme.v1.45.par2\" - 21,14 MB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.|reup\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\) \".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(004/114) - Description - \"Pluralsight.net XAML Patterns (10).rar\" - 532,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - .+? - \"(.+?)( \\(\\d+\\))?' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(01/12) - \"TransX - Living on a Video 1993.part01.rar\" - 561,55 MB - TransX - Living on a Video 1993.[Lossless] Highh Quality yEnc\n\t\t//(59/81) \"1973 .Lee.Jun.Fan.DVD9.untouched.z46\" - 7,29 GB - Lee.Jun.Fan.sein.Film.DVD9.untouched yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\)( -)? \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - (.+?) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //>>> www.lords-of-usenet.org <<< \"Der Schuh Des Manitu.par2\" DVD5 [001/158] - 4,29 GB yEnc\n\t\tif (preg_match('/^>>> www\\.lords-of-usenet\\.org <<<.+? \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' .+? \\[\\d+\\/\\d+\\] - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//NEUES 4y - [@ usenet-4all.info - powered by ssl.news -] [5,58 GB] [002/120] \"DovakinPack.part002.rar\" yEnc\n\t\t//NEUES 4y (PW) [@ usenet-4all.info - powered by ssl.news -] [7,05 GB] [014/152] \"EngelsGleich.part014.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Old Dad uppt Die Schatzinsel Teil 1+Teil2 AC3 DVD Rip German XviD Wp 01/33] - \"upp11.par2\" yEnc\n\t\t//Old Dad uppt Scary Movie5 WEB RiP Line XviD German 01/24] - \"Scary Movie 5.par2\" yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9].+?\\s{2,}|Old Dad uppt\\s+)(.+?) \\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//>>> 20,36 MB \"Winamp.Pro.v5.70.3392.Incl.Keygen-FFF.par2\" 552 B yEnc\n\t\t//..:[DoAsYouLike]:.. 9,64 MB \"Snooper 1.39.5.par2\" 468 B yEnc\n\t\tif (preg_match('/^.+?\\s{2,}\\d+[,.]\\d+ [mMkKgG][bB]\\s{2,}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '\\s{2,}(\\d+ B|\\d+[,.]\\d+ [mMkKgG][bB]) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(MKV - DVD - Rip - German - English - Italiano) - \"CALIGULA (1982) UNCUT.sfv\" yEnc\n\t\tif (preg_match('/^\\(.+?\\) - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"sre56565ztrtzuzi8inzufft.par2\" yEnc\n\t\tif (preg_match('/^\"([a-z0-9]+)' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function limpiarcadena($char)\n{\n\t$ban=0;//Bandera para saber si estan ejecutando una Inyeccion SQL\n\t$char_w_replaced = stripslashes($char);//Guardamos la Inyeccion original para informacion a la BD\n\t//Array con las palabras reservadas, para modificar a gusto :D\n\t$hack_array = array(\"'\", '\"', \";\", \"UNION\", \"union\", \"DROP\", \"drop\", \"table\", \"TABLE\", \"SET\", \"set\", \"UPDATE\", \"update\", \"SELECT\", \"select\", \"-\", \"--\", \"MEMB_INFO\", \"memb_info\", \"memb__pwd\", \"memb___id\"); //Caracter por el que será reemplazada cada palabra reservada del sitio\n\t$hack_replace = \"\"; //Separamos la cadena en un Array para poder hacer la comparacion y determinar si estan\n\t//ejecutando o no una Inyeccion SQL\n\t$char1=explode(\" \",$char);\n\tfor($i=0;$i<count($char1);$i++)\n\t{\n\t\tif(in_array($char1[$i],$hack_array))//si se quiere se puede convertir todo a mayusculas para la comprobacion.\n\t\t{\n\t \t\t$ban=1;\n\t\t}\n\t}\n\t\n\tif ($ban==1)\n\t{\n\t\t$add=\"ESTAS HACKEANDO SI SI\"; \t\n\t}\n\telse \n\t{\n\t\t$add=\"NO ESTAS HACKEANDO\"; \n\t\t//seguir con los procesos del POST o GET sin guardar ips ni nada\n\t} \n\t\n\t//reemplazamos las palabras reservadas\n\t$char_replaced = str_replace($hack_array, $hack_replace, $char);\n\t//evitamos codigos html y espacios en blanco\n\t$char_clean=htmlentities(trim($char_replaced)); //retornamos la cadena limpia para usar en nuestra consulta, o podemos devolver segun el resultado de ban\n\t//un die para no ejecutar nada o como se les ocurra\n\treturn $char_clean;\n}", "function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}", "function luas_alas_balok($nilai1, $nilai2) {\n\t\n\t\n\t\n\t\n\t}", "function guess_all()\n {\n# init variables\n $accent_db=$this->accent_db;\n $h_db=$this->h_db;\n $ent_db=$this->ent_db;\n $hiatus_db=\"hiatus_db\";\n \n $req_accent=requete(\"SELECT a.mot, a.syllabe , a.vers_n ,a.syllabe_n, a.accent \n FROM $accent_db a \n WHERE \n a.id_piece='{$this->id_piece}' \n ORDER BY a.vers_n,a.syllabe_n;\"); \n while($response=fetch_array($req_accent))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->accent=($response['accent']==1)?(TRUE):(FALSE);\n \n }\n }\n\n }\n \n \n $req_h=requete(\"SELECT vers_n , syllabe_n , aspire \n FROM $h_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n while($response=fetch_array($req_h))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->h=($response['aspire']==1)?(TRUE):(FALSE);\n \n }\n }\n } \n \n \n $req_ent=requete(\"SELECT vers_n , syllabe_n , grave\n FROM $ent_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n while($response=fetch_array($req_ent))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->ent=($response['grave']==1)?(TRUE):(FALSE);\n \n }\n }\n }\n \n \n \n# on s'occupe des hiatus\n $req_hiatus=requete(\"SELECT vers_n, syllabe_n,start_hiatus,end_hiatus,start_pos,end_pos\n FROM $hiatus_db \n WHERE id_piece='{$this->id_piece}'\n ORDER BY vers_n,syllabe_n\");\n \n while($response=fetch_array($req_hiatus))\n {\n $real_vers_n=$response[\"vers_n\"];\n $vers_n=$real_vers_n-1;\n $real_syllabe_n=$response[\"syllabe_n\"];\n $syllabe_n=$real_syllabe_n-1;\n if($vers_n < count($this->texte->vers))\n {\n if($syllabe_n < count($this->texte->vers[$vers_n]->syllabes))\n {\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->start_hiatus=($response['start_hiatus']==1)?(TRUE):(FALSE);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->end_hiatus=($response['end_hiatus']==1)?(TRUE):(FALSE);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->start_pos=($response['start_pos']);\n $this->texte->vers[$vers_n]->syllabes[$syllabe_n]->end_pos=($response['end_pos']);\n \n }\n }\n }\n }", "public function getNominaEtau2($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau2\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function interdit($message) {//=NULL) {\n\t// Liste des 899 mots interdits dans l'espace membre\n\t// \t\t-> insultes\n\t// \t\t-> language SMS\n\t// Vous pouvez allonger cette liste en mettant ( | ) sans espace entre chaque mot interdit\n\t\t$motInterdit = \"/\\b(anus|baise|baisee|baisent|baiser|baises|baisé|baisée|baisées|baisés|baiz|bande de tâches|bander|barez-vous|barrez-vous-batard|batarde|batardes|batards|bite|bites|bitte|bittes|bondage|bondages|bonnasse|bonnasses|bordel|bordels|branle|branler|branles|branlette|branlettes|branlé|branlés|bâtard|bâtarde|bâtardes|bâtards|bèz|c o n|c o*n|c o^n|c*o n|c*o*n|c*on|c^o n|c^o^n|caca|cacas|casse-toi|cassez-vous|chatte|chiasse|chie|chient|chier|chié|chiées|chiés|clitau|clito|co n|co*n|cocu|cocus|con|con nard|con nards|conar|conard|conarde|conardes|conards|conasse|conasses|connar|connard|connarde|connardes|connards|connasse|connasses|conne|Connerie|Conneries|connes|cons|couille|couilles|couye|couyes|creve|crève|cul|culs|cuni|cunilingus|de ta mer|de ta mere|de ta mèr|de ta mère|debil|debile|debiles|débil|débile|débiles|echangisme|emerde|emerdent|emerder|emerdeur|emerdeurs|emerdeuse|emerdeuses|emerdé|emerdée|emerdés|emmerde|emmerdent|emmerder|emmerdeur|emmerdeurs|emmerdeuse|emmerdeuses|emmerdé|emmerdée|emmerdés|en cul|en cule|en culer|en cules|encule|enculer|encules|enculé|enculés|enfoiré|enfoirée|enfoirées|enfoirés|et ta mere|et ta mère|exta|f o ck|f o k|F U C K|f u ck|f.uck|f_u_c_k|faire mettre|fcuk|fcvk|fela tion|felation|fella tion|fellation|fI_Ick|fl_lck|fo ck|foc k|fock|foutoir|foutoire|foutre|foutrement|fu c k|fu ck|fu.ck|fuc|fuc.k|FUCK|fuk|fuque|fuuck|fuuuck|fuuuuck|fuuuuuck|fvck|féla tion|féla tions|félation|félations|gouine|gouines|gouinne|gouinnes|groniasse|groniasses|k o n|k o*n|k o^n|k o_n|k*o n|k*o*n|k*on|k^o n|k^o^n|k_o n|k_o_n|ko n|ko*n|kon|konasse|konasses|konnasse|konnasses|kons|Lesbien|Lesbiene|Lesbienes|lesbienne|Lesbiens|Lesbo|Lesbos|maso|masturbator|masturbe|masturber|masturbé|masturbée|masturbées|masturbés|meeerdes|meeerdeux|meerdes|meerdeux|merdes|merdeux|morveuse|morveuses|morveux|nasi|nasis|nazi|nazis|negre|negres|negrillon|negrillons|negro|negros|nibard|nibards|nichon|nichons|nik|nike|nique|niquer|niqué|niquée|niquées|niqués|negre|negres|negro|negros|negresse|négresse|nègre|nègres|négrillon|négrillons|négro|négros|ordure|ordures|p u t a i n|p u t a i n s|partouse|partouses|partouze|partouzes|pd|pdd|pddd|pdddd|pddddd|pdddddd|pddddddd|pds|pedale|pedales|pede|pederaste|pederastes|pedes|penis|pennis|petasse|petasses|phuck|pignouf|pignoufette|pi|noufettes|pignoufs|pisse|pissee|pissees|pisser|pisses|pissé|pissée|pissées|pissés|plouc|ploucs|plouk|plouks|porno|pornos|pouffiass|pouffiasse|pouffiasses|poufiasse|pouf­fiass|pouf­fiasse|pouf­fiasses|Prostitue|Prostituee|Prostituees|Prostitues|Prostitué|Prostituée|Prostituées|Prostitués|prout|put|put ain|put ains|put in|put ins|put1|putain|putains|pute|putes|putin|putins|putte|puttes|puttin|puttins|pédale|pédales|pédé|pédéraste|pédérastes|pédés|pénétration|pétasse|pétasses|s e x|s e x e|s e x*e|s e xe|s e*x|s ex|s ex e|s ex*e|s exe|sado|salau|salaud|salauds|salaus|salaut|salauts|sale arabe|sallo|sallop|sallopard|sallopards|sallope|sallopes|salloppard|salloppards|salloppe|salloppes|sallos|sallot|sallots|salo|salop|salopard|salopards|salope|salopes|saloppard|saloppards|saloppe|saloppes|salos|salot|salots|se x|se*x|sex|sex e|sex*e|sexe|shit|skinhead|sodomie|sodomise|sodomisee|sodomisees|sodomisent|sodomiser|sodomises|sodomisé|sodomisée|sodomisées|sodomisés|sperm|sperme|spermes|suce|suck|tete de noeud|tetes de noeud|tête de noeud|têtes de noeud|va te faire|va te fer|va te fere|va te fèr|va te fère|vagin|vagins|zizi|zizis|1e|1st|1dispo|1posibl|1diféren|1trec|1ternet|1vit|1mn|2min|2ri1|2l8|2labal|2m1|2mand|2van|2vanc|4me|5pa|6gar|6garet|6né|6nema|6T|7adir|7ad|10ko|ab1to|akro|a2m1|af'r|afr|aJ|aG|éD|alé|AR|aPero|a+|apré|aprè|aprem|aprè-mi10|apré-mi10|areT|ariv|a12c4|asap|avan|avanC|ayé|abiT|azar|aniv|aK|aps|avc|avk|azar|AL1DI|ard|admin|ADMIN|ATK|arf|balaD|bavar|bavarD|bi1|bi1sur|bi1to|bizz|bap|bsr|boC|blèm|B|b1|bc|Bdo|BG|bj|bocou|bogos|bye|cé|cad|c b1|c sa|c cho|c 2 labal|c mal1|CT|chanG|capou|chuis|chanmé|CriE|C|camé|cam|came|Cdla|celib|celibatR|chi1|Clib|cok1|cokin|cokine|cok1e|colR|comen|dico|cc|colok|condé|dak|danC|ds|D6D|DpenC|dê|dS100|DzSPré|Dzolé|dsl|DtST|diskuT|douT|d1gue|daron|D|daronne|darone|deuspi|dico|die|DEF|écouT|empr1T|enfR|en+|épaT|éxagR|exClen|exQzé|exiG|éziT|Er|E|enkor|entouK|entouka|epaT|ErE|ErEze|fRfet|fiR|meuf|fliP|francè|FR|frR|fr8|foto|FM|FMloJ|F|fb|frero|foo|fliKé|flik|fone|fonetel|gan|Gen|Gnial|gré|glnD|GraV|G la N|GPTléplon|G|gova|gater6|gd|gde|Gnial|grav|gro|Gséré|GG|HT|H|hard|hl|IR|isTrik|ID|ImaJn|I|ie|irl|jalou|jamé|j'le sav|jenémar|jSpR ktu va bi1|jtm|je t'M|j'tapLdkej'pe|jeteléDjadi|jT|jr|JuG|J|jaten|jme|jsai|jsui|jtem|jtaim|Kdo|keum|Kfar|Kfé|Kl1|Knon|Kc|klR|koQ|kEr|komanD|Kom|komencava|koncR|kontST|kruL|karaT|ke|kL|kLq1|kelkun|keske|keske C|kekina|kestion|ki|kil|koi|koa|kwa|koi29|K|KS|kisdé|kif|jtkif|k7|kan|Ksos|LcKc|lol|l1di|lakL|lekL|l8|lH|l'S tomB|LC|L|LVL|ll|mek|magaz1|m1tNan|mnt|mè|kaze|malad|mal1|manG|mat1|max|mm|ménaG|mR|mê|msg|mne|m jvb|MDR|moy1|muscQ|muscu|muzik|muzic|M|m'man|MP|msg|ml|NRV|néCsR|nRvE|nc|no|nb|nombrE|nouvL|nouvo|NRJ|N|news|ns|ok1|oQne|Ojourd8|ojourd'8|ouf|orEr|otL|OQP|Ô|oZ|ouvR|O|oci|oreur|ou1j|ouinj|OMG|partut|partt|paC|péyé|pRturB|pE|piG|poa|po1|poz|pr|pk|prtan|prtant|preC|pb|P|p'pa|ptdr|POULAGA|PANAM|PANAME|poto|pr|ppr|pti|ptite|plon|qoa|qd|quiT|Q|QG|reuch|remps|rapl|ra|rejo1|rdv|répt|rstp|rep|resto|retard|réu|réucir|ri1|rafr|ras|ru|r|reuf|savapa|sniiif|snif|slt|slt cav ?|savoar|semN|stp|sk8|seur|spor|strC|S|sked|SKEUD|tR|tarD|tps|Tê|ti2|tle +bo|tpa fâché|TT|tabitou|2day|tjr|tt|tr1|trankil|taf|tafer|tu vi1 2m1 ?|T|Tci|tsss|ts|utilizé|U|vazi|Vlo|vR|vi1|vs|VoyaG|vrMen|V|VIP|W|WE|W.E|wesh|WTF|wé|wi|wy|X|X-trem|Xtrem|xpldr|Xcité|Xcit|xd|xplorer|xplozé|xploz|xplor|yo|y|é|ye|yè|ya|yâ|Z|zN|ziva|zonmé)\\b/ui\";\n\t\t$message = str_replace(\"'\", \"\", $message);\n\t\tif(!empty($message)) {\n\t\t\tif(preg_match($motInterdit, $message)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "function iptsr_internal_deb($debata_id) {\n\t$rocnik = cpdb_fetch_one_value(\"select rocnik from debata left join soutez using (soutez_ID) where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t$status = true;\n\tcpdb_transaction();\n\t\n\t// vycistit\n\t$status &= cpdb_exec(\"delete from clovek_debata_ibody where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t// --- debateri\n\t// (podle poharovych bodu)\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_debata.clovek_ID, clovek_debata.debata_ID, :rocnik, 'debater', debata_tym.body * 0.1 from clovek_debata left join debata_tym on clovek_debata.debata_ID = debata_tym.debata_ID and substring(clovek_debata.role,1,1) = elt(debata_tym.pozice + 1,'n','a') where clovek_debata.debata_ID = :debata_id and find_in_set(clovek_debata.role,'a1,a2,a3,n1,n2,n3')\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\t\n\t// --- rozhodci\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_ID, debata_ID, :rocnik, 'rozhodci', 1 from clovek_debata where debata_ID = :debata_id and role = 'r'\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\n\t// --- treneri\n\t$treneri_dostanou = array();\n\t\n\tif (cpdb_fetch_all(\"select clovek_ID, ibody from clovek_debata_ibody where debata_ID = :debata_id and role = 'debater'\", array(\":debata_id\"=>$debata_id), $debateri)) {\n\t\tforeach ($debateri as $debater) {\n\t\t\t$pocet_treneru = cpdb_fetch_all(\"\n\t\t\t\tselect\n\t\t\t\t\tdk.clovek_ID as clovek_ID\n\t\t\t\tfrom\n\t\t\t\t\tclovek d, clovek_klub dk\n\t\t\t\twhere\n\t\t\t\t\td.clovek_ID = :clovek_ID\n\t\t\t\t\tand d.klub_ID = dk.klub_ID\n\t\t\t\t\tand dk.role = 't'\n\t\t\t\t\tand dk.rocnik = :rocnik\n\t\t\t\t\", array(\":clovek_ID\"=>$debater[\"clovek_ID\"], \":rocnik\"=>$rocnik), $treneri);\n\t\t\t\n\t\t\tforeach ($treneri as $trener) {\n\t\t\t\t$treneri_dostanou[$trener[\"clovek_ID\"]] += 0.1 * $debater[\"ibody\"] / $pocet_treneru;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tforeach ($treneri_dostanou as $trener_cid => $trener_ib) {\n\t\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'trener', :ibody)\", array(\":clovek_id\"=>$trener_cid, \":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik, \":ibody\"=>$trener_ib));\n\t}\n\t\n\t// --- organizatori\n\t$dostanou = 0.15; // kolik IB je z debaty\n\t$zasluhy_primych = 1; // defaultni zasluhy u primych ogranizatoru\n\t$celkem_zasluhy = 0;\n\t$zasluhy = array();\n\t\n\t// primi\n\tcpdb_fetch_all(\n\t\t\"select clovek_ID from clovek_debata where clovek_debata.role = 'o' and debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id), $res_primi);\n\t\n\tforeach ($res_primi as $org) {\n\t\t$celkem_zasluhy += $zasluhy_primych;\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $zasluhy_primych;\n\t}\n\t\n\t// neprimi\n\tcpdb_fetch_all(\"\n\t\tselect\n\t\t\tclovek_turnaj.clovek_ID,\n\t\t\tclovek_turnaj.mocnost\n\t\tfrom\n\t\t\tdebata, clovek_turnaj\n\t\twhere\n\t\t\tdebata.debata_ID = :debata_id\n\t\t\tand clovek_turnaj.turnaj_ID = debata.turnaj_ID\n\t\t\tand clovek_turnaj.role = 'o'\n\t\", array(\":debata_id\"=>$debata_id), $res_neprimi);\n\t\n\tforeach($res_neprimi as $org) {\n\t\t$celkem_zasluhy += $org[\"mocnost\"];\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $org[\"mocnost\"];\n\t}\n\t\n\tforeach($zasluhy as $org_cid => $org_zasluhy) {\n\t\t$status &= cpdb_exec(\n\t\t\t\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'organizator', :ibody)\",\n\t\t\tarray(\n\t\t\t\t\":clovek_id\" => $org_cid,\n\t\t\t\t\":debata_id\" => $debata_id,\n\t\t\t\t\":rocnik\" => $rocnik,\n\t\t\t\t\":ibody\" => $dostanou * $org_zasluhy / $celkem_zasluhy\n\t\t\t)\n\t\t);\n\t}\n\t\n\t// zaver\n\tif ($status) {\n\t\tcpdb_commit();\n\t} else {\n\t\tcpdb_rollback();\n\t}\n}", "function editSeq2($num, $post = false)\n{\n $hp = new Http();\n\n\n for ($id = 10417; $id <= 10616; $id++) {\n\n $r = intval(rand(-80, 80));\n while ($r == 0) {\n $r = intval(rand(-80, 80));\n }\n $b = intval(rand(-80, 80));\n $p = intval(rand(1, 4));\n\n $m = intval(rand(1, 5));\n\n $title = '';\n for ($i = 0; $i < 7; $i++) {\n //An = Rn^p + B, 填中间\n// if($i == $m){\n// $title = $title . \",?\";\n// continue;\n// }\n\n $data = $r * pow($i, $p) + $b;\n if ($i == 0) {\n $title = $title . \"$data\";\n } else {\n $title = $title . \",$data\";\n }\n }\n\n// An = Rn^p + B, 填末尾\n $title = $title . \",?\";\n $res = $r * pow(7, $p) + $b;\n //An = Rn^p + B, 填中间\n// $res = $r* pow($m,$p) + $b;\n\n $ar = [$res, $res + intval(rand(-5, -3)), $res + intval(rand(-2, -1)), $res + intval(rand(1, 4))];\n shuffle($ar);\n $optionAr = [\n 'a' => $ar[0],\n 'b' => $ar[1],\n 'c' => $ar[2],\n 'd' => $ar[3],\n ];\n //find correct answer\n for ($i = 0; $i < 4; $i++) {\n if ($ar[$i] == $res) {\n break;\n }\n }\n\n $ks = ['a', 'b', 'c', 'd'];\n $answers = [$ks[$i]];\n $language = 'en';\n $classification = 'sequence';\n $pro_type = 'exclusive choice';\n $pro_source = 'new-train-seq';\n if ($b == 0) {\n $hint = \"A[n]=$r*n^$p\";\n } else if ($b > 0) {\n $hint = \"A[n]=$r*n^$p+$b\";\n } else {\n $hint = \"A[n]=$r*n^$p$b\";\n\n }\n $problem_info = compact('title', 'optionAr', 'answers', 'language', 'classification', 'pro_type', 'pro_source', 'hint');\n\n echo 'id' . $id;\n echo PHP_EOL;\n echo json_encode($problem_info);//insert\n echo PHP_EOL;\n\n if ($post) {\n $hp->post('http://exp.szer.me/parry/testlib/problem/' . $id, $problem_info, false);\n } else {\n echo \"no post\";\n echo PHP_EOL;\n }\n }\n\n curl_close($hp->ch);\n\n\n}", "private function generateNilaiHuruf($thn_ajaran = NULL, $smt = NULL, $kode_kel = NULL, $nbi = NULL) {\r\n if ( !$this->session->userdata('isLecturerTps') && !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n $dataFilter = [\r\n 'thn_ajaran' => $thn_ajaran,\r\n 'smt' => $smt,\r\n 'kode_kel' => $kode_kel,\r\n 'nbi' => $nbi\r\n ];\r\n\r\n $dataAnggota = $this->M_anggota->getAnggota($dataFilter)->row();\r\n\r\n if ( $dataAnggota ) {\r\n\r\n // Perhitungan Nilai Huruf\r\n if ( $dataAnggota->nilai_akhir > 85 )\r\n $nilaiHuruf = 'A';\r\n else if ( $dataAnggota->nilai_akhir > 80 && $dataAnggota->nilai_akhir <= 85 )\r\n $nilaiHuruf = 'A-';\r\n else if ( $dataAnggota->nilai_akhir > 75 && $dataAnggota->nilai_akhir <= 80 )\r\n $nilaiHuruf = 'AB';\r\n else if ( $dataAnggota->nilai_akhir > 70 && $dataAnggota->nilai_akhir <= 75 )\r\n $nilaiHuruf = 'B+';\r\n else if ( $dataAnggota->nilai_akhir > 65 && $dataAnggota->nilai_akhir <= 70 )\r\n $nilaiHuruf = 'B';\r\n else if ( $dataAnggota->nilai_akhir > 60 && $dataAnggota->nilai_akhir <= 65 )\r\n $nilaiHuruf = 'B-';\r\n else if ( $dataAnggota->nilai_akhir > 55 && $dataAnggota->nilai_akhir <= 60 )\r\n $nilaiHuruf = 'BC';\r\n else if ( $dataAnggota->nilai_akhir > 50 && $dataAnggota->nilai_akhir <= 55 )\r\n $nilaiHuruf = 'C+';\r\n else if ( $dataAnggota->nilai_akhir > 45 && $dataAnggota->nilai_akhir <= 50 )\r\n $nilaiHuruf = 'C';\r\n else if ( $dataAnggota->nilai_akhir > 40 && $dataAnggota->nilai_akhir <= 45 )\r\n $nilaiHuruf = 'C-';\r\n else if ( $dataAnggota->nilai_akhir > 35 && $dataAnggota->nilai_akhir <= 40 )\r\n $nilaiHuruf = 'CD';\r\n else if ( $dataAnggota->nilai_akhir > 30 && $dataAnggota->nilai_akhir <= 35 )\r\n $nilaiHuruf = 'D';\r\n else if ( $dataAnggota->nilai_akhir >= 0 && $dataAnggota->nilai_akhir <=30 )\r\n $nilaiHuruf = 'E';\r\n else\r\n $nilaiHuruf = 'F';\r\n // Perhitungan Nilai Huruf\r\n\r\n $dataUpdate = ['nilai_huruf' => $nilaiHuruf];\r\n $updateHuruf = $this->M_anggota->update($thn_ajaran,$smt,$kode_kel,$nbi,$dataUpdate);\r\n\r\n if ( $updateHuruf ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } else {\r\n return false;\r\n }\r\n }", "public static function BaoCaoTheoDanhGia($tu_ngay,$den_ngay,$diaBanIdAllArray,$loai_baocao)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n if($loai_baocao ==\"KhieuNai\")\n {\n $donthu_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',1)\n ->pluck('donthuid');\n }\n else\n {\n $donthu_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',2)\n ->pluck('donthuid');\n }\n\n\n //data dung\n\n $data_dung_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',DUNG)\n ->pluck('donthuid');\n\n $data_dung = DB::table('donthu')\n ->whereIn('donthuid',$data_dung_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //dung mot phan\n $data_motphan_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',DUNG_MOT_PHAN)\n ->pluck('donthuid');\n\n $dung_mot_phan = DB::table('donthu')\n ->whereIn('donthuid',$data_motphan_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //data sai\n $data_sai_id = DB::table('ketquagiaiquyet')\n ->whereIn('donthuid',$donthu_id)\n ->where('danhgiadonthu',SAI)\n ->pluck('donthuid');\n\n $data_sai = DB::table('donthu')\n ->whereIn('donthuid',$data_sai_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n $array_danhgia = array(\n 'dung'=>$data_dung,\n 'dung_mot_phan'=>$dung_mot_phan,\n 'sai'=>$data_sai\n );\n\n return $array_danhgia;\n }", "function buat_karakter($nilai) {\n\t$panjang = strlen($nilai);\n\t\n\tif($panjang % 16 != 0) {\n\t\tfor($i = 0 ; $i < 16 - ($panjang % 16) ; $i++) {\n\t\t\t$nilai .= \" \";\n\t\t}\n\t}\n\n\t$panjang = strlen($nilai);\n\t// echo $nilai . \"<br />\";\n\n\t$hasil = \"\";\n\t$arrHasil = array();\n\n\t// echo $panjang.\"<br />\";\n\n\tfor($i = 0 ; $i < $panjang ; $i++) {\n\t\t\n\t\t$hasil .= $nilai[$i];\n\n\t\tif(strlen($hasil) == 16) {\n\t\t\t$arrHasil[] = $hasil;\n\t\t\t$hasil = \"\";\n\t\t}\n\t}\n\treturn $arrHasil;\n}", "function DanhMuc_Them(&$loi){\t\n\t\n\t\t$thanhcong=true;\n\t\t\n\t\t$quocgia = $_POST[quocgia];settype($quocgia,\"int\");\n\t\t$idMien = $_POST[idMien];settype($idMien,\"int\");\n\t\t$TenDM_KS = $this->processData($_POST[TenDM_KS]);\n\t\t$TenDM_KS_KD = $this->processData($_POST[TenDM_KS_KD]);\n\t\t$Title = $this->processData($_POST[Title]);\n\t\t$MetaD = $this->processData($_POST[MetaD]);\n\t\t$MetaK = $this->processData($_POST[MetaK]);\n\t\t\n\t\t$ThuTu = $this->ThuTuMax('dvt_ks_danhmuc') + 1;\n\t\t\n\t\t$AnHien = $_POST[AnHien];settype($AnHien,\"int\");\n\t\t\n\t\tif($Title==\"\") $Title=$TenDM_KS;\n\t\tif($MetaD==\"\") $MetaD=$TenDM_KS;\n\t\tif($MetaK==\"\") $MetaK=$TenDM_KS;\n\t\tif($TenDM_KS_KD==\"\") $TenDM_KS_KD = $this->changeTitle($TenDM_KS);\n\t\t\n\t\tif($idMien==0 && $quocgia==0)\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[idMien]= \"Chọn miền\";\n\t\t}\n\t\tif($TenDM_KS==\"\")\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[TenDM_KS]= \"Chưa nhập tên danh mục\";\n\t\t}\n\t\n\t\tif($thanhcong==false){\n\t\t\treturn $thanhcong;\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO dvt_ks_danhmuc \n\t\t\t\t\tVALUES(NULL,$quocgia,$idMien,'$TenDM_KS','$TenDM_KS_KD','$Title','$MetaD','$MetaK',$ThuTu,$AnHien)\";\n\t\t\tmysql_query($sql) or die(mysql_error().$sql);\t\t\n\t\t}\n\t\treturn $thanhcong;\n\t}", "public function content_pengiriman_otw($id_cabang)\n {\n $query = \"\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,cabang_daerah,toko_nama,toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_pengiriman.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n union\n select id_pk_penerimaan,id_pk_brg_pemenuhan,id_pk_brg_pengiriman,brg_pengiriman_qty,brg_pengiriman_note,brg_pemenuhan_status,pengiriman_tgl,warehouse_alamat as cabang_daerah,warehouse_nama as toko_nama,'-' as toko_kode,brg_nama,brg_kode,ifnull(penerimaan_tgl,'-') as penerimaan_tgl\n from tbl_brg_pengiriman\n inner join mstr_pengiriman on mstr_pengiriman.id_pk_pengiriman = tbl_brg_pengiriman.id_fk_pengiriman and mstr_pengiriman.pengiriman_status = 'aktif' #harus yang jadi terkirim bukan yang dicancel\n inner join mstr_warehouse on mstr_warehouse.id_pk_warehouse = mstr_pengiriman.id_fk_warehouse\n inner join mstr_cabang on mstr_cabang.id_pk_cabang = mstr_warehouse.id_fk_cabang #dapetin daerah cabang\n inner join mstr_toko on mstr_toko.id_pk_toko = mstr_cabang.id_fk_toko #dapetin nama toko\n inner join tbl_brg_pemenuhan on tbl_brg_pemenuhan.id_pk_brg_pemenuhan = tbl_brg_pengiriman.id_fk_brg_pemenuhan #cuman untuk dapetin id_cabang_minta & id_barang\n inner join tbl_brg_permintaan on tbl_brg_permintaan.id_pk_brg_permintaan = tbl_brg_pemenuhan.id_fk_brg_permintaan and tbl_brg_permintaan.id_fk_cabang = ? #menentukan peminta barang yang akan jadi penerima\n inner join mstr_barang on mstr_barang.id_pk_brg = tbl_brg_permintaan.id_fk_brg #dapetin detail barang\n left join tbl_brg_penerimaan on tbl_brg_penerimaan.id_fk_brg_pengiriman = tbl_brg_pengiriman.id_pk_brg_pengiriman and tbl_brg_penerimaan.brg_penerimaan_qty > 0 #dianggap diterima apabila brgditerima > 0 (klo delete, ini ke 0 sendiri)\n left join mstr_penerimaan on mstr_penerimaan.id_pk_penerimaan = tbl_brg_penerimaan.id_fk_penerimaan and mstr_penerimaan.penerimaan_status = 'aktif' and mstr_penerimaan.penerimaan_tipe = 'permintaan' #dianggap diterima apabila status penerimaan > 0\n where tbl_brg_pengiriman.brg_pengiriman_qty > 0 #dianggap terkirim apabila tidak di cancel (klo cancel, qty jadi 0)\n and brg_pemenuhan_status = 'perjalanan'\n order by pengiriman_tgl DESC\";\n $args = array(\n $id_cabang, $id_cabang\n );\n //executeQuery($query,$args); echo $this->db->last_query();\n return executeQuery($query, $args);\n }", "private function getInput(): string\n {\n return 'byr:1971\neyr:2039\nhgt:172in pid:170cm hcl:17106b iyr:2012 ecl:gry\ncid:339\n\nhgt:161cm eyr:2027\necl:grn iyr:2011 hcl:#a97842 byr:1977 pid:910468396\n\ncid:257\necl:gry hgt:186cm iyr:2012\nbyr:1941\neyr:2029\npid:108935675\nhcl:#cfa07d\n\nhgt:165in\nhcl:#cfa07d eyr:2035 pid:82570731\nbyr:1973\ncid:74 ecl:xry\n\neyr:2020 cid:105 iyr:2012 pid:947726115\nhcl:#ceb3a1 ecl:grn byr:1966 hgt:151cm\n\nhcl:#888785 eyr:2027 ecl:hzl byr:1966\npid:853607760\niyr:2012\nhgt:155cm\n\nhgt:61cm\niyr:2019\nbyr:1952 pid:#1468e6 eyr:2033 ecl:#7d39d5 hcl:z\n\npid:2306523501\neyr:2032 hcl:z ecl:brn\ncid:266 hgt:151in iyr:2024\nbyr:2008\n\nhcl:#a97842 hgt:191cm eyr:2025 ecl:gry byr:1923 pid:574171850 iyr:2019\n\nhgt:140\niyr:1987 byr:2003\neyr:2013 cid:242 hcl:z\necl:#19177c pid:150cm\n\nbyr:1959\nhgt:169cm hcl:#7d3b0c ecl:gry eyr:2028 cid:107 pid:584790749\n\nbyr:1955\ncid:309\nhcl:#a97842\npid:740105085 iyr:2020\nhgt:188cm ecl:oth eyr:2029\n\niyr:2016 hcl:#cfa07d eyr:2026\nhgt:151cm\npid:394185014 ecl:grn byr:1974\n\npid:226566060 ecl:blu cid:272 hgt:188cm hcl:#efcc98\neyr:2029 iyr:2014\nbyr:1956\n\npid:#7c7a9d ecl:#8fa327\neyr:2006 iyr:2022\nhcl:#7d3b0c hgt:169\nbyr:2025\n\nhgt:188in byr:2015 ecl:xry\niyr:1975\neyr:1928\npid:8939875193 hcl:7bbcce\n\nhgt:193cm\neyr:2029\npid:141707808 byr:1997\ncid:83 iyr:2019\necl:hzl hcl:#cfa07d\n\niyr:2019\npid:681586971\nhcl:#6b5442 hgt:165cm\neyr:2022 ecl:brn byr:1985\n\nbyr:1970\niyr:2016 hgt:156in pid:#e32394 eyr:2024\nhcl:#efcc98 ecl:grt\n\niyr:2013\necl:grn pid:341584587 eyr:2027 hgt:185cm hcl:#18171d\nbyr:1935\ncid:113\n\nhcl:#fffffd ecl:grn iyr:2010\npid:738986504 hgt:98 eyr:2024\nbyr:1968\n\npid:175337478 ecl:oth hgt:173cm hcl:#733820\neyr:2025 byr:1960\ncid:283 iyr:2018\n\nbyr:1959\nhcl:#341e13 eyr:2023\npid:566612260 hgt:176cm\niyr:2017 ecl:grn\n\ncid:321 pid:355095309 byr:1945\nhgt:161cm\neyr:2029 iyr:2017\necl:brn hcl:#733820\n\nhcl:#c0946f pid:75316487 iyr:2013 cid:201 hgt:152cm ecl:lzr byr:1996 eyr:1928\n\nhgt:160cm iyr:2010 hcl:#a018b9\neyr:2024 ecl:amb\ncid:347\n\neyr:2021\npid:893047101 iyr:2016 ecl:hzl hcl:#866857 byr:1988\nhgt:166cm\n\nhcl:#7d3b0c\necl:blu pid:085336099 eyr:2024\niyr:2019 hgt:178cm byr:1999\n\necl:grt iyr:2022\nhcl:z\nhgt:192cm byr:2010\n\npid:677187953 eyr:2025 iyr:2020 hgt:163cm byr:1957 ecl:grn hcl:#cfa07d\n\ncid:213\nbyr:1987\npid:113078018 ecl:blu iyr:2013 eyr:2022\nhcl:#7d3b0c hgt:157cm\n\necl:blu hcl:#c0946f hgt:186cm\nbyr:1992 eyr:2028 iyr:2010\n\npid:#b01156 hgt:67\nbyr:2014 ecl:#35dca0 eyr:1922 hcl:790130\n\nhcl:#602927\necl:blu hgt:173cm byr:1974 pid:116377061 cid:294 eyr:2030 iyr:2010\n\nhgt:151cm eyr:2022 iyr:2011 ecl:blu byr:1987 hcl:#733820\npid:#b90d2e\n\ncid:188\nbyr:1990\nhcl:#602927 iyr:2026\npid:530373696\nhgt:154cm ecl:gry\neyr:2029\n\nhgt:178cm eyr:2027\nhcl:#733820\necl:grn iyr:2014 pid:575371227 byr:1965\n\nhcl:#fffffd iyr:2020\nhgt:185cm ecl:amb pid:692760311\nbyr:1961\n\nbyr:1967 pid:397518948 ecl:lzr iyr:2015 hcl:#cfa07d cid:328\nhgt:177cm eyr:2035\n\nhcl:#8e1608\npid:554618249 iyr:2010 hgt:176cm cid:220\necl:brn byr:1928 eyr:2029\n\neyr:2030\necl:oth cid:177 hcl:#602927\niyr:2010 hgt:66in\npid:915661465 byr:1992\n\necl:brn pid:558826437 hgt:151cm byr:1936 hcl:#fffffd\neyr:2021 iyr:2012\n\neyr:2033\niyr:2019 hgt:190cm byr:1953\nhcl:#6b5442\npid:584941735 ecl:hzl\n\nhgt:71cm\nbyr:2015 iyr:2025\necl:#663b65 eyr:2039 hcl:z pid:62548949\n\necl:hzl byr:1943\niyr:2020 hgt:175cm pid:830628564 hcl:#7d3b0c eyr:2021\n\nhgt:182cm byr:1951 cid:175 eyr:2021 pid:635966127 ecl:blu iyr:2014 hcl:#18171d\n\nhcl:#733820 iyr:2011 pid:581100835 eyr:2022 ecl:grn byr:1985 hgt:192cm\n\niyr:2013\necl:grn\nhgt:185cm hcl:#a97842 byr:1981 eyr:2029 pid:711625030\n\nbyr:1995\npid:326992839\niyr:2015\neyr:2028 hcl:#733820 ecl:hzl\n\nhgt:160\neyr:2037 ecl:#6b6b83\ncid:123 iyr:2028\npid:7692333345\nhcl:z byr:2029\n\nhcl:#6b5442 iyr:2030\nhgt:165cm byr:2028 ecl:#21516d\neyr:2039\npid:182cm\n\nhgt:159cm iyr:2018 pid:610521467 eyr:2028 ecl:amb byr:1934 hcl:#602927\n\necl:blu\nhcl:#09d9a5 hgt:162cm iyr:2020\neyr:2025 byr:1971 pid:406714780\n\nhgt:179cm eyr:2022 hcl:#18171d\necl:blu pid:314891131 iyr:2015\nbyr:2002\n\nhcl:#623a2f hgt:181cm pid:442693333 byr:1990 ecl:grn eyr:2027\niyr:2011\n\niyr:2022 eyr:1939\npid:557187110 hcl:#18171d hgt:60cm ecl:#d6ac04 byr:1984\n\necl:grn byr:1948 hgt:174cm pid:438876745 cid:321\niyr:2018\nhcl:#866857 eyr:2023\n\nhgt:189cm iyr:2012 hcl:#602927 pid:978388052 ecl:brn\neyr:2030\n\necl:amb cid:235\nbyr:1938\npid:315825546 hcl:#ceb3a1 eyr:2029\niyr:2013 hgt:171cm\n\necl:dne hcl:z\nhgt:76cm byr:2010\ncid:185 eyr:2001\n\nhcl:#733820 byr:1988 pid:558453117\nhgt:66in\necl:oth iyr:2010 eyr:2021\n\nbyr:1926 pid:796557821 cid:155 hcl:#efcc98\nhgt:159cm eyr:2023 ecl:oth iyr:2016\n\nbyr:2023 eyr:2031 hcl:0ba99a pid:14902250\nhgt:132 ecl:#9b89b1 iyr:2017\n\nhcl:#a97842 byr:1926\ncid:205\necl:blu\niyr:2016 hgt:159cm eyr:2029\n\nbyr:1939 hcl:#866857\npid:025607627 hgt:174cm cid:309 eyr:2026 ecl:brn\n\necl:hzl pid:805133506\niyr:2014\nbyr:1991\nhcl:#cfa07d\ncid:350\nhgt:190cm\n\nhgt:155cm byr:1941 eyr:2024\ncid:164 hcl:#602927 iyr:2013 pid:531781358 ecl:amb\n\nhcl:#72a068 hgt:164cm\npid:621006770\necl:brn\neyr:2029 byr:1969\n\nbyr:1991\necl:grn iyr:2020\npid:9921729009 eyr:2029 hcl:#623a2f\nhgt:62in\n\niyr:2017 ecl:hzl\npid:768217275 eyr:2020 byr:1937\nhcl:#866857 hgt:157cm\n\ncid:270 byr:1993 hcl:#733820 ecl:hzl pid:722650020\nhgt:174cm iyr:2010\neyr:2021\n\nhcl:#c0946f ecl:blu\nhgt:154cm\neyr:2022 byr:1929 pid:357023679 iyr:2010\n\necl:hzl\niyr:2013 hgt:165cm byr:1979 eyr:2023 hcl:#733820 pid:008734536\n\nhcl:#341e13\neyr:2030 byr:1993\niyr:2014 hgt:193cm\ncid:346\necl:blu pid:536339538\n\neyr:2030\necl:hzl\ncid:296 pid:660062554 hcl:#efcc98\nbyr:1977 hgt:179cm\niyr:2010\n\ncid:119 pid:498520651 hgt:159cm\neyr:2029 iyr:2015 hcl:#18171d\necl:gmt\nbyr:1950\n\neyr:2025 iyr:2010 hcl:#efcc98 pid:196372989 hgt:181cm byr:1952 ecl:oth\n\ncid:317\neyr:2026 ecl:blu hcl:#733820\nhgt:184cm\npid:549730813 byr:1927 iyr:2018\n\npid:591769824\nhgt:180cm\nbyr:1920\necl:blu\neyr:2021 hcl:#cfa07d iyr:2017\n\npid:988946348 hgt:183cm cid:117 byr:1955 ecl:blu\niyr:2015 hcl:#623a2f eyr:2029\n\niyr:2014\neyr:2026 hgt:184cm\necl:oth\nhcl:#7d3b0c pid:252101860\n\nbyr:1995\nhgt:182cm ecl:brn hcl:#6b5442\niyr:2012 eyr:2028 pid:482757872\n\niyr:2017 cid:333 ecl:gry hcl:#623a2f hgt:157cm eyr:2021\npid:487895819\nbyr:1951\n\nhcl:#fffffd\nhgt:193cm eyr:2025 byr:1927 iyr:2014 ecl:oth pid:989206297\n\neyr:2030 ecl:brn hcl:#18171d hgt:193cm\niyr:2013 byr:1953 pid:862636088\n\nhcl:#fffffd\npid:204286737 ecl:gry byr:1923\nhgt:181cm\niyr:2015\neyr:2023\n\ncid:288 pid:413935643 ecl:gry\niyr:2012\nhgt:171cm\nhcl:#623a2f\neyr:2020 byr:1943\n\nbyr:2023 hcl:#c0946f\necl:oth\npid:182634296 eyr:2009\ncid:306 hgt:183cm\niyr:2029\n\neyr:2026 ecl:hzl byr:2003\niyr:2027 pid:734296691 hgt:188cm hcl:#fffffd\n\nhcl:#18171d ecl:gry pid:401957684 eyr:2020\niyr:2017 cid:141 byr:1944 hgt:74in\n\necl:grn hcl:z\npid:335097003 byr:1925\nhgt:170in iyr:2020 eyr:2022\n\npid:727198487\nhgt:173cm\ncid:323 hcl:#18171d iyr:2012 eyr:2024\nbyr:1995 ecl:blu\n\necl:amb hcl:#602927\npid:460274414\nhgt:76in byr:1995\niyr:2020\neyr:2028\n\nbyr:2002 ecl:oth pid:101164770\nhgt:172cm hcl:#fffffd eyr:2023 iyr:2016\n\necl:blu hcl:#888785 iyr:2016 pid:031162631 eyr:2025 hgt:186cm\nbyr:1959\n\necl:blu pid:093242619 hgt:188cm byr:1970\neyr:2025\nhcl:#6b5442\niyr:2020\n\nbyr:1990 eyr:2025 ecl:grn\npid:907309460\niyr:2011 hcl:#602927 hgt:62in\n\npid:346468647 eyr:2021\necl:oth hgt:169cm\niyr:2010 cid:233\nhcl:#b6652a byr:1977\n\npid:904834317 iyr:2011\nhcl:#b6652a eyr:2028 cid:281\nbyr:1944 hgt:187cm ecl:gry\n\neyr:1988 pid:663941602\nhgt:156in\nhcl:#fa2e93 iyr:2015 ecl:gry byr:1953\n\nhgt:184cm cid:107 pid:094829817\necl:gry byr:1998 eyr:2023 iyr:2017\n\neyr:2020 ecl:gry byr:1955 hcl:#a97842 pid:553841536\n\nhgt:185cm eyr:2022 hcl:#341e13 ecl:oth byr:1934 pid:863541754 cid:178\niyr:2016\n\neyr:2029 iyr:2014 byr:1937 cid:232 hgt:177cm hcl:#fffffd ecl:blu\npid:076753558\n\nhcl:#cfa07d\nhgt:168cm\necl:grn\npid:664159349 eyr:2028 iyr:2017 byr:1972\n\nhcl:#a97842\nbyr:1987\neyr:2020 hgt:182cm\niyr:2018\necl:brn pid:560272731\n\nhgt:172cm cid:125 ecl:blu pid:291640184\nbyr:1926\niyr:2014 hcl:#ceb3a1\n\niyr:2027 hgt:84 hcl:z\necl:#b68fec\npid:809408661\nbyr:2018 eyr:1927 cid:87\n\npid:951007276 cid:260 eyr:2025\necl:brn iyr:2015 byr:1957\nhcl:#4b8216 hgt:161cm\n\npid:359973697 hcl:#6b5442\neyr:2022 hgt:169cm\nbyr:1965 ecl:brn iyr:2013\n\niyr:2012 hgt:65in eyr:2024 pid:842371195\necl:amb\nhcl:#341e13 byr:2000\n\necl:hzl hgt:170cm byr:1950\ncid:289 eyr:2037 iyr:2021 hcl:#18171d pid:389051819\n\nhgt:159cm\necl:amb hcl:#c0946f eyr:2020 pid:010539976 iyr:2011 byr:1921\n\nhgt:176cm cid:270 pid:838338992\neyr:2024 hcl:#866857\necl:amb iyr:2015 byr:1982\n\necl:blu\ncid:246 hgt:185cm\nbyr:1987\nhcl:#fffffd pid:042361456 eyr:2022\niyr:2010\n\nhgt:164cm\npid:881486702 ecl:brn byr:1969 hcl:#c0946f\niyr:2010 eyr:2030\n\niyr:2019 hcl:#6b5442 hgt:167cm\necl:amb\ncid:207 byr:1922\neyr:2025 pid:343956182\n\necl:oth iyr:2012\nhgt:158cm\neyr:2024 hcl:#602927 byr:1964\n\nbyr:1988 pid:030965463 hgt:154cm\necl:gry eyr:2020 cid:227\niyr:2012\nhcl:#3edc53\n\nhgt:178cm hcl:#c0946f byr:1945 ecl:amb eyr:2030\n\nhgt:158cm pid:270264980 eyr:2027 iyr:2016 byr:1928 cid:259\necl:gry hcl:#733820\n\nbyr:2026 hgt:164in cid:235 ecl:xry\nhcl:z pid:2517730699\neyr:2033 iyr:2024\n\necl:grn hgt:69cm pid:1321222581 byr:1987\neyr:2035\niyr:2018 hcl:#fffffd\n\nhcl:#733820 cid:244\necl:gry iyr:2013 eyr:2028\npid:794178180 hgt:74in byr:1923\n\nhcl:#a97842 byr:1934 ecl:hzl eyr:2027\npid:401882857\niyr:2018 hgt:185cm\n\niyr:2018\npid:665564950 byr:1990 ecl:hzl\nhgt:154cm\neyr:2026 hcl:#623a2f\n\nhcl:#602927 cid:189 byr:1967 pid:332861702 eyr:2021\nhgt:163cm\necl:amb\n\necl:grn pid:734161280 hgt:184cm\niyr:2018 eyr:2020 byr:1929 hcl:#a97842\n\niyr:2018 byr:1925\neyr:2022 hgt:193cm ecl:hzl\nhcl:#341e13\npid:008582320\n\nbyr:2025 ecl:dne hgt:167cm pid:48963526\niyr:2025 hcl:z\neyr:2034\n\nhcl:#cfa07d ecl:hzl eyr:2029 cid:194 byr:1936\niyr:2020\nhgt:186cm\npid:328573727\n\niyr:2011 hgt:188cm pid:338435675 cid:326 ecl:gry\neyr:2027\nhcl:#6b5442\nbyr:1958\n\npid:165cm\nhgt:70 iyr:1996\neyr:2034 cid:210 hcl:z ecl:#75606f byr:2027\n\nhgt:180in hcl:#a0515a pid:#97a753\nbyr:2026 iyr:2016\neyr:1995\n\neyr:2020\nhcl:#18171d byr:1978 iyr:2012 hgt:68in\necl:amb cid:346 pid:332495922\n\necl:blu hgt:61in pid:747650669\nbyr:1961 eyr:2028\niyr:2020\nhcl:#4992f2\n\nbyr:1958 iyr:2017 ecl:oth\nhgt:153cm\nhcl:#602927 eyr:2023 pid:108391213\n\nbyr:1976 eyr:2023 iyr:2015 hgt:177cm pid:391628371 hcl:#8069c4\necl:grn\n\npid:910402636 ecl:gry hgt:188cm byr:1924 hcl:#82dfdc eyr:2029\n\nbyr:1978 pid:302223240 iyr:2017\nhgt:174cm\nhcl:#6b6569 ecl:blu eyr:2027\n\ncid:135\nbyr:1995 iyr:2015 ecl:oth pid:054611703\neyr:2023\nhcl:#7d3b0c hgt:75in\n\necl:grn\neyr:2020 hgt:184cm pid:444944678 iyr:2019 hcl:#efcc98\n\nbyr:1946\nhgt:70in eyr:2022 hcl:#6b5442 ecl:amb iyr:2018 pid:859762925\n\nbyr:1995 eyr:2022\necl:grn pid:575081777\nhcl:#341e13\nhgt:183in iyr:2018\n\neyr:2028 hgt:162cm byr:1989 hcl:#0bd11f\niyr:2020 ecl:gry\npid:073498924\n\niyr:2014\npid:122787281 byr:1982 cid:138 eyr:2021 hcl:#866857 ecl:hzl hgt:184cm\n\ncid:198 byr:2014\npid:5529128129\nhgt:185in\niyr:2025\nhcl:z\neyr:2023\necl:gmt\n\neyr:2021 hgt:170cm\ncid:74\niyr:2019 pid:943445928 byr:1980\necl:oth hcl:#ceb3a1\n\niyr:2020 eyr:2030 pid:201122734 cid:246 hgt:169cm ecl:grn hcl:#fffffd byr:1962\n\npid:025560194\nbyr:1989\nhcl:#cfa07d hgt:182cm ecl:blu eyr:2025 iyr:2012\n\nhgt:151cm\nhcl:#efcc98 ecl:blu\nbyr:1983 eyr:2023 pid:814513328 iyr:2013 cid:73\n\nbyr:1961 pid:536384108 hgt:188cm ecl:amb iyr:2013 eyr:2027 hcl:#888785 cid:121\n\npid:364607819\neyr:2024 ecl:amb hcl:#b6652a iyr:2016\nbyr:2000 hgt:187cm\n\nhcl:z eyr:1956 iyr:2028\nhgt:168cm cid:105\nbyr:2026\necl:#5b17d3\n\ncid:207 pid:913509058 ecl:brn byr:2001 eyr:2026\nhcl:#866857 iyr:2019\nhgt:180cm\n\npid:363979129\neyr:2027 iyr:2013\necl:gry hcl:#866857 byr:1957 hgt:62in\n\nbyr:1932\neyr:2027\nhgt:66in ecl:hzl hcl:#efcc98 pid:417620217 iyr:2013\n\niyr:2013 cid:331 hgt:192cm\nhcl:#d896d9 pid:795744816 byr:1935\n\nbyr:1960 hcl:#888785 hgt:176cm ecl:hzl pid:025206542\niyr:2015 eyr:2030\n\necl:oth hgt:182cm\nhcl:#341e13\npid:526568190 iyr:2018 cid:280 byr:1997\neyr:2028\n\nhgt:186cm pid:273625601 byr:1993 iyr:2018 eyr:2021 hcl:#733820\necl:blu\n\nhgt:74cm\nbyr:1981 eyr:2024\necl:amb iyr:2012 pid:154027492 hcl:#733820\n\nhcl:#a97842 pid:347084450 ecl:oth\neyr:2030 hgt:176cm byr:1955 cid:229\niyr:2013\n\nhcl:#fffffd byr:1979 iyr:2017\npid:183840860 hgt:177cm ecl:blu eyr:2023\n\npid:045246162 eyr:2021 byr:1928 hgt:190cm ecl:gry hcl:#602927\n\npid:273620987\neyr:2022 hgt:162cm\ncid:269\nbyr:1991 hcl:#602927 ecl:amb iyr:2019\n\npid:621069556 ecl:amb\ncid:202 byr:2020 hgt:189cm\niyr:2014 hcl:#fffffd\neyr:2027\n\neyr:2022 byr:1988\nhgt:190cm\npid:349839553 hcl:#602927 iyr:2018 ecl:gry\n\niyr:2014 ecl:gry\nhcl:#733820 eyr:2025 hgt:179cm pid:231854667 byr:1984\ncid:102\n\neyr:2020\npid:509400891 hcl:#cfa07d hgt:172cm\necl:grn byr:1997 iyr:2020\n\niyr:2017 byr:1994 hgt:174cm ecl:amb\npid:685743124\nhcl:#fffffd eyr:2029\n\niyr:2012 hgt:177cm byr:1999 pid:549190825 hcl:#b6652a eyr:2028 ecl:oth cid:316\n\nhgt:192cm ecl:grn byr:1924\niyr:2011 eyr:2029 hcl:#efcc98\npid:215962187\n\niyr:2011 hcl:#866857\ncid:164\nhgt:184cm\necl:gry eyr:2023 byr:1959 pid:204093118\n\nhgt:172cm ecl:hzl hcl:#3f2f3a pid:623470811 byr:1938 iyr:2013 eyr:2022\n\nhcl:#b6652a\niyr:2019 hgt:152in\necl:oth\npid:189008850 byr:2006\n\necl:oth hcl:#602927\npid:049746898 byr:1924 hgt:150cm eyr:2026\niyr:2014\n\necl:oth\neyr:2028 byr:2018 hcl:#733820\npid:8676207205 iyr:2018\nhgt:190cm\n\neyr:2023 cid:308 hgt:170cm ecl:oth iyr:2014 hcl:#18171d pid:874405208 byr:1936\n\neyr:2021 ecl:hzl\npid:423603306\nhcl:#c0946f cid:147\nbyr:1988 iyr:2016 hgt:164cm\n\nhgt:176cm iyr:2010\nhcl:#6b5442 cid:280 byr:1988 ecl:hzl pid:967151288 eyr:2028\n\ncid:299 hgt:163cm ecl:gry\npid:561439154 eyr:2023\nhcl:#cfa07d iyr:2019 byr:1959\n\npid:635547007\necl:blu\nbyr:1996 hcl:#7d3b0c cid:280 eyr:2023\nhgt:170cm iyr:2017\n\nhcl:#888785 iyr:2014\necl:brn\nhgt:190cm byr:1941 eyr:2021\n\nhcl:#c0946f cid:199 hgt:162cm ecl:amb pid:130696599 eyr:2022 iyr:2018 byr:1948\n\ncid:314 hcl:#a4fc09 ecl:hzl iyr:2019\npid:886849824 eyr:2026 byr:1933 hgt:178cm\n\nbyr:1996 iyr:2016 eyr:2030 hgt:169cm\npid:119207760\nhcl:#ef542c\necl:brn\n\niyr:2030 eyr:2039 hcl:#c0946f pid:#7336a0 hgt:182cm cid:347\necl:#c81361 byr:2003\n\npid:727812879 iyr:2013 eyr:2027 hgt:172cm\nhcl:#7d3b0c ecl:gry byr:1966\n\nhcl:#341e13\niyr:2016 pid:744997238\ncid:322\nbyr:1973\necl:hzl eyr:2028 hgt:190cm\n\nhgt:171cm eyr:2026\niyr:2014 ecl:oth\npid:074049558 hcl:#04083f byr:1923\n\npid:973713235\neyr:2021\necl:brn\nbyr:1922 hcl:#fffffd iyr:2012\nhgt:178cm\n\necl:#10165d\ncid:201 eyr:2026 pid:#ceefa8 byr:2020\nhgt:164cm iyr:2011\nhcl:9fccf7\n\necl:blu\nhgt:165cm iyr:2012 eyr:2025 pid:775787557\nbyr:1952 hcl:#623a2f\n\npid:6186829005 ecl:lzr hcl:z hgt:69in iyr:2021 byr:2018 eyr:1974\n\npid:824641755 eyr:2028 byr:1950 hgt:184cm\nhcl:#c0946f\niyr:2014\n\nhcl:#7d3b0c cid:84 hgt:187cm iyr:2015\npid:895876610\nbyr:1988 eyr:2023\n\nhcl:#fffffd\nhgt:157cm iyr:2020 eyr:2030 ecl:grn pid:486236241\n\niyr:2010\neyr:2029\nhgt:74in ecl:hzl byr:1926 pid:348573885 hcl:#9d1214\n\nhgt:171cm ecl:oth\neyr:2022 pid:148728436 byr:1993 hcl:#a97842 iyr:2013\n\niyr:2019\nhgt:151cm\neyr:2020 pid:319882814 ecl:grn byr:1966 cid:256 hcl:#3107b3\n\nhgt:184cm ecl:grn\nbyr:1947\neyr:2025 iyr:2015 pid:827962962 cid:62 hcl:#f3a364\n\niyr:2013\nhcl:#fffffd pid:215012801 ecl:amb eyr:2024\nhgt:154cm\nbyr:1973\n\necl:hzl hgt:152cm\nhcl:#623a2f\nbyr:1944 eyr:2022 pid:295632731\ncid:243 iyr:2019\n\necl:brn\niyr:2011 pid:089250747 byr:1984 hcl:73e739 cid:253 hgt:161cm eyr:2021\n\nhcl:#18171d byr:1944 pid:732054667 eyr:2021\necl:oth hgt:173cm\n\necl:gry pid:445116331\nhcl:#a97842\nhgt:187cm eyr:2026 iyr:2020 byr:1992\n\nhcl:80c091 pid:745555899\niyr:2021\nhgt:170cm\nbyr:1990\n\npid:058987865 byr:1927 cid:209\nhcl:#65ccf6 eyr:2025\necl:brn iyr:2012 hgt:164cm\n\nhgt:67cm\nbyr:2026 hcl:f8e749 iyr:2023 eyr:1921 ecl:lzr\n\neyr:2028 iyr:2013 pid:103268377 hgt:179cm byr:1922\necl:hzl\nhcl:#7d3b0c\n\nbyr:1923 ecl:gry hgt:167cm hcl:#7fc8ee iyr:2015 pid:427963077 eyr:2024\n\nbyr:1927 ecl:grn pid:741328150\neyr:2029 hcl:#733820\niyr:2015 hgt:157cm\n\nhgt:70cm hcl:e76970 iyr:1945 cid:186\nbyr:1921 eyr:2029\npid:823622634\necl:zzz\n\nhgt:61cm cid:87 hcl:d5e5ff\neyr:2024 ecl:dne pid:182634269\niyr:2029\n\nhcl:#623a2f eyr:2020 byr:1936 ecl:gry pid:236984204\niyr:2011 hgt:156cm\n\npid:872645776\nbyr:2023\ncid:220 ecl:blu hgt:172cm eyr:2033\niyr:2010 hcl:ff82f9\n\npid:774489073 iyr:2013 byr:1922 ecl:brn eyr:2025 hcl:#18171d hgt:163cm\n\neyr:2024 hgt:65in byr:1962 iyr:2019\npid:112233558 hcl:#888785 ecl:grn\n\nhgt:172cm eyr:2022\nhcl:#18171d ecl:blu\npid:609008608 iyr:2013\ncid:244 byr:1980\n\ncid:124 hgt:175in eyr:2025\nhcl:674e80 pid:099875931 iyr:1956\n\nbyr:1926 hgt:188cm\necl:hzl eyr:2021\niyr:2018\nhcl:#866857 pid:557800355\n\nbyr:1939 pid:200409089\neyr:2026 hgt:164cm\necl:grn iyr:2013\nhcl:#733820\n\ncid:73 hgt:169cm iyr:2016 byr:1976 ecl:gry eyr:2024\npid:043453462\n\npid:609818712 hcl:#733820 byr:1958\neyr:2025 hgt:187cm iyr:2017 ecl:gry\n\nhgt:66in pid:618590610 iyr:2013 byr:1938 hcl:#d1bda9\neyr:2022\necl:grn cid:69\n\nhgt:156cm pid:755742405\nbyr:1929 hcl:#6b5442 eyr:2024\niyr:2018\necl:gry\ncid:105\n\neyr:2030 pid:77022842\nhgt:160cm byr:1989\niyr:2011 hcl:#7d3b0c ecl:blu\n\niyr:2015\nhcl:#341e13 byr:1968 pid:434159843\necl:amb hgt:150cm\neyr:2030\n\nhcl:z eyr:1993 pid:#b3a5a6 iyr:1947 hgt:176in\necl:#78876d\n\ncid:249 hcl:#cfa07d\nhgt:180cm ecl:gry eyr:2026 byr:1965\npid:048327438 iyr:2010\n\npid:136468890 ecl:gry\nbyr:1940\nhcl:#fffffd hgt:185cm iyr:2016 eyr:2021\n\nhcl:#b6652a hgt:180in byr:1976 eyr:2022 pid:156cm ecl:#737836\niyr:2013\n\necl:amb iyr:2016 hgt:162cm byr:1955 pid:193cm eyr:2028 cid:346\nhcl:#733820\n\niyr:2010 byr:1932 eyr:2025 ecl:grn\npid:595837820\nhcl:#341e13\nhgt:166cm cid:224\n\npid:481646831\neyr:2029\nhcl:#623a2f cid:319 iyr:2016\necl:brn hgt:160cm byr:1944\n\necl:zzz pid:428329840 cid:238 iyr:2022 hgt:76cm\nhcl:#a97842\nbyr:2024 eyr:2028\n\niyr:2014 hgt:170cm\nbyr:1963 hcl:#623a2f\neyr:2026 pid:225910806 ecl:gry\n\necl:grn iyr:2010 hgt:193cm byr:1928 eyr:2028 pid:343022641 hcl:#733820\n\neyr:2023 ecl:grn\nbyr:1950 iyr:2012 hcl:#866857 pid:400725165\nhgt:193cm\n\ncid:195 iyr:2014 ecl:oth eyr:2027 byr:1966\nhgt:177cm hcl:#18171d pid:913894485\n\niyr:2015 hgt:154cm\ncid:206\npid:134599284 hcl:#602927\neyr:2023 ecl:brn\nbyr:1983\n\necl:#2d0e7a pid:#f34625 eyr:1942 iyr:2027 byr:2013 hcl:z hgt:162cm\n\nhgt:189cm byr:1965 iyr:2011\ncid:178 ecl:hzl\nhcl:#b6652a eyr:2026 pid:683560227\n\neyr:2030 pid:047446524 ecl:grn hgt:167cm iyr:2017 hcl:#602927\nbyr:1920\n\ncid:86\niyr:1920 hgt:193cm\neyr:2027 pid:401913877 ecl:hzl\nhcl:#888785 byr:1953\n\nbyr:1991\necl:grn\niyr:2016\nhcl:#5e1ef2 hgt:186cm\npid:076499738\neyr:2025\n\neyr:2030 hcl:#18171d pid:750694893\nhgt:157cm iyr:2020 cid:338\nbyr:1956 ecl:gry\n\niyr:2027 pid:#37f002 hgt:164cm ecl:#80df11\nhcl:#aeacee cid:320\neyr:2039 byr:1956\n\niyr:2014 hcl:#733820 ecl:grn\nbyr:1960\neyr:2025 pid:667089568\n\nhgt:163cm\nbyr:1962 cid:108 ecl:gry hcl:#733820 iyr:2012\neyr:2029 pid:763684725\n\nbyr:1984 hcl:#888785 hgt:159cm iyr:2012 ecl:gry\neyr:2024 cid:236 pid:174711749\n\necl:gry pid:044931271\nhcl:#b6652a eyr:2029 iyr:2013 byr:1985\n\nbyr:1973 iyr:2018 hcl:#a97842 pid:937214113 ecl:blu\ncid:247 hgt:186cm eyr:2023\n\ncid:108 pid:231782961 iyr:2017\neyr:2034 hgt:170cm byr:2025 hcl:#18171d ecl:utc\n\npid:298274796 byr:1928 hcl:#a97842 hgt:188cm iyr:2011 ecl:gry eyr:2028\n\nhgt:65cm iyr:1943 eyr:2025\nhcl:z\npid:65702335 ecl:#bb54e6 byr:2010\n\npid:499116613 eyr:2024\necl:gry hcl:#cfa07d hgt:193cm byr:1999\ncid:278 iyr:2015\n\nhcl:#6b5442 eyr:2027 hgt:175cm byr:1988\necl:brn pid:410075320 iyr:2010\n\npid:269678991 ecl:oth iyr:2013\nhcl:#602927 byr:1991 eyr:2023\n\necl:oth\npid:144593265 hcl:#fffffd\neyr:2020 iyr:2018\nbyr:1975 hgt:160cm\ncid:304\n\niyr:2014 hcl:#ceb3a1 eyr:2029\nbyr:1951 pid:520804395 hgt:185cm ecl:oth\n\nhgt:159cm\npid:312887994\ncid:205\niyr:2016 ecl:hzl hcl:#866857 eyr:2029 byr:1944\n\niyr:2023 ecl:#54c85c byr:2030\neyr:1946 cid:190 pid:512417622\n\nbyr:1946 eyr:2023 hgt:163cm\nhcl:#2d4e9c ecl:brn pid:839043333 iyr:2014\n\niyr:2027 cid:122 hgt:187cm eyr:1975 ecl:grn byr:1920\nhcl:#c0946f\n\neyr:2029 hgt:189cm ecl:blu byr:1922 iyr:2016\npid:924104599\nhcl:#b6652a\n\nhgt:162cm\niyr:2016 byr:1921 hcl:#18171d eyr:1938 ecl:hzl\npid:682222023\n\ncid:118 pid:959515596\nbyr:1921 iyr:2010 eyr:2029 hcl:#7d3b0c ecl:oth hgt:158cm\n\necl:#8ac844 pid:162cm\nhcl:8f4d80 hgt:150in byr:2005\neyr:2008\niyr:2017 cid:174\n\nhcl:z byr:1936\npid:255481052 eyr:2021\niyr:2012 hgt:170cm cid:276 ecl:hzl\n\niyr:2013 byr:1935 hgt:179cm\neyr:2023 ecl:amb pid:073621563 hcl:#623a2f\n\nhcl:#18171d cid:230 byr:1989 ecl:oth eyr:2021 hgt:181cm pid:661224730\niyr:2019\n\npid:748039140 iyr:2020 eyr:2020 ecl:#6ebbc2 hcl:#fffffd hgt:171cm\nbyr:1995\n\necl:hzl pid:758144605 hcl:#ceb3a1 hgt:186cm\neyr:2028 iyr:2014\nbyr:1928\n\necl:hzl\nhgt:66in\nbyr:2000 iyr:2017 eyr:2020\npid:162973694 hcl:#a97842\n\niyr:2012 pid:749770535\nbyr:1969 cid:148\nhcl:#733820\nhgt:180cm eyr:2021 ecl:hzl\n\niyr:2010\nbyr:1958\nhgt:164cm\necl:blu hcl:#733820 pid:890634327 eyr:2024\n\nhgt:70in pid:218397894\niyr:2020 eyr:2025 ecl:gry hcl:#341e13\nbyr:1970\n\neyr:2020 pid:854208004 hgt:157cm hcl:#7d3b0c ecl:amb byr:1981 iyr:2020\n\nbyr:1924\ncid:321 eyr:2028 hcl:#cfa07d iyr:2010 ecl:amb pid:036669613 hgt:170cm\n\necl:#6649d4 pid:0026989865 cid:188\nhgt:152in\nbyr:1950 hcl:z eyr:1928 iyr:1963\n\nhcl:#ceb3a1 ecl:grn eyr:2028 pid:074363489 iyr:2010 hgt:173cm byr:1966\n\neyr:2030\npid:9731612333 ecl:#f8824c\niyr:2022 hgt:161in\nbyr:2023\ncid:316\nhcl:z\n\nhgt:175cm iyr:2016 eyr:2024 cid:244\nbyr:1952\npid:085432899\nhcl:#fffffd ecl:brn\n\necl:brn eyr:2026 iyr:2017 hgt:75in\npid:745302991 byr:1969 hcl:#7394c7';\n }", "function cariDataBarang_md41($nmbarang=\"\") {\n\t\t$grid = new GridConnector($this->db->conn_id);\n $grid->render_sql(\"select id,idgroup_barang,concat(nmbarang, ' ',nmwarna) as nmbarang,idsatuan from v_master_barang_detail where is_active = '1' and sts_jual = '1' and nmbarang like '%\".$nmbarang.\"%' group by idgroup_barang\",\"id\",\"idgroup_barang,nmbarang,idsatuan\");\n\t}", "public function run()\n {\n\n\n $str = \"\n5838,28001,渋谷,東京メトロ銀座線,G01,G,01,,,●,,銀座線 駅事務室付近(改札内),●, ,2023/1/21\n5837,28001,表参道,東京メトロ銀座線,G02,G,02,,,●,,青山通り方面改札付近(改札外),●, ,2023/1/21\n5836,28001,外苑前,東京メトロ銀座線,G03,G,03,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5835,28001,青山一丁目,東京メトロ銀座線,G04,G,04,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5834,28001,赤坂見附,東京メトロ銀座線,G05,G,05,,,●,,駅事務室付近(改札内),●, ,2023/1/21\n5833,28001,溜池山王,東京メトロ銀座線,G06,G,06,,,●,,駅事務室付近(改札内),●, ,2023/1/21\n5832,28001,虎ノ門,東京メトロ銀座線,G07,G,07,,,●,,1番出口付近(改札外),●, ,2023/1/21\n5831,28001,新橋,東京メトロ銀座線,G08,G,08,,,●,,3番出口付近(改札外),●, ,2022/12/3\n5830,28001,銀座,東京メトロ銀座線,G09,G,09,,,●,,駅事務室付近(改札内),●, ,2023/1/8\n5829,28001,京橋,東京メトロ銀座線,G10,G,10,京橋 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5828,28001,日本橋,東京メトロ銀座線,G11,G,11,,,●,,A6出口付近(改札外),●, ,2023/1/28\n5827,28001,三越前,東京メトロ銀座線,G12,G,12,,,●,,銀座線 駅事務室付近(改札外) / B5出口付近(改札外),●, ,2023/1/28\n5826,28001,神田,東京メトロ銀座線,G13,G,13,,,●,,3番出口付近(改札外),●, ,2023/1/28\n5825,28001,末広町,東京メトロ銀座線,G14,G,14,,,●,,2番出口付近(改札外) / 3番出口付近(改札外),●, ,2023/1/28\n5824,28001,上野広小路,東京メトロ銀座線,G15,G,15,,,●,,A1出口方面付近(改札外),●, ,2023/1/28\n5823,28001,上野,東京メトロ銀座線,G16,G,16,,,●,,駅事務室付近(改札外),●, ,2023/1/28\n5822,28001,稲荷町,東京メトロ銀座線,G17,G,17,,,●,,1番出口方面付近(改札外),●, ,2023/1/28\n5821,28001,田原町,東京メトロ銀座線,G18,G,18,,,●,,西浅草1丁目側エレベーター専用改札付近(改札外),●, ,2023/1/28\n5820,28001,浅草,東京メトロ銀座線,G19,G,19,,,●,,吾妻橋方面改札付近(改札外),●, ,2023/1/28\n5863,28002,荻窪,東京メトロ丸ノ内線,M01,M,01,,,●,,駅事務室付近(改札外),●, ,2022/12/30\n5862,28002,南阿佐ケ谷,東京メトロ丸ノ内線,M02,M,02,,,●,,杉並郵便局方面改札付近(改札外),●, ,2022/12/30\n5861,28002,新高円寺,東京メトロ丸ノ内線,M03,M,03,,,●,,駅事務室付近(改札外),●, ,2022/12/30\n5860,28002,東高円寺,東京メトロ丸ノ内線,M04,M,04,,,●,,蚕糸の森公園方面改札付近(改札外),●, ,2022/12/30\n5859,28002,新中野,東京メトロ丸ノ内線,M05,M,05,,,●,,鍋屋横丁交差点南改札付近(改札内),●, ,2022/12/30\n5858,28002,中野坂上,東京メトロ丸ノ内線,M06,M,06,,,●,,駅事務室付近(改札外),●, ,2022/12/30\n5857,28002,西新宿,東京メトロ丸ノ内線,M07,M,07,,,●,,駅事務室付近(改札外),●, ,2022/12/30\n5856,28002,新宿,東京メトロ丸ノ内線,M08,M,08,,,●,,東改札付近(改札外),●, ,2022/12/30\n5855,28002,新宿三丁目,東京メトロ丸ノ内線,M09,M,09,新宿三丁目 丸ノ内線 駅事務室付近(改札外) E5出口付近(改札外),,,,丸ノ内線 駅事務室付近(改札外) / E5出口付近(改札外),, ,\n5854,28002,新宿御苑前,東京メトロ丸ノ内線,M10,M,10,新宿御苑前 新宿門方面改札付近(改札内),,,,新宿門方面改札付近(改札内),, ,\n5853,28002,四谷三丁目,東京メトロ丸ノ内線,M11,M,11,四谷三丁目 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5852,28002,四ツ谷,東京メトロ丸ノ内線,M12,M,12,四ツ谷 赤坂方面改札付近(改札内) 南北線 駅事務室付近(改札内),,,,,, ,\n5851,28002,赤坂見附,東京メトロ丸ノ内線,M13,M,13,,,●,,駅事務室付近(改札内),●, ,2023/1/21\n5850,28002,国会議事堂前,東京メトロ丸ノ内線,M14,M,14,国会議事堂前 3番出口付近(改札外),,,,3番出口付近(改札外),, ,\n5849,28002,霞ケ関,東京メトロ丸ノ内線,M15,M,15,,,●,,丸ノ内線 桜田通り方面改札付近(改札内) / 千代田線 駅事務室付近(改札内),●, ,2023/1/15\n5848,28002,銀座,東京メトロ丸ノ内線,M16,M,16,,,●,,駅事務室付近(改札内),●, ,2023/1/8\n5847,28002,東京,東京メトロ丸ノ内線,M17,M,17,東京 中央改札きっぷうりば付近(改札外),,,,中央改札きっぷうりば付近(改札外),, ,\n5846,28002,大手町,東京メトロ丸ノ内線,M18,M,18,,,●,,東西線 駅事務室付近(改札外) / 半蔵門線 駅事務室付近(改札外),●, ,2023/1/21\n5845,28002,淡路町,東京メトロ丸ノ内線,M19,M,19,淡路町 小川町方面改札付近(改札外),,,,小川町方面改札付近(改札外),, ,\n5844,28002,御茶ノ水,東京メトロ丸ノ内線,M20,M,20,御茶ノ水 1番出口付近(改札外),,,,1番出口付近(改札外),, ,\n5843,28002,本郷三丁目,東京メトロ丸ノ内線,M21,M,21,本郷三丁目 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5842,28002,後楽園,東京メトロ丸ノ内線,M22,M,22,後楽園 南北線 駅事務室付近(改札外),,,,南北線 駅事務室付近(改札外),, ,\n5841,28002,茗荷谷,東京メトロ丸ノ内線,M23,M,23,茗荷谷 春日通り方面改札付近(改札内),,,,春日通り方面改札付近(改札内),, ,\n5840,28002,新大塚,東京メトロ丸ノ内線,M24,M,24,新大塚 北改札付近(改札外),,,,北改札付近(改札外),, ,\n5839,28002,池袋,東京メトロ丸ノ内線,M25,M,25,,,●,,西通路西改札付近(改札外) / 有楽町線 駅事務室付近(改札外),●, ,2023/1/3\n5866,28002,方南町,東京メトロ丸ノ内線,Mb03,M,b03,,,●,,駅事務室付近(改札外),●, ,2022/1/30\n5865,28002,中野富士見町,東京メトロ丸ノ内線,Mb04,M,b04,,,●,,改札付近(改札内),●, ,2022/1/30\n5864,28002,中野新橋,東京メトロ丸ノ内線,Mb05,M,b05,,,●,,改札付近(改札内),●, ,2022/1/30\n5888,28003,中目黒,東京メトロ日比谷線,H01,H,01,中目黒 恵比寿駅 2番出口付近(改札外),,,,恵比寿駅 2番出口付近(改札外),, ,\n5887,28003,恵比寿,東京メトロ日比谷線,H02,H,02,恵比寿 2番出口付近(改札外),,,,2番出口付近(改札外),, ,\n5886,28003,広尾,東京メトロ日比谷線,H03,H,03,広尾 4番出口付近(改札外),,,,4番出口付近(改札外),, ,\n5885,28003,六本木,東京メトロ日比谷線,H04,H,04,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5884,28003,神谷町,東京メトロ日比谷線,H05,H,05,,,●,,虎ノ門方面改札付近(改札外),●, ,2023/1/21\n5883,28003,虎ノ門ヒルズ,東京メトロ日比谷線,H06,H,06,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5882,28003,霞ケ関,東京メトロ日比谷線,H07,H,07,,,●,,丸ノ内線 桜田通り方面改札付近(改札内) / 千代田線 駅事務室付近(改札内),●, ,2023/1/15\n5881,28003,日比谷,東京メトロ日比谷線,H08,H,08,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5880,28003,銀座,東京メトロ日比谷線,H09,H,09,,,●,,駅事務室付近(改札内),●, ,2023/1/8\n5879,28003,東銀座,東京メトロ日比谷線,H10,H,10,東銀座 4番出口付近(改札外),,,,4番出口付近(改札外),, ,\n5878,28003,築地,東京メトロ日比谷線,H11,H,11,築地 3b出口付近(改札外),,,,3b出口付近(改札外),, ,\n5877,28003,八丁堀,東京メトロ日比谷線,H12,H,12,八丁堀 八丁堀交差点方面改札付近(改札外),,,,八丁堀交差点方面改札付近(改札外),, ,\n5876,28003,茅場町,東京メトロ日比谷線,H13,H,13,,,●,,8番出口付近(改札外),●, ,2022/12/3\n5875,28003,人形町,東京メトロ日比谷線,H14,H,14,,,●,,駅事務室付近(改札外),●, ,2023/1/28\n5874,28003,小伝馬町,東京メトロ日比谷線,H15,H,15,小伝馬町 本町方面改札付近(改札外),,,,本町方面改札付近(改札外),, ,\n5873,28003,秋葉原,東京メトロ日比谷線,H16,H,16,,,●,,駅事務室付近(改札外),●, ,2023/1/28\n5872,28003,仲御徒町,東京メトロ日比谷線,H17,H,17,仲御徒町 中央改札付近(改札内),,,,中央改札付近(改札内),, ,\n5871,28003,上野,東京メトロ日比谷線,H18,H,18,,,●,,駅事務室付近(改札外),●, ,2023/1/28\n5870,28003,入谷,東京メトロ日比谷線,H19,H,19,,,●,,4番出口付近(改札外),●, ,2023/1/28\n5869,28003,三ノ輪,東京メトロ日比谷線,H20,H,20,,,●,,駅事務室付近(改札外),●, ,2023/1/28\n5868,28003,南千住,東京メトロ日比谷線,H21,H,21,,,●,,駅事務室付近(改札内),●, ,2023/1/22\n5867,28003,北千住,東京メトロ日比谷線,H22,H,22,,,●,,千代田線 駅事務室付近(改札内),●, ,2023/1/22\n5889,28004,中野,東京メトロ東西線,T01,T,01,,,●,,落合駅 1番出口付近(改札外),●, ,2022/12/10\n5890,28004,落合,東京メトロ東西線,T02,T,02,,,●,,1番出口付近(改札外),●, ,2022/12/10\n5891,28004,高田馬場,東京メトロ東西線,T03,T,03,,,●,,5番出口付近(改札外),●, ,2022/1/29\n5892,28004,早稲田,東京メトロ東西線,T04,T,04,早稲田 早稲田大学方面改札付近(改札外) 早稲田大学穴八幡方面改札付近(改札外),,,,早稲田大学方面改札付近(改札外) / 早稲田大学穴八幡方面改札付近(改札外),, ,\n5893,28004,神楽坂,東京メトロ東西線,T05,T,05,神楽坂 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5894,28004,飯田橋,東京メトロ東西線,T06,T,06,,,●,,飯田橋交差点方面改札付近(改札内) / 有楽町線・南北線駅事務室付近(改札外),●, ,2023/1/4\n5895,28004,九段下,東京メトロ東西線,T07,T,07,九段下 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5896,28004,竹橋,東京メトロ東西線,T08,T,08,竹橋 大手町方面改札付近(改札外),,,,大手町方面改札付近(改札外),, ,\n5897,28004,大手町,東京メトロ東西線,T09,T,09,,,●,,東西線 駅事務室付近(改札外) / 半蔵門線 駅事務室付近(改札外),●, ,2023/1/21\n5898,28004,日本橋,東京メトロ東西線,T10,T,10,,,●,,A6出口付近(改札外),●, ,2023/1/28\n5899,28004,茅場町,東京メトロ東西線,T11,T,11,,,●,,8番出口付近(改札外),●, ,2022/12/3\n5900,28004,門前仲町,東京メトロ東西線,T12,T,12,,,●,,富岡八幡宮方面改札付近(改札内),●, ,2023/1/12\n5901,28004,木場,東京メトロ東西線,T13,T,13,木場 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5902,28004,東陽町,東京メトロ東西線,T14,T,14,,,●,,西改札付近(改札内),●, ,2023/1/11\n5903,28004,南砂町,東京メトロ東西線,T15,T,15,,,●,,駅事務室付近(改札内),●, ,2023/1/19\n5904,28004,西葛西,東京メトロ東西線,T16,T,16,西葛西 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5905,28004,葛西,東京メトロ東西線,T17,T,17,葛西 西口出口付近(改札外),,,,西口出口付近(改札外),, ,\n5906,28004,浦安,東京メトロ東西線,T18,T,18,,,●,,2階 西船橋方面ホーム行階段下付近(改札内),●, ,2023/1/8\n5907,28004,南行徳,東京メトロ東西線,T19,T,19,,,●,,駅事務室付近(改札内),●, ,2023/1/18\n5908,28004,行徳,東京メトロ東西線,T20,T,20,,,●,,改札付近(改札内),●, ,2023/1/11\n5909,28004,妙典,東京メトロ東西線,T21,T,21,,,●,,2階 中野方面ホーム行階段下付近(改札内),●, ,2023/1/12\n5910,28004,原木中山,東京メトロ東西線,T22,T,22,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5911,28004,西船橋,東京メトロ東西線,T23,T,23,,,●,,原木中山駅 事務室付近(改札外),●, ,2023/1/21\n5931,28005,代々木上原,東京メトロ千代田線,C01,C,01,,,●,,代々木公園駅 2番出口付近(改札外),●, ,2023/1/21\n5930,28005,代々木公園,東京メトロ千代田線,C02,C,02,,,●,,2番出口付近(改札外),●, ,2023/1/21\n5929,28005,明治神宮前〈原宿〉,東京メトロ千代田線,C03,C,03,,,●,,千代田線 駅事務室付近(改札外),●, ,2023/1/21\n5928,28005,表参道,東京メトロ千代田線,C04,C,04,,,●,,青山通り方面改札付近(改札外),●, ,2023/1/21\n5927,28005,乃木坂,東京メトロ千代田線,C05,C,05,乃木坂 外苑東通り方面改札付近(改札内),,,,外苑東通り方面改札付近(改札内),, ,\n5926,28005,赤坂,東京メトロ千代田線,C06,C,06,赤坂 1番・2番出口方面付近(改札外),,,,1番・2番出口方面付近(改札外),, ,\n5925,28005,国会議事堂前,東京メトロ千代田線,C07,C,07,国会議事堂前 3番出口付近(改札外),,,,3番出口付近(改札外),, ,\n5924,28005,霞ケ関,東京メトロ千代田線,C08,C,08,,,●,,丸ノ内線 桜田通り方面改札付近(改札内) / 千代田線 駅事務室付近(改札内),●, ,2023/1/15\n5923,28005,日比谷,東京メトロ千代田線,C09,C,09,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5922,28005,二重橋前,東京メトロ千代田線,C10,C,10,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5921,28005,大手町,東京メトロ千代田線,C11,C,11,,,●,,東西線 駅事務室付近(改札外) / 半蔵門線 駅事務室付近(改札外),●, ,2023/1/21\n5920,28005,新御茶ノ水,東京メトロ千代田線,C12,C,12,新御茶ノ水 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5919,28005,湯島,東京メトロ千代田線,C13,C,13,湯島 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5918,28005,根津,東京メトロ千代田線,C14,C,14,,,●,,根津交差点方面改札付近(改札内),●, ,2023/2/25\n5917,28005,千駄木,東京メトロ千代田線,C15,C,15,千駄木 団子坂方面改札付近(改札外),,,,団子坂方面改札付近(改札外),, ,\n5916,28005,西日暮里,東京メトロ千代田線,C16,C,16,,,●,,道灌山方面改札付近(改札内),●, ,2023/2/25\n5915,28005,町屋,東京メトロ千代田線,C17,C,17,,,●,,町屋方面改札(改札外),●, ,2023/2/25\n5914,28005,北千住,東京メトロ千代田線,C18,C,18,,,●,,千代田線 駅事務室付近(改札内),●, ,2023/1/22\n5913,28005,綾瀬,東京メトロ千代田線,C19,C,19,,,●,,駅事務室付近(改札内),●, ,2023/2/25\n5912,28005,北綾瀬,東京メトロ千代田線,C20,C,20,,,●,,中央改札付近(改札外),●, ,2023/2/25\n5932,28006,和光市,東京メトロ有楽町線,Y01,Y,01,,,●,,地下鉄成増駅 事務室付近(改札外),●, ,2023/1/3\n5933,28006,地下鉄成増,東京メトロ有楽町線,Y02,Y,02,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5934,28006,地下鉄赤塚,東京メトロ有楽町線,Y03,Y,03,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5935,28006,平和台,東京メトロ有楽町線,Y04,Y,04,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5936,28006,氷川台,東京メトロ有楽町線,Y05,Y,05,,,●,,2番出口付近(改札外),●, ,2023/1/3\n5937,28006,小竹向原,東京メトロ有楽町線,Y06,Y,06,,,●,,4番出口付近(改札外),●, ,2023/1/3\n5938,28006,千川,東京メトロ有楽町線,Y07,Y,07,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5939,28006,要町,東京メトロ有楽町線,Y08,Y,08,,,●,,2番出口付近(改札外),●, ,2023/1/3\n5940,28006,池袋,東京メトロ有楽町線,Y09,Y,09,,,●,,西通路西改札付近(改札外) / 有楽町線 駅事務室付近(改札外),●, ,2023/1/3\n5941,28006,東池袋,東京メトロ有楽町線,Y10,Y,10,東池袋 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5942,28006,護国寺,東京メトロ有楽町線,Y11,Y,11,護国寺 音羽方面改札付近(改札外),,,,音羽方面改札付近(改札外),, ,\n5943,28006,江戸川橋,東京メトロ有楽町線,Y12,Y,12,江戸川橋 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5944,28006,飯田橋,東京メトロ有楽町線,Y13,Y,13,,,●,,飯田橋交差点方面改札付近(改札内) / 有楽町線・南北線駅事務室付近(改札外),●, ,2023/1/4\n5945,28006,市ケ谷,東京メトロ有楽町線,Y14,Y,14,,,●,,市谷田町方面改札付近(改札内),●, ,2023/1/12\n5946,28006,麹町,東京メトロ有楽町線,Y15,Y,15,,,●,,6番出口方面付近(改札外),●, ,2023/1/4\n5947,28006,永田町,東京メトロ有楽町線,Y16,Y,16,永田町 紀尾井町方面改札付近(改札内) 駅事務室付近(改札内),,,,紀尾井町方面改札付近(改札内) / 駅事務室付近(改札内),, ,\n5948,28006,桜田門,東京メトロ有楽町線,Y17,Y,17,,,●,,4番出口付近(改札外),●, ,2023/1/21\n5949,28006,有楽町,東京メトロ有楽町線,Y18,Y,18,,,●,,JR有楽町駅方面改札付近(改札外),●, ,2023/1/21\n5950,28006,銀座一丁目,東京メトロ有楽町線,Y19,Y,19,銀座一丁目 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5951,28006,新富町,東京メトロ有楽町線,Y20,Y,20,新富町 5番出口付近(改札外),,,,5番出口付近(改札外),, ,\n5952,28006,月島,東京メトロ有楽町線,Y21,Y,21,月島 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5953,28006,豊洲,東京メトロ有楽町線,Y22,Y,22,豊洲 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5954,28006,辰巳,東京メトロ有楽町線,Y23,Y,23,辰巳 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5955,28006,新木場,東京メトロ有楽町線,Y24,Y,24,新木場 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5956,28008,渋谷,東京メトロ半蔵門線,Z01,Z,01,,,●,,銀座線 駅事務室付近(改札内),●, ,2023/1/21\n5957,28008,表参道,東京メトロ半蔵門線,Z02,Z,02,,,●,,青山通り方面改札付近(改札外),●, ,2023/1/21\n5958,28008,青山一丁目,東京メトロ半蔵門線,Z03,Z,03,,,●,,駅事務室付近(改札外),●, ,2023/1/21\n5959,28008,永田町,東京メトロ半蔵門線,Z04,Z,04,永田町 紀尾井町方面改札付近(改札内) 駅事務室付近(改札内),,,,紀尾井町方面改札付近(改札内) / 駅事務室付近(改札内),, ,\n5960,28008,半蔵門,東京メトロ半蔵門線,Z05,Z,05,,,●,,3番出口付近(改札外),●, ,2023/1/11\n5961,28008,九段下,東京メトロ半蔵門線,Z06,Z,06,九段下 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5962,28008,神保町,東京メトロ半蔵門線,Z07,Z,07,神保町 専修大学方面改札付近(改札外),,,,専修大学方面改札付近(改札外),, ,\n5963,28008,大手町,東京メトロ半蔵門線,Z08,Z,08,,,●,,東西線 駅事務室付近(改札外) / 半蔵門線 駅事務室付近(改札外),●, ,2023/1/21\n5964,28008,三越前,東京メトロ半蔵門線,Z09,Z,09,,,●,,銀座線 駅事務室付近(改札外) / B5出口付近(改札外),●, ,2023/1/28\n5965,28008,水天宮前,東京メトロ半蔵門線,Z10,Z,10,,,●,,水天宮方面改札付近(改札外),●, ,2023/1/28\n5966,28008,清澄白河,東京メトロ半蔵門線,Z11,Z,11,,,●,,B1出口付近(改札外),●, ,2023/1/28\n5967,28008,住吉,東京メトロ半蔵門線,Z12,Z,12,,,●,,B1出口付近(改札外),●, ,2023/1/28\n5968,28008,錦糸町,東京メトロ半蔵門線,Z13,Z,13,,,●,,定期券うりば付近(改札外),●, ,2023/1/28\n5969,28008,押上〈スカイツリー前〉,東京メトロ半蔵門線,Z14,Z,14,,,●,,業平方面改札付近(改札外),●, ,2023/1/28\n5988,28009,目黒,東京メトロ南北線,N01,N,01,目黒 白金台駅 事務室付近(改札外),,,,白金台駅 事務室付近(改札外),, ,\n5987,28009,白金台,東京メトロ南北線,N02,N,02,白金台 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5986,28009,白金高輪,東京メトロ南北線,N03,N,03,白金高輪 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5985,28009,麻布十番,東京メトロ南北線,N04,N,04,麻布十番 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5984,28009,六本木一丁目,東京メトロ南北線,N05,N,05,,,●,,3番出口方面付近(改札外),●, ,2023/1/21\n5983,28009,溜池山王,東京メトロ南北線,N06,N,06,,,●,,駅事務室付近(改札内),●, ,2023/1/21\n5982,28009,永田町,東京メトロ南北線,N07,N,07,永田町 紀尾井町方面改札付近(改札内) 駅事務室付近(改札内),,,,紀尾井町方面改札付近(改札内) / 駅事務室付近(改札内),, ,\n5981,28009,四ツ谷,東京メトロ南北線,N08,N,08,四ツ谷 赤坂方面改札付近(改札内) 南北線 駅事務室付近(改札内),,,,赤坂方面改札付近(改札内) / 南北線 駅事務室付近(改札内),, ,\n5980,28009,市ケ谷,東京メトロ南北線,N09,N,09,,,●,,市谷田町方面改札付近(改札内),●, ,2023/1/12\n5979,28009,飯田橋,東京メトロ南北線,N10,N,10,,,●,,飯田橋交差点方面改札付近(改札内) / 有楽町線・南北線駅事務室付近(改札外),●, ,2023/1/4\n5978,28009,後楽園,東京メトロ南北線,N11,N,11,後楽園 南北線 駅事務室付近(改札外),,,,南北線 駅事務室付近(改札外),, ,\n5977,28009,東大前,東京メトロ南北線,N12,N,12,東大前 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5976,28009,本駒込,東京メトロ南北線,N13,N,13,本駒込 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5975,28009,駒込,東京メトロ南北線,N14,N,14,駒込 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5974,28009,西ケ原,東京メトロ南北線,N15,N,15,西ケ原 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5973,28009,王子,東京メトロ南北線,N16,N,16,王子 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n5972,28009,王子神谷,東京メトロ南北線,N17,N,17,王子神谷 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5971,28009,志茂,東京メトロ南北線,N18,N,18,志茂 1番出口付近(改札外),,,,1番出口付近(改札外),, ,\n5970,28009,赤羽岩淵,東京メトロ南北線,N19,N,19,赤羽岩淵 駅事務室付近(改札内),,,,駅事務室付近(改札内),, ,\n5989,28010,和光市,東京メトロ副都心線,F01,F,01,,,●,,地下鉄成増駅 事務室付近(改札外),●, ,2023/1/3\n5990,28010,地下鉄成増,東京メトロ副都心線,F02,F,02,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5991,28010,地下鉄赤塚,東京メトロ副都心線,F03,F,03,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5992,28010,平和台,東京メトロ副都心線,F04,F,04,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5993,28010,氷川台,東京メトロ副都心線,F05,F,05,,,●,,2番出口付近(改札外),●, ,2023/1/3\n5994,28010,小竹向原,東京メトロ副都心線,F06,F,06,,,●,,4番出口付近(改札外),●, ,2023/1/3\n5995,28010,千川,東京メトロ副都心線,F07,F,07,,,●,,駅事務室付近(改札外),●, ,2023/1/3\n5996,28010,要町,東京メトロ副都心線,F08,F,08,,,●,,2番出口付近(改札外),●, ,2023/1/3\n5997,28010,池袋,東京メトロ副都心線,F09,F,09,,,●,,西通路西改札付近(改札外) / 有楽町線 駅事務室付近(改札外),●, ,2023/1/3\n5998,28010,雑司が谷,東京メトロ副都心線,F10,F,10,雑司が谷 2番出口方面付近(改札外),,,,2番出口方面付近(改札外),, ,\n5999,28010,西早稲田,東京メトロ副都心線,F11,F,11,西早稲田 早大理工方面改札付近(改札外),,,,早大理工方面改札付近(改札外),, ,\n6000,28010,東新宿,東京メトロ副都心線,F12,F,12,東新宿 駅事務室付近(改札外),,,,駅事務室付近(改札外),, ,\n6001,28010,新宿三丁目,東京メトロ副都心線,F13,F,13,新宿三丁目 丸ノ内線 駅事務室付近(改札外) E5出口付近(改札外),,,,丸ノ内線 駅事務室付近(改札外) / E5出口付近(改札外),, ,\n6002,28010,北参道,東京メトロ副都心線,F14,F,14,北参道 改札付近(改札外),,,,改札付近(改札外),, ,\n6003,28010,明治神宮前〈原宿〉,東京メトロ副都心線,F15,F,15,,,●,,千代田線 駅事務室付近(改札外),●, ,2023/1/21\n6004,28010,渋谷,東京メトロ副都心線,F16,F,16,,,●,,銀座線 駅事務室付近(改札内),●, ,2023/1/21\n\n \";\n\n\n DB::table('t_station_stamp')->delete();\n\n\n $ex_str = explode(\"\\n\", $str);\n\n foreach ($ex_str as $v) {\n\n\n if (trim($v) == \"\") {\n continue;\n }\n\n\n $ex_v = explode(\",\", trim($v));\n $insert = [\n \"station_code\" => trim($ex_v[0]),\n \"train_code\" => trim($ex_v[1]),\n \"image_folder\" => trim($ex_v[5]),\n \"image_code\" => trim($ex_v[6]),\n \"poster_position\" => trim($ex_v[11]),\n \"stamp_get_date\" => (trim($ex_v[14]) == '') ? '' : date($ex_v[14]),\n\n \"station_name\" => trim($ex_v[2]),\n \"train_name\" => trim($ex_v[3]),\n ];\n DB::table('t_station_stamp')->insert($insert);\n }\n\n\n }", "function TenNguoiDangBai_TheoId($id_nguoidung)\n{\n\t$qr=\"\n\t\t\tSELECT ten_nguoidung FROM nguoidung\n\t\t\tWHERE id_nguoidung=$id_nguoidung\n\t\";\n\treturn mysql_query($qr);\n}", "function sawlihat($id)\n\t{\n\t\t//$a = 'A1';\n\t\t//foreach ($q2 as $key) {\n\t\t\t//echo \"<br/>\";\n\t\t\t//echo $key->nidn.\" = \".$a;\n\t\t\t//echo \"<br/>\";\n\t\t\t\n\t\t\t//echo \"Hasil Akhir = \".number_format($kumulatip,2);\n\t\t\t//echo \"<br/>\";\n\t\t\t//$a++;\n\t\t//}\n\t\t$data['tahun'] = $id;\n\t\t$data['q2'] = $this->db->query(\"SELECT DISTINCT nidn,nama_karyawan FROM tbl_jadwal_matakuliah a JOIN tbl_karyawan b on a.nidn = b.nik where tahunajaran = '\".$id.\"'\")->result();\n\t\t$data['page'] = 'penilaian/saw_lihat';\n\t\t$this->load->view('template', $data);\t\n\t}", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function similarity($id_lbb_aktif = 3) // $id_lbb_aktif adalah lbb yang sedang dilihat dan dicari nilai kemiripan terhapat lbb lain\n {\n $tabel_tf_idf_balik = $this->tabel_tf_idf_balik();\n $rata_term = $this->rata_term();\n $similarity = [];\n\n\n foreach ($tabel_tf_idf_balik as $id_lbb => $row){\n $sim_atas = 0;\n $bawah1 = 0;\n $bawah2 = 0;\n $sim_bawah = 0;\n\n if ($id_lbb == $id_lbb_aktif){ // $id_lbb_aktif adalah LBB yang dicari kemiripannya dengan LBB lain\n continue;\n }\n\n foreach ($row as $term_aktivitas => $tf_idf){\n//\n if ($tf_idf == 0 || $tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas] == 0){\n continue;\n }\n\n $sim_atas = $sim_atas + (($tf_idf-$rata_term[$term_aktivitas])*($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas]));\n $bawah1 = $bawah1 + (pow($tf_idf-$rata_term[$term_aktivitas],2));\n $bawah2 = $bawah2 + (pow($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas], 2));\n $sim_bawah = sqrt($bawah1)*sqrt($bawah2);\n }\n////\n if ($sim_bawah == 0){ //similarity bawah bernilai 0 terjadi karena tidak ada bisa dicari nilai kemiripan lbb aktif dengan lbb n lainnya\n continue;\n }\n\n $similarity [$id_lbb] = $sim_atas / $sim_bawah;\n }\n// arsort($similarity);\n return $similarity;\n }", "function hapusawalan1($kata){\n if(substr($kata,0,4)==\"meng\"){\n if(substr($kata,4,1)==\"e\"||substr($kata,4,1)==\"u\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"meny\"){\n $kata = \"ny\".substr($kata,4);\n }else if(substr($kata,0,3)==\"men\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,3)==\"mem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"me\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,4)==\"peng\"){\n if(substr($kata,4,1)==\"e\" || substr($kata,4,1)==\"a\"){\n $kata = \"k\".substr($kata,4);\n }else{\n $kata = substr($kata,4);\n }\n }else if(substr($kata,0,4)==\"peny\"){\n $kata = \"s\".substr($kata,4);\n }else if(substr($kata,0,3)==\"pen\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"t\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,3)==\"pem\"){\n if(substr($kata,3,1)==\"a\" || substr($kata,3,1)==\"i\" || substr($kata,3,1)==\"e\" || substr($kata,3,1)==\"u\" || substr($kata,3,1)==\"o\"){\n $kata = \"p\".substr($kata,3);\n }else{\n $kata = substr($kata,3);\n }\n }else if(substr($kata,0,2)==\"di\"){\n $kata = substr($kata,2);\n }else if(substr($kata,0,5)==\"keter\"){\n $kata = substr($kata,5);\n }else if(substr($kata,0,3)==\"ter\"){\n $kata = substr($kata,3);\n }else if(substr($kata,0,2)==\"ke\"){\n $kata = substr($kata,2);\n }\n return $kata;\n }", "public function bloaf()\n\t{\n\t\tif (preg_match('/^([a-f0-9]{32}) - \\(\\d+\\/\\d+\\) - \"[a-f0-9]{32}.+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[10/17] - \"EGk13kQ1c8.part09.rar\" - 372.48 MB <-> usenet-space-cowboys.info <-> powered by secretusenet.com <-> yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] .+? usenet-space.+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Neu bei Bitfighter vom 23-07-2013) - \"01 - Sido - Bilder Im Kopf.mp3\" yEnc\n\t\tif (preg_match('/^\\((.+?)\\) - \".+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //(2/8) \"Mike.und.Molly.S01E22.Maennergespraeche.GERMAN.DL.DUBBED.720p.BluRay.x264-TVP.part1.rar\" - 1023,92 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //4y (PW) [@ usenet-4all.info - powered by ssl.news -] [27,35 GB] [001/118] \"1f8867bb6f89491793d3.part001.rar\" yEnc\n\t\tif (preg_match('/^.+? (-|\\(PW\\))\\s+\\[.+? -\\] \\[\\d+[,.]\\d+ [mMkKgG][bB]\\] \\[\\d+\\/\\d+\\] \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Bennos Special Tools DVD - Die Letzte <> DRM <><> PW <> - (002/183) \"Bennos Special Tools DVD - Die Letzte.nfo\" - 8,28 GB - yEnc\n\t\tif (preg_match('/^(\\[[A-Za-z]+\\]\\.)?([a-zA-Z0-9].+?)([\\^<> ]+give-me-all\\.org[\\^<> ]+|[\\^<> ]+)DRM[\\^<> ]+.+? - \\(\\d+\\/\\d+\\)\\s+\".+?\" - .+? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(1/9) - CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual - \"CyberLink.PhotoDirector.4.Ultra.4.0.3306.Multilingual.par2\" - 154,07 MB - yEnc\n\t\t//(1/5) - Mac.DVDRipper.Pro.4.0.8.Mac.OS.X- \"Mac.DVDRipper.Pro.4.0.8.Mac.OS.X.rar\" - 24,12 MB - yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) - (.+?) ?- \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[3/3 Helene Fischer - Die Biene Maja 2013 MP3 Helene Fischer - Die Biene Maja 2013 MP3.mp3.vol0+1.PAR2\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ (.+?)\\..+?\" yEnc$/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //Uploader.Presents-Mutter.und.Sohn.German.2013.DVDRiP.x264-XFi[01/27]\"xf-mutterusohn.nfo\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+[\\)\\]]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function mencari_tf($data=array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\n\t\t// if ($i==0) {\n\t\t\t$term_query[$i] = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form\n\t\t// }\n\t}\n\n\t$j=0;\n\tfor ($k=0; $k <count($term_query) ; $k++) { \n\t\tforeach ($term_query[$k] as $value) {\n\t\t\t$query[$j] = $value;\n\t\t\t$j++;\n\t\t}\n\t}\n\n\t$term_unik = array_unique($query);\n\n\t$b = 0;\n\tforeach ($term_unik as $value1) {\n\t\t$term_urut[$b]= $value1;\n\t\t$b++;\n\t}\n\t\n\t//batas term\n\n\t//mencari tf\n\tfor ($m=0; $m <count($data) ; $m++) { \n\t\tfor ($n=0; $n <count($term_urut) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($term_urut[$n], $data[$m][1])) ? 1 : 0 ;\n\t\t\t\t// $tf[$m][$n]=array(\"index_term\"=>$n,\"nilai_tf\"=>$angka);\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "function _gaiabb_autocompstage($string) {\n\n $matches = array();\n $query = db_select('gbb_gdisp', 'd');\n $query ->leftjoin('gbb_gmodu', 'm', 'm.co_disp = d.co_disp');\n $query ->addField('d', 'id_disp', 'id_disp');\n $query ->addField('d', 'lib', 'lib');\n $query ->addField('m', 'lib', 'libmodu');\n $query ->addField('m', 'co_modu', 'co_modu');\n $query ->condition('id_disp', db_like('12') . '%', 'LIKE')\n ->condition(db_or()->condition('id_disp', '%' . db_like($string) . '%', 'LIKE')\n ->condition('m.lib', '%' . db_like($string) . '%', 'LIKE')\n ->condition('m.co_modu', '%' . db_like($string) . '%', 'LIKE')\n )\n ->distinct()\n ->range(0, 10);\n $result = $query->execute();\n foreach ($result as $r) {\n $matches[$r->co_modu] = $r->id_disp.\"/\".$r->co_modu.\" \".$r->libmodu;\n }\n $count = $result->rowCount();\n if ($count > 9) $matches[' '] = '..... Et bien d\\'autres .....';\n drupal_json_output($matches);\n}", "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "public function codeNoId($type = 'akad_baru', $status_akad = null, $no_id = null)\n {\n \n //'akad ulang yang lebih dari 1'\n if($status_akad == 'ulang' || $status_akad == 'edit'){\n //'agar bisa mengambil data c99-04-021019-01-AU-'\n $codeAu = substr($no_id, 0, 21);\n $totalAkadUlang = $this->log_akad->where('no_id', 'LIKE', '%'.$codeAu.'%')->count();\n $totalAkadUlang = $totalAkadUlang + 1;\n $value = $codeAu.$totalAkadUlang;\n }elseif($status_akad == 'baru' || $status_akad == 'edit'){\n $codeNoId = 'C99-'.$this->infoCabang()->nomorCabang.'-'.Carbon::now()->format('dmy');\n\n // 'mendapatkan jumlah akad ke-berapa pada hari ini'\n $contractToday = $this->log_akad->where('no_id', 'LIKE', '%'.$codeNoId.'%')->count();\n $contractToday = $contractToday + 1;\n $contractToday = $contractToday >= 10 ? '-0'.$contractToday : '-00'.$contractToday;\n \n $value = $codeNoId . $contractToday;\n\n //'jika akad ulang pertama kali'\n if($type == 'akad_ulang'){\n $codeAu = $type == 'akad_ulang' ? '-AU' : null;\n $codeAu = $value.$codeAu;\n\n //'total akad ulang ini dimaksudkan kepada jumlah akad ulang pada nasabah tersebut'\n //'jika nasabah A telah melakukan akad ulang sebanyak 2x, maka total akad ulang sebanyak 2'\n $totalAkadUlang = $this->log_akad->where('no_id', 'LIKE', '%'.$codeAu.'%')->count();\n $totalAkadUlang = $totalAkadUlang + 1;\n\n $value = $codeAu.'-'.$totalAkadUlang;\n }\n }\n\n return (object) compact('value');\n }", "function jml_mhs_bimbingan_ta($periode = ''){\n\t\t\t// \t\t \t\t 2 --> untuk ujian tugas akhir (munaqasah)\n\n\t\t\t$kd_dosen \t= $this->session->userdata('kd_dosen');\n\t\t\t$ta \t\t= $this->session->userdata('kd_ta');\n\t\t\t$kd_smt \t= $this->session->userdata('kd_smt');\n\t\t\t$jumlah_mahasiswa = 0;\n\n\t\t\t$url \t\t= 'sia_skripsi_bimbingan/jadwalTA';\n\t\t\t$api_url \t= 'http://service.uin-suka.ac.id/servtugasakhir/sia_skripsi_public/'.$url;\n\t\t\t$parameter \t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen, $periode));\n\t\t\t$data \t \t= $this->s00_lib_api->get_api_json($api_url, 'POST', $parameter);\n\n\t\t\tif($data){\n\t\t\t\tforeach ($data as $key) {\n\t\t\t\t\t$nim \t= $key['NIM'];\n\t\t\t\t\t$tgl \t= str_replace('-', '/', $key['TGL_MUNA']);\n\n\t\t\t\t\t$data_mhs \t= $this->get_data_mhs($nim);\n\t\t\t\t\t$kd_prodi \t= $data_mhs[0]['KD_PRODI'];\n\n\t\t\t\t\t$semester \t= $this->periode_semester($tgl, $kd_prodi);\n\n\t\t\t\t\t$kd_ta_data \t= $semester[0]['KD_TA'];\n\t\t\t\t\t$kd_smt_data \t= $semester[0]['KD_SMT'];\n\n\t\t\t\t\tif($ta == $kd_ta_data && $kd_smt == $kd_smt_data){\n\t\t\t\t\t\t$jumlah_mahasiswa++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $jumlah_mahasiswa;\n\t\t}", "function generateTagihanpendaftar($conn, $r_nopendaftar, $datapendaftar){\n\t\t\trequire_once(Route::getModelPath('akademik'));\n\t\t\trequire_once(Route::getModelPath('tarif'));\n\t\t\trequire_once(Route::getModelPath('jenistagihan'));\n\t\t\t$arr_tagihan = mJenistagihan::getArray($conn,array('A','S','T','B'),'0'); # mendapatkan jenis tagihan.\n\t\t\t\n\t\t\tif (empty ($datapendaftar['jalurpenerimaan']))\n\t\t\t\treturn list($p_posterr, $p_postmsg) = array(true, 'Proses Generate Gagal, Silahkan cek jalur penerimaan pendaftar');\n\t\t\telse if (empty ($datapendaftar['periodedaftar']))\n\t\t\t\treturn list($p_posterr, $p_postmsg) = array(true, 'Proses Generate Gagal, Silahkan cek Periode Daftar');\n\t\t\telse if (empty ($datapendaftar['sistemkuliah']))\n\t\t\t\treturn list($p_posterr, $p_postmsg) = array(true, 'Proses Generate Gagal, Silahkan cek Sistem Kuliah pendaftar');\n\t\t\telse if (empty ($datapendaftar['gelombang']))\n\t\t\t\treturn list($p_posterr, $p_postmsg) = array(true, 'Proses Generate Gagal, Silahkan cek Gelombang daftar pendaftar');\n\t\t\t\t\n\t\t\tif($arr_tagihan)\n\t\t\t\t$g_tagihan = array();\n\t\t\t\tforeach($arr_tagihan as $i => $v){\n\t\t\t\t\t$jumlahangsur = ($datapendaftar['periodemasuk'] >= '20171' ? $v['jumlahangsur2017'] : $v['jumlahangsur']);\n\t\t\t\t\t//cari tarif\n\t\t\t\t\t$arr_tarif = mTarif::getRowtarif($conn,$datapendaftar['periodedaftar'].'1',$datapendaftar['jalurpenerimaan'],$datapendaftar['pilihanditerima'],$v['jenistagihan'],$datapendaftar['sistemkuliah'], $datapendaftar['gelombang']);\n\t\t\t\t\t\n\t\t\t\t\tif ($v['jenistagihan'] == 'UKT')\n\t\t\t\t\t$arr_tarif = mTarif::getTarifuktpendaftar($conn, $datapendaftar['nopendaftar']);\n\t\t\t\t\t \n\t\t\t\t\tif($v['frekuensitagihan']<>'B')\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$cek = $conn->getRow(\"select * from h2h.ke_tagihan where nopendaftar = '$r_nopendaftar' \n\t\t\t\t\t\t\t\t\t\t\tand jenistagihan = '\".$v['jenistagihan'].\"' and periode = '\".$datapendaftar['periodedaftar'].'1'.\"'\");\n\t\t\t\t\t\t\tif($cek){\n\t\t\t\t\t\t\t\tif($cek['isedit'] == 'G')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($cek['flaglunas']=='BB'){\n\t\t\t\t\t\t\t\t\t\t\tstatic::deleteperid($conn,$cek['idtagihan']);\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$nominaltagihan = ($arr_tarif[0]['nominaltarif'] / $jumlahangsur); //bagi jika ada split tagihan\n\t\t\t\t\t\t\tif ($nominaltagihan > 0){\n\n\n\t\t\t\t\t\t\t\t\t\t$rec = array();\n\t\t\t\t\t\t\t\t\t\t$rec['jenistagihan'] = $v['jenistagihan'];\n\t\t\t\t\t\t\t\t\t\t$rec['nopendaftar'] = $r_nopendaftar;\n\t\t\t\t\t\t\t\t\t\t$rec['tgltagihan'] = date('Y-m-d');\n\n\t\t\t\t\t\t\t\t\t\t$rec['periode'] = $datapendaftar['periodedaftar'].'1';\n\t\t\t\t\t\t\t\t\t\t$rec['isangsur'] = 0;\n\t\t\t\t\t\t\t\t\t\t$rec['isedit'] = 'G';\n\t\t\t\t\t\t\t\t\t\t$rec['flaglunas'] = 'BB';\n\t\t\t\t\t\t\t\t\t\t$rec['nominaltagihan'] = $nominaltagihan;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor ($a=1; $a<=$jumlahangsur; $a++){\n\t\t\t\t\t\t\t\t\t\tif ($rec['nominaltagihan'] > 0) {\n\t\t\t\t\t\t\t\t\t\t$rec['idtagihan'] = str_pad($v['kodetagihan'],2,'0',STR_PAD_LEFT).$datapendaftar['periodedaftar'].'1'.str_pad($a,2,'0',STR_PAD_LEFT).str_pad($r_nopendaftar,15,'0',STR_PAD_LEFT);\n\n\t\t\t\t\t\t\t\t\t\t$err = static::insertRecord($conn,$rec);\n\t\t\t\t\t\t\t\t\t\tif ($err){\n\t\t\t\t\t\t\t\t\t\t\t$jumlah_err++;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tif (!empty ($rec['nominaltagihan']))\n\t\t\t\t\t\t\t\t\t\t\t$g_tagihan[]=$v['namajenistagihan'];\t\n\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}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\telse{ \n\t\t\t\t\t\t$frekuensi = mAkademik::getFrekuensibulanan($conn,$datapendaftar['periodedaftar'].'1');\n\t\t\t\t\t\tforeach($frekuensi as $i => $val){\n\t\t\t\t\t\t\t\t$cek = $conn->getRow(\"select * from h2h.ke_tagihan where nopendaftar = '$r_nopendaftar' \n\t\t\t\t\t\t\t\t\t\t\tand jenistagihan = '\".$v['jenistagihan'].\"' and periode = '\".$datapendaftar['periodedaftar'].'1'.\"'\n\t\t\t\t\t\t\t\t\t\t\tand bulantahun = '$i'\");\n\t\t\t\t\t\t\tif($cek){\n\t\t\t\t\t\t\t\tif($cek['isedit'] == 'G')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($cek['flaglunas']=='BB'){\n\t\t\t\t\t\t\t\t\t\tstatic::deleteperid($conn,$cek['idtagihan']);\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\t\t\t$rec = array();\n\n\t\t\t\t\t\t\t\t\t\t$rec['jenistagihan'] = $v['jenistagihan'];\n\t\t\t\t\t\t\t\t\t\t$rec['nopendaftar'] = $r_nopendaftar;\n\t\t\t\t\t\t\t\t\t\t$rec['tgltagihan'] = date('Y-m-d');\n\t\t\t\t\t\t\t\t\t\t$rec['periode'] = $datapendaftar['periodedaftar'].'1';\n\t\t\t\t\t\t\t\t\t\t$rec['bulantahun'] = $i;\n\t\t\t\t\t\t\t\t\t\t$rec['isangsur'] = 0;\n\t\t\t\t\t\t\t\t\t\t$rec['isedit'] = 'G';\n\t\t\t\t\t\t\t\t\t\t$rec['flaglunas'] = 'BB';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$rec['nominaltagihan'] = ($arr_tarif[0]['nominaltarif'] / $jumlahangsur);\n\t\t\t\t\t\t\t\t\t\tif ($rec['nominaltagihan'] > 0){\n\t\t\t\t\t\t\t\t\t\t\tfor ($a=1; $a<=$jumlahangsur; $a++){\n\t\t\t\t\t\t\t\t\t\t\t\tif ($rec['nominaltagihan'] > 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$rec['idtagihan'] = str_pad($v['kodetagihan'],2,'0',STR_PAD_LEFT).$datapendaftar['periodedaftar'].'1'.str_pad($a,2,'0',STR_PAD_LEFT).str_pad($r_nopendaftar,15,'0',STR_PAD_LEFT);\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$err = static::insertRecord($conn,$rec);\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 ($err){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$jumlah_err++;\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 (!empty ($arr_tarif['nominaltarif']))\n\t\t\t\t\t\t\t\t\t\t\t\t\t$g_tagihan[]=$v['namajenistagihan'];\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}\n\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tif ($err <> 0)\n\t\t\t\t\t\treturn array(true, 'Penyimpanan Data Gagal <br>'.$conn->ErrorMsg());\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (count($g_tagihan) > 0 ){\n\t\t\t\t\t\t$pesan='Proses Generate Tagihan Berhasil';\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t$pesan='Proses Generate Tagihan, Namun Tidak ada Tagihan untuk ';\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor($a=0; $a< count($g_tagihan); $a++){\n\t\t\t\t\t\t\t$pesan.= $g_tagihan[$a].', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$pesan .=' <br> No Pendaftar: <b>'.$r_nopendaftar.'</b>';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (count($g_tagihan) > 0 )\n\t\t\t\t\t\t$pesan .=' Berhasil';\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn array(false, $pesan);\n\t\t\t\t\t}\n\t\t}", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "function Hasil_pencarian($cek,$tempprodi) {\n\t\t\n\t\t//D_TIMAJAR2013 (KD_KELAS, KD_DOSEN)\n\t\t\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.NM_DOSEN, B.NM_DOSEN_F FROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C WHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%\".$cek.\"%')) OR B.KD_DOSEN LIKE '%\".$cek.\"%') AND (A.KD_PRODI IN ('\".$tempprodi.\"'))\")->result_array();\n\t\t\n\t\t\n\t\t/* $out_kd_prodi = $this->db->query(\"SELECT DISTINCT D.KD_PRODI FROM SIA.V_KELAS D, SIA.D_TIMAJAR2013 E WHERE D.KD_KELAS = E.KD_KELAS(+) AND E.KD_DOSEN = '\".$cek.\"'\")->result_array();\n\t\tif(!empty($out_kd_prodi)){\n\t\t\tfor($i=0; $i<count($out_kd_prodi); $i++){\n\t\t\t\tif($i==0) $kd_prodi_b[0] = $out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t\t$kd_prodi_b[0] .= \"','\".$out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t}\n\t\t}else{\n\t\t\t$kd_prodi_b[0] = '';\n\t\t}\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.KD_PRODI, B.NM_DOSEN\n\t\t\t\t\t\t\t\t\tFROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C \n\t\t\t\t\t\t\t\t\tWHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%$cek%')) OR B.KD_DOSEN = '\".$cek.\"') AND (A.KD_PRODI IN ('$tempprodi') OR A.KD_PRODI IN ('\".$kd_prodi_b[0].\"'))\")->result_array(); */\n\t\treturn $hp;\n }", "function sudahBayar($conn, $r_periode) {\n $sql = \"select idpegawai from \" . static::table('ga_gajipeg') . \" where periodegaji = '$r_periode' and isfinish = 'Y'\";\n $rs = $conn->Execute($sql);\n\n $a_peg = array();\n while ($row = $rs->FetchRow()) {\n $a_peg[$row['idpegawai']] = $row['idpegawai'];\n }\n\n if (count($a_peg) > 0)\n $i_peg = implode(\",\", $a_peg);\n\n return $i_peg;\n }", "function queryTexto($string) {\n\t\t// Devuelve el array de las cosas que no son ni barrios ni ciudades para el SQL\n\t\t// devuelve false si no hay nada\n\n $trozos = array();\n\n\t\t// Primero si hay ciudad o barrio\n\t\tif (strpos($string, \"ciudad:\") > 0) {\n\t\t\t// Si hay ciudad\n\t\t\t$trozostmp = explode(\"ciudad:\", $string);\n\t\t} elseif (strpos($string, \"barrio:\") > 0) {\n\t\t\t// Si hay barrio\n\t\t\t$trozostmp = explode(\"barrio:\", $string);\n\t\t} else {\n\t\t\t// Si solo hay texto\n\t\t\t$trozostmp = [$string];\n\t\t}\n\n if ($trozostmp[0]) {\n\t\t\t// Primero limpiamos el string\n\t\t\t$textoSinMierda = preg_replace(\"/(\\b(a|e|o|u)\\ )|(\\ben\\b)|(\\bun\\b)|(\\bde(\\b|l))|(\\bqu(|é|e)\\b)|(\\b(a|e)l\\b)|(\\bell(o|a)(\\b|s))|(\\bla(\\b|s))|(\\blo(\\b|s))|(\\bante\\b)|(\\bo\\b)|(\\by\\b)|(\\bes\\b)|(\\bsu\\b)|(\\,|\\.|\\;)/\", \"\", $trozostmp[0]);\n\t\t\t// Luego separamos las \"palabras\"\n $trozostmp2 = explode(\" \", $textoSinMierda);\n\t\t\t// Para cada una (que no este vacia por dobles espaciados o similar)\n foreach ($trozostmp2 as $cacho) {\n if ($cacho != \"\") {\n\t\t\t\t\t// La metemos en el array\n array_push($trozos, $cacho);\n }\n }\n\t\t\t// Devolvemos el array\n return $trozos;\n } else {\n\t\t\t// Por si algo ha pasado, devolvemos false\n return false;\n }\n }", "function crea_itn($r,$string,$u){\n\t\n \n\t\t\t global $db,$dbf,$fecha_con_formato;\n \n $cadena = explode(\"[\",$string);\n $cadena2 = explode(\"@\",$cadena[10]);\n \n for($c=0;$c<count($cadena2);$c++){\n\t\t\t\t\t \n\t\t\t\t\t\t $sql_z = \"SELECT ID_ITINERARIO,ID_DIA FROM ITN_DEFINICION WHERE ID_ROUTE = \".$r.\" AND ID_DIA = \".$cadena2[$c]; \n \t\t\t $kuery = $db->sqlQuery($sql_z);\n \t\t\t $con = $db->sqlEnumRows($kuery);\n\t\t\t\t\t\t $row = $db->sqlFetchArray($kuery);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t if($con > 0){\n\t\t\t\t\t\t echo \"no se hace algo <br>\";\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t echo \"insertar \".$r.','.$cadena2[$c].','.$u.'<br />';\n \t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t $datos = Array(\n \t\t\t\t\t\t\t 'ID_ROUTE' => $r,\n \t\t\t\t\t\t\t 'ID_DIA' => $cadena2[$c],\n\t\t\t\t\t\t\t\t\t\t\t\t \t 'COD_USER' => $u,\n\t \t\t\t\t\t\t 'CREADO' => $fecha_con_formato,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'ACTIVO' => 1\n \t\t\t\t\t\t\t\t );\n \t\t\t\tif($dbf-> insertDB($datos,'ITN_DEFINICION',false) == true){\n \t\t\t\t\t\t\t\t\t $bandera = 1;\n\t\t\t\t\t\t\t\t\t echo 1;\t\t\n\t\t\t\t\t\t\t }\telse{\n\t\t\t\t\t\t\t\techo 0;\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 \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t \n}", "public function get_synonim ($tag){\n//administration, disposal\n// => management, direction';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n//\n// $raw_synonims1 = 'Sense 1\n//Kennedy, Jack Kennedy, John Fitzgerald Kennedy, JFK, President Kennedy, President John F. Kennedy\n// INSTANCE OF=> President of the United States, United States President, President, Chief Executive';\n// $matches1 = array ();\n// preg_match_all (\"/\\s+(.+)\\s+=>/\",\n// $raw_synonims1, $matches1, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims1);\n// var_dump($matches1);\n// exit();\n\n\n // cmd commend\n $wn_command = '\"C:/Program Files (x86)/WordNet/2.1/bin/wn\" \"'.$tag.'\" \"-synsn\"';\n $raw_synonims = shell_exec ($wn_command);\n\n // if the word exist\n if (! $raw_synonims) {\n return null;\n }\n\n // get the result of cmmend\n $matches = array ();\n preg_match_all (\"/\\s+(.+)\\s+.+?=>/\",\n $raw_synonims, $matches, PREG_PATTERN_ORDER);\n// var_dump($raw_synonims);\n\n // if no matched result\n if(!isset($matches[1][0])){\n return null;\n }\n\n// dd($matches);\n // get all accepted words\n $expanded_query = array();\n\n foreach ($matches[1] as $match){\n $match = explode (\", \", $match);\n foreach ($match as $word){\n array_push($expanded_query, strtolower($word));\n }\n }\n\n // remove repeated element\n $expanded_query = array_unique($expanded_query);\n\n // return the word\n return $expanded_query;\n }", "public static function BaoCaoKetQuaToCao($tu_ngay,$den_ngay,$diaBanIdAllArray)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n //don thu tp\n $donthu_tp_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', THANH_PHO);\n })\n ->where('loaidon',2)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_tp = DB::table('donthu')\n ->whereIn('donthuid',$donthu_tp_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_tp_tc = DB::table('donthu')\n ->whereIn('donthuid',$theoky_tp)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n\n\n //don thu huyen\n $donthu_huyen_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', HUYEN);\n })\n ->where('loaidon',2)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_huyen = DB::table('donthu')\n ->whereIn('donthuid',$donthu_huyen_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_huyen_tc = DB::table('donthu')\n ->whereIn('donthuid',$theoky_huyen)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n\n //don thu xa\n\n $donthu_xa_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', XA);\n })\n ->where('loaidon',2)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_xa = DB::table('donthu')\n ->whereIn('donthuid',$donthu_xa_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_xa_tc = DB::table('donthu')\n ->whereIn('donthuid',$theoky_xa)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //tong don khieu nai\n $tongdon_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',2)\n ->pluck('donthuid');\n\n\n\n $tong_donthu_tc = DB::table('donthu')\n ->whereIn('donthuid',$tongdon_id)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n\n\n $tongdon_gq = DB::table('donthu')\n ->whereIn('donthuid',$tong_donthu_tc)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n// ->orWhere('ketqua',RUTDONTHU)\n ->get();\n\n\n $ketqua_tocao = array(\n 'kq_tp'=>$theoky_tp,\n 'tc_tp'=>$donthu_tp_tc,\n 'kq_huyen'=>$theoky_huyen,\n 'tc_huyen'=>$donthu_huyen_tc,\n 'kq_xa'=>$theoky_xa,\n 'tc_xa'=>$donthu_xa_tc,\n 'tongdon'=>$tong_donthu_tc,\n 'tongdon_gq'=>$tongdon_gq\n );\n\n return $ketqua_tocao;\n }", "public function tatasusunanUbah2A($jadual, $medan, $cari, $susun)\n\t{\n\t\t$hasil = array (\n\t\t\t'msic2008' => array (\n\t\t\t\t0 => array (\n\t\t\t\t\t\t'S' => 'S',\n\t\t\t\t\t\t'msic2000' => '93099p',\n\t\t\t\t\t\t'msic' => '96094',\n\t\t\t\t\t\t'keterangan' => 'Perkhidmatan jagaan haiwan(2)',\n\t\t\t\t\t\t'notakaki' => '(2) Termasuk: penumpangan, perapian, mendudukkan dan melatih binatang peliharaan',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t'msic_v1' => array (\n\t\t\t\t0 => array (\n\t\t\t\t\t\t'msic' => '96094',\n\t\t\t\t\t\t'kp' => '85',\n\t\t\t\t\t\t'staf' => NULL,\n\t\t\t\t\t\t'keterangan' => 'Perkhidmatan jagaan haiwan',\n\t\t\t\t\t\t'notakaki' => 'Pet care services INCLUDE boarding, grooming, sitting and training pets '\n\t\t\t\t\t\t\t\t. 'NOT INCLUDE veterinary activities, see 7500 activities of fitness centres, see 93118',\n\t\t\t\t\t),\n\t\t\t),\n\t\t\t'msic_bandingan' => array (\n\t\t\t\t0 => array (\n\t\t\t\t\t\t'sv_newss' => '332',\n\t\t\t\t\t\t'sv_sidap' => '85',\n\t\t\t\t\t\t'msic2000p' => '93099p',\n\t\t\t\t\t\t'msic2000' => '93099',\n\t\t\t\t\t\t'msic' => '96094',\n\t\t\t\t\t\t'keterangan' => 'Aktiviti Perkhidmatan Persendirian',\n\t\t\t\t\t\t'Sektor' => 'Perkhidmatan (Lain-lain)',\n\t\t\t\t\t),\n\t\t\t),\n\t\t\t'msic2000' => array (),\n\t\t\t'msic2000_notakaki' => array (),\n\t\t);\n\n\t\t# ada nilai - pecah tatasusunan kepada beberapa bahagian\n\t\t$hasil1['satu'] = array ( \n\t\t\t'0' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'1' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'2' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1')\n\t\t\t);\n\t\t$hasil1['dua'] = array ( \n\t\t\t'0' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'1' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'2' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1')\n\t\t\t);\n\t\t$hasil1['tiga'] = array ( \n\t\t\t'0' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'1' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1'),\n\t\t\t'2' => array ('kira' => '1', 'A' => 'A1', 'B' => 'B1')\n\t\t\t);\n\n\t\t$hasil2 = array(); # tiada nilai\n\n\t\treturn $hasil; # pulangkan pemboleubah\n\t}", "function generate_id($tabel, $kolom) {\n $val = 'ABCDEF0123456789'; //value yang akan di random antara string tersebut\n global $conn; //memanggil koneksi di global\n $sudah_ada = true; //mengasumsikan id tersebut sudah ada di dalam tabel\n while ($sudah_ada) { //selama id tersebut ada (antisipasi jika id yang random tersebut memang sudah ada di tabel, tetapi kemungkinannya kecil sekali)\n $re = ''; //variabel string kosong untuk menampung\n for ($x=0; $x<23; $x++) { //melakukan perulangan sebanyak 23 kali \n if (($x+1)%6==0) $re .= '-'; //jika kelipatan 6 maka dipastikan pada saat itu adalah pemisah\n else $re .= $val[random_int(0, strlen($val)-1)]; //jika tidak maka akan merandom pilihan val di atas (dengan cara merandom index tersebut dengan angka 0-panjang val di atas)\n }\n $q = $conn->prepare(\"SELECT * FROM $tabel where $kolom='$re'\"); //melakukan select di tabel dengan kolom yang bersangkutan\n $q->execute();\n @$sudah_ada = $q->fetchAll(); //memperbarui asumsi sudah ada tersebut dengan hasil select tadi, jika bernilai false, maka dipastikan di tabel tersebut memang tidak ada data random itu\n //jika sudah ada, makan bernilai true yang mengakibatkan looping berulang lagi, dan mengacak lagi\n }\n return $re; //mereturn hasil\n}", "function EvenRodehCode(){\n\t\t$startTime \t\t= microtime(true);\t\t\t\t\t\t\t//Untuk mencatat waktu mulai kompresi\n\t\t$freq \t\t\t= $this->getTextFrequency();\t\t\t\t//mengambil frequensi dari text yang sudah ada\n\t\t$freqSorted \t= $this->sortByFrequency($freq, false);\t\t//mengurutkan frequensi\n\t\t\n\t\t$this->saveDictionary($freqSorted);\t\t\t\t\t\t\t//menyimpan frequensi yang sudah diurutkan sebagai kamus bahasa\n\t\t\n\t\t$evenRodehCode \t= $this->generateEvenRodeh(sizeof($freqSorted));\t//mengenerate evenRodeh code sebanyak jumlah karakter\n\t\t$bit \t\t\t= $this->generateBit($freqSorted, $evenRodehCode);\t//mengenerate bit dari evenRodehCode dengan frekuensi yang udah diurutkan\n\t\t$this->finalBit\t= $this->generateFlag($bit);\t\t\t\t//menbuat bit final dari bit hasil evenRodehCode dengan ditambah flag bit\n\t\t$finalFinalBit \t= $this->generateFlag($bit);\n\n\t\t$this->saveCompressToFile();\t\t\t\t\t\t\t\t//menyimpan hasil kompresi\n\n\t\t$this->timeProccess\t= microtime(true)-$startTime;\t\t\t//menyimpan lama waktu untuk proses dalam detik\n\t\t$this->bitRate \t= strlen($this->finalBit) / sizeof($freqSorted);\t\t//menghitung bitrate\n\t\t\n\t\techo $finalFinalBit;\n\t}", "public static function BaoCaoKetQuaKhieuNai($tu_ngay,$den_ngay,$diaBanIdAllArray)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n //don thu tp\n $donthu_tp_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', THANH_PHO);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_tp = DB::table('donthu')\n ->whereIn('donthuid',$donthu_tp_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_tp_kn = DB::table('donthu')\n ->whereIn('donthuid',$theoky_tp)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n\n\n //don thu huyen\n $donthu_huyen_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', HUYEN);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_huyen = DB::table('donthu')\n ->whereIn('donthuid',$donthu_huyen_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_huyen_kn = DB::table('donthu')\n ->whereIn('donthuid',$theoky_huyen)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n\n //don thu xa\n\n $donthu_xa_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', XA);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n $theoky_xa = DB::table('donthu')\n ->whereIn('donthuid',$donthu_xa_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->pluck('donthuid');\n\n $donthu_xa_kn = DB::table('donthu')\n ->whereIn('donthuid',$theoky_xa)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n ->get();\n\n //tong don khieu nai\n $tongdon_id = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',1)\n ->pluck('donthuid');\n\n\n\n $tong_donthu_kn = DB::table('donthu')\n ->whereIn('donthuid',$tongdon_id)\n ->whereBetween('ngaynhan',[$tu_ngay,$denNgay])\n ->pluck('donthuid');\n\n\n\n $tongdon_gq = DB::table('donthu')\n ->whereIn('donthuid',$tong_donthu_kn)\n ->whereBetween('ketqua',[KETTHUCDONTHU,RUTDONTHU])\n// ->orWhere('ketqua',RUTDONTHU)\n ->get();\n\n\n $ketqua_khieunai = array(\n 'kq_tp'=>$theoky_tp,\n 'kn_tp'=>$donthu_tp_kn,\n 'kq_huyen'=>$theoky_huyen,\n 'kn_huyen'=>$donthu_huyen_kn,\n 'kq_xa'=>$theoky_xa,\n 'kn_xa'=>$donthu_xa_kn,\n 'tongdon'=>$tong_donthu_kn,\n 'tongdon_gq'=>$tongdon_gq\n );\n\n return $ketqua_khieunai;\n }", "public function getNominaEtau($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo\n , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon \n inner join n_formulas h on h.id=g.idFor \n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function byChatThamGia(){\n\t\t// Chất tham gia array(\"Al\",\"S8\")\n\t\t$equationID=array();\n\t\tforeach($this->thamgia as $chat){\n\t\t\tif(ChemistryThulium::check_thulium($chat))\n\t\t\t{\n\t\t\t\t$thuliumId=ChemistryThulium::get_id($chat);\n\t\t\t\t// Lấy mã chất bởi tên chất\n\t\t\t\t$equationID[]=ChemistryChatThamGia::get_id_equation($thuliumId);\n\t\t\t\t// Láy mã phương trình bởi mã chất\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\treturn $this->getCommonThulium($equationID);\n\t}", "private function proses_npde_pasca2($a, $unit) {\n\t\textract($a);\n\t\t\n\t\t// cari di rbm, dapatkan idnya lalu masukkan ke rincian\n\t\t$rbm = substr($koduk, 0, 7);\n\t\t$urut = substr($koduk, 7, 5);\n\t\t$urut = intval($urut);\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_RBM` FROM `rbm` WHERE `NAMA_RBM` = '$rbm'\", TRUE);\n\t\t\n\t\tif (empty($run->ID_RBM)) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `rbm` VALUES(0, '0', '$unit', '$rbm','1')\");\n\t\t\t$idrbm = $this->db->get_insert_id();\n\t\t} else $idrbm = $run->ID_RBM;\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_RINCIAN_RBM` FROM `rincian_rbm` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_RBM` = '$idrbm'\", TRUE);\n\t\tif (empty($run->ID_RINCIAN_RBM))\n\t\t\t$ins = $this->db->query(\"INSERT INTO `rincian_rbm` VALUES(0, '$idpel', '$idrbm', '$urut')\");\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_KODEPROSES`, `DAYA_PELANGGAN`, `FAKTORKWH_PELANGGAN`, `KODUK_PELANGGAN`, `FAKTORKVAR_PELANGGAN` FROM `pelanggan` WHERE `ID_PELANGGAN` = '$idpel'\", TRUE);\n\t\t\t\n\t\t$id_blth = $this->get_id_blth($blth);\n\t\t$id_blth = $id_blth - 1;\n\t\t$klp = trim($klp);\n\t\t$kodeproses = $this->get_id_kodeproses($klp);\n\t\t$tarif = trim($tarif);\n\t\t$daya = floatval($daya);\n\t\t$fm = floatval($fm);\n\t\t$fk = floatval($fkvar);\n\t\t\n\t\t// db escape\n\t\t$nm = $this->db->escape_str($nm);\n\t\t$alm = $this->db->escape_str($alm);\n\t\t$koduk = $this->db->escape_str($koduk);\n\t\t\n\t\tif (empty($run)) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `pelanggan` VALUES('$idpel', '$kodeproses', '1', '$nm', '$tarif', '$ktarif', '$daya', '$alm', '$koduk', '', '', '$fm', '$fk', '1')\");\n\t\t\t\n\t\t} else {\n\t\t\t$upd = array();\n\t\t\tif ($run->ID_KODEPROSES != $kodeproses) $upd[] = \"`ID_KODEPROSES` = '$kodeproses'\";\n\t\t\tif ($run->DAYA_PELANGGAN != $daya) $upd[] = \"`DAYA_PELANGGAN` = '$daya'\";\n\t\t\tif ($run->KODUK_PELANGGAN != $koduk) $upd[] = \"`KODUK_PELANGGAN` = '$koduk'\";\n\t\t\tif ($run->FAKTORKWH_PELANGGAN != $fm) $upd[] = \"`FAKTORKWH_PELANGGAN` = '$fm'\";\n\t\t\tif ($run->FAKTORKVAR_PELANGGAN != $fk) $upd[] = \"`FAKTORKVAR_PELANGGAN` = '$fk'\";\n\t\t\t$upd[] = \"`STATUS_PELANGGAN` = '1'\";\n\t\t\t$u = $this->db->query(\"UPDATE `pelanggan` SET \" . implode(\", \", $upd) . \" WHERE `ID_PELANGGAN` = '$idpel'\");\n\t\t}\n\t\t\t\n\t\t\t\n\t\t// insert ke bacameter jika bacameter masih kosong\n\t\t//$run = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `bacameter` WHERE `ID_PELANGGAN` = '$idpel' AND `KIRIM_BACAMETER` = 'N'\", TRUE);\t\n\t\t//$run = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `bacameter` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth'\", TRUE);\n\n\t\t//if ($run->HASIL == 0) {\t\t\n \t\t\t$lwbp0 = floatval($lwbp0) . '.00';\n\t\t\t$wbp0 = floatval($wbp0) . '.00';\n\t\t\t$kvarh0 = floatval($kvarh0) . $dgtkvarh0;\n \t\t\t$ins = $this->db->query(\"INSERT INTO `bacameter` VALUES(0, '0', '0', '$idpel', '$id_blth', NOW(), '$lwbp0', '$wbp0', '$kvarh0', '', NOW(), '0', 'N',0)\");\n\t\t//}\n\t\t/*else {\n\t\t//backup bacameter ke history\n\t\t\t$ceka = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `history` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth'\", TRUE);\n\t\t\tif ($ceka->HASIL == 0) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `history` select * from `bacameter` where `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth' AND `KIRIM_BACAMETER`!='N'\");\n\t\t\t}\n \t\t\t$ins = $this->db->query(\"update `bacameter` set lwbp_bacameter='$lwbp0', wbp_bacameter='$wbp0' , kvarh_bacameter='$kvarh0', terkirim_bacameter=NOW(), kirim_bacameter='N' where id_pelanggan='$idpel' and id_blth='$id_blth'\");\n\t\t}*/\n\t}", "public function run()\n {//pilihan pulsa\n \t$id=1;\n\n $telkomsel_nominal=['3000','5000','10000','20000','250000','500000','70000','100000'];\n\t\t$indosat_nominal=['1000','2000','6000','9000','15000','25000','55000', '100000'];\n\t\t$XL_nominal=['10000','40000','70000','100000','150000','200000'];\n\t\t$axis_nominal=['6000', '10000', '13000'];\n\t\t$smart_nominal=['50000','100000'];\n\t\t$mobile8_nominal=['3000','8000'];\n\t\t$three_nominal=['3000','5000','10000','20000','250000','500000','70000','100000'];\n\n\n\t\t$three_price=['3200','5500','11000','22000','260000','505000','72100','102500'];\n $telkomsel_price=['3500','6000','12000','23000','250000','500000','70000','100000'];\n\t\t$indosat_price=['1500','2700','8000','10000','17000','25000','55000', '100000'];\n\t\t$axis_price=['7000', '12000', '15000'];\n\t\t$smart_price=['51000','120000'];\n\t\t$mobile8_price=['3500','9000'];\n\t\t$XL_price=['11000','44000','76000','100000','150000','200000'];\n\n\n\n\t\t$provider_name=[$XL_nominal, $axis_nominal, $indosat_nominal, $telkomsel_nominal, $three_nominal, $smart_nominal, $mobile8_nominal]; // 7 pieces\n\n\t\t//$id_provider=['XL','INDOSAT','SMART', 'AXIS' ,'THREE', 'TELKOMSEL', 'MOBILE8'];//6 \n\n\n\t\t//$flag=['Y','Y','N','Y','Y','N','N','Y','N'];\n\n\t\t\n\t\t$temp=\"\";\n\t\t$temp2=\"\";\n\n\t\tfor($i=0; $i<count($provider_name);$i++){\n\t\t\tfor($j=0; $j<count($provider_name[$i]); $j++){\t\n\t\t\t\tif($i==0){\n\t\t \t$temp = $XL_nominal[$j];\n\t\t \t$temp2 = $XL_price[$j];\n\t\t\t\t}else if($i==1){\n\t\t \t$temp = $axis_nominal[$j];\n\t\t \t$temp2 = $axis_price[$j];\n\t\t\t\t}else if($i==2){\n\t\t\t\t\t$temp = $indosat_nominal[$j];\n\t\t\t\t\t$temp2 = $indosat_price[$j];\n\t\t\t\t}else if($i==3){\n\t\t\t\t\t$temp = $telkomsel_nominal[$j];\n\t\t\t\t\t$temp2 = $telkomsel_price[$j];\n\t\t\t\t}else if($i==4){\n\t\t \t$temp = $three_nominal[$j];\n\t\t \t$temp2 = $three_price[$j];\n\t\t\t\t}else if($i==5){\n\t\t\t\t\t$temp = $smart_nominal[$j];\n\t\t\t\t\t$temp2 = $smart_price[$j];\n\t\t\t\t}else if($i==6){\n\t\t\t\t\t$temp = $mobile8_nominal[$j];\n\t\t\t\t\t$temp2 = $mobile8_price[$j];\n\t\t\t\t}\n\n\t\t\t\t$send=array(\n\n\t\t\t\t\t'pulsa_id' => $i+1,//provider name id\n\t\t\t\t\t'flag' => 'Y',\n\t\t\t\t\t'nominal'=>$temp,\n\t\t\t\t\t'harga'=>$temp2,\n\t\t\t\t\t\t\t'created_at' => DB::raw('NOW()'),\n\t\t\t\t\t\t\t'updated_at' => DB::raw('NOW()'),\n\t\t\t\t);\n\n\t\t\t\tDB::table('pulsa_providers')->insert($send);\n\t\t\t\t//end second loop\n\t\t\t\t}\n\t\t\t\t//end first loop\n\t\t\t}\n\n\n }", "public static function BaoCaoSoNganhTheoDiaBan($tu_ngay,$den_ngay,$diaBanIdAllArray)\n {\n // cap so nganh\n\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n $so_nganh_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',1)\n ->pluck('donthuid');\n\n $so_nganh_2 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->where('loaidon',2)\n ->pluck('donthuid');\n\n $so_nganh_kn = DB::table('donthu')\n ->whereIn('donthuid',$so_nganh_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->get();\n\n $so_nganh_tc = DB::table('donthu')\n ->whereIn('donthuid',$so_nganh_2)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->get();\n\n\n $songanh_detail_diaban = array(\n 'so_nganh_kn'=>$so_nganh_kn,\n 'so_nganh_tc'=>$so_nganh_tc\n );\n\n\n return $songanh_detail_diaban;\n\n }", "function _gaiabb_autocompform2($string) {\n\n $matches = array();\n $result = db_select('gbb_gresp_dafor', 'c')\n ->fields('c', array('co_resp', 'nomu', 'prenom'))\n ->condition('nomu', '%' . db_like($string) . '%', 'LIKE')\n ->range(0, 10)\n ->execute();\n foreach ($result as $r) {\n $matches[$r->co_resp] = $r->prenom . ' ' . $r->nomu;\n }\n $count = $result->rowCount();\n if ($count > 9) $matches[' '] = '..... Et bien d\\'autres .....';\n drupal_json_output($matches);\n}", "public function pemrosesanSeleksiUnit()\n {\necho(\"<br/><br/>**********HASIL FILTERING TOKEN / ENTITY*********<br/><br/>\");\n //pemfilteran berdasarkan pilihan kriteria.\n if(Pembantu::gunakanLemma($this->penanda_filter_token_entity)) // gunakan pemfilteran token.\n {\nPembantu::cetakDebug(\"Gunakan Filter Token<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayToken($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n else // gunakan pemfilteran entity.\n {\nPembantu::cetakDebug(\"Gunakan Filter Entity<br/>\");\n $totalUnit = count($this->array_objek_unit);\n for($i=0; $i < $totalUnit; $i++)\n {\n $this->array_hasil_filtering[$i] = $this->filterArrayEntity($this->array_objek_unit[$i]);\necho(\"Hasil untuk file \" . $this->array_objek_unit[$i]->nama . \" :: \" . json_encode($this->array_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n }\n\necho \"<br/><br/>**********HASIL PERHITUNGAN FREKUENSI KEMUNCULAN TOKEN PADA TIAP UNIT STRING*********<br/><br/>\";\n //Hitung Frekuensi kemunculan token berdasarkan string unit.\n $totalHasil = count($this->array_hasil_filtering);\n $this->array_freq_hasil_filtering = array();\n $isMultipleEDU = false;\n $jumlahUnitString = count($this->array_objek_unit[0]->array_unit_string[0]); //menentukan apakah double EDU atau triple EDU.\n\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOUBLE_EDU || $this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // jika unit string adalah double EDU atau Triple EDU\n {\n $isMultipleEDU = true;\n }\n\n for($i=0; $i<$totalHasil;$i++)\n {\n $totalUnitString = count($this->array_objek_unit[$i]->array_unit_string); // jumlah unit string.\n $this->array_freq_hasil_filtering[$i] = array();\n $awalIdxNER = 0;\n\n //abou 25-08-2013 : unused\n// $idxAwalUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya = 0;\n// $jumlahKataUnitSebelumnya_akhir = 0; //khusus triple EDU\n\necho(\"Total UnitString = $totalUnitString<br/>\");\n for($j=0;$j<$totalUnitString;$j++)\n {\n $this->array_freq_hasil_filtering[$i][$j] = array();\n $jumlahToken = count($this->array_hasil_filtering[$i]);\n $indexAkhirPencarian = count($this->array_objek_unit[$i]->array_unit_string[$j]);\n\n /*\n * abou 25-08-2013 : Tidak perlu digunakan, NER dan POS sudah tersimpan sesuai urutan per kata dalam array unit string.\n * \n if($isMultipleEDU) //aboubakr 20120916 : tentukan awalIdxkata tiap unitnya\n {\n if($this->array_objek_unit[$i]->array_unit_string[$j][0][0] != 'NULL')\n {\n $awalIdxNER = $idxAwalUnitSebelumnya;\n }\n else\n {\n $awalIdxNER = $idxAwalUnitSebelumnya + $jumlahKataUnitSebelumnya;\n }\n\n //aboubakr 20120916 : Hitung jumlah kata Unit sebelumnya\n // jika akhirnya tidak NULL\n if($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1][0] != 'NULL')\n {\n $jumlahKataUnitSebelumnya_akhir = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n\n $idxAwalUnitSebelumnya += $jumlahKataUnitSebelumnya;\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-2]);\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]);\n }\n else\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][$jumlahUnitString-1]); // aboubakr 20120916 : hitung jumlah kata unit terakhir, karena tidak null.\n }\n }\n else // unit terakhir NULL.\n {\n $jumlahKataUnitSebelumnya = count($this->array_objek_unit[$i]->array_unit_string[$j][0]); // aboubakr 20120916 : hitung jumlah kata unit awal, karena unit terakhir null. Dipastikan ada.\n if($this->penanda_unit_string == Umum::UNIT_STRING_TRIPLE_EDU) // aboubakr 20120916 : tambahan untuk triple EDU.\n {\n $jumlahKataUnitSebelumnya += count($this->array_objek_unit[$i]->array_unit_string[$j][1]); // aboubakr 20120916 : tambahkan untuk triple edu.\n }\n }\n//echo \"Unit ke-$j -> \" . $this->array_objek_unit[$i]->array_unit_string[$j][0][0] . \" :: idxSebelum = $idxAwalUnitSebelumnya , jumlahKataSebelum = $jumlahKataUnitSebelumnya , awalIndex = $awalIdxNER<br/>\";\n }\n */\n \n//Pembantu::cetakDebug(\"[abouDebug] NER Array \" . json_encode($this->array_objek_unit[$i]->array_ner) . \"<br/>\");//suspect 18022013 : ga dicek di fungsi hitungKata!!!\n \n $arrayUnitStringMultiEDU = array(); //abou 25-08-2013 : gunakan sebagai iterator awalIdxNER.\n for($k = 0; $k < $jumlahToken; $k++)\n {\n if($isMultipleEDU) // jika unit string adalah double EDU atau Triple EDU\n {\n if($k==0) //abou 25-08-2013 : cukup sekali proses, gunakan untuk sisa token.\n {\n $totalKataDalamUnit = 0;\n for($x=0;$x<$jumlahUnitString;$x++)\n {\n $jumlahTokenUnitString = count($this->array_objek_unit[$i]->array_unit_string[$j][$x]);\n\n for($y=0;$y<$jumlahTokenUnitString;$y++)\n {\n $totalKataDalamUnit++;\n if($this->array_objek_unit[$i]->array_unit_string[$j][$x][$y] != 'NULL')\n {\n array_push($arrayUnitStringMultiEDU, $this->array_objek_unit[$i]->array_unit_string[$j][$x][$y]);\n }\n }\n }\n }\n\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" , array target cari sampai index ke-$indexAkhirPencarian : \" . json_encode($arrayUnitStringMultiEDU) . \"<br/>\"); \n //16062013 : Pisahkan untuk pengecekan NER dan POS. Jika Filter yang digunakan filter NER, supply array NER untuk parameter ke 3, otherwise, supply array POS.\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_ner_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n else\n {\n //$this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$arrayUnitStringMultiEDU,$this->array_objek_unit[$i]->array_pos_unit,$awalIdxNER,$this->penanda_filter_token_entity,0,$totalKataDalamUnit-1,true);\n }\n }\n else // untuk selain multiple EDU.\n {\n//Pembantu::cetakDebug(\"Kata Dicari : \" . $this->array_hasil_filtering[$i][$k] . \" array target cari sampai index ke-$indexAkhirPencarian <br/>\");\n if($this->penanda_filter_token_entity > Umum::FILTER_MASK_POS)\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_ner,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n else\n {\n $this->array_freq_hasil_filtering[$i][$j][$k] = Pembantu::hitungKata($this->array_hasil_filtering[$i][$k],$this->array_objek_unit[$i]->array_unit_string[$j],$this->array_objek_unit[$i]->array_pos,$awalIdxNER,$this->penanda_filter_token_entity,0,$indexAkhirPencarian,false);\n }\n }\n }\n\n if(!$isMultipleEDU) //aboubakr 20120916 : jika bukan multiple EDU.\n {\n $awalIdxNER += $indexAkhirPencarian;\n }\n else\n {\n $awalIdxNER += count($arrayUnitStringMultiEDU);\n }\n }\nPembantu::cetakDebug(\"Hasil Frekuensi Untuk File - \" . $this->array_objek_unit[$i]->nama . \" ==> \" . json_encode($this->array_freq_hasil_filtering[$i]) . \"<br/><br/>\");\n }\n\n// Tulis hasil modul seleksi unit.\n $akhiranNamaFile = \"\";\n if($this->penanda_unit_string == Umum::UNIT_STRING_DOKUMEN)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_DOC;\n }\n else if($this->penanda_unit_string == Umum::UNIT_STRING_SENTENCE)\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_STC;\n }\n else\n {\n $akhiranNamaFile = Umum::AKHIRAN_TABEL_FREQ_EDU;\n }\n\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN,0777,true); //buat folder keluaran 1. \n }\n if(!is_dir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE))\n {\n mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE,0777,true); //buat folder keluaran 2.\n }\n// mkdir(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR,0,true); //buat folder keluaran 2 - transpose. No Need\n for($i=0;$i<$totalHasil;$i++)\n {\n TulisHasil::tuliskanHasilSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_TOKEN . $this->array_objek_unit[$i]->nama . Umum::AKHIRAN_HASIL_SELEKSI_UNIT,$this->array_hasil_filtering[$i],false);\n TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],false);\n// TulisHasil::tuliskanTabelFrekuensiSeleksiUnit(Umum::FOLDER_HASIL_SELEKSI_UNIT . $_SESSION[\"timestamp\"] . Umum::FOLDER_FILTERED_FREQ_TABLE_TR . $this->array_objek_unit[$i]->nama . $akhiranNamaFile, $this->array_freq_hasil_filtering[$i],true);\n }\n }", "public function mencari_tf_query($data=array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\t\tif ($i==0) {\n\t\t\t$term_query = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form\n\t\t}\n\t}\n\t$j=0;\n\tforeach ($term_query as $value) {\n\t\t$query[$j] = $value;\n\t\t$j++;\n\t}\n\t//batas term\n\t//mencari tf\n\tfor ($m=0; $m <count($data) ; $m++) { \n\t\tfor ($n=0; $n <count($query) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($query[$n], $data[$m][1])) ? 1 : 0 ;\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "function buatID($tabel, $inisial){ \n $struktur = mysql_query(\"select * from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $field = mysql_field_name($struktur,0); \n $panjang = mysql_field_len($struktur,0); \n $row = mysql_num_rows($struktur); \n \n $panjanginisial = strlen($inisial); \n $awal = $panjanginisial + 1; \n $bnyk = $panjang-$panjanginisial; \n \n if ($row >= 1){ \n $query = mysql_query(\"select max(substring($field,$awal,$bnyk)) as max from $tabel\") or die(\"query tidak dapat dijalankan!\"); \n $hasil = mysql_fetch_assoc($query); \n $angka = intval($hasil['max']); \n } \n else{ \n $angka = 0; \n } \n \n $angka++; \n $tmp= \"\"; \n for ($i=0; $i < ($panjang-$panjanginisial-strlen($angka)) ; $i++){ \n $tmp = $tmp.\"0\"; \n } \n //return hasil generate ID \n return strval($inisial.$tmp.$angka); \n }", "public function HienThiBinhLuan0(){\n\t\t$this->db->where('KichHoat', '0');\n\t\treturn $this -> db -> get('b_cmt');\n\t}", "function m_tampil_soal_terisi($where, $nipg, $id_sub){\n\t\t$data = $this->db->query(\"SELECT\n\t\trk.jawaban, rk.id_kuesioner, rk.id_sub,\n\t\trk.id_sk, sk.soal_kuesioner\n\t\tFROM tb_respon_kuesioner as rk\n\t\tJOIN tb_soal_kuesioner as sk\n\t\tON rk.id_sk = sk.id_sk\n\t\tWHERE rk.id_kuesioner = $where AND rk.nipg = $nipg AND rk.id_sub = $id_sub\n\t\t\");\n\t\treturn $data;\n\t}", "function process_allof_str($normal_pre_req)\n{\n // echo \"Example function.\\n\";\n $normal_pre_req = str_replace(';', '', $normal_pre_req);\n $oneof_flag = strstr($normal_pre_req, 'ONE OF');\n\t$allof_flag = strstr($normal_pre_req, 'ALL OF');\n\t$allof_array = [];\n\t$oneof_array=[];\n\t$count_one_of = 0;\n\tif (strlen($oneof_flag) == 0 && strlen($allof_flag) == 0){\n\t\t// $normal_pre_req_courses = str_replace(' ', '', $normal_pre_req);;\n\t\t// $domain = strpos($normal_pre_req, 'are') == false;\n\t\t// echo '===='.strpos($normal_pre_req, 'ALL OF') == false.'===';\n\t\t$includeall = str_replace(' ', '', $normal_pre_req);\n\t\tif (sizeof($includeall)>0){# to debug\n\t\t\t$includeall_temps = explode(\"~\", $includeall);\n\t\t\t$allof_array = array_merge($allof_array, $includeall_temps);\n\t\t}\n\t\techo 'NO ONE OF AND ALL OF!!!';\n\t}\n\telse{\n\t\t$oneofs = explode(\"ONE OF\", $normal_pre_req);\n\t\tforeach ($oneofs as $key => $value) {\n\t\t $allofs = explode(\"ALL OF\", $value);\n\t\t\t# 0 index must be a one of relationship\n\t\t\t$only_oneof_temp = str_replace(' ', '', $allofs[0]);\n\t\t\tif (strlen($only_oneof_temp)>0){ # in case that there is a all of relationship in the beginning\n\t\t\t\t$only_oneof_temps = explode(\"~\", $only_oneof_temp);\n\t\t\t\t// print_r($only_oneof_temps);\n\t\t\t\t$oneof_array[$count_one_of][] = $only_oneof_temps;\n\t\t\t}\n\t\t\tif (sizeof($allofs)>1){ # to debug\n\t\t\t\tforeach ($allofs as $key_all => $value_all) {\n\t\t\t\t\tif ($key_all ==0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$allof_tempstring = str_replace(' ', '', $value_all);\n\t\t\t\t\t$allof_tempstrings = explode(\"~\", $allof_tempstring);\n\t\t\t\t\t// print_r($allof_tempstrings);\n\t\t\t\t\t$allof_array = array_merge($allof_array, $allof_tempstrings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo 'YES!!';\n\t}\n\t// print_r($oneof_array);\n\t$pre_req_all['oneof'] = $oneof_array;\n\t$pre_req_all['allof'] = $allof_array;\n\t\n return $pre_req_all;\n}", "function tampilSikap($nilai) {\nif($nilai== '1'){ \n\t$nilai = 'Kurang';\n}\nelseif($nilai== '2'){ \n\t$nilai = 'Cukup';\n}\nelseif($nilai== '3'){ \n\t$nilai = 'Baik';\n}\nelse { \n\t$nilai = 'Baik Sekali';\n}\n\treturn $nilai;\n}", "function isNaikGaji($conn,$idpegawai,$tglkgb){\n\t\t\t$tglkgb = Cstr::formatDate($tglkgb);\n\t\t\t$bln = substr($tglkgb,5,2);\n\t\t\t$isnaik = true;\n\t\t\t//cek apakah pegawai sudah diproses naik pangkat\n\t\t\t$kgb = $conn->GetOne(\"select idpegawai from \".self::table('pe_kgb').\" \n\t\t\t\t\twhere idpegawai = $idpegawai and datepart(month,tglkgb)='$bln'\");\n\t\t\t\t\t\n\t\t\n\t\t\tif(!empty($kgb))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t//mendapatkan next pangkat\n\t\t\t$rown = mKenaikan::getNaikGaji($conn,$idpegawai,$tglkgb);\n\t\t\t\n\t\t\t//cek untuk status pegawai yang naik pangkat\n\t\t\t$sql = \"select p.idpegawai,coalesce(p.nik+' - ','')+\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as pegawai,\n\t\t\t\t\tu.kodeunit+' - '+u.namaunit as namaunit,pl.golongan as golonganlama,p.tmtpangkat as tmtpangkatlama,cast(p.masakerjathngol as varchar)+' tahun '+cast(p.masakerjablngol as varchar)+' bulan' as mklama,\n\t\t\t\t\t'\".$rown['idpangkat'].\"' as pangkatbaru,'\".$rown['tmtpangkat'].\"' as tmtpangkat,substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),1,2) as mkthn, substring(right(replicate('0', 4) + cast(\".$rown['mkg'].\" as varchar), 4),3,2) as mkbln\n\t\t\t\t\tfrom \".self::table('ms_pegawai').\" p\n\t\t\t\t\tleft join \".self::table('ms_unit').\" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pl on pl.idpangkat=p.idpangkat\n\t\t\t\t\tleft join \".self::table('pe_kgb').\" k on k.idpegawai=p.idpegawai and k.tglkgb = '$tglkgb'\n\t\t\t\t\twhere p.idpegawai = $idpegawai and p.idstatusaktif = 'AA'\";\n\t\t\t$row = $conn->GetRow($sql);\t\n\t\t\t\t\t\t\n\t\t\tif(empty($row))\n\t\t\t\t$isnaik = false;\n\t\t\t\t\n\t\t\t$a_data = array('kgb' => $kgb, 'row' => $rown, 'isnaik' => $isnaik, 'sql' => $sql);\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "function get_label($ccaattmm){\n\t\t\t$lst_ampor = getListAA(substr($ccaattmm,0,2));\n\t\t\t$lst_tumbon = getListTT(substr($ccaattmm,0,4));\n\t\t\t$lst_mooban = getListMM(substr($ccaattmm,0,6));\n\t\t\t$arr_aa = explode(\"|\", $lst_ampor);\n\t\t\t$arr_tt = explode(\"|\", $lst_tumbon);\n\t\t\t$arr_mm = explode(\"|\", $lst_mooban);\n\n\t\t\t/// sel ampor\n\t\t\tfor($i=0; $i<(count($arr_aa)-3) ;$i+=2){\n\t\t\t\tif(substr($arr_aa[$i+2],2,2)==substr($ccaattmm,2,2)){\n\t\t\t\t\techo str_replace('ท้องถิ่น','',$arr_aa[$i+3]).\" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/// sel tumbon\n\t\t\tfor($i=0; $i<(count($arr_tt)-3) ;$i+=2){\n\t\t\t\tif(substr($arr_tt[$i+2],4,2)==substr($ccaattmm,4,2)){\n\t\t\t\t\techo \" ตำบล\".$arr_tt[$i+3].\" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/// sel mooban\n\t\t\tfor($i=0; $i<(count($arr_mm)-3) ;$i+=2){\n\t\t\t\tif(substr($arr_mm[$i+2],6,2)==substr($ccaattmm,6,2)){\n\t\t\t\t\techo \" หมู่\".$arr_mm[$i+3];\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "public function show_chitietdonhang2($id)\n {\n $query=\"SELECT *,sum(`soLuongSP`) FROM `tbl_chitietdonhang` WHERE `maDonHang`='$id' and `soLuongSP`>0 GROUP BY `maSanPham`\";\n $result = $this->db->select($query);\n return $result;\n }", "public static function TongHopDonThuKhieuNaiTheDiaBan($tu_ngay,$den_ngay,$diaBanIdAllArray)\n {\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n //don thu tp\n $donthu_tp_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', THANH_PHO);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n\n $donthu_tp_kn = DB::table('donthu')\n ->whereIn('donthuid',$donthu_tp_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->get();\n\n\n //don thu huyen\n $donthu_huyen_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', HUYEN);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n\n $donthu_huyen_kn = DB::table('donthu')\n ->whereIn('donthuid',$donthu_huyen_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->get();\n\n\n //don thu xa\n\n $donthu_xa_1 = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->join('diaban', function ($join) {\n $join->on('phanloaidonthu.diaban', '=', 'diaban.id')\n ->where('diaban.type', '=', XA);\n })\n ->where('loaidon',1)\n ->select('phanloaidonthu.*')\n ->pluck('donthuid');\n\n\n $donthu_xa_kn = DB::table('donthu')\n ->whereIn('donthuid',$donthu_xa_1)\n ->whereBetween('ngaynhan',[$tuNgay,$denNgay])\n ->get();\n\n\n\n $khieunai_detail_diaban = array(\n 'kn_tp'=>$donthu_tp_kn,\n 'kn_huyen'=>$donthu_huyen_kn,\n 'kn_xa'=>$donthu_xa_kn\n );\n\n return $khieunai_detail_diaban;\n }", "function tratar_jogada($jogada){\n\n\t$i = 0;\n\t$j = 0;\n\t$k = 0;\n\t$a = 0;\n\t$b = 0;\n\n\t$flagTexto = true;\n\t$flagJogada = true;\n\n\t//Cria arrays que guardarão individualmente cada texto e cada jogada \n\t$texto = array();\t\t\t//Guarda as substrings de texto, p recriar a string principal\n\t$rolagem = array();\t\t\t//Guarda as substrings de jogada, p recriar a string principal\n\t$controle = array();\t\t//Guarda a ordem das substrings de texto e jogada, p recriar a string principal na ordem certa \"T = texto\" \"J = jogada\" \n\n\t$nova_frase = \"\";\n\t$nova_jogada = \"\";\n\t$jogadaTratada = \"\";\n\t$resultado = 0;\n\n\t//echo \"Quantidade de caracteres: \".strlen($jogada);\n\t//echo \"<br />\";\n\n\t$i = 0; $j = 0;\n\n\twhile($i < strlen($jogada)){\n\n\t\t//Captura o texto ate chegar em uma jogada\n\t\tif($jogada[$i] != \"[\" && $flagTexto && $i < strlen($jogada)){\n\t\t\t$nova_frase = $nova_frase.$jogada[$i];\n\n\t\t\t//Testa para ver se é fim de cadeia\n\t\t\tif($i == (strlen($jogada) -1)){\n\t\t\t\t//Captura uma frase identificada e habilita a capura de uma jogada\n\t\t\t\tarray_push($texto, $nova_frase);\n\t\t\t\tarray_push($controle, \"T\");\n\t\t\t}\n\t\t}\n\t\telse{\n\n\t\t\tif($flagTexto){\n\t\t\t\tif($nova_frase != \"\"){\n\t\t\t\t\t//Captura uma frase identificada e habilita a capura de uma jogada\n\t\t\t\t\tarray_push($texto, $nova_frase);\n\t\t\t\t\tarray_push($controle, \"T\");\t\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Guarda o ponto de leitura da entrada a partir do aractere \"[\"\n\t\t\t\t$j = $i;\n\n\t\t\t\t//Muda o controle para ler rolagens\n\t\t\t\t$flagTexto = false;\n\t\t\t\t$flagJogada = true;\n\t\t\t\t\n\n\t\t\t\t// Verifica se o abre colchete é o ultimo caratere, se não for, pega ele\n\t\t\t\tif($j != (strlen($jogada) -1)){\n\t\t\t\t\t//Captura o abre colchete atual\n\t\t\t\t\t$nova_jogada = $nova_jogada.$jogada[$j];\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\n\t\t\t\t//Guarda o ultimo abre colchete como texto\n\t\t\t\tif($j == (strlen($jogada) -1)){\n\t\t\t\t\t//Texto detectado\n\n\t\t\t\t\t//limpa a variavel\n\t\t\t\t\t$nova_frase = \"\";\n\t\t\t\t\t\n\t\t\t\t\t$nova_frase = $nova_frase.$jogada[$i];\n\n\t\t\t\t\tarray_push($texto, $nova_frase);\n\t\t\t\t\tarray_push($controle, \"T\");\n\n\t\t\t\t\t//Muda o controle para ler rolagens\n\t\t\t\t\t$flagTexto = false;\n\t\t\t\t\t$flagJogada = true;\n\t\t\t\t}\n\n\t\t\t\t$j++;\n\n\t\t\t\t//prepara a variavel para pegar novo texto\n\t\t\t\t$nova_frase = \"\";\n\t\t\t}\n\n\t\t\t//Le a substring que pode representar uma jogada\n\t\t\twhile($flagJogada && $j < strlen($jogada)){\n\n\t\t\t\tif($jogada[$j] != \"]\"){\t\t\t\t\n\n\t\t\t\t\t//Se ler outro \"[\" sai do while e continua lendo texto\n\t\t\t\t\tif($jogada[$j] == \"[\"){\n\t\t\t\t\t\t//Texto detectado\n\t\t\t\t\t\t$nova_frase = $nova_jogada;\n\t\t\t\t\t\tarray_push($texto, $nova_frase);\n\t\t\t\t\t\tarray_push($controle, \"T\");\n\n\t\t\t\t\t\t//Muda o controle para ler rolagens e sai do while para continuar lendo texto\n\t\t\t\t\t\t$flagTexto = true;\n\t\t\t\t\t\t$flagJogada = false;\n\n\t\t\t\t\t\t// limpa a variável\n\t\t\t\t\t\t$nova_jogada = \"\";\n\t\t\t\t\t\t$nova_frase = \"\";\n\n\t\t\t\t\t\t//Corrige o indice\n\t\t\t\t\t\t$j--;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//Armazena a nova jogada a medida que os caracteres sao lidos\n\t\t\t\t\t\t$nova_jogada = $nova_jogada.$jogada[$j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Armazena o \"]\"\n\t\t\t\t\t$nova_jogada = $nova_jogada.$jogada[$j];\n\n\t\t\t\t\t//Muda o controle para ler rolagens e sai do while para continuar lendo texto\n\t\t\t\t\t$flagTexto = true;\n\t\t\t\t\t$flagJogada = false;\n\t\t\t\t}\n\n\t\t\t\t$j++;\n\t\t\t}\n\n\n\t\t\t//Armazena a nova jogada a medida que os caracteres sao lidos\n\t\t\tif($nova_jogada != \"\"){\n\n\t\t\t\t//Captura uma jogada completa e salva\n\t\t\t\tarray_push($rolagem, $nova_jogada);\n\t\t\t\tarray_push($controle, \"J\");\n\n\t\t\t\t//Avança na leitura da cadeia de entrada\n\t\t\t\t$i = $j - 1;\n\n\t\t\t\t// limpa a variável\n\t\t\t\t$nova_jogada = \"\";\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Avança na leitura da cadeia de entrada\n\t\t\t\t$i = $j - 1;\n\t\t\t}\n\t\t}\n\n\t\t$i++;\n\t\t\n\t}\n\n\t// ################################# INICIO - echo apenas para verificação. Não apagar!!! #################################\n\t$i = 0;\n\twhile($i < count($texto)){\n\t\techo \"Texto: \" . $i . \": \" . $texto[$i] . \"<br/>\";\n\t\t$i++;\n\t}\n\n\t$i = 0;\n\twhile($i < count($rolagem)){\n\t\techo \"Rolagem: \" . $i. \": \" . $rolagem[$i] . \"<br/>\";\n\t\t$i++;\n\t}\n\n\t//Trata as rolagens de dados\n\t$b = 0; \n\twhile($b < count($rolagem)){\n\t\t//echo \"Resultado da rolagem Antes: \" . $rolagem[$b] . \"<br/>\";\n\t\t$rolagem[$b] = calcula_resultado_jogada($rolagem[$b]);\n\n\t\t//echo \"Resultado da rolagem Depois: \" . $rolagem[$b] . \"<br/>\";\n\t\t$b++;\n\t}\n\n\t// ################################# FIM - echo apenas para verificação. Não apagar!!! #################################\n\n\t//Reconstroi a entrada com o tratamento das jogadas\n\t$a = 0; $b = 0; $k = 0;\n\twhile($k < count($controle)){\n\t\tif($controle[$k] == \"T\"){\n\t\t\t$jogadaTratada = $jogadaTratada.$texto[$a];\n\t\t\t$a++;\n\t\t}\n\n\t\tif($controle[$k] == \"J\"){\n\n\t\t\t$temp = $rolagem[$b];\n\t\t\t//Verifica se o resultado da jogada é um numero\n\t\t\tif($temp[0] != \"[\"){\n\t\t\t\t//Se for número, coloca-o entre colchetes\n\t\t\t\t$jogadaTratada = $jogadaTratada.\"[ \";\n\t\t\t\t$jogadaTratada = $jogadaTratada.$rolagem[$b];\n\t\t\t\t$jogadaTratada = $jogadaTratada.\" ]\";\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Se não for número, o texto já está entre colchetes\n\t\t\t\t$jogadaTratada = $jogadaTratada.$rolagem[$b];\n\t\t\t}\n\t\t\t\n\t\t\t$b++;\n\t\t}\n\t\t$k++;\n\t}\n\treturn $jogadaTratada;\n}", "function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }", "function hilang($slug) {\n\n\t\t/* ---- PREPARE VARIABLE ------*/\n\t\t$arr_slug\t\t= explode('_', $slug);\n\t\t$pegawai_result = $this->db->get_where('pegawai', array('id_pegawai' => $arr_slug[1]))->result();\n\t\t$pegawai \t\t= $pegawai_result['0']->nama_pegawai;\n\t\t$jabatan\t\t= $pegawai_result['0']->jabatan_pegawai;\n\t\t$nip \t\t= $pegawai_result['0']->nip_pegawai;\n\t\t$surat_result \t= $this->db->get_where('data_rinci', array('id_surat' => $arr_slug[0],\n\t\t\t'id_pegawai' => $arr_slug[1]))->result();\n\t\t$nomor \t\t\t= $surat_result['0']->nomor;\n\n\t\t//Get data rinci\n\t\t$data_rinci_all\t= $this->db->get_where('data_rinci',\n\t\t\tarray('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$id_tiket = $data_rinci_all['0']->id_tiket;\n\t\t$id_transport2 = $data_rinci_all['0']->id_transport2;\n\t\t\t\n\t\t//get data uang tiket\n\t\tif ($id_tiket == 0) {\n\t\t\t$sbu_tiket = 0;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$transport2 = $this->db->get_where('biaya_transport',array('id' => $id_transport2))->result();\n\t\t\t$rute = $transport2['0']->provinsi;\n\n\t\t} else {\n\t\t\t$tiket_result = $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t\t$sbu_tiket = $tiket_result['0']->biaya_tiket;\n\t\t\t$sbu_tiket_ena = $this->rupiah($sbu_tiket);\n\t\t\t$rute = $tiket_result['0']->rute;\n\t\t}\n\t\t// $tiket_result\t= $this->db->get_where('tiket_pesawat',array('id' => $id_tiket))->result();\n\t\t// $sbu_tiket = $tiket_result['0']->biaya_tiket;\n\n\t\t//get real pengeluaran untuk tiket\n\t\t$r_tiket_result = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->result();\n\t\t$r_tiket_row = $this->db->get_where('spd_rampung', array('id_surat' => $arr_slug[0], 'id_pegawai' => $arr_slug[1]))->num_rows();\n\t\t$r_tiket = $r_tiket_result != NULL ? $r_tiket_result['0']->tiket : 0;\n//\t\t$r_tiket = $r_tiket_result['0']->tiket;\n\t\t$ppk \t\t\t= $this->db->get_where('pejabat_administratif',\n\t\t\tarray('jabatan' => 'Pejabat Pembuat Komitmen'))->result();\n\t\t$nama_ppk \t\t\t\t= $ppk['0']->nama;\n\t\t$nip_ppk \t\t\t\t= $ppk['0']->nip;\n\n\t\t$var_tgl_skrg = $this->tanggal_indo(date('Y').'-'.date('m').'-'.date('d'), '-');\n\t\t$var_tgl_surat \t= $this->tanggal_indo($surat_result['0']->tgl_surat,'/');\n\n\t\tif($r_tiket_row <= 0) {\n\t\t\techo \"<script> \t\n \talert('Anda harus mengisi SPD Rampung Dulu!');\n \twindow.location.href='\".base_url('C_PDF/print_biaya/').$arr_slug[0].\"';</script>\";\n\t\t} else {\n\t\t\t/* -----------------------------*/\n\t\t\t$pdf = new PDF_MC_Table('p','mm','A4');\n\t\t\t$pdf->AddPage();\n\t\t\t$pdf->SetFont('Arial','B',14);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->MultiCell(0,25,\"SURAT PERNYATAAN\",0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(25,7,'',0,0);\n\t\t\t$pdf->MultiCell(0,6,\"Yang bertandatangan di bawah ini :\",0,'L');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Nama',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$pegawai,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'NIP',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$nip,0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Jabatan',0,0);\n\t\t\t$pdf->Cell(10,7,':',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(20,7,$jabatan,0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(20,7,'Berdasarkan Surat Tugas Nomor: '. $nomor .' tanggal '.$var_tgl_surat.' dengan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sesungguhnya bahwa :',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'1. Boarding Pass '.$rute.' dengan jumlah tiket pesawat dibawah ini tidak',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'melebihi dengan SBU tahun '.date('Y').', meliputi :',0,1);\n\t\t\t$pdf->Ln();\n\n\t\t\t//here is table\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'No.',1,0,'C',0);\n\t\t\t$pdf->Cell(70,5,'Uraian',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Nilai SBU',1,0,'C',0);\n\t\t\t$pdf->Cell(40,5,'Pengeluaran Rill',1,0,'C',0);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$counterrr = 1;\n\t\t\t$pdf->SetWidths(array(10, 70, 40, 40));\n\t\t\tfor($i=0;$i<1;$i++) {\n\t\t\t\t$pdf->Row(array($counterrr,\"Tiket Pesawat \".$rute,\"Rp \".$sbu_tiket_ena, \"Rp \".number_format($r_tiket,2,',','.')));\n\t\t\t\t$counterrr++;\n\t\t\t}\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->SetFont('Arial','B',12);\n\t\t\t$pdf->Cell(10,5,'','LB',0,'L',0);\n\t\t\t$pdf->Cell(70,5,'Jumlah','LRB',0,'C',0);\n\t\t\t$pdf->Cell(7,5,'Rp','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Cell(7,5,'Rp','B',0,'L',0);\n\t\t\t$pdf->Cell(33,5,''.$sbu_tiket_ena,'RB',0,'L',0);\n\t\t\t$pdf->Ln();\n\t\t\t//end of table\n\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'2. Boarding Pass '.$rute.' hilang dengan jumlah uang tersebut pada angka',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'(1) sesuai dengan SBU dan benar - benar dikeluarkan sesuai dengan bukti rill kuitansi',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'tiket Perjalanan Dinas dimaksud.',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'3. Apabila dikemudian hari ditemukan suatu temuan terkait Boarding Pass tersebut,',0,1);\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'maka saya akan bertanggung jawab.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(20,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'Demikian pernyataan ini kami buat dengan sebenarnya, untuk dipergunakan',0,1);\n\t\t\t$pdf->Cell(15,7,'',0,0);\n\t\t\t$pdf->Cell(20,7,'sebagaimana mestinya.',0,1);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t//Footer Surat\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(10,6,\"\",0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'L');\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->Cell(5,6,'',0,0,'L');\n\t\t\t$pdf->Cell(25,6,'',0,0,'R');\n\t\t\t$pdf->Cell(20,6,'',0,0,'C');\n\t\t\t$pdf->MultiCell(60,6,'Jakarta, '.$var_tgl_skrg,0,'R');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(15,6,'',0,0,'L');\n\t\t\t$pdf->MultiCell(55,6,'Mengetahui/Menyetujui',0,'C');\n\t\t\t$pdf->Cell(85,6,'Pejabat Pembuat Komitmen',0, 0,'C');\n\t\t\t$pdf->MultiCell(65,6,'Pelaksana SPD',0,'R');\n\t\t\t$pdf->Cell(85,6,' Pusat Data Informasi dan Humas',0, 0,'C');\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->SetFont('Arial','BU',12);\n\t\t\t$pdf->Ln();\n\t\t\t$pdf->Cell(85,6,$nama_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(105,6,$pegawai,0,'C');\n\t\t\t$pdf->SetFont('Arial','',12);\n\t\t\t$pdf->Cell(85,6,\"NIP. \".$nip_ppk,0, 0,'C');\n\t\t\t$pdf->MultiCell(105,6,'NIP. '.$nip,0,'C');\n\n\t\t\t//Cetak gans\n\t\t\t$filename = \"Hilang - \".$arr_slug[0].\" - \".$pegawai.$this->extension;\n\t\t\t$pdf->setTitle($filename);\n\t\t\t$pdf->Output(\"I\", $filename);\n\t\t}\n\n\n\t}", "function get_akumulasi_sblm($Aset_ID, $TahunPenyusutan, $kelompok)\n{\n $gol = explode (\".\", $kelompok);\n //echo \"$kelompok<pre>\";\n //print_r($gol);\n //exit();\n switch ($gol[ 0 ]) {\n case \"1\":\n $nama_log = \"log_tanah\";\n break;\n case \"2\":\n $nama_log = \"log_mesin\";\n break;\n case \"3\":\n $nama_log = \"log_bangunan\";\n break;\n case \"4\":\n $nama_log = \"log_jaringan\";\n break;\n case \"5\":\n $nama_log = \"log_asetlain\";\n break;\n case \"6\":\n $nama_log = \"log_kdp\";\n break;\n\n default:\n break;\n }\n if($gol[ 0 ] == \"2\" || $gol[ 0 ] == \"3\" || $gol[ 0 ] == \"4\") {\n $Tahun = $TahunPenyusutan - 1;\n $query = \"select AkumulasiPenyusutan from $nama_log where \"\n . \"kd_riwayat in(50,51,52) and TahunPenyusutan='$Tahun' \"\n . \" and Aset_ID='$Aset_ID' \";\n //echo \"$query\";\n //exit();\n $result = mysql_query ($query) or die(mysql_error());\n $AkumulasiPenyusutan = 0;\n while ($row = mysql_fetch_array ($result)) {\n $AkumulasiPenyusutan = $row[ AkumulasiPenyusutan ];\n }\n\n } else {\n $AkumulasiPenyusutan = 0;\n }\n\n\n return $AkumulasiPenyusutan;\n}", "public static function BaoCaoTheoDanhSach($tu_ngay,$den_ngay,$diaBanIdAllArray,$donthu)\n {\n\n $tuNgay = DonThuTable::ConvertFormatDate($tu_ngay);\n $denNgay = DonThuTable::ConvertFormatDate($den_ngay);\n\n $phanloai = DB::table('phanloaidonthu')\n ->whereIn('diaban',$diaBanIdAllArray)\n ->get();\n $loaidon = DB::table('loaidon')->get();\n $linhvuc = DB::table('linhvuc')->get();\n\n $bao_cao_danh_sach = array();\n $baocao_danhsach = array();\n $ten_linhvuc =\"\";\n $ten_loaidon =\"\";\n $count_ds =0;\n\n\n for($i = 0;$i<count($phanloai);$i++)\n {\n $sothuly = explode('/',$donthu[$i]->sothuly);\n $so_thuly =$sothuly[0];\n\n $ngay_nhan = $donthu[$i]->ngaynhan;\n $linhvuc_id = $phanloai[$i]->linhvuc;\n $loaidon_id = $phanloai[$i]->loaidon;\n\n if($tuNgay<=$ngay_nhan && $ngay_nhan<=$denNgay)\n {\n for($j = 0;$j<count($linhvuc);$j++)\n {\n if($linhvuc[$j]->linhvucid == $linhvuc_id)\n {\n $ten_linhvuc = $linhvuc[$j]->tenlinhvuc;\n }\n }\n for($l = 0;$l<count($loaidon);$l++)\n {\n if($loaidon[$l]->loaidonid == $loaidon_id)\n {\n $ten_loaidon = $loaidon[$l]->tenloaidon;\n }\n }\n $baocao_danhsach=$donthu[$i];\n\n $bao_cao_danh_sach[$count_ds]= array(\n 'sothuly'=>$donthu[$i]->sothuly,\n 'tenlinhvuc'=>$ten_linhvuc,\n 'tenloaidon'=>$ten_loaidon,\n 'donthu'=>$baocao_danhsach\n\n );\n $count_ds++;\n }\n\n\n }\n\n return $bao_cao_danh_sach;\n\n }", "public function tf_query($data=array(),$data_query= array())\n{\n\tfor ($i=0; $i <count($data) ; $i++) { \n\n\t\t// if ($i==0) { data\n\t\t\t$term_query[$i] = array_unique($data[$i][1]);//menghilangkan data kembar dari data query form // data dari database\n\t\t// }\n\t}\n\n\t$j=0;\n\tfor ($k=0; $k <count($term_query) ; $k++) { \n\t\tforeach ($term_query[$k] as $value) {\n\t\t\t$query[$j] = $value;\n\t\t\t$j++;\n\t\t}\n\t}\n\n\t$term_unik = array_unique($query);\n\n\t$b = 0;\n\tforeach ($term_unik as $value1) {\n\t\t$term_urut[$b]= $value1;\n\t\t$b++;\n\t}\n\t\n\t//batas term\n\n\t//mencari tf\n\tfor ($m=0; $m <count($data_query) ; $m++) { \n\t\tfor ($n=0; $n <count($term_urut) ; $n++) { \n\t\t// foreach ($term_query as $kunci => $isi) {\n\t\t\t\t$angka = (in_array($term_urut[$n], $data_query[$m][1])) ? 1 : 0 ;\n\t\t\t\t// $tf[$m][$n]=array(\"index_term\"=>$n,\"nilai_tf\"=>$angka);\n\t\t\t\t$tf[$m][$n]=array(\"nilai_tf\"=>$angka);\n\t\t\t// }\n\t\t}\t\t\n\t}//batas mencari tf\n\treturn $tf;\n}", "function aturan3($word = '')\n {\n if (substr($word, 0, 3) == 'ber' and preg_match('/^[aiueo]/', substr($word, 3, 1)) == 0 and substr($word, 3, 1) != 'r' and substr($word, 5, 2) == 'er' and preg_match('/^[aiueo]/', substr($word, 7, 1)) == 1) {\n return true;\n } else {\n return false;\n }\n }", "function selectNotasByAlu($id){\n\t\t$link = openDb();\n\t\t$sql = \"SELECT not_valor, not_trime, disc_nome FROM ((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND a.alu_id = '$id')\";\n\t\t$query = $link->query($sql);\n\t\t\n\t\t$cont = 1;\n\t\t$x\t = 0;\n\t\t$y\t = 0;\n\t\t$retorno = array();\n\n\t\twhile ($result = mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome']; //Nome da disciplina\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do primeiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do segundo Trimestre\n\t\t\t\t$y+=1;\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$retorno[$x][$y]=$result['not_valor']; //Nota do terceiro Trimestre\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][1] == NULL && !$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL){\n\t\t\t\t\t$retorno[$x][$y] = arredonda(number_format(($retorno[$x][1]+$retorno[$x][2]+$retorno[$x][3])/3,1, '.', ' ')); //Média das notas\n\t\t\t\t\tif($retorno[$x][$y] == 0){ $retorno[$x][$y] = NULL; }\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$y=0;\n\t\t\t\t$x+=1;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1; //Esquema criado para arrumar as tuplas, (Disciplinas e Notas relacionadas na mesma linha)\n\t\t}\n\t\treturn $retorno;\n\t}", "function traiteFichierLieuDMF($t_filename,$t_idno_prefix,$nb_lignes_vides=0,$ligne_limite=0) {\n\tglobal $pn_locale_id, $VERBOSE, $DEBUG;\n\tglobal $vn_list_item_type_concept,$vn_list_item_label_synonym,$vn_place_other;\n\tglobal $t_list;\n\t\n\t$result= 0;\n\t$row = 1;\n\t$parent = array ();\n\t$nb_tab_pre=0;\n\t\n\t$explode_separator_array = array();\n\t$explode_separator_array[1][\"separator\"]=\" = \";\n\t$explode_separator_array[1][\"label_type\"]=$vn_list_item_label_synonym;\n\t\n\tprint \"traitement des lieux\\n\";\n\t\n\tif (($handle = fopen($t_filename, \"r\")) !== FALSE) {\n\t\t$contenu_fichier = file_get_contents($t_filename);\n\t\t$total=substr_count($contenu_fichier, \"\\n\");\n\t\t$contenu_fichier=\"\";\n\t\t\n\t\t$data=\"\";\n\t $parent_selected=1;\t\t\t\t\n\t\t\n\t while (($data = fgets($handle)) !== FALSE) {\n\t\t\t$libelle = str_replace(\"\\t\", \"\", $data);\n\t\t\t$libelle = str_replace(\"\\r\\n\", \"\", $libelle);\n\t\t\t\n\t\t\t// comptage du nb de tabulation pour connaître le terme parent\n\t\t\t$nb_tab = substr_count($data,\"\\t\");\n\t $row++;\n\t \n\t // Si aucune information n'est à afficher, on affiche une barre de progression\n\t if ((!$DEBUG) && (!$VERBOSE)) {\n\t \tshow_status($row, $total);\n\t }\n\t \n\t if (($row > $nb_lignes_vides + 1) && ($libelle !=\"\")) {\n\t\t \n\t\t if ($row == $ligne_limite) {\n\t\t \tprint \"limite atteinte : \".$ligne_limite.\" \\n\";\n\t\t \tbreak;\n\t\t \t//die();\n\t\t }\n\t\n\t\t\t\t// si plus d'une tabulation\n\t\t\t\tif (($nb_tab_pre != $nb_tab) && ($nb_tab > 0)) {\n\t\t\t\t\t$parent_selected=$parent[$nb_tab - 1];\n\t\t\t\t} elseif ($nb_tab == 0) {\n\t\t\t\t\t$parent_selected=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// débuggage\n\t\t\t\tif ($DEBUG) print \"(\".$parent_selected.\") \".$nb_tab.\" \".$libelle;\n\t\t\t\t\n\t\t\t\t// insertion dans la liste\n\t\t\t\tif ($vn_place_id=getPlaceID($libelle, $t_idno_prefix.\"_\".($row-$nb_lignes_vides), $vn_place_other, $parent_selected, $explode_separator_array)) {\n\t\t\t\t} else {\n\t\t\t\t\tprint \"PLACE CREATION FAILED : \".$libelle.\" \";\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\n\t\t $parent[$nb_tab]=$vn_place_id;\n\t\t\t\t\n\t }\n\t \n\t $nb_tab_pre=$nb_tab;\n\t }\n\t fclose($handle);\n\t \tif ($VERBOSE) { print \"dmf_\".$t_idno_prefix.\" treated.\\n\";}\n\t \t$result = true;\n\t} else {\n\t\tprint \"le fichier n'a pu être ouvert.\";\n\t\t$result=false;\n\t} \n\treturn $result;\t\n}", "function parse_votes_text($text, $round, $provider) {\n $file_righe = explode(\"\\n\", $text);\n $query_values = array();\n\n //n° righe\n $count_1 = count($file_righe);\n\n //inserisco ogni riga come un nuovo record della tabella 'fanta_votes'\n foreach ($file_righe as $key => $riga) {\n $riga = trim($riga);\n if (is_numeric(substr($riga, 0, 1))) {\n //separo i campi della riga con il carattere \\t \"tab\"\n $elems = explode(chr(9), $riga);\n\n //se il ruolo è P,D,C,A => ok \n if (in_array($elems[1], array(\"P\", \"D\", \"C\", \"A\"))) {\n foreach ($elems as $id_elem => $elem) {\n $elem = trim($elem);\n }\n //controllo se ha preso SV\n if (!is_numeric($elems[3])) $elems[3] = strtr($elems[3], ',', '.');\n\n //giocatori senza voti ma con bonus e/o malus\n if (!is_numeric($elems[3]) || $elems[3] == 0) {\n //portiere SV\n if ($elems[1] == 'P') {\n $elems[3] = 6;\n }\n //non portiere con bonus/malus\n elseif (($elems[4] + $elems[5] + $elems[6] + $elems[7] + $elems[8] + $elems[9] + $elems[10] + $elems[11] + $elems[12] + $elems[13]) != 0) {\n $elems[3] = 6;\n } \n // non inserire \n else {\n unset($file_righe[$key]);\n }\n\n }\n\n //elimino il ruolo del giocatore dal voto\n if (isset ($file_righe[$key]))\n unset($elems[1]);\n \n //sommo assist da azione con assist da fermo\n //$elems[12] = $elems[12] + $elems[13];\n \n //elimino nome, assist da fermo, gol_vittoria e gol_pareggio\n unset($elems[2]);\n unset($elems[13]);\n unset($elems[14]);\n unset($elems[15]); \n \n //trasformo il voto a un solo decimale\n $elems[3] = (strlen($elems[3]) == 4) ? substr($elems[3], 0, 3) : $elems[3];\n //echo $elems[3].\" - \";\n\n if (isset ($file_righe[$key])) {\n $query_values[$key] = implode(',', $elems);\n $votes[$elems[0]][$provider] = array(\"vote\" => $elems[3], \"gol_fatto\" => $elems[4], \"gol_subito\" => $elems[5], \"rig_parato\" => $elems[6], \"rig_sbagliato\" => $elems[7], \"rig_fatto\" => $elems[8], \"autogol\" => $elems[9], \"amm\" => $elems[10], \"esp\" => $elems[11], \"assist\" => $elems[12], \"assist_fermo\" => $elems[13] );\n }\n }\n }\n else unset($file_righe[$key]);\n }\n\n sort($query_values);\n array_unique($query_values);\n\n $tot = count($file_righe);\n\n}", "function KodeOtomatis($conn, $tabel, $id, $inisial, $index, $panjang)\n {\n $query\t= \"SELECT max(\".$id.\") as max_id FROM `\".$tabel.\"` WHERE \".$id.\" LIKE '\".$inisial.\"%'\";\n $data\t\t= $conn->query($query)->fetch_array();\n $id_max\t= $data['max_id'];\n\n if($index=='' && $panjang=='')\n {\n $no_urut\t= (int) $id_max;\n }\n else if($index!='' && $panjang=='')\n {\n $no_urut = (int) substr($id_max, $index);\n }\n else\n {\n $no_urut\t= (int) substr($id_max, $index, $panjang);\n }\n $no_urut\t= $no_urut + 1;\n\n if($index=='' && $panjang=='')\n {\n \t $id_baru = $no_urut;\n }\n else if($index!='' && $panjang=='')\n {\n \t $id_baru = $inisial . $no_urut;\n }\n else\n {\n \t $id_baru\t= $inisial . sprintf(\"%0$panjang\".\"s\", $no_urut);\n }\n return $id_baru;\n }", "function identify_aminoacid_complete_name ($aa){\r\n $aa=strtoupper($aa);\r\n if (strlen($aa)==1){\r\n if ($aa==\"A\"){return \"Alanine\";}\r\n if ($aa==\"R\"){return \"Arginine\";}\r\n if ($aa==\"N\"){return \"Asparagine\";}\r\n if ($aa==\"D\"){return \"Aspartic Acid\";}\r\n if ($aa==\"C\"){return \"Cysteine\";}\r\n if ($aa==\"E\"){return \"Glutamic Acid\";}\r\n if ($aa==\"Q\"){return \"Glutamine\";}\r\n if ($aa==\"G\"){return \"Glycine\";}\r\n if ($aa==\"H\"){return \"Histidine\";}\r\n if ($aa==\"I\"){return \"Isoleucine\";}\r\n if ($aa==\"L\"){return \"Leucine\";}\r\n if ($aa==\"K\"){return \"Lysine\";}\r\n if ($aa==\"M\"){return \"Methionine\";}\r\n if ($aa==\"F\"){return \"Phenylalanine\";}\r\n if ($aa==\"P\"){return \"Proline\";}\r\n if ($aa==\"S\"){return \"Serine\";}\r\n if ($aa==\"T\"){return \"Threonine\";}\r\n if ($aa==\"W\"){return \"Tryptophan\";}\r\n if ($aa==\"Y\"){return \"Tyrosine\";}\r\n if ($aa==\"V\"){return \"Valine\";}\r\n }elseif (strlen($aa)==3){\r\n if ($aa==\"ALA\"){return \"Alanine\";}\r\n if ($aa==\"ARG\"){return \"Arginine\";}\r\n if ($aa==\"ASN\"){return \"Asparagine\";}\r\n if ($aa==\"ASP\"){return \"Aspartic Acid\";}\r\n if ($aa==\"CYS\"){return \"Cysteine\";}\r\n if ($aa==\"GLU\"){return \"Glutamic Acid\";}\r\n if ($aa==\"GLN\"){return \"Glutamine\";}\r\n if ($aa==\"GLY\"){return \"Glycine\";}\r\n if ($aa==\"HIS\"){return \"Histidine\";}\r\n if ($aa==\"ILE\"){return \"Isoleucine\";}\r\n if ($aa==\"LEU\"){return \"Leucine\";}\r\n if ($aa==\"LYS\"){return \"Lysine\";}\r\n if ($aa==\"MET\"){return \"Methionine\";}\r\n if ($aa==\"PHE\"){return \"Phenylalanine\";}\r\n if ($aa==\"PRO\"){return \"Proline\";}\r\n if ($aa==\"SER\"){return \"Serine\";}\r\n if ($aa==\"THR\"){return \"Threonine\";}\r\n if ($aa==\"TRP\"){return \"Tryptophan\";}\r\n if ($aa==\"TYR\"){return \"Tyrosine\";}\r\n if ($aa==\"VAL\"){return \"Valine\";}\r\n }\r\n}", "function immobili_visionati($id_cli=\"\"){\n\t\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\n\n\t$q=\"select * from immobile i JOIN immobile_visite v ON v.id_imm=i.id_imm where v.id_cli = $id_cli ORDER BY v.data asc\";\n\n\t$r=$db->query($q);\n\tif (!$r) {\n \t\n\t\t$str.=\"<tr><td colspan=\\\"4\\\">Nessun immobile proposto <a href=\\\"index.php\\\" >PROPONI</A></td></tr>\";\n\t}\t\n\n\tif ($r) {\n\t\t$str.=\"<div class=\\\"clienti\\\">\";\n\t\t$str.=\"\t<TABLE id=\\\"immobili_index\\\">\";\n\t $str.=\"<THEAD class=\\\"thead\\\">\";\n\t\t$str.=\"<TR class=\\\"clienti_header\\\">\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Rif.Imm\";\n\t\t$str.=\" </TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Citt&agrave;\";\n\t\t$str.=\"</TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Mq/Prezzo\";\n\t\t$str.=\"</TD>\";\n $str.=\"<TD>\";\n\t\t$str.=\"Data\";\n\t\t$str.=\"</TD>\";\n\t\t $str.=\"<TD>\";\n\t\t$str.=\"Opzioni\";\n\t\t$str.=\"</TD>\";\n\t\t\n\t\t\n\t\t$str.=\"<td>\";\n\t\t\t$str.=\"Proprietario\";\n\t\t\t$str.=\"</td>\";\n\t\t$str.=\"</TR>\";\n\t\n\t\t\n\t\t$str.=\"</THEAD>\";\n\t $str.=\"<TBODY>\";\n \t\twhile ($ro=mysql_fetch_array($r)) {\n \t\t\t$str.= \"<TR>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti_rif\\\">\\n\";\n\t\t\t$str.= $ro['id_imm'].\"\\n</TD>\\n\";\n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= citta_stampa($ro['id_comune']).\"\\n</TD>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= mq_stampa($ro['id_imm']);\n\t\t\t$str.=\" -- \";\n\t\t\t$str.= prezzo_stampa($ro['id_imm']);\n\t\t\t$str.=\"\\n</TD\\n>\";\n\t\t\t$str.='<td>';\n $str .=$ro['data'];\n $str.='</td>';\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t\n\t\t\t$str.= opzioni_immobile($ro['id_tipo_locazione'],$ro['id_imm']).\"\\n</TD>\\n\";\n\t\t\t\n\t\t \n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t $str.= nominativo_stampa(id_imm_to_id_cli($ro['id_imm']));\n\t\t $str.= \"</TD>\\n\";\n\t\t $str.= \"</TR>\\n\\n\\n\";\n\t\t}\n\t\t$str.=\"</TBODY>\";\n\t\t$str.=\"</TABLE>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"addTableRolloverEffect('immobili_index','tableRollOverEffect1','tableRowClickEffect1');\";\n\t\t$str.=\"</script>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"initSortTable('immobili_index',Array('S','S','S','N',\";\n\t\t\n\t\t$str.=\"));\";\n\t\t$str.=\"</script>\";\n\n\t}\t\n\t\n\treturn $str;\n\t\n}", "function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \"&nbsp;&nbsp;Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \"&nbsp;&nbsp;Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \"&nbsp;&nbsp;arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}", "function addjapeng($kanjicity, $kanalocal, $kanacity, $kanastreet,/* $kanahouse,*/ $hyphens)\n\t{\n\t\tif (strstr(substr($kanjicity,8),encode(\"郡\"))!==false) $kanacity=substr($kanacity,0,8) . str_replace(encode(\"グン\"),\"gun \",substr($kanacity,8));\n\t\t$string= trim($kanalocal.\" \". $kanacity . \" \" . $kanastreet/* . \" \" . $kanahouse*/);\n\n\n\t\t//Array to prevent \"-shi,-ku\" errors\n\t\t$cities=array(encode(\"サイタマシ\") =>\"Saitamashi \",encode(\"キョウトシ\") =>\"Kyotoshi \",encode(\"センダイシ\") =>\"Sendaishi \",encode(\"キタキュウシュウシ\") =>\"Kita Kyushushi \",encode(\"チバシ\") =>\"Chibashi \",encode(\"ナゴヤシ\") =>\"Nagoyashi \",encode(\"サカイシ\") =>\"Sakaishi \",encode(\"オオサカシ\") =>\"Osakashi \",encode(\"カワサキシ\") =>\"Kawasakishi \",encode(\"ヒロシマシ\") =>\"Hiroshimashi \",encode(\"ニイガタシ\") =>\"Nigatashi \",encode(\"サッポロシ\") =>\"Sapporoshi \",encode(\"ヨコハマシ\") =>\"Yokohamashi \",encode(\"ハママツシ\") =>\"Hamamatsushi \",encode(\"コウベシ\") =>\"Kobeshi \",encode(\"フクオカシ\") =>\"Fukuokashi \",encode(\"シズオカシ\") =>\"Shizuokashi \");\n\t\t//Irregular combinations\n\t\t$irregular=array(encode(\"ゥウ\") => encode(\"ゥ\") ,encode(\"ォオ\") => encode(\"ォ\") ,encode(\"ョウ\") => encode(\"ョ\") ,encode(\"ュウ\") => encode(\"ュ\")/*, encode(\" ミナミ\") =>\" Minami \", encode(\" ヒガシ\") =>\" higashi \"/*, encode(\" キタ\") =>\" kita \", encode(\" ニシ\") =>\" nishi\" */);\n\t\t//Basic transition\n\t\t$trans=array(encode(\"シモウ\") => \"shimou\" ,encode(\"モトウ\") => \"motou\" ,encode(\"モトオ\") => \"motoo\" ,encode(\"ン\") => \"n\" ,encode(\"ヲ\") => \"wo\" ,encode(\"ワ\") => \"wa\" ,encode(\"ロウ\") => \"ro\" ,/*encode(\"ロオ\") => \"ro\" ,*/encode(\"ロ\") => \"ro\" ,encode(\"レ\") => \"re\" ,encode(\"ル\") => \"ru\" ,encode(\"リイ\") => \"ri\" ,encode(\"リョ\") => \"ryo\" ,encode(\"リュ\") => \"ryu\" ,encode(\"リャ\") => \"rya\" ,encode(\"リ\") => \"ri\" ,encode(\"ラ\") => \"ra\" ,encode(\"ヨウ\") => \"yo\" ,encode(\"ユウ\") => \"yu\" ,encode(\"ヨ\") => \"yo\" ,encode(\"ユ\") => \"yu\" ,encode(\"ヤ\") => \"ya\" ,encode(\"モオ\") => \"mo\" ,encode(\"モウ\") => \"mo\" ,encode(\"モ\") => \"mo\" ,encode(\"メ\") => \"me\" ,encode(\"ム\") => \"mu\" ,encode(\"ミョ\") => \"myo\" ,encode(\"ミュ\") => \"myu\" ,encode(\"ミャ\") => \"mya\" ,encode(\"ミ\") => \"mi\" ,encode(\"マ\") => \"ma\" ,encode(\"ボウ\") => \"bo\" ,encode(\"ボ\") => \"bo\" ,encode(\"ベ\") => \"be\" ,encode(\"ブウ\") => \"bu\" ,encode(\"ブ\") => \"bu\" ,encode(\"ビョ\") => \"byo\" ,encode(\"ビュ\") => \"byu\" ,encode(\"ビャ\") => \"bya\" ,encode(\"ビ\") => \"bi\" ,encode(\"バ\") => \"ba\" ,encode(\"ポウ\") => \"po\" ,encode(\"ポ\") => \"po\" ,encode(\"ペ\") => \"pe\" ,encode(\"プウ\") => \"pu\" ,encode(\"プ\") => \"pu\" ,encode(\"ピョ\") => \"pyo\" ,encode(\"ピュ\") => \"pyu\" ,encode(\"ピャ\") => \"pya\" ,encode(\"パ\") => \"pa\" ,encode(\"ノウ\") => \"no\" ,encode(\"ホウ\") => \"ho\" ,encode(\"ホ\") => \"ho\" ,encode(\"ヘ\") => \"he\" ,encode(\"フォ\") => \"fo\" ,encode(\"フェ\") => \"fe\" ,encode(\"フゥ\") => \"fu\" ,encode(\"フィ\") => \"fi\" ,encode(\"ファ\") => \"fa\" ,encode(\"フウ\") => \"fu\" ,encode(\"フ\") => \"fu\" ,encode(\"ヒョ\") => \"hyo\" ,encode(\"ヒュ\") => \"hyu\" ,encode(\"ヒャ\") => \"hya\" ,encode(\"ヒ\") => \"hi\" ,encode(\"ハ\") => \"ha\" ,encode(\"ノ\") => \"no\" ,encode(\"ネ\") => \"ne\" ,encode(\"ヌウ\") => \"nu\" ,encode(\"ヌ\") => \"ne\" ,encode(\"ニョ\") => \"nyo\" ,encode(\"ニュ\") => \"nyu\" ,encode(\"ニャ\") => \"nya\" ,encode(\"ニ\") => \"ni\" ,encode(\"ナ\") => \"na\" ,encode(\"ドオ\") => \"do\" ,encode(\"ドウ\") => \"do\" ,encode(\"ド\") => \"do\" ,encode(\"ディ\") => \"di\" ,encode(\"デ\") => \"de\" ,encode(\"ヅウ\") => \"ju\" ,encode(\"ヅ\") => \"ju\" ,encode(\"ヂョ\") => \"jyo\" ,encode(\"ヂュ\") => \"jyu\" ,encode(\"ヂャ\") => \"jya\" ,encode(\"ヂェ\") => \"jye\" ,encode(\"ヂィ\") => \"ji\" ,encode(\"ヂ\") => \"ji\" ,encode(\"ダ\") => \"da\" ,encode(\"トオ\") => \"to\" ,encode(\"トウ\") => \"to\" ,encode(\"ト\") => \"to\" ,encode(\"ティ\") => \"ti\" ,encode(\"テ\") => \"te\" ,encode(\"ツウ\") => \"tsu\" ,encode(\"ツ\") => \"tsu\" ,encode(\"チョ\") => \"cho\" ,encode(\"チュ\") => \"chu\" ,encode(\"チャ\") => \"cha\" ,encode(\"チェ\") => \"che\" ,encode(\"チィ\") => \"chi\" ,encode(\"チ\") => \"chi\" ,encode(\"タ\") => \"ta\" ,encode(\"ゾウ\") => \"zo\" ,encode(\"ゾオ\") => \"zo\" ,encode(\"ゾ\") => \"zo\" ,encode(\"ゼ\") => \"ze\" ,encode(\"ズ\") => \"zu\" ,encode(\"ジョ\") => \"jo\" ,encode(\"ジェ\") => \"je\" ,encode(\"ジュ\") => \"ju\" ,encode(\"ジャ\") => \"ja\" ,encode(\"ジ\") => \"ji\" ,encode(\"ザ\") => \"za\" ,encode(\"ソウ\") => \"so\" ,encode(\"ソオ\") => \"so\" ,encode(\"ソ\") => \"so\" ,encode(\"セ\") => \"se\" ,encode(\"ス\") => \"su\" ,encode(\"ショ\") => \"sho\" ,encode(\"シェ\") => \"she\" ,encode(\"シュ\") => \"shu\" ,encode(\"シャ\") => \"sha\" ,encode(\"シ\") => \"shi\" ,encode(\"サ\") => \"sa\" ,encode(\"ゴウ\") => \"go\" ,encode(\"ゴオ\") => \"go\" ,encode(\"ゴ\") => \"go\" ,encode(\"ゲ\") => \"ge\" ,encode(\"グ\") => \"gu\" ,encode(\"ギョ\") => \"gyo\" ,encode(\"ギェ\") => \"gye\" ,encode(\"ギュ\") => \"gyu\" ,encode(\"ギィ\") => \"gyi\" ,encode(\"ギャ\") => \"gya\" ,encode(\"ギ\") => \"gi\" ,encode(\"ガ\") => \"ga\" ,encode(\"コウ\") => \"ko\" ,encode(\"コオ\") => \"ko\" ,encode(\"コ\") => \"ko\" ,encode(\"ケ\") => \"ke\" ,encode(\"ク\") => \"ku\" ,encode(\"キョ\") => \"kyo\" ,encode(\"キェ\") => \"kye\" ,encode(\"キュ\") => \"kyu\" ,encode(\"キィ\") => \"kyi\" ,encode(\"キャ\") => \"kya\" ,encode(\"キ\") => \"ki\" ,encode(\"カ\") => \"ka\" ,encode(\"オオ\") => \"o\" ,encode(\"オウ\") => \"o\" ,encode(\"ヴォ\") => \"vo\" ,encode(\"ヴェ\") => \"ve\" ,encode(\"ヴィ\") => \"vi\" ,encode(\"ヴァ\") => \"va\" ,encode(\"ヴ\") => \"vu\" ,encode(\"オ\") => \"o\" ,encode(\"エ\") => \"e\" ,encode(\"ウ\") => \"u\" ,encode(\"イ\") => \"i\" ,encode(\"ア\") => \"a\",encode(\"ッ\") => \"l\");\n\t\t//Perform Conversion\n\t\t$string=strtr($string,$cities);\n\t\t$string=strtr($string,$irregular);\n\t\t$string=strtr($string,$trans);\n\t\t$string=strtoupper(substr($string,0,1)) . substr($string,1);\n\t\t$length=strlen($string);\n\t\t//echo \"<br />basic switch $string\";\n\t\t//Remove tsu or \"l\" as it is now written\n\t\tfor ($pos=0;$pos<=$length;$pos++)\n\t\t\t{\n\t\t\t\t$part=substr($string,$pos,1);\n\t\t\t\t$tsu=strstr($part,\"l\");\n\t\t\t\tif ($tsu!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$string=substr($string,0,$pos) . substr($string,($pos+1),1) . substr($string,($pos+1));\n\t\t\t\t\t}\n\t\t\t}\n\t\t//echo \"<br />remove tsu $string\";\n\t\t//Add Capital Letters to the start of each place\n\t\t$off=1+strpos($string,\" \");\n\t\twhile ($off!=1)\n\t\t\t{\n\t\t\t\t$string=substr($string,0,$off) . strtoupper(substr($string,$off,1)) . substr($string,($off+1));\n\t\t\t\t$off=1+strpos($string,\" \",$off);\n\t\t\t}\n\t\t//echo \"</br> Capital Letters $string\";\n\t\t//Function to add Hyphens to the end of each word\n\t\t$vowels=array(\"a\",\"e\",\"i\",\"o\",\"u\",\"n\");\n\t\t$stringer=explode(\" \",$string);\n\t\t$count=(count($stringer)-(1+$hyphens));\n\t\tfor ($i=0;$i<=$count;$i++)\n\t\t\t{\n\t\t\t\t$stringer[$i]=hyphenator($stringer[$i],$vowels);\n\t\t\t}\n\t\t$string=implode(\" \",$stringer);\n\t\t//echo \"<br />Hyphens $string\";\n\t\t//Strip off any bracketed areas\n\t\t$string=str_replace(\"ma-chi\",\"machi\",$string);\n\t\tif (strstr($string,encode(\"(\"))!==false) $string=substr($string,0,strpos($string,encode(\"(\"))) . substr($string,(8+strpos($string,encode(\")\"))));\n\t\t//echo \"<br />Final $string\";\n\t\treturn $string;\n\t}", "private static function Najdi_kolize ($query,$iducast){\r\n $kolize_pole = array();\r\n $dbh = Projektor2_AppContext::getDB();\r\n \r\n //echo \" <br>\". $query . \" \" . $iducast;\r\n \r\n //--\r\n Projektor2_Table_UcKolizeData::$zjistovane_kolize=array();\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = false; \r\n //echo \"NAJDI KOLIZE\";\r\n \r\n try { \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n while($zaznam_s_kolize = $sth->fetch(PDO::FETCH_ASSOC)) { //pro pozadovane kontroly (kolize) sestavuji dotazy\r\n //var_dump($zaznam_s_kolize);\r\n //--\r\n array_push (Projektor2_Table_UcKolizeData::$zjistovane_kolize, $zaznam_s_kolize['id_s_typ_kolize']);\r\n //echo \"Table_UcKolizeData::zjistovane_kolize\"; var_dump(Table_UcKolizeData::$zjistovane_kolize);\r\n \r\n //ze zjistenych udaju sestavuji dotazy na kolize\r\n $query_kolize = self::Sestav_dotaz_na_kolizi($zaznam_s_kolize['zobrazovany_text_kolize'], $zaznam_s_kolize['select_text'], $zaznam_s_kolize['from_text'], $zaznam_s_kolize['where_text'] );\r\n //echo \"<br>*id_s_typ_kolize a dotaz na kolizi*|\" . $zaznam_s_kolize['id_s_typ_kolize'] ;\r\n //echo \" |<br>\". $query_kolize;\r\n \r\n if ($query_kolize) {\r\n $sth = $dbh->prepare($query_kolize);\r\n $succ = $sth->execute($iducast); \r\n \r\n //while ($zaznam_kolize = $data_kolize->fetch()) { \r\n $zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC);\r\n //echo \"<br>zaznam_kolize\" ; var_dump( $zaznam_kolize );\r\n \r\n if ( $zaznam_kolize['kolize_nastala'] ) { // kolize nastava\r\n // echo \"<br>\" . $zaznam_kolize['kolize_nastala'];\r\n //--/\r\n Projektor2_Table_UcKolizeData::$nastava_kolize_ve_zjistovanych = true; // nastavi priznak, ze alespon jedna zjistovana kolize skutecne nastava\r\n \r\n // ***minula*** - kolize nastava, je treba z uc_kolize_table precist ulozena data pokud uz kolize byla a !je! validni\r\n // hledat podle iducast, id s kolize , formular-nemusi, lokace-nemusi\r\n $query_minula = \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast .\r\n //\" and s_typ_kolize.formular='\" . $formular .\"'\" .\r\n //\" and s_typ_kolize.lokace_kolize='\" . $lokacekolize .\"'\" .\r\n \" and s_typ_kolize.id_s_typ_kolize=\" . $zaznam_s_kolize['id_s_typ_kolize'] . \r\n \" and uc_kolize_table.valid\" ; \r\n //echo \"<br>query_minula: \" .$query_minula;\r\n $sth = $dbh->prepare($query_minula);\r\n $suvv = $sth->execute();\r\n $zaznam_minula = $sth->fetch(PDO::FETCH_ASSOC);\r\n //var_dump ($zaznam_minula);\r\n \r\n if ($zaznam_minula) {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n $zaznam_minula['revidovano'], $zaznam_minula['revidovano_pozn'],\r\n $zaznam_minula['date_vzniku'], $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'], \r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n $zaznam_minula['id_uc_kolize_table']);\r\n }\r\n else {\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n }\r\n //var_dump($kolize); \r\n $kolize_pole[] = $kolize;\r\n \r\n \r\n \r\n } //- kolize nastava\r\n \r\n else { // kolize nenastava nevim zda i u kolize ktera nenastava mam naplnovat informace z uc_kolize_table (revidovano....)\r\n $kolize = new Projektor2_Table_UcKolizeData($iducast, $zaznam_s_kolize['id_s_typ_kolize'],\r\n null, null,\r\n null, $zaznam_kolize['kolize_nastala'],\r\n $zaznam_s_kolize['nazev_kolize'],\r\n $zaznam_kolize['zobrazovany_text_kolize'] , $zaznam_s_kolize['uroven_kolize'] , $zaznam_s_kolize['lokace_kolize'],\r\n null);\r\n \r\n $kolize_pole[] = $kolize; \r\n \r\n }\r\n \r\n //}//while\r\n \r\n }//if query \r\n \r\n } // while - pro pozadovane kontroly (kolize) sestavuji dotazy\r\n } //try\r\n catch (Exception $e) {\r\n\t//header(\"Location: ./login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\r\n \r\n }\r\n//echo \"<br>**Kolize_pole v Najdi_kolize..... **\";\r\n//var_dump($kolize_pole);\r\n \r\n return $kolize_pole;\r\n \r\n}", "public function run()\n {\n $arr = [];\n $sandw = array('Sandwich nướng xúc xích và cá ngừ phô mai','Sandwich Xúc Xích & Chà Bông','Sandwich Gà Nướng Cay','Sandwich Bò & Trứng','Sandwich Cá Ngừ Trứng','Sandwich Salad Gà','Sandwich Salad Cá Ngừ','Sandwich Thịt Nguội Phomai & Salad');\n $drink = array('Nước suối','Trà đào','Pepsi','Trà Sữa Thái Xanh Thạch Nha Đam','Ca Cao Sữa Đá','7Up','Mirinda');\n $desert = array('Kem dâu','Kem socola','Kem việt quất','Kem tươi','Bánh Pie Nhân Xoài Đào','Bánh Pie Nhân Đào','Bánh Pie Nhân Khoai Môn');\n $ff = array('Khoai Tây Chiên','Khoai Tây Lắc Vị BBQ','Khoai Tây Lắc Vị Bơ');\n $salad = array('Salad Bắp Cải & Thanh Cua','Salad Gà','Salad Cá Ngừ');\n $combo = array('01 MIẾNG GÀ GIÒN VUI VẺ + 01 MỲ Ý SỐT BÒ BẰM + 01 NƯỚC NGỌT','03 MIẾNG GÀ GIÒN VUI VẺ + 01 MỲ Ý SỐT BÒ BẰM + 01 KHOAI TÂY (VỪA) + 02 NƯỚC NGỌT','3 MIẾNG GÀ GIÒN VUI VẺ + 1 MIẾNG GÀ SỐT CAY + 2 MỲ Ý SỐT BÒ BẰM + 2 KHOAI TÂY');\n $faker = Faker\\Factory::create('vi_vn');\n $pric_sw = $faker->numberBetween($min = 30000,$max = 40000);\n $pric_dr = $faker->numberBetween($min = 15000,$max = 30000);\n $pric_cb = $faker->numberBetween($min = 150000,$max = 300000);\n\n for($i=0;$i<count($sandw);$i++){\n array_push($arr,[\n 'id_cate' => 1,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $sandw[$i],\n 'desc_food' => '',\n 'price_food' => $pric_sw,\n 'preprice_food' => $pric_sw - 3000,\n 'state_food' => 1\n ]);\n }\n\n for($j=0;$j<count($drink);$j++){\n array_push($arr,[\n 'id_cate' => 2,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $drink[$j],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n\n\n for($k=0;$k<count($desert);$k++){\n array_push($arr,[\n 'id_cate' => 3,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $desert[$k],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n \n \n for($l=0;$l<count($ff);$l++){\n array_push($arr,[\n 'id_cate' => 4,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $ff[$l],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n for($v=0;$v<count($salad);$v++){\n array_push($arr,[\n 'id_cate' => 5,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $salad[$v],\n 'desc_food' => '',\n 'price_food' => $pric_dr,\n 'preprice_food' => $pric_dr - 3000,\n 'state_food' => 1\n ]);\n }\n for($cb=0;$cb<count($combo);$cb++){\n array_push($arr,[\n 'id_cate' => 6,\n 'id_dis' => $faker->numberBetween($min=1,$max=5),\n 'name_food' => $combo[$cb],\n 'desc_food' => '',\n 'price_food' => $pric_cb,\n 'preprice_food' => $pric_cb - 15000,\n 'state_food' => 1\n ]);\n }\n\n DB::table('food')->insert($arr);\n \n \n }", "function terbilang($bilangan) {\n\n\t\t$angka = array('0','0','0','0','0','0','0','0','0','0',\n\t\t\t'0','0','0','0','0','0');\n\t\t$kata = array('','satu','dua','tiga','empat','lima',\n\t\t\t'enam','tujuh','delapan','sembilan');\n\t\t$tingkat = array('','ribu','juta','milyar','triliun');\n\n\t\t$panjang_bilangan = strlen($bilangan);\n\n\t\t/* pengujian panjang bilangan */\n\t\tif ($panjang_bilangan > 15) {\n\t\t\t$kalimat = \"Diluar Batas\";\n\t\t\treturn $kalimat;\n\t\t}\n\n\t\t/* mengambil angka-angka yang ada dalam bilangan,\n dimasukkan ke dalam array */\n\t\tfor ($i = 1; $i <= $panjang_bilangan; $i++) {\n\t\t\t$angka[$i] = substr($bilangan,-($i),1);\n\t\t}\n\n\t\t//only for debugging\n\t\t//var_dump ($angka);\n\n\t\t$i = 1;\n\t\t$j = 0;\n\t\t$kalimat = \"\";\n\n\n\t\t/* mulai proses iterasi terhadap array angka */\n\t\twhile ($i <= $panjang_bilangan) {\n\n\t\t\t$subkalimat = \"\";\n\t\t\t$kata1 = \"\";\n\t\t\t$kata2 = \"\";\n\t\t\t$kata3 = \"\";\n\n\t\t\t/* untuk ratusan */\n\t\t\tif ($angka[$i+2] != \"0\") {\n\t\t\t\tif ($angka[$i+2] == \"1\") {\n\t\t\t\t\t$kata1 = \"seratus\";\n\t\t\t\t} else {\n\t\t\t\t\t$kata1 = $kata[$angka[$i+2]] . \" ratus\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk puluhan atau belasan */\n\t\t\tif ($angka[$i+1] != \"0\") {\n\t\t\t\tif ($angka[$i+1] == \"1\") {\n\t\t\t\t\tif ($angka[$i] == \"0\") {\n\t\t\t\t\t\t$kata2 = \"sepuluh\";\n\t\t\t\t\t} elseif ($angka[$i] == \"1\") {\n\t\t\t\t\t\t$kata2 = \"sebelas\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$kata2 = $kata[$angka[$i]] . \" belas\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$kata2 = $kata[$angka[$i+1]] . \" puluh\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* untuk satuan */\n\t\t\tif ($angka[$i] != \"0\") {\n\t\t\t\tif ($angka[$i+1] != \"1\") {\n\t\t\t\t\t$kata3 = $kata[$angka[$i]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* pengujian angka apakah tidak nol semua,\n lalu ditambahkan tingkat */\n\t\t\tif (($angka[$i] != \"0\") OR ($angka[$i+1] != \"0\") OR\n\t\t\t\t($angka[$i+2] != \"0\")) {\n\t\t\t\t$subkalimat = \"$kata1 $kata2 $kata3 \" . $tingkat[$j] . \" \";\n\t\t\t}\n\n\t\t\t/* gabungkan variabe sub kalimat (untuk satu blok 3 angka)\n ke variabel kalimat */\n\t\t\t$kalimat = $subkalimat . $kalimat;\n\t\t\t$i = $i + 3;\n\t\t\t$j = $j + 1;\n\n\t\t}\n\n\t\t/* mengganti satu ribu jadi seribu jika diperlukan */\n\t\tif (($angka[5] == \"0\") AND ($angka[6] == \"0\")) {\n\t\t\t$kalimat = str_replace(\"satu ribu\",\"seribu\",$kalimat);\n\t\t}\n\n\t\treturn trim($kalimat);\n\n\t}", "protected function subjonctifImparfait(){\n $terminaisons=[];\n $terminaisons[]= \"fuguèsse\";\n $terminaisons[]= \"fuguèsses\";\n $terminaisons[]= \"fuguèsse\";\n $terminaisons[]= \"fuguessian\";\n $terminaisons[]= \"fuguessias\";\n $terminaisons[]= \"fuguèsson\";\n return $terminaisons;\n }", "public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }", "function formlit_alt($f)\n{\n $suchmuster = \"/<llink:(.\\d+)>/\";\n $tref = preg_match_all($suchmuster, $f['in'], $treffer);\n for ($i = 0; $i < count($treffer[0]); $i++) {\n $id = $treffer[1][$i];\n $li = getlit($id);\n $f['in'] = $li['text'];\n }\n\n\n $text = $f['verfasser_vorname'];\n if ($text != '') $text = ', ' . $text;\n $hg = '';\n if ($f['code'] == 'H') $hg = ' (Hg.)';\n if ($f['verfasser_name']) $text = $f['verfasser_name'] . $text . $hg . ': ';\n if ($f['code'] == 'U') {\n $f['titel'] = preg_replace(\"/http:\\/\\/(.*)/\", \"<a href=\\\"http://\\$1\\\">http://\\$1</a>, \", $f['titel']);\n $text .= $f['titel'];\n } else {\n $text .= $f['titel'] . ', ';\n }\n\n if ($f['in']) $text .= 'in: ' . $f['in'] . ', ';\n if ($f['ort']) $text .= $f['ort'] . ' ';\n if ($f['code'] == 'T') {\n if ($f['nummer']) $text .= $f['nummer'] . ' ';\n if ($f['jahr']) $text .= $f['jahr'];\n } else {\n if ($f['jahr']) $text .= $f['jahr'];\n if ($f['nummer']) $text .= ', ' . $f['nummer'];\n }\n if ($f['seite']) {\n if ($text[strlen($text) - 1] != ' ') $text .= ', ';\n $text .= $f['seite'];\n }\n if ($text[strlen($text) - 1] != '.') $text .= '.';\n $f['text'] = $text;\n return ($f);\n}" ]
[ "0.589124", "0.58377916", "0.5731272", "0.5574303", "0.5557397", "0.55451626", "0.5505146", "0.54966116", "0.54869497", "0.5483447", "0.5476329", "0.54721045", "0.5453097", "0.544599", "0.54453564", "0.5441371", "0.5421093", "0.54204696", "0.54177666", "0.5416624", "0.5406922", "0.5403244", "0.5396828", "0.53874487", "0.5383258", "0.5381772", "0.5380303", "0.53775233", "0.5369479", "0.5366241", "0.53578967", "0.53530186", "0.53524363", "0.5351836", "0.534845", "0.5338068", "0.53237313", "0.53206205", "0.53093356", "0.5288194", "0.5279624", "0.5276558", "0.5276224", "0.5270533", "0.5260476", "0.52562493", "0.5252761", "0.5247117", "0.52467674", "0.52449924", "0.5243139", "0.52415144", "0.5237672", "0.5228625", "0.5225614", "0.5224571", "0.5219473", "0.5212556", "0.5210472", "0.5202254", "0.5200863", "0.51965606", "0.51931417", "0.51893765", "0.51744217", "0.5170515", "0.5169976", "0.5167564", "0.51606154", "0.5159622", "0.5159622", "0.51548415", "0.5154542", "0.5152831", "0.5144094", "0.5138655", "0.5137113", "0.51330024", "0.5132622", "0.5127216", "0.5122389", "0.512128", "0.5121171", "0.5117927", "0.5117724", "0.51074255", "0.5107114", "0.5099591", "0.5096423", "0.50877404", "0.50851107", "0.5085042", "0.5083978", "0.50794286", "0.5079147", "0.5078785", "0.5071756", "0.50702906", "0.50672144", "0.5064696", "0.5064368" ]
0.0
-1
SENDS EMAIL TO USER IF HE/SHE FORGOT THE PASSWORD
function forgotPassword($emailTO) { global $user, $pass; return $params = array( 'api_user' => $user, 'api_key' => $pass, 'to' => $emailTO, 'subject' => 'E-Mart: Reset password', 'html' => "<html> <head></head> <body> <p>You have been outbid by another bidder. Please click on the link below to bid agiain:<br> <span><a href=\"www.e-mart.azurewebsites.net\">URL</a></span> </p> </body> </html>", 'text' => 'testing body', 'from' => '[email protected]' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send_password(){\n\t\t$tmpUsername = $_POST[\"txtUsername\"];\n\t\t$tmpEmail = $_POST[\"txtEmail\"];\n\t\t$inRepository = new InterfacePersonRepo;\n\t\t$tmpUser = $inRepository->getRepositoryByUsername($tmpUsername);\n\t\tif(count($tmpUser)>1){\n\t\t\texit();\n\t\t}\n\t\tif($tmpUser[0]->Email == $tmpEmail){\n\t\t\t$fgUser = new Person;\n\t\t\t$fgUser->setUsername($tmpUsername);\n\t\t\t$fgUser->setEmail($tmpEmail);\n\t\t\t$email = $inRepository->sendmailRepository($fgUser);\n\t\t\treturn View::make('alert/authen/alertEmail')->with('Email',$email);\n\t\t}else{\n\t\t\treturn View::make('alert/authen/alertEmail2');\n\t\t}\n\t}", "function notify_password($username, $password) {\n\n $conn = db_connect();\n $result = $conn->query(\"select email from user\n where username='\".$username.\"'\");\n if (!$result) {\n throw new Exception('Could not find email address.');\n } else if ($result->num_rows == 0) {\n throw new Exception('Could not find email address.');\n // username not in db\n } else {\n $row = $result->fetch_object();\n $email = $row->email;\n $from = \"From: support@phpbookmark \\r\\n\";\n $mesg = \"Your PHPBookmark password has been changed to \".$password.\"\\r\\n\"\n .\"Please change it next time you log in.\\r\\n\";\n\n if (mail($email, 'PHPBookmark login information', $mesg, $from)) {\n return true;\n } else {\n throw new Exception('Could not send email.');\n }\n }\n}", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "function validateAndSend($user_email){\n\t\t\t$userPassword = $this->manage_content->getValue_email('owner_info','password','owner_email',$user_email);\n\t\t\tif(isset($userPassword[0]['password']))\n\t\t\t{\t\n\t\t\t\t$message = \"Your password for the account is\".$userPassword[0]['password'];\n\t\t\t\t$mailsent = $this->mail_function->sendMail($user_email,$message,$user_email);\n\t\t\t\treturn $mailsent;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"Invalid user.\";\n\t\t\t}\n\n\t\t}", "public function sendEmail()\n {\n /* @var $usuario Usuarios */\n $usuario = Usuarios::findOne([\n 'email' => $this->email,\n ]);\n\n if (!$usuario) {\n return false;\n }\n\n if (!Usuarios::isPasswordResetTokenValid($usuario->token)) {\n $usuario->generatePasswordResetToken();\n if (!$usuario->save()) {\n return false;\n }\n }\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $usuario->token]);\n $body = <<<EOT\n <h2>Pulsa el siguiente enlace para cambiar la contraseña.<h2>\n <a href=\"$resetLink\">Cambiar contraseña</a>\n EOT;\n\n return Yii::$app\n ->mailer\n ->compose()\n ->setFrom(Yii::$app->params['smtpUsername'])\n ->setTo($this->email)\n ->setSubject('Cambiar contraseña')\n ->setHtmlBody($body)\n ->send();\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\t$mail = new UserMails;\n\t\t\t\treturn $mail->passwordEmail($user);\n }\n }\n\n return false;\n }", "function SentVerificationEmail($email,$username,$password){\n \t$to = $email;\n\t$subject = 'DoggieCare Forget Password';\n\t$message = 'Username ='.$username.' || Password='.$password;\n\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($to, $subject, $message, $headers);\n \n }", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "private function emailAtLogin() {}", "public function sendEmail()\n {\n /* @var $SysUser SysUser */\n $user = SysUser::findOne([\n 'status' => SysUser::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if (!$user) {\n return false;\n }\n \n if (!SysUser::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n if (!$user->save()) {\n return false;\n }\n }\n\n $mailer=Yii::$app->mailer->compose(\n ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'],\n ['user' => $user,'time'=>time()]\n );\n $mailer->setFrom([Yii::$app->params['supportEmail'] => 'K183农机监管平台-信息录入']);\n $mailer->setTo($this->email);\n $mailer->setSubject('重置密码 K183农机监管平台-信息录入');\n if($mailer->send()){\n return true;\n }\n return false;\n }", "public function send()\n\t{\n $user = new User();\n\n // Send mail to user with password if username exists\n return $user->sendEmail(Database::connection(), $_POST['username']);\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'u_email' => $this->username,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n \t$userName = $user->u_name;\n $userEmail = $user->u_email;\n \t \n \tif(!empty($userName) && !empty($userEmail)) {\n $subject = \"[Price Genius]: Your Reset Password Request\";\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['api/reset-password', 'token' => $user->password_reset_token]);\n $content = ['userName' => $userName, 'resetLink' => $resetLink];\n $promotionName = \"Forgot Password\";\n return SendMail::sendSupportMail($user->u_email, $user->u_name, $subject, $content, $promotionName);\n \t\t}\n }\n \n }\n return false;\n }", "public function forgotpasswordAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $email_sent = false;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost();\n\n $email = trim($data['email']);\n $email = strtolower($email);\n $user_service->emailPassword($email);\n $email_sent = true;\n }\n\n return ['email_sent' => $email_sent];\n }", "public function p_emailpassword(){\n\n # if javascript is disabled this checks if user entered email and password to login\n if (!$_POST['email']) {\n Router::redirect(\"/users/emailpassword/error\"); \n }\n # proceed with checking if email exists\n else { \n $q= 'Select user_id \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n \n $user_id= DB::instance(DB_NAME)->select_field($q);\n \n #email doesnt exists\n if(!$user_id){ \n \n Router::redirect(\"/users/emailpassword/error1\"); \n }\n # email exists , email the password that is generated using generate_random_string\n else{\n $password=Utils::generate_random_string(8); \n $new_password=sha1(PASSWORD_SALT.$password);\n $new_modified= Time::now();\n\n $data=Array('modified'=>$new_modified,\n 'password'=>$new_password \n );\n $success= DB::instance(DB_NAME)->update('users',$data,'WHERE user_id=' .$user_id); \n \n \n $to[] = Array(\"name\" => $_POST['email'], \"email\" => $_POST['email']);\n $from = Array(\"name\" => APP_NAME, \"email\" => APP_EMAIL);\n $subject = \"Password reset message from \".APP_NAME; \n \n $body = \"This is the password: \".$password ;\n # Send email\n $sent = Email::send($to, $from, $subject, $body, FALSE, '');\n # IF EMAIL IS SENT and password update is successful proceed to login \n if($sent AND $success)\n Router::redirect('/users/login');\n # else error out, either send email failed or couldnt update database \n else\n Router::redirect('/users/emailpassword/error2');\n }\n } # end of first else \n }", "function emailResetPasswordLink(){\r\n\t\tif(empty($_POST['Uemail'])){\r\n\t\t\t$this->HandleError(\"Email is empty!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$user_rec = array();\r\n\t\t\r\n\t\tif(false === $this->getUserFromEmail($_POST['Uemail'], $user_rec)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(false === $this->sendResetPasswordLink($user_rec)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function emailPassword() {\n $email = htmlspecialchars(trim($_POST['email']), ENT_QUOTES);\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT email, password\n FROM user\n WHERE email = '$email' AND\n active = 1\");\n\n if (mysql_num_rows($result) >= 1) {\n $row = mysql_fetch_object($result);\n \n $message = \"Hello $row->email,\\n\\nYour \" . COMPANY . \" password is:\\n\\n$row->password\\n\\nTo login, please click the link below:\\n\\n\" . HOME . \"login.php\\n\\nThank you,\\n\" . COMPANY . \" support staff - \" . date('m/d/Y');\n \n mail($row->email, COMPANY . ' password', $message, 'From: ' . EMAIL);\n\n header('Location: ' . HOME . 'login.php?feedback=5');\n } else {\n header('Location: ' . HOME . 'forgot.php?feedback=6');\n }\n}", "public function askEmail()\n {\n $this->ask('What is your email?', function (Answer $answer) {\n $this->user->email = $answer->getText();\n\n $user = User::where('email', $this->user->email)->first();\n\n if (isset($user)) {\n $this->repeat('Sorry this email is already in use. Please enter a valid email.');\n } else {\n $this->askPassword();\n }\n });\n }", "function sendPassword($pass)\n {\n\n /* Send an e-mail to the user saying that the password has been changed. */\n\n $header = \"From: \" . SENDER_FULL . \"\\r\\n\";\n // $header .= \"To: <\" . $this->email . \">\\r\\n\";\n $header .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\n $header .= \"Errors-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"Reply-To: \" . ADMIN_FULL . \"\\r\\n\";\n $header .= \"X-Mailer: PHP\";\n\n $userLogin = SessionDataBean::getUserLogin();\n $userName = SessionDataBean::getUserFullName();\n\n $message = \"Uživatel '\" . $userLogin . \"' (\" . $userName . \") změnil vaše heslo\\r\\n\";\n $message .= \"pro přihlašování na stránky předmětů vyučovaných K611.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Vaše uživatelské jméno: \" . $this->login . \"\\r\\n\";\n $message .= \"Vaše nové heslo zní: \" . $pass . \"\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Pokud máte konto na FD v Praze a v KOSu e-mail ve tvaru <x#####@fd.cvut.cz>,\\r\\n\";\n $message .= \"mohlo by fungovat i vaše primární heslo (to, kterým se přihlašujete na fakultní síť).\\r\\n\";\n $message .= \"Pokud ne, zkuste heslo uvedené výše.\\r\\n\";\n $message .= \"Přihlašování přes SSU bohužel stále ještě není možné.\\r\\n\";\n $message .= \"\\r\\n\";\n $message .= \"Stránky předmětů naleznete na URL\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/msap/ (11MSAP)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/ma/ (11MA prezenční)\\r\\n\";\n $message .= \"\\thttp://zolotarev.fd.cvut.cz/mak/ (11MA pro kombinovanou formu)\\r\\n\";\n $message .= \"\\r\\n\";\n\n /* Now send the notification to the student ... */\n if (SEND_MAIL)\n {\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Nové heslo pro přístup') . \"?=\";\n mail($this->email, $subject, $message, $header);\n }\n\n /* ... and send a copy to the administrator. */\n $subject = \"=?utf-8?B?\" . base64_encode('[K611LW] Student <' . $this->email . '> - nové heslo pro přístup') . \"?=\";\n mail(ADMIN_EMAIL, $subject, $message, $header);\n }", "public function sendConfirmationEmail($input)\n {\n try\n {\n # set up PHPMailer Library\n $mail = new \\PHPMailer(true);\n\n # variables\n $title = \"Your Passcode for login\";\n\n\n # set the PHPMailer properties\n $mail->isSMTP();\n $mail->CharSet = \"utf-8\";\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'tls';\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = '587';\n $mail->Username = '[email protected]';\n $mail->Password = '0288541828';\n $mail->Subject = \"ABC Pathology Lab : PASSCODE \";\n $mail->From = \"[email protected]\";\n $mail->FromName = \"ABC Pathology lab\";\n\n\n $mail->MsgHTML(\n 'PASSCODE : '.$input->password\n );\n\n $mail->addAddress(\n $input->email, 'test'\n );\n\n # send email\n return $mail->send();\n }\n catch (phpmailerException $e)\n {\n return false;\n }\n catch (Exception $e)\n {\n return false;\n }\n }", "private function sendEmailToTheUser($email) {\n $query_string = \"select * from users where email = '\" . $email . \"'\";\n $res = mysql_query($query_string);\n $rows = mysql_fetch_array($res);\n $to = $email;\n $subject = 'Forgot Password';\n $from = '[email protected]';\n $message = '';\n $message.='<table width=\"400\" border=\"0\" style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;\">';\n $message.='<tr>';\n $message.= '<td colspan=\"2\">Your login details are listed below. Please keep it for future reference:</td>';\n $message.='</tr>';\n $message.='<tr>';\n $message.= '<td width=\"110\"><strong>Username</strong></td>';\n $message.= '<td width=\"280\">' . $rows[\"email\"] . '</td>';\n $message.= '</tr>';\n\n $message.= '<tr>';\n\n $message.= '<td><strong>Password</strong></td>';\n\n $message.= '<td>' . $rows[\"password\"] . '</td>';\n\n $message.= '</tr>';\n\n $message.= '</table>';\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n $headers .= 'From:' . $from . \"\\r\\n\";\n $mail = mail($to, $subject, $message, $headers);\n return $mail;\n }", "function confirm($username) {\r\n $user = $this->userRepository->findByUser($username);\r\n //send user reset mail\r\n $to = $user->getEmail();\r\n $subject = \"Health Forum: Password reset\";\r\n $temp_pass = $this->createRandomPass();\r\n $msg = wordwrap(\"Hi there,\\nThis email was sent using PHP's mail function.\\nYour new password is: \".$temp_pass);\r\n $from = \"From: [email protected]\";\r\n $mail = mail($to, $subject, $msg, $from);\r\n\r\n if ($mail) {\r\n $this->app->flash('success', 'Thank you! The password was sent to your email');\r\n } else {\r\n $this->app->flash('failed', 'Error: your email was not sent!');\r\n }\r\n\r\n $this->app->redirect('/login');\r\n }", "public function resetPasswordSendEmail()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $studentEmail = SCMUtility::stripTags($_POST['forgot_password_email']);\n\n // create token\n $token = uniqid('',true);\n\n // start session reset password\n $this->resetPasswordSessionActivate($token);\n\n // get student\n $student = User::where('email',$studentEmail)->first();\n\n if( ! $student )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // send password reset link to email\n $studentMailerService = new StudentMailerService();\n $studentMailerService->sendResetPasswordLink($student->email,$token,$student->id);\n\n SCMUtility::setFlashMessage('A reset password link has been sent to your email. Open your email and follow the link to reset your account password. Please do not close this browser during the process. (If you are not receiving a password reset email, consider contacting me directly.)');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "function sendEmail($newPassword){\n\t\tglobal $recoverPasswordInputs;\n\t $mail = new PHPMailer(); // create a new object\n\t $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = mess\n\t $mail->IsSMTP(); // enable SMTPages only\n\t $mail->SMTPAuth = true; // authentication enabled\n\t $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail\n\t $mail->Host = \"smtp.gmail.com\";\n\t $mail->Port = 465; // or 587\n\t $mail->IsHTML(true);\n\t $mail->Username = \"[email protected]\";//set the gmail into the here2help gmail\n\t $mail->Password = \"helpyhelp2\";//set the password to make a direct sign in\n\t $mail->SetFrom(\"[email protected]\");\n\t $mail->Subject = \"Recover Password - here2help\";\n\t $mail->Body = \"Hi \". $recoverPasswordInputs['fname'].\" \". $recoverPasswordInputs['lname'].\",<br><br> This is your temporary password: <b>\".$newPassword.\"</b> <br><br> To change your password, please login to here2help.com and access your manage account page. <br><br>Cheers, <br><br> The here2help team <br><br>website: here2help.com <br> email: [email protected] <br> phone: 3333 3333\";\n\t $mail->AddAddress( $recoverPasswordInputs['email']);\n\t $mail->Send();\n\t}", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function notify() \n {\n $user = User::find()->where(['username' => $this->username])->one();\n if (!$user) {\n return false;\n }\n \n if ($this->isPhone()) {\n // Notify by SMS\n if (!$this->password) {\n return false;\n }\n Yii::$app->sms->send($user->username, 'Your password is: ' . $this->password);\n } else {\n // Notify by email\n $user->generateVerificationToken();\n if ($user->save()) {\n $mail = Yii::$app->mailer->compose('notify', ['model' => $user])\n ->setFrom('[email protected]')\n ->setTo($user->username)\n ->setSubject('Complete Your Registration')\n ->send();\n }\n }\n \n return true;\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= config_item('company_name');\n\t\t\t\t\t$data['activation_period'] = config_item('email_activation_expire') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\t\t\t\t\t$this->session->set_flashdata('message', sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\t\t\t\t\t\tredirect('/auth/login');\n\t\t\t\t\t//$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t$this->load->module('layouts');\n\t$this->load->library('template');\n\t$this->template->title('Send Password - '.config_item('company_name'));\n\t$this->template\n\t->set_layout('login')\n\t->build('auth/send_again_form',isset($data) ? $data : NULL);\n\t\t}\n\t}", "public function passwordEmail($user)\r\n {\r\n\t\t// Mail args\r\n\t\t$args = ['user' => $user];\r\n\t\treturn $this->sendEmail('passwordResetToken', 'password', $user->email, $args);\r\n }", "function SendUserConfirmationEmail()\r\n{\r\n $mailer = new PHPMailer();\r\n $mailer->CharSet = 'utf-8';\r\n $mailer->AddAddress($_POST['email'],$_POST['name']);\r\n $mailer->Subject = \"Your registration with YOURSITE.COM\"; //example subject\r\n $mailer->From = \"[email protected]\";\r\n $mailer->Body =\"Hello $_POST[name], \\r\\n\\r\\n\".\r\n \"Thanks for your registration with YOURSITE.COM \\r\\n\".\r\n \"\\r\\n\".\r\n \"Regards,\\r\\n\".\r\n \"Webmaster\\r\\n\";\r\n\t\r\n if(!$mailer->Send())\r\n {\r\n $this->HandleError(\"Failed sending registration confirmation email.\");\r\n return false;\r\n }\r\n return true;\r\n}", "public function dispatchEmailIfUserAuth($user)\n\t{\n\t\t$code_verification = rand(1000, 9999);\n\t\tSession::set('code_verification', $code_verification);\n\n\t\t$mail = new PHPMailer();\n\t\t$mail->IsSMTP();\n\t\t$mail->Mailer = 'smtp';\n\n\t\t$mail->SMTPDebug = 1; \n\t\t$mail->SMTPAuth = TRUE;\n\t\t$mail->SMTPSecure = \"tls\";\n\t\t$mail->Port = 587;\n\t\t$mail->Host = 'smtp.gmail.com';\n\t\t$mail->Username = GMAIL_ADDRESS;\n\t\t$mail->Password = GMAIL_PASSWORD;\n\n\t\t$mail->IsHTML(true);\n\t\t$mail->AddAddress($user->email);\n\t\t$mail->SetFrom(GMAIL_ADDRESS, 'PHP-developer');\n\n\t\t$mail->Subject = 'Confirm your registration with a code.';\n\t\t$content = '<b>Secret code: <h1>' . $code_verification . '</h1></b>';\n\n\t\t$mail->MsgHTML($content); \n\t\tif(!$mail->Send()) {\n\t\t // error\n\t\t Session::set('email_sended_failed', 'Email was not send to you. Try again.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t} else {\n\t\t // success\n\t\t\tSession::set('email_sended_success', 'Email was send. Check your email box.');\n\t\t\treturn header(\"Location: /confirm_email\");\n\t\t}\n\t}", "function verifyEmail($action = ''){\n\t\t//$url = ROOT_URI_UI.'validUser.php?k='.$this->secretKey($this->username).'&e='.$this->username;\n\n\t\t$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?k='.$this->secretKey($this->username).'&e='.$this->username;\n\t\t\n\t\tif('recover' == $action){\n\t\t\t$msg = DICO_WORD_PASSWORD_RESTORE;\n\t\t}else{\n\t\t\t$msg = DICO_WORD_CONFIRM_EMAIL;\n\t\t}\n\t\t\n\t\t$body_message = DICO_MAIL_VALID_HEAD.'<br>'\n\t\t\t\t\t\t.'<a href=\"'.$url.'\">'.$msg.'</a><br><br>'\n\t\t\t\t\t\t.$url.'<br>'\n\t\t\t\t\t\t.DICO_MAIL_VALID_FOOT;\n\n\t\t\n\t\treturn send_mail(ROOT_EMAIL, $this->username, '', ROOT_EMAIL_NAME.' '.DICO_WORD_AUTH,$body_message);\n\t}", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "function textAndEmailUserPassword($mysqli, $userId, $plainTextPassword) {\n\t// email\n\t$email_to = getUsersEmail ( $mysqli, $userId );\n\t$email_subject = \"Your Password\";\n\t$email_message = \"Password: $plainTextPassword\";\n\tmail ( $email_to, $email_subject, $email_message );\n\t// text message\n\t$userPhoneNumber = getUsersPhoneNumber ( $mysqli, $userId );\n\t$userCellCarrier = getUserCellCarrier ( $mysqli, $userId );\n\t$text_to = $userPhoneNumber . $userCellCarrier;\n\t$text_subject = \"Your Password\";\n\t$text_message = \"Password: $plainTextPassword\";\n\tmail ( $text_to, $text_subject, $text_message );\n}", "function send_recovery_mail($mail,$message) {\n\t\tif (mail($mail, \"Recovery password from site sitename\", $message, \"From: [email protected]\\r\\n\".\"Reply-To: [email protected]\\r\\n\".\"X-Mailer: PHP/\" . phpversion())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function obtain_password() {\n $this -> load -> helper('send_email');\n $user = $this -> basic -> get_where('users', array('user_email' => $this -> input -> post('email'))) -> row();\n $this -> load -> library('form_validation');\n $this -> form_validation -> set_error_delimiters('<p>', '</p>');\n $this -> form_validation -> set_rules('email', t('email'), \"required|trim|valid_email\");\n if ($this -> form_validation -> run()) {\n if ($user != null) {\n $msg = \"<h1>Recuperación de Contraseña</h1> Sent : \" . date('m-d-Y') . \"<br/><br/>\";\n $msg .= \"Remitente: Cenline\" . \"<br/><br/><br/>\";\n $msg .= \"<i>Usted ha solicitado el servicio de recuperación de contraseña de \n Cenline Site. Sus datos de acceso son: </i> <br/> \n Email: \" . $user -> user_email . \"<br/> Contraseña: \" . $user -> user_password . \" \\</a>\";\n\n $contact_send = array('to' => $user -> user_email, 'subject' => 'Recuperación de Contraseña', 'message' => $msg);\n\n send_email($contact_send);\n } else {\n $response['html'] = t('The email user does not exist');\n $response['error'] = 1;\n echo json_encode($response);\n }\n } else {\n $response['html'] = validation_errors();\n $response['error'] = 1;\n echo json_encode($response);\n }\n }", "function __sendForgotPasswordEmail($id = null) {\n $id = $this->request->getData('user_id');\n if (!empty($id)) {\n $user = $this->Users->get($id);\n $email = new Email();\n $email\n ->template('reset_password_request', 'default')\n ->subject('OTP Code Request - DO NOT REPLY')\n ->emailFormat('html')\n ->setViewVars(['user' => $user,\n 'password' => $password])\n ->from('[email protected]')\n ->to($user->email)\n ->send();\n\n return true;\n }\n return false;\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "function sendResetPasswordEmail($email, $password){\n\n $messaggio = \"Usa questa password temporanea\";\n\n $linkLogin = 'https://www.unimolshare.it/login.php';\n $emailTo = \"[email protected]\";\n $subject = \"UnimolShare - Conferma registrazione\";\n $message = '<html><body><h1>UnimolShare</h1><div>';\n $message .= $messaggio.':<br/><br/><b>'.$password.'</div><br/><div>Vai su '.$linkLogin.' per entrare.</div></body></html>';\n $headers = \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n try {\n mail($emailTo, $subject, $message, $headers);\n return true;\n } catch (Exception $e){\n return false;\n }\n\n }", "public function forgot_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['username'])){\n $email = $_POST['username'];\n $user = $this->User->getByEmail($email);\n $pass = rand(111111, 999999);\n if($this->User->setPassword($user['id'], $pass)) {\n $text = <<<END\nBecause of a request on our site, your password has been reset. To change your password, go to /users/change_password\nYour username is: {$email}\nYour password is: {$pass}\nEND;\n $email = self::getLib('email');\n $html = $email->text2html($text, email);\n $email->setSender('support');\n $email->setReplyTo('support');\n $email->setRecipients( array($recipient) );\n $email->setSubject(\"Your password has been reset\");\n $email->addMessagePart($text);\n $email->addMessagePart($html, \"html\");\n $email->send();\n $flash = \"An email with your new password has been sent to you. You should receive it shortly.\";\n } else {\n $flash = \"An error occured.\";\n }\n } else {\n $flash = \"Please enter a user name.\";\n }\n return array('flash' => $flash);\n }", "function sendPassword() {\n\n $results = array();\n $results['errorReturnAction'] = \"sendPassword\";\n\n if ( isset( $_POST['sendPassword'] ) ) {\n\n // User has posted the form: attempt to send them a new password:\n\n $emailAddress = isset( $_POST['emailAddress'] ) ? $_POST['emailAddress'] : \"\";\n\n // Do some checks\n\n if ( !$emailAddress ) {\n $results['errorMessage'] = \"Please enter your email address.\";\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n return;\n }\n\n if ( !$user = User::getByEmailAddress( $emailAddress ) ) {\n require( TEMPLATE_PATH . \"/sendPasswordNotFound.php\" );\n return;\n }\n\n // Generate and send the password\n $user->generatePassword();\n $user->encryptPassword();\n $user->update();\n $user->sendPassword();\n require( TEMPLATE_PATH . \"/sendPasswordSuccess.php\" );\n\n } else {\n\n // User has not posted the form yet: display the form\n require( TEMPLATE_PATH . \"/sendPasswordForm.php\" );\n }\n}", "function sending_forgot_password_email($data, &$content) {\n\t\t// Create content\n\t\t$content = sprintf($this->ci->lang->line('auth_forgot_password_content'), \n\t\t\t$this->ci->config->item('DX_website_name'), \n\t\t\t$data['reset_password_uri'],\n\t\t\t$data['password'],\n\t\t\t$data['key'],\n\t\t\t$this->ci->config->item('DX_webmaster_email'),\n\t\t\t$this->ci->config->item('DX_website_name'));\n\t}", "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}", "public function forgotPwd() {\n\t\tif (isset($_POST['email'])){\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$query=\"select * from users where email='$email'\";\n\t\t\t\t$result = mysqli_query($this->connrps,$query);\n\t\t\t\t$count=mysqli_num_rows($result);\n\t\t\t\t// If the count is equal to one, we will send message other wise display an error message.\n\t\t\t\tif($count==1){\n\t\t\t\t\t$rows=mysqli_fetch_array($result);\n\t\t\t\t\t$pass = base64_decode($rows['password']);\n\t\t\t\t\t$to = $rows['email'];\n\t\t\t\t\t$url = $_SERVER['HTTP_HOST'];\n\t\t\t\t\t$body = \"\n\t\t\t\t\tWebsite Url : $url <br/>\n\t\t\t\t\tYour Email Id : $to <br/>\n\t\t\t\t\tHere is your password : $pass <br/><br/><br/><br/>\n\t\t\t\t\tSincerely,<br/>\n\t\t\t\t\tBARNA\";\n\t\t\t\t\t$from = \"[email protected]\";\n\t\t\t\t\t$subject = \"Your password has been recovered\";\n\t\t\t\t\t$headers1 = 'From: Password Recovered <$from>' . \"\\r\\n\";\n\t\t\t\t\t$headers1 .= \"Content-type: text/html;charset=iso-8859-1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Priority: 1\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-MSMail-Priority: High\\r\\n\";\n\t\t\t\t\t$headers1 .= \"X-Mailer: Password Recovered\\r\\n\";\n\t\t\t\t\t$sentmail = mail ( $to, $subject, $body, $headers1 );\n\t\t\t\t\t//If the message is sent successfully, display sucess message otherwise display an error message.\n\t\t\t\t\tif($sentmail==1){\n\t\t\t\t\t\t$message= \"Your password has been sent to your email address.\";\n\t\t\t\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($_POST['email']!=\"\"){\n\t\t\t\t\t\t\t$message= \"Cannot send password to your e-mail address.Problem with sending mail...\";\n\t\t\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tif ($_POST ['email'] != \"\") {\n\t\t\t\t\t$message= \"Email does not exist.\";\n\t\t\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n }", "public function usermail() {\n\n $mail = $_POST['mail'];\n\n $dmn = substr($mail, strpos($mail, '@') + 1);\n\n $fmt = filter_var($mail, FILTER_VALIDATE_EMAIL);\n\n return checkdnsrr($dmn) && $fmt;\n\n }", "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 }", "function userForgotPassword($userData)\n\t\t{\n\t\t\tif(isset($userData['email']) && !empty($userData['email']))\n\t\t\t{\n\t\t\t\t//get values from email id\n\t\t\t\t$user = $this->manageContent->getValue_where('user_credentials','*','email_id',$userData['email']);\n\t\t\t\tif(!empty($user[0]))\n\t\t\t\t{\n\t\t\t\t\t//set password\n\t\t\t\t\t$password = uniqid();\n\t\t\t\t\t//update the password\n\t\t\t\t\t$update_pass = $this->manageContent->updateValueWhere('user_credentials','password',md5($password),'email_id',$userData['email']);\n\t\t\t\t\t//mail to user\n\t\t\t\t\t$mailsent = $this->mailSent->forgotPasswordMail($user[0]['email_id'], $user[0]['username'], $password);\n\t\t\t\t\tif($mailsent == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION['success'] = 'Password is sent to your mail';\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$_SESSION['warning'] = 'Mail sending unsuccessfull';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['warning'] = 'Invalid EmailId';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function passwordEmail()\n {\n $this->validateAjax(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if ($user = Students::where('email', request()->input('email'))->first()) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'student.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['message' => trans('auth.failed')], 422);\n }\n }", "public function askingForPassword($message = \"Start\")\n {\n $this->comment(\"--------==/*$message*\\==--------\");\n $details[\"email\"] = \"[email protected]\";\n $this->info(\"Email:- \".$details[\"email\"]);\n $details[\"password\"] = $this->ask(\"Password\");\n if (config(\"system.developer.email\") == $details[\"email\"] && $details[\"password\"] == config(\"system.developer.password\")) {\n $this->comment(\"Asked for Password\");\n $this->comment(\"--------==/*Make Your Chocie*\\==--------\");\n return;\n }\n $this->error(\"----CommandTrait.askingForPassword Password is Wrong----\");\n $this->comment(\"--------==/**\\==--------\");\n $this->askingForPassword($message);\n }", "public function forgotpassword() {\n\n\t\t$login_box_visiblity = '';\n\t\t$forgot_box_visiblity = 'visible';\n\n\t\t$this->JQValidator->addValidation('User', $this->User->validate, 'UserLoginForm');\n\t\t$this->JQValidator->addValidation('ForgotPasswordForm', $this->ForgotPasswordForm->validate, 'ForgotPasswordForm');\n\n\t\t$this->set(compact('login_box_visiblity', 'forgot_box_visiblity'));\n\n\t\tif (array_key_exists('ForgotPasswordForm', $this->data)) {\n\t\t\t$flag = $this->ForgotPassword->sendMail($this->data['ForgotPasswordForm'], 'admin');\n\n\t\t\tif ($flag) {\n\t\t\t\t$this->redirect('login');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->login();\n\t\t}\n\t}", "public function doSmtpAuthCheck($ePassword)\n {\n // Create the Transport\n try\n {\n $password = base64_decode($ePassword);\n\n $mailer = Utils::buildSmtpMailer($this->user,$password);\n\n // try to auth the SMTP server\n $mailer->getTransport()->start();\n\n }\n catch(\\Swift_TransportException $e)\n {\n // return 'not_authed';\n return $e;\n }\n\n return 'authed'; \n }", "private function send_new_password_email( $email, $new_password ){\n\t\t\n\t\t$user = $this->mysqli->get_user( $email, md5( $new_password ) );\n\t\t\n\t\t$email_logo_url = get_option( 'ec_option_email_logo' );\n\t \t\n\t\t// Get receipt\n\t\tob_start();\n if( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' ) )\t\n\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' );\t\n\t\telse\n\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_retrieve_password_email.php' );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\t$headers = array();\n\t\t$headers[] = \"MIME-Version: 1.0\";\n\t\t$headers[] = \"Content-Type: text/html; charset=utf-8\";\n\t\t$headers[] = \"From: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"Reply-To: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"X-Mailer: PHP/\".phpversion();\n\t\t\n\t\t$email_send_method = get_option( 'ec_option_use_wp_mail' );\n\t\t$email_send_method = apply_filters( 'wpeasycart_email_method', $email_send_method );\n\t\t\n\t\tif( $email_send_method == \"1\" ){\n\t\t\twp_mail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\n\t\t}else if( $email_send_method == \"0\" ){\n\t\t\tmail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\t\n\t\t}else{\n\t\t\tdo_action( 'wpeasycart_custom_forgot_password_email', get_option( 'ec_option_password_from_email' ), $email, \"\", $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message );\n\t\t\t\n\t\t}\n\t\t\n\t}", "private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }", "function sendSignupEmail($user_id, $password){\n define('EMAIL_SUBJECT', 'MW Resource Checkout');\n $from = \"[email protected]\";\n $headers = \"From: $from\\r\\n\";\n $headers .= \"Content-type: text/html\\r\\n\";\n mail(getUserEmail($user_id), EMAIL_SUBJECT, genSignupEmail(getUsername($user_id), $password), $headers);\n}", "public function forgetpass($data){\n\n\n \t\t$q = \"SELECT * FROM user_table WHERE email='$data[email]'\";\n\n\n \t\t$result = $this->connection->query($q);\n\n \t\tif($result->num_rows>0){\n\n \t\t\t/* to access the email and password from database */\n\n \t\t\t$r = $result->fetch_assoc();\n\t\t\t\t$password = $r['password'];\n\t\t\t\t$to = $r['email'];\n\t\t\t\t$subject = \"Your Recovered Password\";\n\n\t\t\t\t$message = \"Please use this password to login \" . $password;\n\t\t\t\t$headers = \"From : [email protected]\";\n\n\t\t\t\tif(mail($to, $subject, $message, $headers)){\n\n \t\t\t$_SESSION['sent'] = \"Password sent to email\";\n\n \t\t}\n \t}\n \t\telse{\n\n \t\t\t$_SESSION['sent_err'] = \"Email does not exist\";\n \t\t}\n\n \n }", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t\tdisplay('forgot_password', $data);\n\t\t}\n\t}", "function sendPasswordChangeEmail($email, $name, $accountName)\n{\n $subject = \"Contest registration system password changed.\";\n $mailContent = $name . \": \\n\";\n $mailContent .= \"The contest registration system has processed a password\" .\n \" change request for your account, \" . $accountName . \".\\n\";\n $mailContent .= \"\\nIf you did not change your password please write to the member administrator:\\n\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=\" . urlencode(\"password compromised\") . \"\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $fromAddress = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $fromAddress);\n}", "public function an_otp_mail_is_send_when_user_is_logged_in()\n {\n Mail::fake();\n\n $this->withExceptionHandling();\n $user = factory(User::class)->create();\n $res= $this->post('/login',['email' => $user->email,'password'=>'secret']);\n Mail::assertSent(OTPMail::class);\n\n //$res->assertRedirect('/');\n\n }", "public function sendResetConfirmationEmail($password)\n {\n $url = url(route('login'));\n Mail::to($this)->queue(new ResetPasswordConfirmationEmail($url,$password));\n return true;\n }", "public static function email_password_renew() {\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n if ($u->emailPasswordRenew())\n flash('Email com as instruções para Renovação de senha enviado para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function recoverPassword() {\n try {\n /* Check if for the empty or null email parameters */\n if (isset($_POST[\"email\"])) {\n // Get the email parameters from POST request\n $form_data = array(\n ':email' => $_POST[\"email\"]\n );\n // Create a SQL query to check if exist this user with email\n $query = \"\n select *\n from tb_user \n where email = :email\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameters email\n $statement->execute($form_data);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a User object\n $user = new User($row);\n $username = $user->getUsername();\n $password = $user->getPassword();\n // Send creadentials by email passed\n require_once('classes/phpmailer/class.phpmailer.php');\n // include(\"phpmailer/class.smtp.php\"); // optional, gets called from within class.phpmailer.php if not already loaded\n $mail = new PHPMailer();\n $mail->CharSet = 'UTF-8';\n $mail->IsSMTP(); // telling the class to use SMTP\n $mail->Host = \"mail.ybytesi.com\"; // SMTP server\n $mail->SMTPDebug = 1; // enables SMTP debug information (for testing)\n // 1 = errors and messages\n // 2 = messages only\n $mail->SMTPAuth = true; // enable SMTP authentication\n $mail->Host = \"mail.ybytesi.com\"; // sets the SMTP server\n $mail->Port = 26; // set the SMTP port for the GMAIL server\n $mail->Username = \"[email protected]\"; // SMTP account username\n $mail->Password = \"Su9rt3*2018$\"; // SMTP account password\n\n $mail->SetFrom('[email protected]', 'SMS System');\n\n $mail->AddReplyTo($email, $username);\n\n $mail->Subject = \"Password sending\";\n\n $body = \"<html><head></head><body><p>Ol&aacute; $username,</p><p>Enviamos-lhe a sua palavra-passe, <b>$password</b>.</p><br/><br/><p>Atentamente,</p><p>Webmaster inic.gov.st</p></body></html>\";\n \n $mail->AddEmbeddedImage(\"../img/logo.png\", \"my-attach\", \"../img/logo.png\");\n $body = $body.'<img alt=\"Logo\" src=\"cid:my-attach\" />';\n \n $mail->MsgHTML($body);\n\n $address = $email;\n $mail->AddAddress($address, $username);\n $resp = $mail->Send();\n // data[] is a associative array that return json\n if (!$resp) {\n $data[] = array('result' => '0');\n } else {\n $data[] = array('result' => '1');\n }\n } else {\n $data[] = array('result' => 'Email not found!');\n }\n } else {\n // Check for missing parameters in POST data\n $data[] = array('result' => 'Missing email parameter !!');\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "public function send_activation($email_or_username){\n\t\t$activation_key = $this->get_activation_key($email_or_username);\n\t\t$sql = \"select * from admin where email='$email_or_username' or username='$email_or_username'\";\n\t\tif ($this->num_rows($sql) == 0){\n\t\t\techo \"Username atau email yang anda masukan tidak terdaftar sebagai member di situs ini!.\";\n\t\t\texit();\n\t\t}\n\t\t$data = $this->fetchfetch($sql);\n\t\t$id = $data['id'];\n\t\t$name = $data['name'];\n\t\t$email = $data['email'];\n\t\t$today = date(\"Y-m-d\");\n\t\t$time = date(\"H:i:s\");\n\t\t$activation_link = APP_URL.$system.\"/forgot.php?act=recover&email=$email&activation=$activation_key\";\n\t\t$c_url = APP_URL;\n\t\t$c_admin_url = \"$c_url/$system\";\n\t\t$messages = \"\n\t\tyou has send a request for reset your password at <a target='_blank' href='$c_url'>$c_url</a> with detail<br>\n\t\tEmail : $email<br>\n\t\tUsername : $name<br>\n\t\tDate : $today - $time<br>\n\t\t<p>\n\t\tand if you really has send a request for reset your password at $c_url, so you can use this activation code for reset your password :\n\t\t<br>\n\t\t<b>Activation Code</b> : <i>$activation_key</i>\n\t\t</p>\n\t\tif you didn't request this action, so ignore this message or delete this message.\n\t\t\";\n\t\t$send = $this->send_email($email, \"Activation Link For Reset Your Password at $c_url\", $messages);\n\t\tif ($send == true){\n\t\t\treturn \"$email\";\n\t\t\texit();\n\t\t}else{\n\t\t\techo \"Failed! can't send email to $email\";\n\t\t}\n\t}", "function forgot_password_mail($username, $fr_email, $password){\n// headers here \n$Name = \"Campusfamz.com\";\n$email=\"[email protected]\"; // Change this address within quotes to your address\n$headers = \"From: \". $Name . \"<\" . $email . \">\";\n$headers = \"Content-Type: text/html; charset=iso-8859-1\\n\".$headers;\n// for html mail un-comment the above line\n\n// mail funciton will return true if it is successful\nif(mail($fr_email,\"Password Reminder\",\n\"<!DOCTYPE html PUBLIC '-//WAPFORUM//DTD XHTML Mobile 1.0//EN' 'http://www.wapforum.org/DTD/xhtml-mobile10.dtd'>\n<html xmlns='http://www.w3.org/1999/xhtml'>\n<head>\n<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n<title>CampusFamz.com</title>\n<meta name='HandheldFriendly' content='True' />\n</head>\n<style type='text/css'>\nbody {\n\twidth: 99%;\n\tfont-family: 'lucida grande',tahoma,verdana,arial,sans-serif;\n}\n.sitename {\n\tcolor: white;\n\tfont-family: 'lucida grande',tahoma,verdana,arial,sans-serif;\n\ttext-align: center;\n\tbackground-color:#005CB9;padding:5px;\n\tfont-weight:bold;\n\tfont-size:25px;\n}\n.content{\n\tfont-size:14px;\n\tpadding-top:5px; padding-bottom:5px;\n\tpadding-left: 20px;\n\tborder: ridge;\n\tborder-width:thin;\n\tborder-color:#666;\n}\ninput[type=button] {\n\tbackground-color:#005CB9;padding:3px;\n\tcolor:white;\n}\n</style>\n<body>\n<div class='sitename'>Campusfamz</div>\n<div class='content'>\n<p><b>Hi $username, <br />\n\n<h2> Here are your login credentials</h2><br><br>\nUsername : $fr_email<br>\nPassword : $password<br><br>\n\n<a href='http://www.campusfamz.com'><input type='button' value='Login now' /></a>\n\n\n</html>\",\"$headers\"));\n }", "public function sendForgotPasswordCode($user_email)\n {\n $forgot_password_code = $this->generateForgotPasswordCode($user_email);\n $subject = 'Request for changing password on SP Bookmarks.';\n $body = \"<p>You have sent a request to change the password. The code of this email copy in the appropriate field on the page to change your password.</p>\n <p>Code for changing password: {$forgot_password_code}</p>\";\n if (USE_SMTP) {\n $email = new SmtpEmail($user_email, $subject, $body);\n } else {\n $email = new Sendmail($user_email, $subject, $body);\n }\n if ($email->sendMessage()) {\n return true;\n } else {\n return false;\n }\n }", "public static function sendPasswordResetMail($user_name, $user_password_reset_hash, $user_email) {\n\t\t// create email body\n\t\t$url = self::config('app.baseurl') . '/' . self::config('auth.routes.pwdreset') . '/' . urlencode($user_password_reset_hash) . \"?user_name=\" . urlencode(Encryption::encrypt($user_name));\n\t\t$subject = self::config('email.pwdreset.subject');\n\t\t$body = self::config('email.pwdreset.content') . ' <a href=\"'.$url.'\">'.$url.'</a>';\n\t\t$mail = new EmailSender();\n\t\t$mail->setTo($user_email);\n\t\t$mail->setSubject($subject);\n\t\t$mail->setBodyHtml($body);\n\t\t$mail_sent = $mail->go(true);\n\t\t\n\t\tif ($mail_sent) {\n\t\t\tSession::add(Session::SESSION_FEEDBACK_POSITIVE, Text::get('FEEDBACK_PASSWORD_RESET_MAIL_SENDING_SUCCESSFUL'));\n\t\t\treturn true;\n\t\t}\n\t\tSession::add(Session::SESSION_FEEDBACK_NEGATIVE, Text::get('FEEDBACK_PASSWORD_RESET_MAIL_SENDING_ERROR'));\n\t\treturn false;\n\t}", "private static function passwordMail($mail,$password) {\n $header = 'From: ' . Config::get('mail','sender') . \"\\r\\n\" .\n 'Reply-To: ' . Config::get('mail','sender') . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n mail(\n $mail,\n Config::get('mail','password','subject'),\n sprintf(Config::get('mail','password','text'),$password),\n $header\n );\n }", "public function an_otp_mail_is_not_send_if_credentials_are_incorrect()\n {\n Mail::fake();\n //$this->withExceptionHandling();\n $user = factory(User::class)->create();\n $res= $this->post('/login',['email' => $user->email,'password'=>'wshhhdhhdhdhd']);\n Mail::assertNotSent(OTPMail::class);\n\n //$res->assertRedirect('/');\n\n }", "public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }", "public function validateForgotPassword($input){\n $userData = array();\n $error=array();\n\n\n if(empty($input['email'])){\n $error = array_merge($error,array('email' => 'This field is required.'));\n }\n else{\n $cleanData = $this->cleanInput($input['email']);\n require_once('../app/Core/Database.php');\n $db = new Database();\n $conn = $db->setConnection();\n if($conn !== null){\n $stmt = $conn->query(\"SELECT username,email FROM user where email='\".$cleanData.\"'\");\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $username = $row['username'];\n $newPassword = uniqid();\n require '../app/vendor/autoload.php';\n $mail = new PHPMailer(true);\n try{\n $mail->isSMTP();// set mailer to use smtp\n $mail->Host = 'smtp.gmail.com'; //specify the smtp server\n $mail->SMTPAuth = true; // enable smtp authenticatiion\n $mail->Username = \"[email protected]\"; // SMTP username\n $mail->Password = \"hello@there123HT\"; // SMTP pasword\n $mail->SMTPSecure = \"tls\"; // Enable TLS encryption\n $mail->Port = 587; // TCP port to connect to\n\n // recipient\n $mail->setFrom(\"[email protected]\",\"Seralance\");\n $mail->addAddress($row['email'],$row['email']);\n \n //content\n $mail->isHTML(true); // set email format to html\n $mail->Subject = \"Forgotten password\";\n $msg =<<<EOT\n <html>\n <body>\n <div style=\"text-align: center;\">\n <img src=\"{$_SESSION['baseurl']}public/assets/images/seralance-logo.png\" alt=\"Seralance\">\n </div>\n \n <p style=\"text-align: center;\">\n Your username is {$username}.\n </p>\n <p style=\"text-align: center;\">\n Your newly generated password is {$newPassword}.\n </p>\n </body>\n </html>\n EOT;\n\n $mail->Body =$msg;\n\n $mail->send();\n $this->updatePassword(array('email'=>$row['email'],'newpassword'=>$newPassword));\n\n }\n catch(Exception $e){\n $error = array_merge($error,array('email' => 'Sorry for the inconvenience! We could not send a new password. Please try again later.'));\n } \n }\n else{\n $error = array_merge($error,array('email' => 'Email does not exist.'));\n } \n } \n }\n \n if(empty($error)){\n return array('valid'=>1 ,'data'=>$userData);\n }\n else{\n return array('valid'=>0,'error'=>$error);\n }\n\n \n }", "private function _sendUsernameRecoveryEmail() {\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_email)) return;\n\t\ttry {\n\t\t\t$email = new Email();\n\t\t\t$email->setTemplate('USERNAME_RECOVERY');\n\t\t\t$email->addVariable('{USERNAME}', $this->_username);\n\t\t\t$email->addAddress($this->_email);\n\t\t\t$email->send();\n\t\t\treturn true;\n\t\t} catch (Exception $ex) {\n\t\t\t# TODO logs system\n\t\t\treturn;\n\t\t}\n\t}", "public function sendMail($mail){\r\n\r\n\r\n\r\n\r\n $mail=str_secure($this->mail);\r\n\r\n $message=\"\r\n\r\n <b>Username: </b> $this->name;\r\n <b>$Password : </b> $this->password;\r\n\r\n \";\r\n\r\n\r\n\r\n\r\n return ($mail!=\"\")?mail($mail, \"Vos Identifiant\", $message):\" Ce mail n'est pas disponible\";\r\n\r\n\r\n\r\n }", "function welcome_send($name,$email,$pwd)\n{\n\t$msg=\"Hello \".$name.\",\\n\\rWelcome to our Derby Club. We are pleased to have you as a member. Now you can place your bets on Derby races from anywhere in the world!\\n\\n\\rYour login details are:\\n\\n\\rUsername: \".$email.\"\\n\\rPassword:\".$pwd.\"\\n\\n\\rBest regards,\\n\\rDerby Manager\";\n\tif(mail($email,\"Welcome to the Turf Club\",$msg,\"From: [email protected]\"))\n\techo \"after sent mail call\";\n\telse if (error_get_last())\n var_dump(error_get_last());\n}", "public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "public function sendEmail(PasswordRememberEvent $event)\n {\n $this->renderEmail(\n 'Password remember email',\n $event->getUser()->getEmail(),\n [\n 'user' => $event->getUser(),\n 'rememberUrl' => $event->getRememberUrl(),\n ]\n );\n }", "function send_verification_mail($hash, $user_mail, $username) {\n $Users = new UsersController();\n $admins = $Users->getAdmin();\n $to = array();\n for ($i=0; $i<count($admins); $i++) {\n $to[] = $admins[$i]['email'];\n }\n $content = $this->view->send_verification_mail($hash, $user_mail, $username);\n\n return $this->MailAPI->send_mail($to,$content['subject'],$content['body']);\n }", "public function sendForgetEmail($email)\n\t{\n\t\t$person = Persons::where('email', $email);\n\t\tif($person->count() > 0)\n\t\t{\n\t\t\t$person = $person->first();\n\t\t\t$code = Utility::getCode();\n\t\t\t$link = URL::to('forgot/'.$code);\n\t\t\t$data = array('first_name' => $person->first_name, 'link' => $link, 'email' => $email);\n\n\t\t\tMail::send('emails.forgot', $data, function($message) use ($data){\n\t\t \t\t\t\t$message->to($data['email'], $data['first_name'])\n\t\t \t\t\t\t\t\t->subject('Forgot Password');\n\t\t\t});\n\n\t\t\t// Update code in database\n\t\t\t$person->code = $code;\n\t\t\t$person->update();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function check_email() {\n\n\t\t$email = Input::post('email');\n \n\t\tif(is_string($email)) {\n\t\t\t\n\t\t\t$this->_password_reset->_unlocked_me($email);\n\t\t\t$row = $this->_password_reset->_validate_email($email);\n\t\t\t$res = $this->_password_reset->getData($email);\n\t\t\t$_res = $this->_password_reset->_check_if_reg($email);\n\t\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t\t\tif($row > 0) {\n\t\t\t\tif($_res > 0) {\n\t\t\t\t\tif($res['status'] != 0) {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::EMAIL_CONFIRM, 'question' => $ques['security_question']);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::LOCKED);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$_arr = array('msg' =>Constant::NOT_REGISTERED);\n\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} else {\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\t}", "public function do_forgot_password()\n {\n if( Confide::forgotPassword( Input::get( 'email' ) ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::action('UserController@forgot_password')\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }", "function sendPasswordResetEmail($email)\n{\n $userManager = new UserManager();\n $user_req = $userManager->getUser(\"\", $email);\n \n if ($user = $user_req->fetch())\n {\n $hash = $user['hash'];\n $to = $email;\n $subject = 'Reset your Camagru password';\n $message = '\n \n Hi there! Did you forget how to log in to your Camagru account? :(\n \n Please click this link to reset your password:\n http://localhost:8100/index.php?action=verifyAccountForReset&email='.$email.'&hash='.$hash.'\n \n ';\n \n $headers = 'From:[email protected]' . \"\\r\\n\";\n mail($to, $subject, $message, $headers);\n \n $msg = \"A link to reset your password was sent to your email address!\";\n } else {\n $msg = \"Sorry, there is no registered account for this email address :/\";\n }\n \n require('view/forgotPasswordView.php');\n}", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "function ll_alert_user( $user_login, $user_email, $key ) { \n\n\t\tif ( is_multisite() )\n\t\t\t$blogname = $GLOBALS['current_site']->site_name;\n\t\telse\n\t\t\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n\t\t$message = sprintf( __('ALERT: The admin of %s requires that you reset the password for the following account:','loginlock'), $blogname ). \"\\r\\n\\r\\n\";\n\t\t$message .= network_site_url() . \"\\r\\n\\r\\n\";\n\t\t$message .= sprintf(__('Username: %s','loginlock'), $user_login) . \"\\r\\n\\r\\n\";\n\t\t$message .= __('You must reset your password before you can log back in. To reset your password, visit the following address:','loginlock') . \"\\r\\n\\r\\n\";\n\t\t$message .= '<' . network_site_url(\"wp-login.php?action=rp&key=$key&login=\" . rawurlencode($user_login), 'login') . \">\\r\\n\";\n\n\t\t$title = sprintf( __('[%s] Emergency Password Reset','loginlock'), $blogname );\n\n\t\t$title = apply_filters('retrieve_password_title', $title);\n\t\t$message = apply_filters('retrieve_password_message', $message, $key);\n\n\t\tif ( $message && !wp_mail($user_email, $title, $message) )\n\t\t\treturn __('The e-mail could not be sent to','loginlock'). $user_login . \"<br />\\n\" . __('Possible reason: your host may have disabled the mail() function.','loginlock');\n\n\t}", "function validate_forgotpass_user_email($str){\n\t\t$sql\t=\t\"select * from reseller_store where user_email='$str' \";\n\t\t$tempInfo\t=\t$this->db->query($sql)->row_array();\t\t\n\t\tif(count($tempInfo) == 0){\n\t\t\t$this->form_validation->set_message('validate_forgotpass_user_email', LoginMessages(7));\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n // return \\Yii::$app->mailer->compose('passwordResetToken', ['user' => $user])\n // ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name . ' robot'])\n // ->setTo($this->email)\n // ->setSubject('Password reset for ' . \\Yii::$app->name)\n // ->send();\n\n//http://localhost/eventone/web/site/reset-password?token=c4psNELzGEz9yAAJqjUasMYsDcm8Z4mt_1424623364\n //send email\n $body = \"<p>\nReset or change your password by clicking the link below\n</p>\n<p>\n <a href=\\\"\" . (\\yii\\helpers\\Url::toRoute('site/reset-password', true)) . \"/?token=\" . $user->password_reset_token . \"\\\">Reset my password</a>.\n</p>\n\n<p>\nIf you have not requested for this email on our web site<br />\nand believe that you have received this email eroneously,<br />\nplease report this to \" . (Yii::$app->params['supportEmail']) . \".<br />\n-----------------------------------------------------------<br />\nThis message was sent by \" . (Yii::$app->params['siteName']) . \" which is powered by \" . (Yii::$app->params['companyName']) . \".<br />\n</p>\n \";\n\n mail($this->email, \"Password Reset\", $body); \n }\n }\n\n return false;\n }", "public function ForgotPassword($email)\n {\n $link = base_url(\"admin/redefine-password/{$email['user_uuid']}\");\n\n // PHPMailer object\n $mail = $this->phpmailer_lib->load();\n\n // SMTP configuration\n $mail->isSMTP();\n $mail->SMTPAuth = true;\n $mail->Host = getenv('MAIL_HOST');\n $mail->Username = getenv('MAIL_USER');\n $mail->Password = getenv('MAIL_PASS');\n $mail->Port = intval(getenv('MAIL_PORT'));\n\n $mail->setFrom(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n $mail->addReplyTo(getenv('MAIL_USER'), \"Sistema - \" . getenv('SIS_NAME'));\n\n // Add a recipient\n $mail->addAddress($email['user_email'], $email[\"user_name\"]);\n\n // Email subject\n $mail->Subject = 'Redefinir senha';\n\n // Charset\n $mail->CharSet = 'utf-8';\n\n //Language\n $mail->SetLanguage('pt-Br');\n\n\n // Set email format to HTML\n $mail->isHTML(true);\n\n // Email body content\n $mailContent = \"\n <div style=\\\"margin:0;padding:0;background-color:#f0f0f0;\\\">\n <div style=\\\"background-color:#f0f0f0; padding:5px;\\\">\n <div style=\\\"font-size:10px;line-height:10px\\\">&nbsp;</div>\n <table style=\\\"border-collapse:collapse;table-layout:fixed; margin: 20px auto 0;word-wrap:break-word;word-break:break-word;background-color:#ffffff\\\" align=\\\"center\\\">\n <tbody>\n <tr>\n <td style=\\\"padding:0;text-align:left;vertical-align:top;color:#787778;font-size:14px;line-height:21px;font-family:Ubuntu,sans-serif;width:600px\\\">\n <div style=\\\"Margin-left:20px;Margin-right:20px;Margin-top:24px\\\">\n <div style=\\\"line-height:20px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <h1 style=\\\"Margin-top:0;Margin-bottom:0;font-style:normal;font-weight:normal;color:#565656;font-size:36px;line-height:43px;text-align:center\\\">\n <strong>Redefinir Senha</strong>\n </h1>\n <p>Olá, <b>{$email['user_name']}!</b>.<br/></p>\n <p style=\\\"background-color: #eeeeee; padding: 15px; position: relative; left: -15px;\\\">\n Para garantir uma boa prática de que você realmente pediu para redefinir a senha acesse o link abaixo, pedimos que todos os usuários confirmem a titularidade do e-mail. Assim evitamos enviar mensagens para alguém que não queira recebê-las. <br>\n Clique no <b>LINK</b> abaixo para <b>REDEFINIR A SENHA</b>.\n </p>\n <br/>\n <a href=\\\"{$link}\\\" style=\\\"font-family:'Arial',sans-serif; font-size: 17px; background-color: #5cb85c; padding: 15px; color: #FFFFFF; text-decoration: none;\\\">REDEFINIR A SENHA</a>\n <br/>\n <br/>\n <p>Este e-mail é enviado pelo sistema, por favor não o responda.<br/>Qualquer dúvida entre em contato pelo e-mail <b>\" . getenv('MAIL_SUPORTE') . \"</b>.</p>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n <div style=\\\"Margin-left:20px;Margin-right:20px\\\">\n <div style=\\\"line-height:10px;font-size:1px\\\">&nbsp;</div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#e0ddd6\\\" border=\\\"0\\\" style=\\\"margin-bottom:20px;\\\">\n <tbody>\n <tr>\n <td width=\\\"15\\\"></td>\n <td>\n <table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"600\\\" align=\\\"center\\\" bgcolor=\\\"#666666\\\" border=\\\"0\\\" style=\\\"border-bottom-left-radius:4px;border-bottom-right-radius:4px\\\">\n <tbody>\n <tr>\n <td height=\\\"14\\\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n <td width=\\\"15\\\"></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \";\n\n $mail->Body = $mailContent;\n\n // Send email\n if(!$mail->send()):\n return $mail->ErrorInfo;\n \n else: \n return true;\n\n endif;\n }", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function Users_user_changeemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n $changepassword = pnModGetVar('Users', 'changeemail', 1);\n if ($changepassword <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n // Create output object\n $pnRender = & pnRender::getInstance('Users', false, null, true);\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('users_user_changeemail.htm');\n}", "function sendAuthEmail($email,$mailBody) {\n\t\ttry {\n\t\t\t$mail = new PHPMailer(true);\n\t\t\t$mail->SMTPDebug = 0; //SMTP Debug\n\t\t\t$mail->isSMTP();\n\t\t\t$mail->Host = \"smtp.gmail.com\";\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = '[email protected]';\n\t\t\t$mail->Password = 'randompassworfd';\n\t\t\t$mail->SMTPSecure = 'tls';\n\t\t\t$mail->Port = '587';\n\t\t\t/**\n\t\t\t * SMTPOptions work-around by @author : Synchro\n\t\t\t * This setting should removed on server and \n\t\t\t * mailing should be working on the server\n\t\t\t */\n\t\t\t$mail->SMTPOptions = array(\n\t\t\t\t'ssl' => array(\n\t\t\t\t\t'verify_peer' => false,\n\t\t\t\t\t'verify_peer_name' => false,\n\t\t\t\t\t'allow_self_signed' => true\n\t\t\t\t)\n\t\t\t);\n\t\t\t//Recipients\n\t\t\t$mail->setFrom('[email protected]', 'Do Not Reply');\n\t\t\t$mail->addAddress($email,'Yash Karanke'); // Add a recipient\n\t\t\t$mail->addReplyTo('[email protected]');\n\n\t\t\t //Content\n\t\t\t $mail->isHTML(true); // Set email format to HTML\n\t\t\t $mail->Subject = 'Authentication Email';\n\t\t\t $mail->Body = $mailBody;\n\t\t \n\t\t\t if($mail->send()){\n\t\t\t\treturn true;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t return false;\n\t\t\t\t exit();\n\t\t\t }\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $mail->ErrorInfo;\n\t\t}\n\t}", "public function enviarEmailBienvenida(){\n\t\t$params ['url'] = Yii::$app->urlManager->createAbsoluteUrl ( [ \n\t\t\t'ingresar/' . $this->txt_token \n\t\t] );\n\t\t$params ['user'] = $this->nombreCompleto;\n\t\t$params ['usuario'] = $this->txt_email;\n\t\t$params ['password'] = $this->password;\n\t\t\n\t\t\n\t\t\t$email = new Email();\n\t\t\t$email->emailHtml = \"@app/modules/ModUsuarios/email/bienvenida\";\n\t\t\t$email->emailText = \"@app/modules/ModUsuarios/email/layouts/text\";\n\t\t\t$email->to = $this->txt_email;\n\t\t\t$email->subject = \"Bienvenido\";\n\t\t\t$email->params =$params ;\n\t\t\t\n\t\t\t// Envio de correo electronico\n\t\t\t$email->sendEmail();\n\t\t\treturn true;\n\t\t\n\n\t}", "public static function sendEmailToResetPassword($data)\n {\n $email = $data['email'];\n $user = \\Modules\\Frontend\\Auth\\User::where('email', $email)\n ->first();\n if (empty($user)) {\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.user_not_exists')];\n } else {\n DB::beginTransaction();\n try {\n $newPass = Functions::generateRandomString(6);\n $user->password = Hash::make($newPass);\n $user->save();\n $params = [\n 'email' => $email,\n 'name' => $user->first_name.' '.$user->last_name,\n 'subject' => STheme::lang('lang.general.reset_password'),\n 'data' => ['newPass'=>$newPass],\n 'template' => 'mails.resetPassword'\n ];\n DB::commit();\n System::sendMail($params);\n if (Mail::failures()) {// check for failures\n return ['rs'=>System::FAIL, 'msg'=>STheme::lang('lang.msg.mail_not_send')];\n }\n Session::flash(System::FLASH_SUCCESS, STheme::lang('lang.msg.send_mail_forgot_password_success'));\n return [\n 'rs'=>System::SUCCESS,\n 'msg'=>'',\n 'redirect_url'=>'/forgot-password'\n ];\n } catch (\\Exception $e) {\n DB::rollBack();\n return ['rs'=>System::FAIL, 'msg'=>$e->getMessage()];\n }\n }\n }", "function QuenPass(&$error){\n\t\t\t\t$success=true;\n\t\t\t\t$email=$_POST['email'];\n\t\t\t\ttrim(strip_tags($email));\n\t\t\t\tif(get_magic_quotes_gpc()==false)\n\t\t\t\t\t$email=mysql_real_escape_string($email);\n\t\t\t\tif($email==NULL){\n\t\t\t\t\t$success=false;\n\t\t\t\t\t$error['send-pass']=\"Vui lòng nhập địa chỉ email.\";\n\t\t\t\t\treturn false;\n\t\t\t\t}elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$error['send-pass'] = \"Dạng thức email sai.\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\n\t\t\t\t$checkMail=$this->KTEmail($email);\n\t\t\t\tif($checkMail==false){\n\t\t\t\t\t$success=false;\n\t\t\t\t\t$error['send-pass']=\"Email không tồn tại.\";\n\t\t\t\t}\n\t\t\t\tif($success==true){\n\t\t\t\t\t$rdk=$this->ChuoiNgauNhien(128);\n\t\t\t\t\t$sql=\"UPDATE user SET randomKey='$rdk' WHERE email='$email'\";\n\t\t\t\t\tmysql_query($sql) or die(mysql_error());\t\n\t\t\t\t\t//Send email to customer\n\t\t\t\t\trequire_once \"email/smtp.php\";\n\t\t\t\t\t$subject=\"Bạn quên mật khẩu?\";\n\t\t\t\t\t$content=file_get_contents(\"email/form/changePassword.php\");\n\t\t\t\t\t$link = \"http://www.bitas.com.vn/user/quen-mat-khau-doi-mat-khau/\";\n\t\t\t\t\t$link = $link . \"$rdk/$email/\";\n\t\t\t\t\t$content=str_replace(\"{link}\",$link,$content);\n\t\t\t\t\t$frommail=\"[email protected]\";\n\t\t\t\t\t$tomail=\"$email\";\n\t\t\t\t\tSendMail($frommail,$tomail,$subject,$content);\n\t\t\t\t\t$_SESSION['thongbao_success']=\"Chúng tôi đã gửi email cho bạn với những hướng dẫn để thiết lập lại mật khẩu. Hãy kiểm tra hộp thư đến của bạn và bấm vào liên kết được cung cấp.\";\n\t\t\t\t}\n\t\t\t\treturn $success;\n\t\t\t}", "function procForgotPass() {\n global $database, $session, $mailer, $form;\n /* Username error checking */\n $subuser = $_POST['user'];\n $field = \"user\"; //Use field name for username\n if (!$subuser || strlen($subuser = trim($subuser)) == 0) {\n $form->setError($field, \"Username not entered<br>\");\n } else {\n /* Make sure username is in database */\n $subuser = stripslashes($subuser);\n if (strlen($subuser) < 5 || strlen($subuser) > 30 ||\n !eregi(\"^([0-9a-z])+$\", $subuser) ||\n (!$database->usernameTaken($subuser))) {\n $form->setError($field, \"Username does not exist<br>\");\n }\n }\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n }\n /* Generate new password and email it to user */ else {\n /* Generate new password */\n $newpass = $session->generateRandStr(8);\n\n /* Get email of user */\n $usrinf = $database->getUserInfo($subuser);\n $email = $usrinf['email'];\n\n /* Attempt to send the email with new password */\n if ($mailer->sendNewPass($subuser, $email, $newpass)) {\n /* Email sent, update database */\n $database->updateUserField($subuser, \"password\", md5($newpass));\n $_SESSION['forgotpass'] = true;\n }\n /* Email failure, do not change password */ else {\n $_SESSION['forgotpass'] = false;\n }\n }\n\n header(\"Location: \" . $session->referrer);\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "private function sendConfirmationEmail($email){\n $pdo = $this->pdo;\n $stmt = $pdo->prepare('SELECT confirm_code FROM users WHERE email = ? limit 1');\n $stmt->execute([$email]);\n $code = $stmt->fetch();\n\n $subject = 'Confirm your registration';\n $message = 'Please confirm you registration by pasting this code in the confirmation box: '.$code['confirm_code'];\n $headers = 'X-Mailer: PHP/' . phpversion();\n\n if(mail($email, $subject, $message, $headers)){\n return true;\n }else{\n return false;\n }\n }", "function _mailToUser($userVoornaam, $userAchternaam, $userUsername, $userEmail, $generatedPassword) {\n $to = $userEmail;\n $subject = 'TEDxPXL registratie';\n $message = \"Beste \" . $userVoornaam . \" \" . $userAchternaam . \"\\n\\nBedankt voor uw registratie bij TEDxPXL.\\nU kan nu inloggen met \" . $userUsername . \" met als wachtwoord \" . $generatedPassword . \"\\nU zal uw wachtwoord moeten wijzigen bij de eerste keer inloggen.\\n\\nMet vriendelijke groet\\n\\nTEDxPXL Administratie\";\n $headers = 'From: [email protected]';\n if (!mail($to, $subject, $message, $headers)) {\n //echo \"Email sending failed\";\n }\n }", "public function forgotPasswordSendEmail(){\r\n\r\n fn_logged_in();\r\n \r\n $email = $this->input->post('email'); \r\n \r\n $res = $this->Advertiesment_model->forgotPasswordGetUser($email);\r\n\r\n //echo fn_print_array($res);\r\n if ( isset($email) && ($email != \"\") )\r\n {\r\n if($res == 'no_email_found')\r\n {\r\n $result = 'Email does not exist';\r\n echo $result;\r\n }\r\n elseif($res)\r\n { \r\n $password = $res[0]['original_password'];\r\n $message = \"\r\n <html>\r\n <head>\r\n <title>Account Details</title>\r\n </head>\r\n <body>\r\n <h2>Your account details are given below.</h2>\r\n <p>Your Account:</p>\r\n <p>Email: \".$email.\"</p>\r\n <p>Password: \".$password.\"</p> \r\n </body>\r\n </html>\r\n \";\r\n $subject = \"Forgot Password Email\";\r\n\r\n $email_data = array(\r\n \"message\" => $message,\r\n \"to_email\" => $email,\r\n \"subject\" => $subject,\r\n );\r\n\r\n $result = fn_send_email($email_data);\r\n echo $result;\r\n } \r\n }\r\n else\r\n {\r\n $result = 'All fields are required';\r\n echo $result; \r\n }\r\n }", "public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('[email protected]', '[email protected]');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }", "protected function taskForgot()\n {\n /** @var Config $config */\n $config = $this->grav['config'];\n $data = $this->post;\n\n /** @var Language $language */\n $language = $this->grav['language'];\n $messages = $this->grav['messages'];\n\n /** @var UserCollectionInterface $users */\n $users = $this->grav['accounts'];\n $email = $data['email'] ?? '';\n\n // Sanitize $email\n $email = htmlspecialchars(strip_tags($email), ENT_QUOTES, 'UTF-8');\n\n // Find user if they exist\n $user = $users->find($email, ['email']);\n\n if ($user->exists()) {\n if (!isset($this->grav['Email'])) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_EMAIL_NOT_CONFIGURED'), 'error');\n $this->setRedirect($this->login->getRoute('forgot') ?? '/');\n\n return true;\n }\n\n $from = $config->get('plugins.email.from');\n\n if (empty($from)) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_EMAIL_NOT_CONFIGURED'), 'error');\n $this->setRedirect($this->login->getRoute('forgot') ?? '/');\n\n return true;\n }\n\n $userKey = $user->username;\n $rateLimiter = $this->login->getRateLimiter('pw_resets');\n $rateLimiter->registerRateLimitedAction($userKey);\n\n if ($rateLimiter->isRateLimited($userKey)) {\n $messages->add($language->translate(['PLUGIN_LOGIN.FORGOT_CANNOT_RESET_IT_IS_BLOCKED', $email, $rateLimiter->getInterval()]), 'error');\n $this->setRedirect($this->login->getRoute('login') ?? '/');\n\n return true;\n }\n\n $token = md5(uniqid((string)mt_rand(), true));\n $expire = time() + 604800; // next week\n\n $user->reset = $token . '::' . $expire;\n $user->save();\n\n try {\n Email::sendResetPasswordEmail($user);\n\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'), 'info');\n } catch (\\Exception $e) {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_FAILED_TO_EMAIL'), 'error');\n }\n } else {\n $messages->add($language->translate('PLUGIN_LOGIN.FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL'), 'info');\n }\n\n\n $this->setRedirect($this->login->getRoute('login') ?? '/');\n\n return true;\n }" ]
[ "0.7064867", "0.68901443", "0.68900204", "0.6798403", "0.67539704", "0.671237", "0.6667207", "0.6637603", "0.66043234", "0.65967536", "0.65924543", "0.65488064", "0.653576", "0.65226346", "0.6519967", "0.6493802", "0.64684427", "0.6465093", "0.6414649", "0.64103806", "0.6388835", "0.6358673", "0.635798", "0.6350576", "0.6299117", "0.6298208", "0.6296279", "0.62927675", "0.6264499", "0.62614083", "0.6259685", "0.6257026", "0.62566644", "0.6256137", "0.62543565", "0.6254082", "0.623127", "0.6228665", "0.6225893", "0.6220351", "0.62183267", "0.6209973", "0.61986244", "0.6186282", "0.618542", "0.6183649", "0.6175381", "0.6135518", "0.61292356", "0.6127645", "0.6086999", "0.6085528", "0.60838073", "0.60804737", "0.6079996", "0.6071794", "0.6068265", "0.6057597", "0.6055869", "0.6037223", "0.60327345", "0.6030316", "0.60279155", "0.6014261", "0.6006048", "0.5996561", "0.59889036", "0.5978708", "0.597464", "0.596229", "0.59537226", "0.5953235", "0.59353113", "0.59322876", "0.5931595", "0.5928607", "0.5920409", "0.59055465", "0.59026235", "0.59023964", "0.5902109", "0.59004086", "0.58979714", "0.5896537", "0.5895137", "0.58950925", "0.5890969", "0.58890337", "0.5888561", "0.5888326", "0.5886007", "0.58851445", "0.58836657", "0.58800644", "0.58797723", "0.5878616", "0.587641", "0.58720815", "0.58614486", "0.5857071", "0.585178" ]
0.0
-1
This function sets active/inactive status.
public function setstatus() { $this->checkAjaxToken(); $this->throwForbiddenUnless(SecurityUtil::checkPermission('AddressBook::', '::', ACCESS_ADMIN)); $id = $this->request->request->get('id', 0); $status = $this->request->request->get('status', 0); $alert = ''; if ($id == 0) { $alert .= $this->__('No ID passed.'); } else { $item = array('id' => $id, 'status' => $status); $res = DBUtil::updateObject($item, 'addressbook_address', '', 'id'); if (!$res) { $alert .= $item['id'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($id)); if ($item['status']) { $item['status'] = 0; } else { $item['status'] = 1; } } } // get current status to return $item = DBUtil::selectObjectByID('addressbook_address', $id, 'id'); if (!$item) { $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($id)); } return new Zikula_Response_Ajax(array('id' => $id, 'status' => $item['status'], 'alert' => $alert)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }", "public function setActive() {}", "public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}", "public function setActive()\n {\n $this->status = AutoEvent::STATUS_ACTIVE;\n $this->save();\n }", "public function setActive()\r\n {\r\n $this->active = true;\r\n }", "public function setActive($value);", "public function changeActiveStatus($appName, $active);", "protected static function set_status()\n {\n }", "public function setActive($value) {\n\t\t$this->_active = $value;\n\t}", "public function setInactive()\r\n {\r\n $this->active = false;\r\n }", "function setActive() ;", "public function SetActive ($active = TRUE);", "function setActive($a_active)\n\t{\n\t\t$this->active = $a_active;\n\t}", "public function setActive($value) {\n if ($value != $this->_active) {\n if ($value)\n $this->open();\n else\n $this->close();\n }\n }", "public function update_active()\n\t{\t\n\t\t$change_status=$this->input->post('status_value');\n\t\t$status_record = array('status' => $this->input->post('status_record'));\n\t\t\n\t\tif ($status_record['status'] == 0) {\n\t\t\t$status_record['status'] = 1;\n\t\t}\n\n\t\tforeach ($change_status as $status) {\n\t\t\t\t\t$this->AboutModel->update_status($status , $status_record);\n\t\t\t\t}\n\t\t $this->session->set_flashdata('msg', 'Status Changed Successfully ');\n\t}", "public function actionUpdateIsActive()\n {\n $ids = Yii::app()->request->getPost('ids');\n $status = (int)Yii::app()->request->getPost('status');\n $models = StoreMarket::model()->findAllByPk($ids);\n foreach($models as $market)\n {\n if(in_array($status, array(0,1)))\n {\n $market->is_active=$status;\n $market->save();\n }\n }\n echo Yii::t('StoreModule.admin', 'Изменения успешно сохранены.');\n }", "public function setActive($active = true)\n {\n $this->active = $active;\n }", "public function setActive($active)\n {\n $this->active = $active;\n }", "public function setActive($active)\n {\n $this->active = $active;\n }", "public function actionChangeActive() \r\n {\r\n $formData = CJSON::decode(stripslashes($_POST['formData']));\r\n\r\n extract($formData);\r\n $res=0;\r\n $HajazMaster= HajzMaster::model()->findByPk($FineID);\r\n $HajazMaster->IsActive = $FineStatus;\r\n if($HajazMaster->save()) $res=1;\r\n else print_r( $HajazMaster->getErrors() );\r\n print CJSON::encode($res);\r\n \r\n }", "public function setIsActive($isActive)\n {\n }", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "public function set_active($active){\n if( $this->allowActiveChange ){\n // allowed to set/change -> reset \"allowed\" property\n $this->allowActiveChange = false;\n }else{\n // not allowed to set/change -> keep current status\n $active = $this->active;\n }\n return $active;\n }", "public function update_status();", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function changeAllStatus()\n\t{\n\t\t$model_name=$this->input->post('type',TRUE);\n\t\t$pk_id=$this->input->post('pk_id',TRUE);\n\t\t$status=$this->input->post('is_active',TRUE);\n\t\t$this->$model_name->update($pk_id, array( 'is_active' => $status));\n\t}", "public function setActive(bool $active){\n // enables \"active\" change for this model\n $this->allowActiveChange = true;\n $this->active = $active;\n }", "public function setIsActive($isActive);", "public function SetStatus( $a )\r\n\t{\r\n\t\t$this->_status = $a;\r\n\t}", "public function setIsActive( bool $isActive ): void;", "public function setIsActive(bool $isActive)\n\t{\n\t\t$this->isActive=$isActive; \n\t\t$this->keyModified['is_active'] = 1; \n\n\t}", "public function setActive($value) {\n if ($value != $this->_active) {\n if ($value)\n $this->connect();\n else\n $this->close();\n }\n }", "abstract public function setStatus($status);", "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "public function change_status() {\n\n $id = $this->input->post('id');\n $status = $this->input->post('status');\n\n $data['is_active'] = $status;\n\n $this->db->where('id', $id);\n $this->db->update('template_pola', $data);\n }", "function activeinactive()\n\t{\n\t\t$strquery\t=\t\"UPDATE \" . DB_PREFIX . \"menu SET menu_active='n' WHERE menu_id in(\" . $this->uncheckedids . \")\";\n\t\t$result = mysql_query($strquery) or die(mysql_error());\n\t\tif($result == false)\n\t\t\treturn ;\n\t\t$strquery\t=\t\"UPDATE \" . DB_PREFIX . \"menu SET menu_active='y' WHERE menu_id in(\" . $this->checkedids . \")\";\n\t\treturn mysql_query($strquery) or die(mysql_error());\n\t}", "public function setStatus($status);", "public function setStatus($status);", "function isActive() ;", "public function setActive($value)\n {\n return $this->set(self::_ACTIVE, $value);\n }", "public function changeStatus()\n {\n }", "function status($status)\n {\n switch($status) {\n case \"Active\":\n case \"Suspended\":\n break;\n default:\n return false;\n }\n\n if ($status != $this->status)\n $this->update['status'] = $status;\n\n $this->status = $status;\n\n return true;\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function markAsActivate() : bool\n {\n $this->is_active = 1;\n $this->paid = 1;\n //$this->grace_period_ends = new RawValue('NULL');\n $this->ends_at = null; //new rawValue('NULL');\n $this->next_due_payment = $this->ends_at;\n $this->is_cancelled = 0;\n return $this->update();\n }", "public function setActive($id)\n {\n }", "public function setActive($id)\n {\n }", "public function setProductActive($id, $value) {\n $stmt = $this->db->prepare(\"update product set is_active = :is_active where id = :id;\");\n $stmt->bindValue(\"is_active\", $value, PDO::PARAM_BOOL);\n $stmt->bindValue(\"id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n }", "function _active($info)\n\t{\n\t // Gan trang thai xac thuc\n\t $data = array();\n\t $data['status'] = mod('order')->status('completed');\n\t\n\t // Cap nhat du lieu vao data\n\t model('user_bank')->update($info->id, $data);\n\t // Gui thong bao\n\t set_message(lang('notice_update_success'));\n\t return TRUE;\n\t}", "function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}", "public function setActive(Request $request){\n $product = Product::findOrFail($request->id);\n $product->update(['status'=>$request->status]);\n Cache::tags('products')->flush();\n Cache::tags('categories')->flush();\n return response()->json($product->status,200);\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "function changeStatus($table, $status, $id)\n {\n $data = array('is_active' => $status);\n $where = $table . \"_id = '$id'\";\n $builder = $this->db->table($table);\n $builder->where($where);\n $builder->set($data);\n $builder->update();\n }", "public function set_actived($user_id, $status)\n {\n $val = '0';\n if ($status === true) {\n $val = '1';\n }\n return $this->db\n ->set('actived', $val)\n ->where('user_id', $user_id)\n ->update('users');\n }", "public function setActive($state = false)\n {\n $this->active = $state;\n return $this->save();\n }", "protected function _setCacheEngineStatus($cacheActive)\r\n {\r\n $this->cacheActive = $cacheActive;\r\n }", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "public function setPending()\n {\n $this->attributes['status'] = 'pending';\n self::save();\n }", "public function changeStatus($status)\n {\n $changestatus = User::findOrFail($status);\n \n if (isset($changestatus) && !empty($changestatus)) {\n if ($changestatus->active == 1) {\n $changestatus->update(['active' => 0]);\n return redirect()->back()->withFlashSuccess('Successfully Deactive User');\n }else{\n $changestatus->update(['active' => 1]); \n return redirect()->back()->withFlashSuccess('Successfully Activeted User');\n }\n }\n }", "public function updateActive($uid, $value)\n {\n $this->sdb->query(\"update appuser set active=$2 where appuser.id=$1\",\n array($uid, $value));\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "public function update_status()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\t$data = array('is_active' => $this->input->post('is_active'));\n\n\t\t$update = $this->products->update($product_id, $data);\n\n\t\tif ($update)\n\t\t{\n\t\t\tif ($this->input->post('is_active') == 1)\n\t\t\t{\n\t\t\t\techo 'true';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}\n\t}", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "function setActivityStatus($activityId,$status) \n {\n return $this->instance->setActivityStatus($activityId,$status);\n }", "function set_account_status($acc_number,$status,$tp_start,$tp_end,$rolover_start,$rolover_end)\n\t{\n\t if ($status != 0 )\n\t {\n\t\t$data['timeline'] = date('H:i:s d-m-Y',$tp_start).\" - \".date('H:i:s d-m-Y',$tp_end);\n\t\t$data['timeline1'] = date('H:i:s d-m-Y',$rolover_start).\" - \".date('H:i:s d-m-Y',$rolover_end);\n\t }\n\t else\n\t {\n\t\t$data['timeline'] = \"Not calculated\";\n\t\t$data['timeline1'] = \"Not calculated\";\n\t }\n\t return $this->db->where('login',$acc_number)\n\t \t ->limit(1)\n\t \t ->update('pamm_accounts', $data);\n\t}", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "public function set_status($status)\n {\n $this->status = $status;\n Session::instance()->set(\"hana_status\", $this->status);\n }", "private function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus(Choice $status)\n\t{\n\t\t$this->status=$status; \n\t\t$this->keyModified['status'] = 1; \n\n\t}", "public function setStatus(Status $status);", "public final function active()\n {\n }", "public final function active()\n {\n }", "public final function active()\n {\n }", "public function setStatus($value)\n {\n $this->setItemValue('status', ['id' => (int)$value]);\n }", "public function change_user_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Seller Status Changed Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_list');\r\n\t\t}\r\n\t}", "public function set_status ($status) {\n $this->status = $status;\n }", "public function _setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "public function isActive();", "public function isActive();", "public function isActive();", "public function isActive();", "function active($uid,$st)\n {\n if($st==1)\n {\n $st=0;\n }\n else if($st==0)\n {\n $st=1;\n }\n $query=$this->db2->query(\"UPDATE registered_operators SET status='$st' WHERE id='$uid' \");\n if($query)\n {\n \n $query=$this->db2->query(\"select * from registered_operators where id='$uid'\");\n \n if($query->num_rows()>0)\n {\n \t foreach($query->result() as $rows)\n {\n \t //add all data to session\n $name = $rows->name;\n $username = $rows->user_name;\n\t\t $password = $rows->password;\n $emailid = $rows->email_id;\n $status = $rows->status;\n \n }\n $x=$this->mail_send($name,$username,$password,$emailid,$status);\n if($x){\n return 1;\n}\n }\n \n }\n else\n return 0;\n \n }", "public function change_status($status){\n\t\tif($status == '1'){\n\t\t\t$st = 'Active';\n\t\t}else if($status == '2'){\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}", "public static function update_account_status($email) {\n $connection = DatabaseConnection::connection();\n $sql = \"UPDATE users SET active = 1 WHERE email=:email\";\n $statement = $connection->prepare($sql);\n $statement->execute(['email' => $email]);\n }", "public function activate()\r\n\t{\r\n\t\treturn $this->_changeStatus(1);\r\n\t}", "public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }", "function update_record_status($id, $status, $table, $key) {\n\t$sql = \"UPDATE \".TB_PREF.$table.\" SET inactive = \"\n\t\t. ((int)$status).\" WHERE $key=\".db_escape($id);\n\t\t\n \tdb_query($sql, \"Can't update record status\");\n}", "public static function changeStatus($params)\n {\n $status = $params['status'] == 'offline' ? '0' : '1';\n $q = Doctrine_Query::create()->update('EmailLightBox')\n ->set('status', $status)\n ->where('id=?', $params['id'])\n ->execute();\n }", "function change_koupon_status_active($kpnid){\n$strSQL1 = \"SELECT * FROM kpn_deal_headers where kpn_id='$kpnid'\";\n$koupons_status = mysql_query($strSQL1);\n\twhile($koupon_status = mysql_fetch_array($koupons_status)){\n\t\t\tmysql_query(\"UPDATE kpn_deal_headers SET status='Active' WHERE kpn_id='$kpnid'\");\n\t}\n}", "public function setStatusAttribute($value)\n {\n $this->attributes['status'] = $value ? 'open' : 'close';\n }", "public function change_status()\n { \n $user_id = $this->uri->segment(3);\n $current_status = $this->uri->segment(4);\n\n if($current_status==2)\n {\n $status = array('status'=>1);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n if($current_status==1)\n {\n $status = array('status'=>2);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n }", "public function setActive($id)\n {\n if ($id) {\n $this->load($id);\n } elseif (!$this->getIsDefault()) {\n $this->clear();\n }\n }", "public function set_status( $status ) {\n\t\t$this->ryte_option[ self::STATUS ] = $status;\n\t}", "public function isActive() {}", "public function isActive() {}", "public function isActive() {}" ]
[ "0.8504434", "0.77887154", "0.776901", "0.7663481", "0.7478033", "0.7473687", "0.74099123", "0.7378122", "0.7343705", "0.73193187", "0.71805936", "0.71731776", "0.70215243", "0.7012973", "0.7012446", "0.6967561", "0.6886365", "0.6864649", "0.6864649", "0.6860119", "0.68469614", "0.68351424", "0.67984587", "0.67984587", "0.6779937", "0.6721797", "0.6687678", "0.6687678", "0.664709", "0.664381", "0.6633699", "0.6629952", "0.6623315", "0.66000223", "0.65896904", "0.65689087", "0.656299", "0.6531105", "0.65062255", "0.65062255", "0.6497829", "0.6493078", "0.64843196", "0.64828247", "0.64792186", "0.6452764", "0.6448845", "0.6448845", "0.644807", "0.63572025", "0.6345938", "0.6327973", "0.6314222", "0.63117254", "0.63007355", "0.629573", "0.62897754", "0.6283715", "0.62769383", "0.62462395", "0.6219093", "0.62131935", "0.62091416", "0.62052006", "0.6204885", "0.6204267", "0.619964", "0.6197594", "0.61971533", "0.6190507", "0.6190507", "0.6190507", "0.6190507", "0.61871547", "0.61851704", "0.61821127", "0.61821127", "0.6180141", "0.61773837", "0.61752856", "0.6173784", "0.6168118", "0.6162576", "0.6162576", "0.6162576", "0.6162576", "0.6154115", "0.61539584", "0.6147495", "0.6125657", "0.6123207", "0.6122561", "0.6121118", "0.6117239", "0.6116775", "0.60982805", "0.60971546", "0.6096378", "0.60954434", "0.60954434", "0.6094496" ]
0.0
-1
Lists all indicateur entities.
public function indexAction($page) { if ($page < 1) { throw new NotFoundHttpException('Page "' . $page . '" inexistante.'); } //je fixe je nombre d'annoce par page $nbrAttPage = 5; $em = $this->getDoctrine()->getManager(); $indicateurs = $em->getRepository('DciBundle:Indicateur')->allIndicateur($page, $nbrAttPage); // On calcule le nombre total de pages grâce au count($attestations) qui retourne // le nombre total d'annonces $nbrTotalPages = ceil(count($indicateurs) / $nbrAttPage); // Si la page n'existe pas, on retourne une 404 if ($page > $nbrTotalPages) { throw $this->createNotFoundException("La page" . $page . " n'existe pas."); } return $this->render('form_dci/indicateur/index.html.twig', array( 'indicateurs' => $indicateurs, 'page' => $page, 'nbrTotalPages' => $nbrTotalPages, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllEntities();", "public function get_entities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "public function findAllEntities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackOfficebackBundle:Extraitnaissances')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "public function getEntities();", "public function getEntities();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n// $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findAll();\n $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findBy(\n array(), \n array('nombre' => 'ASC')\n );\n\n return $this->render('uniRecetasBundle:ingrediente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:Klasses')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BaseBundle:Feriado')->findAll();\n\n return $this->render('BaseBundle:Feriado:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('GaleriasBundle:Galeria')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function index()\n {\n return Entity::all();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SmathEmpresaBundle:Empleado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function showAllAction( Request $request)\n { $em = $this->getDoctrine()->getManager();\n\n $entrepots = $em->getRepository('GererEntrepotBundle:Entrepot')->findAll();\n\n\n return $this->render('@GererEntrepot/admin/index.html.twig', array(\n 'entrepots' => $entrepots,\n ));\n\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Glossary')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AwaBussinessBundle:ReferedAplication')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CrudforgeBundle:Users')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n $entities = $em->getRepository('LiquidacionesCuposAnualesBundle:Liquidaciones')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:LocalBanner')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20InventarioBundle:Estado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsIncidentBundle:GdpMails')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('QihooToolBundle:AutoDownUrl')->getAllList();\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('estarRdaBundle:Utente')->findAll();\n\n return $this->render('estarRdaBundle:Utente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CMSBundle:Client')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAll()\n {\n return $this->indicacaoRepository->getAll();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('IrvyneBlogBundle:Article')->findAll();\n\n return array('entities' => $articles);\n }", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BEEServicesBeeeaseBundle:ActionListe')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackendBundle:Founder')->findAll();\n\n return $this->render('BackendBundle:Founder:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction() {\n // on récupère l'entity manager à l'aide du service Doctrine\n $em = $this->getDoctrine()->getManager();\n\n // on récupère le repository de Article et on lui demande \n // tous les articles\n $entities = $em->getRepository('HBBlogBundle:Article')->findAll();\n\n // on transmet la liste d'article au template en la nommant entities\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MrsBlogBundle:Cidades')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalsifdaBundle:SifdaEquipoTrabajo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:Vluchten')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function listAll() \n { \n $tipoEncargados = $this->tipoEncargadoDao->listAll();\n $tipoEncargadoArreglo = array();\n foreach ( $tipoEncargados as $indice => $tipoEncargado ){\n $arreglo = array(\n 'id' => $tipoEncargado->getId(),\n 'etiqueta' => $tipoEncargado->getEtiqueta()\n );\n $tipoEncargadoArreglo[] = $arreglo;\n } \n return response( $tipoEncargadoArreglo , 200)->header('Content-Type', 'application/json');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InventarioBundle:Bien')->findAll();\n\n return $this->render('InventarioBundle:Bien:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function getList()\n {\n return array('entities' => $this->entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('UserBundle:User')->findAll();\n \n $options = array(\n \t\t'entities' => $entities,\n );\n $elementsForMenu = $this->getElementsForMenu();\n\n return $this->render('BackendBundle:User:index.html.twig', array_merge($options, $elementsForMenu));\n }", "public function getEntities(): array;", "public function entities(): Collection;", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4CampeonatoBundle:Partido')->findAll();\n //$e_h_p = $em->getRepository('Area4CampeonatoBundle:Equipo_has_Partido')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GestionFraisBundle:Visiteur')->findAll();\n\n return $this->render('GestionFraisBundle:Visiteur:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function index()\n {\n return AtendenteResource::collection(Atendente::all());\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeKindergartenBundle:AttendanceEmployed')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('PrognozMagazineBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsWikiBundle:Rubrique')->findBy(array(), array('titre'=>'ASC'));\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppProductBundle:FrontBottom')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('FnxAdminBundle:Categoria')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('casamunozempresaBundle:Sucursal')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GurmeMainBundle:Recipe')->findBy(array(), array('id'=>'desc'));\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getEntities()\n {\n return $this->entities;\n }", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InfectBackendBundle:Species')->findAll();\n\n return $this->render('InfectBackendBundle:Species:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function index()\n\t{\n\t\t$entities = DB::table('entities')->orderBy('id')->get();\n\t\t$branches = DB::table('branches')->get();\n\n\t\treturn View::make('entities.index')\n\t\t->with('title','entities')\n\t\t->with('entities', $entities)\n\t\t->with('branches', $branches)\n\t\t->with('active', 'entities');\n\t}", "public function get_entities()\n\t{\t\n\t\t$query = $this->db->get('entity_types');\n\t\treturn $query->result_array();\n\t}", "public function indexActionEntities() {\n return [];\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('CmarMeetingBundle:Meeting')->findAll();\n\n return array('entities' => $entities);\n }", "public function getEntities() {\n return $this->entities;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HaccoDeeeBundle:DevisSetup')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $entities = $this->get('InspectionManager')->getAllEntity();\n return array(\n 'entities' => $entities,\n 'headerTitle' => 'Inspections');\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();" ]
[ "0.69215405", "0.6894297", "0.6886616", "0.6880062", "0.6641934", "0.6607736", "0.6545123", "0.65086275", "0.65086275", "0.6479785", "0.64446825", "0.6425218", "0.64223796", "0.6415404", "0.6399366", "0.639872", "0.6362839", "0.6279683", "0.6265107", "0.6259034", "0.62479246", "0.62434465", "0.6241781", "0.62356526", "0.62129205", "0.6209567", "0.62085617", "0.61856526", "0.61589825", "0.6136919", "0.61323947", "0.6120908", "0.6119462", "0.61143374", "0.61131036", "0.61065966", "0.61004114", "0.6091039", "0.608887", "0.6083259", "0.60825384", "0.6071944", "0.6047438", "0.60353714", "0.60348856", "0.60203785", "0.60203624", "0.60143745", "0.600153", "0.5999173", "0.5990667", "0.5989489", "0.5984929", "0.59777814", "0.59771025", "0.59647393", "0.5959634", "0.5953015", "0.59429663", "0.59429663", "0.59429663", "0.5941462", "0.5941462", "0.59406763", "0.5937233", "0.59359396", "0.5916062", "0.59076047", "0.59051305", "0.5903582", "0.5903247", "0.58985543", "0.58985543", "0.58985543", "0.58985543", "0.58985543", "0.58985543", "0.58985543", "0.58985543", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953", "0.58971953" ]
0.0
-1
Creates a new indicateur entity.
public function newAction(Request $request) { $indicateur = new Indicateur(); if (isset($_POST['submit'])) { if (empty($_POST['categorie']) || empty($_POST['dateIndi']) || empty($_POST['libelle']) || empty($_POST['mode']) || empty($_POST['periodicite']) || empty($_POST['niveau']) || empty($_POST['reference']) || empty($_POST['sousCategorie']) || empty($_POST['typeData']) || empty($_POST['typeIndicateur']) || empty($_POST['unite'])) { echo "<br/><br/><br/><font color='red'>Veuillez remplir tous les champs.</font><br/>"; //link to the previous page echo "<br/><a href='javascript:self.history.back();'>Retour</a>"; } else { // if all the fields are filled (not empty) //insert data to database $indicateur->setCategorie($_POST['categorie']); $indicateur->setDateIndi($_POST['dateIndi']); $indicateur->setLibelle($_POST['libelle']); $indicateur->setMode($_POST['mode']); $indicateur->setPeriodicite($_POST['periodicite']); $indicateur->setNiveau($_POST['niveau']); $indicateur->setReference($_POST['reference']); $indicateur->setSousCategorie($_POST['sousCategorie']); $indicateur->setTypeData($_POST['typeData']); $indicateur->setTypeIndicateur($_POST['typeIndicateur']); $indicateur->setUnite($_POST['unite']); $em = $this->getDoctrine()->getManager(); $em->persist($indicateur); $em->flush(); echo "<font color='green'>Data added successfully."; return $this->redirectToRoute('indicateur_show', array('id' => $indicateur->getId())); } } return $this->render('form_dci/indicateur/new.html.twig'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEntity();", "function create($entity);", "public function create($entity);", "public function create(Entity $entity);", "public function createEntity($data = array());", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "abstract protected function createEntityInstance();", "public function createEntity($entityName = null);", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "public function createEntity($name);", "public function createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function create(IContract $entity);", "public function createEntity($meaning)\n {\n $entity = new Entity($meaning);\n\n $this->entities[$entity->id] = $entity;\n\n return $entity;\n }", "public function create()\n {\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, null);\n }", "public function create(array $entity)\n {\n \n }", "public function create($data = array()) { \r\n \tforeach(array_keys($data) as $name) {\r\n \t\t$this->_checkAttributesValue($data, $name);\r\n \t}\r\n \t\r\n \treturn $entity = new $this->_entityClass($this, $this->_getPrimary(), $data);\r\n }", "public function create()\n {\n \n //\n }", "public function create() {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //TODO\n }", "abstract protected function getNewEntityInstance();", "public function create(){}", "public function createEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function create()\n {\n\n \n \n }", "protected function createEntity($data) {\n\n if(!empty($this->model_class)) {\n \n $this->createModelInstance($data);\n\n } else {\n \n $this->entity = $data;\n\n }\n \n }", "public function create()\n {\n }", "public function create()\n {\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\n //\n }", "public function create() {\r\n //\r\n }", "public function create()\n {\n //\n\t\t\n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n \n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function create()\n {\n //\n }", "public function createDefaultEntrant(): void\n {\n $entrant = new Entrant();\n $entrant->first_name = $this->first_name;\n $entrant->family_name = $this->last_name;\n $entrant->can_retain_data = $this->can_retain_data;\n if ($entrant->save()) {\n $this->entrants()->save($entrant);\n }\n }" ]
[ "0.7706332", "0.7307066", "0.7303772", "0.72562766", "0.6789537", "0.67281795", "0.6647641", "0.65965235", "0.6496697", "0.6473405", "0.6471433", "0.6438639", "0.63780105", "0.6301128", "0.62657315", "0.62376076", "0.62245375", "0.6218358", "0.6189005", "0.6189005", "0.6189005", "0.6189005", "0.6155559", "0.6136922", "0.6125112", "0.61250097", "0.6111071", "0.6110157", "0.61097395", "0.61055094", "0.61055094", "0.60737914", "0.60737914", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60683614", "0.60620266", "0.6058771", "0.60541105", "0.60541105", "0.60541105", "0.6048718", "0.6048718", "0.6048718", "0.6047136" ]
0.0
-1
Finds and displays a indicateur entity.
public function showAction(Indicateur $indicateur) { $deleteForm = $this->createDeleteForm($indicateur); return $this->render('form_dci/indicateur/show.html.twig', array( 'indicateur' => $indicateur, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Ong $entity)\n {\n return $entity;\n }", "function display_image($entity)\n{\n\tglobal $config;\n\t\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . $config['thumbnail_cdn'] . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\t\t\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\t\t\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"heading-description\">';\n\t\t\t\t\t\n\tif (isset($entity->description))\n\t{\n\t\techo '<div class=\"caption\">' . get_literal_display($entity->description) . '</div>';\n\t}\t\t\t\n\t\n\techo '<div id=\"identifiers\">';\n\techo '<ul class=\"identifier-list\">';\n\techo '<li><a class=\"external\" href=\"' . $entity->{'@id'} . '\" target=\"_new\">' . $entity->{'@id'} . '</a></li>';\n\techo '</ul>';\n\techo '</div>';\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\t// Display image\n\techo '<div>';\t\n\techo '<img class=\"image\" src=\"' .$entity->contentUrl->{'@id'} . '\" />';\t\n\techo '</div>';\n\n\n\n\techo '\n\t\t<script>figure_is_part_of(\"' . $entity->{'@id'} . '\", \"cited_by\");</script> \n\t';\n}", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function show(Representante $representante)\n {\n //\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //recupérer le repo\n $repository = $em->getRepository('InsatGl2Bundle:Personne');\n\n $personnes = $repository->findAll();\n\n\n return $this->render('@InsatGl2\\Personne\\show.html.twig',\n array(\n 'personnes'=> $personnes\n ));\n }", "public function showIngredient($identifier);", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BackendBundle:Founder')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Founder entity.');\n }\n\n return $this->render('BackendBundle:Founder:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('uniRecetasBundle:ingrediente')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ingrediente entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('uniRecetasBundle:ingrediente:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "public function htmlDisplay($entity){\n if(is_array($entity)){\n echo \"<pre>\";\n foreach($entity as $key => $value){\n echo $value;\n }\n echo \"</pre>\";\n }else{\n echo \"<text type=\\\"text\\\">{$entity}</text>\";\n }\n }", "public function entityFor(): string;", "public function show(Entrenador $entrenador)\n {\n //\n }", "public function show(Attention $attention){\n\n return $this->successResponse($attention);\n }", "public function show(Cause $entity)\n {\n return $entity;\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $actualite = $em->getRepository('MyAppEspritBundle:Actualite')->findAll();\n\n return $this->render('MyAppEspritBundle:Actualite:show.html.twig', array(\n 'actualite' => $actualite,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(EvidentionStatus $evidentionStatus)\n {\n //\n }", "public function display()\n {\n if ($this->_query == '')\n {\n WCFDataServicesEntity::displayEntities();\n }\n else\n {\n WCFDataServicesEntity::displayEntityData();\n }\n }", "public function findArticle() {\n $article = ArticleFormValidation::getDataId();\n $result = null;\n if(!is_null($article)){\n $result = $this->model->searchById($article);\n }\n if(is_null($result)){\n $err = 'Article not found in our DDBB';\n }\n include 'views/article-form.php';\n }", "public function showMeTheWayAction()\n {\n $em = $this->get('doctrine.orm.entity_manager');\n // first check our log entries\n $repo = $em->getRepository('Gedmo\\Loggable\\Entity\\LogEntry'); // we use default log entry class\n $client = $em->find('AppBundle:Client', 10 /*article id*/);\n dump($client->getFullname()); // prints \"my title\"\n $logs = $repo->getLogEntries($client);\n dump($logs);\n /* $logs contains 2 logEntries */\n // lets revert to first version\n //$repo->revert($client, 1/*version*/);\n // notice article is not persisted yet, you need to persist and flush it\n //$em->persist($client);\n //$em->flush();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n// $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findAll();\n $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findBy(\n array(), \n array('nombre' => 'ASC')\n );\n\n return $this->render('uniRecetasBundle:ingrediente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "function entity_type_label_single($entity_type) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getToolboxHelper();\n\n return $helper->labelSingle();\n}", "function tincan_lrs_statement_view($id) {\n $content = \"\";\n $entity = entity_load('tincan_statement', array($id));\n \n if (!empty($entity)) {\n $controller = entity_get_controller('tincan_statement');\n $content = $controller->view($entity);\n }\n else {\n $content = '<p>No statement found for drupal id: ' . $id . '</p>';\n }\n \n drupal_set_title($entity[$id]->label());\n\n return $content;\n\n}", "public function show(Docente $docente)\n {\n //\n }", "function amap_ma_get_entity_title($u, $namecleared) {\n if (!$namecleared)\n return false;\n\n if (elgg_instanceof($u, 'user')) {\n $entity_title = '<a href=\"' . elgg_get_site_url() . 'profile/' . $u->username . '\">' . $namecleared . '</a>';\n } else if (elgg_instanceof($u, 'group')) {\n //$entity_title = '<a href=\"'.elgg_get_site_url().'groups/profile/'.$u->guid.'/'.$u->name.'\">'.$namecleared.'</a>';\n $entity_title = $namecleared;\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $entity_title = elgg_view('output/url', array(\n 'href' => \"agora/view/{$u->guid}/\" . elgg_get_friendly_title($namecleared),\n 'text' => $namecleared,\n ));\n } else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n $entity_title = elgg_view('output/url', array(\n 'href' => \"pages/view/{$u->guid}/\" . elgg_get_friendly_title($namecleared),\n 'text' => $namecleared,\n ));\n }\n\n return $entity_title;\n}", "public function getDisplayLabel();", "function amap_ma_set_entity_additional_info($entity, $etitle, $edescription, $elocation = null, $eotherinfo = null, $m_icon_light = false, $eurl = false, $map_icon = false) {\n $edescription = elgg_get_excerpt($edescription);\n $namecleared = amap_ma_remove_shits($entity->$etitle);\n $description = amap_ma_remove_shits(elgg_get_excerpt($entity->description, 100));\n if (!$map_icon) {\n $map_icon = amap_ma_get_entity_icon($entity);\n }\n\n if ($elocation) {\n $location = $elocation;\n } else {\n $location = $entity->location;\n }\n\n if (elgg_instanceof($entity, 'object', 'agora')) {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', ['img_class' => 'elgg-photo']);\n }\n else if (elgg_instanceof($entity, 'object', 'lcourt')) {\n elgg_load_library('elgg:leaguemanager');\n $entity_photo = elgg_view('output/img', array(\n 'src' => lm_getEntityIconUrl($entity->getGUID(), 'tiny'),\n 'alt' => $entity->title,\n 'class' => 'elgg-photo',\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => ($eurl?$eurl:$entity->getURL()),\n 'text' => $entity_photo,\n ));\n } \n else if ($entity instanceof ElggUser || $entity instanceof ElggGroup) {\n $icon = elgg_view('output/img', array(\n 'src' => $entity->getIconURL('tiny'),\n 'class' => \"elgg-photo\",\n ));\n $entity_icon = elgg_view('output/url', array(\n 'href' => $entity->getURL(),\n 'text' => $icon,\n ));\n } else {\n $entity_icon = elgg_view_entity_icon($entity, 'tiny', array(\n 'href' => $entity->getURL(),\n 'width' => '',\n 'height' => '',\n 'style' => 'float: left;',\n ));\n }\n $entity->setVolatileData('m_title', $namecleared);\n $entity->setVolatileData('m_description', $description);\n $entity->setVolatileData('m_location', $location);\n $entity->setVolatileData('m_icon', $entity_icon);\n $entity->setVolatileData('m_map_icon', $map_icon);\n if ($eotherinfo) {\n $entity->setVolatileData('m_other_info', $eotherinfo);\n }\n $entity->setVolatileData('m_icon_light', $m_icon_light);\n \n /* hide at the moment as the distance displayed is not well calculated\n if ($user->getLatitude() && $user->getLongitude()) {\n $distance = get_distance($entity->getLatitude(), $entity->getLongitude(), $user->getLatitude(), $user->getLongitude()); // distance in metres\n $distance = round($distance / 1000, 2); // distance in km\n $distance_str = elgg_echo('amap_maps_api:search:proximity', array($user->location, $distance));\n $entity->setVolatileData('distance_from_user', $distance_str);\n } */\n\n return $entity;\n}", "public function viewEntity($entity_id) {\n $account = $this->getAccount();\n return parent::viewEntity($account->uid);\n }", "public function getEntity();", "public function getEntity();", "public function getEntity();", "static public function showArticle($rute){\n return ArticleModel::showArticle($rute);\n }", "public function show(Nominee $nominee)\n {\n //\n }", "public function info(){\n $this->display('Main/Person/info') ;\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SolMantenimientoIdentificacion entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "function firstentity_person( $person ) {\n $content[] = array(\n '#markup' => l( $person->name , 'person/' . $person->person_id )\n );\n $content[] = field_attach_view( 'person' , $person , 'full' );\n return $content;\n}", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('HegesAppNodeBundle:Node')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('NodeController :: showAction :: No existe un nodo con id '.$id);\n }\n \n #$nodename=$entity->getName();\n \n $nodestatus=$em->getRepository('HegesAppNodeBundle:Node')->getovonodestatus($entity->getName());\n $entity->setOvostatus($nodestatus);\n \n //$graph_path=\"http://heges03.ono.es/pnp4nagios/graph?host=\".$entity->getName().\"&srv=GBL_COLLECT_UNIX&view=0&source=1&start=-7days\";\n #http://heges03.ono.es/pnp4nagios/image?host=am01&srv=GBL_COLLECT_UNIX&view=0&source=1&start=-7days\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HegesAppNodeBundle:Node:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n\n ));\n }", "function entity_descr($type, $entity)\n{\n global $config, $entity_cache;\n\n if (is_numeric($entity))\n {\n $entity = get_entity_by_id_cache($type, $entity);\n }\n\n $translate = entity_type_translate_array($type);\n\n $text = $entity[$translate['entity_descr_field']];\n\n return($text);\n}", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('estarRdaBundle:Utente')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Utente entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('estarRdaBundle:Utente:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function mentions(){\n return $this->render('home/mentions.html.twig');\n }", "function display_creator($entity)\n{\n\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\t\t\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\techo '<div class=\"explain\">List of works by this author that are in the knowledge graph.</div>';\n\techo '<div id=\"works\"></div>';\t\t\t\t\t\n\n\n\techo '\n\t\t<script>works_by_creator(\"' . $entity->{'@id'} . '\", \"works\");</script>\n\t\t<script>creator_cocreators(\"' . $entity->{'@id'} . '\", \"creator_cocreators\");</script>\n\t\t<script>creator_containers(\"' . $entity->{'@id'} . '\", \"creator_containers\");</script>\n\t\t<script>creator_taxa(\"' . $entity->{'@id'} . '\", \"creator_taxa\");</script>\n\t\t<script>match_orcid(\"' . $entity->{'@id'} . '\", \"match_orcid\");</script>\n\t\t<script>match_wikispecies(\"' . $entity->{'@id'} . '\", \"match_wikispecies\");</script>\n\t\t<script>match_zoobank(\"' . $entity->{'@id'} . '\", \"match_zoobank\");</script>\n\t';\n}", "public function showAction(Record $record)\n {\n $deleteForm = $this->createDeleteForm($record);\n\n return $this->render('record/show.html.twig', array(\n 'record' => $record,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function mentionsAction()\n {\n return $this->render('sil16VitrineBundle:Default:mentions.html.twig');\n }", "function getAddEntityLabel(){\n\t\treturn null;\n\t}", "public function actionFind()\n\t{\n\t\t$requestedId = craft()->request->getParam('id');\n\t\t// build criteria to find model\n\t\t$criteria = craft()->elements->getCriteria(ElementType::Entry);\n\t\t$criteria->id = $requestedId;\n\t\t$criteria->limit = 1;\n\t\t\n\t\t// fire !\n\t\t$entries = $criteria->find();\n\t\t$entry = count($entries) > 0 ? $entries[0] : null;\n\n\t\t// redirect if possible\n\t\tif($entry && $entry->url) {\n\n\t\t\t// build new query, but remove id from query path\n\t\t\t$newLocation = $entry->url . ( craft()->request->getParam('L') ? '?L='.craft()->request->getParam('L') : '');\n\n\t\t\theader(\"HTTP/1.1 302 Found\"); \n\t\t\theader(\"Location: \" . $newLocation); \n\t\t\texit();\n\t\t}else{\n\t\t\theader(\"HTTP/1.1 404 Not Found\");\n\t\t\theader(\"Location: /404.html\"); \n\t\t\texit();\n\t\t}\n\n\t\tcraft()->end();\n\t}", "function showkid_civicrm_managed(&$entities) {\n return _showkid_civix_civicrm_managed($entities);\n}", "public function actionSeeFindOne(){\n\t\t$id_user = F3::get('PARAMS.id');\n\n\t\t$user = $this->model_users->getUser($id_user);\n\n\t\tif (!empty($user)):\n\t\t\t$data = $this->model_likes->getUserAction($id_user, $action = 'see');\n\n\t\t\tif (!empty($data)):\n\t\t\t\tApi::response(200, $data);\n\t\t\telse:\n\t\t\t\tApi::response(204, 'No movies seen by this user');\n\t\t\tendif;\n\n\t\telse:\n\t\t\tApi::response(400, 'Bad ID : this user doesn\\'t exist');\n\t\tendif;\n\t}", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InfectBackendBundle:Species')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Species entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InfectBackendBundle:Species:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function displayperson() {\r\n if (isset($_GET['id'])) {\r\n $display = $this->model->displayPerson($_GET['id']);\r\n }\r\n return $this->view('/company/displayperson', $display);\r\n }", "public function showIncoherenceInFormAction() {\n $incoherenceRepository = $this->getDoctrine()->getRepository('CoreBundle:IncoherenceLog');\n $incoherences = $incoherenceRepository->findByUser($this->getUser());\n\n return $this->render('@Core/Social/incoherence.html.twig', array(\n 'incoherences' => $incoherences,\n ));\n }", "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetMedicalBundle:actualite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find actualite entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetMedicalBundle:actualite:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),));\n }", "public function show(defence $defence)\n {\n //\n }", "private static function discoverEntity()\n {\n Structure::indexEntity(static::class);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WebBundle:SolMantenimientoIdentificacion')->findOrden();\n\n return $this->render('WebBundle:SolMantenimientoIdentificacion:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function show(ExpenceHead $expenceHead)\n {\n\n }", "public function show()\n {\n return view('admin.company.representative.list');\n }", "public function show(Author $author)\n {\n //\n }", "public function getEntity() {\n\t\treturn 'Custom Cloud Co.';\n\t}", "public function show(Efectivo $efectivo)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ChoferesBundle:Chofer')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Chofer entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ChoferesBundle:Chofer:show.html.twig', array(\n 'entity' => $entity,\n 'css_active' => 'chofer',\n 'delete_form' => $deleteForm->createView(), ));\n }", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackendBundle:Founder')->findAll();\n\n return $this->render('BackendBundle:Founder:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InfectBackendBundle:Species')->findAll();\n\n return $this->render('InfectBackendBundle:Species:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function showAction($id)\n {\n $em \t\t= $this->getDoctrine()->getEntityManager();\n $locale\t\t= $this->container->get('session')->getLocale();\n $entity \t= $em->getRepository(\"PiAppGedmoBundle:Corporation\")->findOneByEntity($locale, $id, 'object');\n \n $type\t = $this->container->get('request')->query->get('type');\n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout) \t$template = \"show.html.twig\"; else $template = \"show.html.twig\"; \n\n if (!$entity) {\n throw ControllerException::NotFoundException('Corporation');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' => $entity,\n 'NoLayout'\t => $NoLayout,\n 'category'\t => $category,\n 'delete_form' => $deleteForm->createView(),\n \t'type'\t\t => $type,\n ));\n }", "public function showDish($identifier);", "public function actionFindUs()\r\n\t{\r\n\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$this->render('findus',array());\r\n\t}", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('evegAppBundle:SyntaxonCore')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SyntaxonCore entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('evegAppBundle:SyntaxonCore:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Ingredient $ingredient)\n {\n //\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InventarioBundle:Bien')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Bien entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InventarioBundle:Bien:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function getShowPersonInfor()\n {\n\n }", "public function show(Uang $uang)\n {\n //\n }", "public function getView() {\n if ($this->entity_type === 'taxonomy_term') {\n $entityLink = url(str_replace('_', '/',\n $this->entity_type) . '/' . $this->entity_id . '/edit');\n\n $term = entity_load($this->entity_type, [(int) $this->entity_id]);\n $vocabularyId = $term[$this->entity_id]->vid;\n $vocabulary = entity_load('taxonomy_vocabulary', [(int) $vocabularyId]);\n $bundle = $vocabulary[$vocabularyId]->machine_name;\n $fieldNameLabel = field_info_instance($this->entity_type,\n $this->field_name,\n $bundle)['label'];\n }\n else {\n $entityLink = url($this->entity_type . '/' . $this->entity_id . '/edit');\n $entity = entity_load($this->entity_type, [(int) $this->entity_id]);\n $bundle = $entity[$this->entity_id]->type;\n $fieldNameLabel = field_info_instance($this->entity_type,\n $this->field_name,\n $bundle)['label'];\n }\n\n $username = $this->user_id ? user_load($this->user_id)->name : 'anonymous';\n\n return [\n 'Report ID' => $this->report_id,\n 'Entity ID' => $this->entity_id,\n 'Revision ID' => $this->revision_id !== '-1' ? $this->revision_id : '',\n 'Entity Type' => $this->entity_type,\n 'Entity Link' => $entityLink,\n 'Date of Create' => $this->date_create,\n 'Field Name Label' => $fieldNameLabel,\n 'Field Name ID' => $this->field_name,\n 'Selected Text' => $this->selected_text,\n 'Username' => $username,\n 'User IP' => $this->user_ip,\n ];\n }", "public function show($id)\n {\n $entity = Entity::with('user')->findOrFail($id);\n\n return view('entities.show', compact('entity'));\n }", "public function show(Conyugue $conyugue)\n {\n //\n }", "public static function show_entities() \n {\n return $_SESSION['_user_vision']['show_entities'];\n }", "public function getEntity($name);", "public function find($entity_id);", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $typeSeance = $em->getRepository('MovibeBackendBundle:TypeSeance')->find($id);\n\n if (!$typeSeance) {\n throw $this->createNotFoundException(\"Le type de séance indiqué n'a pas été trouvé.\");\n }\n\n $pages = array();\n $pages['Types de Séance '] = \"movibe_backend_typeSeance\";\n $pages[$typeSeance->getNom()] = \"\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:TypeSeance:show.html.twig', array(\n 'typeSeance' => $typeSeance\n ));\n }", "protected function displayEntityData()\n {\n\n $this->_query = str_replace(\"\\'\", \"'\", $this->_query);\n $queryToRun = $this->_query;\n $pagingSection = '<table border=\"0\" align=\"center\" CELLSPACING=\"15\">';\n $nextSkip = null;\n $canPage = false;\n if($this->_enablePaging && (isset($_REQUEST['pagingAllowed']) &&\n $_REQUEST['pagingAllowed'] == 'true'))\n {\n $canPage = true;\n $skip = 0;\n if(isset($_REQUEST['skip']))\n {\n $skip = $_REQUEST['skip'];\n }\n\n $parts = parse_url($queryToRun);\n if(isset($parts['query']))\n {\n $queryToRun .= '&$top='.$this->_pageSize.'&$skip=' . $skip;\n }\n else\n {\n $queryToRun .= '?$top='.$this->_pageSize.'&$skip=' . $skip;\n }\n\n $nextSkip = $skip + $this->_pageSize;\n if($nextSkip != $this->_pageSize)\n {\n $prev = $skip - $this->_pageSize;\n $pagingSection .= \"<td><a href=\\\"\" . $this->_containerScriptName\n . \"?query=\"\n . $this->_query\n . \"&serviceUri=\"\n . $this->_uri\n . '&skip=' . $prev\n . '&pagingAllowed=true'\n . \"\\\">Prev</a></td>\";\n }\n }\n\n $response = $this->_proxyObject->Execute($queryToRun);\n $resultSet = $response->Result;\n echo \"<br><br><table style=\\\"border: thin solid #C0C0C0;\\\" border=\\\"1\\\">\";\n if (count($resultSet) > 0)\n {\n $propertyArray = WCFDataServicesEntity::getProperties($resultSet[0]);\n $this->displayHeader($propertyArray, $resultSet[0]);\n foreach ($resultSet as $result)\n {\n echo \"<tr style=\\\"font-family: Calibri; \"\n . \"background-color: #CCFFFF\\\">\";\n WCFDataServicesEntity::getDetailButtonText($result);\n foreach ($propertyArray as $property)\n {\n $prop = new ReflectionProperty($result, $property);\n $propertyAttributes = Utility::getAttributes($prop);\n if ($propertyAttributes['Type'] == 'NavigationProperty')\n {\n $pagingAllowed = 'pagingAllowed=true';\n $relationShip = $this->_proxyObject->GetRelationShip($propertyAttributes[\"Relationship\"],\n $propertyAttributes[\"ToRole\"]);\n if($relationShip != '*')\n {\n $pagingAllowed = 'pagingAllowed=false';\n }\n\n $skip = null;\n if(isset($_REQUEST['skip']))\n {\n $skip = '&skip=' . $_REQUEST['skip'];\n }\n\n $pagingAllowedWhileAttaching = null;\n if(isset($_GET['pagingAllowed']))\n {\n $pagingAllowedWhileAttaching =\n '&pagingAllowed=' . $_GET['pagingAllowed'];\n }\n\n echo \"<td>\";\n $relatedLinks = $result->getRelatedLinks();\n $finalQuery = $relatedLinks[$property];\n $finalQuery = str_replace(\"%20\", '',$finalQuery);\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $finalQuery\n . '&' . $pagingAllowed\n . $skip\n . \"&serviceUri=\"\n . $this->_uri\n .\"\\\">\"\n . $property\n . \"</a>\";\n echo \"<br><a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $this->_query\n . $pagingAllowedWhileAttaching\n . $skip\n . \"&serviceUri=\"\n . $this->_uri\n . \"&Type=\"\n . $property\n . \"&AttachTo=\"\n . $finalQuery\n . \"\\\"> Add Link </a>\";\n echo \"</td>\";\n }\n else\n {\n $propertyAttributes = Utility::getAttributes($prop);\n if(isset($propertyAttributes['EdmType']) &&\n ($index = strpos($propertyAttributes['EdmType'], 'Edm.')) !== 0)\n\n {\n $value = $prop->getValue($result);\n $type = ClientType::Create(get_class($value));\n $nonEpmProperties = $type->getRawNonEPMProperties(true);\n echo '<td><table style=\"border: thin solid #C0C0C0;\" border=\"1\">';\n foreach($nonEpmProperties as $nonEpmProperty)\n {\n $propertyName = $nonEpmProperty->getName();\n $refProperty = new ReflectionProperty($value, $propertyName);\n $propertyValue = $refProperty->getValue($value);\n echo '<tr><td>';\n echo $propertyValue;\n echo '</td></tr>';\n }\n echo '</table></td>';\n }\n else\n {\n if (Utility::ContainAttribute($prop->getDocComment(),\n 'Binary'))\n {\n // TODO: Display image in the cell\n echo \"<td>Image</td>\";\n }\n else\n {\n $value = $prop->getValue($result);\n if ($value == '')\n {\n $value = 'null';\n }\n echo \"<td>\"\n . $value\n . \"</td>\";\n }\n }\n }\n }\n echo \"</tr>\";\n }\n\n if($canPage)\n {\n $pagingSection .= \"<td><a href=\\\"\" . $this->_containerScriptName\n . \"?query=\"\n . $this->_query\n . \"&serviceUri=\"\n . $this->_uri\n . '&skip=' . $nextSkip\n . '&pagingAllowed=true'\n . \"\\\">Next</a></td><tr/></table>\";\n }\n }\n\n if($canPage)\n {\n echo $pagingSection;\n }\n echo \"</table><br><br>\";\n }", "public function displayRecipe()\n {\n return $this->title . \"by\" . $this->source;\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SMAdminBundle:News')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException($this->get('translator')->trans('Unable to find entity'));\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SMAdminBundle:News:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),));\n }", "function __renderEntity($entity,$action,$data){\r\n\tTemplate::getInstance()->renderEntity($entity,$action,$data);\r\n}", "public function showAction($id)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entity = $em->getRepository('NovuscomCMFBundle:Element')->find($id);\n\n\t\tif (!$entity) {\n\t\t\tthrow $this->createNotFoundException('Unable to find Element entity.');\n\t\t}\n\t\t$deleteForm = $this->createDeleteForm($id);\n\n\t\treturn $this->render('NovuscomCMFBundle:Element:show.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'delete_form' => $deleteForm->createView(),));\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BaseBundle:Feriado')->findAll();\n\n return $this->render('BaseBundle:Feriado:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function favoriteAction()\n\t{\n\t\t$favorite = $this->get('flash.session_notice_manager')->getFavoris();\n\n\t\tif(count($favorite) !== 0 ) {\n\t\t\t$em = $this->getDoctrine()->getRepository('JocondeLabBundle:CoreNotice');\n\t\t\t$notices = $em->findById($favorite);\n\t\t} else {\n\t\t\t$notices = 0;\n\t\t}\n\n\t\treturn $this->render('JocondeLabBundle:Notice:favorite.html.twig', array(\"notices\" => $notices));\n\t}", "public function showAction(Entreprise $entreprise)\n {\n $deleteForm = $this->createDeleteForm($entreprise);\n\n return $this->render('entreprise/show.html.twig', array(\n 'entreprise' => $entreprise,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function show(Incidencia $incidencia)\n {\n //\n }", "public function getGeneralMessage()\n {\n return \"Entity Not Found\";\n }", "protected function renderInformationContent() {}", "public function TresorieEntreprise() {\n \n $em = $this->getDoctrine()->getManager();\n $entityEntreprise= $em->getRepository('RuffeCardUserGestionBundle:Entreprise')->findClientNoPaiment();\n return $this->render ( \"RuffeCardTresorieBundle:Default:entreprisePaiement.html.twig\", array ('Entreprise'=>$entityEntreprise));\n \n }", "private function getEntityLabel( $type )\n {\n return $this->getConf( \"entities.\" . $type . \".labels.entity.name\" ) ;\n }", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CrestaAulasBundle:Aula')->find($id);\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Aula entity.');\n }\n $deleteForm = $this->createDeleteForm($id);\n return $this->render('CrestaAulasBundle:Aula:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "function get_linked_entity_name($entity) {\n\tif (elgg_instanceof($entity)) {\n\t\treturn elgg_view('output/url', array(\n\t\t\t'text' => $entity->getDisplayName(),\n\t\t\t'href' => $entity->getURL(),\n\t\t\t'is_trusted' => true,\n\t\t));\n\t}\n\treturn '';\n}", "function au_show_entry(){\n\n\t// Praise the big $aulis\n\tglobal $aulis;\n\n\t// We can't access this file, if not from index.php, so let's check\n\tif(!defined('aulis'))\n\t\theader(\"Location: index.php\");\n\n\t// We need to decrypt the blog id, if numeric\n\tif(isset($_GET['id']) and is_numeric($_GET['id']))\n\t\t$entry_id = au_decrypt_blog_id($_GET['id']);\n\t// No id...\n\telse\n\t\t$entry_id = 0;\n\n\t// Try to obtain the entry from the big (or small, it all depends) database\n\tif($aulis['blog']['entry'] = au_get_blog_entry($entry_id)){\n\n\t\t// Prepare some url inputs\n\t\t$aulis['blog']['url_input'] = array(\n\t\t\t\"app\" => \"blogentry\",\n\t\t\t\"id\" => $aulis['blog']['entry']->entry_id,\n\t\t\t\"title\" => $aulis['blog']['entry']->blog_name\n\t\t);\n\n\t\t// Load the template\n\t\tau_load_template(\"blog_entry\");\n\n\t}\n\n\t// Bummer... we have to dissappoint them :'(\n\telse\n\t\tau_error_box(BLOG_NOT_FOUND);\n\n}", "public function show(cardface_classofcreature_atag $cardface_classofcreature_atag){\n // enter your stuff here if you want...\n\treturn(parent::show($cardface_classofcreature_atag));\n }", "function viewElements($entity_type, $entity, $field, $instance, $langcode, $items, $display);" ]
[ "0.589338", "0.5826252", "0.5769153", "0.57076967", "0.5543662", "0.5534439", "0.552488", "0.54533803", "0.5352193", "0.5352193", "0.5312188", "0.5304867", "0.5292043", "0.52776587", "0.5272679", "0.527191", "0.52689534", "0.52687246", "0.52607197", "0.522751", "0.520634", "0.51947355", "0.51846915", "0.51751196", "0.517241", "0.5157154", "0.5147761", "0.5144519", "0.51356584", "0.5128051", "0.5128051", "0.5128051", "0.51210856", "0.511593", "0.5109019", "0.51069474", "0.51030964", "0.50997937", "0.5093254", "0.5091934", "0.5076797", "0.50747895", "0.5070107", "0.5064095", "0.50595915", "0.5051846", "0.505105", "0.5050684", "0.50498205", "0.5044384", "0.5035341", "0.5031315", "0.5031235", "0.5021426", "0.501542", "0.5012824", "0.5010903", "0.50105804", "0.5010177", "0.5009084", "0.49937195", "0.4992408", "0.49894312", "0.4988532", "0.4986806", "0.4986682", "0.49738863", "0.49717933", "0.49709904", "0.49693462", "0.49682164", "0.49667814", "0.49608082", "0.49601686", "0.49546164", "0.49458274", "0.49447113", "0.49380836", "0.493636", "0.4936146", "0.49335945", "0.49326375", "0.49291515", "0.49258885", "0.49257118", "0.49207664", "0.49153847", "0.4914934", "0.4914934", "0.4914934", "0.4914934", "0.49119458", "0.49091655", "0.4906616", "0.4905127", "0.49024782", "0.49012288", "0.48982978", "0.48973376", "0.48947763" ]
0.5742392
3
Displays a form to edit an existing indicateur entity.
public function editAction(Request $request, Indicateur $indicateur) { $deleteForm = $this->createDeleteForm($indicateur); if (isset($_POST['submit'])) { if (empty($_POST['categorie']) || empty($_POST['dateIndi']) || empty($_POST['libelle']) || empty($_POST['mode']) || empty($_POST['periodicite']) || empty($_POST['niveau']) || empty($_POST['reference']) || empty($_POST['sousCategorie']) || empty($_POST['typeData']) || empty($_POST['typeIndicateur']) || empty($_POST['unite'])) { echo "<br/><br/><br/><font color='red'>Veuillez remplir tous les champs.</font><br/>"; //link to the previous page echo "<br/><a href='javascript:self.history.back();'>Retour</a>"; } else { // if all the fields are filled (not empty) //insert data to database $indicateur->setCategorie($_POST['categorie']); $indicateur->setDateIndi($_POST['dateIndi']); $indicateur->setLibelle($_POST['libelle']); $indicateur->setMode($_POST['mode']); $indicateur->setPeriodicite($_POST['periodicite']); $indicateur->setNiveau($_POST['niveau']); $indicateur->setReference($_POST['reference']); $indicateur->setSousCategorie($_POST['sousCategorie']); $indicateur->setTypeData($_POST['typeData']); $indicateur->setTypeIndicateur($_POST['typeIndicateur']); $indicateur->setUnite($_POST['unite']); $em = $this->getDoctrine()->getManager(); $em->persist($indicateur); $em->flush(); echo "<font color='green'>Data added successfully."; return $this->redirectToRoute('indicateur_edit', array('id' => $indicateur->getId())); } } return $this->render('form_dci/indicateur/edit.html.twig', array( 'indicateur' => $indicateur, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function edit(form $form)\n {\n //\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "public function edit(Form $form)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('uniRecetasBundle:ingrediente')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ingrediente entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('uniRecetasBundle:ingrediente:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function modifyAction()\n {\n\n $id = $this->get('security.context')->getToken()->getUser()->getId();\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->findOneBy(array('user'=>$id));\n\n if (!$entity) {\n return $this->redirect($this->generateUrl('education_new'));\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n\n ));\n }", "public function edit($model, $form);", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }", "public function edit(FangOwner $fangOwner)\n {\n\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EncuestaBundle:Encuesta')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Encuesta entity.');\n }\n\n\n\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EncuestaBundle:Encuesta:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit(Entrenador $entrenador)\n {\n //\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit(SuratKeteranganBiodataPenduduk $suratKeteranganBiodataPenduduk)\n {\n //\n }", "public function edit(Feriado $feriado)\n {\n //\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('InventarioBundle:Bien')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Bien entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('InventarioBundle:Bien:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function edit(Asignatura $asignatura)\n {\n //\n }", "public function editAction() {}", "public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }", "public function editAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n $entities = $this->_transformAllConfigEntities($entities);\n $form = $this->createForm(new ConfigType(), array(\n 'configentities' => $entities,\n ));\n\n return array(\n 'form' => $form->createView(),\n );\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionPassBundle:Fluidite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fluidite entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionPassBundle:Fluidite:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CrestaAulasBundle:Aula')->find($id);\n if (!$entity) {\n throw $this->createNotFoundException('No se puede encontrar la entidad Aula.');\n }\n \n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n return $this->render('CrestaAulasBundle:Aula:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function showEdit()\n {\n\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit(Artist $artist)\n {\n //\n }", "public function edit(Artist $artist)\n {\n //\n }", "public function edit(Enfant $enfant)\n {\n //\n }", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function editAction($id)\n {\n\n //echo $this->getDoctrine()->getRepository('SyndicateComponentBundle:Education')->getGeoCode();\n //exit;\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Education entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Laboratoire $laboratoire)\n {\n //\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionFraisBundle:Visiteur')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Visiteur entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionFraisBundle:Visiteur:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Instituicao $instituicao)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit() {\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit()\n {\n \n \n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction($id)\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SytemSGBundle:Grupos')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Grupos entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id); \n return $this->render('SytemSGBundle:Grupos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n\t{\n\t\t//\n\t}", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function actionEdit($id) { }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function edit()\r\n\t{\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\r\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $this->getFacture($em, $id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Facture entity.');\n }\n\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $editForm = $this->createForm($factureType, $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('chevPensionBundle:Facture:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Faltante $faltante)\n {\n //\n }", "public function editAction($id) {\n $usuario = $this->container->get('security.context')->getToken()->getUser();\n\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('TxinbometroBundle:Gasolina')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Gasolina entity.');\n }\n\n if ($entity->getVehiculo()->getUsuario()->getId() != $usuario->getId()) {\n throw $this->createNotFoundException('Unable to access Gasolina entity.');\n }\n\n\n $editForm = $this->createForm(new GasolinaType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('TxinbometroBundle:Gasolina:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function editAction()\n {\n $ctrlRow = new Admin_Model_DbRow_Controller($this->dbCtrl->find($this->checkControllerIdParam()));\n $form = new Admin_Form_Controller_Edit($ctrlRow);\n\n IF($this->getRequest()->isPost()) {\n IF($form->isValid($this->getRequest()->getParams())) {\n $ctrlRow->fromArray(array(\n 'description' => $this->getRequest()->getParam('description')\n ));\n $this->dbCtrl->update($ctrlRow->toDbArray(array('description')), $ctrlRow->get('id'));\n \n $this->_redirect('admin/controller/index');\n }\n }\n\n $this->view->form = $form;\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function edit()\n {\n $id = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $post = $this->post->getPost($id); // je récupère le post\n\n // j'arrive en post car des données sont saisies dans le formulaire\n if($this->request->parameterExist('title') && $this->request->parameterExist('content')) {\n\n $this->post->updatePost(\n $this->request->getParameter('title'),\n $this->request->getParameter('content'),\n $id\n );\n\n $this->redirect(\"admin\", \"post/\" . $post['id']); // une fois le post créé, je redirige vers la vue Admin/post/iddupost\n }\n\n // j'arrive sur la vue en Get\n $this->buildView(array('post'=>$post));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}", "public function edit(Insurance $insurance)\n {\n //\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetMedicalBundle:actualite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find actualite entity.');\n }\n\n $editForm = $this->createForm(new actualiteType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetMedicalBundle:actualite:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Conyugue $conyugue)\n {\n //\n }", "public function edit()\n {\n if (Entry::canCreateOrEdit() === false) {\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the competition has now started and entries cannot be changed.\");\n }\n\n $entry = $this->getEntry();\n\n if ($entry) {\n return View::make('entry.edit')\n ->with('entry', $entry);\n }\n\n return Redirect::route('entry.index');\n }", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\n\n }", "public function getEditForm();", "public function edit()\n {\n return view('website::edit');\n }", "public function edit(Articulo $articulo)\n {\n //\n }", "public function edit(Articulo $articulo)\n {\n //\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $tagNames = array();\n foreach ($model->fetchTags($photo) as $tag) {\n $tagNames[] = $tag->name;\n }\n\n $form = $model->getForm();\n $form->setAction($this->_helper->url('update', null, null, array('id' => $photo->id)));\n $form->setDefault('tags', implode(',', $tagNames));\n $form->populate($photo->toArray());\n\n $this->view->photo = $photo;\n $this->view->photoForm = $form;\n }", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit()\n {\n \n }" ]
[ "0.73677313", "0.70639956", "0.7004505", "0.696161", "0.69508564", "0.6937135", "0.6910018", "0.6895781", "0.68956107", "0.68910456", "0.68842286", "0.6878072", "0.68663514", "0.6857535", "0.6842742", "0.6801082", "0.6770395", "0.6753216", "0.67456406", "0.67416", "0.67416", "0.6741449", "0.6737446", "0.67373013", "0.6730858", "0.67307377", "0.6720786", "0.67204165", "0.6709583", "0.66921943", "0.6687026", "0.6674846", "0.6665027", "0.6645948", "0.6645645", "0.66327244", "0.6632026", "0.6624769", "0.6623143", "0.6618168", "0.6612506", "0.66107357", "0.6610317", "0.66079265", "0.66075957", "0.6604155", "0.6603424", "0.66033804", "0.66033804", "0.6600207", "0.6599708", "0.65995675", "0.65995675", "0.6587328", "0.65872", "0.65798426", "0.6578628", "0.65725327", "0.6572188", "0.65684396", "0.6565108", "0.65547", "0.65545064", "0.6553603", "0.6552156", "0.6542573", "0.6541179", "0.6535408", "0.6529269", "0.6529188", "0.652423", "0.6519758", "0.65141964", "0.65087277", "0.650846", "0.65083027", "0.65058327", "0.6504054", "0.6504054", "0.64957005", "0.64954334", "0.6495228", "0.6494996", "0.64939004", "0.64935833", "0.648873", "0.64809495", "0.6478636", "0.6478582", "0.647846", "0.6469269", "0.6468743", "0.6468743", "0.64684194", "0.6465903", "0.6460953", "0.64600897", "0.6458531", "0.6452453", "0.6442658", "0.64411426" ]
0.0
-1
Deletes a indicateur entity.
public function deleteAction(Request $request, Indicateur $indicateur) { $form = $this->createDeleteForm($indicateur); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($indicateur); $em->flush(); } return $this->redirectToRoute('indicateur_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function delete($entity);", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function delete($entity)\n {\n \n }", "public function Delete($entity) {\n }", "public function delete(DimeEntityInterface $entity);", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "public function delete($entity) : bool;", "public function delete(DataObject $entity){\n }", "function delete(IContract $entity);", "public function delete(IndexableEntity $entity);", "public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }", "public function delete($entity)\n {\n $this->getObjectManager()->remove($entity);\n $this->getObjectManager()->flush();\n }", "public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}", "public function delete(EntityInterface $Entity);", "public function deleteEntity($entity): void\n {\n /** @var EntityRepository $repository */\n $repository = Prime::repository($entity);\n $mapper = $repository->mapper();\n\n $isReadOnly = $mapper->isReadOnly();\n $mapper->setReadOnly(false);\n\n $repository->disableEventNotifier();\n $repository->delete($entity);\n $repository->enableEventNotifier();\n\n $mapper->setReadOnly($isReadOnly);\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "protected static function deleteEntity(\\ElggEntity $entity) {\n\n\t\tif (!$entity->getPrivateSetting(ELASTICSEARCH_INDEXED_NAME)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$client = elasticsearch_get_client();\n\t\tif (empty($client)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\telasticsearch_add_document_for_deletion($entity->getGUID(), [\n\t\t\t'_index' => $client->getIndex(),\n\t\t\t'_type' => $client->getDocumentTypeFromEntity($entity),\n\t\t\t'_id' => $entity->getGUID(),\n\t\t]);\n\t}", "public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function delete(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n return $table->delete($table->getAdapter()->quoteInto('id = ?',$entity->id));\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete($entity)\n {\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::PRE_DELETE,\n new TrackingHistoryEvent($entity)\n );\n\n parent::delete($entity);\n\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::POST_DELETE,\n new TrackingHistoryEvent($entity)\n );\n }", "public static function delete($entity)\n {\n return static::mapper()->delete($entity);\n }", "public function delete(string $entityId): void;", "public function postRemove($entity);", "public function delete($Enterprise) { ; }", "public function delete($entity){\n\n if(is_numeric($entity))\n {\n $entity = $this->findOrFail($entity);\n }\n $entity->delete();\n return $entity;\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function deleting(Seguimiento $Seguimiento){\n \n }", "public function deleteEntity($obj)\n\t{\n\t\t$this->db->deleteEntity($obj);\n\t}", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function deleteById($entityId);", "public function deleteById($entityId);", "abstract public function delete(Entity $oMappedEntity);", "public function deleteModel($entity){\n $this->entityManager->remove($entity);\n $this->entityManager->flush();\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function delete ()\n {\n\n try {\n \n } catch (Exception $e) {\n\n throw $e;\n }\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "public function delete()\n {\n \n }", "public function deleteEntity($eid)\n {\n $this->getConnectionService()->deleteById($eid);\n }", "public function delete($objet);", "public function delete() {\r\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function DELETE() {\n #\n }", "public function deleting()\n {\n # code...\n }", "public function deleteRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getDeleteRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// delete\n\t\t\t\t$this->getHandler()->delete($record);\n\n\n\t\t\t\t$msg = new Message('You have successful delete a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function delete(AbstractEntity $entity)\n\t{\n\t\tif(!$this->isValidEntity($entity))\n\t\t{\n\t\t\tthrow new \\Exception('The specified entity is not allowed for this mapper. (' . get_class($entity) . ')');\n\t\t}\n\t\t\n\t\t$aCriterias['id'][] = array(\n\t\t\t'operator'\t=> '=',\n\t\t\t'value'\t\t=> $entity->id\n\t\t);\n\t\t\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields);\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\t\n\t\t$sWhere\t\t= $this->compileClauseStrings(array(\n\t\t\t\t\t\t\t$this->getClauseStrings($aCriterias),\n\t\t\t\t\t\t\t$this->compileClauseStrings($this->_cascadeFields)\n\t\t\t\t\t));\n\t\t\t\t\t\n\t\treturn $this->_adapter->delete($aTables, $sWhere);\n\t}", "public function delete()\n {\n \n }", "public static function DeleteById($entity)\n {\n //When the precedent is GetById\n if(isset(StorageManager::$entities[$entity->Alias]))\n {\n unset(StorageManager::$entities[$entity->Alias][$entity->IdEntite]);\n }\n\n //When the precedent request is getByArg\n $stores = StorageManager::Find($entity);\n\n if(count($store) > 0 )\n {\n foreach($stores as $store)\n {\n if(isset($store::$entities))\n {\n unset($store::$entities[$entity->Alias][$entity->IdEntite]);\n }\n }\n }\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function entityDelete(EntityInterface $entity) {\n if (($entity_type = $entity->getEntityTypeId()) == \\Drupal::config('recurly.settings')->get('recurly_entity_type')) {\n // Check for a local account first, no need to attempt to close an account\n // if we don't have any information about it.\n $local_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()], TRUE);\n if ($local_account) {\n $recurly_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()]);\n recurly_account_delete($recurly_account);\n }\n }\n }", "public function delete()\r\n\t{\r\n\t}", "public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}", "public function delete()\n {\n //\n }", "public function getDeleteResponse($entity);", "function remove(iEntityComment $entity);", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "public function deleteById($ingredientId);", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock\\Common\\Logger::info('Deleting record with query: ' . $sql); echo $sql;\n\t\t\t\t$this->_connection->exec($sql);\n\t\t\t}\n\t\t\telseif($this->_state == self::STATE_CHANGED) {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Unsaved changes found, cannot delete record.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Record not found in database.');\n\t\t\t}\n\t\t}\n\t\tcatch(\\PDOException $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('A database error was encountered, the record could not be deleted.');\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The record could not be deleted.');\n\t\t}\n\t}", "public function deleteEntity($entityId)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->delete()\n ->go();\n }", "public abstract function delete();", "public function delete($oneOrManyEntities): void;", "public function deleteAction() {\n $logger = $this->get('logger');\n if (!$this->get('request')->isXmlHttpRequest()) { // Is the request an ajax one?\n return new Response(\"<b>Not an ajax call!!!\" . \"</b>\");\n }\n\n try {\n //Get parameters\n $request = $this->get('request');\n $id = $request->get('id');\n $entity = $request->get('entity');\n $translator = $this->get(\"translator\");\n\n if( isset($id) ){\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TecnotekAsiloBundle:User')->find($id);\n if( isset($user) ) {\n $em->remove($user);\n $em->flush();\n return new Response(json_encode(array(\n 'error' => false,\n 'msg' => $translator->trans('catalog.delete.success'))));\n } else {\n return new Response(json_encode(array(\n 'error' => true,\n 'msg' => $translator->trans('validation.not.found'))));\n }\n } else {\n return new Response(json_encode(array('error' => true, 'msg' => \"Missing Parameters\")));\n }\n } catch (Exception $e) {\n $info = toString($e);\n $logger->err('Catalog::deleteAction [' . $info . \"]\");\n return new Response(json_encode(array('error' => true, 'msg' => $info)));\n }\n }", "public function afterDelete(&$id, Entity $entity) { }", "public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public final function delete() {\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();" ]
[ "0.78184307", "0.77394885", "0.7645768", "0.7617934", "0.7478385", "0.73692524", "0.7254621", "0.7187086", "0.7103939", "0.70427334", "0.7027476", "0.69423", "0.6912483", "0.6852977", "0.6845931", "0.683651", "0.68364656", "0.6768824", "0.6763635", "0.6673426", "0.66479886", "0.6644238", "0.6613715", "0.6602492", "0.6596176", "0.6581712", "0.65698737", "0.6544769", "0.65183", "0.6496829", "0.64673734", "0.6441513", "0.6434608", "0.6400297", "0.63904655", "0.6384299", "0.6384299", "0.6380594", "0.6342579", "0.6340663", "0.6323596", "0.6323117", "0.63031495", "0.62700176", "0.62488055", "0.6248751", "0.6248157", "0.62414527", "0.6240457", "0.6234717", "0.6231929", "0.6230904", "0.6210675", "0.62091684", "0.62036824", "0.620297", "0.6192418", "0.61918575", "0.61907583", "0.6182187", "0.6181223", "0.6178075", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.6177259", "0.61763257", "0.61763257", "0.6175706", "0.6174795", "0.6173194", "0.61685795", "0.6161007", "0.6158268", "0.6152342", "0.6150466", "0.61451364", "0.61374235", "0.61334586", "0.61299425", "0.6126308", "0.612004", "0.61156774", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284", "0.6109284" ]
0.6594235
25
Creates a form to delete a indicateur entity.
private function createDeleteForm(Indicateur $indicateur) { return $this->createFormBuilder() ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(Plateformes $plateforme)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_plateformes_delete', array('id' => $plateforme->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(voyageur $voyageur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('voyageur_delete', array('id' => $voyageur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }", "private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Personnage $personnage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnage_delete', array('id' => $personnage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Tipoanuncio $tipoanuncio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipoanuncio_delete', array('id' => $tipoanuncio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private\n function createAnnonceeDeleteForm(Annonce $annonce)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annoncee_delete', array('id' => $annonce->getAnnonceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Nature $nature)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nature_delete', array('id' => $nature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Estancia $estancium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estancia_delete', array('id' => $estancium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Entreprise $entreprise)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $entreprise->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Care $care)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('care_delete', array('id' => $care->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Cuisine $cuisine)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cuisine_delete', array('id' => $cuisine->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createPaiementDeleteForm(Paiement $paiement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annoncee_delete', array('id' => $paiement->getPaiementId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(DatParteDesvio $datParteDesvio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partedesvio_delete', array('id' => $datParteDesvio->getIdparte())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Feuil $feuil)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feuil_delete', array('id' => $feuil->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('medicamentossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('com_incident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer','attr'=>array('class'=>'btn btn-danger','style'=>'width:100px;')))\n ->getForm()\n ;\n }", "private function createDeleteForm(AskInfo $askInfo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('askinfo_delete', array('id' => $askInfo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(FroFacTransferencia $froFacTransferencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frofactransferencia_delete', array('id' => $froFacTransferencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Musicien $musicien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('musicien_delete', array('codeMusicien' => $musicien->getCodemusicien())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_missatges_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoasignar_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR ASIGNACION'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }", "private function createDeleteForm(Facture $facture)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('facture_delete', array('id' => $facture->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(Projecte $projecte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('projecte_delete', array('id' => $projecte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Paragenese $paragenese)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('paragenese_delete', array('id' => $paragenese->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Record $record)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eval_record_delete', array('id' => $record->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifdainformeordentrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar informe'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Extra $extra)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('extra_delete', array('id' => $extra->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Instrumentation $instrumentation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('instrumentation_delete', array('code' => $instrumentation->getCode())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Information $information)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('api_info_delete', array('id' => $information->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(CargoSubDivisao $vaga)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pessoal_gerenciar_vagas_delete', array('id' => $vaga->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Frequencia $frequencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_frequencia_delete', array('id' => $frequencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(RendezVous $rendezVous)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('r_delete', array('id' => $rendezVous->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\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 ;\n }", "private function createDeleteForm(Personas $persona)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personas_delete', array('id' => $persona->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admtipoaporte_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Eliminar','attr'=>array('class'=>'btn btn-danger')))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Hogar $hogar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hogar_delete', array('id' => $hogar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Claim $claim)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('claim_delete', array('id' => $claim->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Superficie $superficie)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('superficie_delete', array('id' => $superficie->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Bien $bien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_bien_delete', array('id' => $bien->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Imagen $imagen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('imagen_delete', array('id' => $imagen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Historique $historique)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('historique_delete', array('id' => $historique->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createAgenceeDeleteForm(Agence $agence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('agencee_delete', array('id' => $agence->getAgenceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Partenaire $partenaire)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partenaire_delete', array('id' => $partenaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(RelationUserEntite $relationUserEntite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('relationuserentite_delete', array('id' => $relationUserEntite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\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 }", "private function createDeleteForm(Visita $visitum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visita_delete', array('id' => $visitum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fichepatient_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'bttn')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Situation $situation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('situation_delete', array('id' => $situation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Beer $beer)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('beer_delete', array('id' => $beer->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ArmasMedico $armasMedico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('armasmedico_delete', array('id' => $armasMedico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('klasses_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('localbanner_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'title.sim', 'translation_domain' => 'messagesCommonBundle', 'attr' => array('class' => 'btn btn-success btn-lg bt-delete-foto')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Fita $fitum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_fita_delete', array('id' => $fitum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Releve $releve)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('releve_delete', array('id' => $releve->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Proprietaire $proprietaire) {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('post_admin_delete', array('id' => $proprietaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Demandados $demandado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandados_delete', array('id' => $demandado->getIdDemandado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fluidite_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n ))\n \n )\n \n \n ->getForm()\n ;\n }", "private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingrediente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "private function createDeleteForm(Torniquete $torniquete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('torniquete_delete', array('id' => $torniquete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clientecredito_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }" ]
[ "0.74257165", "0.7380462", "0.7135961", "0.71214646", "0.70854574", "0.70659864", "0.7058775", "0.70453566", "0.703772", "0.6994962", "0.6994265", "0.6990275", "0.6985689", "0.6983248", "0.6962638", "0.6957569", "0.6957144", "0.69505435", "0.6947112", "0.6944443", "0.6932215", "0.6906107", "0.6887165", "0.6879681", "0.68785244", "0.686696", "0.6865125", "0.68620855", "0.6855595", "0.6853067", "0.68385386", "0.6834429", "0.683376", "0.68304557", "0.6830328", "0.6828483", "0.68279517", "0.68238145", "0.68214685", "0.6801461", "0.68009686", "0.67980355", "0.67918116", "0.67913157", "0.6791026", "0.6784408", "0.6782867", "0.6782506", "0.6782371", "0.67772615", "0.67770404", "0.6775882", "0.67727125", "0.67717284", "0.67715144", "0.67581123", "0.6755857", "0.6751669", "0.674363", "0.67429477", "0.6741691", "0.67404044", "0.67397696", "0.6738289", "0.67373276", "0.67346954", "0.67332244", "0.6731869", "0.67173326", "0.6714595", "0.6710045", "0.6702282", "0.67012376", "0.6696822", "0.6695475", "0.66913545", "0.66876906", "0.66801614", "0.66774786", "0.6677358", "0.66769975", "0.667661", "0.6672481", "0.66715264", "0.666909", "0.66680527", "0.6663726", "0.6661123", "0.6657008", "0.6656592", "0.665621", "0.6655083", "0.6649142", "0.66435504", "0.66423947", "0.66410506", "0.66396993", "0.6638388", "0.66373026", "0.6635026" ]
0.7885548
0
return an array of name value pairs to send data to the template
function executeIndex($request) { $data = array(); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getTemplateArgs(): array\n {\n $starting_view = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['starting_view']);\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $args = [\n 'envelope_id' => $envelope_id,\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'starting_view' => $starting_view,\n 'ds_return_url' => $GLOBALS['app_url'] . 'index.php?page=ds_return'\n ];\n\n return $args;\n }", "public function templateData() {\n return array();\n }", "private function getTemplateArgs(): array\n {\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $envelope_documents = isset($_SESSION['envelope_documents']) ? $_SESSION['envelope_documents'] : false;\n $document_id = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['document_id' ]);\n $args = [\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'envelope_id' => $envelope_id,\n 'document_id' => $document_id,\n 'envelope_documents' => $envelope_documents\n ];\n\n return $args;\n }", "private function getTemplateArgs(): array\n {\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $args = [\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'envelope_id' => $envelope_id\n ];\n\n return $args;\n }", "public function templateStrings(){\n \n foreach($this->rules as $field => $rules){\n $array[$field] = array(\n 'rules' => $this->renderRules($field),\n 'value' => $this->value($field) \n );\n }\n \n $array['form_token'] = $this->renderToken();\n \n return $array;\n }", "protected function makeData()\n {\n return Arr::collapse([\n $this->template->getQueryData(),\n [\n 'apiKey' => $this->apiKey,\n 'to' => implode(', ', (array) $this->getRecipientEmails())\n ]\n ]);\n }", "public function getTemplateVariables(): array;", "protected function getDataTemplate()\n {\n $mainProduct = Mage::registry('current_product');\n if (!$mainProduct) {\n return array();\n }\n\n $idFieldName = Mage::helper('factfinder_tracking')->getIdFieldName();\n\n $dataTemplate = array(\n 'mainId' => $mainProduct->getData($idFieldName),\n 'event' => self::EVENT_NAME\n );\n\n return $dataTemplate;\n }", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "public function getData(): array\n {\n $data = parent::getData();\n $data['Username'] = $this->getUsername();\n $data['PaymentType'] = 6; //Binding\n\n return $data;\n }", "private function getTemplateData(Enlight_Event_EventArgs $arguments)\n {\n $template = Shopware()->Template();\n /**@var $view Enlight_View_Default */\n $view = $arguments->getSubject()->View();\n $viewTemplate = $view->Template();\n\n $data = array(\n 'Loaded templates' => explode('|', $viewTemplate->template_resource),\n 'Cache directory' => $template->getCacheDir(),\n 'Compile directory' => $template->getCompileDir(),\n 'Config directory' => $template->getConfigDir(),\n 'Config variables' => $template->getConfigVars(),\n 'Debug template' => $template->getDebugTemplate(),\n 'Plugin directories' => $template->getPluginsDir(),\n 'Template directories' => $template->getTemplateDir(),\n 'Assignments' => $view->getAssign(),\n );\n\n return $data;\n }", "private function _init()\n\t{\n\t\t$data = array();\n\t\t$data['CONTROLLER_NAME'] = $this->controllerTemplate->get_name();\n\t\t$data['VIEW_NAME'] = $this->viewTemplate->get_name();\n\t\t$data['VIEW_NAME_LINK'] = $this->viewTemplate->get_link();\n\t\t$data['MODEL_NAME'] = $this->modelTemplate->get_name();\n\t\t$data['TABLE_VIEW'] = $this->tableTemplate->get_name();\n\t\t$data['TABLE_VIEW_LINK'] = $this->tableTemplate->get_link();\n\t\t$data['DB_TABLE_NAME'] = $this->model->get_table_name();\n\t\t$data['MODEL_INSTANCE_VARIABLES'] = $this->modelTemplate->get_vars();\n\t\t$data['MODEL_SELECT_COLUMNS'] = $this->modelTemplate->get_columns();\n\n\t\treturn $data;\n\t}", "public function data()\n {\n $email_subject = $this->getEmailSubject();\n $email_body = $this->getEmailBody();\n $headers = Helper::getMailHeader($this->email_headers);\n \n return [\n 'to' => [\n 'email' => $this->email_address\n ],\n 'headers' => $headers,\n 'subject' => $email_subject,\n 'body' => $email_body,\n 'campaign_id' => $this->campaign_id,\n 'id' => $this->id,\n 'subscriber_id' => $this->subscriber_id\n ];\n }", "public function prepareData() {\r\n $sections = GearSection::getAll($this->id_shop);\r\n $this->smarty->assign('sections', $sections);\r\n $data = array();\r\n foreach($sections as $section) {\r\n $opts = GearOption::getBySection($section->id, $this->id_shop);\r\n $std = new stdClass();\r\n $std->id = $section->id;\r\n $std->name = $section->name;\r\n $std->label = $section->label;\r\n $std->options = $opts;\r\n array_push($data, $std);\r\n }\r\n \r\n if ($this->imported) { // generate css after import\r\n require_once 'classes/FrontStyle.php';\r\n FrontStyle::generateGearCss($data);\r\n }\r\n \r\n return $data;\r\n }", "public function getData() {\r\n $data = [];\r\n\r\n $model = Factory::getModel('landing-page-templates');\r\n $templates = $model->getTemplates();\r\n foreach ($templates as $template) {\r\n if ($template->showDetailed) {\r\n $data[] = [\r\n 'loc' => home_url($template->slug),\r\n 'priority' => '0.5',\r\n 'changefreq' => 'daily'\r\n ];\r\n }\r\n }\r\n\r\n return $data;\r\n }", "private function post_params() {\n return [\n 'title' => $this->params['title'],\n 'excerpt' => $this->params['excerpt'],\n 'content' => $this->params['content'],\n 'tags' => $this->params['tags']\n ];\n }", "public function mailtemplates() {\n $arr = array(\n 'completed' => 'order-completed.txt',\n 'completed-wm' => 'wm-order-completed.txt',\n 'pending' => 'order-pending.txt',\n 'pending-wm' => 'wm-order-pending.txt'\n );\n return $arr;\n }", "public function getData ()\n {\n\n $data = [];\n\n foreach ($this as $key => $value) {\n\n $method = 'get' . ucfirst(camel_case($key));\n\n if (method_exists($this, $method)) {\n\n $data[$key] = $this->{$method}();\n\n }\n\n }\n\n $data['request_data'] = $this->hideProtectedFields($data['request_data']);\n\n return $data;\n }", "public function getTemplateVariables()\n\t{\n\t\treturn array_merge($this->template_variables, [\n\t\t\t'options' => $this->getOptions(),\n\t\t\t'column' => $this->getColumn(),\n\t\t\t'key' => $this->getKey(),\n\t\t\t'status' => $this\n\t\t]);\n\t}", "public function get_email_template_variables()\n\t{\n\t\t$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));\n\n\t\treturn array(\n\t\t\t'AUTHOR_NAME'\t\t\t\t=> htmlspecialchars_decode($user_data['username']),\n\t\t\t'SUBJECT'\t\t\t\t\t=> htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),\n\n\t\t\t'U_VIEW_MESSAGE'\t\t\t=> generate_board_url() . '/ucp.' . $this->php_ext . \"?i=pm&mode=view&p={$this->item_id}\",\n\t\t);\n\t}", "protected function _prepareRenderData()\n {\n return [\n 'links' => $this->_config['links'],\n 'active' => $this->_activeLink,\n 'trans' => $this->_translations,\n ];\n }", "public function gatherData()\n {\n $data = array_merge($this->factory->getShared(), $this->data);\n\n foreach ($data as $key => $value) {\n if ($value instanceof Renderable) {\n $data[$key] = $value->render();\n }\n }\n\n return $data;\n }", "function getTemplateVars() {\n return array();\n }", "public function getRequestData(){\n\t\treturn array( \n \t\t\t'cmd' => $this->getRequestCommand(), \n \t\t\t'params' => $this->getParams() \n\t\t); \n\t}", "public function getTag() \n { \n return array(\"type\" => $this->getType(), \"name\" => $this->getName(), \"parameters\" => $this->getParameters());\n }", "public function get_emailtemplate_details() {\r\n $data=$this->Usermodel->email_templatemanagement();\r\n if(!empty($data)){\r\n foreach($data as $key => $value)\r\n {\r\n $data[$key] = (array) $value;\r\n }\r\n $data=array('emailtemplate'=>$data);\r\n }\r\n $this->load->view('email_template_management',$data);\r\n //print_r($data);\r\n }", "public function getPostArray()\n {\n return [\n 'name' => $this->name,\n 'message' => $this->message,\n 'iplog' => $this->iplog,\n 'timelog' => $this->timelog\n ];\n }", "public function settingsData() {\n\n $arraySettings = array (\n 'Generic Param' => $this->_genericParam\n );\n\n return $arraySettings;\n\n }", "public function actionListOfData()\n {\n return Tag::getDataForAjax(Yii::$app->request->get());\n }", "public function generatePdfData() {\n\t\t/**transport use to get the variables $order object, $invoice object and the template model object*/\n\t\t$parts = $this->_transport();\n\n\t\t/** instantiate the mPDF class and add the processed html to get the pdf*/\n\t\t$applySettings = $this->getPDFSettings($parts);\n\n\t\t$fileParts = [\n\t\t\t'filestream' => $applySettings,\n\t\t\t'filename' => filter_var($parts['filename'], FILTER_SANITIZE_URL),\n\t\t];\n\n\t\treturn $fileParts;\n\t}", "public function templateData()\n {\n return $this->templateData;\n }", "public function getTemplateVars(){\n\n return $this->template_vars;\n\n }", "public function postDataArrayProvider()\n {\n\t$data_array = array(\n\t 'photo' => 'test.jpg',\n\t 'id' => 1,\n\t 'author' => 'Anonymous',\n\t 'subject' => '',\n\t 'updated' => 0,\n\t 'content' => 'Testing'\n\t);\n\treturn array(\n\t 'default' => array($data_array)\n\t);\n }", "public function __toArray() {\n\t\t\n\t\t// empty template\n\t\treturn array(\n\t\t\t'status' => 'ERROR',\n\t\t\t'data' => array(\n\t\t\t\t'statusCode' => $this->getStatusCode(),\n\t\t\t\t'exception' => get_class($this),\n\t\t\t\t'message' => $this->getMessage(),\n\t\t\t),\n\t\t);\n\t}", "public function data()\n {\n return [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'created_at' => now(),\n ];\n }", "public function getTemplateData(array $customData = []);", "public function prepare(){\n\t\treturn array(\n\t\t\t'creationData' => $this->creationData->prepare(),\n\t\t\t'modificationHistory' => $this->modificationHistory->prepare() );\t\t\n\t}", "public function getDataForMakeNameMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'name' => 'Miss Althea Aufderhar',\n ],\n ],\n ];\n }", "public function getTemplateData()\n {\n return $this->data;\n }", "public function getBindValues();", "public function returnDynamicValues () {\n \treturn $this->_email_dynamic;\n }", "public function data()\n {\n return [\n 'MsgType' => $this->type(),\n 'MsgContent' => [\n 'UUID' => $this->UUID,\n 'ImageFormat' => $this->ImageFormat,\n 'ImageInfoArray' => $this->ImageInfoArray,\n ],\n ];\n }", "public static function formData()\n {\n return [\n 'id',\n 'code',\n 'name',\n 'icon',\n 'position',\n 'link',\n 'parent_id' => [\n 'dropDownList' => [ 'list' => static::dataOptions('id', 'name') ]\n ],\n 'row_status' => [\n // 'radioList' => [ 'list' => [ 0 => 'Active', 1 => 'Disactive' ] ]\n 'dropDownList' => [ 'list' => [ 1 => 'Active', 0 => 'Disactive' ] ]\n ]\n ];\n }", "private function getPostData(): array\n {\n return [\n 'product' => [\n 'attribute_set_id' => '4',\n 'status' => '1',\n 'name' => 'Simple Product',\n 'sku' => 'simple',\n 'url_key' => 'simple-product',\n 'type_id' => \\Magento\\Catalog\\Model\\Product\\Type::TYPE_SIMPLE\n ],\n 'links' => [\n 'upsell' => [\n ['id' => '10'],\n ],\n 'crosssell' => [\n ['id' => '11'],\n ],\n 'related' => [\n ['id' => '12'],\n ],\n ]\n ];\n }", "function render()\n {\n return array(\n 'init' => $this->__init,\n 'data' => $this->__items\n );\n }", "public function getParamsToView();", "public function data()\n\t{\n\t\treturn [\n\t\t\t'permissions' => $this->getPermissions(),\n\t\t\t'roles' => $this->getRoles(),\n\t\t];\n\t}", "public function __invoke()\n {\n return [\n 'dependencies' => $this->getDependencies(),\n 'templates' => $this->getTemplates(),\n ];\n }", "function obtenerDataForm( $pairs ){\r\n\t\t$dataform = array();\r\n\t\t//Chequeo por pares (campo=valor),(campo=valor),...,(campo=valor)\r\n\t\tforeach ( $pairs as $i ) {\r\n\t\t\tlist( $name, $value ) = explode( '=', $i, 2 );\r\n\t\t\t$par[\"f\"] = urldecode( $name );\r\n\t\t\t$par[\"v\"] = urldecode( $value );\r\n\t\t\t$dataform[] = $par;\r\n\t\t}\r\n\t\t//$dataform = insertarFecha( $dataform );\r\n\t\treturn $dataform;\r\n\t}", "public function provideMessageParameters()\n {\n $type = \"application/json\";\n\n $data[] = array('{\"foo\":\"bar\",\"baz\":[1,2,3]}', $type);\n $data[] = array('{\"foo\":\"bar\",\"baz\":[]}', $type);\n\n return $data;\n }", "private static function ParamList ()\n {\n return array (\n \"a\" => array (\n \"charset\", \"coords\", \"href\",\n \"hreflang\", \"name\", \"rel\",\n \"rev\", \"shape\", \"target\",\n \"style\",\n ),\n \"button\" => array (\n \"disabled\", \"name\", \"type\",\n \"value\", \"accesskey\", \"class\",\n \"dir\", \"id\", \"lang\", \"style\",\n \"tabindex\", \"title\", \"xml:lang\",\n ),\n );\n }", "public function elements()\n {\n return [\n '@full_name' => 'full_name',\n '@email' => 'email',\n '@password' => 'password',\n '@phone' => 'phone',\n '@address' => 'address',\n '@submit' => 'Submit'\n ];\n }", "public function getData()\n {\n $this->validate('order', 'email', 'value');\n\n return [\n 'order_id' => $this->getOrder(),\n 'customer_email' => $this->getEmail(),\n 'value' => $this->getValue()\n ];\n }", "private static function StructureList ()\n {\n return array (\n \"a\" => \"<a ###>$$$</a>\",\n \"button\" => \"<button ###>$$$</button>\"\n );\n }", "public function getTemplateVars()\n {\n $cart = $this->context->cart;\n $total = $this->trans(\n '%amount% (tax incl.)',\n [\n '%amount%' => Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH)),\n ]\n );\n\n return [\n 'totalAmount' => $total,\n ];\n }", "public function getPostVariables();", "public function __invoke()\n {\n return [\n 'dependencies' => $this->getDependencies(),\n 'templates' => $this->getTemplates(),\n ];\n }", "private function message_data() {\n\t\treturn array_intersect_key($this->request->data, array_flip(['content']));\n\t}", "public function getData()\n {\n return array(\n\n );\n }", "function templates()\n {\n return [];\n }", "private function dataCreateRequest()\n\t{\n\t\treturn array(\n\t\t\t'file_date' => $this->input->post('file_date'),\n\t\t\t'type_file' => $this->input->post('type_file'),\n\t\t\t'id_user' => $this->session->id,\n\t\t);\n\t}", "private function getResponseData()\n {\n $response = Shopware()->Front()->Response();\n\n return array(\n 'Class' => get_class($response),\n 'Raw header' => $response->getRawHeaders(),\n 'Response code' => $response->getHttpResponseCode(),\n 'Exception' => $response->getException()\n );\n }", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }", "function prepare_array() {\n\n\t\t$obj['name'] = $this->name->value;\n\t\t$obj['url'] = $this->url->value;\n\t\t$obj['image'] = $this->image->value;\n\t\t$obj['description'] = $this->description->value;\n\t\t/*\n\t\tforeach($this as $key => $value) {\n\n\t\t\t$obj[$key] = $value;\n\n\t\t}\n\t*/\n\t\treturn $obj;\n\t}", "public function values($data);", "protected function prepare_data() {\n\t\t$data = array();\n\n\t\t$data['From'] = $this->sender;\n\t\t\n\t\tif (!is_null($this->reply_to)) {\n\t\t\t$data['ReplyTo'] = $this->reply_to;\n\t\t}\n\n\t\t$data['To'] = $this->recipient;\n\n\t\tif (!empty($this->cc)) {\n\t\t\t$data['Cc'] = implode(',', $this->cc);\n\t\t}\n\n\t\tif (!empty($this->bcc)) {\n\t\t\t$data['Bcc'] = implode(',', $this->bcc);\n\t\t}\n\n\t\t$data['Subject'] = $this->subject;\n\n\t\tif (!empty($this->tags)) {\n\t\t\t$data['Tag'] = $this->tags[0];\n\t\t}\n\n switch ($this->content_type) {\n case 'multipart/mixed':\n $data['HtmlBody'] = $this->message;\n $data['TextBody'] = (!empty($this->alt_message)) ? $this->alt_message : strip_tags($this->message);\n break;\n case 'text/html':\n $data['HtmlBody'] = $this->message;\n break;\n case 'text/plain':\n $data['TextBody'] = $this->message;\n break;\n default:\n throw new Exception('Failed to send email because mime type is unknown.');\n break;\n }\n\n if (!empty($this->attachments)) {\n $data['Attachments'] = $this->attachments;\n }\n\n\t\treturn $data;\n\t}", "public function getData()\n {\n return [\n 'fetchBlock' => $this->fetchBlock,\n 'generateKey' => $this->generateKey,\n 'hits' => $this->hits,\n 'strategyClass' => $this->strategyClass,\n ];\n }", "public function get_tpl_data() {\r\n $tpl_data = parent::get_tpl_data();\r\n $tpl_data['significance'] = $this->significance;\r\n return $tpl_data;\r\n }", "public function getContentData()\n {\n return array(\n '%lounge%' => $this->lounge->getName(),\n );\n }", "private function dataBaseRepresentation() {\n\t\t$array['recipe'] \t\t= $this->recipeId;\n\t\t$array['name'] \t\t\t= $this->name;\n\t\t$array['description'] \t= $this->description;\n\t\t$array['url'] \t\t\t= $this->url;\n\t\treturn $array;\n\t}", "public function data(): array\n {\n $list = Yaml::parseFile('../resources/blueprints/forms/contact_us.yaml');\n\n dd($list['sections']['main']['fields'][2]['field']['options']);\n\n return [\n 'items' => \"yaga\"\n ];\n }", "public function getParamsListToInject(): array\n {\n return [\n 'sectionTitle',\n 'sectionSubtitle',\n 'tiles'\n ];\n }", "public function getCreateData() {\n return array();\n }", "public function getData()\n {\n $this->validateData();\n $data = array(\n \"service\" => $this->getService(),\n \"partner\" => $this->getPartner(),\n \"_input_charset\" => $this->getInputCharset(),\n \"notify_url\" => $this->getNotifyUrl(),\n \"account_name\" => $this->getAccountName(),\n \"email\" => $this->getEmail(),\n \"detail_data\" => $this->getDetailData(),\n \"batch_no\" => $this->getBatchNo(),\n \"batch_num\" => $this->getBatchNum(),\n \"batch_fee\" => $this->getBatchFee(),\n \"pay_date\" => $this->getPayDate(),\n );\n $data = array_filter($data);\n $data['sign'] = $this->getParamsSignature($data);\n $data['sign_type'] = $this->getSignType();\n return $data;\n }", "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 }", "function template_item ($name, $content) {\n $item['name'] = $name;\n $item['content'] = $content;\n\n return $item;\n }", "public function getData()\n {\n return $this->getRequestParams();\n }", "public function getData()\n {\n return $this->getRequestParams();\n }", "public function getTemplateVars(){\n\t\t\treturn $this->template_vars;\n\t\t}", "private function dataBaseRepresentation() {\n\t\t$array['website'] = $this->website;\n\t\t$array['name'] = $this->name;\n\t\t$array['country'] = $this->country;\n\t\treturn $array;\n\t}", "function get_template_variables($type)\r\n {\r\n $rv = array();\r\n $CI = &get_instance();\r\n $CI->load->model('mail_model');\r\n $rv = $CI->mail_model->get_template_variables($type);\r\n return $rv;\r\n }", "public function getPageData()\n {\n $pageData = parent::getPageData();\n $pageData['menu'] = 'sample';\n $pageData['title'] = 'bs4-components-twig';\n $pageData['icon'] = 'fa-magic';\n\n return $pageData;\n }", "public function formData()\n {\n return array(\n 'id' => $this->_id,\n 'name' => $this->_name,\n 'content' => $this->_content,\n 'categoryId' => $this->_category_id,\n 'userId' => $this->_user_id\n );\n }", "protected function getPostValues() {}", "public function getActionData() {\r\n\t\treturn array(\r\n\t\t\t'packageID' => $this->packageID\r\n\t\t);\r\n\t}", "public function definition()\n {\n $sender = Sender::inRandomOrder()->first();\n $rcpt = Recipient::inRandomOrder()->first();\n\n return [\n 'sender_id' => $sender->id,\n 'recipient_id' => $rcpt->id,\n 'subject' => $this->faker->text(100),\n 'plain_content' => $this->faker->text(300),\n 'html_content' => $this->faker->text(300),\n 'status' => \\Arr::random(['posted', 'sent', 'failed'])\n ];\n }", "public function format(): array\n {\n return [\n 'name' => 'click',\n 'selector' => $this->selector,\n 'amount' => $this->amount,\n 'button' => $this->button,\n ];\n }", "public function prepData($name,$value,$type){\n return array(\"name\"=>$name,\"value\"=>$value,\"type\"=>$type);\n }", "public function httpCreate(): array\n {\n return [\n 'walletId' => $this->walletId,\n 'bankAccountId' => $this->bankAccountId,\n 'bankWireReference' => $this->bankWireReference,\n 'amount' => $this->amount->httpCreate(),\n 'fees' => $this->fees->httpCreate(),\n 'label' => $this->label,\n 'tag' => $this->tag,\n ];\n }", "function renderizeData($keys, $values)\n {\n $str = '';\n switch ($_SERVER['REQUEST_METHOD']) {\n case 'POST':\n $fields = count($keys) - 1;\n foreach ($keys as $key => $value) {\n if ($key == $fields) {\n $str = $fields > 0 ? $str . $value . \") VALUES (\" : $str .\"(\". $value . \") VALUES (\";\n foreach ($values as $key => $value) {\n if ($key == count($values) - 1) {\n $str = $str . \"'\" . $value . \"')\";\n } else {\n $str = $str . \"'\" . $value . \"',\";\n }\n }\n } else {\n if ($key == 0) {\n $str = $str . \"(\" . $value . \",\";\n } else {\n $str = $str . $value . \",\";\n }\n }\n }\n return $str;\n break;\n\n case 'PUT':\n foreach ($keys as $key => $value) {\n if ($key == count($keys) - 1) {\n $str = $str . $value . \"='\" . $values[$key] . \"'\";\n } else {\n $str = $str . $value . \"='\" . $values[$key] . \"',\";\n }\n }\n return $str;\n }\n }", "public function actionData()\n {\n// \n// $connector->configure(new Grid(), \"event_id\", \"start_date, end_date, event_name\");\n// $connector->render();\n\n return new Grid();\n }", "private function respond() : array\n {\n if ($this->routeModel->get404()) {\n $this->template->show_404();\n\n return [];\n }\n\n $this->config->_global_vars = array_merge(\n $this->config->_global_vars,\n $this->routeModel->getVariables()\n );\n\n if (! $this->routeModel->hasTemplate()) {\n return [];\n }\n\n return explode('/', $this->routeModel->getTemplate());\n }", "function getRenderData()\n{\n $data = getRawData();\n $items = [];\n foreach ($data as $row) {\n $columns = explode('|', $row);\n if (count($columns) == 2) {\n $items[] = [\n 'name' => $columns[0],\n 'message' => $columns[1],\n ];\n }\n }\n\n return array_reverse($items);\n}", "public function indexActionGet() : array\n {\n $json = [\n \"message\" => \"Use POST with IP-address or placename in body to validate\",\n \"example\" => \"POST /weatherApi/ {'ip': '8.8.8.8', 'placename': 'karlskrona'}\",\n ];\n $page = $this->di->get(\"page\");\n\n $page->add(\"anax/v2/plain/pre\", [\n \"content\" => $json,\n ]);\n return [$json];\n }", "public function getContent()\n {\n return [\n 'narrative' => $this->getNarratives(),\n 'dependencies' => $this->getDependencies(),\n 'narrativeData' => $this->getRenderer()->loadViewElements($this->getNarratives()),\n 'bxRender' => $this->getRenderer(),\n 'narrative_bx_request_id' => $this->getBxRequestId(),\n 'narrative_bx_request_uuid' => $this->getBxRequestUuid(),\n 'narrative_bx_request_group_by' => $this->getBxRequestGroupBy()\n ];\n }", "public function modelData()\n {\n return [\n 'name' => $this->name,\n 'email' => $this->email,\n 'username' => $this->username,\n 'password' => bcrypt($this->password),\n 'level' => $this->level,\n\n ];\n }", "protected function _transport() {\n\t\t$invoice = $this->invoice;\n\n\t\t$order = $this->order;\n\n\t\t$transport = [\n\t\t\t'order' => $order,\n\t\t\t'invoice' => $invoice,\n\t\t\t'comment' => $invoice->getCustomerNoteNotify() ? $invoice->getCustomerNote() : '',\n\t\t\t'billing' => $order->getBillingAddress(),\n\t\t\t'payment_html' => $this->getPaymentHtml($order),\n\t\t\t'store' => $order->getStore(),\n\t\t\t'formattedShippingAddress' => $this->getFormattedShippingAddress($order),\n\t\t\t'formattedBillingAddress' => $this->getFormattedBillingAddress($order),\n\t\t];\n\n\t\t$processor = $this->processor;\n\n\t\t$processor->setVariables($transport);\n\n\t\t$processor->setTemplate($this->template);\n\n\t\t$parts = $processor->processTemplate();\n\n\t\treturn $parts;\n\t}", "public function templateInfo() \n {\n $info = array(); \n \n $info['name'] = $this->name; \n # $info[\"docblock\"] = $this->docblock->desc;\n # $info['position'] = $this->getPosition();\n # $info['is_array'] = $this->isArray();\n # $info['is_optional'] = $this->isOptional();\n # $info['is_passed_by_reference'] = $this->isPassedByReference();\n # $info['is_default_value_available'] = $this->isDefaultvalueAvailable();\n # $info['allows_null'] = $this->allowsNull();\n # $info['class_name'] = $this->getDeclaringClass() ? \n # $this->getDeclaringClass()->name : null;\n # $info['function_name'] = $this->getDeclaringFunction()->name;\n # $info['class_type'] = $this->getClass() ? $this->getClass()->getName() : null;\n\n # if ($this->isOptional() && $this->getDeclaringClass()->isUserDefined()) {\n # $info['default_value'] = $this->getDefaultValue();\n # }\n\n return $info; \n }", "public function setPayload()\n {\n return [\n 'name' => $this->getName(),\n 'email' => $this->getEmail(),\n 'address' => $this->getAddress(),\n 'meta' => $this->getMeta(),\n ];\n }", "public function getData()\n {\n $this->validate(\n 'app_id',\n 'productid',\n 'app_key'\n );\n\n $params = $this->parameters->all();\n $params['appid'] = $params['app_id'];\n $params['appkey'] = $params['app_key'];\n $params['mch_id'] = $params['partner'];\n $params = array_only($params, array(\n 'appid', 'productid', 'appkey',\n 'noncestr', 'timestamp', 'package','mch_id'\n ));\n\n\n return $params;\n }" ]
[ "0.6805697", "0.6778351", "0.6685417", "0.65888894", "0.6510755", "0.65058494", "0.633681", "0.62941414", "0.62165266", "0.6197054", "0.6156849", "0.6138158", "0.6064821", "0.60414726", "0.5948722", "0.5948597", "0.5935403", "0.58925813", "0.58924073", "0.58892614", "0.58859146", "0.587017", "0.5868724", "0.5839351", "0.58320916", "0.57939106", "0.57730645", "0.5763144", "0.575693", "0.5753957", "0.5747721", "0.5725341", "0.5723348", "0.57169366", "0.570797", "0.5704382", "0.5681555", "0.56625175", "0.5657398", "0.56560856", "0.5651757", "0.5632877", "0.5629023", "0.56065285", "0.5605621", "0.560482", "0.5602561", "0.55984443", "0.55931085", "0.55923146", "0.55913335", "0.5590341", "0.5587479", "0.5585885", "0.5584086", "0.5576841", "0.55763113", "0.557625", "0.55678886", "0.55655515", "0.5565452", "0.5554979", "0.555054", "0.5546525", "0.55438", "0.5543098", "0.5537139", "0.55218595", "0.5521106", "0.55117136", "0.55115455", "0.5505792", "0.55056465", "0.5496361", "0.5493254", "0.5492726", "0.5491355", "0.5489302", "0.5489302", "0.54816365", "0.54813546", "0.5479239", "0.54792327", "0.5479112", "0.54778385", "0.54739565", "0.5473004", "0.54679734", "0.5467367", "0.54650944", "0.54632676", "0.5462936", "0.5462061", "0.54599047", "0.5457526", "0.5453442", "0.5452398", "0.5449137", "0.54483855", "0.54447085", "0.5444183" ]
0.0
-1
The basic Home index
public function action_index() { \Package::load('email'); $mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : null; // getting current date date_default_timezone_set('Asia/Ho_Chi_Minh'); $cDate = date('Y-m-d'); if ($mode === 'now'){ $dataSet = Model_Publishdate::find( array( 'select' => array('*'), 'where' => DB::expr("DATEDIFF(publish_date, now()) = 0 AND status = " . Model_Publishdate::STATUS_CREATED) ) ); if ($mode === 'now' && isset($dataSet)) { foreach($dataSet as $publishData) { $luna = ($publishData->luna_date ? $publishData->luna_date : ''); $dataMailing = array('email' => $publishData->email, 'luna' => $luna , 'message' => $publishData->message, 'token' => $publishData->token); $result = $this->cron_mail($dataMailing); if ($result == true){ $publishData->set(array( 'status' => Model_Publishdate::STATUS_PUPBLISHED, 'run_date' => $cDate )); $publishData->save(); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\n\n\t\t$data['content'] = 'Homepage';\n\t\t$this->flexi->title('Homepage')\n\t\t\t\t\t->make('home', $data);\n\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\n\t{\n\t\t$data['logo'] = \"/img/ilih.png\";\n\t\t$data['users'] = $this->User->getAll();\n\n\t\t$this->parser->parse('home', $data);\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index() {\n $this->home(); \n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $this->render('home/home');\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index() {\n\n\t\t\treturn ['tpl' => 'home/index', 'data' => ['module' => 'home']];\n\t\t\n\t\t}", "function index(){\n\n global $wear;\n $template = $this->loadView($wear->front . \"/index\");\n $template->set(\"page\" , SITE_NAME . \" | Home\");\n $template->render(); \n\n }", "public static function index()\n {\n self::create_view(\"home.view\", [\n \"user\" => Session::retrieve_object(\"user\")\n ]);\n\n exit;\n }", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n {\n $this->layout\n ->add('../students/home/index')\n ->launch();\n }", "abstract public function index();", "abstract public function index();", "abstract public function index();", "public function index() {\n //echo file_get_contents(APP_PATH .\"/views/home/index.html\");\n }", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }", "public function index()\n\t{\n\t\t$data = array(\n\t\t\t'title' => 'Home',\n\t\t\t'item' => $this->m_home->getData(),\n\t\t\t'contents' => 'v_home',\n\t\t);\n\t\t$this->load->view('layout/v_wrapper_frontend', $data, false);\n\t}", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function home()\n {\n $listItem = $this->Item->getAll();\n $this->set(['title' => 'Home', 'items' => $listItem]);\n $this->render('home');\n }", "public function index () {\n\n return $this->app->render('home.tpl.php');\n \n }", "public function index()\n {\n// $pageData = $this->_pageService->getPage(PageConstant::HOME_PAGE);\n return $this->renderView($this->getView('home.welcome'), [], 'Home');\n }", "public abstract function index();", "public abstract function index();", "public abstract function index();", "public function index() {\n\t\t\n // Vorerst keine Seite erstellt\n return $this->customise(new ArrayData(array(\n \"Title\" => _t('Home.HOMETITLE', 'Home.HOMETITLE'),\n \"Content\" => _t('Home.HOMECONTENT', 'Home.HOMECONTENT')\n )))->renderWith(\n array('Home_index', 'Home', $this->stat('template_main'), $this->stat('template'))\n );\n\t}", "function index() {\n \n }", "public function get_index()\n\t{\n\t\treturn View::make('home.index');\n\t}", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function home()\n\t{\n\n\t\tView::show(\"home.php\", \"Accueil Mon MVC !\");\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function actionIndex() {\n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n //$this->layout = 'layout';\n $this->pageTitle=\"KushGhar-Home\";\n $this->render('index');\n }", "public function index();", "public function index();", "public function index();", "public function actionIndex()\n {\n //$this->redirect(array('site/login'));\n $this->render('home', array());\n }", "public function home()\r\n {\r\n\r\n $view = new Template();\r\n echo $view->render('views/home.html');\r\n }", "public function index()\n\t{\n\t\t//if needed\n\t}", "public function actionIndex() \n\t{\n\t\t$metaTitle = 'Homepage';\n\t\t\n\t\t$categories = array();\n\t\t$categories = Category::getCategoriesList();\n\t\t\n\t\t$latestProducts = array();\n\t\t$latestProducts = Product::getLatestProducts(4);\n\t\t\n\t\t// products for slider of recommended\n\t\t$sliderProducts = array();\n\t\t$sliderProducts = Product::getRecommendedProducts();\n\t\t\n\t\trequire_once(ROOT.'/views/site/index.php');\n\t\t\n\t\treturn true;\n\t}", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function home() {\n $posts = $this->postManager->getPosts();\n $view = new View(\"Home\");\n $view->generate(array('posts' => $posts));\n }", "public function route_home() {\n\t\techo '<h1>It wurks!</h1>';\n\t}", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index()\n {\n return view('client.home.index');\n }", "public function index(){}", "function index() {\n\t}", "function index() {\n $template = $this->loadView(\"home/index\");\n $template->set('name', 'Jonh Doe');\n $template->render();\n }", "public function index()\n\t{\n\t\treturn view('home' , ['setClass' => 'grayBody']);\n\t}", "public function actionHome(){\n\t\t\n\t\t$this->getContent('home');\n\t\t\n\t}", "abstract function index();", "abstract function index();", "abstract function index();", "public function index()\n\t{\n return View::make('home');\n\t}", "function index()\r\n\t{\r\n\t}", "function index()\r\n\t{\r\n\t}", "public function home()\n\t{\n\t\t$this->sidebar_template = 'news';\n\t\t$this->news = R::dispense('news', 5);\n\t\t$this->render();\n\t}", "function Home()\n {\n $this->requestSessionInfo();\n\n // muestra solo 2\n $recent_artworks = $this->modelArtwork->GetFrontArtworks(2);\n $this->view->ShowHome($recent_artworks);\n }", "public function index()\n {\n\n $data = array();\n\n $slug_cat = 'index';\n if (($cat_id = $this->model->checkNoneCatSlug($slug_cat))) {\n // var_dump($cat_id);exit();\n $data['home'] = array('list_article' => $this->model->list_article_all($cat_id, 10, 0),\n 'slug_cat' => $slug_cat);\n // var_dump($this->model->list_article_all($cat_id, 10, 0));exit();\n }\n\n\n $this->template->set_template('life');\n $this->template->write_view('content', 'FRONTEND/index', $data);\n $this->template->render();\n }", "public function index() {\n\t\t$this->landing();\n\t}", "public function index() \n\t{\n\t\tredirect('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function home()\n {\n session_start();\n $posts = new PostManager;\n $resultat = $posts->getPosts(4);\n echo $this->getRender()->render('homeView.twig', [\n 'resultat' => $resultat,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "public function index(){\n $data['title'] = \"Rodolfo Peixoto | Home\";\n $data['description'] = \"Desenvolvimento da página Institucional\";\n $this->load->view('home', $data);\n }", "public function index()\n\t\t{\n\n\t\t}", "function index() {\n $this->renderView(\"index\");\n }", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index_hmvc()\n\t{\n\t\tLoad::template(\"Header\");\n\t\tLoad::view(\"Homepage\", \"Index\");\n\t\tLoad::template(\"Footer\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function showHomePage()\n\t{\n\t\t# call the API\n\t\tif($accessKey = getAccessKey()) {\n\t\t\t$headers = ['accessKey' => $accessKey];\n\t\t}\n\t\telse {\n\t\t\t$headers = [];\n\t\t}\n\n\t\t$response = App::make(\"ApiClient\")->get(\"home\", [], $headers);\n\n\t\t# if we got some data back successfully then do something with it\n\t\tif($response['success'])\n\t\t{\n\t\t\t# short cut the data response\n\t\t\t$data = $response['success']['data'];\n\n\t\t\t# if we don't have the nav stored in the session then store it\n\t\t\tif (! Session::has('nav') ) {\n\t\t\t Session::put('nav', $data['channels']);\n\t\t\t}\n\n\t\t\t# set the browser page title\n\t\t\t$data['pageTitle'] = \"Bristol news, what's on, food and drink, lifestyle\";\n\n\t\t\t# set the pages meta description value\n\t\t\t$data['metaDescription'] = \"Bristol news, comprehensive what's on listings, reviews and special offers online, on mobile, in print - check out our FREE app and monthly magazine\";\n\n\t\t\t# make the view\n\t\t\treturn View::make('home.index', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// do something here!!!\n\t\t}\n\t}", "public function home()\n {\n $this->privateAccess(true);\n //Set content type as html page\n $this->contentType(\n 'html',\n 'Management Proof',\n [\n $this->_assets_path . 'js/Core/datatables.min.js',\n $this->_assets_path . 'js/Apps/ManagementResults/home.js'\n ], [\n $this->_assets_path . 'css/Core/datatables.min.css'\n ]\n );\n\n //add management subject view\n include 'Apps/ManagementResults/view/home.php';\n\n }", "public function home()\n {\n return view('core::home.index');\n }", "public function home()\n {\n $params = [\n 'name' => 'xEiBi'\n ];\n\n return $this->render('home', $params);\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.865731", "0.8502034", "0.83912987", "0.83522874", "0.8330942", "0.8242061", "0.81983316", "0.81588596", "0.8152173", "0.80391777", "0.80172473", "0.8009981", "0.7984944", "0.79801774", "0.79328567", "0.79328567", "0.79328567", "0.7921567", "0.79157084", "0.79016685", "0.78983253", "0.7887979", "0.7887097", "0.788437", "0.78335875", "0.78322047", "0.78322047", "0.78322047", "0.78224283", "0.78209585", "0.7812327", "0.78100204", "0.7794727", "0.77770215", "0.7776886", "0.7755305", "0.775212", "0.77481604", "0.77481604", "0.77481604", "0.7732854", "0.77236915", "0.7718234", "0.77118945", "0.7709395", "0.77092665", "0.77032816", "0.769462", "0.7686318", "0.7685268", "0.76712304", "0.7670116", "0.7666339", "0.76624584", "0.7660441", "0.7660441", "0.7660441", "0.7647866", "0.76364833", "0.76364833", "0.76299477", "0.76278496", "0.76263654", "0.7618489", "0.7616765", "0.76091784", "0.76091784", "0.7608459", "0.760813", "0.7597064", "0.75899136", "0.75834936", "0.7577189", "0.7573002", "0.75728095", "0.75705355", "0.7569686", "0.75675464", "0.75635123", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234", "0.7562234" ]
0.0
-1
The 404 action for the application.
public function action_404() { return Response::forge(Presenter::forge('welcome/404'), 404); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionNotfound()\n {\n $this->actionSlug = 'notfound';\n $this->actionParams = [];\n $this->breadcrumbs=[];\n $this->beforeAction();\n $this->breadcrumbs[] = ['title' => 404];\n header(\"HTTP/1.x 404 Not Found\");\n header(\"Status: 404 Not Found\");\n echo $this->render('404');\n exit;\n }", "public function action_404()\n\t{\n\t\t//return Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "public function action_404()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\n\t}", "public function action_404()\r\n\t{\r\n\t\treturn Response::forge(Presenter::forge('welcome/404'), 404);\r\n\t}", "public function action_404()\n\t{\n\t\treturn Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "public function action_404()\n\t{\n\t\t$this->template->title = '404 Not Found';\n\t\t$this->template->header_title = site_title($this->template->title);\n\t\t$this->template->content = View::forge('error/404');\n\t\t$this->response->status = 404;\n\t}", "public function error404Action() \n {\n return '404 Page not found';\n }", "protected function do_404() {\n header('HTTP/1.1 404 Not Found');\n \n $actionsPath = $this->config->get_key('paths', 'actions');\n $action = $actionsPath.'/page-not-found.php';\n \n if (file_exists($action)) {\n require($action);\n \n if (class_exists('PageNotFound')) {\n PageNotFound::get_instance($this->options);\n }\n \n exit;\n } else {\n throw new HaploActionNotFoundException('No default 404 action found. Add a file named page-not-found.php to '.$actionsPath.' to suppress this message.');\n }\n }", "public function indexAction(){\n $this->view->render('404');\n\t}", "public function error404Action()\n\t{\n\t\t$method = '_notFound' . ENVIRONMENT;\n\n\t\t// Try to call the internal method for the environment\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\treturn $this->$method();\n\t\t}\n\n\t\t// If the method for the current environment does not exist\n\t\t// We just output the 404 production view :)\n\t\t$this->setViewFileName('Error/404-production');\n\t}", "function notfound() {\n\t\t$this->fw->render('404');\n\t}", "public function action_404(){\n\t\t$this->template->title = 'けんさく';\n\t\t$this->template->content = View::forge('util/404');\n\t\t$this->template->breadcrumb = array(array(\"url\" => \"/util/404\", \"name\" => \"404 Not Found\"));\n\t}", "public function show404();", "protected function actionNotFound()\n\t{\n\t\tzf::halt(\"You can't call this function \\\"actionNotFound\\\" directly. You must redefine it in your controller.\");\n\t}", "public function error404() {\n\t\t$this->render('error400');\n\t}", "public function NotFound() {\r\n\t\t$this->PrepareController();\r\n\t\t$this->View = 'notfound';\r\n\t\t$this->Render();\r\n }", "public function action_404() {\n $this->template->content = View :: factory('error/404');\n }", "public function notFound()\n {\n Controller::getController('PageNotFoundController')->run();\n }", "public function actionnotfound()\n {\n $this->render('notfound');\n }", "public function error404()\n {\n $this->whenError();\n $viewData['status'] = 404;\n $viewData['title'] = 'Not Found';\n $viewData['msg'] = 'Sorry but the page you are looking for does not exist, have been removed.';\n\n $this->pageError($viewData);\n }", "public function routenotfoundAction()\n {\n return $this->createResponse('Route Not Found', 404);\n }", "private function route_not_found() {\r\n\t\t\t// Also when in debug mode - show comprehensive messages\r\n\t\t\tdie(\"404 Page not found\");\r\n\t\t}", "public function notfoundAction()\n {\n $this->render('error/notfound');\n }", "public static function http404() {\n\t\tself::$global['CONTEXT']=$_SERVER['REQUEST_URI'];\n\t\tself::error(\n\t\t\tself::resolve(self::TEXT_NotFound),404,debug_backtrace(FALSE)\n\t\t);\n\t}", "public function handle_404()\n {\n }", "function pageNotFound()\n {\n $this->global['pageTitle'] = 'Garuda Informatics : 404 - Page Not Found';\n \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "public static function _notFound() {\n self::response(false)\n ->status(404)\n ->write(\n '<h1>404 Not Found</h1>'.\n '<h3>The page you have requested could not be found.</h3>'.\n str_repeat(' ', 512)\n )\n ->send();\n }", "public function notFound() {\n\t\t\theader('HTTP/1.0 404 Not Found');\n\t\t\t$this->render('error/404.twig.html');\n\t\t}", "public function notFound()\n {\n http_response_code(404);\n error_log('404 page not found: '.$this->getRequest());\n kodexy()->loadView('system/notFound');\n $this->completeRequest();\n }", "public function actionError()\n\t{\n\t\tif($error = Yii::app()->errorHandler->error)\n\t\t{\n if($error['code']==404)\n\t\t\t$this->render('pages/404');\n else\n $this->redirect('/');\n\t\t}\n\t}", "public function notFound()\r\n {\r\n\r\n $this->render('Page Not Found', '404.view');\r\n }", "public static function notFound(){\n\n throw new \\yii\\web\\HttpException(404, 'Not Found', 405);\n }", "public function Error404()\n\t{\n\t\t$this->Render();\n\t}", "function _404() {\n die();\n }", "public function show404() {\n\t\t$heading = '404 Страница не найдена';\n\t\t$message = 'Запрошенная страница не найдена.';\n\t\tExceptions::showError($heading, $message, 'error404', 404);\n\t\texit;\n\t}", "public function pageNotFound404()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'faq');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | 404 Page Not found')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/page_not_found');\n }", "public function notFound(){\n \n View::renderTemplate('pageNotFound.html');\n \n }", "function lb_show_404_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'page-404',\n\t\t)\n\t);\n}", "function lb_show_404_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'page_404',\n\t\t)\n\t);\n}", "public function error404()\n\t{\n\t\t//envoie une entête 404 (pour notifier les clients que ça a foiré)\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tView::show(\"errors/404.php\", \"Oups ! Perdu ?\");\n\t}", "public function handler404()\n {\n $this->getResponse()->setStatusCode(404);\n return;\n }", "protected function response_404()\n {\n $this->log->write_log('debug', $this->TAG . ': response_404: ');\n $this->response_error(VALUE_STATUS_CODE_ERROR, 'Page not found / wrong method', 404);\n }", "public function Error404() {\n\t\t$this -> Render();\n\t}", "public static function displayError404() {\n\n\t\t\tself::display('Main/Status/Error404', 'STATUS_TITLE_404', STATUS_CODE_404);\n\t\t}", "public function nf404()\n {\n return view('main.404');\n }", "public function notFound()\n {\n $this->httpResponseCode = 404;\n }", "public function show404() {\n header(\"HTTP/1.0 404 Not Found\");\n throw new Exception('404 Not Found');\n }", "public function notFound() {\n return $this->setStatus(404);\n }", "public function notFound() :string {\n\t\theader('HTTP/1.0 404 Not Found');\n\t\tdie('404 not found');\n\t}", "public function show_404() \n\t{\n\t\trequire $this->load->view('404', 'error');\n\t\texit;\n\t}", "public function force404();", "public function force404();", "protected function redirectNotFound()\n {\n return Response::view('errors.404', array('pageTitle'=> Lang::get('messages.Error')), 404);\n }", "public function notFound($action) {\r\n $this->router->notFound($action);\r\n }", "private function pageNotFound()\n {\n $this->theme->setTitle(\"Sidan saknas\");\n $this->views->add('error/404', [\n 'title' => 'Sidan saknas',\n ], 'main-wide');\n }", "public function notFound($message = null)\n {\n throw new Zend_Controller_Action_Exception($message, 404);\n }", "public function NotFoundAction($param = array(), &$vParam = array(), &$vShab = array()) {\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t$vParam['item'] = $this->GetModelContent()->GetItem(2);\n\t\tif ($vParam['item']) {\n $vParam['title'] = \"Страница не найдена\";\n $vParam['description'] = (isset($vParam['item']['description']) ? $vParam['item']['description'] : '');\n $vParam['keywords'] = (isset($vParam['item']['keywords']) ? $vParam['item']['keywords'] : '');\n\t\t}\n\t\t$vShab['content'] = $this->ViewPath . '404.phtml';\n\t}", "public function actionIsNotAllowed()\n {\n throw new NotFoundException(__('Page not found.'));\n }", "public function error_404()\n\t{\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tmeta::set_title('This Page will be Forever Missed');\n\t\t$this->template\n\t\t\t->set('title', 'Missing Page')\n\t\t\t->set('content', View::factory('errors/404'));\n\t}", "public function page404() {\n\n view('pages.404');\n\n }", "protected function noAction()\n {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n\n // Build and return the output\n $this->error = true;\n $this->result->setAttribute('type', 'error');\n $this->result->appendChild($this->dom->createElement('message', 'Action not found'));\n $this->buildOutput();\n }", "private static function pageNotFound()\n {\n if (self::$notFound && is_callable(self::$notFound)) {\n call_user_func(self::$notFound);\n } else {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n throw new ExceptionHandler(\"Hata\", \"Controller bulunamadı\");\n }\n }", "public function error404()\n {\n }", "public function RenderNotFound () {\n\t\tif ($this->application->IsNotFoundDispatched()) return;\n\t\tthrow new \\ErrorException(\n\t\t\t\"Page not found: `\" . htmlspecialchars($this->request->GetFullUrl()) . \"`.\", 404\n\t\t);\n\t}", "function not_found() {\n\treturn show_template('404');\n}", "function notFound() {\n header('HTTP/1.0 404 Not Found');\n }", "private function notFound()\n {\n $this->method = 'error404';\n header('X-PHP-Response-Code: 404', true, 404);\n }", "public function notFound()\n {\n $this->set('message', 'API endpoint \"' . $this->request->getUri()->getPath() . '\" does not exist.');\n $this->set('_serialize', ['message']);\n $this->_respondWithNotFound();\n }", "function actionNotFound($actionName = null, $arguments = null)\n {\n $this->response()->withStatus(Status::CODE_NOT_FOUND);\n }", "protected function notFound()\n {\n $this->response = $this->response->withStatus(404);\n $this->jsonBody($this->payload->getInput());\n }", "private function notFound() {\n if (file_exists(APP . 'Controller/error.php')) {\n header('Location: ' . BASE_URL . 'error');\n } else {\n die('Sorry, the requested content could not be found');\n }\n }", "public static function error404()\r\n\t{\r\n\t\theader(\"HTTP/1.1 404 Not Found\");\r\n\t\theader(\"Status: 404 Not Found\");\r\n\t\texit();\r\n\t}", "public function pageNotFound()\n {\n $this->_status = '404 Page Not Found';\n }", "public function redirect404(){\n\n\t\t$this->page = new PageGenerator($this->app);\n\t\t$this->page->setContentFile(__DIR__ . '/../Errors/404');\n\t\t\n\t\t$this->addHeader('HTTP/1.0 404 Not Found');\n\t\t\n\t\t$this->send();\n\t\t\n\t}", "public function pageNotFound() {\n\n $this->page->getPage('page_not_found.tpl');\n }", "protected function RequestNotFound($msg)\r\n {\r\n $displayedError = false;\r\n\r\n if (!is_null(KrisConfig::$Error404Handler) && is_array(KrisConfig::$Error404Handler) && count(KrisConfig::$Error404Handler) > 1)\r\n {\r\n if ($this->GetControllerRequest(KrisConfig::$Error404Handler['controller'], KrisConfig::$Error404Handler['action'], $error, $controllerObj, $function))\r\n {\r\n if (!KrisConfig::DEBUG)\r\n {\r\n $msg = '';\r\n }\r\n call_user_func_array(array($controllerObj, $function), array($msg));\r\n $displayedError = true;\r\n }\r\n else\r\n {\r\n /** @var $log Log */\r\n $log = AutoLoader::Container()->get('Log');\r\n $log->Error('Unable to call Error404Handler, function ' . KrisConfig::$Error404Handler . ' does not exist');\r\n }\r\n }\r\n\r\n if (!$displayedError)\r\n {\r\n $this->request->SetError(404, '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>' . $msg .\r\n '<p>The requested URL was not found on this server.</p><p>Please go <a href=\"javascript: history.back(1)\">back</a>' .\r\n ' and try again.</p><hr /></body></html>');\r\n }\r\n }", "public function actionIndex()\n {\n return ['status' => '404','message' => 'Not Found'];\n }", "public static function sendNotFoundResponse(){\n http_response_code(404);\n die();\n }", "public function render404(): void\n {\n header('HTTP/1.0 404 Not Found');\n header('Location: /404');\n die();\n }", "private function spawn404Error()\n {\n Utils_Request::sendHttpStatusCode(Utils_Request::CLIENT_NOT_FOUND);\n try {\n FrontDispatcher::instance()->setConfig($this->_config)->render('404');\n }\n catch (Exception $e) {\n die('Cannot render 404 page!');\n }\n }", "private function create404()\n {\n $this->response->setStatusCode(404);\n\n $url = $this->request->originalUrl ?: $this->request->getUrl();\n $escaper = new Escaper();\n $message = sprintf(\n \"Cannot %s %s\\n\",\n $escaper->escapeHtml($this->request->getMethod()),\n $escaper->escapeHtml((string) $url)\n );\n $this->response->end($message);\n }", "public function executeError404()\n {\n return sfView::SUCCESS;\n }", "public function notFoundPageHandler() {\n $valid = true;\n $url_route = !empty($this->request->get['_route_']) ? $this->request->get['_route_'] : '';\n\n // Check non alias\n $url_base = $this->request->server['HTTPS'] ? $this->config->get('config_ssl') : $this->config->get('config_url');\n $url_request = ($this->request->server['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n if (!$url_route) {\n $url_route = urldecode(str_replace($url_base, '', $url_request));\n }\n\n\n // Blacklist 404 that start with this word\n $blacklist = array('admin/', 'asset/', 'assets/', 'image/', 'cache/', 'view/');\n foreach ($blacklist as $block) {\n if (strpos($url_route, $block) !== false) {\n $valid = false;\n break;\n }\n }\n\n if ($valid) {\n $route = $this->{$this->callModel}->MissingPageWorker($url_route, $this->storeId);\n\n if ($route) {\n // Info: Chrome and Firefox cache a 301 redirect with no expiry date\n $this->response->redirect($url_base . ltrim($route, '/'), 301);\n }\n }\n }", "function p404()\n{\n\thttp_response_code(404);\n\tView\\Json::render(['error'=>'page not found']);\n}", "public function ooops()\r\n\t{\r\n\t\t$this->template->view('utilities/404.php');\r\n\t}", "public static function ErrorPage404()\n {\n header('HTTP/1.1 404 Not Found');\n header(\"Status: 404 Not Found\");\n header('Location: '.$_SERVER['HTTP_HOST'].'404');\n }", "protected function redirectNotFound(){\r\n \theader('Location: '.BASE_URI.Routes::getUri('not_found'));\r\n }", "public function error404(){\n\t\t$this->loadErrorView('Cette page n\\'existe pas', 'Error 404', 404); \n\t}", "public static function respond404()\n {\n header($_SERVER['SERVER_PROTOCOL'].\" 404 Not Found\", true, 404); //.replace = true\n $view = new NWTemplate();\n $view->display('404.tpl');\n }", "function show_404() {\n\t\tredirect( 'users', 'location' );\n\t\texit();\n\t}", "public function invalidAction($action) {\t\r\n\t\t$this->render(array('default', 'pageNotFound'));\r\n\t}", "public static function status404($data=null) {\n\t\tself::response($data,404);\n\t}", "public function cgetAction()\n {\n throw new NotFoundHttpException();\n }", "public function is_404()\n {\n }", "public function index()\n\t{\n\t\tdie('404 error');\n\t}", "static function show_404($page = '')\n\t{ \t\n\t\tself::initCoreComponent('SHIN_Exceptions');\n\t\tself::$_exceptions->show_404($page);\n\t\texit;\n\t}", "public function show404()\n {\n header(\"HTTP/1.1 404 Not Found\");\n $this->title .= 'ошибка 404'; \n $this->content = System::template('client/v_404.php');\n }", "public function uriError()\n {\n header(\"HTTP/1.0 404\");\n exit();\n }", "public function is_404();", "function error_404()\n\t{\n\t\t$this->output->set_status_header('404');\n\t\t$this->template->set_template('error');\n\t\t$this->template->write('title', 'HappyPerks');\n\t\t$data = $this->template->write_view('content', '404/error', isset($data) ? $data : NULL,true);\n\t\tprx($data);\n\t\t// $this->template->render();\n\n\t}" ]
[ "0.83854896", "0.8346812", "0.8331481", "0.8298381", "0.8273531", "0.81195784", "0.80202264", "0.79965556", "0.7932431", "0.79038256", "0.7851581", "0.77753454", "0.77365446", "0.772436", "0.76887536", "0.76787484", "0.766104", "0.7632863", "0.76249707", "0.76194775", "0.7613492", "0.75731343", "0.7547283", "0.7532768", "0.7516929", "0.7462328", "0.7448283", "0.7420755", "0.74183637", "0.74065083", "0.74022263", "0.73719466", "0.73684996", "0.73667145", "0.733169", "0.73272306", "0.7323448", "0.73220587", "0.73207414", "0.73199147", "0.73147064", "0.7294722", "0.7290904", "0.72859854", "0.72765756", "0.7259463", "0.7251135", "0.721996", "0.7216854", "0.72144616", "0.7208166", "0.7208166", "0.7204301", "0.71882993", "0.71866655", "0.71821946", "0.7153161", "0.714477", "0.7131665", "0.7130885", "0.71235806", "0.71156806", "0.71065736", "0.71058744", "0.70952016", "0.7091726", "0.707814", "0.7068046", "0.70674235", "0.70648545", "0.7048438", "0.7040605", "0.70377433", "0.70282286", "0.70093703", "0.7007314", "0.69929963", "0.6986237", "0.6984266", "0.6971336", "0.6959962", "0.69500554", "0.69486165", "0.6938801", "0.6937889", "0.6937445", "0.6926257", "0.6922943", "0.6922376", "0.69154537", "0.6908682", "0.6903846", "0.69010377", "0.6891242", "0.6858704", "0.684717", "0.6846099", "0.6842958", "0.6829434", "0.6822341" ]
0.8368956
1
Return custom javascript needed to ensure persistency of virtual rule while playing with the preview grid
protected function _getPreviewPersistenceJavascript() { $javascript = ""; if ($rule = $this->getRequest()->getParam('rule', false)) { $jsonRule = Mage::helper("core")->jsonEncode($rule); $javascript = <<<JAVASCRIPT if ({$this->getJsObjectName()}.reloadParams == false) { {$this->getJsObjectName()}.reloadParams = { rule : Object.toJSON({$jsonRule}) }; } else { {$this->getJsObjectName()}.reloadParams.rule = Object.toJSON({$jsonRule}); } JAVASCRIPT; } return $javascript; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function getJavascriptFire() {\n\t\treturn \"new SUGAR.forms.SetPanelVisibilityAction('{$this->targetPanel}','{$this->expression}')\";\n\t}", "protected function generateJavascript()\n\t{\n\t}", "protected function renderAsJavascript() {}", "static function getJavascriptClass() {\n\t\treturn <<<'EOQ'\n/**\n * Completely hide or show a panel\n */\nSUGAR.forms.SetPanelVisibilityAction = function(target, expr)\n{\n this.afterRender = true;\n\n if (_.isObject(target)){\n expr = target.value;\n target = target.target;\n }\n //BWC\n if (_.isString(target) && _.isUndefined(SUGAR.App)) {\n var parents = $('#' + target).parents('div');\n if(parents.length) {\n target = parents.attr('id');\n }\n }\n\n this.target = target;\n this.expr = 'cond(' + expr + ', \"\", \"none\")';\n}\n\n\n/**\n * Triggers this dependency to be re-evaluated again.\n */\nSUGAR.util.extend(SUGAR.forms.SetPanelVisibilityAction, SUGAR.forms.AbstractAction, {\n hideChildren: function() {\n if (typeof(SUGAR.forms.SetPanelVisibilityAction.hiddenFields) == \"undefined\")\n {\n this.createFieldBin();\n }\n var target = document.getElementById(this.target);\n var field_table = target.getElementsByTagName('table')[0];\n if (field_table != null) \n {\n field_table.id = this.target + \"_tbl\";\n SUGAR.forms.SetPanelVisibilityAction.hiddenFields.appendChild(field_table);\n }\n },\n \n showChildren: function() {\n var target = document.getElementById(this.target);\n var field_table = document.getElementById(this.target + \"_tbl\");\n if (field_table != null)\n target.appendChild(field_table);\n },\n \n createFieldBin: function() {\n var tmpElem = document.createElement('div');\n tmpElem.id = 'panelHiddenFields';\n tmpElem.style.display = 'none';\n document.body.appendChild(tmpElem);\n SUGAR.forms.SetPanelVisibilityAction.hiddenFields = tmpElem;\n },\n \n /**\n * Triggers the style dependencies.\n */\n exec: function(context)\n {\n if (typeof(context) == 'undefined')\n context = this.context;\n\n if (context.view)\n return this.sidecarExec(context);\n try {\n var visibility = this.evalExpression(this.expr, context);\n var target = document.getElementById(this.target);\n if (target != null) { \n if (target.style.display != 'none')\n SUGAR.forms.animation.sizes[this.target] = target.clientHeight;\n \n if (SUGAR.forms.AssignmentHandler.ANIMATE) {\n if (visibility == 'none' && target.style.display != 'none') {\n SUGAR.forms.animation.Collapse(this.target, this.hideChildren, this);\n return;\n } \n else if (visibility != 'none' && target.style.display == 'none') \n {\n this.showChildren();\n SUGAR.forms.animation.Expand(this.target);\n return;\n }\n }\n \n if (visibility == 'none')\n this.hideChildren();\n else\n this.showChildren();\n target.style.display = visibility;\n }\n } catch (e) {if (console && console.log) console.log(e);}\n },\n sidecarExec : function(context) {\n var hide = (this.evalExpression(this.expr, context) === 'none'),\n tab = context.view.$(\".tab.\" + this.target),\n panel = context.view.$(\"div.record-panel[data-panelname='\" + this.target + \"']\"),\n isActive = tab && tab.hasClass(\"active\");\n\n //If we can't find a tab, just look for a panel\n if (!tab || !tab.length) {\n //Hide/show a panel (No need to worry about the active tab)\n if (panel.length > 0) {\n if (hide) {\n panel.hide();\n } else {\n panel.show();\n }\n this.triggerFieldsVisibility(context, this.target, hide);\n } else {\n //If we got here it means the panel name/id was probably invalid.\n console.log(\"unable to find panel \" + this.target);\n }\n } else {\n //Hide/show tabs\n if (hide) {\n tab.hide();\n //If we are hiding the active tab, show the first visible tab instead.\n if (isActive) {\n var tabs = context.view.$(\"li.tab:visible\");\n if (tabs.length > 0 && context.view.setActiveTab) {\n //setActiveTab currently expects an event. This may change in the future\n context.view.setActiveTab({currentTarget:tabs[0].children[0]});\n context.view.handleActiveTab();\n }\n }\n } else {\n tab.show();\n }\n this.triggerFieldsVisibility(context, this.target, hide);\n }\n\n },\n triggerFieldsVisibility : function(context, target, hide) {\n\n _.each(this.getPanelFieldNames(context, target), function(fieldName) {\n var field = context.view.getField(fieldName);\n if (field && _.isUndefined(field.wasRequired)) {\n field.wasRequired = field.def.required;\n }\n context.setFieldDisabled(fieldName, hide);\n if (field.wasRequired === true)\n context.setFieldRequired(fieldName, !hide);\n\n });\n\n },\n getPanelFieldNames : function(context, panelName) {\n var panel = _.find(context.view.meta.panels, function(panel) {\n return panel.name === panelName;\n });\n\n return _.pluck(panel.fields, 'name');\n }\n});\n\nSUGAR.forms.animation.sizes = { };\n\nSUGAR.forms.animation.Collapse = function(target, callback, scope)\n{\n var t = document.getElementById(target);\n if (t == null) return;\n \n SUGAR.forms.animation.sizes[target] = t.clientHeight;\n t.style.overflow = \"hidden\";\n \n // Create a new ColorAnim instance\n var collapseAnim = new YAHOO.util.Anim(target, { height: { to: 0 } }, 0.5, YAHOO.util.Easing.easeBoth);\n collapseAnim.onComplete.subscribe(function () {\n t.style.display = 'none';\n callback.call(scope);\n });\n collapseAnim.animate();\n};\n\nSUGAR.forms.animation.Expand = function(target)\n{\n var t = document.getElementById(target);\n if (t == null) return;\n \n \n t.style.overflow = \"hidden\";\n t.style.height = \"0px\";\n t.style.display = \"\";\n \n var expandAnim = new YAHOO.util.Anim(target, { height: { to: SUGAR.forms.animation.sizes[target] } },\n 0.5, YAHOO.util.Easing.easeBoth);\n \n expandAnim.onComplete.subscribe(function () {\n t.style.height = 'auto';\n });\n \n expandAnim.animate();\n};\nEOQ;\n\n }", "public function js_template() {\n\t\t?>\n <script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n <div class=\"uni-modal-row uni-clear uni-uni-modal-row-for-builder\">\n\t\t\t\t<?php echo $this->generate_field_label_html(); ?>\n <div class=\"uni-field-conditional-rules-content-field-wrapper\">\n <div class=\"uni-query-builder-wrapper\">\n <div id=\"cpo-field-rule-builder\" class=\"cpo-query-rule-builder-single\"></div>\n <input class=\"js-uni-fetch-scheme uni-cpo-settings-btn uni-cpo-settings-saved\" type=\"button\"\n value=\"<?php esc_attr_e( 'Fetch the rule', 'uni-cpo' ) ?>\"/>\n </div>\n <input id=\"uni_cpo_field_rule_scheme\" type=\"hidden\" name=\"cpo_fc_scheme\" value=\"{{- data }}\"\n class=\"builderius-setting-field\"/>\n </div>\n </div>\n </script>\n\t\t<?php\n\t}", "public function getJavaScript() {}", "function pagecreate()\r\n {\r\n $result = parent::pagecreate();\r\n\r\n $result .= $this->_paintJS();\r\n return $result;\r\n }", "public function get_form_editor_inline_script_on_page_render() {\n\n\t\t// set the default field label for the simple type field\n\t\t$script = sprintf( \"function SetDefaultValues_simple(field) {field.label = '%s';}\", $this->get_form_editor_field_title() ) . PHP_EOL;\n\n\t\t// initialize the fields custom settings\n\t\t$script .= \"jQuery(document).bind('gform_load_field_settings', function (event, field, form) {\" .\n\t\t \"var inputClass = field.inputClass == undefined ? '' : field.inputClass;\" .\n\t\t \"jQuery('#input_class_setting').val(inputClass);\" .\n\t\t \"});\" . PHP_EOL;\n\n\t\t// saving the simple setting\n\t\t$script .= \"function SetInputClassSetting(value) {SetFieldProperty('inputClass', value);}\" . PHP_EOL;\n\n\t\treturn $script;\n\t}", "function pagecreate()\r\n {\r\n $result = parent::pagecreate();\r\n $result .= $this->_paintJS();\r\n return $result;\r\n }", "public function livePreviewMainScript() {\r\n\t\t?>\r\n\t\t<script>\r\n\t\twindow.tf_refresh_css = function() {\r\n\t\t\tif ( typeof localStorage !== 'undefined' ) {\r\n\r\n\t\t\t\t// Using localStorage directly as an object-value dictionary doesn't work in FF, create a new object\r\n\t\t\t\tvar localStorageData = {}, keys = Object.keys( localStorage );\r\n\t\t\t\tfor ( var i in keys ) {\r\n\t\t\t localStorageData[ keys[ i ] ] = localStorage.getItem( keys[ i ] );\r\n\t\t\t }\r\n\r\n\t\t\t\twp.ajax.send( 'tf_generate_customizer_css', {\r\n\t\t\t\t success: function( data ) {\r\n\r\n\t\t\t\t\t\t// Add the modified CSS Titan has generated from the preview values.\r\n\t\t\t\t\t\tvar style = document.querySelector('style#tf_live_preview');\r\n\t\t\t\t\t\tif ( ! style ) {\r\n\t\t\t\t\t\t\tvar style = document.createElement('STYLE');\r\n\t\t\t\t\t\t\tstyle.setAttribute( 'id', 'tf_live_preview' );\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t\tdocument.head.appendChild( style );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Render additional Javascript code for handling different data received for\r\n\t\t\t\t\t\t * live previewing\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @since 1.9.2\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @see $this->ajaxGenerateCustomizerCSS()\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tdo_action( 'tf_generate_customizer_preview_js' );\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t },\r\n\t\t\t\t\tdata: localStorageData\r\n\t\t\t\t });\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t\t</script>\r\n\t\t<?php\r\n\t}", "private function initJS(){\r\n\t\t$canEdit;\r\n\t\t$context = get_context_instance(CONTEXT_COURSE, $this->courseId);\r\n\t\tif (has_capability('moodle/course:manageactivities', $context)) {\r\n\t\t\t$canEdit = 'true';\r\n\t\t}else{\r\n\t\t\t$canEdit = 'false';\r\n\t\t}\t\t\r\n\t\t$markup='<div id=\"mashup-content\"></div>';\r\n\t\t// call the js handlers\r\n\t\t$markup.='\r\n\t\t<script>\r\n\t\t\t$(function(){ //DOM Ready\r\n\t\t\t\tmashup_properties.canEdit='.$canEdit.';\r\n\t\t\t\tmashup_properties.courseId='.$this->courseId.';\r\n\t\t\t\tMashupEngine.init(mashup_properties);\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t'.PHP_EOL; \r\n\t\t\r\n\t\treturn $markup;\t\t\r\n\t}", "private function displayJavascript() {\n $this->javascript_is_displayed = TRUE ;\n }", "public static function getJS()\n {\n $js =\n\"<script>\n\t// Hide or show detail fields of languages\n\tfunction toggleClangDetailsView(clang_id) {\n\t\tif ($(\\\"select[name='form[lang][\\\" + clang_id + \\\"][translation_needs_update]']\\\").val() === 'delete') {\n\t\t\t$('#details_clang_' + clang_id).slideUp();\n\t\t}\n\t\telse {\n\t\t\t$('#details_clang_' + clang_id).slideDown();\n\t\t};\n\t}\n\n\t// slide fieldsets\n\tjQuery(document).ready(function($) {\n\t\t$('legend').click(function(e) {\n\t\t\t$(this).toggleClass('open');\n\t\t\t$(this).next('.panel-body-wrapper.slide').slideToggle();\n\t\t});\n\t});\n\t// Open all fieldsets when save was clicked for being able to focus required fields\n\t$('button[type=submit]').click(function() {\n\t\t$('legend').each(function() {\n\t\t\tif(!$(this).hasClass('open')) {\n\t\t\t\t$(this).addClass('open');\n\t\t\t\t$(this).next('.panel-body-wrapper.slide').slideToggle();\n\t\t\t}\n\t\t});\n\t\treturn true;\n\t});\n</script>\";\n return $js;\n }", "protected function addJavascriptToBackend() {\n\t\t$this->backendReference->addJavascriptFile(t3lib_extMgm::extRelPath($this->extkey) . 'mod_role/newspaper_role.js');\n\t}", "public function js()\n {\n }", "public function admin_js() {\n\t\t\t$js = parent::admin_js();\n\t\t\t$js .= '\n\t\t\t\tcfct_builder.addModuleLoadCallback(\"'.$this->id_base.'\", function() {\n\t\t\t\t\t$(\"input[name='.$this->get_field_name('hero_alignment').']\").click(function() {\n\t\t\t\t\t\t$(\"#'.$this->id_base.'-selected-alignment\").html($(this).val().replace(\"-\", \"/\"));\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t';\n\t\t\treturn $js;\n\t\t}", "protected function addCustomJS()\n\t{\n\t\t\n\t}", "private function registerClientScript(){\n// $originalImage = $this->model->{$this->attribute};\n $view = $this->getView();\n $view->registerJs(<<<JS\n {$this->javascriptVariableName} = new ImageCropper({\n cropImageId : '{$this->cropImageId}',\n thumbnailId : '{$this->hiddenInputId}',\n objectVariableName: '{$this->javascriptVariableName}',\n url: '{$this->url}',\n thumbnailPreviewId: '{$this->previewId}',\n notificationAreaId: '{$this->notificationId}',\n cropWidth : {$this->cropWidth},\n cropHeight : {$this->cropHeight}\n });\nJS\n );\n ImageCropperAsset::register($view);\n }", "public function getValidationRulesJs()\n {\n $rules = $this->Model->validationRulesJS;\n // Hook Filter modifyValidationRulesJS\n $rules = $this->doFilter(\"modifyValidationRulesJS\", $rules);\n return $rules;\n }", "protected function _getInlineJavaScript()\n {\n return '';\n }", "public function addJs(){\r\n\t\treturn '<script type=\"text/javascript\" src=\"'.Mage::getBaseUrl('js').'interaktingslider/interaktingslider.js\"></script>';\r\n\r\n\t}", "public function javascript_validation() {\n return false;\n }", "public function layoutDesignerJavaScript()\n {\n return 'embedded-designer-javascript';\n }", "protected function renderJavascript(){\n \n return sprintf(\n '<script type=\"text/javascript\" src=\"%s\"></script>',\n $this->getField('url')\n );\n \n }", "public function getJavascriptCode() {}", "function article_js() {\n return Registry::prop('article', 'js');\n}", "protected function _getEndJs()\n\t{\n\t\t$js = parent::_getEndJs();\n\t\t$js .= \"pageJs.setPreData(\" . json_encode(array()) . \");\";\n\t\t$js .= \"pageJs._containerIds=\" . json_encode(array(\n\t\t\t\t'title' => 'title_div'\n\t\t\t\t,'authorName' => 'authorName_div'\n\t\t\t\t,'author' => 'author_div'\n\t\t\t\t,'content' => 'content_div'\n\t\t\t\t,'topicsUnits' => 'topics_units_div'\n\t\t\t\t,'comments' => 'comments_div'\n\t\t\t\t,'newAnswer' => 'new_answers_btn_div'\n\t\t\t\t,'answers' => 'answers_div'\n\t\t\t\t,'saveBtn' => 'save_btn'\n\t\t)) . \";\";\n\t\t$js .= \"pageJs.load();\";\n\t\t$js .= \"pageJs.bindAllEventNObjects();\";\n\t\tif(!AccessControl::canEditQuestionDetailsPage(Core::getRole()))\n\t\t\t$js .= \"pageJs.readOnlyMode();\";\n\t\treturn $js;\n\t}", "public function CachingRelatedJavascript()\n {\n if ($this->ProductGroupListAreAjaxified()) {\n Requirements::customScript(\n \"\n if(typeof EcomCartOptions === 'undefined') {\n var EcomCartOptions = {};\n }\n EcomCartOptions.ajaxifyProductList = true;\n EcomCartOptions.ajaxifiedListHolderSelector = '#\" . $this->AjaxDefinitions()->ProductListHolderID() . \"';\n EcomCartOptions.ajaxifiedListAdjusterSelectors = '.\" . $this->AjaxDefinitions()->ProductListAjaxifiedLinkClassName() . \"';\n EcomCartOptions.hiddenPageTitleID = '#\" . $this->AjaxDefinitions()->HiddenPageTitleID() . \"';\n \",\n 'cachingRelatedJavascript_AJAXlist'\n );\n } else {\n Requirements::customScript(\n \"\n if(typeof EcomCartOptions === 'undefined') {\n var EcomCartOptions = {};\n }\n EcomCartOptions.ajaxifyProductList = false;\n \",\n 'cachingRelatedJavascript_AJAXlist'\n );\n }\n $currentOrder = ShoppingCart::current_order();\n if ($currentOrder->TotalItems(true)) {\n $responseClass = EcommerceConfig::get(ShoppingCart::class, 'response_class');\n $obj = new $responseClass();\n $obj->setIncludeHeaders(false);\n $json = $obj->ReturnCartData();\n Requirements::customScript(\n \"\n if(typeof EcomCartOptions === 'undefined') {\n var EcomCartOptions = {};\n }\n EcomCartOptions.initialData= \" . $json . ';\n ',\n 'cachingRelatedJavascript_JSON'\n );\n }\n }", "public function RenderJavascriptRules() {\n\n if (!$this->GetOption('JavascriptValidation')) {\n return '';\n }\n // adapt some validators for JS enviroment\n\t\t$ThoSep= $this->Msg('FormatNumber.SepThousand');\n\t\t$DecSep= $this->Msg('FormatNumber.SepDecimal');\n foreach($this->JsValidations as &$Rule) {\n $Rule= str_replace('Float', \"Float:$ThoSep/$DecSep\", $Rule);\n $Rule= str_replace('Decimal:', \"Decimal:$ThoSep/$DecSep/\", $Rule);\n }\n\n // pack them\n $JSON= json_encode($this->JsValidations);\n\n // convert doublequotes to quotes\n return str_replace('\"', \"'\", str_replace(\"'\", \"\", $JSON));\n }", "public static function editor_js()\n {\n }", "protected function loadJavascript() {}", "public function createJS(){\n $clickFunction = '\n function (){\n jQuery.gridButtonAjaxConfirm({\n idGrid: \"' . $this->getIdGrid() . '\",\n url: \"' . $this->getUrl() . '\",\n method: \"' . $this->getMethod() . '\",\n param: \"' . $this->getParam() . '\",\n onConfirm: ' . $this->getOnConfirm() . ',\n onAfterLoad: ' . $this->getOnAfterLoad() . ',\n message:\\'' . str_replace(array(\"'\",chr(10),chr(13)),array(\"\\'\",'',''),$this->getMessage()) . '\\'\n });\n }\n ';\n return $clickFunction;\n }", "public function setJavascript() {\n $this->javascript = true;\n }", "public function getJqueryValidateScript() {\n return $this->getGestionnaireValidateur()->getScript($this->getName());\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "protected function initJavascriptCode() {}", "public function getValidationScript($colName) {\r\n $colScript = parent::getValidationScript($colName);\r\n if ($colName==\"idCriticality\" or $colName==\"idUrgency\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >'; \r\n $colScript .= htmlGetJsTable('Urgency', 'value');\r\n $colScript .= htmlGetJsTable('Criticality', 'value');\r\n $colScript .= htmlGetJsTable('Priority', 'value');\r\n $colScript .= ' var urgencyValue=0; var criticalityValue=0; var priorityValue=0;';\r\n $colScript .= ' var filterUrgency=dojo.filter(tabUrgency, function(item){return item.id==dijit.byId(\"idUrgency\").value;});';\r\n $colScript .= ' var filterCriticality=dojo.filter(tabCriticality, function(item){return item.id==dijit.byId(\"idCriticality\").value;});';\r\n $colScript .= ' dojo.forEach(filterUrgency, function(item, i) {urgencyValue=item.value;});';\r\n $colScript .= ' dojo.forEach(filterCriticality, function(item, i) {criticalityValue=item.value;});';\r\n $colScript .= ' calculatedValue = Math.round(urgencyValue*criticalityValue/2);';\r\n $colScript .= ' var filterPriority=dojo.filter(tabPriority, function(item){return item.value==calculatedValue;});';\r\n $colScript .= ' if ( filterPriority.length==0) {';\r\n $colScript .= ' calculatedValue = Math.round(calculatedValue/2);';\r\n $colScript .= ' var filterPriority=dojo.filter(tabPriority, function(item){varChanged=true; return item.value==calculatedValue;});';\r\n $colScript .= ' }';\r\n $colScript .= ' var setVar=\"\";';\r\n $colScript .= ' dojo.forEach(filterPriority, function(item, i) {if (setVar==\"\") dijit.byId(\"idPriority\").set(\"value\",item.id);});';\r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n } else if ($colName==\"actualDueDateTime\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var upd=dijit.byId(\"initialDueDateTime\");';\r\n $colScript .= ' if (upd && upd.get(\"value\")==null) { ';\r\n $colScript .= ' upd.set(\"value\", this.value); ';\r\n $colScript .= ' } ';\r\n $colScript .= ' formChanged();'; \r\n $colScript .= '</script>'; \r\n } else if ($colName==\"actualDueDateTimeBis\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var upd=dijit.byId(\"initialDueDateTimeBis\");';\r\n $colScript .= ' if (upd && upd.get(\"value\")==null) { ';\r\n $colScript .= ' upd.set(\"value\", this.value); ';\r\n $colScript .= ' } ';\r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>'; \r\n } else if ($colName==\"initialDueDateTime\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var upd=dijit.byId(\"actualDueDateTime\");';\r\n $colScript .= ' if (upd && upd.get(\"value\")==null) { ';\r\n $colScript .= ' upd.set(\"value\", this.value); ';\r\n $colScript .= ' } ';\r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>'; \r\n } else if ($colName==\"initialDueDateTimeBis\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var upd=dijit.byId(\"actualDueDateTimeBis\");';\r\n $colScript .= ' if (upd && upd.get(\"value\")==null) { ';\r\n $colScript .= ' upd.set(\"value\", this.value); ';\r\n $colScript .= ' } ';\r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>'; \r\n } else if ($colName==\"idProduct\" or $colName==\"idComponent\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' if (this.value) {';\r\n $colScript .= ' var idP=dijit.byId(\"idProduct\").get(\"value\");';\r\n $colScript .= ' var idC=dijit.byId(\"idComponent\").get(\"value\");';\r\n $colScript .= ' var idR=dijit.byId(\"idResource\").get(\"value\");';\r\n $colScript .= ' dojo.xhrGet({';\r\n $colScript .= ' url: \"../tool/getSingleData.php?dataType=responsible&idProduct=\"+idP+\"&idComponent=\"+idC+\"&idResource=\"+idR,';\r\n $colScript .= ' handleAs: \"text\",';\r\n $colScript .= ' load: function (data) {';\r\n $colScript .= ' if (data) {';\r\n $colScript .= ' refreshList(\"idResource\", \"idProject\", dijit.byId(\"idProject\").get(\"value\"), data, null, dijit.byId(\"idResource\").get(\"required\"));';\r\n $colScript .= ' dijit.byId(\"idResource\").set(\"value\",data);';\r\n $colScript .= ' }';\r\n $colScript .= ' }';\r\n $colScript .= ' });';\r\n $colScript .= ' };';\r\n \r\n //ADD by qCazelles - Business features\r\n if ($colName==\"idProduct\") $colScript .= 'dijit.byId(\"idBusinessfeature\").set(\"value\", \"\");refreshList(\"idBusinessfeature\", \"idProduct\", dijit.byId(\"idProduct\").get(\"value\"));';\r\n //END ADD\r\n \r\n $colScript .= '</script>';\r\n }\r\n if ($colName==\"done\") {\r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' var done=dijit.byId(\"done\").get(\"checked\");';\r\n $colScript .= ' var real=dijit.byId(\"WorkElement_realWork\").get(\"value\");';\r\n $colScript .= ' var planned=dijit.byId(\"WorkElement_plannedWork\").get(\"value\");';\r\n $colScript .= ' if (done) {';\r\n $colScript .= ' dijit.byId(\"WorkElement_leftWork\").set(\"value\", 0);';\r\n $colScript .= ' } else {';\r\n $colScript .= ' var left=planned-real;';\r\n $colScript .= ' if (left<0) left=0;';\r\n $colScript .= ' dijit.byId(\"WorkElement_leftWork\").set(\"value\", left);';\r\n $colScript .= ' } ';\r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n }\r\n return $colScript;\r\n }", "public function layoutDesignerJavaScript()\n {\n return 'forecastio-designer-javascript';\n }", "protected function getJavascript()\n {\n $allowed_types = Config::inst()->get(GoogleAddressField::class, 'allowed_types');\n\n if ($allowed_types) {\n return '\n if(typeof GoogleAddressFieldStatics === \"undefined\") {\n var GoogleAddressFieldStatics = {};\n }\n GoogleAddressFieldStatics.allowedTypes = ' . json_encode($allowed_types) . ';\n ';\n }\n\n return '';\n }", "public function js();", "public function rental_custom_js() {\n\n\tif ( 'product' != get_post_type() ) :\n\t\treturn;\n\tendif;\n\n\t?><script type='text/javascript'>\n\t\tjQuery( document ).ready( function() {\n\t\t\tjQuery( '.options_group.pricing' ).addClass( 'show_if_rental' ).show();\n\t\t});\n\t</script><?php\n\t}", "public function generatePage_whichScript() {}", "protected function renderJavaScriptAndCss() {}", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function live_preview_scripts() {\n\t\t\t// Live preview JS\n\t\t\tthemify_enque_script('themify-customize-preview', THEMIFY_CUSTOMIZER_URI . '/js/themify.customize-preview.js', array('jquery', 'customize-preview', 'underscore', 'backbone'), THEMIFY_VERSION, true);\n\t\t\t$controls = array(\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce'),\n\t\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t\t'isRTL' => is_rtl(),\n\t\t\t\t'breakpoints' => $this->get_breakpoints(),\n\t\t\t\t'cf_api_url' => Themify_Custom_Fonts::$api_url\n\t\t\t);\n\t\t\tforeach ($this->settings as $key => $params) {\n\t\t\t\tif (!isset($params['selector'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ($this->endsWith($key, '_font')) {\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_background') || $this->endsWith($key, '_background_color') ) {\n\t\t\t\t\t$controls['backgroundControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_position')) {\n\t\t\t\t\t$controls['positionControls'][$key] = $params['selector'];\n\t\t\t\t} elseif (false !== stripos($key, '-logo_')) {\n\t\t\t\t\tif ( $params['prop'] === 'margin' ) {\n\t\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$controls['logoControls'][$key] = $params['selector'];\n\t\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t}\n\t\t\t\t} elseif ($this->endsWith($key, '-tagline')) {\n\t\t\t\t\t$controls['taglineControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_border')) {\n\t\t\t\t\t$controls['borderControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_margin')) {\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_padding')) {\n\t\t\t\t\t$controls['paddingControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_width')) {\n\t\t\t\t\t$controls['widthControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_height')) {\n\t\t\t\t\t$controls['heightControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'border_color')) {\n\t\t\t\t\t$controls['borderColorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_color')) {\n\t\t\t\t\t$controls['colorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'customcss')) {\n\t\t\t\t\t$controls['customcssControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_imageselect')) {\n\t\t\t\t\t$controls['imageselectControls'][$key] = $params['selector'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Pass JS variables to live preview scripts\n\t\t\twp_localize_script('themify-customize-preview', 'themifyCustomizer', $controls);\n\t\t}", "public function getFrontendScripts() {\n }", "public function getFrontendScripts() {\n }", "private function dd_content_inline_js() {\n global $COURSE, $CFG;\n \n echo \"<script>\";\n echo \"dd_content_php['orientation'] = '\".$this->get_menu_oritentation().\"';\";\n echo \"</script>\";\n }", "public function injectJavascriptInView(): void;", "function javascript_validation() {\n return false;\n }", "function renderValidationJS()\r\n {\r\n if ($this->isRequired() && $eltname = $this->getName()) {\r\n //$eltname = $this->getName();\r\n $eltcaption = $this->getCaption();\r\n $eltmsg = empty($eltcaption) ? sprintf( _FORM_ENTER, $eltname ) : sprintf( _FORM_ENTER, $eltcaption );\r\n $eltmsg = str_replace('\"','\\\"', stripslashes( $eltmsg ) );\r\n $ret = \"\\n\";\r\n $ret.= \"if ( tinyMCE.get('{$eltname}').getContent() == \\\"\\\" || tinyMCE.get('{$eltname}').getContent() == null) \";\r\n $ret.= \"{ window.alert(\\\"{$eltmsg}\\\"); tinyMCE.get('{$eltname}').focus(); return false; }\";\r\n return $ret;\r\n }\r\n return '';\r\n }", "protected function getJavascriptCallback()\r\n {\r\n $rule = clone $this->getConfig();\r\n $callbacks = array();\r\n foreach ($this->owner->getRecursiveIterator(RecursiveIteratorIterator::LEAVES_ONLY) as $child) {\r\n try {\r\n $rule->setOwner($child);\r\n $callbacks[] = $rule->getJavascriptCallback();\r\n } catch (HTML_QuickForm2_InvalidArgumentException $e) {}\r\n }\r\n return \"function () { return qf.rules.each([\\n\\t\\t\" . implode(\",\\n\\t\\t\", $callbacks) . \"\\n\\t]); }\";\r\n }", "public function js_template() {\n\t\t?>\n <script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n <div class=\"uni-modal-row uni-clear\">\n\t\t\t\t<?php echo $this->generate_field_label_html() ?>\n <div class=\"uni-modal-row-second\">\n\t\t\t\t\t<?php echo $this->generate_select_html() ?>\n </div>\n </div>\n </script>\n\t\t<?php\n\t}", "public function getPlaceholderJavascript() { return $this->_placeholderJavascript; }", "protected function getJavaScriptConfiguration() {}", "protected function addOnSubmitJavaScriptCode() {}", "private function secureCustomElementDefine()\n {\n $this->js .= file_get_contents(__DIR__ . '/protectors.js');\n }", "protected function getShow(){\r\n\t\t//$strr = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/embed.php?'.$this->Property->getValue($_SESSION['langue'])->getValueShort());\r\n\t\t$dao = $this->Factory->getPropertyValueDAO();\r\n\t\t$docid = $this->params['currentid'];\r\n\t\t$proId = $this->Property->getId();\r\n\t\t$value= $dao->getByPropertyByDocumentUsingIds($docid,$proId,$_SESSION['langue']);\r\n\t\t$_SESSION['wrapperurl']=$_SERVER['REQUEST_URI'];\r\n\t\t$strr.='<script type=\"text/javascript\">';\r\n\t\t//$strr.='jQuery.ajaxSetup ({cache: false});';\r\n\t\t$strr.='url = \"http://'.$_SERVER['HTTP_HOST'].'/embed.php?'.$value->getValueShort().'\";';\r\n\t\t$this->content.='ajaxLoad(url,\\'listing\\',function() {jQuery(\\'#dynTab\\').dataTable({\"oLanguage\": {\"sUrl\": \"/js/lang/dynTable_'.strtoupper($_SESSION['langue']).'.txt\"}});});';\r\n\t\t//$strr.='jQuery(\"#data\").ready(function(){jQuery(\"#data\").html(ajax_load).load(loadUrl, function() {jQuery(\\'#dynTab\\').dataTable({\"oLanguage\": {\"sUrl\": \"/js/lang/dynTable_'.strtoupper($_SESSION['langue']).'.txt\"}});});});';\r\n\t\t$strr.='</script>'.\"\\n\";\r\n\t\t\r\n\t\treturn $strr;\r\n\t}", "function my_gform_editor_js(){\n\t\t?>\n\t\t<script>\n\t\t//binding to the load field settings event to initialize the checkbox\n\t\tjQuery(document).bind(\"gform_load_field_settings\", function(event, field, form){\n\t\t\tjQuery(\"#field_placeholder\").val(field[\"placeholder\"]);\n\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "public function getJsRenderer() {\t\n\t\t$html = $this->html;\t\n\t\tpreg_match_all('/{\\w*}/', $html, $res);\t\t\n\t\tif (!empty($res)) {\n\t\t\t$matches = $res[0];\n\t\t\t$replaceStr = \"\";\n\t\t\tforeach ($matches as $key => $value) {\n\t\t\t\t$replaceStr .= '.replace(\"'.$value.'\", row.'.str_replace(array('{','}'), array('',''), $value).')';\n\t\t\t}\n\t\t} \t\t\n\t\treturn 'function(row) { return '.json_encode($html).$replaceStr.' }';\t\n\t\t\n\t}", "function add_support_script_frontend(){\n}", "private function addJS()\n {\n Filters::add('scripts', array($this, 'renderRevisionsJS'));\n }", "protected function disableNativeScriptFilter()\n {\n $this->registerJs(join(\"\\n\", [\n '(function(){ // yii-resource-smart-load extension',\n ' var app = ' . RSmartLoad::JS_GLOBAL_OBJ_PRIVATE_PATH . ';',\n ' var parentFunc = app.addResource;',\n ' app.addResource = function(hash, resource, comment){',\n ' var isAlreadyLoaded = Boolean(app.getResourceByHash(hash));',\n ' if(!isAlreadyLoaded){',\n ' yii.reloadableScripts.push(resource);',\n ' }',\n ' parentFunc.apply(this, arguments);',\n ' } ',\n '})();'\n ]), self::POS_END);\n }", "public function loadJavascriptClass_result()\n\t{\n\t\t$this->onGetFilterKey();\n\t\t$p = $this->onGetFilterKey_result();\n\t\treturn 'plugins/fabrik_list/' . $p . '/' . $p . '.js';\n\t}", "public function renderScript()\n {\n }", "public function loadCustomCssJs() {\r\n\t\t$mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);\r\n\r\n\t\t$minishopAssetsUrl = $this->modx->getOption('minishop2.assets_url',null,$this->modx->getOption('assets_url',null,MODX_ASSETS_URL).'components/minishop2/');\r\n\t\t$connectorUrl = $minishopAssetsUrl.'connector.php';\r\n\t\t$minishopJsUrl = $minishopAssetsUrl.'js/mgr/';\r\n\t\t$minishopImgUrl = $minishopAssetsUrl.'img/mgr/';\r\n\r\n\t\t// Customizable product fields feature\r\n\t\t$product_fields = array_merge($this->resource->getAllFieldsNames(), array('syncsite'));\r\n\t\t$product_data_fields = $this->resource->getDataFieldsNames();\r\n\r\n\t\tif (!$product_main_fields = $this->modx->getOption('ms2_product_main_fields')) {\r\n\t\t\t$product_main_fields = 'pagetitle,longtitle,introtext,content,publishedon,pub_date,unpub_date,template,parent,alias,menutitle,searchable,cacheable,richtext,uri_override,uri,hidemenu,show_in_tree';\r\n\t\t}\r\n\t\t$product_main_fields = array_map('trim', explode(',',$product_main_fields));\r\n\t\t$product_main_fields = array_values(array_intersect($product_main_fields, $product_fields));\r\n\r\n\t\tif (!$product_extra_fields = $this->modx->getOption('ms2_product_extra_fields')) {\r\n\t\t\t$product_extra_fields = 'article,price,old_price,weight,color,remains,reserved,vendor,made_in,tags';\r\n\t\t}\r\n\t\t$product_extra_fields = array_map('trim', explode(',',$product_extra_fields));\r\n\t\t$product_extra_fields = array_values(array_intersect($product_extra_fields, $product_fields));\r\n\t\t//---\r\n\r\n // Get extra options fields\r\n $product_option_fields = $this->resource->getOptionFields();\r\n\r\n\r\n\t\t$showComments = class_exists('Ticket') && $this->modx->getOption('ms2_product_show_comments') ? 1 : 0;\r\n\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/util/datetime.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.panel.tv.renders.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.grid.resource.security.local.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'product/product.tv.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.panel.resource.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/sections/resource/update.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'minishop2.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ms2.combo.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ms2.utils.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/plupload/plupload.full.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ext.ddview.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/category.tree.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/gallery.panel.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/links.grid.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/product.common.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/update.js');\r\n\r\n\t\t$this->prepareFields();\r\n\r\n\t\tif ($showComments) {$this->loadTickets();}\r\n\t\tif ($this->resource instanceof msProduct) {\r\n\t\t\t$neighborhood = $this->resource->getNeighborhood();\r\n\t\t}\r\n\r\n\t\t$this->addHtml('\r\n\t\t<script type=\"text/javascript\">\r\n\t\t// <![CDATA[\r\n\t\tminiShop2.config = {\r\n\t\t\tassets_url: \"'.$minishopAssetsUrl.'\"\r\n\t\t\t,connector_url: \"'.$connectorUrl.'\"\r\n\t\t\t,show_comments: '.$showComments.'\r\n\t\t\t,logo_small: \"'.$minishopImgUrl.'ms2_small.png\"\r\n\t\t\t,main_fields: '.json_encode($product_main_fields).'\r\n\t\t\t,extra_fields: '.json_encode($product_extra_fields).'\r\n\t\t\t,option_fields: '.json_encode($product_option_fields).'\r\n\t\t\t,vertical_tabs: '.$this->modx->getOption('ms2_product_vertical_tabs', null, true).'\r\n\t\t\t,product_tab_extra: '.$this->modx->getOption('ms2_product_tab_extra', null, true).'\r\n\t\t\t,product_tab_gallery: '.$this->modx->getOption('ms2_product_tab_gallery', null, true).'\r\n\t\t\t,product_tab_links: '.$this->modx->getOption('ms2_product_tab_links', null, true).'\r\n\t\t\t,data_fields: '.json_encode($product_data_fields).'\r\n\t\t\t,additional_fields: []\r\n\t\t\t,media_source: '.json_encode($this->getSourceProperties()).'\r\n\t\t}\r\n\t\tMODx.config.publish_document = \"'.$this->canPublish.'\";\r\n\t\tMODx.onDocFormRender = \"'.$this->onDocFormRender.'\";\r\n\t\tMODx.ctx = \"'.$this->ctx.'\";\r\n\t\tExt.onReady(function() {\r\n\t\t\tMODx.load({\r\n\t\t\t\txtype: \"minishop2-page-product-update\"\r\n\t\t\t\t,resource: \"'.$this->resource->get('id').'\"\r\n\t\t\t\t,record: '.$this->modx->toJSON($this->resourceArray).'\r\n\t\t\t\t,publish_document: \"'.$this->canPublish.'\"\r\n\t\t\t\t,preview_url: \"'.$this->previewUrl.'\"\r\n\t\t\t\t,locked: '.($this->locked ? 1 : 0).'\r\n\t\t\t\t,lockedText: \"'.$this->lockedText.'\"\r\n\t\t\t\t,canSave: '.($this->canSave ? 1 : 0).'\r\n\t\t\t\t,canEdit: '.($this->canEdit ? 1 : 0).'\r\n\t\t\t\t,canCreate: '.($this->canCreate ? 1 : 0).'\r\n\t\t\t\t,canDuplicate: '.($this->canDuplicate ? 1 : 0).'\r\n\t\t\t\t,canDelete: '.($this->canDelete ? 1 : 0).'\r\n\t\t\t\t,canPublish: '.($this->canPublish ? 1 : 0).'\r\n\t\t\t\t,show_tvs: '.(!empty($this->tvCounts) ? 1 : 0).'\r\n\t\t\t\t,next_page: '.(!empty($neighborhood['right'][0]) ? $neighborhood['right'][0] : 0).'\r\n\t\t\t\t,prev_page: '.(!empty($neighborhood['left'][0]) ? $neighborhood['left'][0] : 0).'\r\n\t\t\t\t,up_page: '.$this->resource->parent.'\r\n\t\t\t\t,mode: \"update\"\r\n\t\t\t});\r\n\t\t});\r\n\t\t// ]]>\r\n\t\t</script>');\r\n\t\t/* load RTE */\r\n\t\t$this->loadRichTextEditor();\r\n\t\t$this->modx->invokeEvent('msOnManagerCustomCssJs',array('controller' => &$this, 'page' => 'product_update'));\r\n\t\t$this->loadPlugins();\r\n\t}", "public function add_field_settings_js() {\n\n\t\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery( document ).bind( 'gform_load_field_settings', function ( e, field, form ) {\n\t\t\t\tjQuery( '#field_link_type_preview' ).attr( 'checked', 'preview' === field[ 'linkType' ] );\n\t\t\t\tjQuery( '#field_link_type_direct' ).attr( 'checked', 'direct' === field[ 'linkType' ] );\n\t\t\t\tjQuery( '#field_multiselect' ).attr( 'checked', true === field[ 'multiselect' ] );\n\t\t\t} );\n\t\t</script>\n\n\t\t<?php\n\n\t}", "function responsive_framework_customizer_preview_scripts() {\n\twp_enqueue_script( 'responsi-customize-preview', get_template_directory_uri() . '/admin/customize-preview.js', array( 'customize-preview' ), RESPONSIVE_FRAMEWORK_VERSION, true );\n}", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "function wp_post_preview_js()\n {\n }", "protected function _getEndJs()\n\t{\n\t\t$js = parent::_getEndJs();\n\t\t$js .= \"pageJs._containerIds=\" . json_encode(array(\n\t\t\t\t'sku' => 'sku_div'\n\t\t\t\t,'description' => 'description_div'\n\t\t\t\t,'vendor' => 'vendor_div'\n\t\t\t\t,'prices' => 'prices_div'\n\t\t\t\t,'comments' => 'comments_div'\n\t\t\t\t,'saveBtn' => 'save_btn'\n\t\t)) . \";\";\n\t\t$js .= \"pageJs.load();\";\n\t\t$js .= \"pageJs.bindAllEventNObjects();\";\n\t\treturn $js;\n\t}", "public function js_template() {\n\t\t?>\n <script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n <div class=\"uni-modal-row uni-clear\">\n\t\t\t\t<?php echo $this->generate_field_label_html() ?>\n <div class=\"uni-modal-row-second uni-clear\">\n <div class=\"uni-setting-fields-wrap\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[top]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.top }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[right]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.right }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[bottom]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.bottom }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_text_html(\n\t\t\t\t\t\t\t'margin[left]',\n\t\t\t\t\t\t\tarray( 'class' => array( 'uni-setting-field-1' ), 'value' => '{{- data.left }}' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\techo $this->generate_linked_checkbox_html();\n\t\t\t\t\t\techo $this->generate_radio_html(\n\t\t\t\t\t\t\t'margin[unit]',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'px' => 'px',\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'js_var' => 'data.unit'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n </div>\n </div>\n </div>\n </script>\n\t\t<?php\n\t}", "function draw_javascript_block(){\r\n\r\n\t\t// sort order\r\n\t\t$out_sort_order='var arr_sort_order= new Array();';\r\n\r\n\t\tfor($i=0; $i<strlen($this->sort_order); $i++){\r\n\t\t\tif($i==strlen($this->sort_order)-1)\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[0].'\";';\r\n\t\t\telse\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[$i+1].'\";';\r\n\t\t}\r\n\r\n\t\tif(strpos($this->sort_order,'t')===false)\r\n\t\t\t$out_sort_order.='arr_sort_order[\"t\"]=\"\";';\r\n\r\n\t\t$out_sort_order.='arr_sort_order[\"first\"]=\"'.$this->sort_order[0].'\";';\r\n\r\n\t\t$out='<script type=\"text/javascript\">'.$out_sort_order.'var extra_cols ='.json_encode($this->extra_cols).';';\r\n\r\n\t\tif($this->search=='')\r\n\t\t\t$out.='jQuery(document).ready(function(){ jQuery(\"#'.$this->id.'_search_value\").css(\"opacity\",\"1\"); });';\r\n\r\n\t\t$out.='</script>';\r\n\r\n\t\treturn $out;\r\n\t}", "public function customize_preview_js() {\n\t\twp_enqueue_script( 'customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '1', true );\n\t}", "public function load_live_preview_script() {\n wp_enqueue_script( self::$skin_name . '-live-preview',\n get_template_directory_uri() . '/skins/' . self::$skin_name . '/customize/live-preview.js',\n array('jquery', 'appengine', 'customize-preview', 'ae-theme-customizer'),\n ET_VERSION,\n true\n );\n }", "function getRulesForJavaScript() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\tforeach ($fieldRules as $ruleName => $ruleValue) {\n\t\t\t\t$method = $field->getValidationMethod($ruleName);\n\t\t\t\tif ($ruleForJavaScript = $method->convertRuleForJavascript()) {\n\t\t\t\t\t$fieldRules[$ruleName] = $ruleForJavaScript;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($fieldRules) {\n\t\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function render_control_template_scripts()\n {\n }", "public static function render_control_template_scripts()\n {\n }", "protected function _addJs() {\n\t\t$checkUrl = $this->Html->url([\n\t\t\t'plugin' => 'vat_number_check', 'controller' => 'vat_number_checks', 'action' => 'check', 'ext' => 'json'\n\t\t]);\n\t\t$checkImages = [\n\t\t\t'ok' => $this->Html->url('/vat_number_check/img/ok.png'),\n\t\t\t'failure' => $this->Html->url('/vat_number_check/img/failure.png'),\n\t\t\t'serviceUnavailable' => $this->Html->url('/vat_number_check/img/service-unavailable.png'),\n\t\t];\n\n\t\t$script = \"\n\t\t\t/* jshint jquery:true */\n\n\t\t\tjQuery.noConflict();\n\t\t\t(function($) {\n\t\t\t\t$(function () {\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\telementSelector: '\" . sprintf('input.%s', $this->_inputClass) . \"',\n\t\t\t\t\t\tcheckUrl: '\" . $checkUrl . \"',\n\t\t\t\t\t\tcheckImages: \" . json_encode($checkImages) . \",\n\t\t\t\t\t};\n\t\t\t\t\tvar vatNumberCheck = new VatNumberCheck(options);\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\";\n\n\t\t$this->Html->script([\n\t\t\t'VatNumberCheck.jquery.min', 'VatNumberCheck.klass.min', 'VatNumberCheck.vat_number_check'\n\t\t], ['inline' => false, 'once' => true]);\n\t\t$this->Html->scriptBlock($script, ['inline' => false]);\n\t}", "public function displayScriptLiveLayer()\n {\n /*\n * loads different cart handling assets depending on the version of prestashop used\n * (uses different javascript implementations for this purpose in prestashop 1.6.x and 1.7.x)\n */\n if (version_compare(_PS_VERSION_, '1.7', '<') === true) {\n $this->context->controller->addJS(\n $this->_path . 'views/js/add-to-cart/doofinder-add_to_cart_ps16.js'\n );\n } else {\n $this->context->controller->addJS(\n $this->_path . 'views/js/add-to-cart/doofinder-add_to_cart_ps17.js'\n );\n }\n\n return $this->display(__FILE__, 'views/templates/front/scriptV9.tpl');\n }", "function javascript_validation() {\n return false;\n }", "public function setJavascriptData() {\n // Make Services List\n $services = array(\n 'billingDashboard' => $this->createAbsoluteUrl('billingDashboard/index'),\n // Invoice export / preview urls\n 'exportInvoice' => $this->createAbsoluteUrl('createInvoice', array('report' => 1)),\n );\n // Encode to javascript\n $servicesEncoded = CJavaScript::encode($services);\n \n // Set javascript variable\n Yii::app()->clientScript->registerScript('set_services', \"\n var services = {$servicesEncoded};\n \", CClientScript::POS_BEGIN);\n }", "function FieldHolder() {\n\t\t$d = Object::create('DateField_View_JQuery', $this); \n\t\t$d->onBeforeRender(); \n\t\t$html = parent::FieldHolder(); \n\t\t$html = $d->onAfterRender($html); \n\t\t\n\t\treturn $html;\n\t}", "function AddMandatoryJS() {\n\n\t\tif($this->conf['libraryToUse'] == 'jquery'){\n\t\t\t$jsValidation = '\n\t\t\t\tvar valid = new Validation(\\'#'.$this->OuterMarkerArray['###POWERMAIL_NAME###'].'\\', {immediate : true, onFormValidate : formCallback, focusOnError: true});\n\t\t\t';\n\n\t\t}else{\n\t\t\t$jsValidation = '\n\t\t\t\t\tvar valid = new Validation(\\'' . $this->OuterMarkerArray['###POWERMAIL_NAME###'] . '\\', {immediate : true, onFormValidate : formCallback});\n\t\t\t';\n\t\t}\n\n\t\t$js = '\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tfunction formCallback(result, form) {\n\t\t\t\t\twindow.status = \"valiation callback for form \\'\" + form.id + \"\\': result = \" + result;\n\t\t\t\t}\n\t\t\t\t' . $jsValidation . '\n\t\t\t</script>\n\t\t';\n\n\t\treturn $js;\n\t}", "function javascript_validation() {\r\n return false;\r\n }", "protected function _afterSave()\n {\n if ($this->isValueChanged()) {\n Mage::getModel('core/design_package')->cleanMergedJsCss();\n }\n }", "public function getValidationScript($colName) {\r\n $colScript = parent::getValidationScript($colName);\r\n\r\n if ($colName==\"idle\") { \r\n $colScript .= '<script type=\"dojo/connect\" event=\"onChange\" >';\r\n $colScript .= ' if (this.checked) { ';\r\n $colScript .= ' if (dijit.byId(\"PlanningElement_realEndDate\").get(\"value\")==null) {';\r\n $colScript .= ' dijit.byId(\"PlanningElement_realEndDate\").set(\"value\", new Date); ';\r\n $colScript .= ' }';\r\n $colScript .= ' } else {';\r\n $colScript .= ' dijit.byId(\"PlanningElement_realEndDate\").set(\"value\", null); ';\r\n //$colScript .= ' dijit.byId(\"PlanningElement_realDuration\").set(\"value\", null); ';\r\n $colScript .= ' } '; \r\n $colScript .= ' formChanged();';\r\n $colScript .= '</script>';\r\n }\r\n return $colScript;\r\n }", "protected function _getEndJs()\r\n\t{\r\n\t\t$js = parent::_getEndJs();\r\n\t\t\r\n\t\t$paymentMethods = array_map(create_function('$a', 'return $a->getJson();'), PaymentMethod::getAll());\r\n\t\t$shippingMethods = array_map(create_function('$a', 'return $a->getJson();'), Courier::getAll());\r\n\t\t$customer = (isset($_REQUEST['customerid']) && ($customer = Customer::get(trim($_REQUEST['customerid']))) instanceof Customer) ? $customer->getJson() : null;\r\n\t\t$js .= \"pageJs\";\r\n\t\t\t$js .= \".setHTMLIDs('detailswrapper')\";\r\n\t\t\t$js .= \".setCallbackId('searchCustomer', '\" . $this->searchCustomerBtn->getUniqueID() . \"')\";\r\n\t\t\t$js .= \".setCallbackId('searchProduct', '\" . $this->searchProductBtn->getUniqueID() . \"')\";\r\n\t\t\t$js .= \".setCallbackId('saveOrder', '\" . $this->saveOrderBtn->getUniqueID() . \"')\";\r\n\t\t\t$js .= \".setPaymentMethods(\" . json_encode($paymentMethods) . \")\";\r\n\t\t\t$js .= \".setShippingMethods(\" . json_encode($shippingMethods) . \")\";\r\n\t\t\t$js .= \".setOrderTypes(\" . json_encode(array_filter(Order::getAllTypes(), create_function('$a', 'return $a !== \"INVOICE\";'))) . \")\";\r\n\t\t\t$js .= \".init(\" . json_encode($customer) . \");\";\r\n\t\treturn $js;\r\n\t}", "public function customize_preview_html5()\n {\n }", "function guntenberg_enqueue_admin_value_js(){\n\twp_localize_script('frugalisme-editor-js', 'frugalisme_value', array(\n\t\t'render_youtube' => frugalisme_render_feed() ,\n\n\t));\n}", "function _javascript($view) {\n switch ($view) {\n case 'invoices_add':\n $java = array(\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.waypoints.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.counterup.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-toastr/toastr.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/datatable.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/datatables/datatables.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/app.min.js'\",\n \"'\" . base_url() . \"../assets/pages/scripts/table-datatables-responsive.js'\",\n \"'\" . base_url() . \"../assets/layouts/layout/scripts/layout.min.js'\",\n );\n\t\t\t\t\n break;\n case 'invoices_view':\n $java = array(\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.waypoints.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.counterup.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-toastr/toastr.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/app.min.js'\",\n \"'\" . base_url() . \"../assets/layouts/layout/scripts/layout.min.js'\",\n );\n\t\t\t\t\n break;\n }\n return $java;\n }", "public function startJs(){\r\n\r\n \r\n\t\t$vs_Js = \"\r\n\t\t\r\n\t\t\tvar interaktingslider = new InteraktingSlider(); \r\n\t\t\t\r\n\t\t\tinteraktingslider.setDelay(\".$this->getModel()->getDelay().\");\r\n\t\t\tinteraktingslider.setTransition('\".$this->getModel()->getTransition().\"');\r\n\t\t\tinteraktingslider.setSpeed(\".$this->getModel()->getSpeed().\");\t\t\r\n\t\t\tinteraktingslider.setMode('\".$this->getModel()->getMode().\"');\r\n\t\t\t\r\n\t\t\";\r\n\r\n\t\t$va_Slides = $this->getSlides();\r\n\r\n\t\tif($va_Slides){\r\n\t\t\tforeach ($va_Slides as $vo_Slide){\r\n\t\t\t\t$vs_Js .= 'interaktingslider.addSlide(\"'.$vo_Slide->getFormatedContent().'\"); ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$vs_Js .= \"\r\n\t\t\tinteraktingslider.show(); \t\t\r\n\t\t\";\r\n\r\n\r\n\t\treturn $vs_Js;\r\n\r\n\t}", "protected function _getEndJs()\r\n\t{\r\n\t\t$js = parent::_getEndJs ();\r\n\t\t$js .= 'pageJs';\r\n\t\t$js .= '.setCallbackId(\"getLatestTrans\", \"' . $this->getLatestTransBtn->getUniqueID () . '\")';\r\n\t\t$js .= '.setCallbackId(\"getSummary\", \"' . $this->getSummaryBtn->getUniqueID () . '\")';\r\n\t\t$js .= '.init(\"page-wrapper\", \"#' . $this->getForm ()->getClientID () . '\");';\r\n\t\treturn $js;\r\n\t}", "private function include_matrix_js() {\n\n\t\t$this->EE->cp->add_to_foot(\n\t\t\t\t'<script type=\"text/javascript\" src=\"'.$this->EE->config->item('theme_folder_url').'third_party/dm_eeck/editor_matrix.js\"></script>'\n\t\t);\n\t}" ]
[ "0.6497548", "0.64963424", "0.63479286", "0.6284777", "0.60817856", "0.6036589", "0.5894851", "0.5854491", "0.57311904", "0.5695847", "0.56899685", "0.5689848", "0.56778765", "0.5631239", "0.56055886", "0.5568557", "0.5560437", "0.55327666", "0.5532317", "0.5499723", "0.5489551", "0.5471285", "0.5456323", "0.5445542", "0.54273796", "0.54140127", "0.54043764", "0.5389188", "0.5387556", "0.5383199", "0.5372976", "0.5365077", "0.5363755", "0.5358021", "0.53534627", "0.532406", "0.53206563", "0.53206563", "0.53206563", "0.53206563", "0.53206563", "0.5318631", "0.5315329", "0.53147584", "0.5308013", "0.53034115", "0.5297419", "0.52944505", "0.5293321", "0.52843183", "0.5271928", "0.5270702", "0.5270702", "0.5267034", "0.5263685", "0.52430147", "0.52412087", "0.5235094", "0.5215397", "0.52076286", "0.51989573", "0.51947874", "0.5188061", "0.51825815", "0.51806575", "0.51770866", "0.51749283", "0.51737136", "0.5170783", "0.5170581", "0.5167749", "0.5162034", "0.51594913", "0.5158063", "0.5149599", "0.5149173", "0.5133559", "0.5127413", "0.512605", "0.5118943", "0.5116654", "0.5116333", "0.511458", "0.511458", "0.5113175", "0.51110286", "0.5105848", "0.509623", "0.50926363", "0.50920886", "0.5080641", "0.50797457", "0.5067614", "0.5058533", "0.5056801", "0.5054855", "0.50475717", "0.50465655", "0.5046316", "0.5029978" ]
0.7521728
0
Prepare the product collection Collection is the matched products for the current query
protected function _prepareCollection() { $baseQuery = $this->_getBaseSearchQuery(); $productIds = $this->_getProductIdsFromSearchQuery($baseQuery); if (empty($productIds)) { $productIds = array(0); } $attributes = Mage::getModel('catalog/config')->getProductCollectionAttributes(); /** @var Mage_Catalog_Model_Resource_Product_Collection $collection */ $collection = Mage::getResourceModel('catalog/product_collection') ->addIdFilter($productIds) ->addAttributeToSelect($attributes); $storeIds = implode(",", array_unique(array_map("intval", array(Mage_Core_Model_App::ADMIN_STORE_ID, $this->getStoreId())))); if ($this->getStoreId() != Mage_Core_Model_App::ADMIN_STORE_ID) { $collection->setStoreId($this->getStoreId()); $joinCond = "category_id = " . (int) $this->getCategory()->getId() . " AND store_id = {$this->getStoreId()}"; } else { $joinCond = "category_id = " . (int) $this->getCategory()->getId() . " AND store_id IN ({$storeIds})"; } $collection->joinField( 'position', 'smile_virtualcategories/category_product_position', 'position', 'product_id = entity_id', $joinCond, 'left' ); $collection->getSelect()->order( new Zend_Db_Expr("- position DESC") // mimic a "SORT BY #field NULL LAST ); $entityIds = implode(",", $productIds); $collection->getSelect()->order( new Zend_Db_Expr("FIELD(e.entity_id, {$entityIds})") // restore sort order given by ES ); $this->setCollection($collection); return parent::_prepareCollection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _prepareCollection() {\n $collection = Mage::getModel('vidtest/video')\n ->getCollection()\n ->addProductFilter($this->getProduct()->getId())\n ;\n\n if ($storeId = $this->getProduct()->getStoreId()) {\n $collection->addStoreFilter($storeId);\n }\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n /**\n * Get the Collection of Manage Subscription\n */\n $manageSubscription = Mage::getModel ( 'airhotels/managesubscriptions' )->getCollection ();\n \n /**\n * Get the Table Prefix Value\n */\n $tablePrefix = Mage::getConfig ()->getTablePrefix ();\n $manageSubscription->getSelect ()->group ( 'main_table.product_id' )->joinLeft ( $tablePrefix . 'apptha_productsubscriptions', 'main_table.product_id =' . $tablePrefix . 'apptha_productsubscriptions.product_id AND ' . $tablePrefix . 'apptha_productsubscriptions.is_delete = 0', array (\n 'main_table.id as id',\n 'main_table.product_name as product_name',\n $tablePrefix . 'apptha_productsubscriptions.subscription_type as subscription_type' \n ) )->where ( 'main_table.is_subscription_only = ?', 1 );\n \n $collection = $manageSubscription;\n $this->setCollection ( $collection );\n /**\n * Calling the parent Construct Method.\n */\n return parent::_prepareCollection ();\n }", "protected function _prepareCollection()\n {\t\t \n\t\t\n $collection = Mage::getModel('catalog/product')\n \t->getCollection()\n \t->addAttributeToSelect('name')\n \t->addAttributeToSelect('price')\n \t->addAttributeToSelect('special_price')\n \t->addAttributeToSelect('name')\n \t->addAttributeToSelect('manufacturer')\n \t->addFieldToFilter('type_id', array('in' => array(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL)))\n ->joinField('qty',\n 'cataloginventory/stock_item',\n 'qty',\n 'product_id=entity_id',\n '{{table}}.stock_id=1',\n 'left');\n \t;\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _initProductCollection()\n {\n $client = Mage::helper('catalogsearch')->getEngine()->getClient();\n $baseQuery = $this->_getBaseSearchQuery();\n $optimizedQuery = $this->_getOptimizedQuery($baseQuery);\n $baseProductIds = $this->_getProductIdsFromSearchQuery($baseQuery);\n $optimizeProductIds = $this->_getProductIdsFromSearchQuery($optimizedQuery);\n\n $this->setBaseProductIds($baseProductIds);\n $this->setOptimizedProductIds($optimizeProductIds);\n\n $allIds = array_merge($baseProductIds, $optimizeProductIds);\n\n if (empty($allIds)) {\n $allIds = array(0);\n }\n\n $attributes = Mage::getModel('catalog/config')->getProductCollectionAttributes();\n $collection = Mage::getResourceModel('catalog/product_collection')\n ->setStoreId($this->getStoreId())\n ->addIdFilter($allIds)\n ->addAttributeToSelect($attributes)\n ->load();\n\n $this->setProductCollection($collection);\n\n return $this;\n }", "protected function _prepareCollection()\n {\n\n\t\t\n\t\t$collection = Mage::getModel('catalog/product')->getCollection()\n ->addAttributeToSelect('sku')\n ->addAttributeToSelect('name');\n\t\t\t\n\t\t$collection->addAttributeToSelect('thumbnail');\n\t\t\n\t\t$collection->addAttributeToFilter('image', array('eq' => 'no_selection'));\n \n\t\t//$collection->joinAttribute('image', 'catalog_product/image', 'entity_id', null, 'left');\n\n\t\t$this->setCollection($collection);\n\t\treturn parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n /** @var \\Mage_Catalog_Model_Resource_Product_Attribute_Collection $collection */\n $collection = Mage::getResourceModel('catalog/product_attribute_collection')\n ->addVisibleFilter();\n\n $store = $this->_getStore();\n// $prefix = Mage::getConfig()->getTablePrefix()->__toString();\n// $jobAttributeQuery = 'select a.`version`, a.`attribute_id` from `'.$prefix.'straker_job_attribute` as a\n// left join `'.$prefix.'straker_job` as b on a.`job_id`=b.`id`\n// where b.`store_id` ='.$store->getId().' and a.`version` =1\n// GROUP BY a.`attribute_id`';\n//\n// //join straker job product table to get version for each product\n// $collection->getSelect()->joinLeft(\n//\n// new Zend_Db_Expr('('.$jobAttributeQuery.')'),\n// 'main_table.attribute_id = t.attribute_id',\n// array('version')\n//\n// );\n /** @var StrakerTranslations_EasyTranslationPlatform_Model_Resource_Job_Attribute_Collection $strakerJobProductCollection */\n $strakerJobAttributeCollection = Mage::getModel('strakertranslations_easytranslationplatform/job_attribute')->getCollection();\n $strakerJobAttributeCollection->getSelect()\n ->reset(Zend_Db_Select::COLUMNS)\n ->joinLeft(\n ['b' => $strakerJobAttributeCollection->getTable('strakertranslations_easytranslationplatform/job')],\n '`main_table`.`job_id` = `b`.`id`',\n []\n )->where(\n '`b`.`store_id` = ?', $store->getId()\n )->where(\n '`main_table`.`version` = ?', 1\n )->group(\n 'main_table.attribute_id'\n )->columns(\n ['version' => 'version', 'attribute_id' => 'attribute_id']\n );\n\n $jobAttributeQuery = $strakerJobAttributeCollection->getSelect();\n\n $collection->getSelect()->joinLeft(\n $jobAttributeQuery,\n 'main_table.attribute_id = t.attribute_id',\n array('version')\n );\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('catalog/product')->getCollection()\n ->addAttributeToSelect('name')\n ->addAttributeToSelect('type')\n ->addAttributeToSelect('status')\n ->addAttributeToSelect('visibility')\n ->addAttributeToSelect('sku');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\r\n $store = $this->_getStore();\r\n $collection = Mage::getModel('catalog/product')->getCollection()\r\n ->addAttributeToSelect('sku')\r\n ->addAttributeToSelect('name')\r\n ->addAttributeToSelect('attribute_set_id')\r\n ->addAttributeToSelect('type_id');\r\n\r\n if (Mage::helper('catalog')->isModuleEnabled('Mage_CatalogInventory')) {\r\n $collection->joinField('qty', 'cataloginventory/stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1', 'left');\r\n }\r\n if ($store->getId()) {\r\n $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;\r\n $collection->addStoreFilter($store);\r\n $collection->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner', $adminStore);\r\n $collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId());\r\n $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId());\r\n $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner', $store->getId());\r\n $collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());\r\n $collection->joinAttribute('reqcoupon_status', 'catalog_product/reqcoupon_status', 'entity_id', null, 'left');\r\n } else {\r\n $collection->addAttributeToSelect('price');\r\n $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');\r\n $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');\r\n $collection->joinAttribute('reqcoupon_status', 'catalog_product/reqcoupon_status', 'entity_id', null, 'left');\r\n }\r\n\r\n $this->setCollection($collection);\r\n\r\n parent::_prepareCollection();\r\n $this->getCollection()->addWebsiteNamesToResult();\r\n return $this;\r\n }", "protected function _prepareCollection() {\r\n $collection = Mage::getResourceModel('zozoconcepts_brands/brand_collection');\r\n if ($this->getProduct()->getId()){\r\n $constraint = 'related.product_id='.$this->getProduct()->getId();\r\n }\r\n else{\r\n $constraint = 'related.product_id=0';\r\n }\r\n $collection->getSelect()->joinLeft(\r\n array('related'=>$collection->getTable('zozoconcepts_brands/brand_product')),\r\n 'related.brand_id=main_table.entity_id AND '.$constraint,\r\n array('position')\r\n );\r\n $this->setCollection($collection);\r\n parent::_prepareCollection();\r\n return $this;\r\n }", "public function prepareCollection()\n {\n $this->_reset();\n\n $this->addAttributeToSelect('*');\n\n // Select cart items\n $this->joinTable(\n array('qi' => 'sales/quote_item'),\n 'product_id = entity_id',\n array(\n 'product_name' => 'name',\n 'counts' => 'COUNT(1)',\n 'sum_qty' => \"SUM(CASE WHEN qip.product_type IN ('configurable', 'bundle') THEN qip.qty * qi.qty ELSE qi.qty END)\",\n 'total' => \"SUM(CASE WHEN qip.product_type='configurable' THEN qip.base_row_total ELSE qi.base_row_total END)\",\n 'product_type',\n 'quote_id' => 'quote_id',\n 'parent_item_id' => 'parent_item_id',\n 'item_created_at' => 'created_at'\n )\n );\n $this->addFilterToMap('parent_item_id', 'qi.parent_item_id');\n $this->addFilterToMap('product_type', 'qi.product_type');\n $this->addFilterToMap('item_created_at', 'item_created_at');\n\n // Retrieve base currency code from parent quote\n $this->joinTable(\n array('q' => 'sales/quote'),\n 'entity_id = quote_id',\n array('currency_code' => 'base_currency_code', 'store_id' => 'store_id')\n );\n\n // Select only cart items attached to a subscription\n $this->joinTable(\n array('s' => 'sheep_subscription/subscription'),\n 'quote_id = quote_id',\n array('subscription_created_at' => 'created_at',)\n );\n\n // re-join sales_flat_quote_item to retrieve parent info (if available)\n $this->joinTable(\n array('qip' => 'sales/quote_item'),\n 'item_id = parent_item_id',\n array('parent_product_type' => 'product_type', 'parent_qty' => 'qty'),\n null,\n 'left'\n );\n $this->addFilterToMap('parent_product_type', 'qip.product_type');\n $this->addFilterToMap('parent_qty', 'qip.qty');\n\n // Filter only cart items created during specified period\n $this->addFieldToFilter('item_created_at', array(\n 'from' => $this->_from,\n 'to' => $this->_to,\n 'datetime' => true\n ));\n\n $this->getSelect()->where(\n \"(qi.parent_item_id is null and qi.product_type NOT IN ('bundle', 'configurable')) OR\" .\n \"(qi.parent_item_id is not null and qip.product_type IN ('bundle', 'configurable'))\"\n );\n\n $this->getSelect()\n ->group('e.entity_id')\n ->order('counts ' . self::SORT_ORDER_DESC)\n ->having('COUNT(qi.product_id) > ?', 0);\n\n\n // Filter only quotes that were created in specified stores\n if ($this->_storeIds) {\n $this->addFieldToFilter('store_id', array('in' => $this->_storeIds));\n }\n }", "protected function _prepareCollection()\n {\n /** @var $collection ChazkiExpressCollection */\n $collection = $this->_collectionFactory->create();\n $collection->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $currentCampaign = Mage::getSingleton('adminhtml/session')->getCurrentCampaign();\n $collection = Mage::getModel('campaign/bannerslider')->getCollection();\n $collection->getSelect()\n ->joinLeft(array('campaign'=>$collection->getTable('campaign/campaign')),\n 'main_table.campaign_id = campaign.campaign_id', '')\n ->columns(array('campaign_name'=>'IF(main_table.campaign_id = \"'.$currentCampaign->getId().'\", \"Current\", campaign.name)'))\n ->group('main_table.bannerslider_id');\n $filter = Mage::registry('banner_reloaded_ids');\n if(!isset($filter)){//if reset no filter\n $selected_id = $this->_selectedId();\n if(!empty($selected_id)){\n $collection->addFieldToFilter('bannerslider_id', array('in'=>$selected_id));\n }\n }\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _getProductCollection()\n {\n $collection = parent::_getProductCollection();\n\t\t$helper = Mage::helper('catalogMembersonly/productsFilter');\n\t\t$collection = $helper->filterProductCollection($collection);\n\n return $collection;\t\t\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('solutionpartner/partner')->getCollection();\n $collection->getSelect()->joinLeft(\n array('order' => $collection->getTable('sales/order')),\n 'main_table.email = order.customer_email AND order.status = \"complete\"',\n array(\n 'order_id' => 'entity_id',\n 'order_status' => 'order.status',\n 'number_qtys' => 'count(order.entity_id)'\n ))\n ->group('main_table.solutionpartner_id');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\r\n {\r\n\t\tif($this->getRequest()->getParam('store')){\r\n\t\t\t$store_id = $this->getRequest()->getParam('store');\r\n\t\t} else {\r\n\t\t\t$store_id = Mage::helper('items')-> getMlDefaultStoreId();\r\n\t\t}\r\n\t\t$attribute_id = '';\r\n\t\tif($this->getRequest()->getParam('attribute_id')!=''){\r\n\t\t\t$attribute_id = $this->getRequest()->getParam('attribute_id');\r\n\t\t} \r\n\t\t\r\n\t\t$category_id = 0;\r\n\t\tif($this->getRequest()->getParam('category_id')){\r\n\t\t\t$category_id = $this->getRequest()->getParam('category_id');\r\n\t\t}\r\n\t\t\r\n\t\t$collection = Mage::getModel('eav/entity_attribute_option')\r\n\t\t\t\t\t-> getCollection()\r\n\t\t\t\t\t-> setStoreFilter($store_id)\r\n\t\t\t\t\t-> join('attribute','attribute.attribute_id=main_table.attribute_id', 'attribute_code')\r\n\t\t\t\t\t-> addFieldToFilter('attribute.attribute_id',$attribute_id)\r\n\t\t\t\t\t-> addFieldToFilter('tsv.value', array('neq' => 'NULL' ));\t\t\t\r\n\t\t\t\t\t\r\n $collection -> getSelect()\r\n\t\t\t\t -> joinleft(array('mavm'=>'mercadolibre_attribute_value_mapping'), \" main_table.option_id = mavm.mage_attribute_option_id AND mavm.sort_order = '0' AND mavm.category_id = '\".$category_id.\"' AND mavm.store_id = '\".$store_id.\"'\",array('mavm.*'));\r\n\t\t \r\n\t\t\t\t \r\n\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t $this->setCollection($collection);\r\n return parent::_prepareCollection();\r\n }", "protected function _prepareCollection()\n\t{\n\t\t$collection = Mage::getResourceModel($this->_getCollectionClass());\n\t\t$this->setCollection($collection);\n\t\t \n\t\treturn parent::_prepareCollection();\n\t}", "protected function _prepareCollection()\n {\n $collection = $this->_collectionFactory->create()->addVisibleFilter();\n $vendor_attrs = [];\n $vendor_id = $this->customerSession->getVendorId();\n if ($vendor_id) {\n $attr_model = $this->attribute->getProductAttributes($vendor_id)->getData();\n foreach ($attr_model as $key => $attr_id) {\n $vendor_attrs[] = $attr_id['attribute_id'];\n }\n $collection->addFieldToFilter('main_table.attribute_id', ['in' => $vendor_attrs]);\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }\n return $this;\n }", "protected function _prepareCollection()\n {\n $collection = $this->collectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel('bs_docwise/docwisement_collection');\n\n if ($this->getExam()->getId()) {\n $constraint = 'related.exam_id='.$this->getExam()->getId();\n } else {\n $constraint = 'related.exam_id=0';\n }\n $collection->getSelect()->joinLeft(\n array('related' => $collection->getTable('bs_docwise/exam_docwisement')),\n 'related.docwisement_id = main_table.entity_id AND '.$constraint,\n array('position')\n );\n\n\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "protected function _prepareCollection()\r\n {\r\n $this->setCollection(Mage::getModel('dynamic_brand/brand')->getCollection());\r\n return parent::_prepareCollection();\r\n }", "protected function _setCollection(){\n $storeId = Mage::app()->getStore()->getId();\n $products = Mage::getResourceModel('reports/product_collection')\n ->addOrderedQty()\n ->addAttributeToSelect(array('name', 'price', 'small_image', 'short_description', 'description'))\n ->setStoreId($storeId)\n ->addStoreFilter($storeId)\n ->setPageSize($this->getProductsCount())\n ->setOrder('ordered_qty', 'desc');\n\n Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);\n Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);\n\n $this->_topsellerCollection = $products;\n }", "protected function _prepareCollection()\n {\n $collection = $this->_createCollection()->addCustomerIdFilter($this->_getCustomer()->getId())\n ->resetSortOrder()\n ->addDaysInWishlist()\n ->addStoreData();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $userId = Mage::getSingleton('admin/session')->getUser()->getId();\n\n /* var $collection Gri_Cms_Model_Mysql4_Version_Collection */\n $collection = Mage::getModel('gri_cms/page_version')->getCollection()\n ->addPageFilter($this->getPage())\n ->addVisibilityFilter($userId,\n Mage::getSingleton('gri_cms/config')->getAllowedAccessLevel())\n ->addUserColumn()\n ->addUserNameColumn();\n\n if (!$this->getParam($this->getVarNameSort())) {\n $collection->addNumberSort();\n }\n\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('oggetto_oneclick/order')->getResourceCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function createCollection()\n\t{\n\t\t/** @var $collection \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection */\n\t\t$collection = $this->productCollectionFactory->create();\n\t\t$collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());\n\n\t\t$collection = $this->_addProductAttributesAndPrices($collection)\n\t\t\t->addStoreFilter()\n\t\t\t->setPageSize($this->getPageSize())\n\t\t\t->setCurPage($this->getRequest()->getParam(self::PAGE_VAR_NAME, 1));\n\n\t\t$conditions = $this->getConditions();\n\t\t$conditions->collectValidatedAttributes($collection);\n\t\t$this->sqlBuilder->attachConditionToCollection($collection, $conditions);\n\n\t\treturn $collection;\n\t}", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('sales/order_shipment')->getCollection();\n $tableName = Mage::getSingleton('core/resource')->getTableName('sales_flat_order');\n\n $collection->getSelect()->joinLeft(array('o'=>$tableName), 'main_table.order_id=o.entity_id', array(\n 'order_increment_id'=>'o.increment_id',\n 'order_created_date'=>'o.created_at',\n 'o.shipping_description'));\n\n $collection->addFieldToFilter('o.shipping_description', array('like'=>'%canpar%'));\n $tableName = Mage::getSingleton('core/resource')->getTableName('ch_canpar_shipment');\n\n $collection->getSelect()->joinLeft(array('ch_shipment'=>$tableName), 'main_table.entity_id=ch_shipment.magento_shipment_id',array(\n 'canpar_shipment_id'=>'shipment_id',\n 'manifest_id'=>'manifest_id'));\n\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->setOrder('ID','DESC');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n $collection = Mage::helper('ProductReturn/SupplierReturn')->getProductsPending();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n\t{\n\t\t$collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->getSelect()->joinLeft(\n array('sfo' => 'sales_flat_order'),\n 'main_table.order_id = sfo.entity_id',\n array('increment_id')\n );\n\t\t$this->setCollection($collection);\n\n\t\treturn parent::_prepareCollection();\n\t}", "protected function getProductCollection()\r\n {\r\n $searchCollection = Mage::getModel('catalog/product')\r\n ->getCollection()\r\n ->addAttributeToSelect('*')\r\n ->addAttributeToFilter('status', 1)\r\n ->addAttributeToFilter('visibility', 4);\r\n $searchCollection->getSelect()->limit($this->getProductsCount());\r\n $searchCollection->getSelect()->where(\"'\" . date('Y-m-d') . \"' BETWEEN special_from_date AND special_to_date\");\r\n $searchCollection->getSelect()->orWhere(\"'\" . date('Y-m-d') . \"' >= special_from_date\");\r\n// echo $searchCollection->getSelect()->__toString();\r\n return $searchCollection->load();\r\n }", "protected function _getProductCollection()\n\t{\n\t\tif (is_null($this->_productCollection)) {\n $collection = Mage::getModel('catalog/product')->getCollection();\n\n\t\t\t$attributes = Mage::getSingleton('catalog/config')\n\t\t\t\t->getProductAttributes();\n\n\t\t\t$collection->addAttributeToSelect($attributes)\n\t\t\t\t->addMinimalPrice()\n\t\t\t\t->addFinalPrice()\n\t\t\t\t->addTaxPercents()\n\t\t\t\t->addAttributeToFilter('md_featured_product', 1, 'left')\n\t\t\t\t->addStoreFilter();\n\n\t\t\tMage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);\n\t\t\tMage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);\n\t\t\t$this->_productCollection = $collection;\n\t\t}\n\t\treturn $this->_productCollection;\n}", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n\t\t//$collection->getSelect()->joinLeft(array('st' => 'core_store'),'main_table.SiteID = st.store_id',array('storename' => 'st.name'));\n $this->setCollection($collection);\n \n return parent::_prepareCollection();\n }", "public function prepare(ProductCollection $productCollection, Filter $filter) {\n $name = $filter->getData('param_name');\n $attributeId = $filter->getData('attribute_id');\n $query = $productCollection->getQuery();\n\n if (($appliedOptions = $this->requestParser->readMultipleValueInteger($name)) !== false) {\n $query->getFilterGroup('layered_nav')->addOperand($this->factory->createLayeredDropdownFilter(\n $name, $attributeId, $appliedOptions));\n }\n\n if ($filter->getData('minimum_product_count_per_option') > 0) {\n $query->addFacet($this->factory->createOptimizedSwatchFacet($name, $attributeId, $appliedOptions,\n $filter->getData('hide_filter_with_single_visible_item')));\n }\n else {\n $query->addFacet($this->factory->createStandardSwatchFacet($name, $attributeId, $appliedOptions,\n $filter->getData('hide_filter_with_single_visible_item')));\n }\n }", "private function initialiseProductListCollection()\n {\n $numberOfProductsToShow = $this->helper->getNumberOfProductsToShow();\n if ($numberOfProductsToShow) {\n $this->productCollection\n ->addAttributeToSelect('*')\n ->addAttributeToFilter(InstallData::PRODUCT_LIST_ATTRIBUTE, 1)\n ->setPageSize($numberOfProductsToShow)\n ->load();\n } else {\n $this->productCollection\n ->addFieldToFilter('entity_id', 0)\n ->load();\n }\n }", "public function prepareForValidation(): void\n {\n $products = [];\n foreach ($this->products as $key => $product) {\n $products['products'][$key] = [\n 'id' => $product['id'],\n 'qty' => $product['qty'],\n 'product' => Product::find($product['id']),\n ];\n }\n\n $this->merge($products);\n }", "public function prepareProductCollection ($storeId)\n\t{\n\t\t$collection = parent::prepareProductCollection($storeId);\n\n\t\tMage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);\n\t\tMage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);\n\n\t\treturn $collection;\n\t}", "protected function _prepareCollection()\n {\n /* @var $collection Scandi_MenuManager_Model_Resource_Item_Collection */\n $collection = Mage::getModel('scandi_menumanager/item')->getResourceCollection()\n ->addMenuFilter(Mage::registry('menumanager_menu'));\n if (!$this->getRequest()->getParam('sort')) { $collection->setPositionOrder(); }\n\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel('bs_worksheet/worksheet_collection');\n if ($this->getCurriculum()->getId()) {\n $constraint = 'related.curriculum_id='.$this->getCurriculum()->getId();\n } else {\n $constraint = 'related.curriculum_id=0';\n }\n $collection->getSelect()->joinLeft(\n array('related' => $collection->getTable('bs_worksheet/worksheet_curriculum')),\n 'related.worksheet_id=main_table.entity_id AND '.$constraint,\n array('position')\n );\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "private function loadMatchedCollection()\n {\n $this->matchedCollection = collect();\n\n foreach ($this->baseCollection as $key => $item)\n {\n\n $found = true;\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->mergeCollection->whereIn($mergePivot,$item->$basePivot)->first())\n {\n $found = false;\n continue 2;\n }\n }\n\n if($found){\n $this->matchedCollection->push($item);\n }\n\n }\n }", "protected function _retrieveCollection() {\n $response = array ();\n $productArray = array ();\n // get website id from request\n $websiteId = ( int ) $this->getRequest ()->getParam ( static::WEBSITE_ID );\n if ($websiteId <= 0) {\n $websiteId = Mage::app ()->getWebsite ( 'base' )->getId ();\n }\n // get store id from request\n $storeId = ( int ) $this->getRequest ()->getParam ( static::STORE_ID );\n if ($storeId <= 0) {\n $storeId = Mage::app ()->getWebsite ( $websiteId )->getDefaultGroup ()->getDefaultStoreId ();\n }\n // get page from request\n $page = $this->getRequest ()->getParam ( 'page' );\n if ($page <= 0) {\n $page = 1;\n }\n // get page from request\n $limit = $this->getRequest ()->getParam ( 'limit' );\n if ($limit <= 0) {\n $limit = 10;\n }\n \n // get these type of products only\n $productType = array (\n \"simple\",\n \"configurable\" \n );\n \n // get city for filter products\n $city = ( int ) Mage::app ()->getRequest ()->getParam ( 'city' );\n \n /**\n *\n * @var $collection Mage_Catalog_Model_Resource_Product_Collection\n */\n $collection = Mage::getResourceModel ( 'catalog/product_collection' );\n $collection->addStoreFilter ( $storeId )->addPriceData ( $this->_getCustomerGroupId (), $websiteId )->addAttributeToSelect ( static::NAME, static::PRICE )->addAttributeToFilter ( static::VISIBILITY, array (\n 'neq' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE \n ) )->addAttributeToFilter ( static::STATUS, array (\n 'eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED \n ) )->addAttributeToFilter ( 'type_id', array (\n 'in' => $productType \n ) );\n // Filter products by city\n if ($city) {\n $collection->addFieldToFilter ( 'city', array (\n array (\n 'regexp' => $city \n ) \n ) );\n }\n \n $this->_applyCategoryFilter ( $collection );\n $this->_applyCollectionModifiers ( $collection );\n \n // sort and filetr product collection\n $collection = $this->_getProductByFilter ( $collection, $storeId );\n // get total products count\n $totalProducts = $collection->getSize ();\n $collection = $this->_getProductBySort ( $collection, $storeId );\n $products = $collection->load ();\n \n // get total pages with limit\n $last_page = ceil ( $totalProducts / $limit );\n if ($last_page < $page) {\n $productArray = array ();\n } else {\n $productArray = $this->getProductsList ( $products, $storeId );\n }\n $response ['success'] = 1;\n $response ['error'] = false;\n $response ['total_count'] = $totalProducts;\n $response ['result'] = $productArray;\n return json_encode ( $response );\n }", "protected function _getProductCollection()\n {\n $collection = parent::_getProductCollection();\n\n /*\n * Collections using Product Flat index require different processing.\n */\n if (Mage::getStoreConfigFlag('catalog/frontend/flat_catalog_product')) {\n $collection\n ->getSelect()\n ->where(new Zend_Db_Expr('price_index.final_price < price_index.price'));\n } else {\n $today = date('Y-m-d', time());\n $collection\n ->addAttributeToFilter('special_price', array('is' => new Zend_Db_Expr('not null')))\n ->addAttributeToFilter('special_from_date', array(\n 'or' => array(\n 0 => array('date' => true, 'to' => $today),\n 1 => array('is' => new Zend_Db_Expr('null')),\n )), 'left')\n ->addAttributeToFilter('special_to_date', array(\n 'or' => array(\n 0 => array('date' => true, 'from' => $today),\n 1 => array('is' => new Zend_Db_Expr('null')),\n )), 'left');\n }\n\n return $collection;\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('lavi_news/news')->getResourceCollection();\n\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection () {\n $collection\n = Mage::getResourceModel('mventory/carrier_volumerate_collection')\n ->setWebsiteFilter($this->getWebsiteId());\n\n $this->setCollection($collection);\n\n $shippingTypes\n = Mage::getModel('mventory/system_config_source_allowedshippingtypes')\n ->toArray();\n\n foreach ($collection as $rate) {\n $name = $rate->getConditionName();\n\n if ($name == 'weight')\n $rate->setWeight($rate->getConditionValue());\n else if ($name == 'volume')\n $rate->setVolume($rate->getConditionValue());\n\n $shippingType = $rate->getShippingType();\n\n $shippingType = isset($shippingTypes[$shippingType])\n ? $shippingTypes[$shippingType]\n : '';\n\n $rate->setShippingType($shippingType);\n }\n\n return parent::_prepareCollection();\n }", "protected function _getProductCollection()\n {\n if (!Mage::helper('integernet_solr')->module()->isActive()) {\n return parent::_getProductCollection();\n }\n\n if (!Mage::helper('integernet_solr')->page()->isSolrResultPage()) {\n parent::_getProductCollection();\n }\n\n if (Mage::getStoreConfig('integernet_solr/results/use_html_from_solr')) {\n return Mage::getSingleton('integernet_solr/result_collection');\n }\n\n if (is_null($this->_productCollection) || !($this->_productCollection instanceof IntegerNet_Solr_Model_Resource_Catalog_Product_Collection)) {\n\n /** @var $productCollection IntegerNet_Solr_Model_Resource_Catalog_Product_Collection */\n $productCollection = Mage::getResourceModel('integernet_solr/catalog_product_collection')\n ->setStoreId(Mage::app()->getStore()->getId())\n ->addMinimalPrice()\n ->addFinalPrice()\n ->addTaxPercents()\n ->addUrlRewrite()\n ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())\n ->addAttributeToSelect(array('url_key'));\n\n Mage::dispatchEvent('catalog_block_product_list_collection', array(\n 'collection' => $productCollection\n ));\n\n $this->_productCollection = $productCollection;\n\n /* @var $layer Mage_Catalog_Model_Layer */\n $layer = $this->getLayer();\n $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());\n }\n\n return $this->_productCollection;\n }", "protected function _prepareCollection() {\n /**\n * \n * @var unknown\n */\n /**\n * Calling the parent Construct Method.\n * \n * Getting collection for bank details\n */\n $managebankdetailsCollection = Mage::getModel ( 'airhotels/managebankdetails' )->getCollection ();\n $this->setCollection ( $managebankdetailsCollection ); \n return parent::_prepareCollection ();\n /**\n * return _prepareCollection\n */\n }", "protected function _prepareCollection() {\n $website_id = Mage::app()->getWebsite()->getId();\n $collection = Mage::getModel('inchoo_supportticket/ticket')\n ->getCollection();\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "public function getProductCollection()\n {\n $collection = $this->productCollectionFactory->create();\n $this->prepareProductCollection($collection);\n $attributeSplashCode = $this->_attributeSplashHelper->getAttributeSplashCode();\n\n $attributeSplash = $this->getAttributeSplash();\n \n $collection->addAttributeToSelect('*');\n $collection->addAttributeToSelect('name');\n $collection->addStoreFilter()->addAttributeToFilter($attributeSplashCode , $attributeSplash->getAttributeId());\n \n $collection->addAttributeToFilter('status', Status::STATUS_ENABLED);\n $collection->addAttributeToFilter('visibility', array('neq' => \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_NOT_VISIBLE));\n \n \n return $collection;\n }", "public function getCollectionProducts()\n {\n\t\t$collection_Products = $this->ShopifyClient->call('GET','/admin/products.json?collection_id='.$this->config['collection_id']);\t\t\n\t\t$arra = array();\n\t\tif(!empty($collection_Products['products']))\n\t\t{\n\t\t\t$keyArr = array('id','title','body_html','created_at','vendor','product_type','tags','images',\n\t\t\t\t\t\t\t'image','options',array('variants'=>array('id','price','sku','compare_at_price','weight','weight_unit')));\n\t\t\t$shopifyKeyArr = array('id','title','body_html','created_at','vendor','product_type','tags','images','image','options',\n\t\t\t\t\t\t\t\t array('variants'=>array(0 =>array('id','price','sku','compare_at_price','weight','weight_unit'))));\n\t\t\t\n\t\t\tforeach($collection_Products as $key=>$var) {\n\t\t\t\tforeach($var as $k=>$val) {\n\t\t\t\t\t$arra['data'][] = $this->createProductArray($val,$shopifyKeyArr,$keyArr);\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$status_code = 200;\n\t\t\t$message = 'success';\t\n\t}else\n\t{\n\t\t$status_code = 404; \n\t\t$message = 'Collections products not found';\n\t\t$arra['data'] = array();\n\t\t$arra['data_count'] = 0;\n\t}\t\n\t\t$collection_Products = $this->getJsonDataFormat($arra,$status_code,$message);\n\t\treturn $collection_Products;\n }", "public function getProductCollection()\n {\n $this->_basketProducts = $this->_getCartProductIds();\n $products = $this->_complementaryEngine->sendQuery($this->_basketProducts);\n\n if ($products['rules']) {\n return $this->_getPredictedProducts($products['rules']);\n }\n\n return false;\n }", "public function getProductCollection()\n {\n\n if (is_null($this->_productCollection)) {\n $collection = $this->_engine->getAdvancedResultCollection();\n $this->prepareProductCollection($collection);\n if (!$collection) {\n return $collection;\n }\n $this->_productCollection = $collection;\n }\n\n return $this->_productCollection;\n }", "protected function _prepareCollection() {\n $collection = Config::get()->collectionTransaction();\n $asTrnx = 'main_table';\n $collection->addFieldToSelect(Transaction::ATTR_ID, self::AS_TRAN_ID);\n $collection->addFieldToSelect(Transaction::ATTR_DATE_APPLIED, self::AS_DATE_APPLIED);\n $collection->addFieldToSelect(Transaction::ATTR_VALUE, self::AS_VALUE);\n /* LEFT JOIN prxgt_bonus_operation oper ON trnx.operation_id = oper.id */\n $asOper = 'oper';\n $tbl = array( $asOper => Config::ENTITY_OPERATION );\n $cond = $asTrnx . '.' . Transaction::ATTR_OPERATION_ID . '=' . $asOper . '.' . Operation::ATTR_ID;\n $cols = array(\n self::AS_OPER_ID => Operation::ATTR_ID,\n self::AS_DATE_PERFORMED => Operation::ATTR_DATE_PERFORMED\n );\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN prxgt_bonus_account credit ON trnx.credit_acc_id = credit.id */\n $asCredit = 'credit';\n $tbl = array( $asCredit => Config::ENTITY_ACCOUNT );\n $cond = $asTrnx . '.' . Transaction::ATTR_CREDIT_ACC_ID . '=' . $asCredit . '.' . Account::ATTR_ID;\n $cols = array();\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN prxgt_bonus_account debit ON trnx.debit_acc_id = debit.id */\n $asDebit = 'debit';\n $tbl = array( $asDebit => Config::ENTITY_ACCOUNT );\n $cond = $asTrnx . '.' . Transaction::ATTR_DEBIT_ACC_ID . '=' . $asDebit . '.' . Account::ATTR_ID;\n $cols = array();\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN customer_entity custCred ON credit.customer_id = custCred.entity_id */\n $asCreditCust = 'creditCust';\n $tbl = array( $asCreditCust => 'customer/entity' );\n $cond = $asCredit . '.' . Account::ATTR_CUSTOMER_ID . '=' . $asCreditCust . '.' . Eav::DEFAULT_ENTITY_ID_FIELD;\n $cols = array( self::AS_CREDIT_CUST => ConfigCore::ATTR_CUST_MLM_ID );\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN customer_entity custDeb ON debit.customer_id = custDeb.entity_id */\n $asDebitCust = 'debitCust';\n $tbl = array( $asDebitCust => 'customer/entity' );\n $cond = $asDebit . '.' . Account::ATTR_CUSTOMER_ID . '=' . $asDebitCust . '.' . Eav::DEFAULT_ENTITY_ID_FIELD;\n $cols = array( self::AS_DEBIT_CUST => ConfigCore::ATTR_CUST_MLM_ID );\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN prxgt_bonus_type_asset asset ON credit.asset_id = asset.id */\n $asAsset = 'asset';\n $tbl = array( $asAsset => Config::ENTITY_TYPE_ASSET );\n $cond = $asCredit . '.' . Account::ATTR_ASSET_ID . '=' . $asAsset . '.' . TypeAsset::ATTR_ID;\n $cols = array( self::AS_ASSET_CODE => TypeAsset::ATTR_CODE );\n $collection->join($tbl, $cond, $cols);\n /* LEFT JOIN prxgt_bonus_type_oper operType ON oper.type_id = operType.id */\n $asOperType = 'operType';\n $tbl = array( $asOperType => Config::ENTITY_TYPE_OPER );\n $cond = $asOper . '.' . Operation::ATTR_TYPE_ID . '=' . $asOperType . '.' . TypeOper::ATTR_ID;\n $cols = array( self::AS_OPER_CODE => TypeOper::ATTR_CODE );\n $collection->join($tbl, $cond, $cols);\n /* prepare collection */\n $sql = $collection->getSelectSql(true);\n $this->setCollection($collection);\n parent::_prepareCollection();\n return $this;\n }", "private function initProducts()\n {\n $productIds = $this->getRequestProductIds();\n if ($productIds) {\n try {\n return $this->productCollectionFactory\n ->create()\n ->addIdFilter($productIds)\n ->addAttributeToFilter(ProductInterface::TYPE_ID, ConfigurableModel::TYPE_CODE);\n } catch (NoSuchEntityException $e) {\n return false;\n }\n }\n\n return false;\n }", "public function getProductCollection() {\n $nowTime = date('Y-m-d H:i:s', time());\n $collection = $this->_productCollectionFactory->create()\n ->addAttributeToFilter('is_show_countdown', ['=' => 1])\n ->addAttributeToFilter('is_show_homepage', ['=' => 1])\n ->setOrder('sort_order', 'ASC');\n\n return $collection;\n }", "public function getProductCollection()\n\t{\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t$visibleProducts = $objectManager->create('\\Magento\\Catalog\\Model\\Product\\Visibility')->getVisibleInCatalogIds();\n\t\t$collection = $objectManager->create('\\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection')->setVisibility($visibleProducts);\n\t\t\t$collection = $this->_addProductAttributesAndPrices($collection)\n\t\t\t\t->addAttributeToFilter(\n\t\t\t'special_from_date',\n\t\t\t['date' => true, 'to' => $this->getEndOfDayDate()],\n\t\t\t'left')\n\t\t\t->addAttributeToFilter(\n\t\t\t\t'special_to_date',\n\t\t\t\t[\n\t\t\t\t\t'or' => [\n\t\t\t\t\t\t0 => ['date' => true, 'from' => $this->getStartOfDayDate()],\n\t\t\t\t\t\t1 => ['is' => new \\Zend_Db_Expr('null')],\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'left')\n\t\t\t->addAttributeToSort(\n\t\t\t\t'news_from_date',\n\t\t\t\t'desc')\n\t\t\t->addStoreFilter($this->getStoreId())\n\t\t\t->setPageSize($this->getProductsCount());\n\n\t\treturn $collection;\n\t}", "public function getProducts(): Collection \n { return $this->products;\n //on fait ensuite un make:migration. C'est la migration qui sert a exprimer le lien many to many\n }", "private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "protected function _prepareCollection()\n {\n /* @var $collection Belvg_Storelocator_Model_Resource_Location_Collection */\n $collection = Mage::getModel('storelocator/location')->getResourceCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n $session = Mage::getModel('core/session');\n $filterConditions = $session->getData('rp_conditions');\n if (!$filterConditions)\n $filterConditions = $this->_filterConditions;\n $posorderCollection = Mage::getModel('webpos/posorder')->getCollection();\n /* Jack - create an empty collection */\n $collection = $posorderCollection;\n foreach ($collection->getItems() as $key => $item) {\n $collection->removeItemByKey($key);\n }\n /**/\n\n /* Define variables and set default data */\n $totalsSalesByUser = array();\n $totalSales = 0;\n $incTimeStrings = array('1' => ' +1 week', '2' => ' +1 day', '3' => ' +1 month', '4' => ' +1 day', '5' => ' +1 day', '6' => ' +1 week', '7' => ' +1 week');\n $descTimeStrings = array('4' => ' -1 week', '5' => ' -1 week', '6' => ' -1 month', '7' => ' -1 month');\n $periodFormat = ($filterConditions['period'] == 3 || $filterConditions['period'] == 6 || $filterConditions['period'] == 7 ) ? \"Y-m-d\" : \"Y-m-d\";\n $specialPeriod = array('1', '2', '3', '4');\n $stringTimeFrom = array('1' => 'monday this week', '2' => 'monday last week', '3' => 'first day of this month', '4' => 'first day of previous month');\n $stringTimeTo = array('1' => 'sunday this week', '2' => 'sunday last week', '3' => 'last day of this month', '4' => 'last day of previous month');\n $thisFriday = date($periodFormat, strtotime('friday this week'));\n $today = date($periodFormat);\n $userIds = $this->userIds;\n if (($filterConditions['from'] == '' || $filterConditions['to'] == '' ) && in_array($filterConditions['period'], $specialPeriod) == false) {\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }\n\n $startTime = (in_array($filterConditions['range'], $specialPeriod)) ? (date($periodFormat, strtotime($stringTimeFrom[$filterConditions['range']]))) : date($periodFormat, strtotime($filterConditions['from']));\n $timeFrom = (in_array($filterConditions['range'], $specialPeriod)) ? (date($periodFormat, strtotime($stringTimeFrom[$filterConditions['range']]))) : date($periodFormat, strtotime($filterConditions['from']));\n $timeTo = (in_array($filterConditions['range'], $specialPeriod)) ? (date($periodFormat, strtotime($stringTimeTo[$filterConditions['range']]))) : date(\"Y-m-d\", strtotime($filterConditions['to']));\n if ($timeFrom && $timeTo) {\n while ($timeFrom <= $timeTo) {\n $i = 0;\n foreach ($this->userIds as $userId => $displayName) {\n $isSave = true;\n $totalSalesOfPeriod = 0;\n $isEmpty = true;\n if ($filterConditions['period'] == 1) {\n $endTime = $this->lastDayOf('year', new DateTime($timeFrom))->format('Y-m-d');\n } else if ($filterConditions['period'] == 3) {\n $endTime = $this->lastDayOf('month', new DateTime($timeFrom))->format('Y-m-d');\n } else\n $endTime = date('Y-m-d', strtotime($timeFrom . $incTimeStrings[$filterConditions['period']]));\n $endTime = (strtotime($endTime) < strtotime($timeTo)) ? $endTime : $timeTo;\n $itemDataObject = new Varien_Object();\n if ($i == 0) {\n if ($filterConditions['period'] == 1) {\n $exTimeFrom = explode('-', $timeFrom);\n $itemDataObject->setData('period', $exTimeFrom[0]);\n } else if ($filterConditions['period'] == 3) {\n $exTimeFrom = explode('-', $timeFrom);\n $itemDataObject->setData('period', $exTimeFrom[0] . '-' . $exTimeFrom[1]);\n } else\n $itemDataObject->setData('period', $timeFrom);\n } else\n $itemDataObject->setData('period', '');\n if ($itemDataObject->getData('period'))\n $itemDataObject->setData('period', date('F j, Y', strtotime($itemDataObject->getData('period'))));\n $webposOrderCollection = $this->getSalesCollection($timeFrom, $endTime, array('user_id' => $userId));\n $totalU = 0;\n if (count($webposOrderCollection) > 0) {\n foreach ($webposOrderCollection as $order) {\n $totalU += $order->getTotals();\n }\n }\n if (!$totalU && $filterConditions['rp_settings']['show_empty_result'] == 'false')\n $isSave = false;\n\n if ($isSave) {\n $itemDataObject->setData('user', $displayName);\n\n $itemDataObject->setData('totals_sales', ($totalU > 0) ? $totalU : '0.00');\n $collection->addItem($itemDataObject);\n }\n $i++;\n }\n if ($filterConditions['period'] == 1)\n $timeFrom = date('Y-m-d', strtotime($endTime));\n else\n $timeFrom = date($periodFormat, strtotime($timeFrom . $incTimeStrings[$filterConditions['period']]));\n }\n /* get last item data \n $i = 0;\n foreach($this->userIds as $userId => $displayName){\n $isSave = true;\n $beforeLastItem = new Varien_Object();\n if($i == 0){\n if($filterConditions['period'] == 1){\n $exTimeFrom = explode('-',$timeTo);\n $beforeLastItem->setData('period',$exTimeFrom[0]);\n }\n else if($filterConditions['period'] == 3){\n $exTimeFrom = explode('-',$timeTo);\n $beforeLastItem->setData('period',$exTimeFrom[0].'-'.$exTimeFrom[1]);\n }\n else\n $beforeLastItem->setData('period',$timeTo);\n }\n else\n $beforeLastItem->setData('period','');\n if($beforeLastItem->getData('period'))\n $beforeLastItem->setData('period',date('F j, Y', strtotime($beforeLastItem->getData('period'))));\n $webposOrderCollection = $this->getSalesCollection($timeTo,$timeTo,array('user_id' => $userId))->getFirstItem();\n if( !$webposOrderCollection->getTotals() && $filterConditions['rp_settings']['show_empty_result'] == 'false')\n $isSave = false;\n if($isSave){\n $beforeLastItem->setData('user',$displayName);\n $beforeLastItem->setData('totals_sales',$webposOrderCollection->getTotals()?$webposOrderCollection->getTotals():'0.00');\n $collection->addItem($beforeLastItem);\n }\n $i++;\n }\n end last item */\n }\n /* set data for totals row */\n $lastItemDataObject = new Varien_Object();\n $lastItemDataObject->setData('period', 'Totals:');\n $orders = $this->getSalesTotal($startTime, $endTime);\n\n $totalU = 0;\n if (count($orders) > 0) {\n foreach ($orders as $order) {\n $totalU += $order->getTotals();\n }\n }\n $lastItemDataObject->setData('totals_sales', $totalU);\n $collection->addItem($lastItemDataObject);\n $this->setCollection($collection);\n /* set session for chart */\n $sessionObject = new Varien_Object();\n foreach ($this->userIds as $userId => $username) {\n $orders = $this->getSalesTotal($startTime, $endTime, array('user_id' => $userId));\n\n\n $totalU = 0;\n if (count($orders) > 0) {\n foreach ($orders as $order) {\n $totalU += $order->getTotals();\n }\n }\n $sessionObject->setData($username, $totalU);\n }\n Mage::getSingleton('core/session')->setData('total_sales_by_user', $sessionObject->toArray());\n Mage::getSingleton('core/session')->setType('user');\n $this->setTotalRowByUser($sessionObject->toArray());\n return parent::_prepareCollection();\n }", "function productCollection()\n {\n return eZProductCollection::fetch( $this->attribute( 'productcollection_id' ) );\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('iparcel/log')->getCollection();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "function detachProductCollection()\n {\n $collection = $this->productCollection();\n if ( !$collection )\n {\n $retValue = false;\n return $retValue;\n }\n\n $db = eZDB::instance();\n $db->begin();\n $newCollection = $collection->copy();\n if ( !$newCollection )\n {\n $db->commit();\n $retValue = false;\n return $retValue;\n }\n $this->setAttribute( 'productcollection_id', $newCollection->attribute( 'id' ) );\n $this->store();\n\n $db->commit();\n return $newCollection;\n }", "private function buildCollection(): void\n {\n //todo 這邊可以在sql裡面處理,但因為時程的關係,先用這種方法處理\n $userId = auth()->user()->id;\n $this->collection->map(function ($item) use ($userId) {\n $item->isAuthor = ($item->user_id == $userId);\n $item->user_id = null;\n });\n }", "protected function _getVendorCollection()\n {\n if (is_null($this->_vendorCollection)) {\n $queryText = $this->getQueryText();\n $vendorShoptable = $this->_resourceConnection->getTableName('ced_csmarketplace_vendor_shop');\n $this->_vendorCollection = $this->_collectionFactory->create();\n $this->_vendorCollection->addAttributeToSelect('*');\n //$this->_vendorCollection->getSelect()->join(['vendor_shop' => $vendorShoptable], 'e.entity_id=vendor_shop.vendor_id AND vendor_shop.shop_disable=' . Vshop::ENABLED, ['shop_disable']);\n\n $this->_vendorCollection->addAttributeToFilter('meta_keywords', ['like' => '%' . $queryText . '%']);\n if ($this->_csmarketplaceHelper->isSharingEnabled()) {\n $this->_vendorCollection->addAttributeToFilter('website_id', $this->_storeManager->getStore()->getWebsiteId());\n }\n\n if ($this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::MODULE_ENABLE)) {\n //------------------- Custom Filter----------------[START]\n\n $savedLocationFromSession = $this->_hyperlocalHelper->getShippingLocationFromSession();\n $filterType = $this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::FILTER_TYPE);\n $radiusConfig = $this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::FILTER_RADIUS);\n $distanceType = $this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::DISTANCE_TYPE);\n $apiKey = $this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::API_KEY);\n $filterProductsBy = $this->_csmarketplaceHelper->getStoreConfig(HyperlocalHelper::FILTER_PRODUCTS_BY);\n\n if ($filterProductsBy == 'vendor_location' || $filterType == 'distance') {\n $vendorIds = [0];\n if ($savedLocationFromSession) {\n\n /** Filter Products By Vendor Location */\n if ($filterType == 'city_state_country') {\n\n //------------------- Filter By City,country & state----------------[START]\n $locationCollection = $this->_hyperlocalHelper->getFilteredlocationByCityStateCountry($savedLocationFromSession);\n if ($locationCollection) {\n $vendorIds = $locationCollection->getColumnValues('vendor_id');\n }\n\n //------------------- Filter By City,country & state----------------[END]\n } elseif ($filterType == 'zipcode' && isset($savedLocationFromSession['filterZipcode'])) {\n\n //------------------- Filter By Zipcode----------------[START]\n $resource = $this->_resourceConnection;\n $tableName = $resource->getTableName('ced_cshyperlocal_shipping_area');\n $this->zipcodeCollection->getSelect()->joinLeft($tableName, 'main_table.location_id = ' . $tableName . '.id', ['status', 'is_origin_address']);\n $this->zipcodeCollection->addFieldToFilter('main_table.zipcode', $savedLocationFromSession['filterZipcode'])\n ->addFieldToFilter('status', Shiparea::STATUS_ENABLED);\n $this->zipcodeCollection->getSelect()->where(\"`is_origin_address` IS NULL OR `is_origin_address` = '0'\");\n $vendorIds = $this->zipcodeCollection->getColumnValues('vendor_id');\n //------------------- Filter By Zipcode----------------[END]\n } elseif ($filterType == 'distance') {\n $tolat = $savedLocationFromSession['latitude'];\n $tolong = $savedLocationFromSession['longitude'];\n $vIds = [];\n if ($tolat != '' && $tolong != '') {\n $vendorCollection = $this->_collectionFactory->create();\n $vendorCollection->addAttributeToSelect('*');\n if ($vendorCollection->count()) {\n foreach ($vendorCollection as $vendor) {\n $distance = $this->_hyperlocalHelper->calculateDistancebyHaversine($vendor->getLatitude(), $vendor->getLongitude(), $tolat, $tolong);\n if ($distance <= $radiusConfig) {\n $vendorIds[] = $vendor->getId();\n }\n }\n }\n }\n }\n $this->_vendorCollection->addAttributeToFilter('entity_id', ['in' => $vendorIds]);\n }\n }\n //------------------- Custom Filter ----------------[END]\n }\n\n $this->prepareSortableFields();\n }\n return $this->_vendorCollection;\n }", "protected function _prepareData()\n {\n $product = Mage::getModel( 'upsellcategory/product' );\n\n // Pass the product limit set via the layout.xml to the model\n $product->setData( 'product_limit', $this->getData( 'product_limit' ) );\n\n // The custom model has the a function to retrieve the related products\n // by parent category. Pass \"true\" as the first argument to only show\n // related products from the current product's category, not its\n // sibling categories as well\n $this->_itemCollection = $product->getUpSellProductCollection();\n\n // Return\n return $this;\n }", "private function loadUnMatchedCollection()\n {\n $this->unMatchedCollection = collect();\n\n foreach ($this->mergeCollection as $key => $item)\n {\n\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->baseCollection->whereIn($basePivot,$item->$mergePivot)->first())\n {\n $this->unMatchedCollection->push($item);\n continue 2;\n }\n }\n\n\n }\n\n }", "public function prepareData($collection, $productIds)\n {\n foreach ($collection as &$item) {\n if ($item->getSpecialPrice()) {\n $product = $this->productRepository->get($item->getSku());\n $specialFromDate = $product->getSpecialFromDate();\n $specialToDate = $product->getSpecialToDate();\n\n if ($specialFromDate || $specialToDate) {\n $id = $product->getId();\n $this->effectiveDates[$id] = $this->getSpecialEffectiveDate($specialFromDate, $specialToDate);\n }\n }\n }\n }", "private function initialiseChoices()\n {\n // Fetch a vendor key if possible, to cache against\n try {\n $vendorKey = $this->systemBrandService->getVendorCredentials()['vendorKey'];\n }\n catch (\\Exception $e) {\n $vendorKey = 'defaultVendor';\n }\n\n if (null !== $this->rentGuaranteeOfferingType && null !== $this->propertyLettingType && ! $this->isInitialised) {\n\n $cacheKey = sprintf(\n 'Lookup-Product-Collection-%s-%s-%s',\n $this->rentGuaranteeOfferingType,\n $this->propertyLettingType,\n $vendorKey\n );\n $productCollection = $this->cache->fetch($cacheKey);\n\n $this->values = array();\n $this->choices = array();\n\n if ( ! $productCollection) {\n $productCollection = $this->entityManager->find(new ProductCollection(), array(\n 'rentGuaranteeOfferingType' => $this->rentGuaranteeOfferingType,\n 'propertyLettingType' => $this->propertyLettingType,\n ));\n\n $this->cache->save($cacheKey, $productCollection);\n }\n\n /** @var \\Barbon\\HostedApi\\AppBundle\\Form\\Common\\Model\\Product $product */\n foreach ($productCollection as $product) {\n $this->values[] = (string) $product->getProductId();\n $this->choices[] = (string) $product->getProductId(); //$product->getName();\n $this->labels[] = (string) $product->getName();\n }\n\n $this->isInitialised = true;\n return $productCollection;\n }\n \n return null;\n }", "protected function _initProductCollection($items)\n {\n $productIds = array();\n foreach ($items as $item) {\n if (!$this->isProductCalculated($item)) {\n $productIds[] = $item->getProductId();\n $simpleProductId = $this->_getCalculationHelper()->getSimpleProductIdByConfigurable($item);\n if ($simpleProductId) {\n $productIds[] = $simpleProductId;\n }\n }\n }\n $this->_productCollection = Mage::getModel('catalog/product')->getCollection()\n ->addAttributeToSelect('*')\n ->addAttributeToFilter('entity_id', array('in' => $productIds));\n\n return $this;\n }", "protected function _getProductCollection()\n {\n if ($this->_productCollection === null) {\n $layer = $this->getLayer();\n /* @var $layer \\Magento\\Catalog\\Model\\Layer */\n if ($this->getShowRootCategory()) {\n $this->setCategoryId($this->_storeManager->getStore()->getRootCategoryId());\n }\n\n // if this is a product view page\n if ($this->_coreRegistry->registry('product')) {\n // get collection of categories this product is associated with\n $categories = $this->_coreRegistry->registry('product')\n ->getCategoryCollection()->setPage(1, 1)\n ->load();\n // if the product is associated with any category\n if ($categories->count()) {\n // show products from this category\n $this->setCategoryId(current($categories->getIterator()));\n }\n }\n\n $origCategory = null;\n if ($this->getCategoryId()) {\n try {\n $category = $this->categoryRepository->get($this->getCategoryId());\n } catch (NoSuchEntityException $e) {\n $category = null;\n }\n\n if ($category) {\n $origCategory = $layer->getCurrentCategory();\n $layer->setCurrentCategory($category);\n }\n }\n $this->_productCollection = $layer->getProductCollection();\n $online_product = $this->getRequest()->getParam('online_product');\n if($online_product != '') {\n $this->_productCollection->addAttributeToFilter('online_product', $online_product);\n }\n\n $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());\n\n if ($origCategory) {\n $layer->setCurrentCategory($origCategory);\n }\n }\n\n return $this->_productCollection;\n }", "public function initializeExperienceFilters($arrProduct) {\n //query to read cuisines\n $queryCuisine = DB::table('product_attributes_select_options as paso')\n ->join('product_attributes as pa','pa.id','=','paso.product_attribute_id')\n ->join('product_attributes_multiselect as pam','pam.product_attributes_select_option_id','=','paso.id')\n ->where('pa.alias','cuisines')\n ->whereIn('pam.product_id',$arrProduct)\n ->select('paso.id','paso.option','pam.product_id')\n ->get();\n \n #setting up the cuisines filter information\n $arrCuisineProduct = array();\n if($queryCuisine) {\n foreach ($queryCuisine as $row) {\n if( ! in_array($row->id, $arrCuisineProduct)) {\n $arrCuisineProduct[] = $row->id; \n $this->filters['cuisines'][] = array(\n \"id\" => $row->id,\n \"name\" => $row->option,\n \"count\" => 1\n );\n }\n else {\n foreach($this->filters['cuisines'] as $key => $value) {\n if($value['id'] == $row->id) {\n $this->filters['cuisines'][$key]['count']++;\n }\n }\n }\n }\n }\n\n //query to initialize the tags\n $queryTag = DB::table('tags')\n ->join('product_tag_map as ptm','ptm.tag_id','=','tags.id')\n ->whereIn('ptm.product_id', $arrProduct)\n ->select('tags.name', 'tags.id')\n ->get();\n \n #setting up the cuisines filter information\n $arrTagProduct = array();\n if($queryTag) {\n foreach ($queryTag as $row) {\n if( ! in_array($row->id, $arrTagProduct)) {\n $arrTagProduct[] = $row->id; \n $this->filters['tags'][] = array(\n \"id\" => $row->id,\n \"name\" => $row->name,\n \"count\" => 1\n );\n }\n else {\n foreach($this->filters['tags'] as $key => $value) {\n if($value['id'] == $row->id) {\n $this->filters['tags'][$key]['count']++;\n }\n }\n }\n }\n }\n \n #setting the value of min and max price\n $this->filters['price_range'] = array(\n \"name\" => 'Price Range',\n \"type\" => 'single',\n \"options\" => array(\n \"min\" => $this->minPrice,\n \"max\" => $this->maxPrice,\n )\n );\n }", "public function _construct()\n {\n $this->_initProductCollection();\n parent::_construct();\n }", "public function prepareQueryForCategory()\n {\n $sql = new SqlStatement();\n $sql->select(array('p.*'))\n ->from(array('p' => self::RESULTS_TABLE))\n ->innerJoin(array('pp' => 'product'), 'p.product_id = pp.product_id')\n ->innerJoin(array('pd' => 'product_description'), 'p.product_id = pd.product_id')\n ->where('pd.language_id = ?', (int)$this->config->get('config_language_id'))\n ->order($this->sortOrder)\n ->limit($this->productsLimit, $this->productsStart);\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n } \n \n return $sql;\n }", "protected function getProductResultCollection()\n {\n $collection = Mage::registry('recommendation_collection');\n\n if (empty($collection)) {\n $collection = array();\n }\n\n return $collection;\n }", "public function getLoadedProductCollection() {\r\n return $this->getProducts();\r\n }", "public function prepareCollection(\n string $searchKey,\n int $pageNum,\n int $limit\n ): \\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection {\n $productCollection = $this->productCollectionFactory->create();\n $productCollection->addAttributeToSelect(ProductInterface::NAME);\n $productCollection->setVisibility($this->catalogVisibility->getVisibleInCatalogIds());\n $productCollection->setPage($pageNum, $limit);\n $this->filter->addFilter($productCollection, 'fulltext', ['fulltext' => $searchKey]);\n $productCollection->setPage($pageNum, $limit);\n return $productCollection;\n }", "protected function _prepareCollection($collection)\n {\n return $this;\n }", "public function prepare_items() {\n\n\t\t// Retrieve count.\n\t\t$this->get_counts();\n\n\t\t/**\n\t\t * TODO: implement.\n\t\t */\n\t\t$this->process_bulk_action();\n\n\t\t/*\n\t\t * Prepare all the params to pass to our Collection.\n\t\t * All sanitization is done in that class.\n\t\t */\n\t\t$params = $this->get_filters_query_params();\n\n\t\t// Total amount for pagination with WHERE clause - super quick count DB request.\n\t\t$total_items = ( new EmailsCollection( $params ) )->get_count();\n\n\t\tif ( ! empty( $_REQUEST['orderby'] ) && in_array( $_REQUEST['orderby'], [ 'subject', 'date_sent' ], true ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t$params['orderby'] = sanitize_key( $_REQUEST['orderby'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t}\n\n\t\tif ( ! empty( $_REQUEST['order'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t$params['order'] = sanitize_key( $_REQUEST['order'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t}\n\n\t\t$params['offset'] = ( $this->get_pagenum() - 1 ) * EmailsCollection::$per_page;\n\n\t\t// Get the data from the DB using parameters defined above.\n\t\t$collection = new EmailsCollection( $params );\n\t\t$this->items = $collection->get();\n\n\t\t/*\n\t\t * Register our pagination options & calculations.\n\t\t */\n\t\t$this->set_pagination_args(\n\t\t\t[\n\t\t\t\t'total_items' => $total_items,\n\t\t\t\t'per_page' => EmailsCollection::$per_page,\n\t\t\t]\n\t\t);\n\t}", "public function getLoadedProductCollection()\n {\n return $this->_getProductCollection();\n }", "private function setupProducts()\n {\n $products = [\n ['name' => 'Product 1'],\n ['name' => 'Product 2'],\n ['name' => 'Product 3'],\n ['name' => 'Product 4'],\n ];\n\n $container = $this->setupData($products, Product::class);\n\n $this->products = $container;\n }", "public function allProducts()\r\n {\r\n // left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n // left join mshop_media as mm on mm.id = mpl.refid\r\n // left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n // where mpl.pos = 0 and mpl.domain in ('media','price')\";\r\n $qry1 = \"select mp.id as product_id, mp.code as product_code, mp.label as product_name, mm.preview as image_url from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left join mshop_media as mm on mm.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('media')\";\r\n $qry2 = \"select mp.id as product_id, mp.label as product_name, mpri.value as product_price from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('price')\";\r\n $products1 = DB::select($qry1);\r\n $products2 = DB::select($qry2); \r\n $i = 0;\r\n foreach($products1 as $products) {\r\n foreach($products2 as $product) {\r\n if($product->product_id === $products->product_id) {\r\n $products1[$i]->product_price = $product->product_price;\r\n }\r\n }\r\n $i++;\r\n }\r\n return $products1;\r\n }", "public function getProductPlanCollection()\n {\n /* @var $productCollection Mage_Catalog_Model_Resource_Product_Collection */\n $productCollection = Mage::getModel('catalog/product')->getCollection();\n $productCollection->getSelect()\n ->joinInner(array(\n 'plan' => Mage::getSingleton('core/resource')->getTableName('suppliersubscriptions/plans')\n ), 'e.entity_id=plan.product_id', 'plan.id as plan_id')\n// ->order('plan.listing_priority ASC')\n ;\n\n /* @var $product Mage_Catalog_Model_Product */\n foreach ($productCollection as $product) {\n /* @var $planModel Cminds_SupplierRegistrationExtended_Model_Plan */\n $planModel = Mage::getModel('suppliersubscriptions/plan')->load($product->getPlanId());\n if (!$planModel->getId()) {\n $productCollection->removeItemByKey($product->getId());\n continue;\n }\n $product->load($product->getId());\n $product->setData('plan', $planModel);\n }\n\n return $productCollection;\n }", "public function buildCollection($searchCriteria, $useParent = false)\n {\n $collection = $this->collectionFactory->create();\n $this->extensionAttributesJoinProcessor->process($collection);\n $collection->addAttributeToSelect('*');\n $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');\n $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');\n \n if (!$useParent) {\n $this->collectionProcessor->process($searchCriteria, $collection);\n $this->sortByCategoryPosition($searchCriteria, $collection);\n return $collection;\n }\n \n // Add the parent ID to the collection\n $collection->getSelect()->joinLeft(\n 'catalog_product_super_link',\n 'e.entity_id = catalog_product_super_link.product_id'\n )->group('e.entity_id');\n \n // Apply the search criteria on the child products\n $this->collectionProcessor->process($searchCriteria, $collection);\n \n // Check for sorting by category index position\n $this->sortByCategoryPosition($searchCriteria, $collection);\n \n // Get a list of all the product IDs and use the parent if available\n $productIds = [];\n foreach ($collection->getItems() AS $product)\n $productIds[] = $product->getParentId() ?: $product->getId();\n $productIds = $this->uniqueProducts($productIds, $searchCriteria);\n \n if (count($productIds) == 0)\n return $collection;\n \n // Rebuild the collection using the new list of IDs\n $parentCollection = $this->collectionFactory->create();\n $this->extensionAttributesJoinProcessor->process($parentCollection);\n $parentCollection->addAttributeToSelect('*');\n $parentCollection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');\n $parentCollection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner'); \n $parentCollection->addAttributeToFilter('entity_id', array('in' => $productIds));\n $parentCollection->addAttributeToFilter('status', \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED);\n \n // Maintain the sort order of the child products if sorting by anything other than alphabetical\n if ($nameSort = $this->getSortOrder($searchCriteria, 'name')) $parentCollection->addAttributeToSort('name', $nameSort);\n else $parentCollection->getSelect()->order(new \\Zend_Db_Expr(sprintf('FIELD(e.entity_id,%s)', implode(',',$productIds))));\n \n return $parentCollection;\n }", "public function onProductsCollectionLoaded(Varien_Event_Observer $observer)\n {\n \ttry \n \t{\n\t \tif (Mage::helper('shoptimally_core/config')->getIsEnabled())\n\t \t{\n\t\t // get the main helper class and run this feature\n\t\t Mage::helper('shoptimally_relatedproducts/main')->runFeature($observer->getCollection());\n\t \t}\n \t}\n \tcatch (Exception $e)\n \t{\n \t\tMage::helper('shoptimally_core/log')->warn(\"Unexpected exception in observer!\", $e);\n \t}\n \t\n \treturn $this;\n }", "public function afterGetById(\\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection $subject ,array $result)\n {\n foreach ($result as $product) {\n $this->addDigitalLicensesToProduct($product);\n }\n return $result;\n }", "protected function _prepareCollection()\r\n {\r\n $collection = Mage::getModel('enterprise_giftcardaccount/giftcardaccount')->getCollection();\r\n $giftCartAccount_data = array();\r\n foreach($collection as $key=>$item){\r\n $giftCartAccount_data[$item->getData('giftcardaccount_id')][0] = $item->getData();\r\n $collection->removeItemByKey($key);\r\n }\r\n\r\n $creat_collection = Mage::getModel('enterprise_giftcardaccount/history')->getCollection();\r\n $creat_collection->getSelect()\r\n ->reset(Zend_Db_Select::COLUMNS)\r\n ->columns(array('giftcardaccount_id','generated_order_number' => 'additional_info', 'original_amount' => 'balance_delta'));\r\n $creat_collection->addFieldToFilter('action', 0);\r\n $creat_collection->setOrder('giftcardaccount_id', 'asc');\r\n $creat_collection->setOrder('updated_at', 'asc');\r\n $id = '';\r\n $i = 0;\r\n foreach($creat_collection as $item){\r\n $giftcardaccount_id = $item->getData('giftcardaccount_id');\r\n if($giftcardaccount_id == $id){\r\n $i++;\r\n }else{\r\n $id = $giftcardaccount_id;\r\n $i = 0;\r\n }\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['generated_order_number'] = $item->getData('generated_order_number');\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['original_amount'] = $item->getData('original_amount');\r\n }\r\n\r\n $use_collection = Mage::getModel('enterprise_giftcardaccount/history')->getCollection();\r\n $use_collection->getSelect()\r\n ->reset(Zend_Db_Select::COLUMNS)\r\n ->columns(array('giftcardaccount_id','used_date' => 'updated_at', 'used_order_number' => 'additional_info', 'used_amount' => 'ABS(main_table.balance_delta)'));\r\n $use_collection->addFieldToFilter('action', 1);\r\n $use_collection->setOrder('giftcardaccount_id', 'asc');\r\n $use_collection->setOrder('updated_at', 'asc');\r\n $id = '';\r\n $i = 0;\r\n foreach($use_collection as $item){\r\n $giftcardaccount_id = $item->getData('giftcardaccount_id');\r\n if($giftcardaccount_id == $id){\r\n $i++;\r\n }else{\r\n $id = $giftcardaccount_id;\r\n $i = 0;\r\n }\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['used_date'] = $item->getData('used_date');\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['used_order_number'] = $item->getData('used_order_number');\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['used_amount'] = $item->getData('used_amount');\r\n }\r\n\r\n $send_collection = Mage::getModel('enterprise_giftcardaccount/history')->getCollection();\r\n $send_collection->getSelect()\r\n ->reset(Zend_Db_Select::COLUMNS)\r\n ->columns(array('giftcardaccount_id','additional_info'));\r\n $send_collection->addFieldToFilter('action', 2);\r\n $send_collection->setOrder('giftcardaccount_id', 'asc');\r\n $send_collection->setOrder('updated_at', 'asc');\r\n $id = '';\r\n $i = 0;\r\n foreach($send_collection as $item){\r\n $giftcardaccount_id = $item->getData('giftcardaccount_id');\r\n if($giftcardaccount_id == $id){\r\n $i++;\r\n }else{\r\n $id = $giftcardaccount_id;\r\n $i = 0;\r\n }\r\n $additional_info = $item->getData('additional_info');\r\n preg_match ('/^Recipient: (.*?) <(.*?)>.(.*)$/', $additional_info, $param);\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['receptor_name'] = $param[1];\r\n $giftCartAccount_data[$giftcardaccount_id][$i]['receptor_email']= $param[2];\r\n }\r\n\r\n $total_collection = Mage::getModel('enterprise_giftcardaccount/giftcardaccount')->getCollection();\r\n $total_collection->getSelect()\r\n ->reset(Zend_Db_Select::COLUMNS)\r\n ->columns(array('main_table.giftcardaccount_id'))\r\n ->joinLeft(\r\n array('history' => $collection->getTable('enterprise_giftcardaccount/history')),\r\n 'history.giftcardaccount_id = main_table.giftcardaccount_id and history.action = 1',\r\n array('total'=>'ABS(SUM(history.balance_delta))')\r\n )\r\n ->group('main_table.giftcardaccount_id');\r\n foreach($total_collection->getData() as $val){\r\n $giftCartAccount_data[$val['giftcardaccount_id']][0]['total_used_amount'] = $val['total']?$val['total']:'';\r\n }\r\n\r\n foreach($giftCartAccount_data as $value){\r\n foreach($value as $val){\r\n $item = $collection->getNewEmptyItem();\r\n $item->setData($val);\r\n $collection->addItem($item);\r\n }\r\n }\r\n $this->setCollection($collection);\r\n\r\n parent::_prepareCollection();\r\n return $this;\r\n }", "public function collection( $id = null ){\n $this->set('activeCollectionID', $id);\n $this->set('productList', Shopifiable::getProducts(array(\n 'collection_id' => $id,\n 'published_status' => 'published',\n 'limit' => 100\n )));\n }", "protected function _getProductCollection()\n {\n if (!$this->_productCollection) {\n throw new OnePica_AvaTax_Exception('Product collection should be set before usage');\n }\n\n return $this->_productCollection;\n }", "public function getProductCollection()\r\n {\r\n $visibleProducts = $this->_catalogProductVisibility->getVisibleInCatalogIds();\r\n $collection = $this->_productCollectionFactory->create()->setVisibility($visibleProducts);\r\n $collection->addMinimalPrice()\r\n ->addFinalPrice()\r\n ->addTaxPercents()\r\n ->addAttributeToSelect('*')\r\n ->addStoreFilter($this->getStoreId())\r\n ->setPageSize($this->getProductsCount())\r\n ->addAttributeToFilter('is_featured', '1');\r\n return $collection;\r\n }", "public function getVariants(): Collection\n {\n return $this->paginate([\n 'query' => 'query getVariants($cursor: String) {\n results: productVariants(first:250, after:$cursor) {\n edges {\n node {\n title\n sku\n product {\n title\n handle\n status\n publishedOnCurrentPublication\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }'\n ])\n\n // Remove variants that are missing a sku\n ->filter(function($variant) {\n return !empty($variant['sku']);\n })\n\n // Remove variants that weren't published to the Sales Channel of the\n // Custom App whose credentials are being used to query the API. This\n // can be used to filter out products not intended for the public store,\n // like wholesale only products.\n ->when(!$this->disablePublishedCheck, function($variants) {\n return $variants->filter(function($variant) {\n return $variant['product']['publishedOnCurrentPublication'];\n });\n })\n\n // Dedupe by SKU, prefering active variants. Shopify allows you to\n // re-use SKUs between multiple product variants but this is used in\n // Feed Me as the unique identifier for importing.\n ->reduce(function($variants, $variant) {\n\n // Check if this variant has already been added\n $existingIndex = $variants->search(\n function($existing) use ($variant) {\n return $existing['sku'] == $variant['sku'];\n }\n );\n\n // If this sku is already in the list, replace it if the previous\n // instance was not an active product\n // https://shopify.dev/api/admin-graphql/2022-04/enums/ProductStatus\n if ($existingIndex !== false) {\n $existing = $variants->get($existingIndex);\n if ($existing['product']['status'] != 'ACTIVE') {\n $variants = $variants->replace([\n $existingIndex => $variant\n ]);\n }\n\n // ... else the variant didn't exist, so add it\n } else $variants->push($variant);\n\n // Keep working...\n return $variants;\n }, new Collection)\n\n // Make a title that is more useful for displaying in the CMS.\n ->map(function($variant) {\n $variant['dashboardTitle'] = $variant['product']['title']\n .' - '.$variant['title']\n .(($sku = $variant['sku']) ? ' ('.$sku.')' : null);\n return $variant;\n })\n\n // Remove fields that we're used to pre-filter\n ->map(function($variant) {\n unset(\n $variant['product']['status'],\n $variant['product']['publishedOnCurrentPublication']\n );\n return $variant;\n })\n\n // Use integer keys\n ->values();\n }", "public function afterGetItems(\\Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection $subject ,array $result)\n {\n foreach ($result as $product) {\n $this->addDigitalLicensesToProduct($product);\n }\n return $result;\n }", "protected function _prepareSubset() {}", "private function prepareSimpleProduct() {\n if ($this->getSaverData()->isFirstPage()) {\n $this->setPrice();\n $this->setDownloadOptions();\n $this->setSKU();\n $this->setStockOptions();\n $this->setSoldIndividually();\n $this->setShippingOptions();\n $this->setPurchaseNote();\n $this->setEnableReviews();\n $this->setMenuOrder();\n }\n\n $this->setTags();\n $this->setAttributes();\n }", "public function getRelatedProductCollection()\n {\n $collection = $this->getLinkInstance()->useRelatedLinks()\n ->getProductCollection()\n ->setIsStrongMode();\n $collection->setProduct($this);\n return $collection;\n }", "public static function customCollection()\n\t{\n // recupera as features encontradas\n $features = Arr::flatten(parent::$collection);\n // limpa a collection\n parent::$collection = [];\n // realimenta a collection\n foreach ($features as $feature) {\n parent::$collection[$feature] = true;\n }\n\t}", "public function getProductCollection($gallery){\n $collection = Mage::getResourceModel('joomi_masonrygallery/gallery_product_collection')\n ->addGalleryFilter($gallery);\n return $collection;\n }", "public function prepareData($collection, $productIds)\n {\n $productCollection = clone $collection;\n $productCollection->addAttributeToFilter('entity_id', ['in' => $productIds]);\n while ($product = $productCollection->fetchItem()) {\n $variations = [];\n $collectionAttr = $this->getWeeAttributeCollection();\n if ($collectionAttr->getSize() > 0) {\n foreach ($collectionAttr as $item) {\n $item->setScopeGlobal(1);\n $tax = $this->getDataTax($product, $item);\n if (!empty($tax)) {\n foreach ($tax as $element) {\n $str = 'name=' . $item->getAttributeCode()\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'country=' . $element['country']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'state=' . $element['state']\n . Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'value=' . $element['value'];\n if (isset($element['website_id'])) {\n $str .= Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR .\n 'website_id=' . $element['website_id'];\n }\n $variations[] = $str;\n }\n }\n }\n }\n $result = '';\n if (!empty($variations)) {\n $result = [\n self::WEE_TAX_VARIATIONS_COLUMN => implode(\n ImportProduct::PSEUDO_MULTI_LINE_SEPARATOR,\n $variations\n )\n ];\n }\n $this->weeTaxData[$product->getId()] = $result;\n }\n }", "public function attachProductCollection($productCollection)\n {\n foreach ($this->fetch() as $category) {\n $category->attachProducts($productCollection);\n }\n }", "public function getProducts(){\n $query = \"SELECT \n products.id,\n products.name,\n products.description,\n products.price,\n images.image_file_name\n FROM products\n INNER JOIN products_images\n ON products.id = products_images.product_id\n INNER JOIN images\n ON products_images.image_id = images.image_id\";\n\n //-----construct query according to parameters supplied\n \n //create an array to pass string eg \"iii\" to bind_param\n $query_param_string = array();\n \n //create an array to pass values to the bind_param\n $query_param_values = array();\n \n //--TOTAL COUNT OF PRODUCTS\n //create an array to pass string eg \"iii\" to count total result\n $query_param_string_count = array();\n //create an array to pass values to to count total result\n $query_param_values_count = array();\n \n //--CATEGORIES\n //if there are categories selected, create a join with products_categories table\n //so we can find products in category or categories\n if( count( $this -> categories ) > 0 ){\n //store the name of the table in variable\n $tbl_products_categories = \"products_categories\";\n \n //string to add to query to join with products_categories table\n $category_join = \" INNER JOIN $tbl_products_categories ON products.id = $tbl_products_categories.product_id \";\n \n $category_query = array();\n foreach( $this -> categories as $cat ){\n //ignore if category = 0\n if( $cat !== 0 ){\n array_push( $category_query, \"$tbl_products_categories.category_id=?\");\n array_push( $query_param_string, \"i\" );\n array_push( $query_param_string_count, \"i\" );\n \n //we need each query param value as a reference\n array_push( $query_param_values, $cat );\n array_push( $query_param_values_count, $cat );\n }\n }\n //implode the categories into a string so we have\n //products_categories.category_id=? OR products_categories.category_id=?\n $cat_query_string = implode( \" OR \", $category_query );\n }\n \n //--PAGE\n //process page variables\n //to use pagination, we need to calculate offset\n //if we have 8 results per page, then offset is calculated using pagenumber $page -1 * perpage\n $offset = ($this -> page-1) * $this -> perpage;\n \n //add offset and limit to query_param_string array and query_param_values\n array_push( $query_param_string , \"i\" );\n array_push( $query_param_values , $this -> perpage );\n array_push( $query_param_string , \"i\" );\n array_push( $query_param_values , $offset );\n \n //add the query_param_string to the beginning of query_param_values\n //so we get the \"iii\" at the beginning of array\n array_unshift( $query_param_values, implode( \"\", $query_param_string ));\n //do the same for the count arrays\n array_unshift( $query_param_values_count, implode(\"\",$query_param_string_count) );\n \n //build the query with category parameters\n $limit = \" LIMIT ? OFFSET ?\";\n \n //add category join\n if( count( $this -> categories) > 0){\n $query = $query . \" \" . $category_join;\n //add category query string\n $query = $query . \" WHERE \" . $cat_query_string . \" AND products.active=1\";\n }\n \n //add grouping and sorting\n $query = $query . \" GROUP BY products.id\";\n //add sorting\n $query = $query . \" ORDER BY products.id ASC\";\n \n //create second query without the limit so we can get total number of products\n //without the pagination and limit (offset creates pages of result, \n //while limit limits the number of products per page)\n $count_query = $query;\n //add limit\n $query = $query . \" \" . $limit;\n \n //send the query to database using prepare\n $statement = $this -> connection -> prepare( $query );\n \n //create references to the array values using &$query_param_values\n //while adding to parameters array\n $parameters_array = array();\n foreach( $query_param_values as $key => $value ){\n $parameters_array[$key] = &$query_param_values[$key];\n }\n //do the same for count \n $parameters_array_count = array();\n foreach( $query_param_values_count as $key => $value ){\n $parameters_array_count[$key] = &$query_param_values_count[$key];\n }\n //use call_user_func_array to pass the array as a parameter to query\n //equivalent of calling bind_param(\"iii\",$var1,$var2,$var3)\n call_user_func_array( array($statement,'bind_param'), $parameters_array );\n \n //execute the query with the parameters\n if( $statement -> execute() ){\n $result = $statement -> get_result();\n //check number of rows in result\n if( $result -> num_rows > 0){\n $products = array();\n while( $row = $result -> fetch_assoc() ){\n $id = $row[\"id\"];\n $name = $row[\"name\"];\n $price = $row[\"price\"];\n $image_file_name = $row[\"image_file_name\"];\n $desc = new \\utilities\\TruncateWords( $row[\"description\"],15 );\n $description = $desc -> words;\n //$description = $row[\"description\"];\n array_push( $products, array( \n \"id\" => $id, \n \"name\" => $name, \n \"price\" => $price,\n \"description\" => $description, \n \"image_file_name\" => $image_file_name \n ) );\n }\n $statement -> close();\n //run the second query $count_query to get total number of products\n $statement = $this -> connection -> prepare($count_query);\n call_user_func_array( array($statement,'bind_param'), $parameters_array_count );\n $statement -> execute();\n $result = $statement -> get_result();\n $total = $result -> num_rows;\n \n $result_array = array();\n $result_array[\"total\"] = $total;\n $result_array[\"categories\"] = $this -> categories;\n $result_array[\"data\"] = $products;\n \n return $result_array;\n }\n else{\n return false;\n }\n }\n else {\n return false;\n }\n $statement -> close();\n }", "public static function select_products_by_options($data)\n {\n \n $query = new Query;\n $products = $query->select(['core_products.*','core_product_images.*'])\n ->from('core_products')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id');\n \n \n //if product type is set i.e., hire, sale or both\n if(isset($_REQUEST['product_type']) && @$_REQUEST['product_type'] != '')\n {\n if($_REQUEST['product_type'] != '')\n {\n $product_type= $_REQUEST['product_type'];\n if($product_type == 'hire') \n $products = $products->where(['core_products.product_type' => [0,2]]);\n else if($product_type == 'sale') \n $products = $products->where(['core_products.product_type' => [1,2]]);\n else if($product_type == 'both') \n $products = $products->where(['core_products.product_type' => [2]]);\n }\n \n }\n //default product type is hire if product type not set to anything\n else\n {\n \n $products = $products->where(\"core_products.product_type = 0\");\n }\n //if user selects the category\n if(isset($_REQUEST['category']))\n {\n \n if($_REQUEST['category'] != '')\n {\n $category_id = $_REQUEST['category'];\n $products = $products->andWhere(\"core_products.category_id = $category_id\");\n }\n }\n //if user selects sub category\n if(isset($_REQUEST['sub_category_id']) && @$_REQUEST['sub_category_id'] != '')\n {\n \n if($_REQUEST['sub_category_id'] != '')\n {\n $sub_category_id = $_REQUEST['sub_category_id'];\n $products = $products->andWhere(\"core_products.sub_category_id = $sub_category_id\");\n }\n }\n //if user sets current location\n if(@$_REQUEST['current_location'] != '')\n {\n \n $products = $products->andFilterWhere(['LIKE', 'core_products.current_location', $_REQUEST['current_location']]);\n }\n //if user sets price type\n if(@$_REQUEST['price_type'] != '')\n {\n $price_type =$_REQUEST['price_type'];\n $products = $products->andWhere(\"core_products.price_type = $price_type\");\n }\n //if user sets capacity range\n if(@$_REQUEST['capacity'] != '')\n {\n \n $capacity =$_REQUEST['capacity'];\n //if user selects between\n if (strpos($capacity, 'and') !== false) {\n $products = $products->andWhere(\"rtrim(substring_index(core_products.capacity, ' ', 1)) between $capacity\");\n }\n //if user selects morethan\n else if (strpos($capacity, '>') !== false) {\n $products = $products->andWhere(\"rtrim(substring_index(core_products.capacity, ' ', 1)) $capacity\");\n }\n }\n \n $products = $products->orderBy([\"core_products.product_id\" => SORT_DESC])\n ->andWhere(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->groupBy(['core_products.product_id'])\n ->all();\n return $products;\n }" ]
[ "0.72974336", "0.724351", "0.7235491", "0.7202871", "0.7117323", "0.7069229", "0.7041912", "0.6981756", "0.6904291", "0.6857724", "0.68023556", "0.67710334", "0.6748615", "0.6631792", "0.65536547", "0.6537255", "0.6535089", "0.6517021", "0.6493775", "0.6492051", "0.6488541", "0.64649796", "0.64551216", "0.6445846", "0.64407617", "0.6422732", "0.63847804", "0.63684034", "0.63353926", "0.6315601", "0.6310673", "0.6300302", "0.62991464", "0.6274397", "0.6262208", "0.621272", "0.61954147", "0.6190912", "0.61854655", "0.6167637", "0.61217856", "0.6120648", "0.60801965", "0.60412514", "0.6034396", "0.60334504", "0.6017936", "0.59670436", "0.59441245", "0.59402037", "0.58918864", "0.58896494", "0.58668464", "0.5865967", "0.58580714", "0.58379734", "0.5837511", "0.5832827", "0.5832537", "0.58174103", "0.57892054", "0.5784013", "0.57729274", "0.5749539", "0.57338625", "0.57253", "0.57182926", "0.57077587", "0.5672193", "0.5665355", "0.5652608", "0.56312025", "0.5626228", "0.56101406", "0.5595103", "0.5578528", "0.55604553", "0.5559335", "0.5540025", "0.5532378", "0.55318475", "0.54920894", "0.5469893", "0.5441941", "0.5411487", "0.5406401", "0.5394722", "0.53867686", "0.5386141", "0.5376113", "0.5368804", "0.5350292", "0.53390515", "0.53318214", "0.5322997", "0.53218865", "0.53207463", "0.5317919", "0.53131145", "0.5309644" ]
0.772621
0
Get the current edit category.
public function getCategory() { if (!$this->_category) { $this->_category = Mage::registry('current_category'); } return $this->_category; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentCategory()\n {\n return $this->category;\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "public function edit(Category $edit){\n return $edit;\n }", "public function getCurrentCat()\n {\n if (empty($this->multifilterSession->getTopCategory()) && empty($this->multifilterSession->getCategories())) {\n $currentCat = $this->coreRegistry->registry('current_category');\n return $currentCat->getId();\n } else {\n return $this->multifilterSession->getTopCategory();\n }\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function getCategory()\n {\n\n return $this->category;\n }", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->_category;\n }", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public static function getCategory()\n {\n return self::$category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\r\n\t{\r\n\t\tif (!empty($this->category))\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t}\r\n\r\n\t\t$pk = $this->getState('category.id');\r\n\r\n\t\t$this->category = JTable::getInstance('Category');\r\n\t\t$this->category->load($pk);\r\n\r\n\t\treturn $this->category;\r\n\t}", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "public function getActiveCategory()\n {\n return $this->_activeCategory;\n }", "public function getCategory(){\n return $this->category;\n }", "function get_category_to_edit($id)\n {\n }", "public function returnUpdateCat() {\n return $this->category_id;\n }", "public function getCat()\n {\n return $this->cat = get_the_category($this->id);\n }", "public function getActCategory()\n {\n // if active category is not set yet - trying to load it from request params\n // this may be usefull when category component was unable to load active category\n // and we still need some object to mount navigation info\n if ($this->_oClickCat === null) {\n\n $this->_oClickCat = false;\n $oCategory = oxNew('oxcategory');\n if ($oCategory->load($this->getCategoryId())) {\n $this->_oClickCat = $oCategory;\n }\n }\n\n return $this->_oClickCat;\n }", "function getCategory() {\n\t\t$categoryId = JRequest::getInt('category_id', 0) ;\n\t\t$sql = 'SELECT * FROM #__eb_categories WHERE id='.$categoryId;\n\t\t$this->_db->setQuery($sql) ;\n\t\treturn $this->_db->loadObject();\t\t\t\n\t}", "public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }", "public function get_category() {\n $data['get_category'] = $this->Category_model->get_category();\n return $data['get_category'];\n }", "public function edit_category ($id) {\n\t\treturn Category::find($id);\n\t}", "function get_category() {\n return self::CATEGORY_ADMIN;\n }", "public function get_category()\n {\n return $this->primary_category();\n }", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategory()\n {\n }", "public function getCategoryInstance()\n {\n if (!$this->_categoryInstance) {\n $this->_categoryInstance = Mage::getSingleton('fvets_salesrep/category');\n }\n return $this->_categoryInstance;\n }", "public function getCategory() {}", "public function getCategory();", "public function getCategory();", "public function getIdCat()\n {\n return $this->id_cat;\n }", "public function category()\n {\n // check if user is already loaded, if not, we fetch it from database\n if (!$this->_category) {\n $categories = new Application_Model_DbTable_Categories();\n try {\n $this->_category = $categories->findById($this->_category_id);\n } catch (Exception $e) {\n $this->_category = null;\n }\n }\n return $this->_category;\n }", "public function getId_cat()\n {\n return $this->id_cat;\n }", "public function getObjectCategory()\n {\n return $this->objectCategory;\n }", "public function get_category_id(){\n\t\treturn $this->_categoryid;\n\t}", "public function edit()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not logged in!\");\n }\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n try{\n\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n $categoryName = $categoryModel->getCategoryNameById($categoryId);\n\n $this->view->render(\"admin/categories/edit\",[\n \"name\"=> $categoryName,\n \"id\"=> $categoryId\n ]\n );\n\n } catch (\\Exception $exception){\n $this->view->redirect(\"/categories/manage\",$exception->getMessage());\n }\n\n }", "public function getCategory()\n {\n if ($this->_oCategory === null) {\n $this->_oCategory = $this->getProduct()->getCategory();\n }\n\n return $this->_oCategory;\n }", "protected function _getCategory()\n {\n if (!$this->_category) {\n $this->_category = $this->_objectManager->create(\\Magento\\Catalog\\Model\\Category::class);\n $categoryId = (int)$this->getRequest()->getParam('category', 0);\n $urlRewrite = $this->_getUrlRewrite();\n if (!$categoryId && $urlRewrite->getId()) {\n $metaData = $urlRewrite->getMetadata();\n if ($urlRewrite->getEntityType() === self::ENTITY_TYPE_CATEGORY) {\n $categoryId = $urlRewrite->getEntityId();\n } elseif (!empty($metaData['category_id'])) {\n $categoryId = $metaData['category_id'];\n }\n }\n if ($categoryId) {\n $this->_category->load($categoryId);\n }\n }\n return $this->_category;\n }", "public function getCat_id() {\n return $this->cat_id;\n }", "public function actionCategoryEdit()\n {\n $this->_assertCanManageCategories();\n $category_id = $this->_input->filterSingle('faq_id', XenForo_Input::UINT);\n $viewParams = array('faqcategory' => $this->_getCategoryModel()->getById($category_id));\n return $this->responseView('Iversia_FAQ_ViewPublic_Category', 'iversia_faq_edit_category', $viewParams);\n }", "public function getCategory()\n {\n return iTones_PlaylistCategory::getInstance($this->categoryid);\n }", "public function getCategory()\n {\n return $this->hasOne(MgfSelectionCategory::className(), ['id' => 'category_id']);\n }", "function getCategory() {\n\t\treturn $this->pluginCategory;\n\t}", "public function getCategory()\n\t\t{\n\t\t\treturn $this->hasOne(Categories::className(), ['id' => 'category_id']);\n\t\t}", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "public function edit($id)\n {\n $edit_category = Currency::find($id);\n return $edit_category;\n }", "public function getCategorie()\n {\n return $this->categorie;\n }", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "public function getItemCategory()\n {\n return $this->item_category;\n }", "public function getCategorie()\n {\n $oCategorie = CCategorie::getById($this->categorie_id);\n return $oCategorie;\n }", "public function edit_category($id)\n {\n return $this->db->get_where('os_kategori', ['id_kategori' => $id])->result();\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function getCatId()\n {\n return $this->getParamCatId();\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "private function getCategory() {\n\n $category = Category::with('records');\n /**\n * Filter slug\n */\n $category = Category::where('slug', $this->property('categorySlug'));\n\n /**\n * Filter active only\n */\n if( $this->property('activeOnly') ) {\n $category->isActive();\n }\n\n $categoryDetail = $category->first();\n\n return $categoryDetail;\n\n }", "public function getCategory()\n {\n return $this->readOneof(2);\n }", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "public function getCategoria()\n {\n return $this->categoria;\n }", "public function getCategoria()\n {\n return $this->categoria;\n }", "public function get_category_context() {\n // Limit to a certain category?\n $categoryid = $this->get_category_id();\n if (!$categoryid) {\n return null;\n }\n return context_coursecat::instance($categoryid);\n }", "public function getCategoryId()\n {\n return $this->categoryId;\n }", "public function get_category(){\n\t\t$this->load->model('seller/product_model');\n\t\t$category = $this->product_model->get_category();\n\t\treturn $category;\n\t}", "public function getContentCategory()\n {\n return $this->ContentCategory;\n }", "function getCurrentCatID() {\n global $wp_query;\n if (is_category() || is_single()) {\n $cat_ID = get_query_var('cat');\n }\n return $cat_ID;\n}", "public function edit_category($category) {\n $this->category();\n $categories_sql_string = \"SELECT * FROM category WHERE id = \" . $category . \" limit 1\";\n $connection = new Database(\"sbrettsc_db\");\n $menu_array = $connection->get_array_from_query($categories_sql_string);\n $data = array(\"menu_array\" => array_shift($menu_array));\n\n $this->loadView(\"editors/category_editor\", $data);\n }", "public function edit(Category $Category)\n {\n //\n }", "private function getCategory()\n {\n $catobj = (object)Array();\n $catobj->preview = $this->getFilePath('preview');\n $catobj->category = $this->category_number;\n $catobj->html = $this->getContent();\n $catobj->googleFonts = [];\n $catobj->contentCss = $this->getFilePath('relative_css');\n $catobj->contentClass = $this->getCSSClass($this->getFilePath('css'));\n return $catobj;\n }", "private function getCatParent() {\r\n $rCat = new Read;\r\n $rCat->ExeRead(\"ml_categories\", \"WHERE category_id = :id\", \"id={$this->Data['post_category']}\");\r\n if ($rCat->getResult()):\r\n return $rCat->getResult()[0]['category_parent'];\r\n else:\r\n return null;\r\n endif;\r\n }" ]
[ "0.7579706", "0.7511426", "0.74542326", "0.7265585", "0.7244287", "0.7195611", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71854323", "0.71726614", "0.7167394", "0.7163952", "0.7155635", "0.71466243", "0.7143663", "0.712332", "0.7116063", "0.7116063", "0.7114456", "0.71034867", "0.7097545", "0.7097456", "0.7092767", "0.70853007", "0.7084946", "0.7044238", "0.7011334", "0.69720054", "0.6947502", "0.6897297", "0.68584627", "0.6855229", "0.6832564", "0.67913514", "0.67876244", "0.6778845", "0.6761316", "0.6703549", "0.6685782", "0.6667379", "0.6609515", "0.6609515", "0.6609515", "0.65351146", "0.65127724", "0.6501078", "0.64913964", "0.64913964", "0.6489018", "0.64797735", "0.64735645", "0.64719266", "0.6457442", "0.643748", "0.6436266", "0.6432773", "0.64295995", "0.64249635", "0.6409599", "0.6377389", "0.6366912", "0.6348504", "0.6338937", "0.6335527", "0.6332369", "0.629368", "0.62764317", "0.62570274", "0.62539786", "0.620191", "0.6199331", "0.61985624", "0.6195471", "0.617386", "0.6146334", "0.6146198", "0.61383224", "0.61383224", "0.6134047", "0.61102885", "0.61029804", "0.6093996", "0.609149", "0.6091113", "0.6088678", "0.6087465", "0.6082704" ]
0.74070376
3
Get the ES query to be opimized.
private function _getBaseSearchQuery() { $store = Mage::app()->getStore($this->getStoreId()); $collection = Mage::helper('catalogsearch') ->getEngine() ->getResultCollection(); $allowedVisibilities = Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds(); $allowedStatuses = Mage::getSingleton('catalog/product_status')->getVisibleStatusIds(); $query = $collection->getSearchEngineQuery() ->addFilter('terms', array('visibility' => $allowedVisibilities)) ->addFilter('terms', array('status' => $allowedStatuses)); if ($this->getStoreId() != Mage_Core_Model_App::ADMIN_STORE_ID) { $query->addFilter('terms', array('store_id' => $this->getStoreId())); } // Append the query string for the virtual categories if ($rule = $this->getCategory()->getVirtualRulePreview()) { $queryString = $this->_getQueryStringFromRule($rule); $query->addFilter('query', array('query_string' => $queryString)); } $query = $query->setLanguageCode(Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store)); $query->setQueryType("category_products_layer"); // Mimic query assembling, because ->search() is never really called on it $eventData = new Varien_Object( array('query' => $query->getRawQuery(), 'query_type' => $query->getQueryType(), 'store_id' => $this->getStoreId()) ); Mage::dispatchEvent('smile_elasticsearch_query_assembled', array('query_data' => $eventData)); $query = $eventData->getQuery(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getElasticaQuery()\n {\n return $this->elasticaQuery;\n }", "public function get_query(){\n return $this->build_query()->query;\n }", "function getSearchEngineQuery() {\n\t\treturn $this->_searchEngineQuery;\n\t}", "public function getQUERY()\n {\n return $this->QUERY;\n }", "private function _getBaseSearchQuery()\n {\n $store = Mage::app()->getStore($this->getStoreId());\n $collection = Mage::helper('catalogsearch')\n ->getEngine()\n ->getResultCollection()\n ->addSearchFilter($this->getFulltextQuery());\n\n $allowedVisibilities = Mage::getSingleton('catalog/product_visibility')->getVisibleInSearchIds();\n $allowedStatuses = Mage::getSingleton('catalog/product_status')->getVisibleStatusIds();\n\n $query = $collection->getSearchEngineQuery()\n ->addFilter('terms', array('store_id' => $this->getStoreId()))\n ->addFilter('terms', array('visibility' => $allowedVisibilities))\n ->addFilter('terms', array('status' => $allowedStatuses))\n ->setLanguageCode(Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store))\n ->setPageParams(0, self::PREVIEW_SIZE)\n ->getRawQuery();\n\n return $this->_applyOptimizers($query);\n }", "public function getSearchEngineQuery()\n {\n if ($this->_searchEngineQuery === null) {\n\n $this->_searchEngineQuery = $this->_engine->createQuery(\n 'product', 'smile_elasticsearch/engine_elasticsearch_query_autocomplete'\n );\n\n if ($this->getStoreId()) {\n $store = Mage::app()->getStore();\n $this->_searchEngineQuery->setLanguageCode(\n Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store)\n );\n }\n }\n\n return $this->_searchEngineQuery;\n }", "public function getquery(){\n\t\treturn $this->query;\n\t}", "public function getQuery() {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->query;\n }", "public function getQuery() {\n return $this->query;\n }", "public function getQuery()\r\n\t{\r\n\t\treturn $this->query;\r\n\t}", "public function getQuery()\n {\n return $this->getQ();\n }", "public function query()\n {\n return $this->_query;\n }", "public function getQuery()\n\t{\n\t\treturn $this->query;\n\t}", "public function getQuery(){\n \n return $this->query;\n \n }", "function getQuery() {\n return $this->query;\n }", "public function getQuery()\n {\n return $this->_query;\n }", "public function buildSearchQuery()\n {\n return $this->createSearchQuery()->getQuery();\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function getQuery() {\n return $this->query;\n }", "protected function getQuery() {\n $query = new Query();\n if($this->valid()) {\n $query->setQuery(new GtNode($this->dataStore->getIdentifier(), $this->key()));\n }\n $query->setLimit(new LimitNode($this->limit));\n $query->setSort(new SortNode([\n $this->dataStore->getIdentifier() => SortNode::SORT_ASC\n ]));\n return $query;\n }", "public function getQuery()\r\n {\r\n return $this->m_query;\r\n }", "public function getQuery()\n {\n /* Return self->query */\n return $this->query;\n }", "public static function getQuery()\n {\n return self::$__query;\n }", "public function getGridQuery ()\r\n\t{\r\n\t\treturn $this->gridQuery;\r\n\t}", "public abstract function get_query();", "public function getQuery()\n {\n // if it's a simple query/filter there is no need to create a bool query\n if ((count($this->must) + count($this->should)) === 1) {\n $a = array_merge($this->must, $this->should);\n return array_shift($a);\n }\n\n // required conditions (AND)\n if (!empty($this->must)) {\n $this->query['bool']['must'] = $this->must;\n }\n\n // optional conditions (OR)\n if (!empty($this->should)) {\n $this->query['bool']['should'] = $this->should;\n $this->query['bool']['minimum_should_match'] = $this->minimumShouldMatch;\n }\n\n return $this->query;\n }", "public function getQuery()\n {\n return $this->getOption('query');\n }", "function query()\n\t{\n\t\treturn $this->query;\n\t}", "public function getQueries(){\n \treturn $this->_execedQueries;\n }", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "protected function getQuery()\n {\n return self::$_query;\n }", "protected function _getQuery()\n {\n return Mage::helper('catalogsearch')->getQuery();\n }", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "public function getQuery() {\n if ($this->query == null) {\n $this->query = new PgQuery();\n }\n return $this->query;\n }", "public function getFulltextQuery()\n {\n return $this->getRequest()->getParam('query');\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\r\n {\r\n return $this->query;\r\n }", "protected function getFarmQuery()\n {\n return $this->farmQuery;\n }", "public function get()\n {\n $query = $this->getForString();\n $query .= $this->getInnerExpressionsString();\n $query .= $this->getSortString();\n $query .= $this->getLimitString();\n $query .= $this->getReturnString();\n return $query;\n }", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function getQuery()\n {\n return $this->get(self::_QUERY);\n }", "public function get() {\n\t\treturn $this->query;\n\t}", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "protected function getSearchQueryOptions() {\n // Query options.\n $query_options = $this->query->getOptions();\n\n $parse_mode = $this->query->getParseMode();\n\n // Index fields.\n $index_fields = $this->index->getFields();\n\n // Range.\n $query_offset = empty($query_options['offset']) ? 0 : $query_options['offset'];\n $query_limit = empty($query_options['limit']) ? 10 : $query_options['limit'];\n\n // Query string.\n $query_search_string = NULL;\n\n // Query filter.\n $query_search_filter = NULL;\n\n // Full text search.\n $keys = $this->query->getKeys();\n if (!empty($keys)) {\n if (is_string($keys)) {\n $keys = [$keys];\n }\n\n // Full text fields in which to perform the search.\n $query_full_text_fields = $this->index->getFulltextFields();\n $query_fields = array();\n foreach ($query_full_text_fields as $full_text_field_name) {\n $full_text_field = $index_fields[$full_text_field_name];\n $query_fields[] = $full_text_field->getFieldIdentifier() . '^' . $full_text_field->getBoost();\n }\n\n // Query string.\n $search_string = $this->flattenKeys($keys, $parse_mode);\n\n if (!empty($search_string)) {\n $query_search_string = ['query_string' => []];\n $query_search_string['query_string']['query'] = $search_string;\n $query_search_string['query_string']['fields'] = $query_fields;\n $query_search_string['query_string']['default_operator'] = 'OR';\n }\n }\n\n $sort = NULL;\n // Sort.\n try {\n $sort = $this->getSortSearchQuery();\n }\n catch (ElasticsearchException $e) {\n watchdog_exception('Elasticsearch Search API', $e);\n drupal_set_message($e->getMessage(), 'error');\n }\n\n // Filters.\n try {\n $parsed_query_filters = $this->getQueryFilters(\n $this->query->getConditionGroup(),\n $index_fields\n );\n if (!empty($parsed_query_filters)) {\n $query_search_filter = $parsed_query_filters;\n }\n }\n catch (ElasticsearchException $e) {\n watchdog_exception(\n 'Elasticsearch Search API',\n $e,\n Html::escape($e->getMessage())\n );\n drupal_set_message(Html::escape($e->getMessage()), 'error');\n }\n\n // More Like This.\n $mlt = [];\n if (isset($query_options['search_api_mlt'])) {\n $mlt = $query_options['search_api_mlt'];\n }\n\n return [\n 'query_offset' => $query_offset,\n 'query_limit' => $query_limit,\n 'query_search_string' => $query_search_string,\n 'query_search_filter' => $query_search_filter,\n 'sort' => $sort,\n 'mlt' => $mlt,\n ];\n }", "public final function getQuery() {\n return $this->queryString;\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public function getQuery()\n {\n return $this->wrapped->getQuery();\n }", "public function getQuery()\n {\n return $this->_data['query'];\n }", "protected function _getQuery()\n {\n return $this->_queryFactory->get();\n }", "public function getAnalysisQuery()\n {\n return isset($this->analysis_query) ? $this->analysis_query : null;\n }", "public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }", "public function getQuery()\n {\n $query = parent::getQuery();\n if ( $this->hasLimit )\n {\n if ( $this->offset) \n {\n if ( !$this->orderString ) \n {\n // Uh ow. We need some columns to sort in the oposite order to make this work\n throw new ezcQueryInvalidException( \"LIMIT workaround for MS SQL\", \"orderBy() was not called before getQuery().\" );\n }\n return 'SELECT * FROM ( SELECT TOP ' . $this->limit . ' * FROM ( ' . self::top( $this->offset + $this->limit, $query ) . ' ) AS ezcDummyTable1 ' . $this->invertedOrderString . ' ) AS ezcDummyTable2 ' . $this->orderString;\n }\n return self::top( $this->limit, $query );\n }\n return $query;\n }", "function query() {\n // Since attachment views don't validate the exposed input, parse the search\n // expression if required.\n if (!$this->parsed) {\n $this->query_parse_search_expression($this->value);\n }\n $required = FALSE;\n if (!isset($this->search_query)) {\n $required = TRUE;\n }\n else {\n $words = $this->search_query->words();\n if (empty($words)) {\n $required = TRUE;\n }\n }\n if ($required) {\n if ($this->operator == 'required') {\n $this->query->add_where($this->options['group'], 'FALSE');\n }\n }\n else {\n $search_index = $this->ensure_my_table();\n\n $search_condition = db_and();\n\n if (!$this->options['remove_score']) {\n // Create a new join to relate the 'serach_total' table to our current 'search_index' table.\n $join = new views_join;\n $join->construct('search_total', $search_index, 'word', 'word');\n $search_total = $this->query->add_relationship('search_total', $join, $search_index);\n\n $this->search_score = $this->query->add_field('', \"SUM($search_index.score * $search_total.count)\", 'score', array('aggregate' => TRUE));\n }\n\n if (empty($this->query->relationships[$this->relationship])) {\n $base_table = $this->query->base_table;\n }\n else {\n $base_table = $this->query->relationships[$this->relationship]['base'];\n }\n $search_condition->condition(\"$search_index.type\", $base_table);\n if (!$this->search_query->simple()) {\n $search_dataset = $this->query->add_table('search_dataset');\n $conditions = $this->search_query->conditions();\n $condition_conditions =& $conditions->conditions();\n foreach ($condition_conditions as $key => &$condition) {\n // Take sure we just look at real conditions.\n if (is_numeric($key)) {\n // Replace the conditions with the table alias of views.\n $this->search_query->condition_replace_string('d.', \"$search_dataset.\", $condition);\n }\n }\n $search_conditions =& $search_condition->conditions();\n $search_conditions = array_merge($search_conditions, $condition_conditions);\n }\n else {\n // Stores each condition, so and/or on the filter level will still work.\n $or = db_or();\n foreach ($words as $word) {\n $or->condition(\"$search_index.word\", $word);\n }\n\n $search_condition->condition($or);\n }\n\n $this->query->add_where($this->options['group'], $search_condition);\n $this->query->add_groupby(\"$search_index.sid\");\n $matches = $this->search_query->matches();\n $placeholder = $this->placeholder();\n $this->query->add_having_expression($this->options['group'], \"COUNT(*) >= $placeholder\", array($placeholder => $matches));\n }\n // Set to NULL to prevent PDO exception when views object is cached.\n $this->search_query = NULL;\n }", "protected function getOffsetQuery()\n {\n return $this->offsetQuery;\n }", "public function toQuery();", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "protected function getContextQuery()\n {\n return $this->contextQuery;\n }", "public function getQuery()\n {\n $query = $this->createQueryBuilder('m');\n\n return $query;\n }", "protected function modelQueryBuilder()\n {\n $queryTerm = $this->queryTerm();\n\n return Occasion::\n oldest('rank')->\n\n keywordBy($queryTerm['keyword_by'],\n $queryTerm['keyword'])->\n active($queryTerm['active']);\n }", "public function getInnerQuery()\n {\n return $this->query;\n }", "public function getQuery()\n {\n\n if (empty($this->_query))\n return '';\n\n return $this->_query;\n }", "private function _getOptimizedQuery($query)\n {\n $currentOptimizer = $this->getCurrentOptimizer();\n $currentOptimizer->setCanUseCachedFilter(false);\n return $currentOptimizer->applyOptimizer($query);\n }", "function &getQuery()\n\t{\n\t\treturn $this->query;\n\t}", "public function getExportQuery()\n {\n $sql=\"SELECT e2d,d\n FROM EtoxMicromeEntity2DocumentBundle:Entity2Document e2d\n JOIN e2d.document d\n WHERE e2d.qualifier = 'CompoundMesh'\n AND d.hepval is not NULL\n ORDER BY d.hepval desc\n \";\n\n $query = $this->_em->createQuery($sql);\n return $query;\n }", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "private function buildQuery()\n {\n $params = JComponentHelper::getParams('com_easybookreloaded');\n\n // If type is feed, then the order has to be DESC to get the latest entries in the feed reader\n $document = JFactory::getDocument();\n\n if($document->getType() == 'feed')\n {\n $order = 'DESC';\n }\n else\n {\n $order = $params->get('entries_order', 'DESC');\n }\n\n // Check whether limit is already set - e.g. from feed function\n $limit = JFactory::getApplication()->input->getInt('limit', 0);\n\n if(empty($limit))\n {\n $limit = (int)$params->get('entries_perpage', 5);\n }\n\n $start = JFactory::getApplication()->input->getInt('limitstart', 0);\n\n if(_EASYBOOK_CANEDIT)\n {\n $query = \"SELECT * FROM \".$this->_db->quoteName('#__easybook').\" ORDER BY \".$this->_db->quoteName('gbdate').\" \".$order.\" LIMIT \".$start.\", \".$limit;\n }\n else\n {\n $query = \"SELECT * FROM \".$this->_db->quoteName('#__easybook').\" WHERE \".$this->_db->quoteName('published').\" = 1 ORDER BY \".$this->_db->quoteName('gbdate').\" \".$order.\" LIMIT \".$start.\", \".$limit;\n }\n\n return $query;\n }", "public function getQuery(): string\n {\n return (string) $this->query;\n }", "public function getQuery()\n {\n return $this->readOneof(5);\n }", "public function getQuery()\n {\n $query = 'SELECT ';\n $query .= implode(', ', $this->select) . ' ';\n $query .= \"FROM $this->kind \";\n \n if ( ! empty($this->where) )\n {\n $query .= \"WHERE $this->where \";\n }\n \n if ( ! empty($this->groupBy) )\n {\n $query .= \"GROUP BY $this->groupBy \";\n }\n \n if ( ! empty($this->orderBy) )\n {\n $query .= \"ORDER BY $this->orderBy $this->orderByDirection \";\n }\n \n if ( $this->limit !== null )\n {\n $query .= \"LIMIT $this->limit \";\n }\n \n if ( $this->offset !== null )\n {\n $query .= \"OFFSET $this->offset\";\n }\n \n return trim($query);\n }", "public function query() {\n if (isset($this->value, $this->definition['trovequery'])) {\n $this->query->args['method'] = $this->definition['trovequery']['method'];\n if (is_array($this->value)) {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], implode($this->value, ','));\n }\n else {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->value);\n }\n }\n }", "public function query()\n {\n return (new Query($this))->entity($this->getEntityName());\n }", "public function getQuery() {}" ]
[ "0.7084148", "0.70608336", "0.69906676", "0.691446", "0.6840752", "0.68056715", "0.67041004", "0.66382897", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6623907", "0.6616374", "0.661545", "0.66092813", "0.6599804", "0.65640986", "0.6553866", "0.65473396", "0.6533807", "0.6529319", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.65004086", "0.6490647", "0.6473223", "0.64531773", "0.644787", "0.64360327", "0.64279157", "0.64272475", "0.6425556", "0.64077723", "0.64071745", "0.6405972", "0.6398132", "0.6389956", "0.638518", "0.63592154", "0.6359015", "0.63547164", "0.6337856", "0.6337856", "0.6337856", "0.63301843", "0.63258904", "0.6321369", "0.63140345", "0.63137513", "0.6308006", "0.6306016", "0.630396", "0.62997055", "0.6286874", "0.6279551", "0.6278393", "0.62726927", "0.62340915", "0.62188745", "0.6213516", "0.6171565", "0.61660886", "0.6143334", "0.61349946", "0.6127299", "0.61221415", "0.6108003", "0.6106065", "0.6105481", "0.6089182", "0.6072442", "0.6047576", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60319775", "0.60281783", "0.6022166", "0.6018186", "0.6001255", "0.60000616", "0.59881735", "0.59858674" ]
0.61413974
75
Retrieve the ES raw query string for a given rule
protected function _getQueryStringFromRule(Smile_VirtualCategories_Model_Rule $rule) { // Do not call directly getSearchQuery() on rule because it would load from cache instead of recalculate $rule->addUsedCategoryIds($this->getCategory()->getId()); $rule->getConditions()->setRule($rule); $queryString = $rule->getConditions()->getSearchQuery(); // Append the root category query string if needed if ($rootCategory = $this->_getVirtualRootCategory($this->getCategory())) { $rootCategoryQuery = $this->_getVirtualRule($rootCategory)->getSearchQuery($this->getCategory()->getId()); if ($queryString) { $queryString = "(" . $queryString . " AND (" . $rootCategoryQuery . "))"; } else { $queryString = "(" . $rootCategoryQuery . ")"; } } return $queryString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryAsString();", "public function getQuery(): string\n {\n return (string) $this->query;\n }", "protected function getQuery(): string\n {\n return http_build_query($this->query);\n }", "public function getQuery(): string\r\n {\r\n return $this->query;\r\n }", "abstract protected function buildQuery(): string;", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "public function getQuery(): string\n {\n return $this->query;\n }", "private function getQueryString()\n {\n return \\apply_filters('swiftype_search_query_string', stripslashes(\\get_search_query(false)));;\n }", "public function getQueryString()\n {\n return parse_str($this->partials['query']);\n }", "private function getQueryString() : string\n {\n return http_build_query($this->parameters);\n }", "public static function queryString(): string\n\t{\n\t\treturn static::$queryString;\n\t}", "public function getQueryString():string;", "private function getSumoQuery() {\n $query = file_get_contents(__DIR__ . '/query.txt');\n $query = strtr($query, [\n '[site_realm]' => $this->profile->getSiteRealm(),\n '[site_short_name]' => $this->profile->getSiteShortName()\n ]);\n $query = trim(preg_replace('/\\s\\s+/', ' ', $query));\n $query = str_replace([\"\\n\", \"\\r\"], ' ', $query);\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Sumologic query: {$query}\");\n }\n return $query;\n }", "public function getQueryString() {\n\t\t\n\t}", "public function getFulltextQuery()\n {\n return $this->getRequest()->getParam('query');\n }", "public function query(): string;", "public function queryString()\n\t{\n\t\treturn substr($this->fullUri(), strpos($this->fullUri(), '?'), strlen($this->fullUri()) - 1);\n\t}", "public function __toString(){\r\n\t\treturn $this->queryString();\r\n\t}", "public function getQueryString()\n {\n $options = [\n 'w' => $this->width,\n 'h' => $this->height,\n 'fm' => $this->format,\n 'q' => $this->quality\n ];\n\n if ($this->quality !== null || $this->progressive) {\n $options['fm'] = 'jpg';\n }\n if ($this->progressive) {\n $options['fl'] = 'progressive';\n }\n\n return http_build_query($options, '', '&', PHP_QUERY_RFC3986);\n }", "public function getQueryString()\n\t{\n\t\treturn $this->queryString;\n\t}", "public function getQueryText()\n\t{\n\t\tif (empty($this->queryText)) {\n\t\t\t$this->queryText = $this->getParam('q');\n\t\t}\n\t\t$queryText = str_replace(':', '', $this->queryText);\n\t\treturn $queryText;\n\t}", "public function getQueryString()\n {\n return $this->getRequest()->getQueryString();\n }", "public function get_query() {\n\t return $this->decodedWebhook['queryResult']['queryText'];\n }", "public function getQueryString(): string\n {\n $param1 = $this->getQueryStringPart($this->parameters[0]);\n $param2 = $this->getQueryStringPart($this->parameters[1]);\n $param3 = $this->getQueryStringPart($this->parameters[2]);\n return $param1 . ' BETWEEN ' . $param2 . ' AND ' . $param3;\n }", "public function getQueryString()\n {\n return $this->query_string;\n }", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getClientQuery(): string;", "public function getQuery()\n {\n\n if (empty($this->_query))\n return '';\n\n return $this->_query;\n }", "public final function getQuery() {\n return $this->queryString;\n }", "protected function getSearchQuery()\n {\n $searchQuery = \"\";\n if (isset($_POST['searchName'])) {\n $searchQuery = Convert::slugify($_POST['searchName']);\n }\n return (string) str_replace(\"-\", \"+\", $searchQuery);\n }", "public function queryString() : string;", "public function get()\n {\n $query = $this->getForString();\n $query .= $this->getInnerExpressionsString();\n $query .= $this->getSortString();\n $query .= $this->getLimitString();\n $query .= $this->getReturnString();\n return $query;\n }", "protected function get_url_query(): string {\n if ($this->has_params()) {\n return $this->get_params_as_query();\n }\n return '';\n }", "private function getSearchURI()\n {\n $q = $this->getInput('q');\n $hide_expired = $this->getInput('hide_expired');\n $hide_local = $this->getInput('hide_local');\n $priceFrom = $this->getInput('priceFrom');\n $priceTo = $this->getInput('priceTo');\n $url = $this->i8n('bridge-uri')\n . 'search/advanced?q='\n . urlencode($q)\n . '&hide_expired=' . $hide_expired\n . '&hide_local=' . $hide_local\n . '&priceFrom=' . $priceFrom\n . '&priceTo=' . $priceTo\n /* Some default parameters\n * search_fields : Search in Titres & Descriptions & Codes\n * sort_by : Sort the search by new deals\n * time_frame : Search will not be on a limited timeframe\n */\n . '&search_fields[]=1&search_fields[]=2&search_fields[]=3&sort_by=new&time_frame=0';\n return $url;\n }", "public function getQueryString()\n {\n $location = $this->getLocation();\n\n if (!empty($location)) {\n $this->updateQuery($location, 'l');\n }\n\n return http_build_query($this->queryParams);\n }", "protected function doAsQueryString() : string\n {\n $strInlineFragmentDirectives = '';\n if ($this->directives !== []) {\n $strDirectives = [];\n foreach ($this->directives as $directive) {\n $strDirectives[] = $directive->asQueryString();\n }\n $strInlineFragmentDirectives = \\sprintf(' %s', \\implode(' ', $strDirectives));\n }\n // Generate the string for the body of the fragment\n $strInlineFragmentFieldsOrFragmentBonds = '';\n if ($this->fieldsOrFragmentBonds !== []) {\n $strFieldsOrFragmentBonds = [];\n foreach ($this->fieldsOrFragmentBonds as $fieldsOrFragmentBond) {\n $strFieldsOrFragmentBonds[] = $fieldsOrFragmentBond->asQueryString();\n }\n $strInlineFragmentFieldsOrFragmentBonds = \\sprintf(' %s ', \\implode(' ', $strFieldsOrFragmentBonds));\n }\n return \\sprintf('...on %s%s {%s}', $this->typeName, $strInlineFragmentDirectives, $strInlineFragmentFieldsOrFragmentBonds);\n }", "public function getQuery() {\n $query = $this->getArgument(self::QUERY_NAME, '');\n if ($query) {\n// $query = str_replace(Url::getBaseUrl(), '', $query);\n $query = str_replace('?' . self::QUERY_NAME . '=', '', $query);\n $query = ltrim($query, Request::QUERY_SEPARATOR);\n $query = rtrim($query, Request::QUERY_SEPARATOR);\n }\n\n return $query;\n }", "public function getQuery() {}", "public function getQuery() {}", "public function buildQueryString();", "public abstract function getQuery();", "public function queryString();", "public function getTargetQueryString() {\n if(!$this->isTargetInternal())\n return null;\n\n $c = $this->cutTarget();\n return $c['queryString'];\n }", "public function getQueryString()\n {\n return rtrim((string) $this->request->getRequestUri(), '/');\n }", "public function get_corrected_query_string() {\n\t\treturn '';\n\t}", "abstract protected function queryString(): string;", "function getQuery() ;", "public function getQueryString() {\n\t\t\t// Crackle permits duplicate keys, so we cannot use PHP's http_build_query()\n\t\t\t$parts = array();\n\t\t\tforeach ($this->getPairs() as $pair) {\n\t\t\t\t$parts[] = urlencode($pair->getKey()) . '=' . urlencode($pair->getValue());\n\t\t\t}\n\t\t\treturn implode('&', $parts);\n\t\t}", "public function getSearchTerm()\n {\n return $this->_catalogSearch->getEscapedQueryText();\n }", "public function getQueryString()\n {\n return isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';\n }", "private function getURI()\n {\n\n if (!empty($_SERVER['REQUEST_URI'])) {\n\n $routeRule = trim($_SERVER['REQUEST_URI'], '/');\n\n // Get part of uri without GET request if it exist (ignore GET)\n if (preg_match('/\\?/', $routeRule)) {\n // get rule for router which based on request uri\n $routeRule = explode('?', $routeRule);\n $routeRule = array_shift($routeRule);\n // normalize route rule\n $routeRule = trim($routeRule, '/');\n }\n return $routeRule;\n }\n }", "public function getQueryString(): string\n {\n return http_build_query(\n $this->imageApiOptions->toArray(),\n '',\n '&',\n PHP_QUERY_RFC3986\n );\n }", "public function getSparql() {\n $constraint_str = trim($this->element->getSparql());\n \n //grammar says: brackets are not needed , sparql engines say: error...\n if (substr($constraint_str, 0, 1) != '(') {\n $constraint_str = '('.$constraint_str.')';\n }\n return 'FILTER '.$constraint_str;\n }", "public abstract function get_query();", "public function queryString() {\n return $_SERVER['QUERY_STRING'];\n }", "public function queryFormat(): string\n {\n return 'Pretty';\n }", "public function getRaw()\n {\n return $this->client->search($this->compile());\n }", "public function getQueryString()\n {\n $queryString = static::normaliseQueryString($_SERVER['QUERY_STRING']);\n\n return '' === $queryString ? null : $queryString;\n }", "public function getSearchQueryText()\n {\n $mesg = (int)$this->getRequest()->getParam('as') ?\n __(\"Search results for: '%1'\", 'Attributes Search') :\n __(\"Search results for: '%1'\", $this->catalogSearchData->getEscapedQueryText());\n return $mesg;\n }", "public function getQuery()\n {\n return $this->get(self::_QUERY);\n }", "abstract protected function getQuery();", "public function __toString() {\n\t\treturn $this->query;\n\t}", "function getCorrectedQueryString() {\n\t\tif (io::strpos($this->_correctedQueryString, ' language:'.$this->_language) !== false) {\n\t\t\treturn io::htmlspecialchars(str_replace(' language:'.$this->_language, '', $this->_correctedQueryString)); \n\t\t}\n\t\treturn io::htmlspecialchars($this->_correctedQueryString);\n\t}", "public function getQueryParametersAsString() {\n return $this->queryParameters || $this->query ? http_build_query($this->getQueryParameters()) : null;\n }", "public function __toString() {\n return $this->query;\n }", "function GetString()\r\n\t{\r\n\t\tif (!trim($this->_strWhere))\r\n\t\t{\r\n\t\t\t$arrWhere = Array();\r\n\t\t\tforeach($this->_arrWhere AS $strKey=>$strValue)\r\n\t\t\t{\r\n\t\t\t\t$arrWhere[] = \"$strKey = <$strKey>\";\r\n\t\t\t}\r\n\t\t\t$strWhere = trim(implode(\" AND \", $arrWhere));\r\n\t\t\treturn $strWhere;\r\n\t\t}\r\n\r\n\t\treturn $this->_strWhere;\r\n\t}", "public function getQuery()\n {\n return $this->_data['query'];\n }", "public function getQuery(): string {\n\t\t// Store previous output before changing to temp\n\t\t$output = $this->get('output');\n\t\t\n\t\ttry {\n\t\t\t$this->set('output', SqlAdapter::SQL_QUERY);\n\t\t\t$result = $this->run();\n\t\t} finally {\n\t\t\t$this->set('output', $output);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function __toString(): string\n {\n $this->buildQuery();\n return $this->query;\n }", "function __toString() {\n\t\treturn $this->query;\n\t}", "public function getQuery()\n {\n return $this->getOption('query');\n }", "function buildQueryString($q) {\r\n\t\t$i=0;\r\n\t\tforeach($q['RuleValuePair'] as $rule_id=>$value) {\r\n\t\t\t#Sintax for \"AND\", empty logical means \"AND\" as well, by default\r\n\t\t\tif(eregi('and',$q['logical'][$i]) || $q['logical'][$i]=='') {\r\n\t\t\t\t$AND[$i] = TRUE;\r\n\t\t\t} elseif(eregi('or',$q['logical'][$i])) {\r\n\t\t\t\t$OR[$i] = TRUE;\r\n\t\t\t} elseif(eregi('not', $q['logical'][$i])) {\r\n\t\t\t\t$NOT[$i] = TRUE;\r\n\t\t\t}\r\n\t\t\t#There is a small difference in MySQL and Postgres\r\n\t\t\t$regex = $GLOBALS['regexp'];\r\n\r\n\t\t\t#Basic query string\r\n\t\t\t$sql[$i] = \"select resource_id from s3db_statement where rule_id='\".$rule_id.\"' and value \".$logical.$regex.\"'\".$value.\"'\";\r\n\t\r\n\t\t\t#Increment the queries\r\n\t\t\t#Case when only one thing is queried\r\n\t\t\tif(count($q['RuleValuePair'])==1) {\r\n\t\t\t\t$sqlComplete .= \"\".$sql[$i].\"\";\r\n\t\t\t} else {\r\n\t\t\t\tif($i==0) {\r\n\t\t\t\t\tif($AND[$i]) { $sqlComplete = \"\".$sql[0].\"\"; }\r\n\t\t\t\t\telseif($NOT[$i]) { $sqlComplete = \"\".$sql[0].\"\"; }\r\n\t\t\t\t\telseif($OR[$i]) { $sqlComplete = \"(\".$sql[0].\")\"; }\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($AND[$i-1]) { $sqlComplete = \"\".$sql[$i].\" and resource_id in (\".$sqlComplete.\")\"; }\r\n\t\t\t\t\telseif($OR[$i-1]) { $sqlComplete = \"(\".$sql[$i].\") union \".$sqlComplete.\"\"; }\r\n\t\t\t\t\telseif($NOT[$i-1]) { $sqlComplete = \"\".$sql[$i].\" and resource_id not in (\".$sqlComplete.\")\"; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn $sqlComplete;\r\n\t}", "function rule_details($ruleId)\n\t{\n\t\tlog_message('debug', '_setting/rule_details');\n\t\tlog_message('debug', '_setting/rule_details:: [1] ruleId='.$ruleId);\n\n\t\t$values['category_condition'] = '';\n\t\t$values['phrase_condition'] = \" AND id='\".$ruleId.\"' \";\n\t\t$values['limit_text'] = '';\n\n\t\t$result = server_curl(IAM_SERVER_URL, array('__action'=>'get_row_as_array', 'query'=>'get_rule_name_list', 'variables'=>$values));\n\t\tlog_message('debug', '_setting/rule_details:: [2] result='.json_encode($result));\n\n\t\treturn $result;\n\t}", "public function __toString() {\n\t\treturn $this->getQuery();\n\t}", "public function uriWithQuery(): string\n {\n return $this->uri() . '?' . $this->server('query_string');\n }", "public function getQueryCommand();", "public function getStringExpr()\n {\n return $this->stringExpr;\n }", "public function __toString()\n\t{\n\t\tif (is_array($this->params[self::PARAM_VALUE]))\n\t\t{\n\t\t\t$param_value = ' ('.join(\",\", $this->params[self::PARAM_VALUE]).')';\n\t\t}\n\t\telseif ($this->params[self::PARAM_VALUE])\n\t\t{\n\t\t\t$param_value = ' ('.$this->params[self::PARAM_VALUE].')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param_value = '';\n\t\t}\n\n\t\t$string = \"Rule: \" . $this->event_name . \" [\" . $this->name . $param_value . \"]\\n\";\n\t\treturn $string;\n\t}", "public function formatQuery(string $query): string;", "public function getHttpQuery () {\n\t\t\tif($this->httpQuery) {\n\t\t\t\treturn $this->httpQuery;\n\t\t\t}\n\t\t\t\n\t\t\treturn 'No query initiated yet';\n\t\t}", "public function getQuery() {\n return $this->query;\n }", "private function makeQuery($gid) {\n\t\t$query = 'editions:' . $gid . '';\n\n\t\treturn urlencode($query);\n\t}", "public function getQuery()\n {\n // if it's a simple query/filter there is no need to create a bool query\n if ((count($this->must) + count($this->should)) === 1) {\n $a = array_merge($this->must, $this->should);\n return array_shift($a);\n }\n\n // required conditions (AND)\n if (!empty($this->must)) {\n $this->query['bool']['must'] = $this->must;\n }\n\n // optional conditions (OR)\n if (!empty($this->should)) {\n $this->query['bool']['should'] = $this->should;\n $this->query['bool']['minimum_should_match'] = $this->minimumShouldMatch;\n }\n\n return $this->query;\n }", "public function getQUERY()\n {\n return $this->QUERY;\n }", "public function __toString() {\n return $this->getQueryId();\n }", "protected function getWhere(): string\n {\n return ($this->where && !$this->where->isEmpty() ? \"\\r\\nWHERE \".$this->where : \"\");\n }", "public function getQuery()\r\n\t{\r\n\t\treturn $this->query;\r\n\t}", "public function buildQuery(): string {\n if ($this->queryHasOption || strlen($this->finalQueryString) > 0) {\n throw new \\Exception('You can only use this instance of ODataQueryBuilder for a single query! Please create a new builder for a new query.', 500);\n }\n\n $this->appendServiceUrlToQuery();\n $this->appendEntitySetsToQuery();\n $this->appendFiltersToQuery();\n $this->appendSearchToQuery();\n $this->appendSelectsToQuery();\n $this->appendExpandsToQuery();\n $this->appendOrderByToQuery();\n $this->appendSkipToQuery();\n $this->appendTopToQuery();\n $this->appendCountToQuery();\n\n //remove the ? if the query has no query options.\n if (!$this->queryHasOption) {\n $this->finalQueryString = substr($this->finalQueryString, 0, -1);\n }\n\n return $this->finalQueryString;\n }", "public function getQuery(){\n \n return $this->query;\n \n }", "public function buildRequestQuery()\n\t{\n\t\t$query_string = '';\n\t\tforeach ($this->returnItems() as $index => $item) {\n\t\t\t$query_string .= '&' . $item->toQueryString($index++);\n\t\t}\n\t\treturn $query_string;\n\t}", "function getSearchEngineQuery() {\n\t\treturn $this->_searchEngineQuery;\n\t}" ]
[ "0.6525287", "0.605407", "0.5891286", "0.5842957", "0.58400124", "0.58265656", "0.58265656", "0.58265656", "0.5801091", "0.5770238", "0.57324594", "0.5731913", "0.5715294", "0.5678404", "0.56288165", "0.55913246", "0.5572216", "0.555764", "0.5529608", "0.550066", "0.5500531", "0.54854584", "0.5480591", "0.546303", "0.5450849", "0.5445712", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.54441595", "0.5435155", "0.53996015", "0.539448", "0.5389972", "0.5379479", "0.5374357", "0.53452474", "0.5344964", "0.53394836", "0.5333999", "0.5326438", "0.52995324", "0.52995324", "0.5296661", "0.5282654", "0.524949", "0.5248036", "0.5225076", "0.5193249", "0.51896006", "0.5182905", "0.5181607", "0.5177271", "0.5170699", "0.5153618", "0.514934", "0.51179", "0.5110414", "0.5101312", "0.5100425", "0.5096341", "0.5084003", "0.5074566", "0.504996", "0.5045663", "0.5029357", "0.5024243", "0.5020945", "0.5008331", "0.5002587", "0.49850953", "0.49822503", "0.4979339", "0.49467537", "0.49442413", "0.49424332", "0.493367", "0.49327135", "0.49250954", "0.49208617", "0.48918578", "0.48856977", "0.488496", "0.48805884", "0.48776895", "0.4876783", "0.4874717", "0.48739845", "0.487119", "0.48604307", "0.48592302", "0.48573774", "0.48570615", "0.48512858", "0.48510697" ]
0.6264304
1
Load product ids for the query
private function _getProductIdsFromSearchQuery($query) { if (is_null($this->_productIds)) { $ids = array(); $client = Mage::helper('catalogsearch')->getEngine()->getClient(); $response = $client->search($query); foreach ($response['hits']['hits'] as $hit) { $currentId = $hit['fields']['entity_id']; if (is_array($currentId)) { $currentId = current($currentId); } $ids[] = (int) $currentId; } $this->_productIds = $ids; } return $this->_productIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "public static function fetch_all_product_ids() {\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t$product_ids = $wpdb->get_results( \"SELECT ID FROM $wpdb->posts WHERE post_type = 'product' AND post_status = 'publish';\" );\r\n\r\n\t\t\treturn $product_ids;\r\n\t\t}", "protected function _getProcessedProductIds()\r\n {\r\n $maxLimit = $this->_getProductLimit();\r\n $orderBy = Mage::getStoreConfig('progos_partialindex/index/setOrder');\r\n $collection = Mage::getModel('partialindex/product_index')->getCollection()->distinct(true);\r\n $collection = $collection->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('product_id as product_id');\r\n //$collection = $collection->order('sort_order DESC');\r\n\r\n if($orderBy) {\r\n $collection = $collection->order('sort_order ASC');\r\n }\r\n else {\r\n $collection = $collection->order('sort_order DESC');\r\n }\r\n if($maxLimit > 0){\r\n $collection = $collection->limit($maxLimit);\r\n }\r\n\r\n $connection = $this->_getReadAdapter();\r\n return $connection->fetchCol($collection);\r\n }", "protected function collect_product_identifiers() {\n\n\t\t// Get all the products stored as Events in tribe\n\t\t// with their associated identifiers (ISBN etc)\n\t\t$args = [\n\t\t\t'post_type'=> 'tribe_events',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'order' => 'ASC',\n\t\t\t'fields'\t=> 'ids',\n\t\t\t'meta_query' => [\n\t\t\t\t[ \n\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t'value' => (new DateTime())->format('Y-m-d H:i:s'),\n\t\t\t\t\t'compare' => '>=',\n\t\t\t\t],\n\t\t\t]\n\t\t]; \n\n\t\t$posts = get_posts( $args );\n\t\t$product_ids = [];\n\t\t\n\t\tforeach ( $posts as $post ) {\n\t\t\t$id = get_post_meta($post, 'amazon_identifier', true);\n\n\t\t\tif ( !empty($id) ) {\n\t\t\t\t$product_ids[$id] = $post;\n\t\t\t}\n\t\t}\n\n\t\treturn $product_ids;\n\t}", "public function getProducts()\n {\n foreach ($this->productIds as $id) {\n // Use a generator to save on memory/resources\n // load accounts from DB one at a time only when required\n yield (new ProductModel())->load($id);\n }\n }", "public function getProductIds(): array\n {\n return $this->product_ids;\n }", "protected function getAllProductIds()\n {\n $om = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $connection = $om->get('Magento\\Framework\\App\\ResourceConnection')->getConnection();\n // TODO: use getTable()\n \n $visibilityAttrId = 99; // TODO: get it dynamically: visibility\n $select = $connection->select()\n ->from(['main_table' => 'catalog_product_entity'], ['entity_id'])\n ->join(\n 'catalog_product_entity_int as avisib',\n 'main_table.entity_id = avisib.entity_id AND avisib.attribute_id = '.$visibilityAttrId,\n []\n )\n ->where('avisib.value IN(?)', [\n \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_IN_SEARCH,\n \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_BOTH\n ]);\n \n return $connection->fetchCol($select);\n }", "private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "private function _getCartProductIds()\n {\n if ($this->_products === null) {\n $this->_products = [];\n foreach ($this->getQuote()->getAllItems() as $quoteItem) {\n /* @var $quoteItem \\Magento\\Quote\\Model\\Quote\\Item */\n $product = $quoteItem->getProduct();\n $this->_products[] = $product->getEntityId();\n }\n }\n\n return $this->_products;\n }", "private function initProducts()\n {\n $productIds = $this->getRequestProductIds();\n if ($productIds) {\n try {\n return $this->productCollectionFactory\n ->create()\n ->addIdFilter($productIds)\n ->addAttributeToFilter(ProductInterface::TYPE_ID, ConfigurableModel::TYPE_CODE);\n } catch (NoSuchEntityException $e) {\n return false;\n }\n }\n\n return false;\n }", "public function getAllIds()\n {\n if (is_null($this->_allProductIds)) {\n if (!$this->isShuffled()) {\n $this->_allProductIds = array_keys($this->getItemCollection());\n return $this->_allProductIds;\n }\n\n $targetRuleProductIds = $this->_getTargetRuleProductIds();\n $linkProductCollection = $this->_getPreparedTargetLinkCollection();\n $linkProductIds = array();\n foreach ($linkProductCollection as $item) {\n $linkProductIds[] = $item->getEntityId();\n }\n $this->_allProductIds = array_unique(array_merge($targetRuleProductIds, $linkProductIds));\n shuffle($this->_allProductIds);\n }\n\n return $this->_allProductIds;\n }", "private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}", "function LoadProduct($orderid) {\n\t$proids = array();\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"orderproduct\",array('id','orderid','proid','number','price','returnnow','modlcharge'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$idobj = $factory->getIdentityObject()->field('orderid')->eq($orderid);\n\t$order_pro = $finder->find($idobj);\n\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"product\",array('id','classid','length','width','think','unitlen','unitwid','unitthi','unit','sharp','note'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$pro = $order_pro->next();\n\t$i = 0;\n\t$data = array();\n\twhile($pro){\n\t\t$data[$i][0] = $i+1;\n\t\t$idobj = $factory->getIdentityObject()->field('id')->eq($pro->getProid());\n\t\t$collection = $finder->find($idobj);\n\t\t$product = $collection->current();\n\t\t$data[$i][1] = $product->getSize();\n\t\t$data[$i][2] = $pro->getNumber();\n\t\t$price = $pro->getPrice()-$pro->getReturnnow();\n\t\t$data[$i][3] = sprintf(\"%.2f\",$price);\n\t\t$data[$i][4] = sprintf(\"%.2f\",$price*$data[$i][2]);\n\t\t$i++;\n\t\t$pro = $order_pro->next();\n\t}\n\treturn $data;\n}", "public function getProdIds() \n {\n return array_keys($this->_products);\n }", "public function products_ids_callback()\n {\n /**\n * Get products.\n */\n $products = new WP_Query(array(\n 'post_type' => $this->post_type,\n 'posts_per_page' => -1,\n 'post_status' => 'any',\n 'fields' => 'ids',\n ));\n\n /*\n * No products.\n */\n if (!$products->have_posts()) {\n return false;\n }\n\n /**\n * Prepare response.\n */\n $data = array(\n 'count' => $products->post_count,\n 'ids' => $products->posts,\n );\n\n /**\n * Response.\n */\n $response = rest_ensure_response($data);\n $response->set_status(200);\n\n return $response;\n }", "private function showProductsById()\n { \n $productNum1 = $this->productDao->getById(1);\n $productNum9 = $this->productDao->getById(9);\n \n echo PHP_EOL;\n echo 'Product with id 1: ' . PHP_EOL; print_r($productNum1);\n echo 'Product with id 9: ' . PHP_EOL; print_r($productNum9);\n }", "public function getProductsId()\n {\n return $this->productsId;\n }", "function getProducts()\n {\n $db = $this->getPearDb();\n\n // The query is big, but it does use indexes. Anyway, the involved\n // tables almost never change, so we utilize MySQL's query cache\n $sql = \"(\n # User permissions\n SELECT DISTINCT pe_u.parameterValue AS productId\n FROM user u\n JOIN permission pe_u\n ON pe_u.doerId = u.id\n AND pe_u.allowed = '1'\n AND pe_u.actionId = 6 # 6 = use_product\n WHERE u.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Customer permissions\n SELECT DISTINCT pe_c.parameterValue AS productId\n FROM permission pe_c\n WHERE pe_c.doerId = \" . $this->id . \"\n AND pe_c.allowed = '1'\n AND pe_c.actionId = 6 # 6 = use_product\n\n ) UNION (\n\n SELECT productId\n FROM site s\n WHERE s.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Kollage is always on\n SELECT 1\n\n )\";\n $productIds = $db->getCol($sql);\n $productIds = array_filter(array_unique($productIds), 'intval');\n\n $product = new Vip_Product;\n $product->columnIn('id', $productIds);\n // Customer-specific products are only enabled for that customer.\n $product->addWhereSql('customerId IN (0, ' . $this->id . ')');\n $product->setOrderBySql('sortOrder,title');\n $products = $product->findAll();\n foreach ($products as $product) {\n $product->setCustomer($this);\n }\n\n return $products;\n }", "public function load_products() {\n\t\t$this->get_products_posts();\n\t\tif ( $this->posts !== null ) {\n\t\t\tforeach ( $this->posts as $ps_post ) {\n\t\t\t\t$this->add( new ShowcaseProduct( $ps_post ) );\n\t\t\t}\n\t\t}\n\t}", "public function get_product_id() : array {\n\t\tif ( ! empty( $this->product_id ) ) {\n\t\t\treturn [ 'ID' => $this->product_id ];\n\t\t}\n\n\t\tpreg_match( '/runParams\\.productId=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn [ 'ID' => '' ];\n\t\t}\n\n\t\t$this->product_id = $matches[1];\n\n\t\treturn [ 'ID' => $matches[1] ];\n\t}", "private function get_convention_product_ids() : array {\n\t\t$all_convention_ids = get_transient( 'ghc-all-convention-variation-ids' );\n\t\tif ( false === $all_convention_ids ) {\n\t\t\t$all_convention_ids = $this->set_convention_variation_ids_transient();\n\t\t}\n\n\t\treturn $all_convention_ids;\n\t}", "public abstract function get_ids();", "public function products_ids_route()\n {\n register_rest_route($this->namespace, '/products/ids/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_ids_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "protected function _getFilterEntityIds()\n {\n return $this->getLayer()->getProductCollection()->getAllIdsCache();\n }", "function getProductFromArray($itemsIds) {\r\n $strIds = implode($itemsIds, ', ');\r\n $sql = \"SELECT * FROM products WHERE id in ({$strIds})\";\r\n\r\n include '../config/db.php';\r\n $rs = mysqli_query($link, $sql);\r\n mysqli_close($link);\r\n\r\n return createSnartyRsArray($rs);\r\n}", "public function getProductsFromStore(request $request)\n {\n $data = $request->all();\n if(!empty($data['store_id']))\n {\n $storeId = $data['store_id'];\n $infoCheck = StoreProduct::where(['store_id'=>$storeId])->first();\n $itemId = 1;\n\n if($infoCheck)\n {\n $itemId = $infoCheck->product_id;\n }\n\n $ShopifyResponse = shopify_call($storeId, '/admin/api/2020-04/products/count.json', array(), 'GET');\n $response = json_decode($ShopifyResponse['response']);\n $countData= $response->count;\n $pageNo = $countData/250;\n $pnoLimit = round($pageNo+0.55);\n $itemId = $itemId;\n\n for($i=1; $i <= $pnoLimit; $i++)\n {\n $urg = '/admin/api/2020-04/products.json?limit=250&since_id='.$itemId;\n $response = Getdata($storeId,$urg);\n $productCount = count($response->products);\n $j = 1;\n foreach ($response->products as $item)\n {\n if($j == $productCount)\n {\n $itemId = $item->id;\n }\n $checkProduct = StoreProduct::where(['store_id' => $storeId,'product_id' => '$item->id'])->first();\n\n if(!$checkProduct)\n {\n $postData = [\n \"product_id\" => $item->id,\n \"store_id\" => $storeId,\n \"title\" => $item->title,\n \"vendor\" => $item->vendor,\n \"product_type\" => $item->product_type,\n \"handle\" => $item->handle,\n \"tags\" => $item->tags,\n \"published_scope\" => $item->published_scope,\n ];\n $response = StoreProduct::create($postData);\n $insertProductId = $response->id;\n\n /*\n * Add product Varients\n */ \n foreach ($item->variants as $items)\n {\n $insertDataVariants = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"variant_id\" => $items->id,\n \"product_id\" => $items->product_id,\n \"title\" => $items->title,\n \"price\" => $items->price,\n \"compare_at_price\" => $items->compare_at_price,\n \"sku\" => $items->sku,\n \"position\" => $items->position,\n \"fulfillment_service\" => $items->fulfillment_service,\n \"inventory_management\" => $items->inventory_management,\n \"inventory_quantity\" => $items->inventory_quantity,\n \"option1\" => $items->option1,\n \"option2\" => $items->option2,\n \"option3\" => $items->option3,\n \"image_id\" => $items->image_id\n ];\n StoreProductVariants::create($insertDataVariants);\n } \n\n /*\n * Add product images\n */ \n foreach ($item->images as $itemimg)\n {\n $insertProductImages = [\n \"store_products_id\" => $insertProductId,\n \"store_id\" => $storeId,\n \"image_id\" => $itemimg->id,\n \"product_id\" => $itemimg->product_id,\n \"src\" => $itemimg->src,\n \"alt\" => $itemimg->alt,\n \"position\" => $itemimg->position,\n ];\n StoreProductImages::create($insertDataVariants);\n }\n }\n $j++;\n }\n }\n return response()->json(['status' =>true, 'message' =>'Data import','data' =>\"got product\"]); \n }\n else\n {\n return response()->json(['status' =>true, 'message' =>'Data not found','data'=>[]]);\n }\n }", "public function LoadProductsForPrice()\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tSELECT\n\t\t\t\t\tp.*,\n\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating,\n\t\t\t\t\timageisthumb,\n\t\t\t\t\timagefile,\n\t\t\t\t\t\" . GetProdCustomerGroupPriceSQL() . \"\n\t\t\t\tFROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tDISTINCT ca.productid,\n\t\t\t\t\t\t\tFLOOR(prodratingtotal / prodnumratings) AS prodavgrating\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t[|PREFIX|]categoryassociations ca\n\t\t\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tp.prodvisible = 1 AND\n\t\t\t\t\t\t\tca.categoryid IN (\" . $this->GetProductCategoryIds() . \") AND\n\t\t\t\t\t\t\tp.prodcalculatedprice >= '\".(int)$this->GetMinPrice().\"' AND\n\t\t\t\t\t\t\tp.prodcalculatedprice <= '\".(int)$this->GetMaxPrice().\"'\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\" . $this->GetSortField() . \", p.prodname ASC\n\t\t\t\t\t\t\" . $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage')) . \"\n\t\t\t\t\t) AS ca\n\t\t\t\t\tINNER JOIN [|PREFIX|]products p ON p.productid = ca.productid\n\t\t\t\t\tLEFT JOIN [|PREFIX|]product_images pi ON (pi.imageisthumb = 1 AND p.productid = pi.imageprodid)\n\t\t\t\";\n\n\t\t\t//$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit($this->GetStart(), GetConfig('CategoryProductsPerPage'));\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$row['prodavgrating'] = (int)$row['prodavgrating'];\n\t\t\t\t$this->_priceproducts[] = $row;\n\t\t\t}\n\t\t}", "public function loadProductsKeywords(array $productIds) {\n\n $query = str_replace(':productIds', implode(',', $productIds), self::LOAD_PRODUCTS_KEYWORDS);\n\n $this->db->query($query);\n\n return $this->arraySetKey($this->db->fetchAll(), 'productId');\n }", "public static function loadProductsNew()\n {\n $ret = array();\n $sql = \"select * from products ORDER BY DayAdd DESC limit 0,10\";\n $list = DataProviderMain::execQuery($sql);\n\n while ($row = mysqli_fetch_array($list)) {\n $proId = $row[\"ProID\"];\n $proName = $row[\"ProName\"];\n $tinyDes = $row[\"TinyDes\"];\n $fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n $quantity = $row[\"Quantity\"];\n $catId = $row[\"CatID\"];\n $view = $row[\"NView\"];\n $dayAdd = $row[\"DayAdd\"];\n $classify = $row[\"Classify\"];\n\n $p = new Products($proId, $proName, $tinyDes, $fullDes, $price, $quantity, $catId, $view, $dayAdd, $classify);\n array_push($ret, $p);\n }\n\n return $ret;\n }", "private function getDatabaseProducts(): array\n {\n $products = DB::table('products')->pluck('product_id', 'id');\n \n return $products->toArray();\n }", "function getProductByCategory(){\n $return = array(); \n $pids = array();\n \n $products = Mage::getResourceModel ( 'catalog/product_collection' );\n \n foreach ($products->getItems() as $key => $_product){\n $arr_categoryids[$key] = $_product->getCategoryIds();\n \n if($this->_config['catsid']){ \n if(stristr($this->_config['catsid'], ',') === FALSE) {\n $arr_catsid[$key] = array(0 => $this->_config['catsid']);\n }else{\n $arr_catsid[$key] = explode(\",\", $this->_config['catsid']);\n }\n \n $return[$key] = $this->inArray($arr_catsid[$key], $arr_categoryids[$key]);\n }\n }\n \n foreach ($return as $k => $v){ \n if($v==1) $pids[] = $k;\n } \n \n return $pids; \n }", "function process_products_selections()\n\t{\n\t\t$product_ids = $this->input->post('products_lookup_ids');\n\t\t$products = $this->products_model->get_product_selections($product_ids)->result();\n\t\techo json_encode($products);\n\t}", "public function getRelatedProductIds()\n {\n if (!$this->hasRelatedProductIds()) {\n $ids = array();\n foreach ($this->getRelatedProducts() as $product) {\n $ids[] = $product->getId();\n }\n $this->setRelatedProductIds($ids);\n }\n return $this->getData('related_product_ids');\n }", "public function loadProductAttributeValues($productIds = array())\n {\n $selects = [];\n $storeId = $this->getIndex()->getStoreId();\n $storeIds = array(0, $storeId);\n \n $connection = $this->_attributeCollection->getConnection();\n \n $attributeTables = array();\n $attributesMap = array();\n \n $this->_dataProductAttributeValues = array();\n \n $attributesWithSelect = array();\n $attributesWithMultipleSelect = array();\n \n $productSearchWeightAttributes = $this->getProductAttrCodeUseForSearchWeight();\n if (!empty($productSearchWeightAttributes)) {\n $productSearchWeightAttributes = explode(',', $productSearchWeightAttributes);\n $conditions = 'main_table.attribute_code IN (?)';\n $this->_attributeCollection->getSelect()->orWhere($conditions, $productSearchWeightAttributes);\n }\n \n foreach ($this->_attributeCollection as $attribute) {\n $this->_dataProductAttributeData[$attribute->getAttributeCode()] = $attribute;\n $this->_dataProductAttributeData[$attribute->getAttributeId()] = $attribute;\n if (!$attribute->isStatic()) {\n //Collect attributes with frontendInput is select\n if ($attribute->getFrontendInput() == 'select') {\n //Ignore attribute has source model, those attributes will load option from source model\n $attributesWithSelect[$attribute->getAttributeId()] = $attribute->getBackend()->getTable();\n }\n //Collect attributes with frontendInput is multiple select\n if ($attribute->getFrontendInput() == 'multiselect') {\n $attributesWithMultipleSelect[$attribute->getAttributeId()] = $attribute->getBackend()->getTable();\n }\n $attributeTables[$attribute->getBackend()->getTable()][] = $attribute->getAttributeId();\n $attributesMap[$attribute->getAttributeId()] = $attribute->getAttributeCode();\n }\n }\n \n $productEntityLinkField = $this->getProductEntityLinkField();\n \n $index = 1;\n if (count($attributeTables)) {\n $attributeTables = array_keys($attributeTables);\n foreach ($productIds as $productId) {\n foreach ($attributeTables as $attributeTable) {\n $alias = 't'.$index;\n $aliasEntity = 'tf'.$index;\n $select = $connection->select()\n ->from(\n [$alias => $attributeTable],\n [\n 'value' => $alias.'.value',\n 'attribute_id' => $alias.'.attribute_id'\n ]\n )->joinInner(\n [$aliasEntity => 'catalog_product_entity'],\n \"{$alias}.{$productEntityLinkField} = {$aliasEntity}.{$productEntityLinkField}\",\n [\n 'product_id' => $aliasEntity.'.entity_id'\n ]\n )\n ->where($aliasEntity.'.entity_id = ?', $productId)\n ->where($alias.'.store_id' . ' IN (?)', $storeIds)\n ->order($alias.'.store_id' . ' DESC');\n $index++;\n $selects[] = $select;\n }\n }\n \n //Please be careful here Because $unionSelect can be nothing that is the reason for fetchAll throw error\n if (count($selects) > 0) {\n $unionSelect = new \\Magento\\Framework\\DB\\Sql\\UnionExpression(\n $selects,\n \\Magento\\Framework\\DB\\Select::SQL_UNION_ALL\n );\n \n foreach ($connection->fetchAll($unionSelect) as $attributeValue) {\n if (array_key_exists($attributeValue['attribute_id'], $attributesMap)) {\n $pId = $attributeValue['product_id'];\n $attrId = $attributeValue['attribute_id'];\n \n $this->_dataProductAttributeValues[$pId][$attributesMap[$attrId]] = $attributeValue['value'];\n \n //Collect data for attribute has options like select/multiple select\n if (in_array($attrId, array_keys($attributesWithSelect))) {\n //This function call may cause performance issue - need better way\n //load attribute option labels for autocomplete only, if laod attribute it may cause performance issue\n if ($this->_isAttributeRequiredToLoadOptionLabel($attrId)) {\n $attributeValue['option_label'] = $this->_getAttributeOptionLabels(\n $connection,\n $attrId,\n $attributeValue['value'],\n $storeIds\n );\n }\n \n $this->_dataProductAttributeValuesOptions[$pId][$attributesMap[$attrId]] = array($attributeValue['value']);\n }\n if (in_array($attrId, array_keys($attributesWithMultipleSelect))) {\n $this->_dataProductAttributeValuesOptions[$pId][$attributesMap[$attrId]] = explode(',', $attributeValue['value']);\n //This function call may cause performance issue - need better way\n //load attribute option labels for autocomplete only, if laod attribute it may cause performance issue\n if ($this->_isAttributeRequiredToLoadOptionLabel($attrId)) {\n $attributeValue['option_label'] = $this->_getAttributeOptionLabels(\n $connection,\n $attrId,\n explode(',', $attributeValue['value']),\n $storeIds\n );\n }\n }\n //TODO: for multiple select\n if (isset($attributeValue['option_label'])) {\n $this->_dataProductAttributeValuesOptionsLabels[$pId][$attributesMap[$attrId]] = $attributeValue['option_label'];\n }\n }\n }\n }\n }\n \n return $this;\n }", "private function product_batch()\n\t{\n\t\t// add call to trigger datagrab here\n\t\t//file_get_contents(ee()->config->item('base_url') . '?ACT=25&id=9');\n\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\t\t$update_count = ee()->sync_db->count_all_results('products');\n\n\t\tif($update_count > 0)\n\t\t{\t\n\t\t\t// create curl resource \n\t $ch = curl_init(); \n\n\t // set url \n\t curl_setopt($ch, CURLOPT_URL, ee()->config->item('base_url') . '?ACT=25&id=' . ee()->config->item('integration_product_import_id')); \n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); \n\t curl_setopt($ch, CURLOPT_TIMEOUT, 300); \n\t curl_exec($ch); \n\t curl_close($ch);\n \t}\n\t}", "private function exportProducts(){\n Product::initStore($this->store_settings->store_name, config('shopify.api_key'), $this->store_settings->access_token);\n $products_count = Product::count();\n $products_per_page = 250;\n $number_of_pages = ceil($products_count/$products_per_page);\n $all_products = [];\n $products = [];\n //to init start time\n ShopifyApiThrottle::init();\n for( $page = 1; $page <= $number_of_pages; $page++ ){\n //wait for some time so it doesn't reach throttle point\n if( $page > 1 ){ ShopifyApiThrottle::wait(); }\n\n $products = Product::all([\n 'limit' => $products_per_page,\n 'page' => $page\n ]);\n if($products)\n $all_products = array_merge($all_products, $products);\n //to re-init start time\n ShopifyApiThrottle::init();\n }\n return $all_products;\n }", "function load_product_info()\n {\n if (self::get_total_number_of_courses() > 0) {\n //cycle through course(s), load productInfo if available\n foreach ($this->courses as $key => $course) {\n $this->courses[$key] = array_merge($course,$this->get_product_info($course['course_id']));\n foreach ($course['modules'] as $module){\n $course['modules'][$module['module_id']]['product_info'] = $this->get_product_info($module['module_id']);\n }\n }\n }\n }", "public function GetProducts() {\n \n //set up the query\n $this->sql = \"SELECT *\n FROM products\";\n \n //execute the query\n $this->RunBasicQuery();\n }", "public function execute_and_get_ids()\n {\n }", "private function setupProducts()\n {\n $products = [\n ['name' => 'Product 1'],\n ['name' => 'Product 2'],\n ['name' => 'Product 3'],\n ['name' => 'Product 4'],\n ];\n\n $container = $this->setupData($products, Product::class);\n\n $this->products = $container;\n }", "public function ajaxProcessGetAutocompleteProducts()\n {\n $query = Tools::getValue('q', false);\n if (!$query or $query === '' || strlen($query) < 2) {\n die();\n }\n\n $sql = 'SELECT p.`id_product`, p.`reference`, pl.`name`\n\t\tFROM `'._DB_PREFIX_.'product` p\n\t\t'.Shop::addSqlAssociation('product', 'p').'\n\t\tLEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.id_product = p.id_product \n\t\t AND pl.id_lang = '.(int)$this->context->language->id.\n Shop::addSqlRestrictionOnLang('pl').'\n )\n WHERE pl.`name` LIKE \"%'.pSQL($query).'%\" \n OR p.`reference` LIKE \"%'.pSQL($query).'%\" \n OR p.`id_product` LIKE \"%'.pSQL($query).'%\"\n\t\tGROUP BY p.id_product';\n\n $products = Db::getInstance()->executeS($sql);\n\n $results = array();\n foreach ($products as $product) {\n $results[] = '['.$product['reference'].'] '.$product['name'].'|'.$product['id_product'];\n }\n\n /**\n * Result:\n *\n * Product|ID\n * Next Product|ID\n * ...\n */\n die(implode(PHP_EOL, $results));\n }", "public function getItemIds();", "private function load($id = null) {\n\n if (!is_null($id)) {\n\n return $this->search->getProduct($id);\n\n }\n\n return $this->search->getProducts($this->filters);\n\n }", "function getClosetProductsValues($arrproductId)\n\t{\n\t\t$query = \"SELECT pd.* , cl.name AS client_name, cl.id AS client_id FROM `products` AS pd \n\t\tLEFT JOIN `client` AS cl ON cl.id = pd.client_id WHERE pd.pd_id IN (\".$arrproductId.\")\";\n\t\t$result = $this->selectQueryForAssoc($query);\n\t\treturn $result;\n\t}", "function getProducts()\n {\n $ret = array();\n foreach ($this->getItems() as $item)\n if ($item->item_type == 'product')\n if ($pr = $item->tryLoadProduct())\n $ret[] = $pr;\n return $ret;\n }", "function ciniki_merchandise_web_productLoad($ciniki, $tnid, $args) {\n \n $strsql = \"SELECT ciniki_merchandise.id, \"\n . \"ciniki_merchandise.uuid, \"\n . \"ciniki_merchandise.name, \"\n . \"ciniki_merchandise.permalink, \"\n . \"ciniki_merchandise.flags, \"\n . \"ciniki_merchandise.primary_image_id, \"\n . \"'' AS primary_image_caption, \"\n . \"ciniki_merchandise.synopsis, \"\n . \"ciniki_merchandise.description \"\n . \"FROM ciniki_merchandise \"\n . \"WHERE ciniki_merchandise.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n if( isset($args['permalink']) && $args['permalink'] != '' ) {\n $strsql .= \"AND ciniki_merchandise.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['permalink']) . \"' \";\n } elseif( isset($args['id']) && $args['id'] > 0 ) {\n $strsql .= \"AND ciniki_merchandise.id = '\" . ciniki_core_dbQuote($ciniki, $args['id']) . \"' \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.27', 'msg'=>'No product specified'));\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.merchandise', 'product');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.28', 'msg'=>'Product not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['product']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.29', 'msg'=>'Unable to find Product'));\n }\n $product = $rc['product'];\n\n //\n // Get the images\n //\n if( isset($args['images']) && $args['images'] == 'yes' ) {\n $strsql = \"SELECT id, \"\n . \"name AS title, \"\n . \"permalink, \"\n . \"flags, \"\n . \"image_id, \"\n . \"description \"\n . \"FROM ciniki_merchandise_images \"\n . \"WHERE product_id = '\" . ciniki_core_dbQuote($ciniki, $product['id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.merchandise', array(\n array('container'=>'images', 'fname'=>'id', 'fields'=>array('id', 'title', 'permalink', 'flags', 'image_id', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['images']) ) {\n $product['images'] = $rc['images'];\n } else {\n $product['images'] = array();\n }\n if( $product['primary_image_id'] > 0 ) {\n $found = 'no';\n foreach($product['images'] as $image) {\n if( $image['image_id'] == $product['primary_image_id'] ) {\n $found = 'yes';\n }\n }\n if( $found == 'no' ) {\n array_unshift($product['images'], array('title'=>'', 'flags'=>1, 'permalink'=>$product['uuid'], 'image_id'=>$product['primary_image_id'], 'description'=>''));\n }\n }\n }\n\n return array('stat'=>'ok', 'product'=>$product);\n}", "function get_product_ids($voucher_id)\n\t{\n\t\t$this->db->select('product_id');\n\t\t$this->db->where('voucher_id', $voucher_id);\n\t\t$res = $this->db->get('vouchers_products')->result_array();\n\n\t\t$list = array();\n\t\tforeach($res as $item)\n\t\t{\n\t\t\tarray_push($list, $item[\"product_id\"]);\t\n\t\t}\n\t\treturn $list;\n\t}", "public function allProducts()\r\n {\r\n // left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n // left join mshop_media as mm on mm.id = mpl.refid\r\n // left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n // where mpl.pos = 0 and mpl.domain in ('media','price')\";\r\n $qry1 = \"select mp.id as product_id, mp.code as product_code, mp.label as product_name, mm.preview as image_url from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left join mshop_media as mm on mm.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('media')\";\r\n $qry2 = \"select mp.id as product_id, mp.label as product_name, mpri.value as product_price from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('price')\";\r\n $products1 = DB::select($qry1);\r\n $products2 = DB::select($qry2); \r\n $i = 0;\r\n foreach($products1 as $products) {\r\n foreach($products2 as $product) {\r\n if($product->product_id === $products->product_id) {\r\n $products1[$i]->product_price = $product->product_price;\r\n }\r\n }\r\n $i++;\r\n }\r\n return $products1;\r\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function getIdentities(){\n return [self::CACHE_TAG.'_'.$this->getProductId()];\n }", "public function find($id = 0)\n {\n\n $sql = 'SELECT products.id , product_name, categories.category_name, product_sku FROM `products`\n INNER JOIN product_properties_values on product_properties_values.id_product = products.id\n INNER JOIN categories on categories.id = product_properties_values.property_value\n WHERE products.id = ?';\n\n $sqlData = [(int)$id];\n $app = Application::instance();\n $product['header'] = $this->catalog = $app->db()->getArrayBySqlQuery($sql,$sqlData);\n\n /*$sql = 'SELECT products.product_name, products.product_price, products.product_sku FROM products\n WHERE products.id_parent_product ='. (int)$id\n ;*/\n\n\n $sql = 'SET @SQL = NULL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SELECT\n GROUP_CONCAT(DISTINCT\n CONCAT(\\'GROUP_CONCAT(IF(pr.product_property_name = \\\"\\', pr.`product_property_name`, \\'\\\", pp.property_value, NULL)) AS \\', pr.`product_property_name`)\n ) INTO @SQL\n FROM product_properties AS pr';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SET @SQL = CONCAT(\\'SELECT p .*, \\', @SQL, \\'\n FROM products AS p\n LEFT JOIN product_properties_values AS pp ON (p.id = pp.id_product)\n LEFT JOIN product_properties AS pr ON (pr.id = pp.id_property)\n WHERE p.id_parent_product =' . (int)$id . '\n AND deleted is NULL\n GROUP BY p.id ;\\')';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'PREPARE stmt FROM @SQL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'EXECUTE stmt';\n $product['list'] = $app->db()->getArrayBySqlQuery($sql);\n $sql = 'DEALLOCATE PREPARE stmt';\n $app->db()->getArrayBySqlQuery($sql);\n\n foreach ($product['list'] as $key => $good) {\n $product['list'][$key]['Photo'] = explode(',', $product['list'][$key]['Photo']);\n }\n\n\n $this->product = $product;\n\n\n return $this->product;\n }", "public function fetchByIds(Request $request)\n {\n $input = $request->input();\n $validator = Validator::make($input, Product::$fetchByIdsRules);\n\n if($validator->fails()){\n return $this->sendError(BaseAPI::handelValidationErrors($validator->errors()));\n }\n\n $products = $this->productRepository->fetchByIds($input['products']);\n\n return $this->sendResponse(ProductResource::toLiteArray($products, $this->language), trans('product.messages.retrieved'));\n }", "protected function _loadCategoryIds($productIds)\n {\n $tableName = $this->_categoryResource->getTable('catalog_category_product_index_replica');\n //$tableName = $this->tableMaintainer->getMainTable($this->getIndex()->getStoreId());\n \n $select = $this->_categoryResource->getConnection()->select()->distinct()->from(\n $tableName,\n ['product_id', 'category_id', 'position']\n )->where(\n 'product_id IN(?) AND is_parent = 1',\n $productIds\n )->where(\n 'store_id = ?',\n $this->getIndex()->getStoreId()\n )->where(\n 'visibility != ?',\n \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_NOT_VISIBLE\n );\n \n $rows = $this->_categoryResource->getConnection()->fetchAll($select);\n \n foreach ($rows as $productCategoryData) {\n $pId = $productCategoryData['product_id'];\n $this->_dataProductCategoryIds[$pId][] = $productCategoryData['category_id'];\n $position = $productCategoryData['position'];\n $this->_dataProductCategoryPositions[$pId][$productCategoryData['category_id']] = $position;\n }\n \n return $this;\n }", "public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }", "public static function getIdsInUse() {\n global $wpdb;\n $products = Cart66Common::getTableName('products');\n $sql = \"SELECT gravity_form_id as gfid from $products where gravity_form_id > 0\";\n $ids = $wpdb->get_col($sql);\n return $ids;\n }", "public function adminproducts($product_id){\n\t\t\n\t\t\n\t\n\t\t$this->product_req = $product_id[0];\n\t\t$this->get_products();\n\t\t\n\t}", "public function ProductosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getProductsByUserId($id)\n {\n if($id==0){\n $product = UserProduct::distinct()->pluck('product_id');\n }else{\n $product = UserProduct::where(\"user_id\",$id)->distinct()->pluck('product_id');\n }\n\n if (count($product)>0){\n $res['product_ids']=$product;\n return response()->json(['status_code' => 200, 'message' => 'product list', 'data' => $res]);\n\n }else{\n return response()->json(['status_code' => 404, 'message' => 'Record not found']);\n }\n\n }", "function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}", "public function set_convention_variation_ids_transient() : array {\n\t\t$all_conventions_query_args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'product',\n\t\t\t'fields' => 'ids',\n\t\t\t'tax_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery -- since this isn’t run on any frontend page load.\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'product_cat',\n\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t'terms' => 'registration',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$all_conventions = new WP_Query( $all_conventions_query_args );\n\n\t\t// Loop through results and add IDs to an array.\n\t\t$all_convention_ids = array();\n\t\tif ( $all_conventions->have_posts() ) {\n\t\t\twhile ( $all_conventions->have_posts() ) {\n\t\t\t\t$all_conventions->the_post();\n\t\t\t\t$all_convention_ids[] = get_the_ID();\n\t\t\t}\n\t\t}\n\t\twp_reset_postdata();\n\n\t\tset_transient( 'ghc-all-convention-variation-ids', $all_convention_ids );\n\t\treturn $all_convention_ids;\n\t}", "public function syncProductList()\n {\n // Evaluation only needed for custom product list and product tag\n if (!$this->isCustomList() && !$this->model_type !== ProductTag::class) return;\n\n $product_ids = $this->isCustomList() ? $this->product_ids : $this->getProductQuery()->get('id')->pluck('id')->all();\n\n $this->products()->sync($product_ids);\n }", "public function getCategsProdsIds($id_categ, $id_prod) {\n try{\n $relationid = DB::table('categs_prods')->where('id_categ', '=', $id_categ)->where('id_prod', '=', $id_prod)->get();\n return response()->json(['status' => 1, 'relations by id_categ AND id_prod' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0, 'relations by id_categ AND id_prod' => []], 500);\n }\n }", "public static function count_product_ids() {\r\n\r\n\t\t\tif ( false === $count_product_ids = get_transient( 'cptpro_number_of_product_ids' ) ) {\r\n\r\n\t\t\t\t$count_product_ids = count( YIKES_Custom_Product_Tabs_Pro_Admin::fetch_all_product_ids() );\r\n\r\n\t\t\t\tset_transient( 'cptpro_number_of_product_ids', $count_product_ids, 10 * MINUTE_IN_SECONDS );\r\n\t\t\t}\r\n\r\n\t\t\treturn $count_product_ids;\r\n\t\t}", "protected function _initProductCollection()\n {\n $client = Mage::helper('catalogsearch')->getEngine()->getClient();\n $baseQuery = $this->_getBaseSearchQuery();\n $optimizedQuery = $this->_getOptimizedQuery($baseQuery);\n $baseProductIds = $this->_getProductIdsFromSearchQuery($baseQuery);\n $optimizeProductIds = $this->_getProductIdsFromSearchQuery($optimizedQuery);\n\n $this->setBaseProductIds($baseProductIds);\n $this->setOptimizedProductIds($optimizeProductIds);\n\n $allIds = array_merge($baseProductIds, $optimizeProductIds);\n\n if (empty($allIds)) {\n $allIds = array(0);\n }\n\n $attributes = Mage::getModel('catalog/config')->getProductCollectionAttributes();\n $collection = Mage::getResourceModel('catalog/product_collection')\n ->setStoreId($this->getStoreId())\n ->addIdFilter($allIds)\n ->addAttributeToSelect($attributes)\n ->load();\n\n $this->setProductCollection($collection);\n\n return $this;\n }", "public function getProducts(){\r\n\t\t$query = \"Select * from products\";\r\n\t\treturn $GLOBALS['dbObj']->dbQuery($query);\r\n\t}", "public function getSelectedProducts()\n {\n if (!empty($this->object->products)) {\n $productsIds = explode('|', $this->object->products);\n $sql = 'SELECT p.`id_product`, p.`reference`, pl.`name`\n\t\t\t\tFROM `' . _DB_PREFIX_ . 'product` p\n\t\t\t\t' . Shop::addSqlAssociation('product', 'p') . '\n\t\t\t\tLEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl \n\t\t\t\t ON (p.`id_product` = pl.`id_product` ' . Shop::addSqlRestrictionOnLang('pl') . ')\n\t\t\t\tWHERE pl.`id_lang` = ' . (int)$this->context->language->id . '\n\t\t\t\tAND p.`id_product` IN (' . implode(',', $productsIds) . ')\n\t\t\t\tORDER BY FIELD(p.`id_product`, '.implode(',', $productsIds).')';\n\n return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);\n }\n\n return array();\n }", "public function productRetrieveAll(){\n\t\t$productId\t\t\t=\tself::getUserId();\n\t\t$productTable\t\t=\tself::getUserTable();\n\t\t$joinTable\t\t\t=\tself::getJoinTable();\n\t\t$productArray\t\t=\tself::getUserArray(); //multi dimension array output\t\t\n\t\t$dbFieldArray\t\t=\tarray();\n\t\tforeach($productArray as $prodIndex => $prodVal){\n\t\t\t$dbFieldArray[]\t=\t$productArray[$prodIndex][0]; //Get db fields only from multi dimension array\n\t\t}\t\t\n\t\t$productCond\t\t=\tself::getUserCond();\t\t\n\t\t$retArray\t\t\t=\tself::retrieveEntry($productTable, $dbFieldArray, $joinTable,$productCond);\n\t\t$returnValue \t\t= \tarray();\t\t\t \t \n\t\tforeach ($retArray as $retIndex => $retValue) {\n $$retIndex \t\t= \t$retValue;\n $mainArr \t\t=\texplode('|', $$retIndex);\t\t\t\n\t\t\t$returnValue[] \t= \t$mainArr;\t\t\t\t\t\t \n }\n\t\treturn $returnValue;\n\t}", "function query() {\n $q = new EntityFieldQuery();\n $q->entityCondition('entity_type', 'commerce_product');\n $q->fieldCondition($this->options['flag_field'], 'value', 1);\n $results = $q->execute();\n\n $product_ids = array();\n foreach (reset($results) as $product) {\n $product_ids[] = (int)$product->product_id;\n }\n // Get the allowed products from the current user.\n $user_product_ids = array();\n $user = user_load($GLOBALS['user']->uid);\n if ($user->uid > 0) {\n // Fetch the ids from the current user.\n $products = field_get_items('user', $user, $this->options['user_authorized_products_field']);\n foreach ($products as $product) {\n $user_product_ids[] = (int)$product['target_id'];\n }\n }\n $exclude_ids = array_diff($product_ids, $user_product_ids);\n if (count($exclude_ids) > 0) {\n $this->query->add_where(2, $this->options['node_products_table'] . '.' . $this->options['node_products_column'], $exclude_ids, 'NOT IN');\n }\n }", "public static function loadProductsByCId($p_cId)\n {\n $ret = array();\n\n $sql = \"select * from products where Classify = $p_cId and Quantity >0\";\n $list = DataProviderMain::execQuery($sql);\n\n while ($row = mysqli_fetch_array($list)) {\n $proId = $row[\"ProID\"];\n $proName = $row[\"ProName\"];\n $tinyDes = $row[\"TinyDes\"];\n $fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n $quantity = $row[\"Quantity\"];\n $view = $row[\"NView\"];\n $dayAdd = $row[\"DayAdd\"];\n $catId = $row[\"CatID\"];\n //$catId = $p_catId;\n //$classify = $p_cId;\n\n $p = new Products($proId, $proName, $tinyDes, $fullDes, $price, $quantity, $catId, $view, $dayAdd, $p_cId);\n array_push($ret, $p);\n }\n\n return $ret;\n }", "private function ml_load_prev()\n\t{\n\t\tif ($this->prod_nums)\n\t\t{\n\t\t\t$prods = array();\n\t\t\tfor ($new_prod_num = 0, $prod_count = count($this->prod_nums); $new_prod_num < $prod_count; ++$new_prod_num)\n\t\t\t{\n\t\t\t\t$old_prod_num = $this->prod_nums[$new_prod_num];\n\t\t\t\t$account = product::create_from_post($old_prod_num);\n\t\t\t\t$prods[] = $account;\n\t\t\t}\n\t\t\tcgi::add_js_var('prods', $prods);\n\t\t}\n\t}", "public function availableProductIds($products)\n {\n $available_product_ids = $products->filter(function ($product) {\n return $product->available;\n })->pluck('id')->toArray();\n \n return $available_product_ids;\n }", "private function initialiseProductListCollection()\n {\n $numberOfProductsToShow = $this->helper->getNumberOfProductsToShow();\n if ($numberOfProductsToShow) {\n $this->productCollection\n ->addAttributeToSelect('*')\n ->addAttributeToFilter(InstallData::PRODUCT_LIST_ATTRIBUTE, 1)\n ->setPageSize($numberOfProductsToShow)\n ->load();\n } else {\n $this->productCollection\n ->addFieldToFilter('entity_id', 0)\n ->load();\n }\n }", "public function getLoadedProductCollection() {\r\n return $this->getProducts();\r\n }", "protected function getProductLoadId()\n {\n $product = $this->locator->getProduct();\n if (method_exists($product, 'getData')) {\n return $product->getData($this->getProductLinkField());\n }\n }", "public function import_products() {\n\n\t\t// Make sure this was triggered by a real person\n\t\tif ( ! check_admin_referer( 'amazon_product_import') ) {\n\t\t\twp_die( \n\t\t\t\t__( 'Invalid nonce specified', $this->plugin_name ), \n\t\t\t\t__( 'Error', $this->plugin_name ), \n\t\t\t\t[\n\t\t\t\t\t'response' \t=> 403,\n\t\t\t\t\t'back_link' => 'admin.php?page=' . $this->plugin_name,\n\t\t\t\t]\n\t\t\t);\n\t\t\texit;\n\t\t}\n\n\t\t// Get a list of all the product IDs that we want to update\n\t\t$products = $this->collect_product_identifiers();\n\n\t\t// If we have some IDs\n\t\tif ( !empty($products) ) {\n\n\t\t\t// Lets fetch the updates from Amazon via the SDK\n\t\t\t$updates = $this->fetch_items($products);\n\n\t\t\t// Remove the error key in the array\n\t\t\t$errors = $updates['error'];\n\t\t\tunset($updates['error']);\n\n\t\t\tif ( !empty($updates) && count($errors) === 0 ) {\n\t\t\t\t// Now lets update our DB with the new information\n\t\t\t\t$this->update_items($updates);\n\n\t\t\t\t// Finally lets throw up a confirmation box to the user and redirect\n\t\t\t\twp_redirect( admin_url( 'admin.php?page=amazon-product-import%2Fadmin%2Fpartials%2Famazon-product-import-admin-display.php&success=true' ) );\n exit;\n\t\t\t}\n\t\t\telse if (count($errors) > 0) {\n\t\t\t\t// Store the errors in a transient\n\t\t\t\tset_transient( 'amazon-import-errors', $errors, MINUTE_IN_SECONDS );\n\t\t\t\t// Finally lets throw up an error box to the user and redirect\n\t\t\t\twp_redirect( admin_url( 'admin.php?page=amazon-product-import%2Fadmin%2Fpartials%2Famazon-product-import-admin-display.php&success=false' ) );\n exit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// No updates\n\t\t\t\t// Finally lets throw up a confirmation box to the user and redirect\n\t\t\t\twp_redirect( admin_url( 'admin.php?page=amazon-product-import%2Fadmin%2Fpartials%2Famazon-product-import-admin-display.php&success=true' ) );\n exit;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// No products to import\n\t\t\t// Finally lets throw up a confirmation box to the user and redirect\n\t\t\twp_redirect( admin_url( 'admin.php?page=amazon-product-import%2Fadmin%2Fpartials%2Famazon-product-import-admin-display.php&success=true' ) );\n\t\t\texit;\n\t\t}\n\n\t\n\t}", "public function DetalleProductosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "private function _generateProductsData(){\n \n $products = $this->context->cart->getProducts();\n $pagseguro_items = array();\n \n $cont = 1;\n \n foreach ($products as $product) {\n \n $pagSeguro_item = new PagSeguroItem();\n $pagSeguro_item->setId($cont++);\n $pagSeguro_item->setDescription(Tools::truncate($product['name'], 255));\n $pagSeguro_item->setQuantity($product['quantity']);\n $pagSeguro_item->setAmount($product['price_wt']);\n $pagSeguro_item->setWeight($product['weight'] * 1000); // defines weight in gramas\n \n if ($product['additional_shipping_cost'] > 0)\n $pagSeguro_item->setShippingCost($product['additional_shipping_cost']);\n \n array_push($pagseguro_items, $pagSeguro_item);\n }\n \n return $pagseguro_items;\n }", "private function getProductsData($products_id)\n\t{\n \t$currency = Shopware()->Db()->fetchOne(\"SELECT c.currency FROM s_core_currencies c INNER JOIN s_core_shops s ON c.id = s.currency_id\"); \n\n $product = Shopware()->Modules()->Articles()->sGetArticleById($products_id);\n \n if (is_array($product[sConfigurator]))\n\t\t{\n $variants = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\taa.id as articledetail, acg.name as groupname, aco.name as valuename, acor.option_id as optionid\n \t\t\t\t\t\t\t\tFROM s_article_configurator_option_relations acor\n \t\t\t\t\t\t\t\tINNER JOIN s_articles_details aa ON acor.article_id = aa.id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_options aco ON aco.id = acor.option_id\n \t\t\t\t\t\t\t\tINNER JOIN s_article_configurator_groups acg ON acg.id = aco.group_id\n \t\t\t\t\t\t\t\tWHERE aa.articleID =\".$products_id);\n $variant_prods = array();\n\n foreach ($variants as $variantkey => $variantval)\n\t\t\t{\n $variant_prods[$variantval['articledetail']][$variantval['groupname']]=$variantval['valuename'];\n\n $images = Shopware()->Db()->fetchAll(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tm.* \n \t\t\t\t\t\t\t\tFROM s_articles_img ai\n \t\t\t\t\t\t\t\tINNER JOIN s_media m ON m.id = ai.media_id\n \t\t\t\t\t\t\t\tWHERE ai.id IN (\n \t\t\t\t\t\t\t\tSELECT ai2.parent_id\n \t\t\t\t\t\t\t\tFROM s_articles_img ai2 \n \t\t\t\t\t\t\t\tWHERE ai2.article_detail_id = \".$variantval['articledetail'].\"\n \t\t\t\t\t\t\t)\");\n\t\t\t\t\n if (count($images) > 0)\n\t\t\t\t{\n foreach($images as $imagekey=>$imageval)\n\t\t\t\t\t{\n $imagepath = 'http://'.Shopware()->Shop()->getHost();\n $imagepath .= Shopware()->Shop()->getBaseUrl().'/';\n $variant_prods[$variantval['articledetail']]['image_url'] = $imagepath.$imageval['path'];\n }\n } else {\n $variant_prods[$variantval['articledetail']]['image_url'] = $product['image']['src']['original'];\n }\n }\n\n ksort($variant_prods);\n $variant_prods_array=array();\n\n foreach($variant_prods as $variantprodskey => $variantprodsval)\n\t\t\t{\n foreach($variantprodsval as $ikey => $ival)\n\t\t\t\t{\n if ($ikey != 'image_url')\n\t\t\t\t\t{\n $variant_prods_array_inner[$ikey] = $ival;\n }\n }\n $variant_prods_array_inner['image_url'] = $variantprodsval['image_url'];\n $variant_prods_array[] = $variant_prods_array_inner;\n }\n }\n\n $rewrite_path = Shopware()->Db()->fetchOne(\"SELECT path FROM s_core_rewrite_urls WHERE org_path = 'sViewport=detail&sArticle=\".$products_id.\"'\");\n \n $rewrite_url = $this->Front()->Router()->assemble(array('module' => 'frontend', 'controller' => 'index'));\n $rewrite_url .= $rewrite_path;\n\n if ($product['sUpcoming'] == 0)\n\t\t{\n if ($product['laststock'] == 1)\n\t\t\t{\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'out of stock';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n\n } else {\n if ($product['instock'] <= 0)\n\t\t\t\t{\n $availibility = 'available for order';\n } elseif($product['instock'] > 0) {\n $availibility = 'in stock';\n }\n }\n } else {\n $availibility = 'preorder';\n }\n\n $prod_cats = Shopware()->Db()->fetchAll(\"SELECT categoryID FROM s_articles_categories WHERE articleID = \".$products_id);\n $prod2cats = array();\n\t\t\n foreach ($prod_cats as $catkey => $catval)\n\t\t{\n $prod2cats[] = $catval['categoryID'];\n }\n\t\t\n\t\t$price = floatval(str_replace(',','.',$product['price']));\n\t\t$pseudoprice = (isset($product['pseudoprice']) && $product['pseudoprice'] > 0) ? floatval(str_replace(',','.',$product['pseudoprice'])) : $price;\n\t\t$discout_absolute = ($pseudoprice > $price) ? ($pseudoprice - $price) : 0;\n\n $prod_shipping_array = $this->getShippingArray($product);\n $jsonproductarray = array(\n 'id' => $product['articleID'],\n 'name' => $product['articleName'],\n 'image_url' => $product['image']['src']['original'],\n 'condition' => 'new',\n 'categories' => $prod2cats,\n 'availability' => $availibility,\n 'price' => $price,\n\t\t\t'rrp' => floatval($pseudoprice),\n\t\t\t'discount_absolute' => $discout_absolute, \n 'url' => $rewrite_url,\n 'description' => $product['description_long'],\n 'currency' => $currency,\n 'shipping' => $prod_shipping_array,\n 'margin' => 0.56,\n 'gtin' => $product['ean'],\n\t\t\t'brand' => $product['supplierName'],\n\t\t\t'mpn' => $product['ordernumber']\n );\n\t\t\n if (count($variant_prods_array) > 0)\n\t\t{\n $jsonproductarray['variants'] = $variant_prods_array;\n }\n\t\t\n $products_data = $jsonproductarray;\n return $products_data;\n }", "public static function readAllId() {\n try {\n $database = SModel::getInstance();\n $query = \"select id from producteur\";\n $statement = $database->prepare($query);\n $statement->execute();\n $results = array();\n while ($tuple = $statement->fetch()) {\n $results[] = $tuple[0];\n }\n return $results;\n } catch (PDOException $e) {\n printf(\"%s - %s<p/>\\n\", $e->getCode(), $e->getMessage());\n return NULL;\n }\n }", "private function _getProductIdsFromSearchQuery($query)\n {\n $ids = array();\n $client = Mage::helper('catalogsearch')->getEngine()->getClient();\n $response = $client->search($query);\n foreach ($response['hits']['hits'] as $hit) {\n $currentId = $hit['fields']['entity_id'];\n if (is_array($currentId)) {\n $currentId = current($currentId);\n }\n $ids[] = (int) $currentId;\n }\n return $ids;\n }", "public function purchasedProductsAutocomplete()\n\t{\n\t\t$purchase_data = $this->purchase->viewPurchaseProduct($purchase_id);\n\t}", "public function getProductIds($sku)\n\t{\n\t\t$tname=$this->tablename(\"catalog_product_entity\");\n\t\t$result=$this->selectAll(\n\t\t\"SELECT sku,entity_id as pid,attribute_set_id as asid FROM $tname WHERE sku=?\",\n\t\t$sku);\n\t\tif(count($result)>0)\n\t\t{\n\t\t\treturn $result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private function getOldProductIds($shopId) {\n \n return $this->_Product->find('list', array(\n 'conditions' => array('Product.shop_id' => $shopId),\n 'fields' => array('id'),\n 'cache' => false\n ));\n }", "public static function loadMultiple(array $ids = NULL);", "function getID(){ return (int)$this->productInfo['products_id']; }", "public function preloadIds()\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$keys = (array)func_get_arg(1);\n\t\t} else {\n\t\t\t$keys = func_get_args();\n\t\t}\n\n\t\tforeach ($keys as &$k) {\n\t\t\tif (!array_key_exists($k, $this->loaded)) {\n\t\t\t\t$k = $this->id_prefix . $k;\n\t\t\t} else {\n\t\t\t\t$k = 0;\n\t\t\t}\n\t\t}\n\t\tunset($k);\n\n\t\t$keys = Arrays::removeFalsey($keys);\n\t\tif (!$keys) {\n\t\t\treturn;\n\t\t}\n\n\t\t$keys_in = \"'\" . implode(\"','\", $keys) . \"'\";\n\n\t\t$date = date('Y-m-d H:i:s');\n\n\t\ttry {\n\t\t\t$records = $this->db->fetchAll(\"\n\t\t\t\tSELECT id, data\n\t\t\t\tFROM cache\n\t\t\t\tWHERE id IN ($keys_in) AND (date_expire IS NULL OR date_expire > ?)\n\t\t\t\", array($date));\n\t\t} catch (\\Exception $e) {\n\t\t\t$records = array();\n\t\t\tif (!$this->silence_exceptions) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\n\t\t$got_keys = array();\n\t\tforeach ($records as $rec) {\n\t\t\t$got_keys[$rec['id']];\n\t\t\t$this->loaded[$rec['id']] = $rec['data'];\n\t\t}\n\n\t\t// Fill loaded with nulls for keys we know are missing\n\t\tif (count($got_keys) != count($keys)) {\n\t\t\t$missing_keys = array_diff($keys, $got_keys);\n\t\t\tforeach ($missing_keys as $k) {\n\t\t\t\t$this->loaded[$k] = null;\n\t\t\t}\n\t\t}\n\t}", "public function get_all_product_information () {\n $this->json_source_file = file_get_contents(\"products.json\");\n $this->json_source_array = json_decode($this->json_source_file,true);\n\n }", "public function getProducts() {\n\n $dbData = new DBData();\n $array_products = [];\n foreach ($this->items as $item) {\n $array_products[] = $dbData->getProductDetails($item['id']);\n }\n return $array_products;\n }", "function get_products_with_attributes() {\n global $db;\n if(isset($_SESSION['languages_id'])){ $language_id = (int)$_SESSION['languages_id'];} else { $language_id=1;}\n $query = 'SELECT DISTINCT attrib.products_id, description.products_name, products.products_quantity, products.products_model, products.products_image\n FROM '.TABLE_PRODUCTS_ATTRIBUTES.' attrib, '.TABLE_PRODUCTS_DESCRIPTION.' description, '.TABLE_PRODUCTS.' products\n WHERE attrib.products_id = description.products_id AND\n attrib.products_id = products.products_id AND \n description.language_id='.$language_id.' \n ORDER BY description.products_name ';\n $products = $db->Execute($query);\n while(!$products->EOF){\n $products_array[] = $products->fields['products_id'];\n $products->MoveNext();\n }\n return $products_array;\n }", "public function setProductIds(array $product_ids): self\n {\n $this->product_ids = $product_ids;\n return $this;\n }", "public function productVendorLoad()\n\t{\n\t\t$product_id = $this->request->input('product_id');\n\t\t$locality_change_val = $this->request->input('locality_change_val');\n\t\t$selectVendorLocationIdQuery = DB::select(\"SELECT vendor_location_id\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM product_vendor_locations\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE product_id = '$product_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND id = '$locality_change_val'\");\n\n\t\t$selectVendorLocationId = $selectVendorLocationIdQuery[0]->vendor_location_id;\n\t\techo '<input type=\"hidden\" id=\"locality_val\" value=\"'.$selectVendorLocationId.'\">';\n\t}", "public function getAllProductTypeIds()\n {\n if (!isset($this->_allProductTypeIds)) {\n $this->_allProductTypeIds = [];\n\n foreach ($this->getAllProductTypes() as $productType) {\n $this->_allProductTypeIds[] = $productType->id;\n }\n }\n\n return $this->_allProductTypeIds;\n }" ]
[ "0.75926644", "0.6946737", "0.6784998", "0.6706732", "0.66771084", "0.650772", "0.6366523", "0.6363891", "0.62138385", "0.62004817", "0.6185207", "0.6165851", "0.6115681", "0.6069764", "0.60652304", "0.6040059", "0.60287154", "0.602094", "0.5949948", "0.5938743", "0.58996004", "0.587704", "0.58574075", "0.58556885", "0.58104056", "0.5802845", "0.5799981", "0.5794661", "0.5788333", "0.57682174", "0.5765894", "0.5764454", "0.57576185", "0.57461244", "0.5735149", "0.57340616", "0.5724327", "0.5715222", "0.5711316", "0.57076627", "0.57062423", "0.570523", "0.56984633", "0.5694377", "0.56852937", "0.5682012", "0.5678819", "0.5676218", "0.5664296", "0.5655981", "0.5655981", "0.5655981", "0.5655981", "0.5655981", "0.5655981", "0.5655981", "0.5655981", "0.56510717", "0.56497645", "0.5638638", "0.5637867", "0.56339043", "0.56326306", "0.5632611", "0.56286854", "0.5613525", "0.56036496", "0.56004024", "0.5599502", "0.5591925", "0.5588448", "0.55820686", "0.55780643", "0.5577991", "0.55771637", "0.5568584", "0.55675304", "0.55579334", "0.55558705", "0.5550753", "0.55500126", "0.55464894", "0.55381614", "0.5536214", "0.55328417", "0.5525338", "0.55194765", "0.5514584", "0.55135536", "0.550339", "0.5501291", "0.5482611", "0.54785115", "0.5475891", "0.54664093", "0.54578155", "0.5456093", "0.5451061", "0.5447199", "0.54427916" ]
0.61335236
12
Get the virtual "root category" to apply for a virtual category, if any.
protected function _getVirtualRootCategory($category) { return Mage::helper('smile_virtualcategories')->getVirtualRootCategory($category); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_virtual_root()\n\t{\n\t\tglobal $DBPrefix, $db;\n\t\t// Virtual root element as parent.\n\t\t$query = \"SELECT right_id FROM \" . $DBPrefix . \"categories ORDER BY right_id DESC LIMIT 1\";\n\t\t$db->direct_query($query);\n\t\t$row = $db->result();\n\t\t$root = array('left_id' => 1, 'right_id' => $row['right_id'], 'level' => -1);\n\t\treturn $root;\n\t}", "function lb_get_root_category($product_id) {\n $prod_terms = get_the_terms( $product_id, 'product_cat' );\n \n foreach ($prod_terms as $prod_term) {\n // gets product cat id\n $product_cat_id = $prod_term->term_id;\n\n // gets an array of all parent category levels\n $product_parent_categories_all_hierachy = get_ancestors( $product_cat_id, 'product_cat' ); \n \n // This cuts the array and extracts the last set in the array\n $last_parent_cat = array_slice($product_parent_categories_all_hierachy, -1, 1, true);\n \n foreach($last_parent_cat as $last_parent_cat_value){\n // $last_parent_cat_value is the id of the most top level category, can be use whichever one like\n }\n }\n \n $category = &get_category((int)$last_parent_cat_value);\n \n if(isset($category->slug)) {\n return $category->slug;\n } else {\n return '';\n } \n}", "public function getRootCategory()\n {\n $value = $this->_config->get('category_settings/root_category');\n\n if ($value === null) {\n $value = 2;\n }\n\n return (int)$value;\n }", "public function getMainCategoryAttribute()\n {\n $mainCategory = 'Uncategorized';\n\n if (! empty($this->terms)) {\n $taxonomies = array_values($this->terms);\n\n if (! empty($taxonomies[0])) {\n $terms = array_values($taxonomies[0]);\n\n $mainCategory = $terms[0];\n }\n }\n\n return $mainCategory;\n }", "function GetRootCategoryid($categoryid)\n{\n global $DB, $pages_md_arr, $pages_parents_md_arr;\n\n if(!empty($pages_parents_md_arr))\n {\n $root_categoryid = 0;\n while(true)\n {\n if(!empty($pages_md_arr[$categoryid]['parentid']))\n {\n $root_categoryid = $categoryid = $pages_md_arr[$categoryid]['parentid'];\n }\n else\n {\n break;\n }\n }\n return $root_categoryid;\n }\n\n if($category_arr = $DB->query_first('SELECT categoryid, parentid FROM {categories} WHERE categoryid = %d',$categoryid))\n {\n if($category_arr['parentid'])\n {\n $root_categoryid = GetRootCategoryid($category_arr['parentid']);\n }\n else\n {\n return $category_arr['categoryid'];\n }\n }\n else\n {\n return 1; // return home category if category not found\n }\n\n return $root_categoryid;\n\n}", "private function getClassCategory($root) {\n\t\treturn \"Science\";\n\t}", "private function getCatParent() {\r\n $rCat = new Read;\r\n $rCat->ExeRead(\"ml_categories\", \"WHERE category_id = :id\", \"id={$this->Data['post_category']}\");\r\n if ($rCat->getResult()):\r\n return $rCat->getResult()[0]['category_parent'];\r\n else:\r\n return null;\r\n endif;\r\n }", "public function getCurrentCategory()\n {\n return $this->category;\n }", "public function get_default_category() {\n return $this->defaultcategory;\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public static function getRootCategories()\n {\n $app = App::getInstance();\n\n $sql = $app['safesql']->query(\n \"SELECT\n\t\t\t\t`id`\n\t\t\tFROM `category`\n\t\t\tWHERE hidden = 0\n\t\t\tAND id > 0\n\t\t\tAND parent IS NULL\n\t\t\tAND deleted = 0\n\t\t\tORDER BY `order` ASC\",\n array());\n $results = $app['db']->get_results($sql);\n $cats = array();\n\n if (!is_null($results)) {\n foreach ($results as $cat) {\n $cats[] = new Category($cat->id);\n }\n }\n return $cats;\n }", "public function getTree() {\n return $this->_buildBranch($this->root_category_id);\n }", "public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }", "public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }", "public function get_category()\n {\n return $this->primary_category();\n }", "public static function getCategoryTree() {\n $catModel = new \\App\\Category();\n $catTree = $catModel->getCategoryTree();\n return $catTree;\n }", "public static function getCategoryTopLevel() {\n\t\t\t$db = Db::getInstance();\n\t\t\t// Regex that grabs all top-level categories using location\n\t\t\t$regexForTopLevel = \"^[0-9]+$\";\n\t\t\t$categoryQuery = $db->prepare('SELECT location, description \n\t\t\t\t\t\t\t\t\t\t\t FROM categories \n\t\t\t\t\t\t\t\t\t\t\tWHERE location REGEXP :regex\n\t\t\t\t\t\t\t\t\t\t ORDER BY location'\n\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t$categoryQuery->execute(array('regex' => $regexForTopLevel));\n\t\t\t$allTopCategories = $categoryQuery->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $allTopCategories;\n\t\t}", "public function getViewedCategory();", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "function get_primary_category($id = 0) {\n\t\n\t$category = get_the_terms($id, 'category');\t\t\n\t$parent_cat = \"\";\n\t\n\tforeach((array) $category as $term) {\n\t\tif($term->slug == \"featured\" || $term->slug == \"spotlight-featured\" || $term->slug == \"spotlight-left\" || $term->slug == \"spotlight-right\") { continue; }\n\t\t\n\t\t// if the first term is parent, return it\n\t\tif($term->parent == 0) {\n\t\t\t$parent_cat = $term;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t// if the category isn't the parent, find the parent\n\t\t\t$parent_cat = get_parent_of_category($term->term_id); \n\t\t}\n\t}\n\t\t\n\treturn $parent_cat;\t\t\n}", "private function getDefaultCategoryId()\n {\n if (null === $this->defaultParentCategoryId) {\n $this->defaultParentCategoryId = $this->storeManager->getStore()->getRootCategoryId();\n }\n return $this->defaultParentCategoryId;\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function getCategory()\n {\n if (!$this->_category) {\n $this->_category = Mage::registry('current_category');\n }\n return $this->_category;\n }", "protected function getRootId()\n {\n return $this->getParam(self::PARAM_USE_NODE)\n ? intval(\\XLite\\Core\\Request::getInstance()->category_id)\n : $this->getParam(self::PARAM_ROOT_ID);\n }", "function getRoot() { return($this->_root); }", "private function _getFirstCategoryLevel()\n\t{\n\t\tif (!$this->_firstCategoryLevel) {\n\t\t\t$this->_firstCategoryLevel = intval($this->getVar('category_first_level', 1));\n\t\t}\n\t\treturn $this->_firstCategoryLevel;\n\t}", "public function getCurrentCat()\n {\n if (empty($this->multifilterSession->getTopCategory()) && empty($this->multifilterSession->getCategories())) {\n $currentCat = $this->coreRegistry->registry('current_category');\n return $currentCat->getId();\n } else {\n return $this->multifilterSession->getTopCategory();\n }\n }", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "public function appCategory()\n {\n return File::get_app_category($this->getExtension());\n }", "public function getRootCategory($storeId)\n {\n $store = $this->storeManager->getStoreById($storeId);\n $categoryId = $store->getRootCategoryId();\n $categories = $this->fetchByIds([$categoryId], $storeId, true);\n if (count($categories)) {\n return $categories->getFirstItem();\n }\n\n return null;\n }", "function acf_location_rule_values_category_ancestor($choices) {\n $terms = acf_get_taxonomy_terms('category');\n if (!empty($terms)) {\n $choices = array_pop($terms);\n }\n return $choices;\n}", "public function getCat()\n {\n return $this->cat = get_the_category($this->id);\n }", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function getCategory()\n {\n return $this->_category;\n }", "public function getCurrentSubcategories()\n {\n return $this->_getHelper()->getCurrentSubcategories();\n }", "public function getDefaultCategory(): string|null;", "public function getRoot()\n {\n return $this->active->geContext()->getCurrentSiteNode();\n }", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public function getRoot();", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "public function getCategory() {\n return $this->category;\n }", "protected function initCategory(): ?Category\n\t{\n\t\treturn (parent::initCategory() ?? $this->factory->createDefaultCategoryIfNotExist());\n\t}", "public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory() {\n return $this->category;\n }", "function get_root()\n\t{ \n\t\t$this->model->where('`'.$this->left_column . '` = 1 ');\n\t\treturn $this->model->find(FALSE,true);\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "protected function _getVirtualRule($category)\n {\n return Mage::helper('smile_virtualcategories')->getVirtualRule($category);\n }", "protected function _getVirtualRule($category)\n {\n return Mage::helper('smile_virtualcategories')->getVirtualRule($category);\n }", "protected function _getVirtualRule($category)\n {\n return Mage::helper('smile_virtualcategories')->getVirtualRule($category);\n }", "public function getRoot()\n\t{\n\t\treturn $this->Root;\n\t}", "public function getRoot()\n {\n return $this->root;\n }", "public function getRoot()\n {\n return $this->root;\n }", "public static function getCategory()\n {\n return self::$category;\n }", "public function getRoot()\n {\n return $this->_root;\n }", "public function getRoot() {\n return $this->root;\n }", "function getRoot() {\n return $this->root;\n }", "abstract public function getRoot() ;", "abstract public function getRoot() ;", "public function getCategory() {}", "public function root()\r\n\t{\r\n\t\treturn $this->root;\r\n\t}", "public function getCategory()\n {\n\n return $this->category;\n }", "function tkno_get_top_category_slug( $return_slug=false, $cat_id=false ) {\n global $post;\n $curr_cat = ( $cat_id ) ? get_category_parents( $cat_id, false, '/', true ) : get_the_category_list( '/' , 'multiple', $post->ID );\n $valid_cats = ( is_outdoors() ) ? array( 'spring', 'summer', 'fall', 'winter', 'trips', 'outdoors' ) : array( 'music', 'food', 'drink', 'things-to-do', 'arts' );\n $curr_cat = explode( '/', $curr_cat );\n $return_cat = array();\n foreach ( $curr_cat as $current ) {\n $current = sanitize_title( strtolower( $current ) );\n if ( in_array( $current, $valid_cats ) ) {\n $return_cat['slug'] = $current;\n if ( $return_slug ) { \n return $current;\n }\n break;\n }\n }\n if ( ! empty( $return_cat['slug'] ) ) { \n $cat_for_name = get_category_by_slug( $return_cat['slug'] );\n $return_cat['cat_name'] = $cat_for_name->name;\n $return_cat['term_id'] = $cat_for_name->term_id;\n return (object) $return_cat;\n } else {\n return false;\n }\n}", "public static function getSponsoredCategory()\n {\n $tableCategory=Category::tableName();\n return CategoriesLevelOne::find()->where([\"$tableCategory.name\"=>'SPONSORED'])->joinWith(['relationParentCategory'])->one();\n }", "public function getCurrentRoot()\n {\n if (null !== $this->getCurrentPage()) {\n return $this->getCurrentPage()->getRoot();\n } elseif (null === $this->getCurrentSite()) {\n return;\n } else {\n return $this->application->getEntityManager()\n ->getRepository('BackBee\\CoreDomain\\NestedNode\\Page')\n ->getRoot($this->getCurrentSite());\n }\n }", "public function buildTree($selected_cat = 0)\n\t{\n\t\t//Save the origin dataset category_id\n\t\t$this->_dataset_stored_category_id = $selected_cat;\n\t\n\t\tif ($selected_cat=='' || $selected_cat==0)\n\t\t{\n\t\t\t$cat_array = array(\n\t\t\t\t\t\t'text'=>'eBay',\n\t\t\t\t\t\t'id'=>'1',\n\t\t\t\t\t\t'path'=>'1',\n\t\t\t\t\t\t'cls'=>'folder active-category',\n\t\t\t\t\t\t'children' => $this->_addChildren(null)\n\t\t\t\t\t\t);\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cat_array = $this->_buildRecursiveTree($selected_cat);\n\t\t}\t\n\t\t\n\t\treturn $cat_array;\t\t\n\t}", "private function getRoot() {\n $statement = $this->getConn()->prepare('SELECT * FROM `' . $this->_table . '` where ' . $this->_parent . ' is null limit 1');\n $statement->execute();\n $root = $statement->fetch();\n return $root;\n }", "function getHomeCategoriesSelect()\n {\n return $this->getCategoryDropDown('frmDoSearch_Keyword_Category', 0, true);\n }", "public function root() {\n return $this->root;\n }", "public function getRoot()\n {\n return $this->parent ? $this->parent->getRoot() : $this;\n }", "public function getCategory();", "public function getCategory();", "public function getRoot() {\n return $this->__root;\n }", "public function getCategory()\n {\n if (array_key_exists(\"category\", $this->_propDict)) {\n if (is_a($this->_propDict[\"category\"], \"\\Beta\\Microsoft\\Graph\\Model\\WindowsMalwareCategory\") || is_null($this->_propDict[\"category\"])) {\n return $this->_propDict[\"category\"];\n } else {\n $this->_propDict[\"category\"] = new WindowsMalwareCategory($this->_propDict[\"category\"]);\n return $this->_propDict[\"category\"];\n }\n }\n return null;\n }", "public function getCat()\n {\n $query = $this->db->get('categories');\n\n return $query->result();\n }", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "function root_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'root_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'root_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so root_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so root_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "public function getIdCategoryDefault(){\n\n /*TODO refactor*/ \n $idDefault = '3';\n\n $rootCategoryId = Mage::app()->getStore(\"default\")->getRootCategoryId() ;\n\n if(isset($rootCategoryId) && $rootCategoryId > 0)\n $idDefault = $rootCategoryId + 1 ;\n\n return $idDefault ;\n }", "public function getRoot() {}" ]
[ "0.71716315", "0.64109856", "0.62641716", "0.59453493", "0.59206754", "0.5819011", "0.57703555", "0.56866693", "0.5681122", "0.56720895", "0.5649985", "0.5642178", "0.5627867", "0.56274354", "0.562678", "0.5600032", "0.5512124", "0.5505646", "0.550227", "0.55016357", "0.5488388", "0.54729855", "0.54691297", "0.54589987", "0.5457847", "0.54407954", "0.542746", "0.53837955", "0.53708935", "0.53568494", "0.53553855", "0.5336692", "0.53204656", "0.53176194", "0.5315669", "0.53025883", "0.52949554", "0.52904344", "0.52881896", "0.5285056", "0.52848923", "0.52848023", "0.5278938", "0.5271691", "0.52714", "0.5270718", "0.5270718", "0.5267991", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.5258229", "0.52449465", "0.5241536", "0.5240447", "0.52368003", "0.52364427", "0.52364427", "0.52364427", "0.5232272", "0.52320045", "0.52320045", "0.52244323", "0.52240866", "0.5220937", "0.52136534", "0.5213497", "0.5213497", "0.5207648", "0.52044", "0.5202909", "0.5196021", "0.5190462", "0.5162091", "0.51559496", "0.5152122", "0.5151621", "0.5148584", "0.51460236", "0.51428497", "0.51428497", "0.51415724", "0.5139472", "0.5131926", "0.513071", "0.5126058", "0.512314", "0.511576" ]
0.71236855
1
Force the virtual rule to be loaded for a category.
protected function _getVirtualRule($category) { return Mage::helper('smile_virtualcategories')->getVirtualRule($category); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }", "private function recreateCategory(): void\n {\n $this->category = $this->categoryFactory->create();\n $this->category->load(2);\n }", "public function forceDeleted(Category $category)\n {\n //\n }", "public function forceDeleted(Category $category)\n {\n //\n }", "public function forceDeleted(Category $category)\n {\n //\n }", "public function set_category_id($category)\n {\n parent::set_category(0);\n }", "function set_acl_category($category)\n {\n $this->acl_category = $category;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_category($category);\n }\n }", "private function _loadCategories()\n {\n try {\n $this->_categories = Doctrine_Core::getTable('Category')->findAll(Doctrine_Core::HYDRATE_ARRAY);\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function changeCategoryToUnknown()\n {\n $sql = 'UPDATE posts SET category_id=1 WHERE category_id=:id';\n return $this->db->request($sql, ['id' => $_GET['id']], 'posts');\n }", "protected function assignCategory() \r\r\n {\r\r\n if (($this->category === false || !Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop()) && Category::inShopStatic($this->product->id_category_default, $this->context->shop)) {\r\r\n $this->category = new Category((int) $this->product->id_category_default, (int) $this->context->language->id);\r\r\n }\r\r\n\r\r\n $sub_categories = array();\r\r\n if (Validate::isLoadedObject($this->category)) {\r\r\n $sub_categories = $this->category->getSubCategories($this->context->language->id, true);\r\r\n\r\r\n //$rootCategory = $this.category\r\r\n // various assignements before Hook::exec\r\r\n $this->context->smarty->assign(array(\r\r\n 'category' => $this->category,\r\r\n 'rootCategory' => Category::getDepthCategory($this->category->id, 2),\r\r\n 'subCategories' => $sub_categories,\r\r\n 'id_category_current' => (int) $this->category->id,\r\r\n 'id_category_parent' => (int) $this->category->id_parent,\r\r\n 'return_category_name' => Tools::safeOutput($this->category->getFieldByLang('name')),\r\r\n 'categories' => Category::getHomeCategories($this->context->language->id, true, (int) $this->context->shop->id),\r\r\n ));\r\r\n }\r\r\n }", "public function setCategory($id, $category)\n {\n return false;\n }", "public function restored(Category $category)\n {\n //\n }", "public function restored(Category $category)\n {\n //\n }", "protected function _initCategory()\n {\n $category = $this->request->getPostValue('category');\n if (!$category) {\n return false;\n }\n\n try {\n $category = $this->categoryFactory->create()->loadByAttribute('url_key',$category);\n } catch (NoSuchEntityException $e) {\n return false;\n }\n\n $category->setStoreId($this->_storeManager->getStore()->getId());\n return $category;\n }", "public function category()\n {\n return $this->belongsTo('App\\Models\\Site\\SiteMaintenanceCategory', 'category_id');\n }", "protected function _useCategoryDatasource() {\n\n // Instantiate category datasource if it's not already instantiated\n if (is_null($this->_externalNewsCategoryDatasource)) {\n $this->_externalNewsCategoryDatasource = new Datasource_Cms_ExternalNews_Category();\n }\n }", "function _make_cat_compat(&$category)\n {\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function setAxis($category)\n {\n parent::setAttr(\"axis\", $category);\n }", "protected function _initCatagory()\r\n\t{\r\n\t\tMage::dispatchEvent('vendor_catalog_controller_category_init_before', array('controller_action' => $this));\r\n\t\t$categoryId = (int) $this->getRequest()->getParam('id', false);\r\n\t\tif (!$categoryId) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$category = Mage::getModel('vendorscategory/category')\r\n\t\t->load($categoryId);\r\n\t\tif (!Mage::helper('vendorscategory')->canShow($category)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(!Mage::registry(\"vendor_id\") && !Mage::registry(\"vendor\") && !Mage::registry(\"current_vendor\")){\r\n\t\t\t//echo $category->getVendorId();exit;\r\n\t\t\t$vendorObj = Mage::getModel('vendors/vendor')->load($category->getVendorId());\r\n\r\n\t\t\t//var_dump($vendorObj->getData());exit;\r\n\t\t\tMage::register('vendor_id', $vendorObj->getVendorId());\r\n\t\t\tMage::register('vendor', $vendorObj);\r\n\t\t\tMage::register('current_vendor', $vendorObj);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('current_vendor_category', $category);\r\n\t\tMage::register('current_vendor_entity_key', $category->getPath());\r\n\t\ttry {\r\n\t\t\tMage::dispatchEvent(\r\n\t\t\t'vendor_catalog_controller_category_init_after',\r\n\t\t\tarray(\r\n\t\t\t'category' => $category,\r\n\t\t\t'controller_action' => $this\r\n\t\t\t)\r\n\t\t\t);\r\n\t\t} catch (Mage_Core_Exception $e) {\r\n\t\t\tMage::logException($e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\treturn $category;\r\n\t}", "public function category()\n {\n \treturn $this->belongsTo('App\\Category');\n }", "public function category() {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function update(Request $request, Category $category)\n {\n if (Auth::user()->cant('update', $category)) {\n return redirect()->route('admin.home')->with(['message'=>'You don\\'t have permissions']);\n }\n $rules = [\n 'name' => 'required',\n 'url' => 'required|unique:categories,url,'.$category->id\n /*'url' => [\n 'required',\n Rule::unique('categories')->ignore($category->id)\n ]*/\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return redirect()->route('categories.edit', ['id'=>$category->id])->withErrors($validator)->withInput();\n }\n\n $category->name = $request->get('name');\n $category->url = $request->get('url');\n $category->enabled = $request->filled('enabled');\n $category->meta_title = $request->get('meta_title');\n $category->meta_keywords = $request->get('meta_keywords');\n $category->meta_description = $request->get('meta_description');\n $category->short_text = $request->get('short_text');\n $category->full_text = $request->get('full_text');\n $category->save();\n return redirect()->route('categories.edit', ['id'=>$category->id]);\n }", "public function category()\n {\n return $this->belongsTo('App\\Category');\n }", "public function category() {\n return $this->belongsTo('App\\Models\\category','cat_id');\n }", "function fm_update_links_cats($catid) {\r\n\t// Changes all associated links to deleted cat to 0\r\n\tif ($linkcats = get_records('fmanager_link', \"category\", $catid)) {\r\n\t\tforeach ($linkcats as $lc) {\t\t\r\n\t\t\t$lc->category = 0;\r\n\t\t\tif (!update_record('fmanager_link', $lc)) {\r\n\t\t\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function __construct() {\n $this->_resourceName = 'category';\n parent::__construct();\n }", "public function testSaveCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "public function getCategory()\n{\n return $this->hasOne(Category::className(), ['id' => 'category']);\n}", "public function setCategory($val)\n {\n $this->_propDict[\"category\"] = $val;\n return $this;\n }", "public function category()\n {\n return $this->belongsTo('App\\Models\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Models\\Category');\n }", "public function category()\n {\n return $this->belongsTo('App\\Models\\Category');\n }", "public function checkCategory()\n\t{\n\t\treturn $this->belongsTo('Dodona\\CheckCategory');\n\t}", "protected function _initCategory() {\n $categoryId = (int) $this->getRequest()->getParam('id', false);\n $storeId = (int) $this->getRequest()->getParam('store');\n\n $category = Mage::getModel('catalog/category');\n $category->setStoreId($storeId);\n\n if ($categoryId) {\n $category->load($categoryId);\n if ($storeId) {\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\n if (!in_array($rootId, $category->getPathIds())) {\n $this->_redirect('*/*/', array('_current' => true, 'id' => null));\n return false;\n }\n }\n }\n\n Mage::register('category', $category);\n Mage::register('current_category', $category);\n\n return $category;\n }", "public function category()\n {\n return $this->belongsTo('\\App\\Category');\n }", "public function category(){\n return $this->belongsTo('App\\Category', 'cat-id');\n }", "public function category()\n {\n $this->belongsTo(Category::class, 'category_id');\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n\n }", "public function set_category_base($category_base)\n {\n }", "public function sync()\n {\n $has_changed = false;\n $used_categories = [];\n foreach ($this->ruleIterator() as $node) {\n foreach (explode(\",\", (string)$node->category) as $cat) {\n if (!in_array($cat, $used_categories)) {\n $used_categories[] = $cat;\n }\n }\n }\n foreach ($this->categories->category->iterateItems() as $key => $category) {\n if (!empty((string)$category->auto) && !in_array((string)$category->name, $used_categories)) {\n $this->categories->category->del($key);\n $has_changed = true;\n } elseif (in_array((string)$category->name, $used_categories)) {\n unset($used_categories[array_search((string)$category->name, $used_categories)]);\n }\n }\n foreach ($used_categories as $name) {\n $node = $this->categories->category->add();\n $node->name = $name;\n $node->auto = \"1\";\n $has_changed = true;\n }\n return $has_changed;\n }", "public function category()\n{\n return $this->belongsTo(Category::class);\n}", "public function __construct(Category $model)\n {\n parent::__construct($model);\n }", "public function getCategory()\n {\n if (array_key_exists(\"category\", $this->_propDict)) {\n if (is_a($this->_propDict[\"category\"], \"\\Beta\\Microsoft\\Graph\\Model\\WindowsMalwareCategory\") || is_null($this->_propDict[\"category\"])) {\n return $this->_propDict[\"category\"];\n } else {\n $this->_propDict[\"category\"] = new WindowsMalwareCategory($this->_propDict[\"category\"]);\n return $this->_propDict[\"category\"];\n }\n }\n return null;\n }", "public function category()\n {\n\n return $this->belongsTo(Category::class);\n\n }", "public function category()\n {\n \treturn $this->belongsTo(Category::class);\n }", "public function category()\n {\n \treturn $this->belongsTo(Category::class);\n }", "protected function buildMetaCategory($category = NULL) {\r\n\t\tif (!empty($category) && array_key_exists($category, $this->settings['news']['semantic']['meta'])) {\r\n\r\n\t\t\t$config = $this->getConfig($category);\r\n\t\t\t$buildTags = t3lib_div::trimExplode(',', $config['build']);\r\n\r\n\t\t\tforeach ($buildTags as $tag) {\r\n\t\t\t\tif (array_key_exists($tag, $this->settings['news']['semantic']['meta'][$category])) {\r\n\t\t\t\t\t$rules = $this->settings['news']['semantic']['meta'][$category][$tag];\r\n\t\t\t\t} elseif (is_int(strpos($tag, ':'))) {\r\n\t\t\t\t\t$pathParts = t3lib_div::trimExplode(':', $tag);\r\n\t\t\t\t\tif (array_key_exists($pathParts[1], $this->settings['news']['semantic']['meta'][$category][$pathParts[0]])) {\r\n\t\t\t\t\t\t$rules = $this->settings['news']['semantic']['meta'][$category][$pathParts[0]][$pathParts[1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif (is_int(strpos($tag, '.'))) {\r\n\t\t\t\t\t$pathParts = t3lib_div::trimExplode('.', $tag);\r\n\t\t\t\t\tif (array_key_exists($pathParts[1], $this->settings['news']['semantic']['meta'][$category][$pathParts[0]])) {\r\n\t\t\t\t\t\t$rules = $this->settings['news']['semantic']['meta'][$category][$pathParts[0]][$pathParts[1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (isset($rules) && !empty($rules) && is_array($rules)) {\r\n\t\t\t\t\t$prefType = $config['nsType'];\r\n\t\t\t\t\tif (isset($pathParts) && !empty($prefType)) {\r\n\t\t\t\t\t\tif (!array_key_exists($pathParts[0], $this->{$prefType}) && array_key_exists($pathParts[0], $config['ns'])) {\r\n\t\t\t\t\t\t\t$this->{$prefType}[$pathParts[0]] = $config['ns'][$pathParts[0]];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($config['prepend']) && array_key_exists($pathParts[0], $config['prepend'])) {\r\n\t\t\t\t\t\t\t$this->prepend[$pathParts[0]] = $config['prepend'][$pathParts[0]];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$scheme = (isset($rules['scheme'])) ? $rules['scheme'] : NULL;\r\n\r\n\t\t\t\t\tif (isset($rules['value'])) {\r\n\t\t\t\t\t\t$data = $rules['value'];\r\n\t\t\t\t\t} elseif (isset($rules['action']) && method_exists($this, $rules['action'])) {\r\n\t\t\t\t\t\t$action = $rules['action'];\r\n\t\t\t\t\t\t$data = (in_array($action, array('getCreated', 'getModified', 'getExpires'))) ? $this->$action($config['dateFormat']) : $this->$action();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!empty($data)) {\r\n\t\t\t\t\t\tif (is_array($data)) {\r\n\t\t\t\t\t\t\tif (isset($rules['multiple']) && !empty($rules['multiple'])) {\r\n\t\t\t\t\t\t\t\tforeach ($data as $part) {\r\n\t\t\t\t\t\t\t\t\t$this->addTag($config['tagName'], $config['type'], $tag, $part, $scheme);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$this->addTag($config['tagName'], $config['type'], $tag, $data[0], $scheme);\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$this->addTag($config['tagName'], $config['type'], $tag, $data, $scheme);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function testDeleteCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n $category->delete();\n $this->assertFalse($category == null);\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "public function category() {\n return $this->belongsTo(Category::class);\n }", "public function category() {\n return $this->belongsTo(Category::class);\n }", "public function category() {\n return $this->belongsTo(Category::class);\n }", "public function addCategory(HostCategory $category): void;", "private function metaLoad()\n {\n $this->meta ??= $this?->relations['meta'] ?? $this->meta()->get();\n }", "public function forceDeleted(BlogCategory $blogCategory)\n {\n //\n }", "public function category()\n {\n return $this->belongsTo('App\\Category','category_id');\n\n\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function forceDeleted(BlogCategory $blogCategory)\n {\n # ПОПАДАЕМ ПОСЛЕ ПРЯМОГО УДАЛЕНИЯ ЗАПИСИ\n }", "protected function _initCategory()\r\n {\r\n $categoryId = (int)$this->getRequest()->getParam('id', FALSE);\r\n $storeId = (int)$this->getRequest()->getParam('store');\r\n\r\n $category = Mage::getModel('catalog/category');\r\n $category->setStoreId($storeId);\r\n\r\n if ($categoryId) {\r\n $category->load($categoryId);\r\n if ($storeId) {\r\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\r\n if (!in_array($rootId, $category->getPathIds())) {\r\n $this->_redirect('*/*/', array('_current' => TRUE, 'id' => NULL));\r\n return FALSE;\r\n }\r\n }\r\n }\r\n\r\n Mage::register('category', $category);\r\n Mage::register('current_category', $category);\r\n\r\n return $category;\r\n }", "public function category()\n {\n return $this->belongsTo(Category::class);\n }", "public function setRules() {\n }", "public function category()\n\t{\n\t return $this->belongsTo(Category::class);\n\t}", "public function category(){\n return $this->belongsTo('App\\Models\\Category');\n }", "public function category(){\n return $this->belongsTo('App\\Models\\Category');\n }", "public function setUpdateCategory($val)\n {\n $this->_propDict[\"updateCategory\"] = $val;\n return $this;\n }", "public function __construct()\n {\n parent::__construct();\n $this->setType('smile_virtualcategories/rule_condition_combine');\n }", "public function add_rule( WP_Autoload_Rule $rule );", "public function loadPolicy(Model $model) : void\n {\n $this->filtered = false;\n\n empty($this->filter) ?\n parent::loadPolicy($model) :\n $this->loadFilteredPolicy($model, $this->filter);\n }" ]
[ "0.5523471", "0.5401776", "0.53892785", "0.53529227", "0.53529227", "0.5154101", "0.5099096", "0.5002122", "0.49223325", "0.48467308", "0.48424366", "0.4808525", "0.4808525", "0.4796426", "0.47626355", "0.47138828", "0.47089693", "0.46798897", "0.46798897", "0.46490788", "0.4648791", "0.46449533", "0.46144474", "0.45941195", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45802", "0.45749614", "0.45713153", "0.45670667", "0.45550087", "0.45456523", "0.45318145", "0.45269665", "0.45267558", "0.45204568", "0.45022327", "0.45022327", "0.45022327", "0.4493667", "0.44911426", "0.44856924", "0.44818228", "0.44746923", "0.44482076", "0.44455296", "0.44417128", "0.44398385", "0.44387597", "0.44347018", "0.44283643", "0.44276223", "0.44276223", "0.4426668", "0.442411", "0.4420838", "0.4420838", "0.4420838", "0.44183075", "0.44112477", "0.4409503", "0.44064388", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.44028223", "0.43995064", "0.43964717", "0.43891183", "0.43874788", "0.43822622", "0.43797222", "0.43797222", "0.4375173", "0.4366125", "0.43612012", "0.4350863" ]
0.5441936
3
Lists all country entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $countries = $em->getRepository('B2bBundle:Country')->findAll(); return $this->render('country/index.html.twig', array( 'countries' => $countries, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }", "public static function getCountryList(){\n return Country::find()\n ->orderBy(['name'=>SORT_ASC])\n ->all();\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "public function getAll()\n {\n \ttry {\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$country = Country::get();\n\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n\n\t\treturn ResponseHelper::armyResponse(true, 200, $country, \"countries\");\n }", "public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }", "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public function index()\n {\n return Country::orderBy('name', 'ASC')->paginate();\n }", "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public function index()\n {\n $countries=$this->countryRepository->getAllCountries();\n return view('backend.constants.countries.all_countries',compact('countries'));\n }", "function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n /*\n $entities = $em->getRepository('NvCargaBundle:City')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n */\n $listall = $this->getUser()->getMaincompany()->getCountries();\n $countries = array();\n $count = 0;\n foreach ($listall as $country) {\n $countries[$count]['id'] = $country->getId();\n $countries[$count]['name'] = $country->getName();\n $count++;\n }\n return $this->render('NvCargaBundle:City:index.html.twig',array('countries' => $countries)); \n\n }", "public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }", "public function countryList(){\n $sorted = $this->country->select('id','country_name')->get()->sortBy('country_name');\n return $sorted->values()->all();\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => GeoCountry::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function all(Country $country)\n {\n /*if (Auth::user()->can('divisions.viewAny')) {*/\n $countries = Country::all();\n $divisions = $country->division;\n /*foreach ($divisions as $division) {\n echo $division->name;\n }*/\n return view('admin.division.show', compact('countries', 'divisions'));\n /*}*/\n /*return redirect(route('admin.home'));*/\n }", "public function index()\n {\n try {\n $qb = Country::query();\n\n return parent::getCollection($qb);\n } catch (\\Exception $e) {\n return parent::error($e);\n }\n }", "public function index()\n {\n $countries = $this->countryService->getAll();\n\n return view('system.country.index', compact('countries'));\n }", "public function getCountries() {\n $dql = \"SELECT c from Country c\n ORDER BY c.name\";\n $countries = $this->em\n ->createQuery($dql)\n ->getResult();\n return $countries;\n }", "public function index()\n {\n return response()->json([\n 'data' => Country::getAll()\n ], 200);\n }", "public function index()\n {\n $countries = $this->repository->all();\n\n return view('countries::countries.index', compact('countries'));\n }", "public static function All()\n\t{\n\t\t$query = 'EXEC [getCountries]';\n\t\t$query .= '@languageCode = \\'' . Localisation::getCurrentLanguage() . '\\'';\n\n\t\t$rows = Database::ODBCExecute($query);\n\n\t\t$countries = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$countries[] = new Country(\n\t\t\t\t$row['code'],\n\t\t\t\t$row['name']\n\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "public function getCountries();", "public function countryList ( Request $request ) {\n $countries = Country::all();\n return response()->json([\n \"response\" => $countries\n ]);\n }", "public function listcountryAction(Request $request)\n {\n if (! $request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n $name = $request->query->get('city_name');\n $list = $request->query->get('countrylist');\n $countrylist = json_decode($list);\n\n $em = $this->getDoctrine()->getManager();\n $states = $em->getRepository('NvCargaBundle:State')->findByCountry($countrylist);\n \n $entities = $em->getRepository('NvCargaBundle:City')->createQueryBuilder('o')\n \t\t\t->where('o.name LIKE :name')\n //->setParameter('name', '%'.$name.'%')\n ->andWhere('o.state IN (:states)')\n ->andwhere('o.active =:active')\n ->setParameters(['name'=>$name.'%','states'=>$states, 'active'=>true])\n ->setFirstResult(0)\n ->setMaxResults(25)\n ->getQuery()\n ->getResult();\n $result=array();\n $counter = 0;\n foreach ($entities as $entity) {\n $result[$counter]['cityid'] = $entity->getId();\n $result[$counter]['cityname'] = $entity->getName();\n $result[$counter]['state'] = $entity->getState()->getName();\n $result[$counter]['country'] = $entity->getState()->getCountry()->getName();\n $counter++;\n }\n\t\n return new JsonResponse($result); \n }", "public function getAllCountriesProperty()\n {\n return Country::get();\n }", "public function getCountryList()\r\n {\r\n return $this->admin->sGetCountryList();\r\n }", "public function list() {\n $countries = Country::orderBy('name', 'desc')->get();\n\n return view('country.list', [\n 'countries' => $countries\n ]);\n }", "public function locationshowAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('adminBundle:countries')->findAll();\n return $this->render(':Location:index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "public function index()\n {\n $countries = Country::with('locations')->get();\n return Resource::collection($countries);\n }", "public function getAllCountryCodes() {\n\t\t$filter = new Filters\\Misc\\CountryCode();\n\t\treturn $filter->query->find();\n\t}", "public function index()\n {\n //$countries = Country::get();\n\n $countries = Country::orderBy('name', 'asc')\n ->get();\n\n return view('admin.location.countries')->with('countries', $countries);\n }", "public function index()\n {\n $countries = Country::filter()->paginate();\n\n return view('dashboard.countries.index', compact('countries'));\n }", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "public function countryfilterAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromRoute('country', null);\n\n // Filter posts by Country\n $query = $this->entityManager->getRepository(Post::class)->findPostsByCountry($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries')->get();\n } else {\n $countries = $this->client->request(\n 'GET',\n 'https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries'\n )->toArray();\n $countriesCache = $cachePool->getItem('countries');\n \n if (!$countriesCache->isHit()) {\n $countriesCache->set($countries);\n $countriesCache->expiresAfter(60*60*24);\n $cachePool->save($countriesCache);\n }\n }\n\n return $countries;\n }", "public function index()\n {\n $country = Country::get();\n return view('country.index', compact('country'));\n }", "public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $etablissements = $em->getRepository('AppBundle:Etablissements')->findAllWithCountry();\n\n return $this->render('etablissements/index.html.twig', array(\n 'etablissements' => $etablissements,\n ));\n }", "public static function getList()\n {\n\n $queryString = 'SELECT * from `countries` ORDER BY id ASC';\n\n $paramsArray = array();\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n \n return $result;\n\n }", "public function getCountries() {\n\n $countries = CountryModel::all();\n\n return response()->json($countries);\n }", "public function index()\n {\n //\n $countries = Country::all();\n return view(\"admin.countries.index\",compact('countries'));\n }", "public function index()\n {\n $countries = Country::orderBy('name', 'asc')->paginate(15);\n\n return view('admin.countries.index')->with([\n 'countries' => $countries\n ]);\n }", "public function countries()\n {\n $countries = Countries::where('status', 'active')->orderBy('idx')->get();\n return view('setup.countries.index', compact('countries'));\n }", "public function getIndex(){\n try {\n $countries = $this->country_model->allCountries();\n return view('countries.list_view', compact('countries'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage())]);\n }//End try-catch\n }", "public function getCountriesList() {\n return $this->_get(7);\n }", "public function index($locale)\n {\n $this->checkLang($locale);\n\n return $this->sendResult('paginate 10 Countries',\n CountryResource::collection(Country::paginate(10)));\n }", "public function listCountries() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT DISTINCT c.countries_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_iso_code_2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCASE WHEN z.zone_id > 0 THEN 'true' ELSE 'false' END AS zone\r\n\t\t\t\t\t\t\t\t\t\tFROM bs_countries c\r\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN bs_zones z ON (c.countries_iso_code_2 = z.countries_id)\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY c.countries_id\r\n\t\t\t\t\t\t\t\t\t\tORDER BY c.countries_id\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "public function getListCountry()\n\t{\n\t\t$params = [\n\t\t\t'verify' => false,\n\t\t\t'query' => [\n\t\t\t\t'output' => Config::get( 'response.format' )\n\t\t\t]\n\t\t];\n\n\t\t$baseUrl = sprintf( Config::get( 'endpoints.base_url' ), Config::get( 'settings.api' ) ) . Config::get( 'endpoints.general_list_country' );\n\n\t\ttry {\n\t\t\t$response = parent::send( 'GET', $baseUrl, $params );\n\t\t} catch (TiketException $e) {\n\t\t\tthrow parent::convertException( $e );\n\t\t}\n\n\t\treturn $response;\n\t}", "public function index(Request $request)\n {\n $this->countryRepository->pushCriteria(new RequestCriteria($request));\n if (isset($request->country)) {\n $country = $request->country;\n $countries = $this->countryRepository->search($country);\n }else{\n $countries = $this->countryRepository->paginate(20);\n }\n\n if (count($countries) == 0) {\n Log::warning('Pais, Index, No se encontraron paises: ' . $request->fullUrl() );\n Flash::error('No se encontraron registros.');\n }else{\n Log::info('Pais, Index, Lista de paises: ' . $request->fullUrl() );\n Flash::success('Se encontraron los siguientes registros.');\n }\n\n return view('admin.countries.index')\n ->with('countries', $countries);\n }", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCountries(){\n $stmt = $this->databaseConnection->prepare(\"SELECT id_country, country_name FROM countries\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function indexAction(Request $request)\n {\n $em = $this->get('doctrine.orm.default_entity_manager');\n $dql = 'SELECT c FROM OrkestroCountryBundle:Country c ORDER BY c.isoCode ASC';\n $query = $em->createQuery($dql);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query,\n $request->query->get('page', 1),\n 10\n );\n\n return array(\n 'pagination' => $pagination,\n );\n }", "public function index(Request $request)\n {\n $this->countryRepository->pushCriteria(new RequestCriteria($request));\n if (isset($request->country)) {\n $country = $request->country;\n $countries = $this->countryRepository->search($country);\n }else{\n $countries = $this->countryRepository->paginate(20);\n }\n\n if (count($countries) == 0) {\n Log::warning('Pais, Index, No se encontraron paises: ' . $request->fullUrl() );\n Flash::error('No se encontraron registros.');\n }else{\n Log::info('Pais, Index, Lista de paises: ' . $request->fullUrl() );\n Flash::success('Se encontraron los siguientes registros.');\n }\n\n return view('countries.index')\n ->with('countries', $countries);\n }", "public function GetCountries(){\n try {\n \n // $country=new Countries();\n $countries=Countries::model()->GetCountries();\n return $countries;\n \n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:GetCountries::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "public function getCountries() {\n\t\treturn $this->getData('/objekt/laender');\n\t}", "function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }", "function getcountries_get(){\n\n $from = 'countries';\n $where = array();\n $select = '*';\n $records = 2;\n\n $countries = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($countries) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'Countries found successfully.',\n 'result' => $countries);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function countries(): array\n {\n return $this->client->get(\"country\");\n }", "public function getCountries()\n {\n return \"/V1/directory/countries\";\n }", "public function index()\n {\n $country=Country::get();\n return view('admin.countries.index',compact('country'));\n }", "public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "public function countryOptionList();", "function countryListing()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('country_model');\n \n $searchText = $this->input->post('searchText');\n $data['searchText'] = $searchText;\n \n $count = $this->country_model->countryListingCount($searchText);\n $segment = 4;\n $returns = $this->paginationCompress( \"admin/country/countryListing/\", $count, 5, $segment );\n \n \n $data['countryRecords'] = $this->country_model->countryListing($searchText, $returns['page'], $returns['offset']);\n \n $this->global['pageTitle'] = 'Touba : Country Listing';\n $this->loadViews(\"admin/country/countries\", $this->global, $data, NULL);\n }\n }", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }", "public function getCountriesInfo();", "function country()\n {\n $this->data['result'] = \\DB::table('countries')->get();\n return view('backend.pages.country')->with($this->data);\n }", "public function index(Country $country)\n {\n $data = [\n 'title' => 'Регионы',\n 'country' => $country,\n 'regions' => $country->regions()->paginate(25)\n ];\n\n return view('admin.regions.index', $data);\n }", "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpfox::getT('gmap_countries'), 'fc')\t\t\n\t\t\t\t->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso')\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso')\n\t\t\t\t->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id')\n\t\t\t\t->group('u.country_iso')\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\t{\n\t\t\tforeach($aRows as $key => $aRow)\n\t\t\t{\n\t\t\t\tif(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '')\n\t\t\t\t{\n\t\t\t\t\t$aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$aRows = $this->sortByProperty($aRows, 'name');\n\t\t}\n\t\t\n\t\treturn $aRows;\n\t}", "function outputCountriesList() {\r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n\t\r\n for($i=0;$i<$countries->getCount();$i++){\r\n\t\t echo '<option value=\"'. $result[$i]->getISO(). '\">' . $result[$i]->getCountryName() . '</option>';\r\n\t}\r\n}", "public function index()\n {\n //$countries = Country::simplePaginate(5);\n $countries = Country::paginate(5);\n return view('dashboard.countries.index', compact('countries'));\n }", "function index()\n {\n $this->load->model('country_model');\n $countries = $this->country_model->get_countries();\n $data['countries'] = $countries->result_object();\n\n $this->load->view('pages/home',$data);\n }", "public static function getCountries()\n {\n return self::$countryList;\n }", "public function index()\n {\n $this->authorize('viewAny', Continent::class);\n\n $continents = Continent::all();\n return $this->showAll($continents);\n }", "public function getCountryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('country');\r\n\t\t$this->db->where('country_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function actionGetnearbycountry(){\t\t\n\t\t$ip = $this->get_client_ip();\n\t\tif($ip){\n\t\t\t$countries = Countries::model()->get_current_nearbycountries($ip);\n\t\t}\n\t\techo $countries;\n\t\tYii::app()->end();\t\t\n\t}", "public function actionGetCountriesList(){\n if(!empty($_POST['continent_id']) && is_numeric($_POST['continent_id'])){\n $data = Address::model()->findAll('parent_id = :parent_id', array(\n ':parent_id'=>(int)$_POST['continent_id']\n ));\n $data = CHtml::listData($data, 'id', 'name');\n foreach($data as $value=>$name){\n echo CHtml::tag('option', array('value'=>$value), CHtml::encode($name), true);\n }\n }\n }", "public function show(Country $country)\n {\n //\n }", "public function show(Country $country)\n {\n //\n }", "public function getCountryList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "public function showIndex()\n {\n $sort = Request::get('sort');\n $direction = Request::get('direction');\n $countries = $this->countryRepo->getPaginated(compact('sort','direction'));\n return View::make('admin.countries.index',compact('countries'));\n }", "static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }", "public function index()\n {\n $modelStaff = new TfStaff();\n $modelCountry = new TfCountry();\n $dataCountry = TfCountry::where('action', 1)->orderBy('name', 'ASC')->select('*')->paginate(30);\n return view('manage.content.system.country.list', compact('modelStaff', 'modelCountry','dataCountry'),\n [\n 'accessObject' => 'content'\n ]);\n }", "public static function findAll( $countryid ) {\n\t\t\n \treturn Doctrine_Query::create ()->from ( 'Regions s' )\n ->where('s.country_id = ?', array($countryid))\n \t\t\t\t\t\t\t\t->orderBy('s.name')\n \t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\t\t\n\t}", "public function actionCountries()\n {\n $salys = Yii::$app->db_prod->createCommand(\"SELECT * FROM salys\")->queryAll();\n foreach ($salys as $salis) {\n $city = new City([\n 'name' => $salis['pavadinimas_lt'],\n 'ansi_name' => $salis['pavadinimas_lt'],\n 'alt_name' => $this->formatCountryAltName($salis),\n 'latitude' => $salis['latitude'],\n 'longitude' => $salis['longitude'],\n 'country_code' => strtoupper($salis['kodas']),\n 'population' => null,\n 'elevation' => null,\n 'timezone' => null,\n 'modification_date' => null,\n ]);\n $city->save();\n }\n\n Cities::addCountries();\n }", "public function index(Request $request)\n { \n \n $items = Country::orderBy('id')->get(); \n \n //$parentCate = Category::where('parent_id', 0)->where('type', 1)->orderBy('display_order')->get();\n \n return view('backend.country.index', compact('items'));\n }", "function outputCountries() { \r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n \r\n for($i=0;$i<$countries->getCount();$i++){ \r\n\t\techo '<li class=\"list-group-item\">';\r\n\t\techo '<a href=\"single-country.php?country='. $result[$i]->getISO() . '\">';\r\n\t\techo $result[$i]->getCountryName() . '</a></li>';\r\n }\r\n}", "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $countrys['id'],'country' => $countrys['country'], 'currency' => $countrys['currency'], 'flag'=>$countrys['flag'], 'is_active' => $countrys['is_active'], 'contact_email' => $countrys['contact_email'], 'address' => $countrys['address'] ];\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function actionIndex() {\n $searchModel = new RegionSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());\n $dataFilterCountry = \\common\\models\\address\\Country::getNameArr();\n \n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n 'dataFilterCountry' => $dataFilterCountry,\n ]);\n }", "public function countries(){\n $countries=Country::all();\n if ($countries){\n $countriesArray = [];\n foreach ($countries as $country) {\n array_push($countriesArray, $country->country);\n }\n return response()->json([\"Status\"=>\"Ok\",\"data\"=>$countriesArray],200);\n }else{\n return response()->json([\"Status\"=>\"No Content\"],204);\n }\n }", "public function get_countries()\n\t{\n\t\t$t_countries = xtc_get_countriesList();\n\t\treturn $t_countries;\n\t}", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function countries()\n\t{\n\t\treturn $this->hasMany('App\\Country');\n\t}", "public function countries(): array\n {\n $payload = Payload::list('countries');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return (array) $result->json('data');\n }" ]
[ "0.76825684", "0.75678253", "0.7440097", "0.7308114", "0.7265477", "0.70552075", "0.70186573", "0.69796455", "0.69322634", "0.691023", "0.6881232", "0.6877778", "0.6845058", "0.6814838", "0.6813988", "0.67915344", "0.677086", "0.67516154", "0.67354244", "0.671922", "0.6712204", "0.6702554", "0.6676464", "0.6639153", "0.66313696", "0.65929157", "0.6585533", "0.6585466", "0.65677756", "0.6541541", "0.6534363", "0.65020853", "0.64929354", "0.64763945", "0.64627385", "0.6404292", "0.64014053", "0.639008", "0.6380935", "0.637307", "0.63655835", "0.6361779", "0.6361042", "0.63583326", "0.63551134", "0.6350217", "0.6345568", "0.63162327", "0.6305398", "0.629827", "0.62955004", "0.6292234", "0.62837696", "0.6278588", "0.62530035", "0.6252061", "0.6240178", "0.62171435", "0.6204051", "0.6197886", "0.6192682", "0.61917895", "0.6190076", "0.6186224", "0.617801", "0.6176013", "0.6174687", "0.6173248", "0.6166029", "0.6154449", "0.6144197", "0.6114479", "0.61123943", "0.6096912", "0.60964364", "0.6081897", "0.6080845", "0.60749775", "0.60714334", "0.60655", "0.6063371", "0.60629725", "0.60629725", "0.6037001", "0.6027222", "0.60245603", "0.6021785", "0.6019271", "0.5996627", "0.5986128", "0.59801716", "0.596917", "0.59590983", "0.5958176", "0.59526306", "0.5948872", "0.5948872", "0.5948872", "0.5935759", "0.5929226" ]
0.7450007
2
Creates a new country entity.
public function newAction(Request $request) { $country = new Country(); $form = $this->createForm('B2bBundle\Form\CountryType', $country); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($country); $em->flush(); return $this->redirectToRoute('backoffice_country_show', array('id' => $country->getId())); } return $this->render('country/new.html.twig', array( 'country' => $country, 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($name, $country);", "public function createAction(Request $request)\n {\n $entity = new Country();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('orkestro_backend_country_show', array('iso_code' => $entity->getIsoCode())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function created(Country $country)\n {\n //\n }", "public function store(CountryRequest $request)\n {\n return Country::create($request->all());\n }", "public function create()\n {\n return view('backend.constants.countries.add_country');\n }", "public function create()\n {\n\n return view('backend.country.create');\n }", "public function create()\n {\n return view('system.country.create');\n }", "public function new(): Country\n {\n $serializedNewObj = \\serialize($this->newCountry);\n \n return \\unserialize($serializedNewObj);\n }", "public function create(array $attributes): Country\n {\n return $this->country->newQuery()->create($attributes);\n }", "public function create()\n {\n return view('admin.country.create');\n }", "public function create(){\n return view('admin.countries.create' , ['title'=>trans('admin.create_new_country')]);\n }", "public function store(CreateCountryRequest $request)\n {\n $input = $request->all();\n\n $input['nativo'] = 0;\n $input['nombre'] = strtoupper($input['nombre']);\n if($this->countryRepository->validar($input['nombre'], $input['codigo_ref'])){\n Log::warning('Pais, Store, Hay un pais con el mismo nombre o código: ', [$input]);\n return redirect()->back()->withErrors(['Error', 'Hay un pais con el mismo nombre o código.'])->withInput();\n }else{\n $country = $this->countryRepository->create($input);\n\n Log::info('Pais, Store, Se almaceno el pais: '.$country->id, [$input]);\n Flash::success('Country saved successfully.');\n\n return redirect(route('admin.countries.show', [$country->id]));\n }\n }", "public function store(CreateCountryRequest $request)\n {\n $input = $request->all();\n\n $input['nativo'] = 0;\n $input['nombre'] = strtoupper($input['nombre']);\n if($this->countryRepository->validar($input['nombre'], $input['codigo_ref'])){\n Log::warning('Pais, Store, Hay un pais con el mismo nombre o código: ', [$input]);\n return redirect()->back()->withErrors(['Error', 'Hay un pais con el mismo nombre o código.'])->withInput();\n }else{\n $country = $this->countryRepository->create($input);\n\n Log::info('Pais, Store, Se almaceno el pais: '.$country->id, [$input]);\n Flash::success('Country saved successfully.');\n\n return redirect(route('countries.show', [$country->id]));\n }\n }", "public function create()\n {\n return view('admin.countries.create',['title'=> trans('admin.create_new_country')]);\n }", "public function insertStatesAction() {\n $repository = $this->get('doctrine_mongodb')->getRepository('ProductBundle:Country');\n $name = 'INDIA';\n $india = $repository->findOneByName($name);\n $name = 'USA';\n $usa = $repository->findOneByName($name);\n $name = 'UK';\n $uk = $repository->findOneByName($name);\n \n $cal = new States();\n $cal->setState('Karnataka');\n $cal->setCountry($india);\n $dm = $this->get('doctrine_mongodb')->getManager();\n $dm->persist($cal);\n $dm->flush();\n \n return new Response('Created state with id: '. $cal->getId());\n }", "public function create()\n {\n return view('countries::countries.create');\n }", "public function create()\n {\n $hasCustomField = in_array($this->contryRepository->model(), setting('custom_field_models', []));\n if ($hasCustomField) {\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->contryRepository->model());\n $html = generateCustomField($customFields);\n }\n return view('country.create')->with(\"customFields\", isset($html) ? $html : false);\n }", "public function create()\n {\n $association = Association::pluck('name','id');\n return view('country.create', compact('association'));\n }", "public function create()\n {\n return view('admin.location.createcountry');\n }", "public function store(CountryRequest $request)\n {\n $country = $this->repository->create($request->all());\n\n flash(trans('countries::countries.messages.created'));\n\n return redirect()->route('dashboard.countries.show', $country);\n }", "public function store(Request $request)\n {\n $country = countries::create([\n 'name' => $request->name,\n ]);\n return response($country);\n }", "public function create()\n {\n return view('countries.create');\n }", "public function create()\n {\n return view('countries.create');\n }", "public function create()\n {\n return view('admin.countries.create');\n\n }", "public function create()\n {\n $country =Country::all();\n return view('setup.addresSetup.region.create')->with('country', $country);\n }", "public function create()\n {\n return view('admin.countries.create');\n }", "public function create()\n {\n return view('dashboard.countries.create');\n }", "public function create()\n {\n return view('dashboard.countries.create');\n }", "private function createCreateForm(Country $entity)\n {\n $form = $this->createForm(new CountryType($this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale')), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_country_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function create()\n {\n $this->data[\"countries\"] = Country::all();\n return view(\"admin.\" . str_slug($this->data[\"entity_p\"]) . \".create\")->with($this->data);\n }", "public function create(Country $country)\n {\n $data = [\n 'title' => 'Добавить регион',\n 'country' => $country,\n 'countries' => Country::all()\n ];\n\n return view('admin.regions.create', $data);\n }", "public function newAction()\n {\n $entity = new Country();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function store(CreateCountriesRequest $request)\n {\n $input = $request->all();\n\n $countries = $this->countriesRepository->create($input);\n\n Flash::success('Countries saved successfully.');\n\n return redirect(route('countries.index'));\n }", "public function actionCreate() {\n $model = new Region;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n $countryList = \\common\\models\\address\\Country::getNameArr();\n return $this->render('create', [\n 'model' => $model,\n 'countryList' => $countryList, \n ]);\n }\n }", "public function store(StoreCountry $request)\n {\n $this->authorize('canControlEverything');\n\n $validated = $request->validated();\n\n $country = new Country();\n $country->name = $request->name;\n $country->phone_index = $request->phone_index;\n $country->save();\n\n return response($country, 200);\n }", "protected function addCountry($form, $country = null) {\n $form->add('country', 'entity', array(\n 'class' => 'DaVinci\\TaxiBundle\\Entity\\Admin\\CountryCity',\n 'property' => 'country',\n 'empty_value' => 'form.please_select',\n 'translation_domain' => 'FOSUserBundle',\n //'property_path' => 'country',\n 'mapped' => false,\n 'data' => $country, \n 'query_builder' => function(EntityRepository $er) use ($country){\n \n if($country) \n {\n //use passed to post country\n $cc = $country->getCountryCode();\n $ci = $country->getId();\n \n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->andWhere('(c.countryCode != ?1 OR c.id = ?2)')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC')->setParameters(array(1 => $cc, 2 => $ci));\n }\n else\n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC');\n }));\n }", "function CreateDefaultCountry()\n\t{\n\t\t$result = $this->sendRequest(\"CreateDefaultCountry\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function store(Request $request)\r\n {\r\n $possible_country = Country::find($request->get('country_id'));\r\n if ($possible_country != null)\r\n {\r\n $city = new City([\r\n 'country_id' => $request->get('country_id'),\r\n 'name' => $request->get('name'),\r\n 'code' => $request->get('code')\r\n ]);\r\n $city->save();\r\n return \"Created successfully!\";\r\n }\r\n else\r\n {\r\n return \"Could not create new city.\";\r\n }\r\n }", "public function postCreate(Request $request){\n //First we need to validate incoming post create request and return errors\n //if requested data are invalid.\n $validator = Validator::make($request->all(), $this->country_model->getValidationRules($request));\n $validator->setAttributeNames($this->country_model->validation_attributes);\n if ($validator->fails()) {\n return redirect('country/index')\n ->withErrors($validator)\n ->withInput();\n }//End validator, if\n $data = $this->constructData($request);\n try {\n //Save valid data into database and return country index view\n //with added success notice.\n $this->country_model->insertCountry($data);\n return redirect('country/index')->with('added_notice', 'New country has been added successfully.');\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage())]);\n }//End try-catch\n }", "public function store(CountryRequest $request)\n {\n $country = Country::create($request->all());\n\n $country->addAllMediaFromTokens();\n\n flash(trans('countries.messages.created'));\n\n return redirect()->route('dashboard.countries.show', $country);\n }", "public function create() {\n $countries = Country::all();\n return view('account.addresses.create', compact('countries'));\n }", "public function create()\n {\n if($this->permissionDetails('Hase_merchant','add')){\n $title = 'Create - hase_country';\n \n return view('hase_country.create');\n }else{\n return Redirect::back()->with('message', 'You are not authorized to use this functionality!');\n }\n }", "public function create()\n {\n $countries = Country::all();\n return view('backEnd.currencies.create',compact('countries'));\n }", "public function actionCreate()\n {\n $model = new City();\n $model->status = 'Active';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n Yii::$app->session->setFlash('success', 'Governorate info created successfully!');\n return $this->redirect(['index']);\n\n } else {\n\n $countries = Country::loadcountry();\n $country = ArrayHelper::map($countries, 'country_id', 'country_name');\n\n return $this->render('create', [\n 'model' => $model, 'country' => $country,\n ]);\n }\n\n }", "public function store(Request $request)\n {\n request()->validate([\n 'country_id' => 'required',\n 'region_id' => 'required',\n ]);\n\n Country::create($request->all());\n\n return redirect()->route('drzava.index')\n ->with('success','Nova država je uspješno kreirana.');\n\n }", "public function create()\n {\n $countries = $this->country->get(['id', 'name']);\n return view('admin.shipping_companies.create', compact('countries'));\n }", "public function store()\n {\n Request::validate([\n 'name' => 'required|unique:countries',\n 'association_id' => 'required|exists:associations,id|numeric',\n ]);\n \n $all = Request::all();\n $country = Country::create($all);\n \n session()->flash('success_message', 'Country Created Successfully..');\n return redirect()->action('CountryController@edit', ['id' => $country->id]);\n }", "public function create()\n {\n $data['countries'] = countries::all();\n return view('', $data);\n }", "public function country() {\n return $this->hasOne(Country::class);\n }", "public function create()\n {\n $countries = Country::orderBy('country_name_en')->pluck('country_name_en', 'id')->toArray();\n $timezones = Timezone::orderBy('timezone_name')->pluck('timezone_name', 'id')->toArray();\n\n $home_country = Country::where('id', Auth::user()->home_country_code)->pluck('country_name_en', 'id')->toArray();\n\n //dd(value($home_country));\n\n return view('place.create', compact('countries', 'timezones', 'home_country'));\n }", "abstract public function country();", "public function create()\n {\n $countries = Countries::all();\n return view('backend.system.cities.create',compact(['countries']));\n }", "function SaveCountry($country)\n\t{\n\t\t$result = $this->sendRequest(\"SaveCountry\", array(\"Country\"=>$country));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function create(Request $request)\n {\n try {\n $model = new LeaseAssetCountries();\n $countries = Countries::query()->where('status', '=', '1')->get();\n if ($request->isMethod('post')) {\n $validator = Validator::make($request->all(), [\n 'country_id' => [\n 'required',\n 'exists:countries,id',\n Rule::unique('lease_asset_countries', 'country_id')->where(function ($query) use ($request) {\n return $query->whereIn('business_account_id', getDependentUserIds());\n })\n ]\n ],[\n 'country_id.unique' => 'This country has already been added.'\n ]);\n\n if($validator->fails()){\n return redirect()->back()->withErrors($validator->errors())->withInput($request->all());\n }\n\n $model = LeaseAssetCountries::create([\n 'country_id' => $request->country_id,\n 'business_account_id' => getParentDetails()->id\n ]);\n\n if($model){\n return redirect(route('settings.index'))->with('status', 'Country has been added successfully.');\n }\n }\n return view('settings.general.leaseassetcountries.create', compact(\n 'model',\n 'countries'\n ));\n } catch (\\Exception $e) {\n dd($e);\n }\n }", "public function setCountry($newCountry){\n\t}", "public function country()\n {\n return $this->hasOne('App\\Country','code','country_code');\n }", "public function create()\n {\n $langs=Lang::lists('language','id');\n return view('backend.countries.create')->with('langs',$langs);\n }", "public function new($id = '', $iso3) {\n\t\t$code = new TariffCodeCountry();\n\t\t$code->setId($id);\n\t\t$code->setCountry($iso3);\n\t\t$code->setDummy('P');\n\t\treturn $code;\n\t}", "public function store(CountryFormRequest $request)\n {\n $response = $this->countryService->create($request);\n if (!$response['status']) {\n return redirect()->back()\n ->with('response', $response);\n }\n\n return redirect()->route('system.countries.index')\n ->with('response', $response);\n }", "public function store(CreateContryRequest $request)\n {\n $input = $request->all();\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->contryRepository->model());\n try {\n $user_id = $this->_user_register($input);\n $input['user_id'] = $user_id;\n $input['dob'] = date(\"Y-m-d\", strtotime($input['dob']));\n $category = $this->contryRepository->create($input);\n $category->customFieldsValues()->createMany(getCustomFieldsValues($customFields, $request));\n if (isset($input['image']) && $input['image']) {\n $cacheUpload = $this->uploadRepository->getByUuid($input['image']);\n $mediaItem = $cacheUpload->getMedia('image')->first();\n $mediaItem->copy($category, 'image');\n }\n } catch (ValidatorException $e) {\n Flash::error($e->getMessage());\n }\n\n Flash::success(__('Country Saved successfully', ['operator' => __('lang.category')]));\n\n return redirect(route('country.index'));\n }", "protected function loadCountry()\n {\n $country = Country::findOne([\n 'code' => 'es'\n ]);\n $this->countryId = $country->id;\n }", "public static function countryCreate(string $country)\n {\n $query = Core::query('country-create');\n $query->bindValue(':country', $country);\n $query->execute();\n return Configuration::read('db.link')->lastInsertId();\n }", "public function store(Request $request)\n {\n $this->validate($request,array(\n 'name' => 'required',\n 'name_ar' => 'required',\n 'number' => 'required',\n 'price' => 'required',\n 'charges' => 'required',\n 'view' => 'required',\n ));\n\n $data = new Country();\n $data->name = $request->name;\n $data->name_ar = $request->name_ar;\n $data->national_id = $request->number;\n $data->view = $request->view;\n $data->account_price = $request->price;\n $data->charges = $request->charges;\n $data->save();\n\n session()->flash('message','Country Added Successfully');\n return redirect()->back();\n //\n }", "function addNewCountry()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->library('form_validation');\n \n $this->form_validation->set_rules('name','Name','trim|required|max_length[128]');\n \n if($this->form_validation->run() == FALSE)\n {\n $this->addNew();\n }\n else\n {\n $name = ucwords(strtolower($this->input->post('name')));\n \n $countryInfo = array('name'=> $name, 'status'=> 1, 'deleted'=> 2, 'created_by'=>$this->vendorId, 'create_time'=>date('Y-m-d H:i:s'));\n \n $this->load->model('country_model');\n $result = $this->country_model->addNewCountry($countryInfo);\n \n if($result > 0)\n {\n $this->session->set_flashdata('success', 'New Country created successfully');\n }\n else\n {\n $this->session->set_flashdata('error', 'Country creation failed');\n }\n \n redirect('admin/Country/addNew');\n }\n }\n }", "public function getCountry()\n {\n return $this->hasOne(Countries::className(), ['id' => 'country_id']);\n }", "public function actionAddCountryCode()\n {\n Loads::addCountryCode();\n }", "public function create()\n {\n $countries = City::where('parent_id', 0)->get();\n return view('admin.countries-cities.create', compact('countries'));\n }", "public function store(CountryCityRequest $request)\n {\n $countryCity = new City();\n $availablelocales = \\Localization::getLocales();\n foreach ($availablelocales as $locale => $value){\n $countryCity->translateOrNew($locale)->name = $request['name_'.$locale];\n }//end for each\n $countryCity->parent_id = $request->parent_id;\n $countryCity->save();\n session()->flash('message', trans('sweet_alert.added_successfully'));\n return redirect(route('countries-cities.index'));\n }", "public function create()\n {\n $countries = Country::all();\n return view('admin.cities.create', compact('countries'));\n }", "public function getCountry()\n {\n return $this->hasOne(Country::className(), ['id' => 'country_id']);\n }", "public function create()\n {\n $countries = Country::all();\n return view('cms.center.edit', compact('countries'));\n }", "public function createAction(Request $request)\n {\n $entity = new City();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\t $city = $em->getRepository('NvCargaBundle:City')->findOneBy(array('state' => $entity->getState(), 'name' => $entity->getName()));\n\t if ($city) {\n\t\tthrow $this->createNotFoundException('Existe una ciudad con ese nombre en ese estado..');\n\t }\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('city_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n $countries = Country::all();\n return view('backend.manufacture.create',compact('countries'));\n }", "public function create()\n {\n $user_id=Auth::id();\n $role=Auth::user()->role;\n $permission_key = \"country_add\";\n $getpermissionstatus = getpermissionstatus($user_id,$role,$permission_key);\n if($getpermissionstatus==0)\n return redirect()->route('user-management.unauthorized');\n $countries = Country::all()->toArray();\n return view('countries/create');\n }", "public function store(ProvinceCreateRequest $request)\n {\n\n $province = Province::create([\n 'name' => $request->name,\n ]);\n return (new ProvinceResource($province))->additional([\n 'errors' => null,\n ])->response()->setStatusCode(201);\n }", "public function create()\n {\n if(LaravelLocalization::getCurrentLocale() == 'ar'){\n $name = 'name_ar';\n }else{\n $name = 'name_en';\n }\n $countries = Country::select('id', \"$name as name\")->get();\n return view('backend.cities.create', compact('countries'));\n }", "public function country() {\n return $this->hasOne('App\\Country', 'id', 'country_id');\n }", "public function create()\n {\n return view(\"admin.cities.create\", [\"countries\" => Country::all()]);\n }", "public function createEntity();", "public function create(){\n\t\tif(!$this->session->userdata(\"user_id\")){\n\t\t\treturn redirect(\"auth\");\n\t\t}else{\n\t\t\t$countries = $this->countries_model->get_countries();\n\t\t\t$user = $this->membership_model->get_authenticated_user_by_id($this->session->userdata(\"user_id\"));\n\t\t\t$this->load->view('vendors/create', ['user' => $user, 'countries' => $countries]);\n }\n }", "public function create()\n {\n $data = [\n 'countries' => Country::all()\n ];\n return view('cms.city.edit', $data);\n }", "public function create(NationalityCreateRequest $request) : NationalityResource\n {\n $result = $this->nationalityService->saveNationality($request->only(['nationality']));\n\n return (new NationalityResource($result))\n ->additional(['message' => config('api-response-messages.nationality_add_success.message')]);\n }", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function actionCreate()\n {\n\t\t\tif (Yii::$app->user->can('create-countries'))\n\t\t\t{\n\t\t\t\t$model = new Mtprovinces();\n\n if ($model->load(Yii::$app->request->post())) {\n\t\t\t\t\t$model->province_created = date('Y-m-d h:i:s');\n\t\t\t\t\t$model->province_status = 'ACTIVE';\n\t\t\t\t\t$model->province_updated = date('Y-m-d h:i:s');\n\t\t\t\t\t$model->save();\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new ForbiddenHttpException; \n\t\t\t}\n \n }", "public function getCountry()\n {\n return $this->hasOne(Country::className(), ['country_id' => 'country_id']);\n }", "public function store(Request $request)\n {\n \n $this->validateInput($request);\n Country::create([\n 'range_code' => $request['range_code'],\n 'range_within_albertine_rift' => $request['range_within_albertine_rift'],\n 'range_within_albertine_rift_fr' => $request['range_within_albertine_rift_fr'],\n 'created_by'=>$request['created_by']\n\n ]);\n\n Session::flash('flash_message', \"Country Created Successfully.\"); //Snippet in Master.blade.php \n return redirect()->route('country.index');\n }", "public function getCountry(): CountryInterface;", "public function store(Request $request)\n {\n $request->validate([\n 'country_name' => 'required|unique:countries,country_name'\n ]);\n\n $country = new Country;\n $country->country_name = $request->country_name;\n $save = $country->save();\n if($save)\n {\n return redirect()->route('countries.index')->with('success','Country created successfully.');\n }\n }", "public function run()\n {\n Country::create([\n 'en' => [\n 'name' => 'Egypt'\n ],\n 'ar' => [\n 'name' => 'مصر'\n ],\n\n 'currency' => 'EGP'\n ]);\n }", "public function create()\n {\n $country = country::all();\n if ($country->count() > 0) {\n $country = country::orderBy('created_at', 'desc')->first();\n return redirect()->action(\n 'PayoutRates@edit', ['id' => $country->id]\n );\n } else {\n return view('admin.crud.rates.create');\n }\n }", "public function setCountry($value)\n {\n return $this->setParameter('country', $value);\n }", "public function create()\n {\n $allCountries = Country::active()->whereDoesntHave('currency')->get();\n return view('backend.modules.currency.create', compact('allCountries'));\n }", "public function add_country(Request $request)\n\t{\n\t\t$arr_rules = $arr_data = array();\n\t\t$status = false;\n\n\t\t$arr_rules['add_english_name'] \t \t= \"required\";\n\t\t$arr_rules['add_arabic_name'] \t\t\t= \"required\";\n\n\t\t$validator = Validator::make($request->all(),$arr_rules);\n\n\t\tif($validator->fails()) \n\t\t{\n\t\t\treturn redirect()->back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$str1 = \"0123456789\";\n $str2 = str_shuffle($str1);\n $country_id = substr($str2,0,6); \n\n\t\t$arr_data['country_id'] \t\t \t\t= $country_id;\t\n\t\t$arr_data['country_english_name'] \t= $request->input('add_english_name', null);\t\n\t\t$arr_data['country_arabic_name'] \t\t= $request->input('add_arabic_name', null);\t\n\t\t$arr_data['aramex_country_id'] \t\t= $request->input('aramex_country_id', null);\t\n\n\t\t$status = $this->BaseModel->create($arr_data);\n\n\t\tif($status)\n\t\t{\n\t\t\tSession::flash('success', 'Country added successfully.');\n\t\t\treturn redirect($this->module_url_path);\n\t\t}\n\n\t\tSession::flash('error', 'Error while adding country.');\n\t\treturn redirect($this->module_url_path);\n\t}", "public function addState(CountryInterface $country, $stateCode, $stateName);", "public function create()\n {\n $main = new MainClass();\n $main = $main->getMain();\n $valor = $this->validPermisoMenu();\n if ($valor == false){\n return view('errors.403', compact('main'));\n }\n return view('countries.create',compact('main'));\n }", "public function setCountry($value)\n {\n parent::setValue('country', $value);\n\n return $this;\n }", "public function store(Request $request)\n {\n $hase_country = new Country();\n\n $hase_country->country_name = $request->country_name;\n \n $hase_country->iso_code_2 = $request->iso_code_2;\n\n $hase_country->iso_code_3 = $request->iso_code_3;\n\n $hase_country->format = $request->format;\n\n $hase_country->status = (isset($request->status)) ? 1 : 0 ;\n \n $hase_country->country_phone_code = $request->country_phone_code;\n\n $hase_country->telephone_min = $request->telephone_min;\n\n $hase_country->telephone_max = $request->telephone_max;\n \n $hase_country->save();\n\n $countryID = $hase_country->country_id;\n\n if($request->file('flag')){\n\n $publicDirPath = public_path(env('image_dir_path'));\n $countryFlagDirPath = \"flags/\";\n\n $flagDirPath = $publicDirPath.$countryFlagDirPath;\n\n if(!file_exists($flagDirPath)){\n mkdir($flagDirPath,0777,true);\n }\n\n if($request->file('flag')){\n\n $countryFlag = $request->file('flag')->getClientOriginalName();\n $request->file('flag')->move($flagDirPath,$countryFlag);\n $hase_merchant->flag = \"$countryFlagDirPath$countryFlag\";\n }\n\n $hase_country->save();\n }\n\n $staffUrl = \"/hase_staff/\".$this->staffId.\"/edit\";\n $countryUrl = \"/hase_country/\".$countryID.\"/edit\";\n $action=\"added\";\n\n $message = \"<a href='\".URL::to($staffUrl).\"'>\".$this->staffName.\"</a> <strong>added</strong> country <a href='\".URL::to($countryUrl).\"'> <strong>\".$hase_country->country_name.\"</strong></a>\";\n PermissionTrait::addActivityLog($action,$message);\n\n Session::flash('type', 'success'); \n Session::flash('msg', 'Country Successfully Created'); \n\n if($request->submitBtn === \"Save\") {\n return redirect('hase_country/'. $countryID . '/edit');\n }else{\n return redirect('hase_country');\n }\n }", "public function create()\n\t{\n\t\t$countriesList = Country::lists('name', 'id');\n\t\treturn view('admin.cities.create', compact('countriesList'));\n\t}", "function GetCountry()\n\t{\n\t\t$country = new Country();\n\t\treturn $country->Get($this->countryId);\n\t}", "public function createEntity()\n {\n $createdCompany = new Company();\n $createdCompany->setTitle('Test Company')\n ->setIco('11025848744')\n ->setDic('1258745968444')\n ->setStreet('Cesta 125')\n ->setZip('021478')\n ->setCity('Bratislava')\n ->setCountry('Slovenska Republika');\n\n $this->em->persist($createdCompany);\n $this->em->flush();\n\n return $createdCompany;\n }" ]
[ "0.76388085", "0.7267771", "0.72250867", "0.7150951", "0.6758067", "0.66717476", "0.66432697", "0.6642243", "0.66173375", "0.6568842", "0.64945376", "0.64041233", "0.6388463", "0.63336277", "0.6328388", "0.6306837", "0.62879544", "0.62764883", "0.6272283", "0.6260812", "0.62574863", "0.6252948", "0.6252948", "0.6247653", "0.6242998", "0.6240507", "0.6201464", "0.6201464", "0.61882013", "0.61494476", "0.6130484", "0.605076", "0.60378665", "0.601592", "0.6007692", "0.59998083", "0.59535915", "0.5940034", "0.5929568", "0.5920584", "0.59115213", "0.5891625", "0.58662784", "0.5861173", "0.5856823", "0.5841006", "0.5835105", "0.5831199", "0.5819608", "0.5812338", "0.58072406", "0.5803789", "0.57898474", "0.577241", "0.5769423", "0.57549775", "0.5742825", "0.57407284", "0.57382756", "0.5716202", "0.57071", "0.5706408", "0.57024896", "0.56933755", "0.56893605", "0.5686123", "0.5685065", "0.56715685", "0.5655696", "0.56536156", "0.56512177", "0.56406146", "0.5620414", "0.5616637", "0.5610924", "0.5606543", "0.5606277", "0.55801874", "0.55745286", "0.5562556", "0.5551252", "0.5539621", "0.5538825", "0.5533201", "0.55317444", "0.55238074", "0.55196047", "0.54970413", "0.5475355", "0.54720426", "0.54711264", "0.5438983", "0.5422475", "0.5418869", "0.54038846", "0.5398086", "0.5392286", "0.5376934", "0.53748405", "0.53717965" ]
0.65021324
10
Finds and displays a country entity.
public function showAction(Country $country) { $deleteForm = $this->createDeleteForm($country); return $this->render('country/show.html.twig', array( 'country' => $country, 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Country $country)\n {\n //\n }", "public function show(Country $country)\n {\n //\n }", "public function locationshowAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('adminBundle:countries')->findAll();\n return $this->render(':Location:index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "public function getCountry() {}", "public function getCountry() {}", "function countryAction() {\n\t\t$oFilter = utilityInputFilter::filterString();\n\t\t$country = $oFilter->doFilter($this->getActionFromRequest(false, 1));\n\n\t\tif ( !$country || strlen($country) != 2 ) {\n\t\t\t$country = null;\n\t\t}\n\n\t\t$this->getModel()->setCountry($country);\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\tif ( $country ) {\n\t\t\t$oView->showCountryLeaderboard();\n\t\t} else {\n\t\t\t$oView->showCountryList();\n\t\t}\n\t}", "public function getCountry();", "public function getCountry();", "abstract public function country();", "public function getCountryName();", "function country()\n {\n $this->data['result'] = \\DB::table('countries')->get();\n return view('backend.pages.country')->with($this->data);\n }", "protected function loadCountry()\n {\n $country = Country::findOne([\n 'code' => 'es'\n ]);\n $this->countryId = $country->id;\n }", "public function show(Country $country)\n {\n return view('backend.countries.show')->with('country',$country);\n }", "public function countryfilterAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromRoute('country', null);\n\n // Filter posts by Country\n $query = $this->entityManager->getRepository(Post::class)->findPostsByCountry($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $countries = $em->getRepository('B2bBundle:Country')->findAll();\n\n return $this->render('country/index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "function GetCountry()\n\t{\n\t\t$country = new Country();\n\t\treturn $country->Get($this->countryId);\n\t}", "public function actionGetnearbycountry(){\t\t\n\t\t$ip = $this->get_client_ip();\n\t\tif($ip){\n\t\t\t$countries = Countries::model()->get_current_nearbycountries($ip);\n\t\t}\n\t\techo $countries;\n\t\tYii::app()->end();\t\t\n\t}", "public function getCountryInfo($countryId);", "public function requestCountry();", "public function getCountry()\n {\n return $this->hasOne(Countries::className(), ['id' => 'country_id']);\n }", "public function country() {\n return $this->hasOne(Country::class);\n }", "public function getCountry() \n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->hasOne(Country::className(), ['id' => 'country_id']);\n }", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getCountry(): CountryInterface;", "public function getCountriesInfo();", "public function show(Country $country)\n {\n return view('system.country.edit', compact('country'));\n }", "public function getCountryBasedContinentAction()\n {\n $continent = $this->getRequest()->getParam(\"continent_name\"); \n $countryList = array(); \n $storeCol = Mage::getModel('archana_storelocator/storelocator')->getCollection()\n ->addFieldToFilter('continent', $continent); \n $storeCol->getSelect()->group('country');\n $html = '<select name=\"country\" id=\"country\">\n\t\t\t<option value=\"\"> -- Please Select -- </option>';\n foreach ($storeCol as $_country) {\n $countryCode= $_country->getCountry();\n $country = Mage::helper('archana_storelocator')->getCountryNameByCode($countryCode);\n $html .= '<option value=\"' . $countryCode . '\">' . $country . '</option>';\n }\n $html.='</select>'; \n echo $html; \n }", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getCountry()\n {\n return $this->hasOne(Country::className(), ['country_id' => 'country_id']);\n }", "public function country() {\n return $this->hasOne('App\\Country', 'id', 'country_id');\n }", "public function getCountry()\n {\n return $this->hasOne(Countries::class, ['id' => 'country_id'])->inverseOf('orders');\n }", "protected function displayRestrictedCountryPage()\n {\n }", "protected function displayRestrictedCountryPage()\n {\n }", "protected function displayRestrictedCountryPage()\n {\n }", "public function getCountry()\n {\n return $this->getParameter('country');\n }", "public function show($id)\n {\n try {\n $qb = Country::query()->where('id', $id);\n\n return parent::get($qb);\n } catch (\\Exception $e) {\n return parent::error($e);\n }\n }", "public function country()\n {\n return $this->hasOne('App\\Country','code','country_code');\n }", "function getCountry() {\r\r\n\t\treturn $this->country;\r\r\n\t}", "public function index()\n {\n $country = Country::get();\n return view('country.index', compact('country'));\n }", "public function show($id)\n {\n $category = $this->contryRepository->findWithoutFail($id);\n\n if (empty($category)) {\n Flash::error('Country not found');\n\n return redirect(route('country.index'));\n }\n\n return view('country.show')->with('country', $category);\n }", "public function country(): string\n {\n return $this->country;\n }", "public function setCountry($value)\n {\n return $this->setParameter('country', $value);\n }", "public function actionCountry($c)\n\t{\n\t\tif($c=='US')\n\t\t$c='United States';\n\t\tYii::app()->request->cookies['presentC']=new CHttpCookie('presentC', $c);\n\t\t$this->layout='front_layout';\n\t\tYii::app()->clientScript->registerCoreScript('jquery'); \n\t\t$criteria = new CDbCriteria();\n\t\t$con=\"exists(select * from photos where user_id=t.user_id) and userLocation.user_location_country LIKE '%$c%'\";\n\t\t$con.=\" AND userDetails.user_unique_url<>'poslyadmin'\";\n\t\t$criteria->condition = $con;\n\t\t$criteria->limit=$this->cartlimit;\n\t\t$allusersphotos=Users::model()->with('photos','userDetails', 'userLocation')->findAll($criteria); \n\t\t$this->render('country', array('photos'=>$allusersphotos));\n\t}", "public function getCountry()\n {\n return $this->getValueObject('country');\n }", "public function country_name($country)\n {\n $result = common_select_values('name', 'ad_countries', ' id = \"'.$country.'\"', 'row');\n return $result; \n }", "public function show(Country $country, CityFilter $filter)\n {\n $this->authorize('view', $country);\n\n $country = $this->repository->find($country);\n\n $cities = $this->repository->cities($country);\n\n return view('countries::countries.show', compact('country', 'cities'));\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function index(CountryDataTable $country)\n {\n return $country->render('admin.countries.index',['title'=>trans('admin.countries')]);\n }", "public function inCountry(string $country): Discover\n {\n $this->paramIn = \"countryCode:\" . $country;\n return $this;\n }", "public function country()\n\t{\n\t\treturn $this->belongsTo('Country');\n\t}", "public function countries()\n {\n $countries = Countries::where('status', 'active')->orderBy('idx')->get();\n return view('setup.countries.index', compact('countries'));\n }", "function getSpecificCountry() {\n $myModel = new My_Model();\n $countryName = \"Pakistan\";\n $whereArray = [\n \"country_name\" => $countryName\n ];\n $result = $myModel->select('countries', \"*\", $whereArray);\n if (count($result) === 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "public function show($id)\n {\n $country = countries::findOrFail($id);\n return response($country);\n }", "public function show($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n\n if (empty($country)) {\n Log::error('Pais, Show, No se encuentra el pais: ' . $id);\n Flash::error('Country not found');\n\n return redirect(route('admin.countries.index'));\n }\n\n return view('admin.countries.show')->with('country', $country);\n }", "function getCountryRegion($country) {\n\treturn getDetailedTableInfo2(\"vl_countries\",\"lower(country)=lower('$country')\",\"region\");\n}", "public function edit(Country $country)\n {\n \n }", "public function show(Country $country)\n {\n $cities = $country->cities()->filter()->paginate();\n\n return view('dashboard.countries.show', compact('country', 'cities'));\n }", "public function show($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n\n if (empty($country)) {\n Log::error('Pais, Show, No se encuentra el pais: ' . $id);\n Flash::error('Country not found');\n\n return redirect(route('countries.index'));\n }\n\n return view('countries.show')->with('country', $country);\n }", "public function country()\n {\n return $this->belongsTo(\\App\\Models\\Country::class);\n }", "public function editAction(Request $request, Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n $editForm = $this->createForm('B2bBundle\\Form\\CountryType', $country);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('backoffice_country_edit', array('id' => $country->getId()));\n }\n\n return $this->render('country/edit.html.twig', array(\n 'country' => $country,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function index()\n {\n $countries = $this->repository->all();\n\n return view('countries::countries.index', compact('countries'));\n }", "public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}", "public function index()\n {\n $countries = $this->countryService->getAll();\n\n return view('system.country.index', compact('countries'));\n }", "public function getShow($id = null)\n {\n return View::make('admin.countries.show');\n }", "public function index(Country $country)\n {\n $data = [\n 'title' => 'Регионы',\n 'country' => $country,\n 'regions' => $country->regions()->paginate(25)\n ];\n\n return view('admin.regions.index', $data);\n }", "function creditcard_country_pulldown($countryid, $slng = 'eng', $fieldname = 'form[countryid]')\n {\n global $ilance;\n $sql = $ilance->db->query(\"\n SELECT locationid, location_$slng AS location\n FROM \" . DB_PREFIX . \"locations\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n while ($res = $ilance->db->fetch_array($sql, DB_ASSOC))\n {\n\t\t\t\t$values[$res['locationid']] = ucwords(stripslashes($res['location']));\n }\n }\n return construct_pulldown($fieldname, $fieldname, $values, $countryid, 'style=\"font-family: Verdana\"');\n }", "public function countryCode();", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => GeoCountry::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function show($id)\n {\n $countries = Country::find($id);\n // Redirect to taxon list if updating taxon wasn't existed\n if ($countries == null || count($countries) == 0) {\n return redirect()->intended('/country');\n }\n\n return view('countries/show', ['countries' => $countries]);\n \n \n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }", "public function getCountry() :string\n {\n return $this->country;\n }", "function outputCountries() { \r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n \r\n for($i=0;$i<$countries->getCount();$i++){ \r\n\t\techo '<li class=\"list-group-item\">';\r\n\t\techo '<a href=\"single-country.php?country='. $result[$i]->getISO() . '\">';\r\n\t\techo $result[$i]->getCountryName() . '</a></li>';\r\n }\r\n}", "public function all(Country $country)\n {\n /*if (Auth::user()->can('divisions.viewAny')) {*/\n $countries = Country::all();\n $divisions = $country->division;\n /*foreach ($divisions as $division) {\n echo $division->name;\n }*/\n return view('admin.division.show', compact('countries', 'divisions'));\n /*}*/\n /*return redirect(route('admin.home'));*/\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "public function country()\n {\n return $this->belongsTo('App\\Models\\Country', 'country_id');\n }", "public function country($country_id)\n {\n $this->where('user_addresses.country_id', $user_id);\n }", "public function cgetAction()\n {\n return $this->handleView(\n $this->view(\n new CollectionRepresentation($this->get('sulu_contact.country_repository')->findAll(), 'countries')\n )\n );\n }", "public function countryRegionAction()\n {\n $arrRes = array();\n\n $countryId = $this->getRequest()->getParam('parent');\n $colRegions = Mage::getResourceModel('directory/region_collection')\n ->addCountryFilter($countryId)\n ->load();\n \n\t$arrRegions = $this->_toOptionArray($colRegions);\n if (!empty($arrRegions)) {\n foreach ($arrRegions as $region) {\n $arrRes[] = $region;\n }\n }\n\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($arrRes));\n }", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n /*\n $entities = $em->getRepository('NvCargaBundle:City')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n */\n $listall = $this->getUser()->getMaincompany()->getCountries();\n $countries = array();\n $count = 0;\n foreach ($listall as $country) {\n $countries[$count]['id'] = $country->getId();\n $countries[$count]['name'] = $country->getName();\n $count++;\n }\n return $this->render('NvCargaBundle:City:index.html.twig',array('countries' => $countries)); \n\n }", "public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }", "public function country()\n {\n return $this->belongsTo(Country::class);\n }", "public function country()\n {\n return $this->belongsTo(Country::class);\n }", "public function country()\n {\n return $this->belongsTo(Country::class);\n }", "public function country()\n {\n return $this->belongsTo(Country::class);\n }" ]
[ "0.7471192", "0.7471192", "0.7003136", "0.67974126", "0.67974126", "0.6788679", "0.67744666", "0.67744666", "0.67091", "0.653223", "0.6467174", "0.6461364", "0.6370003", "0.6324962", "0.63099176", "0.6299033", "0.621986", "0.6217114", "0.61598784", "0.61532485", "0.6152757", "0.6152139", "0.61468464", "0.61375785", "0.6127125", "0.6120508", "0.60877955", "0.6050245", "0.6045108", "0.5982847", "0.59689635", "0.5958035", "0.5953863", "0.5953863", "0.5953863", "0.5949961", "0.5931887", "0.5927202", "0.59270775", "0.59220964", "0.59151244", "0.5904187", "0.5898237", "0.58899635", "0.58829486", "0.5865274", "0.5853415", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58468854", "0.58245784", "0.58140385", "0.58076924", "0.58033943", "0.5799467", "0.57960916", "0.57951474", "0.578653", "0.5783695", "0.57825893", "0.5780499", "0.5774801", "0.5771318", "0.573843", "0.5734082", "0.5733519", "0.5729316", "0.5716179", "0.56857073", "0.56805944", "0.567938", "0.56595814", "0.56595814", "0.56579876", "0.56566906", "0.5651431", "0.56408435", "0.56352353", "0.56319267", "0.5626986", "0.5624384", "0.56236696", "0.5619185", "0.56130505", "0.5610675", "0.5607366", "0.5607366", "0.5607366", "0.5607366" ]
0.68108064
3
Displays a form to edit an existing country entity.
public function editAction(Request $request, Country $country) { $deleteForm = $this->createDeleteForm($country); $editForm = $this->createForm('B2bBundle\Form\CountryType', $country); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $this->getDoctrine()->getManager()->flush(); return $this->redirectToRoute('backoffice_country_edit', array('id' => $country->getId())); } return $this->render('country/edit.html.twig', array( 'country' => $country, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Country $country)\n {\n \n }", "public function edit(Country $country)\n {\n $langs=Lang::lists('language','id');\n return view('backend.countries.edit')->with('country',$country)->with('langs',$langs);\n }", "public function edit(Country $country)\n {\n return view('system.country.edit', compact('country'));\n }", "function edit($country_code)\n { \n // check if the country exists before trying to edit it\n $data['country'] = $this->Country_model->get_country($country_code);\n $data['authLevel'] = 1;\n $this->load->view('templates/loginAuth', $data);\n if(isset($data['country']['country_code']))\n {\n $this->load->library('form_validation');\n\n\t\t\t$this->form_validation->set_rules('country_name','Country Name','required|max_length[30]');\n\t\t\t$this->form_validation->set_rules('country_abbreviation','Country Abbreviation','required|max_length[5]');\n\t\t\n\t\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t\t'country_name' => $this->input->post('country_name'),\n\t\t\t\t\t'country_abbreviation' => $this->input->post('country_abbreviation'),\n );\n\n $this->Country_model->update_country($country_code,$params); \n redirect('country/index');\n }\n else\n {\n $data['_view'] = 'country/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The country you are trying to edit does not exist.');\n }", "public function edit(Country $country)\n {\n return view('countries::countries.edit', compact('country'));\n }", "public function edit($id)\n {\n $country = Country::find($id);\n return view('admin.countries.edit',['country'=>$country,'title'=>trans('admin.edit_country')]);\n }", "public function edit($countryId)\n {\n $country=$this->countryRepository->getCountryById($countryId);\n return view('backend.constants.countries.country',compact('country'));\n }", "public function edit(Country $country)\n {\n return view('dashboard.countries.edit', compact('country'));\n }", "public function edit($id)\n {\n $country = country::findOrFail($id);\n return view('admin.countries.edit',['title'=> trans('admin.edit_country') ,'country'=>$country]);\n }", "public function edit($id){\n $where=array(\n 'id'=>$id\n );\n $country=$this->Mdl_country->getRecord($where);\n $data=array(\n 'country'=>$country\n );\n $this->load->view('countries/edit',$data);\n }", "public function edit($id)\n {\n $country=Country::find($id);\n return view('admin.countries.edit',compact('country'));\n }", "public function edit($id)\n {\n $country = Country::findOrFail($id);\n\n return view('admin.countries.edit')->with([\n 'country' => $country\n ]);\n }", "public function show(Country $country)\n {\n return view('system.country.edit', compact('country'));\n }", "public function edit($id)\n {\n $country = Country::findOrFail($id);\n $association = Association::pluck('name','id');\n \n return view('country.edit', compact('country','association'));\n }", "function editCountry()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->library('form_validation');\n \n $countryId = $this->input->post('id');\n \n $this->form_validation->set_rules('name','Name','trim|required|max_length[128]');\n \n if($this->form_validation->run() == FALSE)\n {\n $this->editOld($countryId);\n }\n else\n {\n $name = ucwords(strtolower($this->input->post('name')));\n \n $countryInfo = array();\n \n $countryInfo = array('name'=>$name, 'updated_by'=>$this->vendorId, 'update_time'=>date('Y-m-d H:i:s'));\n \n $result = $this->country_model->editCountry($countryInfo, $countryId);\n \n if($result == true)\n {\n $this->session->set_flashdata('success', 'country updated successfully');\n }\n else\n {\n $this->session->set_flashdata('error', 'Country updation failed');\n }\n \n redirect('admin/country/countryListing');\n }\n }\n }", "private function createEditForm(Country $entity)\n {\n $form = $this->createForm(new CountryType($this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale')), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_country_update', array('iso_code' => $entity->getIsoCode())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Country $country)\n {\n $country = Country::find($country->id);\n return view('dashboard.countries.edit', compact('country'));\n }", "public function editcountry($id){\n if($this->session->user) {\n $data['user'] = $this->session->user;\n } else {\n $data['user'] = null;\n }\n //Check and load user session data\n if($this->session->user['u_email'] === '[email protected]') {\n $data['user'] = $this->session->user;\n } else {\n $data['user'] = null;\n redirect('/');\n }\n $data['country'] = $this->admin_model->editcountry($id);\n $this->load->view('includes/head');\n $this->load->view('includes/nav_admin', $data);\n $this->load->view('includes/side_admin', $data);\n $this->load->view('includes/admin/edit/country', $data);\n $this->load->view('includes/admin/footer');\n $this->load->view('includes/functions');\n }", "public function getEdit($countryId)\n {\n $dataCountry = TfCountry::find($countryId);\n if (count($dataCountry) > 0) {\n return view('manage.content.system.country.edit', compact('dataCountry'));\n }\n }", "function editOld($countryId = NULL)\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n if($countryId == null)\n {\n redirect('admin/country/countryListing');\n }\n \n \n $data['countryInfo'] = $this->country_model->getCountryInfo($countryId);\n \n $this->global['pageTitle'] = 'Touba : Edit Country';\n \n $this->loadViews(\"admin/country/editOld\", $this->global, $data, NULL);\n }\n }", "public function getEdit($id = null)\n {\n $country = $this->countryRepo->byId($id);\n if ( is_null($id) || is_null($country) )\n {\n return Redirect::route('admin.countries.create');\n }\n else\n {\n return View::make('admin.countries.edit',array('country' => $country, \"status_list\" => $this->statusList));\n }\n }", "public function edit($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n\n if (empty($country)) {\n Log::error('Pais, Edit, No se encuentra el pais: ' . $id);\n Flash::error('Country not found');\n\n return redirect(route('admin.countries.index'));\n }else if($country->nativo){\n Log::error('Pais, Edit, El pais' . $id . ' no se puede editar ya que es un registro nativo.');\n Flash::error('El pais no se puede editar ya que es un registro nativo.');\n\n return redirect(route('admin.countries.show', [$country->id]));\n }\n\n return view('admin.countries.edit')->with('country', $country);\n }", "public function showAction(Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n\n return $this->render('country/show.html.twig', array(\n 'country' => $country,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(Country $country, $id)\n {\n $country = Country::find($id);\n return view('country.edit', ['country' => $country]);\n }", "public function showEditForm($country,$town)\n {\n $countries = Country::where('name','!=',$country)->orderBy('name','asc')->get();\n\n //fetch the specific town info to obtain id\n $db_town = Town::where('name',$town)->first();\n $data=array(\n 'town'=>$town,\n 'town_id'=>$db_town->id,\n 'country'=>$country,\n 'country_id'=>$db_town->country_id,\n 'countries'=>$countries\n );\n return view('admin.pages.edit_town')->with($data); \n \n }", "public function show(Country $country)\n {\n //\n }", "public function show(Country $country)\n {\n //\n }", "public function edit($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n\n if (empty($country)) {\n Log::error('Pais, Edit, No se encuentra el pais: ' . $id);\n Flash::error('Country not found');\n\n return redirect(route('countries.index'));\n }else if($country->nativo){\n Log::error('Pais, Edit, El pais' . $id . ' no se puede editar ya que es un registro nativo.');\n Flash::error('El pais no se puede editar ya que es un registro nativo.');\n\n return redirect(route('countries.show', [$country->id]));\n }\n\n return view('countries.edit')->with('country', $country);\n }", "public function edit($id)\n {\n $country=LandingCountry::where('id',$id)->first();\n // return $currency;\n return view('admin.country.edit',compact('country'));\n }", "public function edit($id)\n {\n $countries = Country::find($id);\n // Redirect to taxon list if updating taxon wasn't existed\n if ($countries == null || count($countries) == 0) {\n return redirect()->intended('/country');\n }\n\n return view('countries/edit', ['countries' => $countries]);\n }", "public function edit($id)\n {\n $jsonCountry = file_get_contents(public_path('country.json'));\n $listCountry = json_decode($jsonCountry, true);\n $user = User::findOrFail($id);\n return view('user.form',compact('user','listCountry'));\n }", "public function edit($id)\n {\n $country =Country::all();\n $region = Region::find($id);\n\n return view('setup.addresSetup.region.edit')->with('region', $region)\n ->with('country', $country); \n }", "public function edit($id)\n {\n $category = $this->contryRepository->findWithoutFail($id);\n\n\n if (empty($category)) {\n Flash::error(__('lang.not_found', ['operator' => __('lang.category')]));\n\n return redirect(route('country.index'));\n }\n $customFieldsValues = $category->customFieldsValues()->with('customField')->get();\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->contryRepository->model());\n $hasCustomField = in_array($this->contryRepository->model(), setting('custom_field_models', []));\n if ($hasCustomField) {\n $html = generateCustomField($customFields, $customFieldsValues);\n }\n\n return view('country.edit')->with('category', $category)->with(\"customFields\", isset($html) ? $html : false);\n }", "public function postEdit(Request $request){\n //First we need to get country id from received request, get country details\n //as per received country id, get all countries and return a view\n //to edit country details.\n $country_id = $request->input('post_id');\n $country_details = $this->country_model->getCountry($country_id);\n $countries = $this->country_model->allCountries();\n return view('countries.list_view', compact('country_details', 'countries'));\n }", "public function edit($id)\r\n {\r\n // Get info for the form\r\n $author = Author::with('city.country')->find($id);\r\n $countries = Country::all();\r\n\r\n // Send the form\r\n return view('edit', compact('author', 'countries'));\r\n }", "public function deliveryAddressForm()\n {\n # Get all countries informations\n $countries = new Country();\n $countries->get();\n\n # Define countries list\n $data['countries']['all'] = $countries->all_to_single_array('name');\n\n # Define dafaul user country\n $data['countries']['user'] = 36; # 36 is the Brasil ID into database\n\n # Print the view\n echo $this->load->view('site/user/edit/delivery_address_new', $data, TRUE);\n }", "protected function form()\n {\n return Admin::form(Country::class, function (Form $form) {\n $form->display('id', 'ID');\n $form->text('name', '城市名称')->rules('required');\n $form->text('letter', '城市代码')->rules('required');\n $form->select('continent', '所属大洲')\n ->options(function ($id) {\n $api = new ApiController;\n $country = $api->country;\n return $country;\n });\n });\n }", "public function edit($id, Request $request)\n {\n\t$country=country::find($id);\n \n\tif($request->ajax())\n\t return view('Countries.ajax.edit')->withcountry($country);\n\n\t return view('Countries.http.edit')->withcountry($country);\n }", "public function edit($id)\n {\n $countries = City::where('parent_id', 0)->get();\n $countryCity = City::findOrFail($id);\n return view('admin.countries-cities.edit', compact('countries', 'countryCity'));\n }", "function countryAction() {\n\t\t$oFilter = utilityInputFilter::filterString();\n\t\t$country = $oFilter->doFilter($this->getActionFromRequest(false, 1));\n\n\t\tif ( !$country || strlen($country) != 2 ) {\n\t\t\t$country = null;\n\t\t}\n\n\t\t$this->getModel()->setCountry($country);\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\tif ( $country ) {\n\t\t\t$oView->showCountryLeaderboard();\n\t\t} else {\n\t\t\t$oView->showCountryList();\n\t\t}\n\t}", "public function update($id = null) \r\n\t{\r\n\t\tif ($id == null)\r\n\t\t{\r\n\t\t\tshow_error('No identifier provided', 500);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$data['header']['title'] = 'Edit a country';\r\n\t\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t\t$data['view_name'] = 'country/country_edit_view';\r\n\t\t\t$data['view_data'] = $this->country->get($id);\r\n\t\t\t$this->load->view('country/page_view', $data);\r\n\t\t}\r\n\t}", "public function edit($id)\n {\n $shipping_company = $this->shipping_company->with('countries')->findOrFail($id);\n $countries = $this->country->get(['id', 'name']);\n return view('admin.shipping_companies.edit', compact('shipping_company', 'countries'));\n }", "public function editAction($id)\n {\n\n //echo $this->getDoctrine()->getRepository('SyndicateComponentBundle:Education')->getGeoCode();\n //exit;\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Education entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $countries = $this->countriesRepository->findWithoutFail($id);\n\n if (empty($countries)) {\n Flash::error('Countries not found');\n\n return redirect(route('countries.index'));\n }\n\n return view('countries.edit')->with('countries', $countries);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }", "public function edit($id)\n {\n $country = country::find($id);\n\n return view('admin.crud.rates.edit', compact('country'));\n }", "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = Country::withoutGlobalScope('status')->findOrFail($id);\n $data['url'] = route($this->route . '.update', ['id' => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n // dd($data);\n\t\treturn view('admin.general.edit', compact('data'));\n }", "public function edit($id)\n {\n $countries=Country::all();\n $user=User::find($id);\n return view('admin.users.edit',compact('countries','user'));\n }", "public function edit_country(Request $request)\n\t{\n\t\t$enc_id = base64_decode($request->input('enc_id'));\n\n\t\t$arr_rules = $arr_data = array();\n\t\t$status = false;\n\n\t\t$arr_rules['edit_english_name'] \t \t= \"required\";\n\t\t$arr_rules['edit_arabic_name'] \t\t\t= \"required\";\n\n\t\t$validator = Validator::make($request->all(),$arr_rules);\n\n\t\tif($validator->fails()) \n\t\t{\n\t\t\treturn redirect()->back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$arr_data['country_english_name'] \t\t\t= $request->input('edit_english_name', null);\t\n\t\t$arr_data['country_arabic_name'] \t\t\t= $request->input('edit_arabic_name', null);\t\n\t\t$arr_data['aramex_country_id'] \t\t = $request->input('edit_aramex_country_id', null);\t\n\n\t\t$status = $this->BaseModel->where('id',$enc_id)->update($arr_data);\n\n\t\tif($status)\n\t\t{\n\t\t\tSession::flash('success', 'Country updated successfully.');\n\t\t\treturn redirect($this->module_url_path);\n\t\t}\n\n\t\tSession::flash('error', 'Error while updating Country.');\n\t\treturn redirect($this->module_url_path);\n\t}", "public function create()\n {\n $countries = Country::all();\n return view('cms.center.edit', compact('countries'));\n }", "public function newAction()\n {\n $entity = new Country();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function update_country() \r\n\t{\r\n\t\tif (isset($_POST) && $_POST['save'] == 'Save') \r\n\t\t{\r\n\t\t\t$data['country_id'] = $this->input->post('country_id');\r\n\t\t\t$data['name'] = $this->input->post('country_name');\r\n\t\t\t$data['phonecode'] = $this->input->post('country_phonecode');\r\n\t\t\t// Set flash data \r\n\t\t\t$this->session->set_flashdata('message', '<div style=\"text-align:center; color:#4C8C18\">Successfully update the country information!</div>');\r\n\t\t\t$this->country->add($data);\r\n\t\t}\r\n\t\tredirect('country/listing');\r\n\t}", "public function edit($id)\n\t{\n\t\t$city = City::findOrFail($id);\n\t\t$countriesList = Country::lists('name', 'id');\n\n\t\treturn view('admin.cities.edit', compact('city', 'countriesList'));\n \t}", "public function edit($id)\n {\n $drzava = Country::where('country_id', $id)->first();\n $regije = Region::all();\n return view('drzava.edit',compact('drzava', 'regije'));\n }", "public function edit($id)\n {\n $object = Userl::withTrashed()->where(\"id\", $id)->first();\n $this->data[\"object\"] = $object;\n $this->data[\"countries\"] = Country::all();\n return view(\"admin.\" . str_slug($this->data[\"entity_p\"]) . \".create\")->with($this->data);\n }", "public function edit($id)\n {\n //\n $this->shareMenu();\n $n = nationality::findOrFail($id);\n return view('backend.HRIS.admin.Nationality.edit',compact('n'));\n }", "public function edit($id)\n {\n /*if (Auth::user()->can('divisions.create')) {*/\n $division = Division::find($id);\n $countries = Country::all();\n return view('admin.division.edit', compact('division', 'countries'));\n /*}\n return redirect(route('admin.home'));*/\n }", "public function edit(Address $address) {\n $this->authorize('manage', $address);\n $countries = Country::all();\n return view('account.addresses.edit', compact('address', 'countries'));\n }", "public function edit($id)\n {\n $item = $this->countyService->find($id);\n $countries = $this->countryService->all(['paginate' => false]);\n\n return view('counties.edit', compact('item', 'countries'));\n }", "public function locationshowAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('adminBundle:countries')->findAll();\n return $this->render(':Location:index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "protected function addCountry($form, $country = null) {\n $form->add('country', 'entity', array(\n 'class' => 'DaVinci\\TaxiBundle\\Entity\\Admin\\CountryCity',\n 'property' => 'country',\n 'empty_value' => 'form.please_select',\n 'translation_domain' => 'FOSUserBundle',\n //'property_path' => 'country',\n 'mapped' => false,\n 'data' => $country, \n 'query_builder' => function(EntityRepository $er) use ($country){\n \n if($country) \n {\n //use passed to post country\n $cc = $country->getCountryCode();\n $ci = $country->getId();\n \n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->andWhere('(c.countryCode != ?1 OR c.id = ?2)')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC')->setParameters(array(1 => $cc, 2 => $ci));\n }\n else\n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC');\n }));\n }", "public function edit($id)\n {\n $countries = Country::all();\n $author = Author::findOrFail($id);\n return view('admin.author.edit',compact('countries','author'));\n }", "public function edit($id,Request $request)\n {\n if($this->permissionDetails('Hase_merchant','manage')){\n $title = 'Edit - hase_country';\n $hase_country = Country::findOrfail($id);\n return view('hase_country.edit',compact('title','hase_country'));\n }else{\n return Redirect::back()->with('message', 'You are not authorized to use this functionality!');\n }\n }", "public function edit($id)\n {\n $data = [\n 'countries' => Country::all(),\n 'city' => City::query()->find($id)\n ];\n return view('cms.city.edit', $data);\n }", "public function edit($id)\n {\n $city = City::find($id);\n $countries = Country::all();\n\n return view('admin.cities.edit', compact('city', 'countries'));\n }", "public function edit($id)\n {\n $manufacture = Manufacture::findOrFail($id);\n $countries = Country::all();\n\n return view('backend.manufacture.edit',compact('manufacture','countries'));\n }", "public function edit($id)\n\t{\n\t\t$user = User::find($id);\n\t\t$data['countries'] = Country::where('status','Active')->get();\n\t\treturn view('admin.customers.edit',compact('user','id','data'));\n\t}", "public function edit($id)\n {\n $data['province'] = GeoProvince::findOrFail($id);\n return view('admin.province_edit',$data);\n }", "public function setCountry($newCountry){\n\t}", "public function update($name, $country, $id);", "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function edit($id)\n {\n try {\n $state = State::find($id);\n $countries = Country::pluck('name', 'id');\n if (!$state) {\n return redirect()->route('countries')->with(['error' => 'هذة المحافظة غير موجودة']);\n }\n return view('states::edit', compact('state', 'countries'));\n } catch (\\Exception $ex) {\n return redirect()->route('countries.edit', $id)->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n }\n }", "public function get_edit(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\n\t\t\t$customer_types = array('' => 'Select One','Buyer'=>'Buyer','Vendor'=>'Vendor');\n\n\t\t\t$countries = array('' => 'Select One') + \n\t\t\t\tCountry::lists('country_name', 'country_id');\n\n\t\t\t$titles = array('' => 'Select One','Mr.'=>'Mr.','Mrs.'=>'Mrs.','Ms.'=>'Ms.','Miss'=>'Miss','Master'=>'Master',\n\t\t\t\t'Rev.'=>'Rev. (Reverend)','Fr.'=>'Fr. (Father)','Dr.'=>'Dr. (Doctor)','Atty.'=>'Atty. (Attorney)',\n\t\t\t\t'Prof.'=>'Prof. (Professor)','Hon.'=>'Hon. (Honorable)','Pres.'=>'Pres. (President)',\n\t\t\t\t'Gov.'=>'Gov. (Governor)','Coach'=>'Coach','Ofc.'=>'Ofc. (Officer)');\n\n\t\t\t$this->layout->content = View::make('frontend.customers.edit')\n\t\t\t\t->with('title', 'Edit Customer')\n\t\t\t\t->with('customer', Customer::find($customer_id))\n\t\t\t\t->with('customer_type',$customer_types)\n\t\t\t\t->with('customer_countryId', $countries)\n\t\t\t\t->with('customer_title', $titles);\n\t\t}\n\t}", "public function editAction($id) {\n $usuario = $this->container->get('security.context')->getToken()->getUser();\n\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('TxinbometroBundle:Gasolina')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Gasolina entity.');\n }\n\n if ($entity->getVehiculo()->getUsuario()->getId() != $usuario->getId()) {\n throw $this->createNotFoundException('Unable to access Gasolina entity.');\n }\n\n\n $editForm = $this->createForm(new GasolinaType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('TxinbometroBundle:Gasolina:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "public function edit($id)\n {\n $languages=Languages::all();\n $item = Offices::find($id);\n return view('Backend/Offices.edit',compact('item','languages'));\n }", "protected function form() {\n\t\t$form = new Form(new Country);\n\n\t\t// $form->number('continent_id', __('洲 id'));\n\t\t$form->text('cname', __('中文名'));\n\t\t$form->text('name', __('英文名称'));\n\t\t$form->text('full_name', __('英文全称'));\n\t\t$form->text('country_code', __('国家地区代码'));\n\t\t$form->text('full_cname', __('中文全称'));\n\t\t$form->text('lower_name', __('英全称小写'));\n\t\t$form->select('continent_id', '洲名')->options(Continent::where('parent_id', 0)->pluck('cn_name', 'id'));\n\t\t$form->multipleSelect('continentlocation', '地理位置')->options(Continent::where('parent_id', '>', '0')->pluck('cn_name', 'id'));\n\n\t\t$form->textarea('remark', __('概况'));\n\t\t$form->switch('is_island', __('海岛'));\n\t\t$form->switch('active', __('激活'))->default(1);\n\t\t$form->switch('promotion', __('推荐'));\n\n\t\treturn $form;\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteSavalizeBundle:Company')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Company entity.');\n }\n\n $editForm = $this->createForm(new CompanyType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteSavalizeBundle:Company:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('ACInst3LocationBundle:Location')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Location entity.');\n }\n\n $editForm = $this->createForm(new LocationType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ACInst3LocationBundle:Location:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function create()\n {\n return view('admin.country.create');\n }", "public function create()\n {\n $data = [\n 'countries' => Country::all()\n ];\n return view('cms.city.edit', $data);\n }", "public function edit($id)\n {\n $country = Country::findOrFail($id);\n return response()->json($country);\n }", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function create()\n {\n return view('backend.constants.countries.add_country');\n }", "public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\n }", "public function edit($id) {\n $edit = Nationality::find($id);\n return view('admin.nationalities.edit', compact(\"id\", 'edit'));\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction() {\r\n \t$gid = $this->getInput('gid');\r\n \t$this->checkRight();\r\n \t$title = \"收货人地址修改\";\r\n \t$id = $this->getInput('id');\r\n \t$addressInfo = Gc_Service_UserAddress::getUserAddress($id);\r\n \t$this->assign('info', $addressInfo);\r\n \t$this->assign('title', $title);\r\n \t$this->assign('gid', $gid);\r\n }", "public function edit(Profile $profile)\n {\n /* $this->authorize('update', $profile); */\n\n abort_if($profile->user_id !== auth()->id(), 403);\n\n $countries = new Countries();\n\n $allcountries = $countries->all()->pluck('name.common');\n\n return view('profiles.profile.edit', compact('profile', 'allcountries'));\n }", "public function edit(Profile $profile)\n {\n if(!$profile){\n $ProfileInputs['user_id'] = Auth::user()->id;\n $profile = Profile::create($ProfileInputs);\n }\n\n $countries = Country::with(\"translations\")->get();\n $countryEn = \"\";\n foreach ($countries as $country){\n foreach ($country->translations as $name){\n if($name->locale == \"en\"){\n $countryEn = $name->name;\n }\n }\n $countryList[$country->id] = $countryEn;\n }\n\n return view('back.profiles.edit', compact('profile', 'countryList'));\n }", "public function edit(District $district)\n {\n if(isset($_GET['country'])){\n $s_country = Country::where('id',$_GET['country'])->first();\n }else{\n $s_country = Country::first();\n }\n $countries = Country::all();\n return view('admin.district.edit',compact('district','countries','s_country'));\n }", "public function edit()\n {\n return view('stores::edit');\n }", "public function edit()\n {\n if (isset($_POST['submitEdit'])) {\n $this->model->updateZone($_GET['id'], $_POST['nom']);\n header(\"Location: /resabike/zone\");\n exit;\n }\n\n //zone edited\n $zoneEdited = $this->model->editZone($_GET['id']);\n $this->view->Set('zoneEdited', $zoneEdited);\n\n return $this->view->Render();\n }", "public function edit($id)\n {\n $region = $this->regionRepository->findWithoutFail($id);\n $city = city::latest()->pluck('display_name_en','id');\n\n if (empty($region)) {\n Flash::error('Region not found');\n\n return redirect(route('regions.index'));\n }\n\n return view('admin.regions.edit')->with('region', $region)->with('city', $city);\n }", "public function newAction(Request $request) {\n $country = new Country();\n $form = $this->createForm('B2bBundle\\Form\\CountryType', $country);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($country);\n $em->flush();\n\n return $this->redirectToRoute('backoffice_country_show', array('id' => $country->getId()));\n }\n\n return $this->render('country/new.html.twig', array(\n 'country' => $country,\n 'form' => $form->createView(),\n ));\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function editAction($id)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Estadofondo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Estadofondo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CorresponsaliaBundle:Estadofondo:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "private function createDeleteForm(Country $country) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backoffice_country_delete', array('id' => $country->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }" ]
[ "0.80439985", "0.7284132", "0.7261045", "0.71348256", "0.7056613", "0.7039055", "0.702156", "0.70039463", "0.6965901", "0.69474655", "0.6923719", "0.68681324", "0.68593884", "0.68550175", "0.68486136", "0.6833688", "0.6806311", "0.6760938", "0.6758943", "0.673473", "0.6678252", "0.6635705", "0.6622006", "0.6604068", "0.65896064", "0.6580736", "0.6580736", "0.6535923", "0.6530578", "0.65251243", "0.6515752", "0.6413346", "0.64105695", "0.63829905", "0.63581157", "0.63313293", "0.63289154", "0.6328374", "0.63280714", "0.63140345", "0.6306543", "0.6300793", "0.6299149", "0.6285503", "0.62750334", "0.6261635", "0.62444365", "0.6219019", "0.62074137", "0.6201534", "0.61818755", "0.61814964", "0.61486775", "0.6142775", "0.61203533", "0.60884655", "0.6081395", "0.6078848", "0.6065103", "0.6054677", "0.60401964", "0.60109264", "0.6000713", "0.59813666", "0.596111", "0.5957085", "0.59544563", "0.5948346", "0.59299195", "0.5927525", "0.59273595", "0.5924435", "0.5919927", "0.59157896", "0.5914113", "0.5914113", "0.59007454", "0.58874846", "0.58842695", "0.58821565", "0.5879163", "0.5874165", "0.5874002", "0.58698887", "0.5862003", "0.5858936", "0.58454025", "0.58370537", "0.5831003", "0.5826245", "0.58260965", "0.5809867", "0.58079255", "0.5803462", "0.5802575", "0.5799942", "0.5794779", "0.5794222", "0.57887083", "0.57826203" ]
0.74504596
1
Deletes a country entity.
public function deleteAction(Request $request, Country $country) { $form = $this->createDeleteForm($country); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); try { $em->remove($country); $em->flush(); } catch (DBALException $e) { return $this->render('error-delete.html.twig', array('error' => $e->getMessage())); } } return $this->redirectToRoute('backoffice_country_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(Country $country)\n {\n\n }", "public function destroy(Country $country)\n {\n //\n }", "public function delete(model $country) {\n\n // Delete record\n return parent::_delete($country);\n }", "public function forceDeleted(Country $country)\n {\n //\n }", "public function destroy(Country $country)\n {\n \n $pathold=$country->path;\n if($pathold != null)\n {\n unlink(public_path('images\\\\countries\\\\'.$pathold));\n\n }\n $country->delete();\n Flash::success('El país '.$country->name.' se ha eliminado satisfactoriamente')->important();\n return redirect()->route('shoes.country.index');\n }", "public function delete_country(Request $request,$enc_id)\n\t{\t\n\t\t$country_id = base64_decode($enc_id);\n\n\t\t$obj_delete = $this->BaseModel->where('id',$country_id)->delete();\n\n\t\tif($obj_delete){\n\t\t\tSession::flash('success', 'Country deleted successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}", "public function destroy(Country $country)\n {\n $this->repository->delete($country);\n\n flash(trans('accounts::countries.messages.deleted'));\n\n return redirect()->route('dashboard.countries.index');\n }", "public function destroy(Country $country)\n {\n $country->delete();\n return redirect()->route('countries.index')->with('success', 'Country deleted successfully.');\n }", "public function destroy(Country $country, $id)\n {\n $country = Country::findOrFail($id);\n $company = Company::where('country_id', '=', $country->id)->first();\n\n if ($company)\n return Redirect::route('countries')->with('danger', 'Country has companies linked to it');\n else {\n $country->delete();\n return Redirect::route('countries')->with('success', 'Country successfully deleted!');\n }\n }", "public function destroy(Request $request, Country $country)\n {\n $response = $this->countryService->delete($country, $request);\n if (!$response['status']) {\n return redirect()->back()\n ->with('response', $response);\n }\n\n return redirect()->route('system.countries.index')\n ->with('response', $response);\n }", "public function destroy(Country $country)\n {\n $country->delete();\n\n flash(trans('countries.messages.deleted'));\n\n return redirect()->route('dashboard.countries.index');\n }", "public function destroy($id)\n {\n $country = LandingCountry::find($id);\n if($country){\n $country->delete();\n }\n return redirect('admin/country');\n }", "function deleteCountry()\n {\n \n if($this->isAdmin() == TRUE)\n {\n echo(json_encode(array('status'=>'access')));\n \n }\n else\n {\n $id = $this->input->post('id');\n $data = array('deleted'=>1,'updated_by'=>$this->vendorId, 'update_time'=>date('Y-m-d H:i:s'));\n \n $result = $this->country_model->deleteCountry($id, $data);\n if ($result > 0) { echo(json_encode(array('status'=>TRUE))); }\n else { echo(json_encode(array('status'=>FALSE))); }\n }\n }", "public function delete($id = null) \r\n\t{\r\n\t\tif ($id == null) \r\n\t\t{\r\n\t\t\tshow_error('No identifier provided', 500);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$this->country->remove($id);\r\n\t\t\t// Set flash data \r\n\t\t\t$this->session->set_flashdata('message', '<div style=\"text-align:center; color:#4C8C18\">Successfully deleted the country information!</div>');\r\n\t\t\tredirect('country/listing'); // back to the listing\r\n\t\t}\r\n\t}", "public function delete($countryId)\n {\n $this->countryRepository->deleteCountryById($countryId);\n return redirect()->route('getAllCountries');\n }", "public function deleteDelete(Request $request){\n $delete_id = $request->input('delete_id');\n try {\n //Delete country from database, throw exception if not deleted and\n //return country's list view with success notice if\n //country is deleted.\n $delete_flag = $this->country_model->deleteCountry($delete_id);\n if($delete_flag == false):\n throw new Exception('Could not delete requested country. Please try again.');\n endif;\n $deleted_notice = \"Selected country has been deleted successfully.\";\n $countries = $this->country_model->allCountries();\n return view('countries.list_view', compact('countries', 'deleted_notice'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage()), 'custom_message' => 'Could not delete this country because it is being used by other modules.']);\n }//End try-catch\n }", "public function destroy($id)\n {\n $country = Country::find($id);\n Storage::delete($country->flag);\n $country->delete();\n session()->flash('success',trans('admin.country_delete_success'));\n return redirect(aurl('countries'));\n }", "public function destroy(Request $request, $id)\n {\n $country = Country::findOrFail($id);\n\n $country->delete();\n\n $request->session()->flash('danger', 'Country deleted from the database.');\n\n return redirect()->route('admin.countries.index');\n }", "public function actionDelete($city_id, $country_id)\n {\n $this->findModel($city_id, $country_id)->delete();\n\n //delete all customer address\n CustomerAddress::deleteAll(['city_id' => $city_id]);\n\n //delete customer cart - area_id\n CustomerCart::deleteAll('area_id in (select area_id from {{%location}}\n where city_id = \"'.$city_id.'\")');\n\n //delete all location - city_id\n Location::deleteAll(['city_id' => $city_id]);\n\n //delete all vendor location - city_id\n VendorLocation::deleteAll(['city_id' => $city_id]);\n\n Yii::$app->session->setFlash('success', 'Governorate deleted successfully!');\n return $this->redirect(['index']);\n\n }", "private function createDeleteForm(Country $country) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backoffice_country_delete', array('id' => $country->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n $country = country::findOrFail($id);\n Storage::delete($country->logo);\n $country->delete();\n return redirect(aurl('countries'));\n }", "public function destroy($id)\n {\n $country = Country::findOrFail($id);\n $country->delete();\n return $country;\n }", "public function delete($entity);", "public function delete(User $user, Country $country)\n {\n return $this->userRoleCan($user, 'country-delete');\n }", "public function destroy($id)\n {\n Country::where('id', $id)->delete();\n return redirect()->route('country.index');\n }", "public function destroy($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n $countryWithStates = $this->countryRepository->related_states($id);\n\n if (empty($country)) {\n Log::error('Pais, Destroy, No se encuentra el pais: ' . $id); \n Flash::error('Country not found');\n\n return redirect(route('admin.countries.index'));\n }else if($country->nativo){\n Log::error('Pais, Destroy, El pais ' . $id . ' no se puede eliminar ya que es un registro nativo.'); \n Flash::error('El pais no se puede eliminar ya que es un registro nativo.');\n\n return redirect(route('admin.countries.show', [$country->id]));\n }else if($countryWithStates){\n Log::error('Pais, Destroy, El pais ' . $id . ' no se puede eliminar ya que posee departamentos relacionados.'); \n Flash::error('El pais no se puede eliminar ya que posee departamentos relacionados.');\n\n return redirect(route('admin.countries.show', [$country->id]));\n }\n\n $this->countryRepository->delete($id);\n\n Log::info('Pais, Destroy, Se eliminó el pais: ' . $id);\n Flash::success('Country deleted successfully.');\n\n return redirect(route('admin.countries.index'));\n }", "public function destroy($id)\n {\n $country = $this->countryRepository->findWithoutFail($id);\n $countryWithStates = $this->countryRepository->related_states($id);\n\n if (empty($country)) {\n Log::error('Pais, Destroy, No se encuentra el pais: ' . $id); \n Flash::error('Country not found');\n\n return redirect(route('countries.index'));\n }else if($country->nativo){\n Log::error('Pais, Destroy, El pais ' . $id . ' no se puede eliminar ya que es un registro nativo.'); \n Flash::error('El pais no se puede eliminar ya que es un registro nativo.');\n\n return redirect(route('countries.show', [$country->id]));\n }else if($countryWithStates){\n Log::error('Pais, Destroy, El pais ' . $id . ' no se puede eliminar ya que posee departamentos relacionados.'); \n Flash::error('El pais no se puede eliminar ya que posee departamentos relacionados.');\n\n return redirect(route('countries.show', [$country->id]));\n }\n\n $this->countryRepository->delete($id);\n\n Log::info('Pais, Destroy, Se eliminó el pais: ' . $id);\n Flash::success('Country deleted successfully.');\n\n return redirect(route('countries.index'));\n }", "public function destroy($id)\n {\n Country::find($id)->delete();\n return response()->json(['success'=>'Country deleted successfully.']);\n }", "public function destroy($id)\n {\n $this->authorize('canControlEverything');\n\n $country = Country::findOrFail($id);\n $country->delete();\n\n return response([\n 'message' => 'success'\n ], 200);\n }", "public function destroy($id)\n {\n //\n dd($id);\n Country::destroy($id);\n session()->flash('message','Country Deleted Successfully');\n return redirect()->back();\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function destroy($id)\n {\n $drzava = Country::where('country_id',$id)->first();\n $drzava->delete();\n\n\n return redirect()->route('drzava.index')\n ->with('success','Država je uspješno izbrisana.');\n }", "public function destroy($id)\n {\n try\n {\n $this->countryRepo->deleteById($id);\n return Redirect::route('admin.countries.index');\n }\n catch (Illuminate\\Database\\QueryException $e)\n {\n return Redirect::route('admin.countries.index')->withErrors(array(\"error-msg\" => \"The selected country has been used in anothers form, Please removed it before.\"));\n }\n\n }", "public function delete($entity)\n {\n \n }", "public function delete($id, Request $request)\n {\n $country=country::find($id);\n if($request->ajax())\n return view('Countries.ajax.delete-confirm')->withcountry($country);\n \n return view('Countries.http.delete-confirm')->withcountry($country);\n }", "public function editAction(Request $request, Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n $editForm = $this->createForm('B2bBundle\\Form\\CountryType', $country);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('backoffice_country_edit', array('id' => $country->getId()));\n }\n\n return $this->render('country/edit.html.twig', array(\n 'country' => $country,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function Delete($entity) {\n }", "public function delete(DimeEntityInterface $entity);", "public function destroy($id)\n {\n Country::destroy($id);\n return response()->json(['status'=>'success','url'=>route('countries.index')]);\n\n }", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "public function delete(EntityInterface $Entity);", "public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "public function delete($entity) : bool;", "public function destroy(Request $request)\n {\n $id = $request->id;\n $town = Town::find($id);\n //Country::destroy($id);\n $town->delete();\n //Give message to admin after successfull operation\n $request->session()->flash('status', 'Town deleted successfully');\n return redirect($this->redirectPath);\n }", "public function delete($entity)\n {\n $this->getObjectManager()->remove($entity);\n $this->getObjectManager()->flush();\n }", "public function delete(DataObject $entity){\n }", "function Delete()\n\t{\tif ($this->CanDelete())\n\t\t{\t$sql = \"DELETE FROM cities WHERE cityid=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->AffectedRows())\n\t\t\t\t{\t$this->RecordAdminAction(array(\"tablename\"=>\"cities\", \"tableid\"=>$this->id, \"area\"=>\"cities\", \"action\"=>\"deleted\", \"actiontype\"=>\"deleted\", \"deleteparentid\"=>$this->details[\"country\"], \"deleteparenttable\"=>\"countries\"));\n\t\t\t\t\t$this->Reset();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public function destroy(Coordinacion $coordinacion)\n {\n //\n }", "private function createDeleteForm($iso_code)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orkestro_backend_country_delete', array('iso_code' => $iso_code)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n if($this->permissionDetails('Hase_merchant','delete')){\n $hase_country = Country::findOrfail($id);\n $hase_country->delete();\n\n Session::flash('type', 'error'); \n Session::flash('msg', 'Country Successfully Deleted');\n\n return redirect('hase_country');\n }else{\n return Redirect::back()->with('message', 'You are not authorized to use this functionality!'); \n }\n \t\n }", "public function showAction(Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n\n return $this->render('country/show.html.twig', array(\n 'country' => $country,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "public function delete(IndexableEntity $entity);", "function delete(IContract $entity);", "public function destroy($id)\n {\n try {\n $country = Country::findOrFail($id);\n if($country->count() > 0){\n $return = DB::table('countries')->where('id', '=', $id)->delete();\n if($return){\n return 'Se elimino correctamente';\n }\n }\n return 'No hay registros con ese id ' + $id; \n } catch (Exception $e) {\n return var_dump($e->getMessage());\n }\n }", "public function destroy($id)\n {\n $category = $this->contryRepository->findWithoutFail($id);\n\n if (empty($category)) {\n Flash::error('Country not found');\n\n return redirect(route('country.index'));\n }\n\n $this->contryRepository->delete($id);\n\n Flash::success(__('lang.deleted_successfully', ['operator' => __('lang.category')]));\n\n return redirect(route('country.index'));\n }", "public function delete()\n {\n $this->socrates->deleteSite($this->id);\n }", "function SaveCountry($country)\n\t{\n\t\t$result = $this->sendRequest(\"SaveCountry\", array(\"Country\"=>$country));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function created(Country $country)\n {\n //\n }", "public function edit(Country $country)\n {\n \n }", "abstract public function delete(Entity $oMappedEntity);", "public function delete(Request $request)\n\t\t{\n\t\t$ZoneArea = ZoneArea::findOrFail($request->id);\n\t\t$ZoneArea->delete();\n\t\tSession::flash('success', 'ZoneArea Deleted!');\n\t\treturn redirect()->action('ZoneAreaController@all');\n\t\t}", "protected function loadCountry()\n {\n $country = Country::findOne([\n 'code' => 'es'\n ]);\n $this->countryId = $country->id;\n }", "public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }", "public function setCountry($country = \"\");", "public function delete()\n {\n $this->model->deleteStations($_GET['id']);\n $this->model->deleteZone($_GET['id']);\n header(\"Location: /resabike/zone\");\n }", "public function deleting(Observation $observation)\n {\n //\n }", "public static function delete($entity)\n {\n return static::mapper()->delete($entity);\n }", "public function delete($location);", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function updated(Country $country)\n {\n //\n }", "public function delete_multi(collection $country_collection) {\n\n // Delete records\n return parent::_delete_multi($country_collection);\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('InfogoldAccountBundle:Dzialy')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Dzialy entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('dzialy'));\n }", "public function restored(Country $country)\n {\n //\n }", "protected function _cleanupRegions($countries)\n {\n $region = Mage::getModel('directory/region');\n $collection = $this->_cleanupRegionCollection($region->getCollection());\n $resource = Mage::getSingleton('core/resource');\n $regionTable = $resource->getTableName('directory/country_region');\n $writeAdapter = $resource->getConnection('directory_write');\n\n $collection->addFieldToFilter('country_id', array('nin' => $countries));\n $idsToDelete = $collection->getAllIds();\n\n $writeAdapter->delete(\n $regionTable,\n array(\n 'region_id IN(?)' => $idsToDelete,\n )\n );\n }", "public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SkaphandrusAppBundle:SkBusiness')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SkBusiness entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('business_admin'));\n }", "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SkaphandrusAppBundle:SkBusiness')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find SkBusiness entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('business_admin'));\n }", "public function deleteEntity($obj)\n\t{\n\t\t$this->db->deleteEntity($obj);\n\t}", "public static function DeleteById($entity)\n {\n //When the precedent is GetById\n if(isset(StorageManager::$entities[$entity->Alias]))\n {\n unset(StorageManager::$entities[$entity->Alias][$entity->IdEntite]);\n }\n\n //When the precedent request is getByArg\n $stores = StorageManager::Find($entity);\n\n if(count($store) > 0 )\n {\n foreach($stores as $store)\n {\n if(isset($store::$entities))\n {\n unset($store::$entities[$entity->Alias][$entity->IdEntite]);\n }\n }\n }\n }", "function delete($id) {\r\n $req = \"DELETE FROM geolocalisation WHERE id = \".$id;\r\n mysql_query($req) or die(\"********** Erreur de suprission **********<br>\");\r\n echo \"********** Supprission avec succés **********<br>\";\r\n }", "public function create($name, $country);", "public function delete(){\n\t\t$landlord= new Core_Model_Landlord( $this->dto );\n\t\tif( is_numeric( $company->id) && (int)$company->id > 0) {\n\t\t\t$company->delete( array( \"id\" => $this->dto->id) );\n\t\t\t}\n\t}", "public function delete($entity)\n {\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::PRE_DELETE,\n new TrackingHistoryEvent($entity)\n );\n\n parent::delete($entity);\n\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::POST_DELETE,\n new TrackingHistoryEvent($entity)\n );\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/{id}/delete', name: 'typesepulture_delete', methods: ['POST'])]\n public function delete(Request $request, $id): RedirectResponse\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->managerRegistry->getManager();\n $entity = $em->getRepository(TypeSepulture::class)->find($id);\n\n if (null === $entity) {\n throw $this->createNotFoundException('Unable to find TypeSepulture entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->addFlash('success', 'Le type a bien été supprimé');\n }\n\n return $this->redirectToRoute('typesepulture');\n }", "public function destroy(Continent $continent)\n {\n //\n }", "public function deleteCost($cost) {\n\t\tif($cost == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// bootstrap to doctrine\n\t\trequire(__DIR__ . '/../../amfdoctrine/bootstrapper.php');\n\t\t\n\t\t// merge and then remove the entity\n\t\t$cost = $entityManager->merge($cost);\n\t\t$entityManager->remove($cost);\n\t\t$entityManager->flush();\n\t}", "function DeletePlaces($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.place WHERE fkGamePlace = '$idGame'\");\n}", "function delete($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\t$this->db->delete('cities');\n\t\t\n\t}", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function deleteEntity($eid)\n {\n $this->getConnectionService()->deleteById($eid);\n }", "public function destroy($id)\n {\n $countries = $this->countriesRepository->findWithoutFail($id);\n\n if (empty($countries)) {\n Flash::error('Countries not found');\n\n return redirect(route('countries.index'));\n }\n\n $this->countriesRepository->delete($id);\n\n Flash::success('Countries deleted successfully.');\n\n return redirect(route('countries.index'));\n }", "public function deleteAction(Request $request) {\n $id = $this->getRequest()->request->get('id');\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CMSBundle:Client')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Client entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n return $this->redirect($this->generateUrl('client'));\n }", "public function destroy(District $district)\n {\n //\n }", "public function destroy(District $district)\n {\n //\n }", "public function destroy(District $district)\n {\n //\n }", "public function country($country_id)\n {\n $this->where('user_addresses.country_id', $user_id);\n }" ]
[ "0.77608955", "0.75083005", "0.73672235", "0.7008719", "0.69454926", "0.6882619", "0.6823106", "0.676254", "0.6692958", "0.66703093", "0.6583386", "0.633823", "0.63282317", "0.63191706", "0.63134205", "0.6209367", "0.6169588", "0.6141337", "0.6126107", "0.609844", "0.6029929", "0.59970057", "0.59070814", "0.5869394", "0.5860489", "0.5777964", "0.5735327", "0.5713604", "0.5706402", "0.56907266", "0.5688078", "0.5687261", "0.5678917", "0.56632125", "0.5635203", "0.55396754", "0.5500104", "0.5488852", "0.54762596", "0.54737103", "0.54491436", "0.54423475", "0.54087377", "0.54024065", "0.53987336", "0.5374138", "0.5361424", "0.5359299", "0.53493285", "0.5343851", "0.5339776", "0.5337334", "0.5330001", "0.5325943", "0.5308845", "0.53037804", "0.529748", "0.5276782", "0.5274141", "0.5271102", "0.526464", "0.52600384", "0.5252387", "0.5249077", "0.5240349", "0.52371764", "0.5235862", "0.52278686", "0.52092004", "0.52045876", "0.5199421", "0.51933116", "0.51861316", "0.51846915", "0.51804787", "0.5180049", "0.5178835", "0.5159103", "0.515556", "0.515556", "0.512626", "0.5125134", "0.5124295", "0.5103716", "0.508897", "0.5082884", "0.5081414", "0.5065288", "0.50538325", "0.50529313", "0.5051874", "0.50462013", "0.5039268", "0.50382435", "0.50369865", "0.50341827", "0.5027446", "0.5027446", "0.5027446", "0.50255704" ]
0.7818393
0
Creates a form to delete a country entity.
private function createDeleteForm(Country $country) { return $this->createFormBuilder() ->setAction($this->generateUrl('backoffice_country_delete', array('id' => $country->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm($iso_code)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orkestro_backend_country_delete', array('iso_code' => $iso_code)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function deleteAction(Request $request, Country $country) {\n $form = $this->createDeleteForm($country);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n try {\n $em->remove($country);\n $em->flush();\n } catch (DBALException $e) {\n return $this->render('error-delete.html.twig', array('error' => $e->getMessage()));\n }\n }\n\n return $this->redirectToRoute('backoffice_country_index');\n }", "public function destroy(Country $country)\n {\n //\n }", "public function deleted(Country $country)\n {\n\n }", "public function delete(model $country) {\n\n // Delete record\n return parent::_delete($country);\n }", "public function create(){\n return view('admin.countries.create' , ['title'=>trans('admin.create_new_country')]);\n }", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function create()\n {\n return view('backend.constants.countries.add_country');\n }", "public function destroy(Country $country)\n {\n \n $pathold=$country->path;\n if($pathold != null)\n {\n unlink(public_path('images\\\\countries\\\\'.$pathold));\n\n }\n $country->delete();\n Flash::success('El país '.$country->name.' se ha eliminado satisfactoriamente')->important();\n return redirect()->route('shoes.country.index');\n }", "private function createCreateForm(Country $entity)\n {\n $form = $this->createForm(new CountryType($this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale')), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_country_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "protected function addCountry($form, $country = null) {\n $form->add('country', 'entity', array(\n 'class' => 'DaVinci\\TaxiBundle\\Entity\\Admin\\CountryCity',\n 'property' => 'country',\n 'empty_value' => 'form.please_select',\n 'translation_domain' => 'FOSUserBundle',\n //'property_path' => 'country',\n 'mapped' => false,\n 'data' => $country, \n 'query_builder' => function(EntityRepository $er) use ($country){\n \n if($country) \n {\n //use passed to post country\n $cc = $country->getCountryCode();\n $ci = $country->getId();\n \n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->andWhere('(c.countryCode != ?1 OR c.id = ?2)')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC')->setParameters(array(1 => $cc, 2 => $ci));\n }\n else\n return $er->createQueryBuilder('c')->select('c')->where('c.status = 1')->groupBy('c.countryCode')->orderBy('c.countryCode', 'ASC');\n }));\n }", "public function delete_country(Request $request,$enc_id)\n\t{\t\n\t\t$country_id = base64_decode($enc_id);\n\n\t\t$obj_delete = $this->BaseModel->where('id',$country_id)->delete();\n\n\t\tif($obj_delete){\n\t\t\tSession::flash('success', 'Country deleted successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}", "public function create()\n {\n return view('admin.country.create');\n }", "public function destroy($id)\n {\n $country = LandingCountry::find($id);\n if($country){\n $country->delete();\n }\n return redirect('admin/country');\n }", "public function deleteDelete(Request $request){\n $delete_id = $request->input('delete_id');\n try {\n //Delete country from database, throw exception if not deleted and\n //return country's list view with success notice if\n //country is deleted.\n $delete_flag = $this->country_model->deleteCountry($delete_id);\n if($delete_flag == false):\n throw new Exception('Could not delete requested country. Please try again.');\n endif;\n $deleted_notice = \"Selected country has been deleted successfully.\";\n $countries = $this->country_model->allCountries();\n return view('countries.list_view', compact('countries', 'deleted_notice'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage()), 'custom_message' => 'Could not delete this country because it is being used by other modules.']);\n }//End try-catch\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('city_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "public function destroy(Country $country)\n {\n $this->repository->delete($country);\n\n flash(trans('accounts::countries.messages.deleted'));\n\n return redirect()->route('dashboard.countries.index');\n }", "public function delete($id = null) \r\n\t{\r\n\t\tif ($id == null) \r\n\t\t{\r\n\t\t\tshow_error('No identifier provided', 500);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$this->country->remove($id);\r\n\t\t\t// Set flash data \r\n\t\t\t$this->session->set_flashdata('message', '<div style=\"text-align:center; color:#4C8C18\">Successfully deleted the country information!</div>');\r\n\t\t\tredirect('country/listing'); // back to the listing\r\n\t\t}\r\n\t}", "public function destroy(Request $request, Country $country)\n {\n $response = $this->countryService->delete($country, $request);\n if (!$response['status']) {\n return redirect()->back()\n ->with('response', $response);\n }\n\n return redirect()->route('system.countries.index')\n ->with('response', $response);\n }", "public function destroy(Country $country)\n {\n $country->delete();\n return redirect()->route('countries.index')->with('success', 'Country deleted successfully.');\n }", "public function create()\n {\n return view('admin.countries.create',['title'=> trans('admin.create_new_country')]);\n }", "function observation_delete_form($form, &$form_state, $observationdata = NULL) {\n\tassert(!empty($observationdata));\n\tdrupal_set_title(\n\t\tt(\n\t\t\t'Delete Observation @observation_organism from @observation_date.',\n\t\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')',\n\t\t\t\t\t'@observation_date' => date('d.m.Y', $observationdata['observation']['date'])\n\t\t\t)));\n\n\t$question = t(\n\t\t'Are you sure that you want to delete this observation «@observation_organism»?',\n\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')'\n\t\t));\n\t/* create a fieldset for the tabular data */\n\t$form['question'] = array(\n\t\t\t'#type' => 'markup',\n\t\t\t'#markup' => \"<p>$question</p>\"\n\t);\n\n\t$form['button'] = array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Delete')\n\t);\n\treturn $form;\n}", "public function delete($id, Request $request)\n {\n $country=country::find($id);\n if($request->ajax())\n return view('Countries.ajax.delete-confirm')->withcountry($country);\n \n return view('Countries.http.delete-confirm')->withcountry($country);\n }", "function deleteCountry()\n {\n \n if($this->isAdmin() == TRUE)\n {\n echo(json_encode(array('status'=>'access')));\n \n }\n else\n {\n $id = $this->input->post('id');\n $data = array('deleted'=>1,'updated_by'=>$this->vendorId, 'update_time'=>date('Y-m-d H:i:s'));\n \n $result = $this->country_model->deleteCountry($id, $data);\n if ($result > 0) { echo(json_encode(array('status'=>TRUE))); }\n else { echo(json_encode(array('status'=>FALSE))); }\n }\n }", "public function create()\n {\n return view('admin.countries.create');\n\n }", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function create()\n {\n return view('admin.countries.create');\n }", "public function destroy($id)\n {\n $country = Country::find($id);\n Storage::delete($country->flag);\n $country->delete();\n session()->flash('success',trans('admin.country_delete_success'));\n return redirect(aurl('countries'));\n }", "public function newAction(Request $request) {\n $country = new Country();\n $form = $this->createForm('B2bBundle\\Form\\CountryType', $country);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($country);\n $em->flush();\n\n return $this->redirectToRoute('backoffice_country_show', array('id' => $country->getId()));\n }\n\n return $this->render('country/new.html.twig', array(\n 'country' => $country,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n\n return view('backend.country.create');\n }", "public function destroy($id)\n {\n try\n {\n $this->countryRepo->deleteById($id);\n return Redirect::route('admin.countries.index');\n }\n catch (Illuminate\\Database\\QueryException $e)\n {\n return Redirect::route('admin.countries.index')->withErrors(array(\"error-msg\" => \"The selected country has been used in anothers form, Please removed it before.\"));\n }\n\n }", "public function destroy(Country $country, $id)\n {\n $country = Country::findOrFail($id);\n $company = Company::where('country_id', '=', $country->id)->first();\n\n if ($company)\n return Redirect::route('countries')->with('danger', 'Country has companies linked to it');\n else {\n $country->delete();\n return Redirect::route('countries')->with('success', 'Country successfully deleted!');\n }\n }", "public function create()\n {\n return view('system.country.create');\n }", "public function destroy(Country $country)\n {\n $country->delete();\n\n flash(trans('countries.messages.deleted'));\n\n return redirect()->route('dashboard.countries.index');\n }", "protected function form()\n {\n return Admin::form(Country::class, function (Form $form) {\n $form->display('id', 'ID');\n $form->text('name', '城市名称')->rules('required');\n $form->text('letter', '城市代码')->rules('required');\n $form->select('continent', '所属大洲')\n ->options(function ($id) {\n $api = new ApiController;\n $country = $api->country;\n return $country;\n });\n });\n }", "public function destroy($id)\n {\n $country = country::findOrFail($id);\n Storage::delete($country->logo);\n $country->delete();\n return redirect(aurl('countries'));\n }", "public function showAction(Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n\n return $this->render('country/show.html.twig', array(\n 'country' => $country,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function create()\n {\n return view('dashboard.countries.create');\n }", "public function create()\n {\n return view('dashboard.countries.create');\n }", "public function editAction(Request $request, Country $country) {\n $deleteForm = $this->createDeleteForm($country);\n $editForm = $this->createForm('B2bBundle\\Form\\CountryType', $country);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('backoffice_country_edit', array('id' => $country->getId()));\n }\n\n return $this->render('country/edit.html.twig', array(\n 'country' => $country,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "function delete_adstrue_vendor_province($form,&$form_state,$value) {\n $form = array();\n $form['header'] = array(\n '#type' => 'item',\n '#markup' => '<h4>Vui lòng xác nhận để xóa tỉnh thành</h4>',\n );\n $form['province_id'] = array(\n '#type' => 'hidden',\n '#value' => $value,\n );\n return confirm_form($form,'Vui lòng xác nhận để xóa tỉnh thành','province',t(''),t('Xác nhận'),t('Hủy bỏ'));\n}", "public function create()\n {\n return view('countries::countries.create');\n }", "public function newAction()\n {\n $entity = new Country();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view('admin.location.createcountry');\n }", "public function create()\n {\n return view('countries.create');\n }", "public function create()\n {\n return view('countries.create');\n }", "private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }", "public function create()\n {\n $this->data[\"countries\"] = Country::all();\n return view(\"admin.\" . str_slug($this->data[\"entity_p\"]) . \".create\")->with($this->data);\n }", "public function destroy(Request $request, $id)\n {\n $country = Country::findOrFail($id);\n\n $country->delete();\n\n $request->session()->flash('danger', 'Country deleted from the database.');\n\n return redirect()->route('admin.countries.index');\n }", "public function create()\n {\n $countries = Country::all();\n return view('cms.center.edit', compact('countries'));\n }", "private function createEditForm(Country $entity)\n {\n $form = $this->createForm(new CountryType($this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale')), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_country_update', array('iso_code' => $entity->getIsoCode())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createDeleteForm(Address $address)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('address_delete', array('id' => $address->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Nation $nation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nation_delete', array('id' => $nation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function forceDeleted(Country $country)\n {\n //\n }", "private function createDeleteForm(EcoCardiogramaTransesofagico $ecoCardiogramaTransesofagico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ecocardiogramatransesofagico_delete', array('id' => $ecoCardiogramaTransesofagico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('finanzascategoria_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "function travel_type_form_submit_delete(&$form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity type.\n $form_state['redirect'] = 'admin/structure/travel/' . $form_state['travel_type']->type . '/delete';\n}", "public function delete($countryId)\n {\n $this->countryRepository->deleteCountryById($countryId);\n return redirect()->route('getAllCountries');\n }", "private function createDeleteForm(Etat_civil $etat_civil)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etat_civil_delete', array('id' => $etat_civil->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Funcionario $funcionario)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionario_delete', array('id' => $funcionario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Appartement $appartement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_appartement_delete', array('id' => $appartement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }", "public function create()\n {\n if(isset($_GET['country'])){\n $s_country = Country::where('id',$_GET['country'])->first();\n }else{\n $s_country = Country::first();\n }\n $countries = Country::all();\n return view('admin.district.create',compact('countries','s_country'));\n }", "public function create(Country $country)\n {\n $data = [\n 'title' => 'Добавить регион',\n 'country' => $country,\n 'countries' => Country::all()\n ];\n\n return view('admin.regions.create', $data);\n }", "function travel_type_form_delete_confirm($form, &$form_state, $entity_type) {\n // Store the entity in the form.\n $form_state['entity_type'] = $entity_type;\n\n // Show confirm dialog.\n $message = t('Are you sure you want to delete entity type %title?', array('%title' => entity_label('entity_type', $entity_type)));\n return confirm_form(\n $form,\n $message,\n 'travel/' . entity_id('travel_type', $entity_type),\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function createAction(Request $request)\n {\n $entity = new Country();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('orkestro_backend_country_show', array('iso_code' => $entity->getIsoCode())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Tipoanuncio $tipoanuncio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipoanuncio_delete', array('id' => $tipoanuncio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "public function edit(Country $country)\n {\n \n }", "public function create()\n {\n return view(\"admin.cities.create\", [\"countries\" => Country::all()]);\n }", "public function destroy($id)\n {\n Country::where('id', $id)->delete();\n return redirect()->route('country.index');\n }", "public function create()\n {\n $main = new MainClass();\n $main = $main->getMain();\n $valor = $this->validPermisoMenu();\n if ($valor == false){\n return view('errors.403', compact('main'));\n }\n return view('countries.create',compact('main'));\n }", "public function create()\n {\n $association = Association::pluck('name','id');\n return view('country.create', compact('association'));\n }", "private function createDeleteForm(Translator $translator)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('translator_delete', array('id' => $translator->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "function vu_core_hubspot_map_delete_form($form, &$form_state) {\n $form['webform_field_name'] = [\n '#type' => 'textfield',\n '#title' => t('What is the webform field you want to delete?'),\n '#required' => TRUE,\n '#size' => 100,\n '#maxlength' => 100,\n ];\n\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#attributes' => ['onclick' => 'if(!confirm(\"Are you sure you want to delete this field?\")){return false;}'],\n ];\n\n $form['cancel'] = [\n '#type' => 'submit',\n '#value' => t('Cancel'),\n '#submit' => ['vu_core_hubspot_map_add_form_cancel'],\n '#limit_validation_errors' => [],\n ];\n\n return $form;\n}", "public function destroy($id)\n {\n $country = Country::findOrFail($id);\n $country->delete();\n return $country;\n }", "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function actionDelete($city_id, $country_id)\n {\n $this->findModel($city_id, $country_id)->delete();\n\n //delete all customer address\n CustomerAddress::deleteAll(['city_id' => $city_id]);\n\n //delete customer cart - area_id\n CustomerCart::deleteAll('area_id in (select area_id from {{%location}}\n where city_id = \"'.$city_id.'\")');\n\n //delete all location - city_id\n Location::deleteAll(['city_id' => $city_id]);\n\n //delete all vendor location - city_id\n VendorLocation::deleteAll(['city_id' => $city_id]);\n\n Yii::$app->session->setFlash('success', 'Governorate deleted successfully!');\n return $this->redirect(['index']);\n\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm(Person $person)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_person_delete', ['id' => $person->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('customers_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Person $person)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('users_delete', array('id' => $person->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n //\n dd($id);\n Country::destroy($id);\n session()->flash('message','Country Deleted Successfully');\n return redirect()->back();\n }", "private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(FroFacTransferencia $froFacTransferencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frofactransferencia_delete', array('id' => $froFacTransferencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(districts $district)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('districts_delete', array('id' => $district->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Combo $combo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('combo_delete', array('id' => $combo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(PhpposPeople $phpposPerson)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('phppospeople_delete', array('id' => $phpposPerson->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }" ]
[ "0.7399725", "0.71989477", "0.65310997", "0.65064156", "0.6375539", "0.61514044", "0.6146466", "0.61418074", "0.6138512", "0.61199176", "0.6112619", "0.61109596", "0.6090369", "0.60847354", "0.6069296", "0.6047175", "0.6046414", "0.6015595", "0.60115665", "0.5987653", "0.59843695", "0.59682447", "0.59654117", "0.59646904", "0.59482807", "0.5944021", "0.59213305", "0.59151226", "0.5905105", "0.5902828", "0.5893034", "0.58814836", "0.5876497", "0.5868926", "0.582772", "0.58143073", "0.581104", "0.58047885", "0.58047885", "0.57934517", "0.5787416", "0.5779797", "0.5772548", "0.57627356", "0.5759746", "0.5759746", "0.5752873", "0.57447696", "0.5744364", "0.5713387", "0.57099754", "0.57042783", "0.5693976", "0.5693556", "0.5692556", "0.5657921", "0.5645218", "0.5644951", "0.562742", "0.5626886", "0.56249076", "0.56115705", "0.56061894", "0.56043863", "0.5603439", "0.5602725", "0.56021166", "0.5599069", "0.55975944", "0.55955", "0.5593016", "0.55911994", "0.5583972", "0.5583261", "0.5583231", "0.55783254", "0.5573751", "0.5568049", "0.5567616", "0.5561628", "0.55516684", "0.5546059", "0.5543044", "0.55413514", "0.5538728", "0.5537391", "0.5520547", "0.5517924", "0.5508927", "0.5508493", "0.5503375", "0.54993117", "0.549231", "0.5487061", "0.54851466", "0.548507", "0.5484561", "0.5476318", "0.54693145", "0.54689103" ]
0.78188384
0
Pull tournament from db and display from short code
public function tournamentSignUpFormShortCode($attributes) { global $wpdb; $attr = shortcode_atts(array( 'tournament' => '', ), $attributes); // if no tournament was submitted then return error if(!$attr['tournament']) { return $this->alert(['alert' => 'error'], 'A tournament name is required.'); } $lookup = $wpdb->get_row($wpdb->prepare('SELECT * FROM champ_tournaments WHERE name="%s"', [$attr['tournament']])); // if lookup was no found then return error if(!$lookup) { return $this->alert(['alert' => 'error'], 'No tournament was found for <b>&#8220;'. $attr['tournament'] .'&#8221;</b>'); } // check and make sure that the tournament for is open if(time() < strtotime($lookup->sign_up_open)) { return $this->alert(['alert' => 'warning'], 'The tournament <b>&#8220;'. $lookup->title .'&#8221;</b> will start taking submissions on '. date('l, F jS \a\t g:iA', strtotime($lookup->sign_up_open)) .'.'); } // check to see if the tournament for is closed if(time() > strtotime($lookup->sign_up_close)) { return $this->alert(['alert' => 'warning'], 'The tournament <b>&#8220;'. $lookup->title .'&#8221;</b> is now closed to submissions'); } return do_shortcode($lookup->sign_up_form_shortcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showGames( $curDivision=\"\" ) {\n\n/* ... define values for template variables to display on page */\n if ($curDivision == \"\") {\n $data['title'] = \"Playoffs - \".$this->config->item( 'siteName' );\n }\n else {\n $data['title'] = \"Division \".$curDivision.\" Playoffs - \".$this->config->item( 'siteName' );\n }\n\n/* ... get the schedule details from the database */ \n if ($curDivision == \"\") { \n $data['tournDetails'] = $this->Model_Tournament->getAllDetails();\n $data['tournHeader'] = \"League Playoff Schedule\";\n }\n else {\n $data['tournDetails'] = $this->Model_Tournament->getDivDetails( $curDivision );\n $data['tournHeader'] = \"Division \".$curDivision.\" Playoff Schedule\";\n }\n\n/* ... replace seeding placeholders in the schedule with appropriate team ids */\n for ($i=0; $i < count( $data['tournDetails'] ); $i++) {\n\n if ($data['tournDetails'][$i]['Status'] == \"SCHEDULED\") {\n if ($curDivision == \"\") {\n $seedDiv = substr( $data['tournDetails'][$i]['TournamentID'], 0, 1 );\n }\n else {\n $seedDiv = $curDivision;\n }\n if ($data['tournDetails'][$i]['HomeTeamID'] == NULL && $data['tournDetails'][$i]['HomeSeed'] != NULL) {\n $teamID = $this->Model_Tournament->getSeedTeamID( $data['tournDetails'][$i]['HomeSeed'], $seedDiv );\n $data['tournDetails'][$i]['HomeTeamID'] = $teamID > 0 ? $teamID : \"\";\n }\n if ($data['tournDetails'][$i]['VisitTeamID'] == NULL && $data['tournDetails'][$i]['VisitSeed'] != NULL) {\n $teamID = $this->Model_Tournament->getSeedTeamID( $data['tournDetails'][$i]['VisitSeed'], $seedDiv );\n $data['tournDetails'][$i]['VisitTeamID'] = $teamID > 0 ? $teamID : \"\";\n }\n }\n }\n \n/* ... set the name of the page to be displayed */\n $data['main'] = \"schedule/sched_tournamentMaster\";\n\n $this->index( $data );\n \n/* ... time to go */\n return;\n }", "function showteam( $ffanumber, $lastname )\n{\n\t\t$db_hostname = 'gungahlinunitedfc.org.au';\n\t\t$db_username = 'gufcweb_dev';\n\t\t$db_password = 'deve!oper';\n\t\t$db_database = 'gufcweb_player';\n\n \t$mysqli = new mysqli($db_hostname,$db_username,$db_password, $db_database);\n\n\t\t$playerteam = \"\";\n\t\t\n\t\t$sqlinner = \" SELECT * FROM gufcdraws.player where FFANumber = '\".$ffanumber.\"' and LastName = '\".$lastname.\"' and display = 'Y'\";\n\n\t\t$sqlexample1 = \" SELECT * FROM gufcdraws.player where FFANumber = 28069631 and LastName = 'Chilmaid' and display = 'Y' \";\n\t\t$sqlexample2 = \" SELECT * FROM gufcdraws.player where fkteamid = 'U16 Div 2 Boys' and display = 'Y' \";\n\t\t\n\t\t$r_queryinner = $mysqli->query($sqlinner);\n\n\t\t$todays_date = date(\"Y-m-d\");\t\t\t\t\t\t\n\n\t\t$msg = 'No player found.';\t\n\n\t\techo '<table class=\"table\" align=\"center\" border=\"1\" >';\n\t\techo '<th>First Name</th>';\n\t\techo '<th>Last Name</th>';\n\t\techo '<th>Team Name</th>';\n\n\t\tif ( ! $r_queryinner )\n\t\t{\n\t\t\techo 'Player not found'; \n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sqlteam = \" SELECT FirstName,LastName,fkteamid FROM gufcdraws.player where fkteamid = '\".$playerteam.\"' and display = 'Y'\";\n\t\t\t\n\t\t\t$r_queryteam = $mysqli->query($sqlteam);\n\t\t\t\n\t\t\tif ( $r_queryteam ) {\n\t\t\t\n\t\t\t\t$rowteam = mysqli_fetch_assoc($r_queryteam)\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>'.$rowteam['FirstName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['LastName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['fkteamid'].'</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t\techo '<p/>';\n\t\t}\n}", "function LeagueSeasonPlayersResults(){\n\t\n\tglobal $db_admin,$db_admin_contact,$db_admin_guids,$db_league_teams,$db_league_teams_sub,$db_league_seasons,$db_league_seasons_results_players;\n\tglobal $db_country,$db_league_seasons_rounds,$db_league_players,$db_league_awards;\n\tglobal $eden_cfg;\n\tglobal $url_flags,$url_league_awards;\n\t\n\t$result = \"\";\n\t$result .= \"<table style=\\\"width:500px;\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\t$result .= \"\t<tr>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:40px;\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:60px;\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._CMN_COUNTRY.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_GUID.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\";\n\t$result .= \"\t</tr>\";\n \t$res_results_players = mysql_query(\"\n\tSELECT lsrp.league_season_result_player_player_id, a.admin_id, a.admin_nick, lt.league_team_id, lt.league_team_name, \n\tlsrp.league_season_result_player_points, c.country_shortname, c.country_name, agid.admin_guid_guid \n\tFROM $db_league_seasons_results_players AS lsrp \n\tJOIN $db_league_players AS lp ON lp.league_player_id = lsrp.league_season_result_player_player_id \n\tJOIN $db_admin AS a ON a.admin_id = lp.league_player_admin_id \n\tJOIN $db_admin_contact AS ac ON ac.aid = a.admin_id \n\tJOIN $db_admin_guids AS agid ON agid.aid = a.admin_id AND agid.admin_guid_game_id = lp.league_player_game_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id = lp.league_player_team_id \n\tJOIN $db_country AS c ON c.country_id = ac.admin_contact_country \n\tWHERE lsrp.league_season_result_player_season_id = \".(integer)$_GET['sid'].\" \n\tORDER BY lsrp.league_season_result_player_points DESC LIMIT 10\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$i = 1;\n\twhile ($ar_results_players = mysql_fetch_array($res_results_players)){\n\t\t// Call function\n\t\t$ar_award = LeagueCheckAwards(1,(integer)$_GET['sid'],(integer)$ar_results_players['league_season_result_player_player_id'],0);\n\t\t\n\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t$result .= \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t$result .= \"\t<td align=\\\"right\\\" valign=\\\"top\\\">\"; if($ar_award['league_award_place']){$result .= \"<img src=\\\"\".$url_league_awards.$ar_award['league_award_img'].\"\\\" alt=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" title=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" />\";} else {$result .= \"<strong>\".$i.\"</strong>\";} $result .= \"</td>\";\n\t\t$result .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\".$ar_results_players['league_season_result_player_points'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><img src=\\\"\".$url_flags.$ar_results_players['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" title=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" /></td>\";\n\t \t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=player&amp;mode=player_acc&amp;id=\".$ar_results_players['admin_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['admin_nick']).\"</a></td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\">\".$ar_results_players['admin_guid_guid'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=league_team&amp;mode=team_home&amp;ltid=\".$ar_results_players['league_team_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['league_team_name']).\"</a></td>\";\n\t\t$result .= \"</tr>\";\n\t\t$i++;\n\t}\n\t$result .= \"\t<tr>\\n\";\n\t$result .= \"\t\t<td colspan=\\\"5\\\"><br /><form action=\\\"sys_save.php?action=league_awards_give_to_players&sid=\".$_GET['sid'].\"\\\" method=\\\"post\\\" name=\\\"form1\\\" enctype=\\\"multipart/form-data\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$_GET['sid'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_AWARD_SUBMIT_PLAYER.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t$result .= \"\t\t</form>\\n\";\n\t$result .= \"\t\t</td>\\n\";\n\t$result .= \"\t</tr>\\n\";\n\t$result .= \"</table>\\n\";\n\t\n\treturn $result;\n}", "function listTeams() {\n global $oDbHelper;\n\n $sQuery = \"SELECT * FROM team WHERE competition_id = \" . COMPETITION_ID;\n $oResult = $oDbHelper->executeQuery($sQuery);\n $oDbHelper->printDbResult($oResult);\n}", "function ShowTeamShowPlayers($team_id,$team_sub_id,$game_id,$mode = 1,$allowed_player_id = 0){\n\t\n\tglobal $db_league_players,$db_admin,$db_admin_guids,$db_clan_games;\n\t\n\tif ($mode == 2){\n\t\t$admin_guids = \"\";\n\t\t$sub_team = \"\";\n\t} else {\n\t\t$res_game = mysql_query(\"SELECT clan_games_game FROM $db_clan_games WHERE clan_games_id = \".(integer)$game_id) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t$ar_game = mysql_fetch_array($res_game);\n\t\t$sub_team = \"<tr style=\\\"background: #DCE3F1;\\\">\\n\";\n\t\t$sub_team .= \"\t<td colspan=\\\"5\\\" class=\\\"eden_title_middle\\\">Sub Team - \".$ar_game['clan_games_game'].\"</td>\\n\";\n\t \t$sub_team .= \"</tr>\\n\";\n\t}\n\t$output = $sub_team;\n\t$res_player = mysql_query(\"\n\tSELECT a.admin_id, a.admin_nick, a.admin_team_own_id, ag.admin_guid_guid, lp.league_player_id, lp.league_player_position_captain, lp.league_player_position_assistant, lp.league_player_position_player \n\tFROM $db_league_players AS lp \n\tJOIN $db_admin AS a ON a.admin_id=lp.league_player_admin_id \n\tLEFT JOIN $db_admin_guids AS ag ON ag.aid=lp.league_player_admin_id AND ag.admin_guid_game_id=\".(integer)$game_id.\" \n\tWHERE lp.league_player_team_id=\".(integer)$team_id.\" AND lp.league_player_game_id=\".(integer)$game_id) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$num = mysql_num_rows($res_player);\n\t$output .= \"<tr style=\\\"background: #ff8080;\\\">\\n\";\n\tif ($num > 0){\n\t\t$output .= \"\t<td width=\\\"120\\\" valign=\\\"middle\\\" class=\\\"eden_title_middle\\\">ID</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_PLAYER_POSITION.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_GUID.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\"></td>\\n\";\n\t} else {\n\t\t$output .= \"\t<td colspan=\\\"5\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_TEAM_NO_PLAYER_IN_SUB.\"</td>\\n\";\n\t}\n\t$output .= \"</tr>\\n\";\n\t$cislo = 0;\n\twhile ($ar_player = mysql_fetch_array($res_player)){\n\t\tif ($cislo % 2 == 0){ $cat_class = \"cat_level2_even\";} else { $cat_class = \"cat_level2_odd\";}\n\t\t$output .= \"<tr class=\\\"\".$cat_class.\"\\\">\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\".$ar_player['admin_id'].\"</td>\\n\";\n\t\t$output .= \"\t<td width=\\\"120\\\" valign=\\\"middle\\\">\";\n\t\t\t\t\t\tif ($mode == 2){\n\t\t\t\t\t\t\t$output .= \"<img src=\\\"./images/sys_\"; \n\t\t\t\t\t\t\tif (in_array($ar_player['league_player_id'],$allowed_player_id)){\n\t\t\t\t\t\t\t\t$output .= \"yes\"; $alt = _LEAGUE_PLAYER_PLAY;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$output .= \"no\"; $alt = _LEAGUE_PLAYER_NO_PLAY;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t$output .= \".gif\\\" width=\\\"15\\\" height=\\\"15\\\" alt=\\\"\".$alt.\"\\\" title=\\\"\".$alt.\"\\\"> \"; \n\t\t\t\t\t\t} \n\t\t\t\t\t\t$output .= \"<strong>\".stripslashes($ar_player['admin_nick']).\"</strong>\";\n\t\t$output .= \"\t</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; \n\t\t\t\t\tif (LeagueCheckPrivileges(\"O\",$ar_player['admin_id'],$team_id,\"\") == $team_id){$output .= _LEAGUE_PLAYER_POSITION_O; $comma = \", \";} else {$comma = \"\";}\n\t\t\t\t\tif (LeagueCheckPrivileges(\"C\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_C;} \n\t\t\t\t\tif (LeagueCheckPrivileges(\"A\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_A;} \n\t\t\t\t\tif (LeagueCheckPrivileges(\"P\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_P;} \n\t\t$output .= \"\t</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; if ($ar_player['admin_guid_guid'] != \"\"){ $output .= stripslashes($ar_player['admin_guid_guid']);} else {$output .= \"<span class=\\\"red\\\">\"._LEAGUE_PLAYER_NO_GUID.\"</span>\";} $output .= \"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\"></td>\\n\";\n\t\t$output .= \"</tr>\\n\";\n\t\t$cislo++;\n\t}\n\t\n\treturn $output;\n}", "function ShowInfoPlayers($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"SELECT idPlace, PondFishesPlace, FishedFishesPlace, ReleasedFishesPlace, OrderPlace, PseudoPlayer, RankingPlayer, DescriptionStatus FROM fishermenland.place\n INNER JOIN fishermenland.player ON place.fkPlayerPlace = player.idPlayer\n INNER JOIN fishermenland.status ON place.fkStatusPlace = status.idStatus WHERE fkGamePlace = '$idGame' ORDER BY OrderPlace ASC\");\n\n return $req;\n}", "function LeagueSeasonTeamsResults(){\n\t\n\tglobal $db_league_leagues,$db_league_teams,$db_league_teams_sub,$db_league_seasons,$db_league_seasons_results_teams,$db_league_awards;\n\tglobal $db_country,$db_league_seasons_rounds;\n\tglobal $eden_cfg;\n\tglobal $url_flags,$url_league_awards;\n\t\n\t$result = \"\";\n\t$result .= \"<table style=\\\"width:400px;\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\t$result .= \"\t<tr>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:40px;\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:60px;text-align:center;\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:50px;\\\">\"._CMN_COUNTRY.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\t$result .= \"\t</tr>\\n\";\n \t$res_results_teams = mysql_query(\"\n\tSELECT lt.league_team_id, lt.league_team_name, lsrt.league_season_result_team_team_sub_id, lsrt.league_season_result_team_points, c.country_shortname, c.country_name, ls.league_season_end \n\tFROM $db_league_seasons_results_teams AS lsrt \n\tJOIN $db_league_teams AS lt ON lt.league_team_id = lsrt.league_season_result_team_team_id \n\tJOIN $db_country AS c ON c.country_id = lt.league_team_country_id \n\tJOIN $db_league_seasons AS ls ON ls.league_season_id = \".(integer)$_GET['sid'].\" \n\tWHERE lsrt.league_season_result_team_season_id = \".(integer)$_GET['sid'].\" \n\tORDER BY lsrt.league_season_result_team_points DESC LIMIT 10\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$i = 1;\n\twhile ($ar_results_teams = mysql_fetch_array($res_results_teams)){\n\t\t// Call function\n\t\t$ar_award = LeagueCheckAwards(2,(integer)$_GET['sid'],0,(integer)$ar_results_teams['league_season_result_team_team_sub_id']);\n\t\t\n\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t$result .= \"\t<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t$result .= \"\t\t<td align=\\\"right\\\" valign=\\\"top\\\">\"; if($ar_award['league_award_place']){$result .= \"<img src=\\\"\".$url_league_awards.$ar_award['league_award_img'].\"\\\" alt=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" title=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" />\";} else { $result .= \"<strong>\".$i.\"</strong>\";} $result .= \"</td>\\n\";\n\t\t$result .= \"\t\t<td valign=\\\"top\\\" align=\\\"right\\\">\".$ar_results_teams['league_season_result_team_points'].\"</td>\\n\";\n\t\t$result .= \"\t\t<td valign=\\\"top\\\" align=\\\"center\\\"><img src=\\\"\".$url_flags.$ar_results_teams['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_results_teams['country_name']).\"\\\" title=\\\"\".stripslashes($ar_results_teams['country_name']).\"\\\" /></td>\\n\";\n\t \t$result .= \"\t\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=league_team&mode=team_home&ltid=\".$ar_results_teams['league_team_id'].\"&lang=\".$_GET['lang'].\"&filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_teams['league_team_name']).\"</a></td>\\n\";\n\t\t$result .= \"\t</tr>\\n\";\n\t\t$i++;\n\t}\n\t// Show button for setting awards only if season is over\n\tif ($ar_results_teams['league_season_end'] < date(\"Y-m-d H:i:s\")){\n\t\t$result .= \"\t<tr>\\n\";\n\t\t$result .= \"\t\t<td colspan=\\\"5\\\"><br /><form action=\\\"sys_save.php?action=league_awards_give_to_teams&sid=\".$_GET['sid'].\"\\\" method=\\\"post\\\" name=\\\"form1\\\" enctype=\\\"multipart/form-data\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$_GET['sid'].\"\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_AWARD_SUBMIT_TEAM.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t\t$result .= \"\t\t</form>\\n\";\n\t\t$result .= \"\t\t</td>\\n\";\n\t\t$result .= \"\t</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\t\n\treturn $result;\n}", "public function actionDisplay() {\r\n global $mainframe, $user; \r\n $tourID = Request::getVar('tourID',0);\r\n $model = Tournament::getInstance();\r\n $tour_detail = $model->getItem($tourID);\r\n $lists = $model->getLists($tourID, $tour_detail); \r\n \r\n $this->addBarTitle(\"Tournament: <small>$tour_detail->name</small>\", \"tournaments\"); \r\n $this->addIconToolbar(\"Apply\", Router::buildLink(\"gamesport\", array(\"view\"=>\"tournament\", \"layout\" => \"save\",\"tourID\"=>$tourID)), \"apply\");\r\n addSubMenuGameSportTour('tournament');\r\n \r\n $this->render('teamjoined', array('tour_detail'=> $tour_detail,'lists' => $lists));\r\n }", "function get_team_info($team_id) {\n global $db;\n $query = 'SELECT t.team_id\n , t.name\n , t.nickname\n , t.logo_file_name\n , l.name as league\n , l.abbr as league_abbr\n , s.name as sub_league_name\n , s.abbr as sub_league_abbr\n , d.name as div_name\n FROM teams t INNER JOIN leagues l ON t.league_id = l.league_id\n INNER JOIN sub_leagues s ON t.league_id = s.league_id AND t.sub_league_id = s.sub_league_id\n INNER JOIN divisions d ON t.league_id = d.league_id AND t.sub_league_id = d.sub_league_id\n AND t.division_id = d.division_id\n WHERE t.team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue('team_id', $team_id);\n $statement->execute();\n $team_info = $statement->fetch();\n $statement->closeCursor();\n return $team_info;\n}", "function display_player_stats($res) {\n\n echo '<br><div class=\"stat-sheet\"><h3>Regular Season Stats</h3><br>';\n\n // Table header:\n echo '<table class=\"player-tbl\" cellspacing=\"5\" cellpadding=\"5\"\n width=\"75%\">\n\t<tr class=\"player-stat-heading\">\n\t\t<td align=\"left\"><b>Year</b></td>\n\t\t<td align=\"left\"><b>Team</b></td>\n\t\t<td align=\"left\"><b>Lg</b></td>\n\t\t<td align=\"left\"><b>G</b></td>\n\t\t<td align=\"left\"><b>Min</b></td>\n\t\t<td align=\"left\"><b>Pts</b></td>\n\t\t<td align=\"left\"><b>PPG</b></td>\n\t\t<td align=\"left\"><b>FGM</b></td>\n\t\t<td align=\"left\"><b>FGA</b></td>\n\t\t<td align=\"left\"><b>FGP</b></td>\n\t\t<td align=\"left\"><b>FTM</b></td>\n\t\t<td align=\"left\"><b>FTA</b></td>\n\t\t<td align=\"left\"><b>FTP</b></td>\n\t\t<td align=\"left\"><b>3PM</b></td>\n\t\t<td align=\"left\"><b>3PA</b></td>\n\t\t<td align=\"left\"><b>3PP</b></td>\n\t\t<td align=\"left\"><b>ORB</b></td>\n\t\t<td align=\"left\"><b>DRB</b></td>\n\t\t<td align=\"left\"><b>TRB</b></td>\n\t\t<td align=\"left\"><b>RPG</b></td>\n\t\t<td align=\"left\"><b>AST</b></td>\n\t\t<td align=\"left\"><b>APG</b></td>\n\t\t<td align=\"left\"><b>STL</b></td>\n\t\t<td align=\"left\"><b>BLK</b></td>\n\t\t<td align=\"left\"><b>TO</b></td>\n\t\t<td align=\"left\"><b>PF</b></td>\n\t</tr>\n';\n\n // Fetch and print all the records:\n while ($row = mysqli_fetch_array($res, MYSQLI_ASSOC)) {\n echo '<tr class=\"player-stat\">\n\t\t\t<td align=\"left\">' . $row['year'] . '</td>\n\t\t\t<td align=\"left\">' . $row['team'] . '</td>\n\t\t\t<td align=\"left\">' . $row['lg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['g'] . '</td>\n\t\t\t<td align=\"left\">' . $row['min'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pts'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ppg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fga'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fta'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpa'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['orb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['drb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['trb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['rpg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ast'] . '</td>\n\t\t\t<td align=\"left\">' . $row['apg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['stl'] . '</td>\n\t\t\t<td align=\"left\">' . $row['blk'] . '</td>\n\t\t\t<td align=\"left\">' . $row['turnover'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pf'] . '</td>\n\t\t</tr>\n\t\t';\n }\n\n echo '</table></div>';\n\n}", "function get_standing_team($idSeason)\n{\n $table_standing = get_standing_team_db($idSeason);\n return $table_standing;\n}", "function get_team_info_db($idTeam)\n{\n require('./model/connect_db.php');\n $sql = \"select t.nameTeam from team t where t.idteam = '%d'\";\n $request = sprintf($sql,$idTeam);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $team_info = mysqli_fetch_assoc($result);\n return $team_info;\n}", "function b_minitable_show( ) {\n global $xoopsDB;\n $module_handler =& xoops_gethandler('module');\n $module =& $module_handler->getByDirname('cricketstats');\n //Get config for News module\n $config_handler =& xoops_gethandler('config');\n if ($module) {\n $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));\n }\n \n //Season id\n $sql = \"SELECT SeasonID, SeasonName FROM \".$xoopsDB->prefix(\"cricket_seasonnames\").\" WHERE SeasonDefault=1\";\n $cricket_seasonname = $xoopsDB->query($sql);\n $cricket_seasonname = $xoopsDB->fetchArray($cricket_seasonname);\n $cricket_season_id = $cricket_seasonname['SeasonID'];\n $cricket_seasonname = $cricket_seasonname['SeasonName']; \n \n //League id\n $sql2 = \"SELECT LeagueID, LeagueName FROM \".$xoopsDB->prefix(\"cricket_leaguenames\").\" WHERE LeagueDefault=1\";\n $cricket_leaguename = $xoopsDB->query($sql2);\n $cricket_leaguename = $xoopsDB->fetchArray($cricket_leaguename);\n $cricket_league_id = $cricket_leaguename['LeagueID'];\n $cricket_leaguename = $cricket_leaguename['LeagueName']; \n\n //For win, draw and lost?\n $cricket_for_win = $moduleConfig['forwin'];\n $cricket_for_draw = $moduleConfig['fordraw'];\n $cricket_for_lose = $moduleConfig['forloss'];\n \n //Query to get teams from selected season & league\n $cricket_get_teams = $xoopsDB->query(\"SELECT DISTINCT\n O.OpponentName AS name,\n O.OpponentID AS id\n FROM \".$xoopsDB->prefix(\"cricket_opponents\").\" O, \".$xoopsDB->prefix(\"cricket_leaguematches\").\" LM\n WHERE LM.LeagueMatchSeasonID = '$cricket_season_id' AND\n\t\t\t\t\t\tLM.LeagueMatchLeagueID = '$cricket_league_id' AND\n (O.OpponentID = LM.LeagueMatchHomeID OR\n O.OpponentID = LM.LeagueMatchAwayID)\n ORDER BY name\");\n \n //Lets read teams into the table\n $i = 0;\n while($cricket_data = $xoopsDB->fetchArray($cricket_get_teams))\n {\n $team[$cricket_data['id']]['name'] = $cricket_data['name'];\n $team[$cricket_data['id']]['homewins'] = 0;\n $team[$cricket_data['id']]['awaywins'] = 0;\n $team[$cricket_data['id']]['homeloss'] = 0;\n $team[$cricket_data['id']]['awayloss'] = 0;\n $team[$cricket_data['id']]['hometie'] = 0;\n $team[$cricket_data['id']]['awaytie'] = 0;\n $team[$cricket_data['id']]['homerunsfor'] = 0;\n $team[$cricket_data['id']]['homerunsagainst'] = 0;\n $team[$cricket_data['id']]['awayrunsfor'] = 0;\n $team[$cricket_data['id']]['awayrunsagainst'] = 0;\n $team[$cricket_data['id']]['matches'] = 0;\n }\n \n //Match data\n $query = $xoopsDB->query(\"SELECT\n LM.LeagueMatchID AS mid, \n LM.LeagueMatchHomeID as homeid,\n LM.LeagueMatchAwayID as awayid, \n LM.LeagueMatchHomeRuns as homeruns,\n LM.LeagueMatchAwayRuns as awayruns \n FROM\n \".$xoopsDB->prefix(\"cricket_leaguematches\").\" LM\n \tWHERE\n LM.LeagueMatchSeasonID = '$cricket_season_id' AND LM.LeagueMatchLeagueID = '$cricket_league_id' AND\n\t\t\t\t\t\t\t\tLM.LeagueMatchHomeRuns IS NOT NULL\");\n while ($cricket_matchdata = $xoopsDB->fetchArray($query)) {\n $cricket_hometeam = $cricket_matchdata['homeid'];\n $cricket_awayteam = $cricket_matchdata['awayid'];\n \n $team[$cricket_hometeam]['matches'] = $team[$cricket_hometeam]['matches'] + 1;\n $team[$cricket_awayteam]['matches'] = $team[$cricket_awayteam]['matches'] + 1;\n \n $team[$cricket_hometeam]['homerunsfor'] = $team[$cricket_hometeam]['homerunsfor'] + $cricket_matchdata['homeruns'];\n $team[$cricket_awayteam]['awayrunsagainst'] = $team[$cricket_awayteam]['awayrunsagainst'] + $cricket_matchdata['homeruns'];\n $team[$cricket_awayteam]['awayrunsfor'] = $team[$cricket_awayteam]['awayrunsfor'] + $cricket_matchdata['awayruns'];\n $team[$cricket_hometeam]['homerunsagainst'] = $team[$cricket_hometeam]['homerunsagainst'] + $cricket_matchdata['awayruns'];\n \n $rundiff = $cricket_matchdata['homeruns'] - $cricket_matchdata['awayruns'];\n if ($rundiff > 0) {\n $team[$cricket_hometeam]['homewins'] = $team[$cricket_hometeam]['homewins'] + 1;\n $team[$cricket_awayteam]['awayloss'] = $team[$cricket_awayteam]['awayloss'] + 1;\n }\n elseif ($rundiff == 0) {\n $team[$cricket_hometeam]['hometie'] = $team[$cricket_hometeam]['hometie'] + 1;\n $team[$cricket_awayteam]['awaytie'] = $team[$cricket_awayteam]['awaytie'] + 1;\n }\n elseif ($rundiff < 0) {\n $team[$cricket_hometeam]['homeloss'] = $team[$cricket_hometeam]['homeloss'] + 1;\n $team[$cricket_awayteam]['awaywins'] = $team[$cricket_awayteam]['awaywins'] + 1;\n }\n }\n $cricket_get_deduct = $xoopsDB->query(\"SELECT points, teamid FROM \".$xoopsDB->prefix(\"cricket_deductedpoints\").\" WHERE seasonid = '$cricket_season_id' AND leagueid = '$cricket_league_id'\");\n while ($cricket_d_points = $xoopsDB->fetchArray($cricket_get_deduct)) {\n $team[$cricket_d_points[\"teamid\"]]['d_points'] = $cricket_d_points['points'];\n }\n foreach ($team as $teamid => $thisteam) {\n $temp_points = isset($thisteam['d_points']) ? $thisteam['d_points'] : 0;\n $cricket_points[$teamid] = ($thisteam['homewins'] * $cricket_for_win) + ($thisteam['awaywins'] * $cricket_for_win) + ($thisteam['hometie'] * $cricket_for_draw) + ($thisteam['awaytie'] * $cricket_for_draw) + $temp_points;\n $cricket_runsfor[$teamid] = $thisteam['homerunsfor'] + $thisteam['awayrunsfor'];\n $cricket_runsagainst[$teamid] = $thisteam['homerunsagainst'] + $thisteam['awayrunsagainst'];\n }\n array_multisort($cricket_points, SORT_NUMERIC, SORT_DESC, $cricket_runsfor, SORT_NUMERIC, SORT_DESC, $cricket_runsagainst, SORT_NUMERIC, SORT_DESC, $team, SORT_STRING, SORT_ASC);\n \n //Print the table\n $block['title'] = _BL_CRICK_MINITABLE;\n $block['content'] = \"<table width='100%' cellspacing='2' cellpadding='2' border='0'>\n <tr>\n <td width='50%' align='left'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_TEAM.\"</u></span></td>\n <td width='15%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_POINTS.\"</u></span></td>\n <td width='35%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>\"._BL_CRICK_RUNS.\"</u></span></td> \n </tr></table><marquee behavior='scroll' direction='up' width='100%' height='100' scrollamount='1' scrolldelay='60' onmouseover='this.stop()' onmouseout='this.start()'><table width='100%' cellspacing='2' cellpadding='2' border='0'>\";\n foreach ($team as $teamid => $thisteam)\n {\n $block['content'] .= \"<tr>\n <td width='50%' align='left'><span style='font-size: 10px; font-weight: normal;'>\".$thisteam['name'].\"</span></td>\n <td width='15%' align='center'><span style='font-size: 10px; font-weight: normal;'>\".$cricket_points[$teamid].\"</span></td>\n <td width='35%' align='center'><span style='font-size: 10px; font-weight: normal;'>\".$cricket_runsfor[$teamid].\"-\".$cricket_runsagainst[$teamid].\"</span></td>\n </tr>\";\n }\n $block['content'] .= \"</table><br><div align=\\\"center\\\"><a href=\\\"\".XOOPS_URL.\"/modules/cricketstats/index.php\\\">\"._BL_CRICK_GOTOMAIN.\"</a></div></marquee>\";\n return $block;\n}", "function get_team_name($team_id) {\n global $db;\n $query = 'SELECT team_id, name AS city, nickname FROM teams\n WHERE team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_name = $statement->fetch();\n $statement->closeCursor();\n return $team_name;\n}", "public function show()\n {\n $players = Player::all();\n $player = Player::where('id', '=', Auth::user()->id)->first();\n $actice_user_player = Player::where('id', '=', Auth::user()->id)->first();\n /* ======================================================\n Navigation\n ====================================================== */\n //Current Header\n $my_player_heading = '';\n $update_heading = '';\n $my_team_heading = '';\n $team_update_heading = '';\n $free_agency_heading = 'active';\n $activity_stream_heading = '';\n $find_teams_heading = '';\n\n //List of teams owned\n $teams_owned = [];\n $teams_on = [];\n\n foreach($player->teams as $team) {\n if ($team->pivot->status == 1) {\n $teams_owned[] = $team;\n }\n elseif($team->pivot->status == 2) {\n $teams_on[] = $team;\n }\n }\n\n /* ======================================================\n Free Agency Banner Content\n ====================================================== */\n $name = $player->name;\n $position = $player->position;\n $archetype = $player->archetype;\n $archetype2 = $player->archetype2;\n $player_profile_pic = $player->player_profile_pic;\n $user_avatar = $player->player_profile_pic;\n\n $search_name = '';\n $search_position = ['PG', 'SG', 'SF', 'PF', 'C'];\n $search_overall_min = 60;\n $search_overall_max = 99;\n $search_overall = [];\n\n $search_archetype = ['Playmaker', 'Lockdown Defender', 'Sharp Shooter', 'Slasher', 'Athletic Finisher', 'Stretch Big', 'Post Scorer', 'Glass Cleaner', 'Point Forward', 'Shot Creator'];\n $search_archetype2 = ['Playmaker', 'Lockdown Defender', 'Sharp Shooter', 'Slasher', 'Athletic Finisher', 'Stretch Big', 'Post Scorer', 'Glass Cleaner', 'Point Forward', 'Shot Creator'];\n\n $search_type_role = ['On-Ball | Facilitator','On-Ball | Scorer','Off-Ball | Facilitator','Off-Ball | Finisher'];\n $search_style = ['Drible-N-Dime', 'Run-The-Break', 'Pass-To-Assist-King', 'Assist-King', 'Ball-Movement-Coach', 'Screen-And-D', 'Inside-Out-Big',\n 'Defensive-Anchor', 'Boards-N-Outlets', 'Putback-King','Shot-Creator', 'Ankle-Breaking-Driver', 'Blow-By-Dunker', 'Isolation-Specialist',\n 'Post-Move-Master', 'Fast-Break-Finisher', 'Pick-N-Roll-Big', 'Second-Chance-Only', 'Backdoor-Posterizer', 'Catch-N-Shoot', 'Slash-N-Shoot'];\n $search_role = [];\n $search_type = [];\n foreach($search_type_role as $filter){\n array_push($search_type, explode(' | ', $filter)[0]);\n array_push($search_role, explode(' | ', $filter)[1]);\n }\n\n /* ======================================================\n View Player | Teams & Teammates\n ====================================================== */\n\n //team array instantiation\n $view_player_teams_owned = [];\n $view_player_teams_on = [];\n $disable_invites_for_these_team_ids = [];\n $teams_view_player_requested_to_join = [];\n\n // check pivot table -> status\n foreach($player->teams as $team) {\n if ($team->pivot->status == 1) {\n //List of Teams View Player owns\n $view_player_teams_owned[] = $team;\n }\n elseif($team->pivot->status == 2) {\n //List of Teams View Player is rostered on\n $view_player_teams_on[] = $team;\n //Disable \"send invite\" if player is rostered\n $disable_invites_for_these_team_ids[] = $team->id;\n }\n elseif($team->pivot->status == 3) {\n //Disable \"send invite\" if invite was already sent\n $disable_invites_for_these_team_ids[] = $team->id;\n }\n elseif($team->pivot->status == 4) {\n //List of teams this view user has requested to join\n $teams_view_player_requested_to_join[] = $team->id;\n }\n }\n\n //merge team arrays | used to find list of teammates\n $all_teams = array_merge($view_player_teams_owned, $view_player_teams_on);\n\n //teammate array instantiation\n $team_members = [];\n $player_names = [];\n\n //search all teams\n foreach($all_teams as $team) {\n //search all players\n foreach($team->players as $player) {\n //If teammate is not alreaady in the teammate list, add them as a teammate\n if (!in_array($player->name, $player_names)) {\n //Used for reference\n $player_names[] = $player->name;\n //Used to display teammate list on front end\n $team_members[] = $player;\n }\n }\n }\n\n /* ======================================================\n Active User | Teams & Teammates\n ====================================================== */\n\n //Identify the list of teams an invite can be sent from\n $label_invite_sent_if_one_of_these_teams = [];\n $add_player_to_roster_if_one_of_these_teams = [];\n $label_invite_sent_if_one_of_these_team_ids = [];\n $add_player_to_roster_if_one_of_these_team_ids = [];\n\n //Iterate Active User's Team List\n foreach($teams_owned as $team) {\n //If team is not diabled\n if(!in_array($team->id, $disable_invites_for_these_team_ids)) {\n //and team has not received an incoming request\n if(!in_array($team->id, $teams_view_player_requested_to_join)){\n //Add to SEND INVITE Button's team list\n $label_invite_sent_if_one_of_these_teams[] = $team;\n $label_invite_sent_if_one_of_these_team_ids[] = $team->id;\n }\n //if team has received an incoming request\n else {\n //Add to ACCEPT REQUEST Button's team list\n $add_player_to_roster_if_one_of_these_teams[] = $team;\n $add_player_to_roster_if_one_of_these_team_ids[] = $team->id;\n }\n }\n }\n\n $send_invite_from_one_of_these_teams = array_merge($label_invite_sent_if_one_of_these_teams, $add_player_to_roster_if_one_of_these_teams);\n\n\n\n\n /* ======================================================\n Data Object\n ====================================================== */\n $data = ['find_teams_heading' => $find_teams_heading, 'search_type_role' => $search_type_role, 'search_name' => $search_name ,\n 'search_archetype' => $search_archetype, 'search_archetype2' => $search_archetype2, 'search_position' => $search_position,\n 'search_type' => $search_type, 'search_overall_min' => $search_overall_min, 'search_overall_max' => $search_overall_max, 'search_overall' => $search_overall,\n 'search_role' => $search_role, 'search_style' => $search_style, 'name' => $name, 'archetype' => $archetype,\n 'position' => $position, 'archetype2' => $archetype2, 'players' => $players, 'team_update_heading' => $team_update_heading,\n 'my_player_heading' => $my_player_heading, 'update_heading' => $update_heading, 'my_team_heading' => $my_team_heading,\n 'free_agency_heading' => $free_agency_heading, 'activity_stream_heading' => $activity_stream_heading, 'user_avatar' => $user_avatar,\n 'teams_owned' => $teams_owned, 'teams_on' => $teams_on, 'player_profile_pic' => $player_profile_pic,\n 'label_invite_sent_if_one_of_these_team_ids' => $label_invite_sent_if_one_of_these_team_ids,\n 'add_player_to_roster_if_one_of_these_team_ids' => $add_player_to_roster_if_one_of_these_team_ids,\n 'send_invite_from_one_of_these_teams' => $send_invite_from_one_of_these_teams\n ];\n\n return view('agency.show')->with($data);\n }", "function aurora_borealis() {\n\t$chosen = steamed_hams_get_lyric();\n\techo \"<p id='seymour'>$chosen</p>\";\n}", "function show_champ($db)\n{\n global $PHP_SELF,$bluebdr,$greenbdr,$yellowbdr;\n\n if (!$db->Exists(\"SELECT * FROM champions\")) {\n echo \"<p>The Champions database is being edited. Please check back shortly.</p>\\n\";\n return;\n } else {\n\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n echo \" <font class=\\\"10px\\\">You are here:</font> <a href=\\\"/index.php\\\">Home</a> &raquo; <font class=\\\"10px\\\">Champions</font></p>\\n\";\n echo \" </td>\\n\";\n //echo \" <td align=\\\"right\\\" valign=\\\"top\\\">\\n\";\n //require (\"includes/navtop.php\");\n //echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n\n echo \"<b class=\\\"16px\\\">Historical Champions</b><br><br>\\n\";\n\n //////////////////////////////////////////////////////////////////////////////////////////\n // League Champions List\n //////////////////////////////////////////////////////////////////////////////////////////\n// 8-Oct-2015 10:30pm - Modified SQL to get the ChampTeam2 and ChampTeam3, and used LEFT JOINs\n $db->Query(\"\n SELECT\n ch.*,\n te.TeamName, te.TeamAbbrev, te.TeamID, \n\t\t\t\tte2.TeamName as TeamName2, te2.TeamAbbrev as TeamAbbrev2, te2.TeamID as TeamID2, \n\t\t\t\tte3.TeamName as TeamName3, te3.TeamAbbrev as TeamAbbrev3, te3.TeamID as TeamID3,\n se.*\n FROM\n champions ch\n INNER JOIN\n teams te ON ch.ChampTeam = te.TeamID\n\t\t\tLEFT JOIN\n teams te2 ON ch.ChampTeam2 = te2.TeamID\n\t\t\tLEFT JOIN\n teams te3 ON ch.ChampTeam3 = te3.TeamID\n\t\t\tINNER JOIN \n seasons se ON ch.ChampSeason = se.SeasonID\n WHERE\n se.SeasonName NOT LIKE '%KO%'\n ORDER BY\n se.SeasonName DESC\n \");\n \n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$bluebdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$bluebdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;LEAGUE CHAMPIONS LIST</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"#FFFFFF\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\";\n\n echo \" <table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\"; \n\n echo \"<tr class=\\\"colhead\\\">\\n\"; \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\"><b>SEASON</b></td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Champion</b></td>\\n\"; // 8-Oct-2015 10:30pm\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Runners</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>3rd</b></td>\\n\";\n echo \"</tr>\\n\";\n \n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n \n // setup variables\n\n $tna = $db->data['TeamName'];\n $tab = $db->data['TeamAbbrev'];\n $sn = $db->data['SeasonName'];\n $tid = $db->data['TeamID'];\n \n\t\t$tna2 = $db->data['TeamName2']; // 8-Oct-2015 10:30pm\n $tab2 = $db->data['TeamAbbrev2'];\n $tid2 = $db->data['TeamID2'];\n\t\t\n\t\t$tna3 = $db->data['TeamName3']; // 8-Oct-2015 10:30pm\n $tab3 = $db->data['TeamAbbrev3'];\n $tid3 = $db->data['TeamID3'];\n\t\t\n echo '<tr class=\"trrow', ($x % 2 ? '1' : '2'), '\">';\n// 1-Mar-2010 - removed the words League Champions. \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn</td>\\n\";\n// echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn League Champions</td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid&ccl_mode=1\\\">$tab</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid2&ccl_mode=1\\\">$tab2</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid3&ccl_mode=1\\\">$tab3</a></td>\\n\";\n echo \"</tr>\\n\";\n \n }\n\n echo \"</table>\\n\";\n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table><br>\\n\";\n \n //////////////////////////////////////////////////////////////////////////////////////////\n // KO Champions List\n //////////////////////////////////////////////////////////////////////////////////////////\n// 8-Oct-2015 10:30pm - Modified SQL to get the ChampTeam2 and ChampTeam3, and used LEFT JOINs\n\n $db->Query(\"\n SELECT\n ch.*,\n te.TeamName, te.TeamAbbrev, te.TeamID,\n\t\t\t\tte2.TeamName as TeamName2, te2.TeamAbbrev as TeamAbbrev2, te2.TeamID as TeamID2, \n\t\t\t\tte3.TeamName as TeamName3, te3.TeamAbbrev as TeamAbbrev3, te3.TeamID as TeamID3,\t\t\t\t\n se.*\n FROM\n champions ch\n INNER JOIN\n teams te ON ch.ChampTeam = te.TeamID\n\t\t\tLEFT JOIN\n teams te2 ON ch.ChampTeam2 = te2.TeamID\n\t\t\tLEFT JOIN\n teams te3 ON ch.ChampTeam3 = te3.TeamID\n INNER JOIN \n seasons se ON ch.ChampSeason = se.SeasonID\n WHERE\n se.SeasonName LIKE '%KO%'\n ORDER BY\n se.SeasonName DESC\n \");\n \n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$greenbdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$greenbdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;KNOCKOUT CHAMPIONS LIST</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"#FFFFFF\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\";\n\n echo \" <table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\"; \n\n echo \"<tr class=\\\"colhead\\\">\\n\"; \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\"><b>SEASON</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Champion</b></td>\\n\"; // 8-Oct-2015 10:30pm\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Runners</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>3rd</b></td>\\n\";\n echo \"</tr>\\n\";\n\n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n \n // setup variables\n\n $tna = $db->data['TeamName'];\n $tab = $db->data['TeamAbbrev'];\n $sn = $db->data['SeasonName'];\n $tid = $db->data['TeamID'];\n \n\t\t$tna2 = $db->data['TeamName2']; // 8-Oct-2015 10:30pm\n $tab2 = $db->data['TeamAbbrev2'];\n $tid2 = $db->data['TeamID2'];\n\t\t\n\t\t$tna3 = $db->data['TeamName3']; // 8-Oct-2015 10:30pm\n $tab3 = $db->data['TeamAbbrev3'];\n $tid3 = $db->data['TeamID3'];\n\t\t\n echo '<tr class=\"trrow', ($x % 2 ? '1' : '2'), '\">';\n// 1-Mar-2010 - removed the words League Champions. \necho \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn</td>\\n\";\n// echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn League Champions</td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid&ccl_mode=1\\\">$tab</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid2&ccl_mode=1\\\">$tab2</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid3&ccl_mode=1\\\">$tab3</a></td>\\n\";\n\t\t\n echo \"</tr>\\n\";\n \n }\n\n echo \"</table>\\n\";\n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n \n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n }\n}", "public function getTeam();", "function fantacalcio_admin_real_teams_list() {\n \n $out = \"\";\n \n $out .= l(\"Aggiungi Squadra\", \"admin/fantacalcio/realteams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n\n $out .= l(\"Importa squadre\", \"admin/fantacalcio/realteams/import\", array(\n \"attributes\" => array(\"class\" => \"btn btn-warning\"))) . \"<br/><br/>\";\n \n $real_teams = RealTeam::all();\n if ($real_teams) {\n $header = array(\n t(\"Nome\"));\n\n foreach ($real_teams as $rt_id => $real_team) {\n $rows[] = array(\n l($real_team->name, \"admin/fantacalcio/realteams/\" . $rt_id));\n }\n\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"sticky\" => \"\", \n \"empty\" => t(\"Nessuna squadra\"))));\n }\n return $out;\n}", "function lanorg_get_tournament_list() {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->prefix . 'lanorg_tournaments';\n\n\t$tournaments = $wpdb->get_results(\"SELECT id, game FROM $table_name\", ARRAY_A);\n\t$tournament_list = array();\n\tforeach ($tournaments as $tournament) {\n\t\t$tournament_list[$tournament['id']] = $tournament['game'];\n\t}\n\n\treturn $tournament_list;\n}", "function fetchGame() {\n\n\t\t$this -> mysqli -> query(\"\n\t\tCREATE TEMPORARY TABLE IF NOT EXISTS temp1 AS\n\t\t(SELECT matchups.matchupID, matchups.homeTeamID, matchups.awayTeamID, games.gameKickofftime \n\t\tFROM games \n\t\tINNER JOIN matchups \n\t\tON games.gameID = matchups.gameID);\");\n\n\t\t$this -> mysqli -> query(\"CREATE TEMPORARY TABLE IF NOT EXISTS temp2 AS\n\t\t(SELECT t.matchupID, t.homeTeamID, t.awayTeamID, t.gameKickofftime, teams.teamSchoolAcro \n FROM temp1 t\n LEFT JOIN teams ON t.homeTeamID = teams.teamID);\");\n\n\t\t$res = $this -> mysqli -> query(\"SELECT t2.matchupID, t2.homeTeamID, t2.awayTeamID, t2.gameKickofftime, t2.teamSchoolAcro AS homeTeam, teams.teamSchoolAcro AS awayTeam\n FROM temp2 t2\n LEFT JOIN teams ON t2.awayTeamID = teams.teamID;\");\n\n\t\techo \"<div class='table-responsive'><table class='table table-striped table-hover'>\";\n\t\techo \"<tr><th>Game ID</th><th>Game</th><th>Kickoff Time</th></tr>\";\n\n\t\twhile ($row = $res -> fetch_assoc()) {\n\t\t\t//format the date to be more user friendly\n\t\t\t$date = date_create($row['gameKickofftime']);\n\t\t\t$formattedDate = date_format($date, 'd/m/Y @ g:i A');\n\t\t\techo \"<tr>\" . \"<td>\" . $row['matchupID'] . \"</td>\" . \"<td>\" . $row['awayTeam'] . \" @ \" . $row['homeTeam'] . \"</td>\" . \"<td>\" . $formattedDate . \"</td>\" . \"</tr>\";\n\t\t}\n\t\techo \"</table></div>\";\n\t}", "public function tournament()\n {\n return $this->tournament;\n }", "function fantacalcio_admin_teams_list() {\n $out = l(\"Aggiungi squadra\", \"admin/fantacalcio/teams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $teams = Team::all();\n \n if ($teams) {\n \n $header = array(\"Nome\", \"Utente\", \"Gironi\", \"Attiva\");\n \n foreach ($teams as $t_id => $team) {\n \n $account = User::get($team->user);\n \n $groups_team = \"\";\n foreach ($team->getCompetitions() as $competition) {\n $groups_team .= $competition . \"<br>\";\n }\n $rows[] = array(\n l($team->name, \"admin/fantacalcio/teams/\" . $t_id), \n $account != null ? $account->name : \"\", \n $groups_team, \n fantacalcio_check_value($team->active));\n }\n $out .= theme(\"table\", array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table table-responsive\")), \n \"sticky\" => TRUE, \n \"empty\" => t(\"Nessuna squadra\")));\n }\n \n return $out;\n}", "public function index()\n {\n $teams = Teams::get();\n $teams = $this->subSqlStr($teams);\n return view('admin.team',compact('teams'));\n }", "function getRankingsTableString($user_id, $viewmore = true, $viewresults = 10, $viewlink, $page=0, $filter=null, $filterparam=null)\n{\n $rankings_results = contest_query(\"select_rankings\");\n // If query fails\n if (!$rankings_results) {\n return \"<p>Rankings are not available at the moment. Check back soon!</p>\";\n }\n\n $table = \"\";\n if ($filter != NULL) {\n $table .= \"<a href=\\\"rankings.php\\\">&#0171; Back to Main Leaderboard</a>\";\n }\n\n$table .= <<<EOT\n<table class=\"leaderboard\">\n<thead>\n<tr>\n <th>Rank</th>\n <!--<th>Score</th>-->\n <th>Username</th>\n <th>Country</th>\n <th>Organization</th>\n <th>Language</th>\n <th>Skill</th>\n <!--<th>Wins</th>-->\n <!--<th>Losses</th>-->\n <!--<th>Draws</th>-->\n</tr>\n</thead>\n<tbody>\nEOT;\n $old_score = 999999;\n $old_rank = -1;\n for ($i = 1; $row = mysql_fetch_assoc($rankings_results); $i += 1) {\n $username = htmlentities($row[\"username\"], ENT_COMPAT, 'UTF-8');\n $programming_language = $row[\"programming_language\"];\n\t$score = $row[\"skill\"];\n $programming_language_link = urlencode($row[\"programming_language\"]);\n $rank = $row[\"rank\"];\n\tif ($score == $old_score) {\n\t $rank = $old_rank;\n\t}\n\t$old_score = $score;\n\t$old_rank = $rank;\n $rank = ($filter == null)? $rank : ($i + $offset) . \" <span title='Global Rank'>($rank)</span>\";\n $rank_percent = $row[\"rank_percent\"];\n $wins = $row[\"wins\"];\n $losses = $row[\"losses\"];\n $draws = $row[\"draws\"];\n $flag_filename = $row[\"flag_filename\"];\n $country_id = $row[\"country_id\"];\n $country_name = $row[\"country_name\"];\n $country_name = $country_name == NULL ? \"Unknown\" : htmlentities($country_name, ENT_COMPAT, 'UTF-8');\n $org_name = htmlentities($row[\"org_name\"], ENT_COMPAT, 'UTF-8');\n $org_id = $row[\"org_id\"];\n $user_id = $row[\"user_id\"];\n $row_class = $i % 2 == 0 ? \"even\" : \"odd\";\n $flag_filename = $flag_filename == NULL ? \"unk.png\" : $flag_filename;\n $flag_filename = \"<img alt=\\\"$country_name\\\" width=\\\"16\\\" height=\\\"11\\\" title=\\\"$country_name\\\" src=\\\"flags/$flag_filename\\\" />\";\n if (current_username() == $username) {\n $table .= \" <tr class=\\\"$row_class, user\\\">\\n\";\n } else {\n $table .= \" <tr class=\\\"$row_class\\\">\\n\";\n }\n $table .= \" <td>$rank</td>\\n\";\n //$table .= \" <td>$rank_percent</td>\\n\";\n $table .= \" <td><a href=\\\"profile.php?user= $user_id\\\">$username</a></td>\\n\";\n $table .= \" <td><a href=\\\"country_profile.php?country=$country_id\\\">$flag_filename</a></td>\";\n $table .= \" <td><a href=\\\"organization_profile.php?org=$org_id\\\">$org_name</a></td>\";\n $table .= \" <td><a href=\\\"language_profile.php?language=$programming_language_link\\\">$programming_language</a></td>\";\n\t$table .= \" <td>$score</td>\";\n //$table .= \" <td>$wins</td>\";\n //$table .= \" <td>$losses</td>\";\n //$table .= \" <td>$draws</td>\";\n $table .= \" </tr>\\n\";\n }\n $table .= \"</tbody></table>\";\n if (!$viewmore) {\n $table .= $pagination;\n }\n if ($viewmore && $rowcount > $viewresults) {\n $table .= \"<a href=\\\"$viewlink\\\">View More</a>\";\n }\n return $table;\n}", "public function run()\n {\n $teams = [\n ['team'=>'Manchester City',\n 'team_id'=>1001,\n 'league_id'=>1,\n 'points'=>77,\n 'wins'=>24,\n 'draws'=>5,\n 'losses'=>4,\n 'gd'=>45,\n 'sport_id'=>1,\n 'img_name'=>'manCity.png'],\n ['team'=>'Manchester United',\n 'team_id'=>1002,\n 'league_id'=>1,\n 'points'=>67,\n 'wins'=>19,\n 'draws'=>10,\n 'losses'=>4,\n 'gd'=>29,\n 'sport_id'=>1,\n 'img_name'=>'manUtd.png'],\n ['team'=>'Leicester City',\n 'team_id'=>1003,\n 'league_id'=>1,\n 'points'=>62,\n 'wins'=>19,\n 'draws'=>5,\n 'losses'=>9,\n 'gd'=>22,\n 'sport_id'=>1,\n 'img_name'=>'leicesterCity.png'],\n ['team'=>'Chelsea',\n 'team_id'=>1004,\n 'league_id'=>1,\n 'points'=>58,\n 'wins'=>16,\n 'draws'=>10,\n 'losses'=>7,\n 'gd'=>20,\n 'sport_id'=>1,\n 'img_name'=>'chelsea.png'],\n ['team'=>'West Ham',\n 'team_id'=>1005,\n 'league_id'=>1,\n 'points'=>55,\n 'wins'=>16,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>10,\n 'sport_id'=>1,\n 'img_name'=>'westHam.png'],\n ['team'=>'Liverpool',\n 'team_id'=>1006,\n 'league_id'=>1,\n 'points'=>54,\n 'wins'=>15,\n 'draws'=>9,\n 'losses'=>9,\n 'gd'=>16,\n 'sport_id'=>1,\n 'img_name'=>'liverpool.png'],\n ['team'=>'Tottenham',\n 'team_id'=>1007,\n 'league_id'=>1,\n 'points'=>53,\n 'wins'=>15,\n 'draws'=>8,\n 'losses'=>10,\n 'gd'=>18,\n 'sport_id'=>1,\n 'img_name'=>'tottenham.png'],\n ['team'=>'Everton',\n 'team_id'=>1008,\n 'league_id'=>1,\n 'points'=>52,\n 'wins'=>15,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>4,\n 'sport_id'=>1,\n 'img_name'=>'everton.png'],\n ['team'=>'Leeds United',\n 'team_id'=>1009,\n 'league_id'=>1,\n 'points'=>47,\n 'wins'=>14,\n 'draws'=>5,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'leedsUtd.png'],\n ['team'=>'Arsenal',\n 'team_id'=>1010,\n 'league_id'=>1,\n 'points'=>46,\n 'wins'=>13,\n 'draws'=>7,\n 'losses'=>13,\n 'gd'=>7,\n 'sport_id'=>1,\n 'img_name'=>'arsenal.png'],\n ['team'=>'Aston Villa',\n 'team_id'=>1011,\n 'league_id'=>1,\n 'points'=>45,\n 'wins'=>13,\n 'draws'=>6,\n 'losses'=>13,\n 'gd'=>9,\n 'sport_id'=>1,\n 'img_name'=>'astonVilla.png'],\n ['team'=>'Wolves',\n 'team_id'=>1012,\n 'league_id'=>1,\n 'points'=>41,\n 'wins'=>11,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'wolves.png'],\n ['team'=>'Crystal Palace',\n 'team_id'=>1013,\n 'league_id'=>1,\n 'points'=>38,\n 'wins'=>10,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'crystalPalace.png'],\n ['team'=>'Burnley',\n 'team_id'=>1014,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'burnley.png'],\n ['team'=>'Southampton',\n 'team_id'=>1015,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>10,\n 'draws'=>6,\n 'losses'=>16,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'southampton.png'],\n ['team'=>'Newcastle',\n 'team_id'=>1016,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'newcastle.png'],\n ['team'=>'Brighton',\n 'team_id'=>1017,\n 'league_id'=>1,\n 'points'=>34,\n 'wins'=>7,\n 'draws'=>13,\n 'losses'=>13,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'brighton.png'],\n ['team'=>'Fullham',\n 'team_id'=>1018,\n 'league_id'=>1,\n 'points'=>27,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'fullham.png'],\n ['team'=>'West Brom',\n 'team_id'=>1019,\n 'league_id'=>1,\n 'points'=>25,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'westBrom.png'],\n ['team'=>'Sheffield United',\n 'team_id'=>1020,\n 'league_id'=>1,\n 'points'=>17,\n 'wins'=>5,\n 'draws'=>2,\n 'losses'=>26,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'sheffieldUtd.png'],\n ];\n\n foreach($teams as $team){\n football::create([\n 'team'=> $team['team'],\n 'team_id'=> $team['team_id'],\n 'league_id'=> $team['league_id'],\n 'points'=> $team['points'],\n 'wins'=> $team['wins'],\n 'draws'=> $team['draws'],\n 'losses'=> $team['losses'],\n 'gd'=> $team['gd'],\n 'sport_id'=> $team['sport_id'],\n 'img_name'=>$team['img_name']\n ]);\n }\n }", "function get_player_bio($player_id) {\n global $db;\n $query = 'SELECT p.player_id\n , po.pos_name\n , concat(p.first_name, \" \", p.last_name) AS player\n , p.nick_name\n , p.age\n , p.date_of_birth\n , c.name as city\n , s.abbreviation as state\n , n.abbreviation as nation\n , p.weight\n , p.height\n , CASE\n WHEN p.retired = 1 THEN \"Retired\"\n WHEN p.retired = 0 AND p.free_agent=1 THEN \"Free Agent\"\n ELSE CONCAT(t.name,\" \",t.nickname) END AS status\n , p.uniform_number\n , p.experience\n , p.bats\n , p.throws\n , p.draft_year\n , p.draft_round\n , p.draft_pick\n , p.draft_overall_pick\n , concat(t1.name,\" \",t1.nickname) AS drafted_by\n , IF(p.turned_coach=1,\"Yes\",\"No\") AS coach\n , IF(p.hall_of_fame=1, concat(\"Inducted to Hall of Fame \", p.inducted),\"\") AS HOF\n FROM players p INNER JOIN positions po ON p.position = po.position\n INNER JOIN cities c ON p.city_of_birth_id = c.city_id\n INNER JOIN states s ON c.state_id = s.state_id\n INNER JOIN nations n ON p.nation_id = n.nation_id\n LEFT JOIN teams t ON p.team_id = t.team_id\n LEFT JOIN teams t1 ON p.draft_team_id = t1.team_id\n WHERE p.player_id = :player_id';\n $statement = $db->prepare($query);\n $statement -> bindValue(':player_id', $player_id);\n $statement->execute();\n $player_bio = $statement->fetch();\n $statement->closeCursor();\n return $player_bio;\n}", "public function showCompetitionTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM competitions\");\r\n\t\techo \"<h3>Competitions Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_year\" . \"</td><td>\" . \"max_athletes\" . \"</td><td>\" . \"num_of_events\" . \"</td><td>\" . \"address\" . \"</td><td>\" . \"contact_phone_number\" . \"</td><td>\" . \"start_date\" . \"</td><td>\" . \"end_date\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_year'] . \"</td><td>\" . $row['max_athletes'] . \"</td><td>\" . $row['num_of_events'] . \"</td><td>\" . $row['address'] . \"</td><td>\" . $row['contact_phone_number'] . \"</td><td>\" . $row['start_date'] . \"</td><td>\" . $row['end_date'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "function lanorg_get_matches($tournament_id) {\n\tglobal $wpdb;\n\n\t$tournament_id = (int) $tournament_id;\n\t$table_name = $wpdb->prefix . 'lanorg_matches';\n\n\treturn $wpdb->get_results(\"SELECT * FROM $table_name WHERE tournament_id = $tournament_id\", ARRAY_A);\n}", "function ermittle_Teamnamen_Spielplan($landnr, $teamspielplannr)\n{\n $teamname = 'unbekannt';\n //\n $single_team = Team::where('TzugLandNr', '=', $landnr)\n ->where('TeamSpielplanNr', '=', $teamspielplannr)\n ->first();\n //\n if ($single_team) {\n $teamname = $single_team->TeamName;\n }\n //\n return $teamname;\n}", "public function getTeam() {\n\t\t\treturn \"<p>\".$this->team.\"</p>\";\n\t\t}", "function viewClubs()\r\n{\r\n // Getting the input parameter (user):\r\n $clubName = getRequestData('clubname');\r\n $homeStadium = getRequestData('homestadium');\r\n $league = getRequestData('league');\r\n $managerName = getRequestData('managername');\r\n $playerName = getRequestData('playername');\r\n $page = getRequestData('page');\r\n $condition = getRequestData('cc', 'string', 'get');\r\n $filters = [\r\n 'clubName' => $clubName,\r\n 'homeStadium' => $homeStadium,\r\n 'league' => $league,\r\n 'managerName' => $managerName,\r\n 'playerName' => $playerName,\r\n 'page' => $page,\r\n 'cc' => $condition,\r\n ];\r\n $clubs = getClubs($filters);\r\n $noOfClubs = count($clubs);\r\n if ($noOfClubs === 0) {\r\n showMessage('Search Results: Not Found. Please modify your condition!');\r\n return null;\r\n }\r\n foreach ($clubs as $club) {\r\n print '<tr><td>' . $club['club_id'] . '</td>\r\n <td>' . $club['club_name'] . '</td>\r\n <td>' . $club['home_stadium'] . '</td>\r\n <td>' . $club['league'] . '</td>\r\n <td>' . $club['country'] . '</td></tr>';\r\n }\r\n $p = $noOfClubs / 15;\r\n $p = ceil($p);\r\n\r\n for ($b = 1; $b <= $p; $b++) {\r\n ?>\r\n <a href=\"club.php?page=<?php echo $b; ?>&cc=<?php echo $condition; ?>\"><?php echo $b . \" \"; ?></a><?php\r\n }\r\n echo \"<br>\";\r\n return null;\r\n}", "public function getGamesChampion()\n {\n //test if change brasil per this->winer to works\n $vet = $this->file->xpath(\"//time[contains(., 'Brasil')]/..\"); \n $string = \"\";\n \n foreach ($vet as $key => $value) {\n $string .= $this->start. $value->time[0].\" \".$value->time[0]->gols. \" X \".\n $value->time[1]->gols .\" \".$value->time[1].$this->end;\n }\n \n return $string;\n }", "function get_standing_team_db($idSeason)\n{\n require('./model/connect_db.php');\n $sql = \"select t.idTeam, t.nameTeam, sum(r.Points) as points from team t, race r, season s where r.idTeam = t.idTeam and s.idseason = '%d' and s.idseason = r.idseason group by t.nameTeam order by points desc \";\n $request = sprintf($sql,$idSeason);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $standing = array();\n while($line = mysqli_fetch_assoc($result) and isset($line))\n {\n $standing[] = $line;\n }\n return $standing;\n}", "function SeasonResults($sid = 0,$mode = \"p\"){\n\t\n\tglobal $db_league_leagues,$db_league_seasons_rounds,$db_league_seasons,$db_clan_games,$db_league_seasons_round_allowed_players;\n\tglobal $db_admin,$db_league_seasons_rounds_results_players,$db_league_teams;\n\t\n\t$res_rounds = mysql_query(\"SELECT a.admin_nick, lt.league_team_name, lsrrp.league_season_round_result_player_points, lsrap.league_season_round_allowed_player_guid, lsrrp.league_season_round_result_player_player_id \n\tFROM $db_league_seasons_rounds_results_players AS lsrrp \n\tJOIN $db_league_seasons_round_allowed_players AS lsrap ON lsrap.league_season_round_allowed_player_player_id=lsrrp.league_season_round_result_player_player_id AND lsrap.league_season_round_allowed_player_season_round_id=\".(float)$rid.\" \n\tJOIN $db_admin AS a ON a.admin_id=lsrap.league_season_round_allowed_player_admin_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id=lsrap.league_season_round_allowed_player_team_id \n\tWHERE lsrrp.league_season_round_result_player_round_id=\".(float)$rid.\" \n\tORDER BY lsrrp.league_season_round_result_player_place ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\n\tswitch ($mode){\n\t\tcase \"p\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$nick = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t\t$guid = \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_ROUND_GUID.\"</td>\\n\";\n\t\t\t$table_width = \"600\";\n\t\t\t\n\t\t\techo Menu();\n\t\t\t\n\t\tbreak;\n\t\tcase \"t\":\n\t\t\t$res_round = mysql_query(\"SELECT lsr.league_season_round_id, lsr.league_season_round_classified, lsr.league_season_round_season_id, lsr.league_season_round_date, lsr.league_season_round_num, l.league_league_id, l.league_league_name, ls.league_season_name \n\t\t\tFROM $db_league_seasons_rounds AS lsr \n\t\t\tJOIN $db_league_seasons AS ls ON ls.league_season_id=lsr.league_season_round_season_id \n\t\t\tJOIN $db_league_leagues AS l ON l.league_league_id=ls.league_season_league_id \n\t\t\tWHERE lsr.league_season_round_id=\".(float)$rid) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t$nick = \"\";\n\t\t\t$guid = \"\";\n\t\t\t$table_width = \"400\";\n\t\tbreak;\n\t\tdefault:\n\t\t\techo \"\";\n\t}\n\t$ar_round = mysql_fetch_array($res_round);\n\t$league_name = stripslashes($ar_round['league_league_name']);\n\t$season_id = $ar_round['league_season_round_season_id'];\n\t$season_name = stripslashes($ar_round['league_season_name']);\n\t$round_num = $ar_round['league_season_round_num'];\n\t\n\techo \"<table width=\\\"\".$table_wifth.\"\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\techo \"\t<tr>\\n\";\n\techo \"\t\t<td colspan=\\\"3\\\" align=\\\"left\\\">\";\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<h5 style=\\\"margin:20px 0px 0px 0px;\\\">\".$league_name.\" > <a href=\\\"modul_league.php?action=rounds&sid=\".$season_id.\"&project=\".$_SESSION['project'].\"\\\" target=\\\"_self\\\">\".$season_name.\"</a> > \"._LEAGUE_SEASON_ROUND.\" \".$round_num.\"</h5>\";}\n\t\t\t\t\tif ($_GET['action'] == \"results_add\"){echo \"<form action=\\\"sys_save.php?action=results_add&rid=\".$rid.\"sid=\".$season_id.\"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\">\";}\n\techo \"\t\t</td>\\n\";\n\techo \"\t</tr>\\n\";\n\techo \"\t<tr style=\\\"background-color:#dce3f1;\\\">\\n\";\n\techo \"\t\t<td width=\\\"50\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_POSITION.\"</td>\\n\";\n\techo \"\t\t<td align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_SEASON_POINTS.\"</td>\\n\";\n\techo $nick;\n\techo $guid;\n\techo \"\t\t<td width=\\\"200\\\" align=\\\"left\\\" class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\techo \"\t</tr>\\n\";\n\tswitch ($mode){\n\t\tcase \"p\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_rounds = mysql_fetch_array($res_rounds)){\n\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\".$i.\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_season_round_result_player_points'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_team_name'].\"</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\tbreak;\n\t\tcase \"t\":\n\t\t\t$i=1;\n\t\t\twhile ($ar_rounds = mysql_fetch_array($res_rounds)){\n\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t \t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\techo \"\t<td width=\\\"50\\\" align=\\\"right\\\" valign=\\\"middle\\\">\".$i.\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_season_round_result_player_points'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['admin_nick'].\"</td>\\n\";\n\t\t\t\techo \"\t<td width=\\\"200\\\" align=\\\"left\\\">\".$ar_rounds['league_season_round_allowed_player_guid'].\"</td>\\n\";\n\t\t\t\techo \"\t<td align=\\\"left\\\">\".$ar_rounds['league_team_name'].\"</td>\\n\";\n\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\tbreak;\n\t\tdefault;\n\t\t\techo \"\";\n\t}\n\techo \"</table>\\n\";\n}", "function playTournament(){\n $teams = getTeams();\n $playin = getPlayinTeams();\n $teams[25] = compete2($playin[0],$playin[1]);\n $teams[17] = compete2($playin[2],$playin[3]);\n $teams[9] = compete2($playin[4],$playin[5]);\n $teams[1] = compete2($playin[6],$playin[7]);\n while(count($teams)>1){\n $newteams = array();\n for($i=0;$i<count($teams);$i+=2){\n $newteams[] = compete2($teams[$i],$teams[$i+1]);\n }\n $teams = $newteams;\n }\n return $teams[0]['name'];\n}", "public function show($id = NULL)\n {\n $players = new \\App\\Models\\hockey\\Players();\n $record = $players->find($id);\n \n // get a template parser\n $parser = \\Config\\Services::parser();\n \n // tell it about the substitions\n return $parser->setData($record)\n // and have it render the template with those\n ->render('hockey/onePlayer');\n }", "function get_team_player_pitching_stats($year,$team_id) {\n global $db;\n $query = 'SELECT concat(players.first_name, \" \", players.last_name) AS player\n , g\n , gs\n , ip\n , ab\n , ha\n , k\n , bb\n , bf\n , war\n , k9\n , bb9\n , HR9\n , WHIP\n , `K/BB`\n , BABIP\n , ERA\n , FIP\n , xFIP\n , ERAminus\n , ERAplus\n , FIPminus\n , CalcPitching.player_id\n\n\n FROM CalcPitching INNER JOIN players ON CalcPitching.player_id = players.player_id\n\n WHERE year = :year AND CalcPitching.team_id = :team_id\n ORDER BY gs DESC, players.last_name';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $pitchers = $statement->fetchAll();\n $statement->closeCursor();\n return $pitchers;\n}", "public static function fetch_data($opt)\r\n {\r\n $result = ($opt == 'all') ? db::sql(\"SELECT * FROM `superrugby_2016_scores_18`\", DB_NAME):\r\n db::sql(\"SELECT * FROM `superrugby_2016_scores_18` WHERE Team = '$opt'\", DB_NAME);\r\n $return_result = null;\r\n if (mysqli_num_rows($result)){\r\n while(list($round, $match_id, $player_id, $first_name, $last_name, $country, $position, $bonus_points, $full_appearance, $part_appearance, $win, $draw,\t$away_win, $away_draw, $try, $assist, $conversion, $penalty, $drop_goal, $yellow_card, $red_card, $man_of_the_match) = mysqli_fetch_array($result)){\r\n $return_result[] = array(\r\n 'round'=>$round,\r\n 'match_id'=>$match_id,\r\n 'player_id'=>$player_id,\r\n 'first_name'=>$first_name,\r\n 'last_name'=>$last_name,\r\n 'team'=>$country,\r\n 'position'=>$position,\r\n 'bonus_points'=>$bonus_points,\r\n 'full_appearance'=>$full_appearance,\r\n 'part_appearance'=>$part_appearance,\r\n 'win'=>$win,\r\n 'draw'=>$draw,\r\n 'away_win'=>$away_win,\r\n 'away_draw'=>$away_draw,\r\n 'try'=>$try,\r\n 'assist'=>$assist,\r\n 'conversion'=>$conversion,\r\n 'penalty'=>$penalty,\r\n 'drop_goal'=>$drop_goal,\r\n 'yellow_card'=>$yellow_card,\r\n 'red_card'=>$red_card,\r\n 'man_of_the_match'=>$man_of_the_match\r\n );\r\n }\r\n }\r\n return $return_result;\r\n }", "public function populateMatchStandings(){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeam($row->getId());\n\t\t foreach ($championship as $match) {\n\t\t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}", "function lanorg_get_tournament_by_id($tournament_id) {\n\tglobal $wpdb;\n\n\t$tournament_id = (int) $tournament_id;\n\t$table_name = $wpdb->prefix . 'lanorg_tournaments';\n\n\treturn $wpdb->get_row(\"SELECT * FROM $table_name WHERE id = $tournament_id LIMIT 1\", ARRAY_A);\n\t\n}", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function show(TournamentNode $tournamentNode)\n {\n //\n }", "function fantacalcio_trova_titolari($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n $out = \"\";\n\n// $vote_round = get_last_votes();\n\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $pl_votes = array();\n foreach ($votes as $vote)\n $pl_votes[] = $vote->pl_id;\n\n $elenco_pl_ids = implode(',', $pl_votes);\n \n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} \" .\n \"WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($row = db_fetch_array($resultx)) {\n\n $c_id = $row['c_id'];\n $competition_round = $row['competition_round'];\n \n $out .= \"<h3>\" . $competitions[$c_id]->name . \"</h3>\";\n \n //resetto i valori \n $sql = \"UPDATE {fanta_lineups} \n SET has_played = 0 \n WHERE round = '%d' \n AND c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n\n #titolari con voto\n $sql = \"UPDATE {fanta_lineups} \" .\n \"SET has_played = 1 \" .\n \"WHERE position = 1 \" .\n \"AND round = '%d' \" .\n \"AND c_id = '%d'\" .\n \"AND pl_id IN ($elenco_pl_ids)\";\n //echo $sql;\n $result = db_query($sql, $competition_round, $c_id);\n \n switch (variable_get(\"fantacalcio_riserve_fisse\", 0) ) {\n case 0: //riserve libere\n fantacalcio_get_titolari_riserve_libere($pl_votes, $competition_round, $c_id);\n break;\n case 1: //riserve fisse\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n break;\n default:\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n }\n\n #report\n $sql = \"SELECT count(*) AS n, t_id FROM {fanta_lineups} \" .\n \"WHERE has_played = 1 \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\" .\n \"GROUP BY t_id\";\n $result = db_query($sql, $c_id, $competition_round);\n $played = array();\n $i = 0;\n while ($row = db_fetch_array($result)) {\n $i++;\n $played[$i]['t_id'] = $row['t_id'];\n $played[$i]['n'] = $row['n'];\n }\n\n $players = get_players();\n\n $sql = \"SELECT * FROM {fanta_lineups} \" .\n \"WHERE c_id = '%d' \" .\n \"AND round = '%d'\";\n $result = db_query($sql, $c_id, $competition_round);\n $formazioni = array();\n while ($row = db_fetch_object($result)) {\n\n $role = $players[$row->pl_id]->role;\n\n if ($row->position == 1) $formazioni[$row->t_id][\"titolari\"][$role]++;\n if ($row->has_played == 1) $formazioni[$row->t_id][\"played\"][$role]++;\n }\n\n #riepilogo titolari squadre\n $header = array(\"Squadra\", \"N&deg; Titolari\", \"Modulo Titolari\", \"Modulo Formazione\");\n\n $rows = array();\n foreach ($formazioni as $key => $value) {\n $n_titolari = array_sum($formazioni[$key][\"played\"]);\n\n $style = ($n_titolari == 11) ? \"\" : \"font-weight: bold; color: red;\";\n\n ksort($formazioni[$key][\"played\"]);\n ksort($formazioni[$key][\"titolari\"]);\n\n $rows[$key][] = $teams[$key]->name;\n $rows[$key][] = array(\"data\" => $n_titolari, \"style\" => $style);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"played\"]);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"titolari\"]);\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n\n}", "function ListAllowedPlayers(){\n\t\n\tglobal $db_admin,$db_admin_guids,$db_league_teams,$db_league_teams_sub,$db_league_teams_sub_leagues,$db_league_leagues,$db_league_players,$db_clan_games,$db_league_seasons_round_allowed_players;\n\t\n\tif ($_GET['mode'] != \"league\"){\n\t\t\n\t\techo Menu();\n\t\t\n\t\tKillUse($_SESSION['loginid']);\n\t}\n\techo \"<table width=\\\"857\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\tif ($_GET['lid'] == 0){\n\t\techo \"\t<tr>\\n\";\n\t\techo \"\t\t<td>\"._LEAGUE_NO_LEAGUE_ID.\"</td>\\n\";\n \t\techo \"\t</tr>\\n\";\n\t} else {\n\t\techo \"\t<tr>\\n\";\n\t\tif ($_GET['show'] != \"id\" && $_GET['show'] != \"season_players_all_guid\"){\n\t\t\techo \"\t\t<td width=\\\"30\\\" valign=\\\"middle\\\" class=\\\"eden_title\\\">ID</td>\\n\";\n\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t}\n\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_GUID.\"</td>\\n\";\n\t\techo \"\t</tr>\\n\";\n\t\t//$msg = LeagueGenerateListAllowedPlayers((float)$_GET['lid'],(float)$_GET['sid'],(float)$_GET['rid']);\n\t\tswitch ($_GET['show']){\n\t \t\tcase \"id\":\n\t \t\t\t$colspan = 1;\n\t\t\t\t$res_round = mysql_query(\"\n\t\t\t\tSELECT league_season_round_allowed_player_guid \n\t\t\t\tFROM $db_league_seasons_round_allowed_players \n\t\t\t\tWHERE league_season_round_allowed_player_season_round_id=\".(float)$_GET['rid'].\" \n\t\t\t\tORDER BY league_season_round_allowed_player_guid\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t \t\tbreak;\n\t\t\tcase \"season_players_all\":\n\t\t\t\t$colspan = 4;\n\t \t\tbreak;\n\t\t\tcase \"season_players_all_guid\":\n\t \t\t\t$colspan = 1;\n\t \t\tbreak;\n\t\t\tdefault:\n\t \t\t\t$colspan = 4;\n\t\t\t\t$res_round = mysql_query(\"\n\t\t\t\tSELECT a.admin_id, a.admin_nick, lt.league_team_id, lt.league_team_name, ll.league_league_id, ll.league_league_game_id, lsrap.league_season_round_allowed_player_guid \n\t\t\t\tFROM $db_league_seasons_round_allowed_players AS lsrap \n\t\t\t\tJOIN $db_league_leagues AS ll ON ll.league_league_id=lsrap.league_season_round_allowed_player_league_id \n\t\t\t\tJOIN $db_league_teams AS lt ON lt.league_team_id=lsrap.league_season_round_allowed_player_team_id \n\t\t\t\tJOIN $db_admin AS a ON a.admin_id=lsrap.league_season_round_allowed_player_admin_id \n\t\t\t\tWHERE lsrap.league_season_round_allowed_player_season_round_id=\".(float)$_GET['rid'].\" \n\t\t\t\tORDER BY lsrap.league_season_round_allowed_player_team_sub_id ASC, a.admin_nick ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t\t$_GET['show'] = \"all\";\n\t\t}\n\t\t\n\t\t$cislo = 0;\n\t\t// pro zobrazeni povolenych hracu\n\t\tif ($_GET['show'] == \"id\" || $_GET['show'] == \"all\"){\n\t\t\twhile ($ar_round = mysql_fetch_array($res_round)){\n\t\t\t\tif ($cislo % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\tif ($_GET['show'] != \"id\"){\n\t\t\t\t\techo \"\t\t<td width=\\\"30\\\" align=\\\"right\\\" valign=\\\"top\\\">\".$ar_round['admin_id'].\"</td>\\n\";\n\t\t\t \t\techo \"\t\t<td width=\\\"150\\\" align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_round['league_team_name']).\"</td>\\n\";\n\t\t\t \t\techo \"\t\t<td valign=\\\"middle\\\"><strong>\".stripslashes($ar_round['admin_nick']).\"</strong></td>\\n\";\n\t\t\t\t}\n\t\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; if (empty($ar_round['league_season_round_allowed_player_guid'])){echo \"<span class=\\\"red\\\">\"._LEAGUE_PLAYER_NO_GUID.\"</span>\";} else {echo stripslashes($ar_round['league_season_round_allowed_player_guid']);} echo \"</td>\\n\";\n\t\t\t\techo \"\t</tr>\\n\";\n\t\t\t\t$cislo++;\n\t\t\t}\n\t\t\tunset($ar_round);\n\t\t}\n\t\t// pro zobrazeni vsech hracu\n\t\tif ($_GET['show'] == \"season_players_all\" || $_GET['show'] == \"season_players_all_guid\"){\n\t\t\t$res_team = mysql_query(\"\n\t\t\tSELECT lt.league_team_id, lt.league_team_name, ltsl.league_teams_sub_league_team_sub_id, ltsl.league_teams_sub_league_league_id \n\t\t\tFROM $db_league_teams_sub_leagues AS ltsl \n\t\t\tJOIN $db_league_teams AS lt ON lt.league_team_id=ltsl.league_teams_sub_league_team_id \n\t\t\tWHERE ltsl.league_teams_sub_league_league_id=\".(integer)$_GET['lid']) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\twhile ($ar_team = mysql_fetch_array($res_team)){\n\t\t\t\t$res_player = mysql_query(\"\n\t\t\t\tSELECT a.admin_id, a.admin_nick, ag.admin_guid_guid, lp.league_player_id \n\t\t\t\tFROM $db_league_players AS lp \n\t\t\t\tJOIN $db_admin AS a ON a.admin_id=lp.league_player_admin_id \n\t\t\t\tJOIN $db_admin_guids AS ag ON ag.aid=lp.league_player_admin_id AND ag.admin_guid_league_guid_id=\".(integer)$ar_team['league_teams_sub_league_league_id'].\" AND ag.admin_guid_guid != '' \n\t\t\t\tWHERE lp.league_player_team_sub_id=\".(integer)$ar_team['league_teams_sub_league_team_sub_id']) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t\t$i=1;\n\t\t\t\twhile ($ar_player = mysql_fetch_array($res_player)){\n\t\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\t\tif ($_GET['show'] != \"season_players_all_guid\"){\n\t\t\t\t\t\techo \"\t\t<td width=\\\"30\\\" align=\\\"right\\\" valign=\\\"top\\\">\".$ar_player['admin_id'].\"</td>\\n\";\n\t\t\t\t \t\techo \"\t\t<td width=\\\"150\\\" align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_team['league_team_name']).\"</td>\\n\";\n\t\t\t\t \t\techo \"\t\t<td valign=\\\"middle\\\"><strong>\".stripslashes($ar_player['admin_nick']).\"</strong></td>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_player['admin_guid_guid']).\"</td>\\n\";\n\t\t\t\t\techo \"\t</tr>\\n\";\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\techo \"</table>\\n\";\n}", "public function team();", "function getTeamById($teamId){\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select id`, `name`, `score` from teams where `id`='. $teamId .';');\r\n\r\n return fetch_result($res);\r\n}", "public function index()\n {\n //get current user's id\n $user = Auth::User()->id;\n $league = League::find(1);\n $league_id = $league->id;\n\n //search players through user and league id's\n $teamMappings = Team::where('user_id', $user)->where('league_id', $league_id)->get();\n\n $playerIds = [];\n foreach ($teamMappings as $mapping) {\n $playerIds[] = $mapping->player_id;\n }\n\n $players = Player::whereIn('id', $playerIds)->get();\n\n\n return view('myteam', compact('players'));\n\n }", "public function toString() {\r\n\t\t$string = \"Team: (int) id=\".$this->getId().\", (string) name='\".$this->getName().\"' \";\r\n\t\t\r\n\t\treturn $string;\r\n\t}", "public function show()\n {\n //\n $players=team::all();\n return view('fontEnd.showdata.teaminformation',['players'=>$players]);\n }", "public function show($slug)\n {\n $twitchQurey = \"\n fields name, cover.url, first_release_date, rating, platforms.abbreviation, rating,\n slug, involved_companies.company.name, genres.name, aggregated_rating,\n summary, websites.*, videos.*, screenshots.*, similar_games.cover.url,\n similar_games.name, similar_games.rating,similar_games.platforms.abbreviation,\n similar_games.slug;\n where slug = \\\"${slug}\\\";\n \";\n\n $game = Http::withHeaders(config('services.igdb'))\n ->withBody($twitchQurey, 'text/plain')\n ->post('https://api.igdb.com/v4/games')\n ->json();\n\n $game = $game[0];\n\n $website = array_key_exists('websites', $game) ? collect($game['websites'])->first()['url'] : '';\n $facebook = array_key_exists('websites', $game) ? $this->getSiteUrl($game['websites'], 'facebook') : '';\n $instagram = array_key_exists('websites', $game) ? $this->getSiteUrl($game['websites'], 'instagram') : '';\n $twitter = array_key_exists('websites', $game) ? $this->getSiteUrl($game['websites'], 'twitter') : '';\n\n abort_if(!$game, 404);\n\n return view('show', compact(['game', 'website', 'facebook', 'instagram', 'twitter']));\n }", "function get_team_details($team_name, $what_to_get){\n\n\t\t//get details from config file to help us connect to the database\n\t\tinclude(\"../config.php\");\n\n\t\t//varaible to return at the end\n\t\t$result_to_return;\n\n\t\t//get what ever details from what ever team has been chosen\n\t\t$sql = \"SELECT $what_to_get FROM basketball_teams_website WHERE team_name = ? ;\";\n\t\t$stmt = mysqli_stmt_init($conn);\n\n\t\t//if connection has failed output error\n\t\tif(!mysqli_stmt_prepare($stmt, $sql)){\n\t\t\t\n\t\t\techo \"sql Statment failed!\";\n\t\t}\n\t\telse{\n\n\t\t// bind parameter to placeholders\n\t\t\tmysqli_stmt_bind_param($stmt, \"s\", $team_name);\n\n\n\t\t// run parameters inside of database\n\t\t\tmysqli_stmt_execute($stmt);\n\t\t\t$result = mysqli_stmt_get_result($stmt);\n\t\t\t$row = mysqli_fetch_assoc($result);\n\n\t\t\t//assign result to return variable to retrived data\n\t\t\t$result_to_return = $row[$what_to_get];\n\t\t}\n\n\t\t//echo data where ever the function has been called\n\t\techo $result_to_return;\n\t}", "public function team()\n {\n return $this->render('main/team.html.twig', [\n 'title'=>'Notre équipe',\n ]);\n }", "function display_winners(array $winners) :string\n{\n $output = '';\n if(empty($winners)) {\n $output = 'There are no winners.';\n } else {\n foreach ($winners as $winner) {\n $output .= '<div class=\"winner\"><h2>Prize year: ' . $winner['prize_year'] . '</h2>';\n $output .= '<div><span class=\"category_title\">Author:</span><span> ' . $winner['author_name'] . '</span></div>';\n $output .= '<div><span class=\"category_title\">Title:</span><span> ' . $winner['book_name'] . '</span></div>';\n $output .= '<div><span class=\"category_title\">Nationality:</span><span> ' . $winner['author_nationality'] . '</span></div>';\n $output .= '<div class=\"delete_edit\"><form method=\"post\" action=\"delete.php\"><input type=\"submit\" name=\"delete\" value=\"Delete\" class=\"delete_edit\">\n <input type=\"hidden\" name=\"id\" value=\"' . $winner['id'] . '\"/></form>';\n $output .= '<form method=\"post\" action=\"edit.php\"><input type=\"submit\" name=\"edit\" value=\"Edit\" class=\"delete_edit\">\n <input type=\"hidden\" name=\"id\" value=\"' . $winner['id'] . '\"/></form></div></div>';\n }\n }\n return $output;\n}", "public function createTournament(){\n\t}", "public function getOurTeam()\n {\n $data = HomeController::getPage('our-team');\n return view('our_team')->with(['data' => $data]);\n }", "function viewTeam() {\n global $user;\n $UID = $user->uid;\n\n $params = drupal_get_query_parameters();\n $array = array();\n \n // checks to see if the user has a team\n if (isset($params['TID'])) {\n $TID = $params['TID'];\n } else {\n drupal_set_message(\"No team selected.\", 'error');\n drupal_goto($_SERVER['HTTP_REFERER']);\n }\n\n // checks to see if the user is on the team (keeping in mind that team owners can\n // see their team application\n if (dbGetTeamOwner($TID) != $UID && (!isMyTeam($TID) || teamIsIneligible($TID))) {\n drupal_set_message('You do not have permission to access this page.', 'error');\n return;\n }\n \n $team = dbGetTeam($TID);\n\n $markup = '';\n $markup .= '<div style=\"float:left; width:38%\">';\n // create team header and table\n $markup .= '<table style=\"margin:0px 0px 10px 0px;\"><tr>';\n \n $markup .= '<td style=\"padding:0px 14px 10px 14px;\"><div align=\"left\"><h2 style=\"margin:0px 0px 7px 0px;\"><b>';\n\n // if the team has a type\n if ($team['type'] != \"Other\"){\n $markup .= \"{$team['type']} {$team['number']} - {$team['name']}\";\n } else{\n $markup .= \"Team {$team['number']} - {$team['name']}\";\n }\n \n $markup .= '</b></h2></div></td></tr></table>';\n \n // create table\n $markup .= '<table id=\"photoAndEdit\"><tr><td style=\"padding:0px;\">'; \n\n // if the user can edit team picture\n if (hasPermissionForTeam('editTeam', $TID)){\n $markup .= '<div align=\"right\">';\n $markup .= '<a href= \"?q=editThumbnail';\n $markup .= '&TID='. $TID . '&FID=' . $team['FID'] . '\">';\n $markup .= '<span title=\"Edit Photo\"><button><img class=\"editIcon\" src=\"/images/icons/editThumbnailWhite.png\"></button></span></a>';\n $markup .='</div>';\n } else {\n // otherwise show just a disabled button\n $markup .= '<div align=\"right\">';\n $markup .= '<span title=\"Edit Photo\"><button type=\"button\" disabled><img class=\"editIcon\" src=\"/images/icons/editThumbnailWhite.png\"></button></span>';\n $markup .='</div>';\n }\n\n $markup .= '</td></tr><tr><td style=\"padding:0px;\">';\n\n // if the team has a picture then display\n if (!empty($team['FID'])) {\n $url = generateURL($team['FID']);\n $markup .= '<div align=\"center\"><img src=\"' .$url .'\" style=\"max-width:150px; width:auto; height:auto; padding: 5px 0px 5px 0px\">';\n // default team picture\n } else {\n $markup .= '<div align=\"center\"><img src= \"/images/defaultPics/team.png\" style=\"max-width:200px; width:auto; height:auto; padding: 15px 0px 15px 0px\">';\n }\n\n $markup .= '</div></td></tr></table></div>';\n\n $teams = dbGetTeamsForUser($UID);\n\n $markup .= '<div align=\"right\">';\n\n // if the user can permission to manage outreach\n if (!teamIsIneligible($TID) &&\n hasPermissionForTeam('manageOutreachTags', $TID)) {\n $markup .= '<a href=\"?q=teamModeratorPage\">';\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button>Moderators</button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to view ideas, write-ups, and hours awaiting approval.';\n $markup .= '</span></div></a>';\n } else {\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\" disabled>Moderators</button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to view ideas, write-ups, and hours awaiting approval.';\n $markup .= '</span></div>';\n\n }\n\n // if the user can manage the outreach settings (currently only tags)\n if (!teamIsIneligible($TID) && hasPermissionForTeam('manageOutreachTags', $TID)){\n $markup .= '<a href=\"?q=teamOutreachSettings\">';\n $markup .= '<button>Settings</button></a>';\n } else {\n $markup .= '<button type=\"button\" disabled>Settings</button>';\n }\n\n // if the user has permission to manage hours\n if (!teamIsIneligible($TID) && hasPermissionForTeam('editAnyHours', $TID)){\n $markup .= '<a href= \"?q=offsetHours';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\"><img class=\"hoursIcon\" src=\"/images/icons/clockWhite.png\"></button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to enter old team hours from previous years.';\n $markup .= '</span></div></a>';\n } else {\n $markup .= '<div class=\"help tooltip4\">';\n $markup .= '<button type=\"button\" disabled><img class=\"hoursIcon\" src=\"/images/icons/clockWhite.png\"></button>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext4\">';\n $markup .= 'Click here to enter old team hours from previous years.';\n $markup .= '</span></div>';\n }\n \n // if the user can edit the team\n if (hasPermissionForTeam('editTeam',$TID)){\n $markup .= '<a href= \"?q=teamForm&url=viewTeam';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<button type=\"button\"><img class=\"editIcon\" src=\"/images/icons/editWhite.png\"></button></a>';\n } else{\n $markup .= '<button type=\"button\" disabled><img class=\"editIcon\" src=\"/images/icons/editWhite.png\"></button></a>';\n }\n\n // if the user can delete the team\n if (hasPermissionForTeam('deleteTeam', $TID)){ \n $markup .= '<a href= \"?q=deleteTeamPage';\n $markup .= '&TID=' . $team['TID'] . '\">';\n $markup .= '<button type=\"button\"><img class=\"trashIcon\" src=\"/images/icons/trashWhite.png\"></button></a>';\n } else {\n $markup .= '<button type=\"button\" disabled><img class=\"trashIcon\" src=\"/images/icons/trashWhite.png\"></button></a>';\n }\n \n $markup .= '</div>';\n\n // begin displaying info\n\n $markup .= '<div style=\"width:60%; float:right; padding-left:10px\">';\n\n $teams = dbGetTeamsForUser($UID);\n $numOutreaches = dbGetNumOutreachForTeam($TID);\n \n // create table\n $markup .= '<table id=\"miniViewTeam\" style=\"margin:16px 0px 0px 0px\"><tr><td><b>';\n\n if ($numOutreaches != 0){\n $markup .= '<a href=\"?q=outreach&allTeamOutreach\">Outreaches: </a></b>';\n } else {\n $markup .= 'Outreaches: </b>';\n }\n\n $markup .= $numOutreaches . '</td>';\n\n $markup .= '<td><b>Total Number of Hours: </b>' . dbGetHoursForTeam($TID) . '</td></tr>';\n\n $markup .= '<tr><td><b><a href=\"?q=showUsersForTeam';\n $numStudents = dbGetNumStudentsForTeam($team['TID']);\n $numMentors = dbGetNumMentorsForTeam($team['TID']);\n $markup .= '&TID='.$team['TID'].'&type=student\">Students: </a></b>'.dbGetNumStudentsForTeam($team['TID']).'</td>';\n $markup .= '<td><b><a href=\"?q=showUsersForTeam';\n $markup .= '&TID='.$team['TID'].'&type=mentor\">Mentors: </a></b>'.dbGetNumMentorsForTeam($team['TID']).'</td></tr>';\n\n $markup .= '<tr><td><b>City: </b>' . $team['city'] . '</td>';\n $markup .= '<td><b>State: </b>' . $team['state'] . '</td></tr>';\n\n $markup .= '<tr><td><b>Country: </b>' . $team['country'] . '</td>';\n $markup .= '<td><b>Rookie Year: </b>' . $team['rookieYear'] . '</td></tr>';\n\n if ($team['rookieYear'] == NULL){\n $team['rookieYear'] = '[none]';\n }\n\n $markup .= '</table></div>';\n\n return array('#markup' => $markup);\n}", "function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "function get_team_info($idTeam)\n{\n $team_info = get_team_info_db($idTeam);\n return $team_info;\n}", "function tincan_lrs_statement_view($id) {\n $content = \"\";\n $entity = entity_load('tincan_statement', array($id));\n \n if (!empty($entity)) {\n $controller = entity_get_controller('tincan_statement');\n $content = $controller->view($entity);\n }\n else {\n $content = '<p>No statement found for drupal id: ' . $id . '</p>';\n }\n \n drupal_set_title($entity[$id]->label());\n\n return $content;\n\n}", "function team_list()\n {\n }", "function get_race_team($idTeam)\n{\n $team_race = get_race_team_db($idTeam);\n return $team_race;\n}", "public function show($id)\n {\n $players = Player::select('players.id AS id', 'players.name AS name',\n 'teams.flag AS flag', 'teams.name AS team', 'teams.country AS country'\n , 'players.birthdate AS birthdate',\n 'players.goal AS goal', 'players.role AS role')\n ->join('teams', 'teams.id', '=', 'players.team_id')\n ->where('team_id', $id)\n ->get();\n $stat_team = StatTeam::where('team_id', $id)->get();\n $stat_team = $stat_team[0];\n return view('admin.teams.show', compact('players', 'stat_team'));\n }", "function createPlayerSummary() {\n $records = $this->Players->all();\n\n //Prime the table class to display player info. Wasn't sure what equity was though...\n $this->load->library('table');\n $parms = array(\n 'table_open' => '<table class=\"table-right-game\">',\n 'cell_start' => '<td class=\"player\">',\n 'cell_alt_start' => '<td class=\"player\">'\n );\n\n $this->table->set_template($parms);\n $this->table->set_heading('Player', 'Peanuts', 'Equity');\n\n foreach ($records as $row) {\n $this->table->add_row($row->Player, $row->Peanuts);\n }\n\n //Generate the table\n $this->data['wtable'] = $this->table->generate();\n }", "public function showPage ( $page , $id = 0 ) {\n\t\t//var_dump($id);\n\t\t$db = new DB;\n\t\t\n\t\tif($page->tpl == 'CompetitionTables'){\n\t\t\t\n//\t\t\t$leagues_country = json_decode(file_get_contents(API_DIR . \"league/leagues_country.json\"));\n//\t\t\t$leagues = json_decode(file_get_contents(API_DIR . \"league/leagues.json\"));\n////\t\t\t\tvar_dump($leagues_country);\n//\t\t\tif($id != 0 ){\n//\t\t\t\tforeach($leagues->data as $value){\n//\t\t\t\t\tif($value->country_id == $id && $value->season->data->is_current_season == true){\n//\t\t\t\t\t\t\n//\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($id != 0){\n\t\t\t\t\n//\t\t\t\t$bet = $db->select('leagues','*','leagues_id',$this->user['id']);\n\t\t\t\t$bet = $db->select('leagues','*','leagues_id',$id);\n//\t\t\t\tvar_dump($bet[0]);\n//\t\t\t\t$bets = $db->joinTwoTable('bet_form','bets','bets_user_id','user_id','bets_user_id',$this->user['id']);\n//\t\t\t\t$this->checkAuth(true);\n//\t\t\t\t$this->load->eloquent('leagues');\n//\t\t\t\t$this->load->eloquent('league_table');\n//\n//\t\t\t\t$myRecords = Bet::where('user_id' , $this->user->id)->take($this->config->item('per_page'))->skip($this->config->item('per_page') * ($page ))->orderBy('id' , 'desc')->get();\n\t\t\t\tif(isset($bet[0])){\n\t\t\t\t\t$address = new Config_api_address();\n\t\t\t\t$url = $address->get_address($address->standing,1);\n\t\t\t\t\n\t\t\t\t$url = str_replace('{id}',$bet[0]['current_season_id'],$url);\n\t\t\t\t$content = file_get_contents($url);\n\t\t\t\t//var_dump($url);\n\t\t\t\t$content_json = json_decode($content);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($content_json) && $content_json->data != null)\n\t\t\t\t\t$table = $content_json->data[0]->standings->data;\n\t\t\t\telse\n\t\t\t\t\t$table = null;\n\t\t\t\t\n\t\t\t\t$this->smart->assign([\n\t\t\t\t\t'show_league_table' => $table ,\n\t//\t\t\t\t'matches' => array_slice($finalObject , 0 , 15) ,\n\t//\t\t\t\t'leagues' => $leagues,\n\t//\t\t\t\t'country' => $country,\n\t//\t\t\t\t'leagues_country' => $leagues_country\n\t//\t\t\t\t'resultsToday' => $resultsToday ,\n\t//\t\t\t\t'totalStake' => $this->getTotalStake(),\n\t//\t\t\t\t'sport' => $sport,\n\t//\t\t\t\t'userTest' => $this->getUser(),\n\t\t\t\t\t]);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($id==0 || $table == null){\n\t\t\t\t$league_name = $db->select('league_tables','*');\n//\t\t\t\tvar_dump($league_name);\n\t\t\t\t$league = array();\n\t\t\t\tforeach($league_name as $key=>$value){\n\t\t\t\t\t$league[$value['continent']][] = $value ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->smart->assign([\n\t\t\t\t\t'all_league' => $league\n\t\t\t\t]);\n\t\t\t}\n\t\t\t\t\n\t\n\t\t\t\n\t\t\tif($id!=0 && isset($bet[0])){\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\t$this->smart->view('index');\n\t\t}\n \n\t\t$pageTPL = $page->tpl;\n if ( strpos($pageTPL , '.tpl') ) {\n $pageTPL = str_replace('.tpl' , '' , $pageTPL);\n }\n if ( !$this->smart->moduleTemplateExists('pages/statics/' . $pageTPL . '.tpl') ) {\n $pageTPL = 'default';\n }\n\t\t\n $this->smart->assign(\n array(\n 'page' => $page ,\n\t\t\t\t\t'totalStake' => $this->getTotalStake(),\n ));\n//\t\tvar_dump($page->slug);\n\t\t$slug = $page->slug;\n\t\t\n\t\t$menu_id = $db->select('menus','group_id','target',$slug);\n\t\t\n\t\tif ( ! empty( $menu_id ) ){\n\t\t\t$group_id = $menu_id[0]['group_id'];\n\t\t\t$query = \"SELECT * FROM menus WHERE group_id = '$group_id' ORDER BY weight\";\n\t\t\t$menu_group = $db->get_query( $query );\n\t\t\t$this->smart->assign(\n array(\n 'page' => $page ,\n\t\t\t\t\t'menu_group' => $menu_group,\n \t));\n\t\t}\n\t\t\n $this->smart->view('pages/statics/' . $pageTPL);\n }", "function get_all_tournament_teams()\n {\n $this->db->select('TT.tournament_team_id,TT.team_id,T.tournament_name,T1.team_name,P.player_name as captain,P.employee_id,P1.player_name as vice_captain');\n $this->db->join('tournaments as T', 'T.tournament_id = TT.tournament_id');\n $this->db->join('teams as T1' , 'TT.team_id = T1.team_id');\n $this->db->join('players as P' , 'TT.captain = P.player_id ');\n $this->db->join('players as P1' , 'TT.vice_captain = P1.player_id ');\n $this->db->where(array('TT.is_active'=>'T','T.is_active'=>'T')); \n\n return $this->db->get('tournament_teams as TT')->result_array();\n }", "function display($tpl = null)\n\t{\n\t\t$this->Item=$this->get('Item');\n\t\t\n//\t\techo \"<pre>\" . var_dump($this->Item) . \"</pre>\";\n\t\t$tour=new TournamentHelper();\n\t\t\t\n\t\tif (isset($this->Item[\"tournament\"][\"id\"]))\n\t\t{\n\t\t\t$tour->tournament=$this->Item[\"tournament\"];\n\t\t\t$tour->player=$this->Item[\"player\"];\n\t\t\t$tour->result=$this->Item[\"result\"];\n\t\t\t$tour->head=$this->Item[\"tournament\"]['event'];\n\t\t\t$this->table=$tour->displayTable(999);\n\t\t}\n\t\tparent::display($tpl);\n\t}", "public static function player($row) {\n\t\t\t$result = new Player($row);\n\t\t\treturn \"<div id=\\\"player\\\">\".$result->getName().$result->getTeam().$result->getGP().$result->getMin().$result->getFG().$result->get3PT().$result->getFT().$result->getRebound().$result->getPPG().$result->getAst().\"</div>\";\n\t\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SkokiOrlikBundle:Matches')->findAll();\n $teams = $em->getRepository('SkokiOrlikBundle:Teams')->findAll();\n $tt = array();\n foreach($teams as $t) {\n $tt[$t->getId()] = $t;\n }\n //var_dump($tt,$entities);die();\n\n return $this->render('SkokiOrlikBundle:Matches:index.html.twig', array(\n 'entities' => $entities,\n 'teams' => $tt\n ));\n }", "function SandboxHomePage($oDB)\n{ ?>\n <h1>Welcome to RideNet</h1>\n <p>\n You are currently in the RideNet Sandbox, a holding place for riders that are not yet a member of a RideNet team.\n Although you're welcome to stay in the Sandbox as long as you like, one of RideNet's coolest features is the ability\n to create and join teams. Below are some of the more popular RideNet teams in your area.\n </p>\n <div style=\"height:10px;clear:both\"></div>\n<?$sql = \"SELECT TeamID, Domain, TeamName, TeamType, CONCAT(City, ', ', State, ' ', ZipCode) AS Location\n FROM teams\n JOIN ref_team_type USING (TeamTypeID)\n JOIN ref_zipcodes USING (ZipCodeID)\n WHERE TeamID IN (120, 122, 86, 115, 135, 130)\n ORDER BY TeamName ASC\";\n $rs = $oDB->query($sql); ?>\n <table cellpadding=0 cellspacing=0 class=\"centered\" style=\"border:1px solid #CCC;background-color:#EEE\">\n <? while(($record = $rs->fetch_array())!=false) { ?>\n <tr>\n <td style=\"border-bottom:1px solid #CCC\">\n <div style=\"width:100px;overflow:hidden;text-align:center;margin:1px\">\n <a href=\"<?=BuildTeamBaseURL($record['Domain'])?>/\" target=\"_blank\">\n <img class=\"tight\" src=\"<?=getFullDomainRoot()?>/imgstore/team-logo/fit/<?=$record['TeamID']?>.png\" border=0>\n </a>\n </div>\n </td>\n <td style=\"border-bottom:1px solid #CCC\">\n <div class=\"ellipses\" style=\"padding:5px 5px;width:155px\">\n <a href=\"<?=BuildTeamBaseURL($record['Domain'])?>/\" target=\"_blank\">\n <div class=\"find-name\"><?=$record['TeamName']?></div>\n </a>\n <div class=\"find-info\"><?=$record['TeamType']?></div>\n <div class=\"find-info2\"><?=$record['Location']?></div>\n </div>\n </td>\n <td style=\"border-bottom:1px solid #CCC;text-align:center\" valign=bottom width=160>\n <?if(CheckLogin()) { ?>\n <span class='action-btn' id='join-btn<?=$record['TeamID']?>' onclick=\"ChangeTeams(<?=$record['TeamID']?>, '<?=htmlentities(addslashes($record['TeamName']))?>', '<?=htmlentities(addslashes($record['Domain']))?>')\">&nbsp;&nbsp;Join Team&nbsp;&nbsp;</span>\n <? } else { ?>\n <span class='action-btn' onclick=\"window.location.href='/login?Goto=<?=urlencode(\"/\")?>'\">&nbsp;&nbsp;Login to Join&nbsp;&nbsp;</span>\n <? } ?>\n <div style=\"margin:5px 0 5px 0\" class=\"find-info2\"><a href=\"<?=BuildTeamBaseURL($record['Domain'])?>/\" target=\"_blank\" style=\"color:#BBB\">Learn more...</a></div>\n </td>\n </tr>\n <? } ?>\n <tr height=60>\n <td style=\"padding:10px 40px;\" colspan=2>\n <p style=\"margin:0\">\n Search for other teams on RideNet\n </p>\n </td>\n <td style=\"text-align:center\">\n <?if(CheckLogin()) { ?>\n <span class=\"action-btn\" id='ct-btn' onClick=\"g_changeTeamsDialog.show({ redirectToHome: true, animateTarget: 'ct-btn' })\">&nbsp;&nbsp;Find a team...&nbsp;&nbsp;</span>\n <? } else { ?>\n <span class='action-btn' onclick=\"window.location.href='/login?Goto=<?=urlencode(\"/\")?>'\">&nbsp;&nbsp;Login to Find Teams&nbsp;&nbsp;</span>\n <? } ?>\n </td>\n </tr>\n </table>\n <div style=\"height:40px\"></div>\n <div style=\"float:right;margin: 0px 0px 0px 20px\">\n <img src=\"images/sandbox-profile.jpg\" style=\"width:280px\"><br>\n </div>\n <h1 style=\"margin-top:0px\">Change Teams Any Time</h1>\n <p>\n You can change teams at any time. From Your Profile page, click \"Edit Profile...\", then click\n \"Change Teams...\".\n </p>\n <div style=\"clear:both;height:25px\"></div>\n <div style=\"float:left;margin: 5px 20px 0px 0px;border:1px solid #DDD\">\n <img src=\"images/sandbox-roster.jpg\" style=\"width:200px\"><br>\n </div>\n <h1 style=\"padding-top:0px\">Start Something New</h1>\n <p>\n If you can't find a team on RideNet, why not create one? A RideNet team can be based\n around a real-world cycling club or could be a loosely affiliated group of riders that just want to stay\n connected. As a member of a team, you can see what everyone on your team is up to, track your team's race\n results (if you race), and organize rides together.<br><br>\n Creating a RideNet team is easy. Send us an email at <a href=\"mailto:[email protected]\">[email protected]</a>\n and we'll take care of the rest.\n </p>\n <div style=\"clear:both;height:10px\"></div>\n<!-- <h1>Send Us Feedback</h1>\n <p>\n We are continually working to improve RideNet and add new features. If you have any comments, questions\n or suggestions (or just want to tell us how much you love the site) send us an email:\n <a href=\"mailto:[email protected]\">[email protected]</a>\n </p>-->\n<? \n}", "function findGameByTournamentID( $tournamentID ) {\n\n/* ... data declarations */\n $tournGameDetails = array();\n\n/* ... form the database query */\n $this->db->select( 'GameID, Date, Time, Diamond, HomeSeed, VisitSeed, HomeTeamID, HomeScore, VisitTeamID, VisitScore, Notes, Status, TournamentID, WinnerNextGame, LoserNextGame' );\n $this->db->where( 'TournamentID', $tournamentID );\n\n/* ... perform the query */\n $sqlQuery = $this->db->get( 'Tournament' );\n\n/* ... now to roll through the retrieved data */\n foreach ($sqlQuery->result_array() as $dbRow) {\n $tournGameDetails = $dbRow;\n }\n\n/* ... time to go */\n return( $tournGameDetails );\n }", "function output_all_lessons_for_unit($unitID){\n\n $answer = get_all_lessons_for_unit($unitID);\n $construct_lesson_string = \"\";\n\n foreach($answer as $row){\n $lesson_id = $row['lessonID'];\n $lesson_title = $row['lessonTitle'];\n\n $construct_lesson_string .= '<a href=\"lesson.php?lesson='.$lesson_id.'\" class=\"list-group-item\">'.$lesson_title.'</a>';\n }\n\n return $construct_lesson_string;\n}", "function getAllTeams(){\r\n /*for testing purposes only, replace with request to db\r\n return array(\r\n array(\"name\" => \"Usine\", \"score\" => 2000),\r\n array(\"name\" => \"Abattoirs\", \"score\" => 1000),\r\n array(\"name\" => \"Caserne\", \"score\" => 1200),\r\n array(\"name\" => \"Asile\", \"score\" => 5000),\r\n array(\"name\" => \"Zombie\", \"score\" => -10000)\r\n );*/\r\n\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select `id`, `name`, `score` from teams;');\r\n\r\n return fetch_result($res);\r\n}", "public function index()\n {\n $tournaments = Tournament::all();\n return view('tournaments.index')->with('tournaments', $tournaments);\n }", "function getGameDetails( $gameID ) {\n\n/* ... data declarations */\n $tournDetails = array();\n\n/* ... form the database query */\n $this->db->select( 'GameID, Date, Time, Diamond, HomeSeed, VisitSeed, HomeTeamID, HomeScore, VisitTeamID, VisitScore, Notes, Status, TournamentID, WinnerNextGame, LoserNextGame' );\n $this->db->where( 'GameID', $gameID );\n\n/* ... perform the query */\n $sqlQuery = $this->db->get( 'Tournament' );\n\n/* ... now to roll through the retrieved data */\n foreach ($sqlQuery->result_array() as $dbRow) {\n $tournDetails = $dbRow;\n }\n\n/* ... time to go */\n return( $tournDetails );\n }", "function managers_team_summary($param) {\t\n\t\t\n\techo '<div id=\\'container\\' style=\"font-size: 13px; font-family: Verdana;\"></div>';\n\t\n\techo '<script type=\"text/javascript\">';\n\techo '$.support.cors = true;';\n\techo '$(document).ready(function() {';\n\techo '$.ajax({';\n\techo 'type: \"GET\",';\n\techo \"url: \\\"http://bbecweb:8012/hapi/CasesSummary/?param=$param\\\",\";\n\techo 'contentType: \"application/json; charset=utf-8\",';\n\techo 'dataType: \"json\",';\n\techo 'success: function(res) {';\n\techo '$(\\'#container\\').append(CreateTableView(res)).fadeIn();';\n\techo '}';\n\techo '});';\n\techo '});';\n\techo '</script>';\n\t\n\treturn;\n\t\n}", "function echo_contest_summary_for_id($id) {\n echo_summary_view_for_contest($id);\n}", "function showGames()\n{\n $email = trim($_SESSION['login']);\n $dbEmail = R::getAll(\"SELECT * FROM users WHERE email = '$email'\");\n if (!empty($dbEmail)) {\n $user_id = $dbEmail[0]['id'];\n $games = R::getAll(\"SELECT * FROM games WHERE `user_id` = '$user_id'\");\n if (!empty($games)) {\n echo \"<table class='games'>\";\n echo \"<thead><tr>\n <td>#</td>\n <td>Cas hry</td>\n <td>Data hry</td>\n </tr></thead>\";\n $count = 1;\n foreach ($games as $game) {\n echo \"<tr>\n <td>\" . $count . \"</td>\";\n echo \"<td>\" . $game['time'] . \"</td>\";\n echo \"<td>\" . $game['data'] . \"</td>\";\n echo \"</tr>\";\n $count++;\n }\n echo \"</table>\";\n } else {\n echo \"No games yet!\";\n }\n }\n}", "public static function show($id) {\n $player = Player::find($id);\n $moderatorOf = Course::find_by_moderator($id);\n $course = Course::find($player->course);\n $scores = Score::find_by_player($player->id);\n foreach($scores as $score) {\n $score->round = Round::find($score->roundId);\n }\n // $rounds = Round::find_by_player($player->id);\n // Kint::dump($rounds);\n View::make('player/show.html', array('player' => $player, 'scores' => $scores, 'moderatorOf' => $moderatorOf, 'course' => $course));\n }", "function show_worse($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'views' ASC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "function get_team_whip_leaders($year,$team_id) {\n global $db;\n $query = 'SELECT p.player_id\n , CONCAT(pl.first_name,\" \",pl.last_name) AS player\n , p.whip\n FROM CalcPitching p INNER JOIN players pl ON p.player_id=pl.player_id\n INNER JOIN team_history_record t ON p.team_id=t.team_id AND p.year=t.year\n WHERE p.year = :year AND p.team_id = :team_id\n AND p.g >= 35\n ORDER BY p.whip\n LIMIT 3';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_whip_leaders = $statement->fetchAll();\n $statement->closeCursor();\n return $team_whip_leaders;\n}", "public function show(Matchup $matchup)\n {\n //\n }", "function get_team_woba_leaders($year,$team_id) {\n global $db;\n $query = 'SELECT b.player_id\n , CONCAT(p.first_name,\" \",p.last_name) AS player\n , b.woba\n FROM CalcBatting b INNER JOIN players p ON b.player_id=p.player_id\n INNER JOIN team_history_record t ON b.team_id=t.team_id AND b.year=t.year\n WHERE b.year = :year AND b.team_id = :team_id\n AND b.PA * 3.1 >= t.g\n ORDER BY b.woba DESC\n LIMIT 3';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_woba_leaders = $statement->fetchAll();\n $statement->closeCursor();\n return $team_woba_leaders;\n}", "function display_teamsingleschedule($season, $team, $output = 'html', $week = null)\n{\n\tglobal $tpl, $db;\n\n\tif (empty($season)) {\n\t\t// default to this year\n\t\t$season = get_current_season();\n\t}\n\n\tif (!is_numeric($season)) {\n\t\tdisplay_message(\"Invalid season\", SCHEDULE_HEADER);\n\t\treturn;\n\t}\n\n\t$user = user_logged_in();\n\n\t$gamesstmt = $db->prepare('SELECT games.week, games.start, games.home_score, games.away_score, home_teams.abbreviation AS home_team_abbr, away_teams.abbreviation AS away_team_abbr FROM ' . TOTE_TABLE_GAMES . ' AS games LEFT JOIN ' . TOTE_TABLE_SEASONS . ' AS seasons ON games.season_id=seasons.id LEFT JOIN ' . TOTE_TABLE_TEAMS . ' AS home_teams ON games.home_team_id=home_teams.id LEFT JOIN ' . TOTE_TABLE_TEAMS . ' AS away_teams ON games.away_team_id=away_teams.id WHERE seasons.year=:year AND (games.away_team_id=:away_team_id OR games.home_team_id=:home_team_id) ORDER BY week');\n\t$gamesstmt->bindParam(':year', $season, PDO::PARAM_INT);\n\t$gamesstmt->bindParam(':away_team_id', $team, PDO::PARAM_INT);\n\t$gamesstmt->bindParam(':home_team_id', $team, PDO::PARAM_INT);\n\t$gamesstmt->execute();\n\n\t$tz = date_default_timezone_get();\n\tdate_default_timezone_set('UTC');\n\t$teamgames = array();\n\twhile ($game = $gamesstmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t$game['start'] = strtotime($game['start']);\n\t\t$game['localstart'] = get_local_datetime($game['start'], (!empty($user['timezone']) ? $user['timezone'] : null));\n\t\t$teamgames[(int)$game['week']] = $game;\n\t}\n\tdate_default_timezone_set($tz);\n\t\n\t$gamesstmt = null;\n\n\t$seasonweeks = get_season_weeks($season);\n\n\tfor ($i = 1; $i <= $seasonweeks; $i++) {\n\t\tif (!isset($teamgames[$i])) {\n\t\t\t$teamgames[$i] = array('bye' => true);\n\t\t}\n\t}\n\tksort($teamgames);\n\n\t$teamstmt = $db->prepare('SELECT teams.home, teams.team FROM . ' . TOTE_TABLE_TEAMS . ' WHERE id=:team_id');\n\t$teamstmt->bindParam(':team_id', $team, PDO::PARAM_INT);\n\t$teamstmt->execute();\n\t$teamobj = $teamstmt->fetch(PDO::FETCH_ASSOC);\n\t$teamstmt = null;\n\n\thttp_headers();\n\n\t$tpl->assign('team', $teamobj);\n\tif (empty($week)) {\n\t\t$tpl->assign('allseasons', array_reverse(get_seasons()));\n\t}\n\t$mobile = mobile_browser();\n\tif ($mobile) {\n\t\t$tpl->assign('mobile', true);\n\t}\n\n\t$tpl->assign('year', $season);\n\t$tpl->assign('games', $teamgames);\n\tif (!empty($week))\n\t\t$tpl->assign('week', $week);\n\n\tif ($output == 'js')\n\t\t$tpl->assign('js', true);\n\n\t$tpl->display('teamsingleschedule.tpl');\n}", "function getRecord($player, $season, $type) {\n\tglobal $dbUser, $dbPass, $dbTable, $con;\n\t$matches = array();\n\n\t$matchResult = mysqli_query($con,\"SELECT * FROM Games WHERE SeasonID = '$season' AND MatchType = '$type' AND Status = 'Complete' AND (ChallengerID = '$player' OR DefenderID = '$player')\");\n\twhile($row = mysqli_fetch_assoc($matchResult)) {\n\t\t$matches[] = $row;\n\t}\n\n\t$matchesPlayed = 0;\n\t$matchesWon = 0;\n\tforeach ($matches as $key => $value) {\n\t\tif ($value['ChallengerID'] == $player || $value['DefenderID'] == $player) {\n\t\t\t$matchesPlayed++;\n\t\t\tif ($value['ChallengerID'] == $player && $value['ChallengerScore'] > $value['DefenderScore'] || $value['DefenderID'] == $player && $value['ChallengerScore'] < $value['DefenderScore']) {\n\t\t\t\t$matchesWon++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $matchesWon . '-' . ($matchesPlayed - $matchesWon);\n}", "function fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id) {\n $sql = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.has_played = 0 \" .\n \"AND f.position = 1 \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n while ($row = db_fetch_array($result)) {\n\n $role = $row['role'];\n $t_id = $row['t_id'];\n \n #1a riserva dello stesso ruolo\n $sqla = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 2 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resulta = db_query($sqla, $role, $competition_round, $c_id, $t_id);\n\n if (db_affected_rows($resulta) > 0) {\n\n while ($rowa = db_fetch_array($resulta)) {\n $pl_id = $rowa['pl_id'];\n \n #se con il voto entra la prima riserva\n if (in_array($pl_id, $pl_votes)) {\n $sqlb = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultb = db_query($sqlb, $pl_id, $t_id, $c_id, $competition_round);\n }\n #se senza voto cerco la seconda riserva\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n }\n }\n\n #nessuna prima riserva ancora non entrata\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n\n }\n}", "public function getTeams();", "public function index_turnament()\n {\n \n return view('admin.tournament.index');\n }", "public function getSport()\n {\n return \"Football\";\n }", "public function index(){\n\t\t$matches = Matches::orderBy('id','desc')->with('winner')->with('loser')->with('winner_character')->with('loser_character')->simplePaginate(50);\n return view('matches.index', compact('matches'));\n }", "function show_awards_listing($db,$id,$fm)\r\n{\r\n global $PHP_SELF, $bluebdr, $greenbdr, $yellowbdr;\r\n\r\n if ($db->Exists(\"SELECT * FROM seasons\")) {\r\n //$db->QueryRow(\"SELECT aw.season, se.SeasonID, se.SeasonName FROM awards aw INNER JOIN seasons se ON aw.season = se.SeasonID WHERE se.SeasonName NOT LIKE '%KO%' GROUP BY aw.season ORDER BY se.SeasonName DESC\");\r\n $db->QueryRow(\"SELECT aw.season, se.SeasonID, se.SeasonName FROM awards aw INNER JOIN seasons se ON aw.season = se.SeasonID GROUP BY aw.season ORDER BY se.SeasonName DESC\");\r\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\r\n echo \" <tr>\\n\";\r\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\r\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\r\n echo \"<tr>\\n\";\r\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\r\n echo \" <font class=\\\"10px\\\">You are here:</font> <a href=\\\"/index.php\\\">Home</a> &raquo; <font class=\\\"10px\\\">Awards</font></p>\\n\";\r\n echo \" </td>\\n\";\r\n //echo \" <td align=\\\"right\\\" valign=\\\"top\\\">\\n\";\r\n //require (\"navtop.php\");\r\n //echo \" </td>\\n\";\r\n echo \"</tr>\\n\";\r\n echo \"</table>\\n\";\r\n\r\n echo \"<b class=\\\"16px\\\">Player Awards</b><br><br>\\n\";\r\n\r\n //////////////////////////////////////////////////////////////////////////////////////////\r\n // Schedule Select Box\r\n //////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"3\\\" bordercolor=\\\"$bluebdr\\\" align=\\\"center\\\">\\n\";\r\n echo \" <tr>\\n\";\r\n echo \" <td bgcolor=\\\"$bluebdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">SEASON SELECTOR</td>\\n\";\r\n echo \" </tr>\\n\";\r\n echo \" <tr>\\n\";\r\n echo \" <td class=\\\"trrow1\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\">\\n\";\r\n\r\n echo \" <p><select name=ccl_mode onChange=\\\"gotosite(this.options[this.selectedIndex].value)\\\">\\n\";\r\n echo \" <option>select a season</option>\\n\";\r\n echo \" <option>===============</option>\\n\";\r\n\r\n for ($i=0; $i<$db->rows; $i++) {\r\n $db->GetRow($i);\r\n $db->BagAndTag();\r\n\r\n // output\r\n $id = $db->data['SeasonID'];\r\n $season = $db->data['SeasonID'];\r\n $sename = $db->data['SeasonName'];\r\n\r\n echo \" <option value=\\\"$PHP_SELF?season=$season&sename=$sename&ccl_mode=2\\\">\" . $db->data['SeasonName'] . \" season</option>\\n\";\r\n\r\n }\r\n\r\n echo \" </select></p>\\n\";\r\n\r\n echo \" </td>\\n\";\r\n echo \" </tr>\\n\";\r\n echo \"</table>\\n\";\r\n\r\n echo \" </td>\\n\";\r\n echo \" </tr>\\n\";\r\n echo \"</table>\\n\";\r\n\r\n } else {\r\n\r\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\r\n echo \" <tr>\\n\";\r\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\r\n echo \" <p>There are no player awards in the database.</p>\\n\";\r\n echo \" <p>&laquo; <a href=\\\"/index.php\\\">back to homepage</a></p>\\n\";\r\n echo \" </td>\\n\";\r\n echo \" </tr>\\n\";\r\n echo \"</table>\\n\";\r\n }\r\n}", "public function show($slug)\n {\n $gamer=Gamer::where('slug', $slug)->firstOrFail();\n $games=0;\n $winners=0;\n $winnerTournaments=0;\n $default=0;\n $gamesInfo=[];\n foreach ($gamer->couples as $couple) {\n $winners+=GameWinner::where('couple_id', $couple->id)->count();\n\n $winnerTournaments+=TournamentWinner::where('couple_id', $couple->id)->count();\n\n foreach ($couple->games as $game) {\n if ($game->state==1 || $game->state==2) {\n $default++;\n }\n $gamesInfo[$games]=['slug' => $game->slug, 'type' => $game->type, 'state' => $game->state, 'created_at' => $game->created_at];\n $games++;\n }\n }\n $loses=$games-$winners-$default;\n $num=1;\n\n return view('admin.gamers.show', compact(\"gamer\", \"games\", \"winners\", \"loses\", \"winnerTournaments\", 'gamesInfo', 'num'));\n }", "public function actionIndex()\n {\n $searchModel = new TournamentSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function get_team_p_war_leaders($year,$team_id) {\n global $db;\n $query = 'SELECT p.player_id\n , CONCAT(pl.first_name,\" \",pl.last_name) as player\n , round(p.war,1) as war\n FROM CalcPitching p INNER JOIN players pl ON p.player_id=pl.player_id\n WHERE p.year = :year AND p.team_id = :team_id\n ORDER BY p.war DESC\n LIMIT 3';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_p_war_leaders = $statement->fetchAll();\n $statement->closeCursor();\n return $team_p_war_leaders;\n}", "function get_standing_driver($idSeason)\n{\n $table_standing = get_standing_driver_db($idSeason);\n return $table_standing;\n}", "public function index()\n {\n $teamRankingT20s = TeamsRankingT20::all();\n $clubs = Club::pluck('name','id');\n return view('admin.teamRankingt20.index',compact('teamRankingT20s','clubs'));\n }", "public function index()\n\t{\n\t\t$eu_standings = LeagueStanding::where(\"league_id\", \"=\", 11)->orderBy(\"rank\", \"ASC\")->get();\n\t\t$na_standings = LeagueStanding::where(\"league_id\", \"=\", 19)->orderBy(\"rank\", \"ASC\")->get();\n\t\t\n\t\t$cs_eu_standings = LeagueStanding::where(\"league_id\", \"=\", 40)->orderBy(\"rank\", \"ASC\")->get();\n\t\t$cs_na_standings = LeagueStanding::where(\"league_id\", \"=\", 41)->orderBy(\"rank\", \"ASC\")->get();\n\t\t\n\t\t$ogn = League::find(3);\n\t\t$gpl = League::find(4);\n\t\t$lpl = League::find(5);\n\t\t$lms = League::find(38);\n\n\t\treturn View::make('teams.index', compact('na_standings', 'ogn', 'gpl', 'lpl','lms', 'eu_standings', 'cs_eu_standings', 'cs_na_standings'));\n\t}", "public function our_team()\n {\n $data['our_teams'] = OurTeam::where('status',1)\n ->orderBy('sort', 'asc')->get();\n $data['title'] = 'Our Team';\n $data['menu'] = 'our_team';\n $data['seo'] = Seo::where('menu_name', 'our_team')->first();\n return view('our_team', $data);\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }", "public function show(Team $team)\n {\n //\n }" ]
[ "0.63523734", "0.63510185", "0.61470085", "0.61414546", "0.6049989", "0.6024968", "0.60183156", "0.5942192", "0.5883106", "0.5875423", "0.58676404", "0.5851405", "0.5819774", "0.5805797", "0.5788007", "0.57555395", "0.5752967", "0.57480735", "0.5746404", "0.5717107", "0.57136273", "0.56665266", "0.5630611", "0.56264895", "0.5600482", "0.5595633", "0.5587564", "0.5587217", "0.5581507", "0.55577576", "0.55517197", "0.55464405", "0.5517644", "0.5516947", "0.5514178", "0.55112183", "0.55100685", "0.5494434", "0.54918337", "0.549099", "0.54907787", "0.54818976", "0.54764503", "0.54679716", "0.5461052", "0.54591197", "0.54432654", "0.54383695", "0.5415571", "0.5409169", "0.5398657", "0.5390893", "0.5382753", "0.5370654", "0.5367687", "0.5350687", "0.53439754", "0.53310513", "0.53185767", "0.5308704", "0.52945524", "0.5287569", "0.52868515", "0.52795136", "0.52778256", "0.5273968", "0.52727044", "0.525948", "0.52574825", "0.5256637", "0.52550054", "0.5254263", "0.52513653", "0.5247943", "0.52401733", "0.523877", "0.5234159", "0.5233895", "0.52335554", "0.52326256", "0.52246964", "0.5220192", "0.5217372", "0.52073526", "0.52055466", "0.5203367", "0.5201217", "0.5200389", "0.51985496", "0.5197316", "0.51945966", "0.518667", "0.5185605", "0.5181784", "0.5176345", "0.51712537", "0.51607776", "0.51506704", "0.5148754", "0.5148754", "0.5148754" ]
0.0
-1
Add context to timber twig output
public function addToContext($context) { $context['menu'] = new Menu(); $context['site'] = $this; return $context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twig_timber_context( $context ) {\n\t\t//Useful Variables\n\t\tglobal $template;\n\t\t$context['theme_template'] = str_replace( '.php', '', basename( $template ) );\n\t\t$context['theme_url'] = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t\t//Bam! Magic!\n\t\treturn $context;\n\t}", "function blog_view($context) {\n Timber::render('category/blog.twig', $context);\n}", "public function contextAction()\n {\n \n return $this\n ->render('sfTblogBlogBundle:Homepage:context.html.twig',\n array('title' => \"контекстная реклама\"));\n }", "public function renderContext() {\n\t}", "public function __construct(\\Twig_Environment $env)\n {\n @session_start();\n\n //Check if we need to start a debug session\n //(this condition won't be triggered by AJAX-requests, so we need the session)\n if (isset($_GET['twig_debug'])) {\n $_SESSION['twig_debug'] = (bool)$_GET['twig_debug'];\n }\n\n //Check if a debug session was previously started\n if (isset($_SESSION['twig_debug'])) {\n $this->debugFiles = (bool)$_SESSION['twig_debug'];\n }\n\n //Do not debug the profiler tool bar\n $bundleName = substr($this->getTemplateName(), 0, strpos($this->getTemplateName(), ':'));\n if ($bundleName == 'WebProfilerBundle') {\n $this->debugFiles = false;\n }\n\n if (isset($_GET['hierarchy'])) {\n $this->debugHierarchy = true;\n }\n\n\n parent::__construct($env);\n\n\n //The twig extentions are not available, so we'll consider that\n //there can only be 1 root template, and dump the JS and the CSS on the page.\n if ($this->debugFiles && self::$templateParent == '') {\n echo '<style type=\"text/css\">';\n echo file_get_contents(__DIR__ . \"/../Resources/public/css/twigDebug.css\");\n echo '</style>';\n\n echo '<script type=\"text/javascript\">';\n echo file_get_contents(__DIR__ . \"/../Resources/public/js/twigDebug.js\");\n echo '</script>';\n }\n }", "private function twigDefaultContext()\n {\n // show language bar by default\n if (!isset($this->data['hideLanguageBar'])) {\n $this->data['hideLanguageBar'] = false;\n }\n // get languagebar\n $this->data['languageBar'] = null;\n if ($this->data['hideLanguageBar'] === false) {\n $languageBar = $this->generateLanguageBar();\n if (is_null($languageBar)) {\n $this->data['hideLanguageBar'] = true;\n } else {\n $this->data['languageBar'] = $languageBar;\n }\n }\n\n // assure that there is a <title> and <h1>\n if (isset($this->data['header']) && !isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = $this->data['header'];\n }\n if (!isset($this->data['pagetitle'])) {\n $this->data['pagetitle'] = 'SimpleSAMLphp';\n }\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n\n\t\t$function = new Twig_SimpleFunction('get_post_format', function($id) {\n\t\t\treturn get_post_format($id);\n\t\t});\n\t\t$twig->addFunction($function);\n\n\t\t$get_theme_mod = new Twig_SimpleFunction('get_theme_mod', function($id) {\n\t\t\treturn get_theme_mod($id);\n\t\t});\n\t\t$twig->addFunction($get_theme_mod);\n\n $gustav_comment_form = new Twig_SimpleFunction('gustav_comment_form', function($id) {\n $args = array(\n 'fields' => array(\n 'author' => '<div class=\"form-group\"><label for=\"author\">' . __( 'Name' ) . '</label><input id=\"author\" class=\"form-control\" name=\"author\" type=\"text\" value=\"\" /></div>',\n 'email' => '<div class=\"form-group\"><label for=\"email\">' . __( 'Email' ) . '</label> ' .\n \t '<input id=\"email\" class=\"form-control\" name=\"email\" type=\"text\" value=\"\" /></div>',\n \t 'url' => '<div class=\"form-group\"><label for=\"url\">' . __( 'Website' ) . '</label>' .\n \t '<input id=\"url\" class=\"form-control\" name=\"url\" type=\"text\" value=\"\" /></div>',\n ),\n 'comment_field' => '<div class=\"form-group\"><label for=\"comment\">' . _x( 'Comment', 'noun' ) . '</label><textarea id=\"comment\" class=\"form-control\" name=\"comment\" aria-required=\"true\"></textarea></p>',\n 'class_submit' => 'btn btn-default',\n 'title_reply' => null\n );\n\n ob_start();\n comment_form($args, $id);\n $output = ob_get_contents();\n ob_end_clean();\n\n return $output;\n });\n $twig->addFunction($gustav_comment_form);\n\n return $twig;\n }", "function add_to_twig($twig) {\n $twig->addExtension(new \\Twig_Extension_StringLoader());\n $twig->addFunction(new \\Twig_SimpleFunction('script', 'CodekippleWPTheme\\Timber\\Site\\script'));\n $twig->addFunction(new \\Twig_SimpleFunction('css', 'CodekippleWPTheme\\Timber\\Site\\css'));\n $twig->addFilter('body_class', new \\Twig_Filter_Function('CodekippleWPTheme\\Timber\\Site\\body_class'));\n\n return $twig;\n }", "public function __construct()\n {\n $loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n $this->twig = new \\Twig\\Environment($loader, ['debug' => true, 'cache' => false]);\n $this->twig->addGlobal('baseUrl', BASEURL);\n\n if(isset($_SESSION['user'])) {\n $this->twig->addGlobal('session', $_SESSION['user']);\n }\n }", "function _filter_do_shortcode_context()\n {\n }", "function add_to_twig($twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t// $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\treturn $twig;\n\t}", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function add_to_twig( $twig ) {\n\t\t// $twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t// $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig($twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "protected function handle_filter_timber_context( $context ) {\n $context['PEDESTAL_VERSION'] = PEDESTAL_VERSION;\n\n $context['date_format'] = get_option( 'date_format' );\n $context['time_format'] = get_option( 'time_format' );\n\n $context['site']->owner = [\n 'name' => PEDESTAL_SITE_OWNER,\n 'url' => PEDESTAL_SITE_OWNER_URL,\n ];\n\n $context['site']->social = [\n 'facebook_page_id' => PEDESTAL_FACEBOOK_PAGE_ID,\n ];\n\n $context['site']->address = [\n 'building_name' => PEDESTAL_BUILDING_NAME,\n 'street_address' => PEDESTAL_STREET_ADDRESS,\n 'city' => PEDESTAL_CITY_NAME,\n 'state' => PEDESTAL_STATE,\n 'zipcode' => PEDESTAL_ZIPCODE,\n ];\n\n $context['site']->city = [\n 'name' => PEDESTAL_CITY_NAME,\n ];\n\n $context['site']->emails = [\n 'contact' => PEDESTAL_EMAIL_CONTACT,\n 'tips' => PEDESTAL_EMAIL_TIPS,\n ];\n\n $context['site']->analytics = [\n 'ga' => [],\n 'parsely' => [],\n ];\n // Enable analytics for everyone that can't edit posts\n if ( ! current_user_can( 'edit_posts' ) ) {\n $ga_data = [\n 'id' => PEDESTAL_GOOGLE_ANALYTICS_ID,\n 'optimizeID' => PEDESTAL_GOOGLE_OPTIMIZE_ID,\n ];\n $ga_inline_script = file_get_contents( PEDESTAL_DIST_DIRECTORY . '/js/ga.js' );\n\n $context['site']->analytics['ga'] = [\n 'optimize_id' => $ga_data['optimizeID'],\n 'js_data' => Utils::encode_for_js( $ga_data ),\n 'inline_script' => $ga_inline_script,\n ];\n\n $context['site']->analytics['parsely'] = [\n 'site' => parse_url( home_url(), PHP_URL_HOST ),\n ];\n\n if ( is_singular() ) {\n $parsely_metadata = [\n 'post_id' => get_queried_object_id(),\n ];\n $parsely_metadata = htmlspecialchars( json_encode( $parsely_metadata ), ENT_NOQUOTES );\n $context['site']->analytics['parsely']['metadata'] = $parsely_metadata;\n }\n }\n\n // `Schema_Metadata` needs to be loaded as late as possible so\n // conditional functions like `is_singular()` work\n $this->schema_metadata = Schema_Metadata::get_instance();\n $context['schema_metadata'] = $this->schema_metadata->get_markup();\n\n $context['cdn_fallback_inline_script'] = file_get_contents( PEDESTAL_DIST_DIRECTORY . '/js/cdn-fallback.js' );\n\n return $context;\n }", "public function render()\n {\n if (is_archive()) {\n // Archive stuff\n } else {\n // Get Template vars\n $context = Timber::get_context();\n $post = new \\TimberPost();\n $context['post'] = $post;\n // Render Template\n Timber::render('pages/single-book.twig', $context);\n }\n }", "public function __invoke(ContainerInterface $container)\n {\n $twig = new \\Twig_Environment(new \\Twig_Loader_Filesystem([\n __DIR__ . '/../../templates'\n ]));\n\n // Add extensions\n $twig->addExtension(new TranslatorExtension($container->get('translator')));\n $twig->addExtension(new UrlExtension($container->get(RouteAssembler::class)));\n $twig->addExtension(new NavigationExtension(\n $container->get('translator'),\n $container->get(RouteAssembler::class),\n $container->get('config')['navigation']\n ));\n $twig->addExtension(new RecaptchaExtension($container->get('config')['recaptcha']));\n\n return new Twig($twig);\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFunction('file_exists', new Twig_Function_Function('file_exists'));\n $twig->addFunction('environment', new Twig_Function_Function('get_environment'));\n return $twig;\n }", "function get_context_with_fields($merge = [])\n{\n\n // Get main context from Timber\n $context['timber'] = Timber::get_context();\n\n // Current Post/Post\n $context['this'] = new Timber\\Post();\n\n // Add our stuff\n $context['fields'] = get_fields();\n $context['current'] = get_full_post();\n\n // Global\n $context['globals'] = get_fields('options');\n\n // Products\n $context['products'] = get_posts(['post_type' => 'product', 'per_page' => -1]);\n\n // Menu\n $context['menu'] = get_menu('Main Menu');\n\n // Add some helpers\n $context['util']['assetsDir'] = assets_dir();\n $context['util']['hasPostThumbnail'] = has_post_thumbnail();\n $context['util']['year'] = date('Y');\n\n return apply_filters('get_context_with_fields', array_merge($context, $merge));\n}", "private function addTwigFunctions() : void {\n\t\t$msgFunc = new Twig_SimpleFunction( 'msg', function ( $key, $params = [] ) {\n\t\t\t$params = is_array( $params ) ? $params : [];\n\t\t\treturn $this->i18n->msg(\n\t\t\t\t$key, [ 'domain' => 'popular-pages', 'variables' => $params ]\n\t\t\t);\n\t\t} );\n\t\t$this->twig->addFunction( $msgFunc );\n\n\t\t// Fetching assessments info, case-insensitive.\n\t\t$assessmentFunc = new Twig_SimpleFunction(\n\t\t\t'assessments', function (\n\t\t\t\tstring $type, string $value\n\t\t\t) {\n\t\t\t\t$dataset = $this->api->getAssessmentConfig()[$type];\n\t\t\t\tforeach ( $dataset as $key => $values ) {\n\t\t\t\t\tif ( strtolower( $value ) === strtolower( $key ) ) {\n\t\t\t\t\t\treturn $values;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $dataset['Unknown'];\n\t\t\t} );\n\t\t$this->twig->addFunction( $assessmentFunc );\n\n\t\t// Add ucfirst() (Twig's capitalize() will make the other chars lowercase).\n\t\t$ucfirstFunc = new Twig_SimpleFilter( 'ucfirst', function ( string $value ) {\n\t\t\treturn ucfirst( $value );\n\t\t} );\n\t\t$this->twig->addFilter( $ucfirstFunc );\n\t}", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\n\t\t// extending Twig functions mytheme/Lib/Extensions.php\n\t\t$twig->addFunction( new Twig_SimpleFunction( 'dump', [ $this, 'dump' ] ) );\n\t\treturn $twig;\n }", "public function onTwigSiteVariables()\n\t{\n\t\trequire_once __DIR__ . '/classes/datetools.php';\n\n\t\t$args = [];\n\t\t$args['config'] = $this->grav['config'];\n\n\t\t$twig = $this->grav['twig'];\n\t\t$twig->twig_vars['datetools'] = new DateTools($args);\n\t\t//$twig->twig->addGlobal('datetools', new DateTools($args));\n\t}", "public function filter_timber_twig_add_functions( $twig ) {\n // Function to check if doing email and alternate strings\n $twig->addFunction( new \\Twig_SimpleFunction( 'if_email', function( $email_str, $standard_str ) {\n if ( $this->is_email() ) {\n return $email_str;\n }\n return $standard_str;\n } ) );\n\n // Get the current Unix epoch time in milliseconds\n $twig->addFunction( new \\Twig_SimpleFunction( 'now', function() {\n return round( microtime( true ) * 1000 );\n } ) );\n\n // Add WordPress' checked() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'checked', function( $checked, $current = true ) {\n return checked( $checked, $current );\n } ) );\n\n // Add WordPress' selected() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'selected', function( $selected, $current = true ) {\n return selected( $selected, $current );\n } ) );\n\n // Add WordPress' disabled() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'disabled', function( $disabled, $current = true ) {\n return disabled( $disabled, $current );\n } ) );\n\n return $twig;\n }", "public final function render($container_context = array())\n {\n }", "function add_to_context($data){\n\t\t$data['menu'] = wp_nav_menu(array('menu' => 175, 'echo' => false));\n\t\t$data['sidebar'] = Timber::get_sidebar();\n\t\treturn $data;\n\t}", "private function outputBoilerplate($twig_template, $extra = array()) {\n $error = $this->error;\n $t = $twig_template;\n $t = $this->twig->loadTemplate($t);\n $common_variables = array('error' => $error, \n\t\t\t 'modes' => $this->user_visible_modes,\n\t\t\t 'login_url' => IDECIDE_LOGIN);\n $output_array = array_merge($common_variables, $extra);\n $output = $t->render($output_array);\n return $output;\n }", "public function handle($context)\n {\n return 'task2.twig';\n }", "public function onAfterSiteTwigVars()\n {\n if (!$this->active) {\n return;\n }\n\n $twig = Registry::get('Twig');\n $twig->template = 'problems.html.twig';\n $twig->twig_vars['results'] = $this->results;\n\n if ($this->config->get('plugins.problems.built_in_css')) {\n $twig->twig_vars['stylesheets'][] = 'user/plugins/problems/problems.css';\n }\n }", "function twig_template(string $source): \\Twig\\TemplateWrapper\n{\n global $twig_env_html;\n return $twig_env_html->createTemplate(macro_convert($source));\n}", "public static function add_to_context($context) {\n foreach(static::$widgets as $key=>&$widget) {\n $context[\"widget_{$key}\"] = \\Timber::get_widgets($widget['id']);\n }\n return $context;\n }", "public static function toHTML($twitter) {\n foreach ($twitter['tweets'] as &$tweet) {\n $tweet['user']['avatar'] = RemoteFileCache::fetchFileURL($tweet['user']['avatar'], 'cache/images');\n }\n \n $loader = new \\Twig_Loader_Filesystem('./templates');\n $twig = new \\Twig_Environment($loader, array(\n 'cache' => './cache/twig',\n 'debug' => true,\n ));\n $twig->addExtension(new \\Twig_Extension_Debug());\n echo $twig->render('base.html.twig', $twitter);\n }", "public function partnamber()\n\t\t{\n\t\t\t\n\n\t\t\t$loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n\t\t\t$twig = new \\Twig\\Environment($loader);\n\t\t\t$template = $twig->load('cadastro_partnamber.html');\n\t\t\n\t\t\t$parametros = array();\n\t\t\t\t\t\n\t\t\t\t\t// $parametros ['produtos'] = $estoque;\n\n\t\t\t$conteudo = $template->render($parametros);\n\n\t\t\t\t\t// var_dump($parametros);\n\t\t\techo $conteudo;\n\n\t\t}", "private static function addGlobals()\n {\n \tself::$twig->addGlobal('session', $_SESSION);\n self::$twig->addGlobal('APP', APP);\n self::$twig->addGlobal('auth', Auth::getAuth());\n }", "public function __construct(){\n global $gx_config, $gx_library;\n //$theme = $gx_config['config']['theme']; //todo: set up for db to overwrite this.\n require_once ('Twig/autoloader.php');\n //$gx_library->loadLibraryFile($gx_config->config['paths']['vendor'], 'Autoloader.php');\n //$this->loader = new Twig_Loader_Filesystem($gx_config['paths']['themepath'].$theme);\n $this->loader = new Twig_Loader_Filesystem(templates);\n $this->envir = new Twig_Environment($this->loader);\n $this->envir_vars = array();\n $this->template = array();\n $this->rendered = array();\n $this->display_ready='';\n }", "function renderBoreholeDetails($data,$municipalities,$settlements,$hareas,$districts){\n\nglobal $twig;\n\n foreach ($data as $borehole){\n\n $navigation[0] = array('href' => 'index.php', 'caption' => 'Home', 'class'=>'active');\n\n $borehole->municipality = $municipalities[(int)$borehole->municipality]->name;\n $borehole->settlement = $settlements[(int)$borehole->settlement]->name;\n $borehole->h_area = $hareas[(int)$borehole->h_area]->name;\n $borehole->district = $districts[(int)$borehole->district]->name;\n\n $template = $twig->loadTemplate('boreholedetail.html');\n $buffer = $template->render(array('navigation' => $navigation, 'data'=>$borehole));\n\n renderHTML($buffer,$borehole->bh.'.html');\n }\n}", "public function render(array $context);", "public function render(array $context);", "function add_to_context($data)\r\n{\r\n $data['THEME_URL'] = THEME_URL;\r\n $data['homeurl'] = get_site_url();\r\n if (ICL_LANGUAGE_CODE != 'en') {\r\n $data['homeurl'] .= '/' . ICL_LANGUAGE_CODE;\r\n }\r\n // Menus\r\n $data['topmenu'] = new TimberMenu(36);\r\n $data['menu'] = new TimberMenu(35);\r\n $data['footerregion'] = new TimberMenu(9606);\r\n $data['footersection'] = new TimberMenu(9607);\r\n // Sidebar\r\n $data['sidebar_right'] = Timber::get_widgets('sidebar-1');\r\n $data['sidebar_bottom'] = Timber::get_widgets('sidebar-2');\r\n // Languages WPML\r\n $data['languages'] = icl_get_languages('skip_missing=0&orderby=code');\r\n $data['language'] = $data['languages'][ICL_LANGUAGE_CODE];\r\n return $data;\r\n}", "public function __invoke(): Twig\n {\n $twig = new Twig(new FilesystemLoader(\n $this->config->get('views_path')\n ), ['cache' => $this->config->get('view_cache')]);\n\n /** @var CoreExtension $core */\n $core = $twig->getEnvironment()->getExtension(CoreExtension::class);\n\n $core->setDateFormat($this->config->get('date_format'), '%d days');\n $core->setTimezone($this->config->get('timezone'));\n\n foreach ($this->config->get('view_functions') as $function) {\n /** @var ViewFunction&Callable $function */\n $function = $this->callableResolver->resolve($function);\n\n $twig->getEnvironment()->addFunction(\n new TwigFunction($function->name(), $function)\n );\n }\n\n return $twig;\n }", "public function onTwigSiteVariables()\n {\n }", "function __construct($options = [])\n {\n if(config('twig.cache') && env() !== 'development') {\n $options['cache'] = config('twig.cache');\n }\n\n if(env() === 'development') {\n $options['debug'] = true;\n }\n\n $this->loader = new Twig_Loader_Filesystem();\n $this->twig = new Twig_Environment($this->loader, $options);\n \n $this->registerPaths(config('twig.paths'));\n $this->registerExtensions(config('twig.extensions'));\n $this->registerExtensions(config('twig.filters'));\n $this->registerExtensions(config('twig.globals'));\n $this->registerExtensions(config('twig.functions'));\n $this->registerExtensions(config('twig.tests'));\n }", "private static function addFunctions()\n {\n \tself::$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) {\n return sprintf('%s', ltrim($asset, '/'));\n\t\t}));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('getBaseUrl', function () {\n return getBaseUrl();\n }));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('csrf_token', function () {\n return csrf_token();\n }));\n }", "public function extras(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"extras\";\n $tituloservicio=\"EXTRAS\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/extras.twig\", $datin);\n return $response;\n}", "protected function getTwigService()\n {\n $a = $this->get('request_stack');\n $b = $this->get('logger');\n $c = $this->get('knp_menu.matcher');\n\n $d = new \\Troopers\\AsseticInjectorBundle\\Twig\\AsseticExtension(${($_ = isset($this->services['assetic.asset_factory']) ? $this->services['assetic.asset_factory'] : $this->getAssetic_AssetFactoryService()) && false ?: '_'}, $this->get('templating.name_parser'), false, array(), array(0 => 'FrameworkBundle', 1 => 'SecurityBundle', 2 => 'TwigBundle', 3 => 'MonologBundle', 4 => 'SwiftmailerBundle', 5 => 'DoctrineBundle', 6 => 'SensioFrameworkExtraBundle', 7 => 'AppBundle', 8 => 'A2lixTranslationFormBundle', 9 => 'BazingaJsTranslationBundle', 10 => 'AsseticBundle', 11 => 'TroopersAsseticInjectorBundle', 12 => 'TroopersAlertifyBundle', 13 => 'FOSUserBundle', 14 => 'FOSJsRoutingBundle', 15 => 'JMSSerializerBundle', 16 => 'LiipImagineBundle', 17 => 'KnpMenuBundle', 18 => 'DoctrineBehaviorsBundle', 19 => 'SncRedisBundle', 20 => 'StofDoctrineExtensionsBundle', 21 => 'VictoireAnalyticsBundle', 22 => 'VictoireBlogBundle', 23 => 'VictoireBusinessEntityBundle', 24 => 'VictoireBusinessPageBundle', 25 => 'VictoireCoreBundle', 26 => 'VictoireCriteriaBundle', 27 => 'VictoireFilterBundle', 28 => 'VictoireFormBundle', 29 => 'VictoireI18nBundle', 30 => 'VictoireMediaBundle', 31 => 'VictoirePageBundle', 32 => 'VictoireQueryBundle', 33 => 'VictoireSeoBundle', 34 => 'VictoireSitemapBundle', 35 => 'VictoireTemplateBundle', 36 => 'VictoireTwigBundle', 37 => 'VictoireUIBundle', 38 => 'VictoireUserBundle', 39 => 'ViewReferenceBundle', 40 => 'VictoireWidgetBundle', 41 => 'VictoireWidgetMapBundle'), new \\Symfony\\Bundle\\AsseticBundle\\DefaultValueSupplier($this));\n $d->setCollector($this->get('troopers_assetic_injector.collector'));\n\n $e = new \\Knp\\Menu\\Util\\MenuManipulator();\n\n $f = new \\Symfony\\Bridge\\Twig\\AppVariable();\n $f->setEnvironment('prod');\n $f->setDebug(false);\n if ($this->has('security.token_storage')) {\n $f->setTokenStorage($this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n if ($this->has('request_stack')) {\n $f->setRequestStack($a);\n }\n\n $this->services['twig'] = $instance = new \\Twig_Environment($this->get('twig.loader'), array('debug' => false, 'strict_variables' => false, 'exception_controller' => 'twig.controller.exception:showAction', 'form_themes' => array(0 => 'form_div_layout.html.twig'), 'autoescape' => 'name', 'cache' => (__DIR__.'/twig'), 'charset' => 'UTF-8', 'paths' => array(), 'date' => array('format' => 'F j, Y H:i', 'interval_format' => '%d days', 'timezone' => NULL), 'number_format' => array('decimals' => 0, 'decimal_point' => '.', 'thousands_separator' => ',')));\n\n $instance->addExtension($this->get('twig.extension.text'));\n $instance->addExtension($this->get('twig.extension.intl'));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension(${($_ = isset($this->services['security.logout_url_generator']) ? $this->services['security.logout_url_generator'] : $this->getSecurity_LogoutUrlGeneratorService()) && false ?: '_'}));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\SecurityExtension($this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE)));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\TranslationExtension($this->get('translator.default')));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\AssetExtension($this->get('assets.packages')));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\CodeExtension(${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, ($this->targetDirs[3].'/app'), 'UTF-8'));\n $instance->addExtension(new \\Victoire\\Bundle\\CoreBundle\\Twig\\Extension\\RoutingExtension($this->get('victoire_page.page_helper'), $this->get('router'), $this->get('victoire_i18n.locale_resolver'), $a, $b, $this->get('victoire.repository.error_page'), 'en'));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\YamlExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension($this->get('debug.stopwatch', ContainerInterface::NULL_ON_INVALID_REFERENCE), false));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension($a, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\FormExtension(array(0 => $this, 1 => 'twig.form.renderer')));\n $instance->addExtension(new \\Doctrine\\Bundle\\DoctrineBundle\\Twig\\DoctrineExtension());\n $instance->addExtension($d);\n $instance->addExtension($this->get('troopers_alertifybundle.twig.extension'));\n $instance->addExtension(new \\JMS\\Serializer\\Twig\\SerializerRuntimeExtension());\n $instance->addExtension(new \\Liip\\ImagineBundle\\Templating\\ImagineExtension($this->get('liip_imagine.cache.manager')));\n $instance->addExtension(new \\Knp\\Menu\\Twig\\MenuExtension(new \\Knp\\Menu\\Twig\\Helper($this->get('knp_menu.renderer_provider'), $this->get('knp_menu.menu_provider'), $e, $c), $c, $e));\n $instance->addExtension($this->get('victoire_core.twig.cms_extension'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_form'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_icon'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_flash'));\n $instance->addExtension($this->get('victoire_media.menu.twig.extension'));\n $instance->addExtension($this->get('victoire_media.twig_extension.svg'));\n $instance->addExtension($this->get('victoire_page.twig.page_extension'));\n $instance->addExtension($this->get('victoire_widget.twig.link_extension'));\n $instance->addGlobal('app', $f);\n $instance->addRuntimeLoader(new \\Symfony\\Bundle\\TwigBundle\\ContainerAwareRuntimeLoader($this, array('Symfony\\\\Bridge\\\\Twig\\\\Extension\\\\HttpKernelRuntime' => 'twig.runtime.httpkernel', 'Symfony\\\\Bridge\\\\Twig\\\\Form\\\\TwigRenderer' => 'twig.form.renderer', 'JMS\\\\Serializer\\\\Twig\\\\SerializerRuntimeHelper' => 'jms_serializer.twig_extension.serializer_runtime_helper'), $b));\n $instance->addGlobal('upload_dir', '/uploads/media/');\n $instance->addGlobal('mediabundleisactive', true);\n $instance->addGlobal('mediamanager', $this->get('victoire_media.media_manager'));\n (new \\Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator('F j, Y H:i', '%d days', NULL, 0, '.', ','))->configure($instance);\n\n return $instance;\n }", "public function __construct()\n {\n parent::__construct();\n\n\n $this->twig = new Environment(new FilesystemLoader('../src/View'), array(\n 'cache' => false,\n 'debug' => true,\n ));\n //permet de Dumper depuis le front\n $this->twig->addExtension(new DebugExtension());\n //création super global session à partir de l'objet user récupérer\n $this->twig->addGlobal('session', $this->session->getUserSession());\n $this->getCommentsDisable();\n }", "static protected function twig(string $template, array $arguments = [])\n {\n $loader = new \\Twig_Loader_Filesystem(__DIR__ . '/../../templates/');\n $twig = new \\Twig_Environment($loader, []);\n\n $app = [\n 'SESSION_USER' => $_SESSION['user'] ?? [],\n 'MESSAGES_ERREUR' => Message::show(),\n '_FRONT' => App::URL,\n 'SESSION' => $_SESSION\n ];\n\n $arguments = array_merge($arguments, $app);\n\n $twig->display($template, $arguments);\n }", "function display ( $template, $data = array() ) {\r\n $template = $this->_twig->loadTemplate( $template );\r\n\r\n // elapsed_time and memory_usage\r\n $data[ 'elapsed_time' ] = $this->CI->benchmark->elapsed_time( 'total_execution_time_start', 'total_execution_time_end' );\r\n $memory = ( !function_exists( 'memory_get_usage' ) ) ? '0' : round( memory_get_usage() / 1024 / 1024, 2 ) . 'MB';\r\n $data[ 'memory_usage' ] = $memory;\r\n $template->display( $data );\r\n }", "private function setup_filters() {\n add_filter( 'timber/twig', function( $twig ) {\n\n // ped_icon()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'icon',\n [ __CLASS__, 'get_icon' ]\n ) );\n\n // ped_logo()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'logo',\n [ __CLASS__, 'get_logo' ]\n ) );\n\n return $twig;\n }, 99 );\n }", "public function testTwigExtension()\n {\n $loader = new ArrayLoader([]);\n $twig = new Environment($loader);\n\n $renderer = new Renderer();\n $renderer->pushNodeRenderer(new NodeRenderer());\n $extension = new TwigExtension($renderer);\n $twig->addExtension($extension);\n\n $template = $twig->createTemplate('The output is \"{{ rich_text_render(node) }}\"');\n $rendered = $template->render([\n 'node' => new Node('Some text'),\n ]);\n\n $this->assertSame('The output is \"Some text\"', $rendered);\n\n $template = $twig->createTemplate('The output is \"{{ rich_text_render_collection(nodes) }}\"');\n $rendered = $template->render([\n 'nodes' => [\n new Node('First text -'),\n new Node(' Second text'),\n ],\n ]);\n\n $this->assertSame('The output is \"First text - Second text\"', $rendered);\n }", "public function register()\n {\n\t\t\n $data[\"base_dir\"]=__DIR__;\n $data[\"loc\"]=\"Register\";\n\t\t\n return $this->twig->render(\"pages/register.html\", $data);\n }", "public function renderTwig($page='index.html', $array=array()){\r\n\t\t$array['curUser'] = self::$user->fields;\r\n\t\techo self::$twig->render($page, $array);\r\n\t}", "function template_manual()\n{\n\tglobal $context, $scripturl, $txt;\n\n\techo '<table width=\"100%\" height=\"50%\" bgcolor=\"#FFCC99\"><tr><td><b><center>', $context['viber_id'], '</center></b></td></tr></table>';\n}", "public function render()\n {\n return <<<'blade'\n<button {{ $attributes->merge(['class' => 'btn', 'type' => '']) }}>\n\t{{ $text }}\n</button>\nblade;\n }", "public function render()\n {\n $page = $this->twig->load($this->template);\n $this->prepareFlashMessages();\n $html = $page->render($this->vars);\n Router::sendResponse($html);\n }", "protected function createTwig()\n {\n $twig = $this->getMockBuilder('Twig_Environment')->getMock();\n $twig\n ->method('render')\n ->will($this->returnCallback(function ($template, $stats) {\n $data =\n\"Report results:<br />\n<br />\nErrors: \" . $stats['errors'] . \"<br />\nFailures: \" . $stats['failures'] . \"<br />\nSkipped: \" . $stats['skipped'] . \"<br />\nTests: \" . $stats['tests'] . \"<br />\nTime: \" . $stats['time'];\n return $data;\n }));\n\n return $twig;\n }", "public function provideForTemplate() {\n\t\treturn $this()->renderWith($this()->ContentType);\n\t}", "public function addTwigExtension()\n {\n Craft::import('plugins.texteffect.twigextensions.TextEffectTwigExtension');\n \n return new TextEffectTwigExtension();\n }", "protected function __construct()\n\t{\n\t\tTwig_Autoloader::register();\n\n\t\t$loader = new Twig_Loader_Filesystem( TEMPLATE_PATH );\n\n\t\t$params = array(\n\t\t\t'cache'\t\t=> TMP_PATH\n\t\t\t, 'debug'\t=> true\n\t\t);\n\n\t\t$this->twig = new Twig_Environment( $loader, $params );\n\n\t\t$this->twig->addExtension( new Twig_Extension_I18n() );\n\t\t$this->twig->addExtension( new Twig_Extension_LoadModule() );\n\n\t\t$this->setContext('MAIN');\n\t}", "function add_to_twig($twig) {\n $function = new Twig_SimpleFunction('enqueue_script', function ($handle) {\n // register it elsewhere\n wp_enqueue_script( $handle);\n });\n $twig->addFunction($function);\n\n $function = new Twig_SimpleFunction('enqueue_style', function ($handle) {\n // register it elsewhere\n wp_enqueue_style( $handle);\n });\n $twig->addFunction($function);\n\n return $twig;\n }", "public function process(ContainerBuilder $container)\n {\n $bundles = $container->getParameter('kernel.bundles');\n\n if (!isset($bundles['TwigBundle'])) {\n return;\n }\n\n $param = $container->getParameter('twig.form.resources');\n\n if (!is_array($param)) {\n $param = [];\n }\n\n $container->setParameter('twig.form.resources', $param);\n\n $twigDefinition = $container->getDefinition('twig');\n\n $twigDefinition->addMethodCall(\n 'addGlobal',\n [\n 'admin_lte_context',\n new Reference('admin_lte_theme.context_helper'),\n ]\n );\n }", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( new Twig_SimpleFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n\t\treturn $twig;\n\t}", "public function filter_timber_twig_add_basic_filters( $twig ) {\n $function_names = [\n // PHP Functions\n 'addslashes', // http://php.net/manual/en/function.addslashes.php\n 'nl2br', // http://php.net/manual/en/function.nl2br.php\n\n // WordPress functions\n 'antispambot', // https://developer.wordpress.org/reference/functions/antispambot/\n 'esc_attr', // https://developer.wordpress.org/reference/functions/esc_attr/\n 'esc_html', // https://developer.wordpress.org/reference/functions/esc_html/\n 'esc_url', // https://developer.wordpress.org/reference/functions/esc_url/\n 'esc_js', // https://developer.wordpress.org/reference/functions/esc_js/\n 'esc_textarea', // https://developer.wordpress.org/reference/functions/esc_textarea/\n 'sanitize_email', // https://developer.wordpress.org/reference/functions/sanitize_email/\n ];\n foreach ( $function_names as $func ) {\n if ( function_exists( $func ) ) {\n $twig->addFilter( new \\Twig_SimpleFilter( $func, $func ) );\n }\n }\n return $twig;\n }", "public function initTwig(\\ContaoTwigInitializeEvent $event)\n\t{\n\t\t$contaoTwig = $event->getContaoTwig();\n\t\t$environment = $contaoTwig->getEnvironment();\n\n\t\t$environment->addExtension(new DcGeneralExtension());\n\t}", "function render( $template_name ) {\n\tglobal $context;\n\tTimber::render( 'resources/views/components/' . $template_name . '.twig', $context );\n\t$context['fields'] = [];\n}", "public function pageInscription(){\n\n $token = bin2hex(random_bytes(32));\n $_SESSION['token'] = $token;\n return $this->twig->render('User/inscription.html.twig',[\n 'inscrit'=>1\n ,'token' => $token\n ]);\n\n }", "public function onTwigSiteVariables() {\n if ($this->grav['page']->template() == 'proposal') {\n $this->grav['twig']->twig_vars['proposal'] = $this->fetchProposal();\n $this->grav['twig']->twig_vars['currency_symbol'] = $this->getSymbolOfCurrencyCode($this->config->get('plugins.proposal.stripe_currency'));\n }\n }", "public function render(): string\n {\n parent::enqueue();\n $json = $this->jsonMain();\n return twig_render('page_main', $json);\n }", "protected function addTemplateFunctionConfigs()\n {\n // TODO: add twig template function configs\n }", "public function getTwig()\n {\n return $this->twig;\n }", "public function getTwig()\n {\n return $this->twig;\n }", "public function handle($context, $local)\n { \n $u = R::load('user', $context->user()->id);\n $local->addval('logs', $u->with('Order by lastedit DESC')->ownLog);\n return 'logs.twig';\n }", "public function getTwig()\n {\n return TemplateHelper::getRaw($this->_getHtml());\n }", "public function render()\n {\n // Pass messages by reference, as all messages are created after this function call\n $data = [ \"messages\" => &$this->messages ];\n $this->di->view->add($this->template, $data, $this->region);\n }", "public function renderer(array $context = []): Closure;", "public function provideTemplateTwigObjects(FilterControllerEvent $event)\n { $repository = $this->doctrine->getRepository('EMSCoreBundle:ContentType');\n $contentTypes = $repository->findBy([\n 'deleted' => false,\n// 'rootContentType' => true,\n ], [\n 'orderKey' => 'ASC'\n ]);\n\n $this->twig->addGlobal('contentTypes', $contentTypes);\n \n $envRepository = $this->doctrine->getRepository('EMSCoreBundle:Environment');\n $contentTypes = $envRepository->findBy([\n 'inDefaultSearch' => true,\n ]);\n \n $defaultEnvironments = [];\n foreach ($contentTypes as $contentType) {\n $defaultEnvironments[] = $contentType->getName();\n }\n\n $this->twig->addGlobal('defaultEnvironments', $defaultEnvironments);\n }", "private function get_twig() {\n\t\tif( null == $this->twig ) {\n\n\t\t\t$gui_base = Toolset_Gui_Base::get_instance();\n\n\t\t\t$this->twig = $gui_base->create_twig_environment(\n\t\t\t\tarray( 'troubleshooting' => TOOLSET_COMMON_PATH . '/debug/' ),\n\t\t\t\ttrue,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t}\n\t\treturn $this->twig;\n\t}", "public function viewHelper($context, $name = null)\n {\n //var_dump();\n //$name = 'end_body';\n //var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS ));\n if ($name !== null && isset($context['this'])) {\n echo $this->call($context['this'], Inflector::variablize($name));\n }\n }", "public function render()\n {\n return <<<'blade'\n<thead {{$attributes->merge($attrs)}}>{{$slot}}</thead>\nblade;\n }", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "public function get_html() {\n\t\treturn wp_json_encode( $this->context->to_array(), JSON_PRETTY_PRINT );\n\t}", "public static function render( $context ) {\n\t\t\tob_start();\n\t\t\t?>\n\n<div class=\"menu\">\n\t<div class=\"menu-header\">\n\t\t<?= $context['heading'] ?>\n\t</div>\n\t<ul class=\"list-group menu-right list-unstyled\">\n\t\t<?php \n\t\t\t\t\tforeach ( (array) $context['menu_items'] as $key => $menu_item ) {\n\t\t\t\t\t\t$title = $menu_item->title;\n\t\t\t\t\t\t$url = SDES_Static::url_ensure_prefix( $menu_item->url );\n\t\t\t\t\t\t//removed as of new theme 8/31/2017\n\t\t\t\t\t\t//$class_names = SDES_Static::Get_ClassNames( $menu_item, 'nav_menu_css_class' );\n\t\t\t\t\t?>\n\t\t<li><a href=\"<?= $url ?>\" class=\"list-group-item\"><?= $title ?></a></li>\n\t\t<?php } ?>\n\t</ul>\n</div>\n\n<?php\n\t\t\treturn ob_get_clean();\n\t\t}", "protected function registerTwigEnvironment() {\n $container = $this->app;\n\n // Twig Filesystem loader.\n $container->singleton( 'twig.loader',\n function () {\n return new \\Twig_Loader_Filesystem( DIR_ROOT );\n } );\n\n // Twig\n $container->singleton( 'twig',\n function ( $container ) {\n return new \\Twig_Environment( $container['twig.loader'], [\n 'auto_reload' => true,\n 'cache' => $container['path.cache'] . 'Twig',\n 'autoescape' => (bool) Configure::read( 'twig.autoescape' ),\n ] );\n } );\n\n // Add the dump Twig extension.\n $container['twig']->addExtension( new \\Twig_Extension_Debug() );\n\n // Check if debug constant exists and set to true.\n if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n $container['twig']->enableDebug();\n }\n\n // Provides WordPress functions and more to Twig templates.\n $container['twig']->addExtension( new SlothTwigExtension( $container ) );\n }", "public function compile(Twig_Compiler $compiler);", "function twigRender($template_name, $data, $options) {\n $loader = new \\Twig_Loader_Filesystem(TERMINUS_ROOT . '/templates');\n $twig = new \\Twig_Environment($loader);\n $rendered_template = $twig->render(\n $template_name,\n array(\n 'data' => $data,\n 'template_name' => $template_name,\n 'options' => $options,\n )\n );\n return $rendered_template;\n}", "public function compile(\\Twig_Compiler $compiler)\n {\n $compiler\n ->addDebugInfo($this)\n ->write(\"echo \\$this->env->getExtension('foliofarm')->renderJS();\\n\")\n ;\n }", "public function render() {\n\n\t\t$context = $this->options;\n\t\t$context = $this->load($context);\n\n\t\textract($context);\n\n\t\tinclude __DIR__ . '/../views/' . $this->template();\n\t}", "public function render($module, $template, $data = false)\n\t{\n\t\t$twig = new Twig_Environment(new Twig_Loader_Filesystem(MOD_DIR . $module . '/tmpl'), unserialize(CACHE));\n\t\tif ($_SESSION['debug'])\n\t\t{\n\t\t\t$twig->addExtension(new Twig_Extension_Debug());\n\t\t}\n\t\t\n\t\t$data['tr'] = new tr();\n\t\t$data['uid'] = uniqid();\n\t\t \n\t\techo $twig->render($template . '.twig', $data );\n\t}", "protected function compile()\n\t{\n\n\t\t$this->Template->tweetcontainer = $this->html;\n\n\t}", "public function sobre()\n\t\t{\n\t\t\t$loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n\t\t\t$twig = new \\Twig\\Environment($loader, [\n\t\t\t 'cache' => 'app/cache',\n\t\t\t 'auto_reload' => true\n\t\t\t]);\n\t\t\t$template = $twig->load('Sobre-Nós.html');\n\t\t\t$parametros = array();\n\n\t\t\t#URL QUE ESTÁ NAS VIEWS\n\t\t\t$parametros['url'] = \"http://radiocampusapi.com.br/\";\n\t\t\n\t\t\t$conteudo = $template->render($parametros);\n\t\t\techo $conteudo;\n\t\t}", "protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }", "function template_init( $request ) {\n\t\tob_start();\n\t\t$request->module_data = function_exists( 'module_init' ) ? (object) module_init( $request ) : new stdClass;\n\t\t$request->module_data->menu = ob_get_clean();\n}", "public function initRendering()\n {\n $this\n ->register(new Provider\\TwigServiceProvider())\n ->register(new Provider\\RenderServiceProvider())\n ->register(new Silex\\Provider\\HttpCacheServiceProvider())\n ;\n $this['http_cache.cache_dir'] = function () {\n return $this['path_resolver']->resolve('%cache%/' . $this['environment'] . '/http');\n };\n $this['http_cache.options'] = function () {\n return $this['config']->get('general/performance/http_cache/options', []);\n };\n }", "public function atencion(Request $request, Response $response, $args)\n{\n //Variables\n $datin=Array();\n /*validando los argumentos que recibimos*/\n if(isset($args['idPadre'])) $idPadre = $args['idPadre'];\n if(isset($args['idContenido'])) $idContenido = $args['idContenido'];\n if(isset($args['idHijo'])) $idHijo = $args['idHijo'];\n \n $servicio=\"atencion\";\n $tituloservicio=\"ATENCIÓN AL CIUDADANO\";\n $datin=MunlimaControlador::plantillaUno($args,$servicio,$tituloservicio);\n\n $this->view->render($response, \"weblima/extras.twig\", $datin);\n return $response;\n}", "public function registerHooks(Context $context): void\n {\n add_action('get_footer', function(){\n $this->plugin->renderTemplate(['template','file']);\n });\n }", "public function addToTwig($twig)\n {\n /* this is where you can add your own functions to twig */\n $twig->addExtension(new Twig_Extension_StringLoader());\n /**\n * Deprecated: Twig_Filter_Function, use Twig_SimpleFilter\n * http://twig.sensiolabs.org/doc/deprecated.html#filters\n * $twig->addFilter( 'whatever', new Twig_Filter_Function( 'whatever' ) );\n */\n $twig->addFilter('format_for_title', new Twig_SimpleFilter('format_for_title', array($this, 'titleFilter')));\n $twig->addFilter('slugify', new Twig_SimpleFilter('slugify', array($this, 'slugify')));\n $twig->addFilter('mdfive', new Twig_SimpleFilter('mdfive', array($this, 'mdfive')));\n $twig->addFilter('str_to_bool', new Twig_SimpleFilter('str_to_bool', array($this, 'strToBool')));\n $twig->addFilter(\n 'auto_version_path',\n new Twig_SimpleFilter('auto_version_path', array($this, 'autoVersionFilter'))\n );\n return $twig;\n }", "public function exo01()\n {\n //je declare 2 variables\n $display = true;\n $vin = 'a boire avec moderation';\n\n// je compile la page exo01.html.twig\n return $this->render(\"exo01.html.twig\",\n [\n// je cree deux variable twig a afficher dans ma vue\n 'display'=>$display,\n 'vin'=>$vin\n ]\n );\n\n }", "public function run ()\n\t{\n\t\t$dump = template::dump ();\n\n\t\t$head = '';\n\t\tforeach ( $dump ['css'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/css.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\tforeach ( $dump ['js'] as $file )\n\t\t{\n\t\t\t$head .= $this->twig->render ( 'system/html/web/snippets/js.twig', [ 'file' => $file, 'defer' => substr ( $file, 0, 2 ) == '//' ] );\n\t\t}\n\n\t\t$body = '';\n\t\tforeach ( $dump ['templates'] as $template )\n\t\t{\n\t\t\t$body .= $this->twig->render ( $template ['path'], $template ['environment'] );\n\t\t}\n\n\t\t// We do not use die incase some modules need to run after the layout have been generated\n\t\techo $this->twig->render ('system/html/web/base.twig', [\n\t\t\t'head' => $head,\n\t\t\t'body' => $body\n\t\t] );\n\t}" ]
[ "0.71516156", "0.6657071", "0.6446465", "0.61592346", "0.5986428", "0.5968939", "0.5948509", "0.59355277", "0.59317636", "0.5925936", "0.5914216", "0.58980596", "0.58730865", "0.58574724", "0.57571906", "0.57571906", "0.57571906", "0.5729267", "0.5728651", "0.57201827", "0.5670737", "0.56522727", "0.5648317", "0.56471133", "0.5604513", "0.5571126", "0.556263", "0.5555461", "0.5548967", "0.5532049", "0.5529401", "0.5525105", "0.55137074", "0.5504747", "0.5485107", "0.5484649", "0.54728544", "0.54703325", "0.5441013", "0.5432141", "0.5432141", "0.5419167", "0.53896487", "0.538668", "0.5368776", "0.53657854", "0.5338661", "0.5329715", "0.5312323", "0.5306976", "0.5297739", "0.528749", "0.52872205", "0.5268131", "0.5264206", "0.5258837", "0.5256127", "0.5243251", "0.5238063", "0.5237143", "0.5236945", "0.5232558", "0.52309614", "0.5224231", "0.5223286", "0.522145", "0.5218894", "0.5217656", "0.5211657", "0.520948", "0.5199564", "0.51969135", "0.5196161", "0.5196161", "0.51910645", "0.51586056", "0.5158359", "0.51484275", "0.51471996", "0.5141793", "0.5129174", "0.51161337", "0.51143587", "0.51112455", "0.50869507", "0.5069417", "0.50689244", "0.50584036", "0.5058231", "0.505671", "0.5054266", "0.50514305", "0.5040834", "0.50386584", "0.5036758", "0.5035062", "0.50325465", "0.5031508", "0.50297093", "0.5017309", "0.5010585" ]
0.0
-1
Twig filters and functions
public function addToTwig($twig) { /* this is where you can add your own functions to twig */ $twig->addExtension(new Twig_Extension_StringLoader()); /** * Deprecated: Twig_Filter_Function, use Twig_SimpleFilter * http://twig.sensiolabs.org/doc/deprecated.html#filters * $twig->addFilter( 'whatever', new Twig_Filter_Function( 'whatever' ) ); */ $twig->addFilter('format_for_title', new Twig_SimpleFilter('format_for_title', array($this, 'titleFilter'))); $twig->addFilter('slugify', new Twig_SimpleFilter('slugify', array($this, 'slugify'))); $twig->addFilter('mdfive', new Twig_SimpleFilter('mdfive', array($this, 'mdfive'))); $twig->addFilter('str_to_bool', new Twig_SimpleFilter('str_to_bool', array($this, 'strToBool'))); $twig->addFilter( 'auto_version_path', new Twig_SimpleFilter('auto_version_path', array($this, 'autoVersionFilter')) ); return $twig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twig_raw_filter($string)\n{\n return $string;\n}", "protected function getTwigFilters()\n\t{\n\t\t$filters = [];\n\n\t\t// rex_i18n::translate\n\t\t$filters[] = new Twig_SimpleFilter('translate', function ($string) {\n \t\treturn rex_i18n::translate($string);\n\t\t});\n\n\t\t// rex_i18n::msg\n\t\t$filters[] = new Twig_SimpleFilter('msg', function ($string, array $arguments = []) {\n\t\t\treturn call_user_func_array(array('rex_i18n', 'msg'), array_merge(array($string), $arguments));\n\t\t}, array('is_variadic' => true));\n\n\t\t// any rexXXX::getYYY() method\n\t\t$filters[] = new Twig_SimpleFilter('get*', function ($name, $class = null) {\n\t\t\t$method = 'get' . $name;\n\n\t\t\tif(is_object($class) && substr(get_class($class), 0, 3) == 'rex')\n\t\t\t{\n\t\t\t\tif(method_exists($class, $method))\n\t\t\t\t{\n\t\t\t\t\t$arguments = func_get_args() > 2 ? array_slice(func_get_args(), 2) : [];\n\n\t\t\t\t\treturn call_user_func_array(array($class, $method), $arguments);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\t// any rexXXX::hasYYY() method\n\t\t$filters[] = new Twig_SimpleFilter('has*', function ($name, $class = null) {\n\t\t\t$method = 'has' . $name;\n\n\t\t\tif(is_object($class) && substr(get_class($class), 0, 3) == 'rex')\n\t\t\t{\n\t\t\t\tif(method_exists($class, $method))\n\t\t\t\t{\n\t\t\t\t\t$arguments = func_get_args() > 2 ? array_slice(func_get_args(), 2) : [];\n\n\t\t\t\t\treturn call_user_func_array(array($class, $method), $arguments);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\treturn array_merge($filters, $this->twig_filter);\n\t}", "private function addTwigFunctions() : void {\n\t\t$msgFunc = new Twig_SimpleFunction( 'msg', function ( $key, $params = [] ) {\n\t\t\t$params = is_array( $params ) ? $params : [];\n\t\t\treturn $this->i18n->msg(\n\t\t\t\t$key, [ 'domain' => 'popular-pages', 'variables' => $params ]\n\t\t\t);\n\t\t} );\n\t\t$this->twig->addFunction( $msgFunc );\n\n\t\t// Fetching assessments info, case-insensitive.\n\t\t$assessmentFunc = new Twig_SimpleFunction(\n\t\t\t'assessments', function (\n\t\t\t\tstring $type, string $value\n\t\t\t) {\n\t\t\t\t$dataset = $this->api->getAssessmentConfig()[$type];\n\t\t\t\tforeach ( $dataset as $key => $values ) {\n\t\t\t\t\tif ( strtolower( $value ) === strtolower( $key ) ) {\n\t\t\t\t\t\treturn $values;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $dataset['Unknown'];\n\t\t\t} );\n\t\t$this->twig->addFunction( $assessmentFunc );\n\n\t\t// Add ucfirst() (Twig's capitalize() will make the other chars lowercase).\n\t\t$ucfirstFunc = new Twig_SimpleFilter( 'ucfirst', function ( string $value ) {\n\t\t\treturn ucfirst( $value );\n\t\t} );\n\t\t$this->twig->addFilter( $ucfirstFunc );\n\t}", "public function filter_timber_twig_add_basic_filters( $twig ) {\n $function_names = [\n // PHP Functions\n 'addslashes', // http://php.net/manual/en/function.addslashes.php\n 'nl2br', // http://php.net/manual/en/function.nl2br.php\n\n // WordPress functions\n 'antispambot', // https://developer.wordpress.org/reference/functions/antispambot/\n 'esc_attr', // https://developer.wordpress.org/reference/functions/esc_attr/\n 'esc_html', // https://developer.wordpress.org/reference/functions/esc_html/\n 'esc_url', // https://developer.wordpress.org/reference/functions/esc_url/\n 'esc_js', // https://developer.wordpress.org/reference/functions/esc_js/\n 'esc_textarea', // https://developer.wordpress.org/reference/functions/esc_textarea/\n 'sanitize_email', // https://developer.wordpress.org/reference/functions/sanitize_email/\n ];\n foreach ( $function_names as $func ) {\n if ( function_exists( $func ) ) {\n $twig->addFilter( new \\Twig_SimpleFilter( $func, $func ) );\n }\n }\n return $twig;\n }", "function twig_safe_filter($string)\n{\n return $string;\n}", "public function getFilters()\r\n {\r\n\r\n return array(new \\Twig_SimpleFilter('montantTva', array($this, 'montantTva')));\r\n }", "private function setup_filters() {\n add_filter( 'timber/twig', function( $twig ) {\n\n // ped_icon()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'icon',\n [ __CLASS__, 'get_icon' ]\n ) );\n\n // ped_logo()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'logo',\n [ __CLASS__, 'get_logo' ]\n ) );\n\n return $twig;\n }, 99 );\n }", "public function getFilters()\n {\n return array(\n 'shortenUrl' => new \\Twig_SimpleFilter('shorten_url', 'shortenUrl'),\n );\n }", "function add_to_twig( $twig ) {\n\t\t// $twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t// $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "public function getFilters()\n {\n return array(\n 'sortable' => new \\Twig_Filter_Method($this, 'sortable', array('is_safe' => array('html'))),\n 'paginate' => new \\Twig_Filter_Method($this, 'paginate', array('is_safe' => array('html')))\n );\n }", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig($twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t// $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\treturn $twig;\n\t}", "public function getFilters()\n\t{\n\t\treturn array(\n\t\t\tnew \\Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),\n\t\t\t// @deprecated 3.2.0 Uses twig's JS escape method instead of addslashes\n\t\t\tnew \\Twig_SimpleFilter('addslashes', 'addslashes'),\n\t\t);\n\t}", "public function getFilters()\n {\n $filters = array(\n // formatting filters\n new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('format', 'sprintf'),\n new Twig_SimpleFilter('replace', 'strtr'),\n new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('abs', 'abs'),\n // encoding\n new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'),\n new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'),\n new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'),\n // string filters\n new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('upper', 'strtoupper'),\n new Twig_SimpleFilter('lower', 'strtolower'),\n new Twig_SimpleFilter('striptags', 'strip_tags'),\n new Twig_SimpleFilter('trim', 'trim'),\n new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),\n // array helpers\n new Twig_SimpleFilter('join', 'twig_join_filter'),\n new Twig_SimpleFilter('split', 'twig_split_filter'),\n new Twig_SimpleFilter('sort', 'twig_sort_filter'),\n new Twig_SimpleFilter('merge', 'twig_array_merge'),\n new Twig_SimpleFilter('batch', 'twig_array_batch'),\n // string/array filters\n new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)),\n new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)),\n new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)),\n // iteration and runtime\n new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),\n new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'),\n // escaping\n new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n );\n if (function_exists('mb_get_info')) {\n $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true));\n $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true));\n }\n return $filters;\n }", "public function getFilters()\r\n {\r\n return array(\r\n new \\Twig_SimpleFilter('sha1', array($this, 'sha1Filter')),\r\n );\r\n }", "public function setFilters()\n {\n if (class_exists('Twig_SimpleFilter')) {\n $class = 'Twig_SimpleFilter';\n } else {\n $class = 'Twig\\TwigFilter';\n }\n\n $filter_merge_str = new $class('merge_str', function ($attrs, array $options = array()) {\n $key = $options[0];\n $value = $options[1];\n\n if (array_key_exists($key, $attrs)) {\n $attrs[$key] = implode(' ', [$value, $attrs[$key]]);\n } else {\n $attrs[$key] = $value;\n }\n\n return $attrs;\n }, array('is_variadic' => true));\n\n $this->twig->addFilter($filter_merge_str);\n }", "public function getFilters()\n {\n return array(\n 'safe' => new Twig_Filter_Function('twig_safe_filter', array('is_escaper' => true)),\n );\n }", "public function getFilters()\n {\n return array_merge(parent::getFilters(), array(\n 'date' => new \\Twig_Filter_Function('ionic_date'),\n 'relativedate' => new \\Twig_Filter_Function('ionic_date_rel'),\n 'specialdate' => new \\Twig_Filter_Function('ionic_date_special'),\n 'url' => new \\Twig_Filter_Function('url'),\n 'nl2br_noescape' => new \\Twig_Filter_Function('nl2br'),\n 'limit' => new \\Twig_Filter_Function('Str::limit'),\n 'md5' => new \\Twig_Filter_Function('md5'),\n 'addslashes' => new \\Twig_Filter_Function('addslashes')\n ));\n }", "public function getFilters() {\n return array(\n new \\Twig_SimpleFilter(\"format_bytes\", array($this, \"formatBytes\"))\n );\n }", "public function filter_timber_twig_add_functions( $twig ) {\n // Function to check if doing email and alternate strings\n $twig->addFunction( new \\Twig_SimpleFunction( 'if_email', function( $email_str, $standard_str ) {\n if ( $this->is_email() ) {\n return $email_str;\n }\n return $standard_str;\n } ) );\n\n // Get the current Unix epoch time in milliseconds\n $twig->addFunction( new \\Twig_SimpleFunction( 'now', function() {\n return round( microtime( true ) * 1000 );\n } ) );\n\n // Add WordPress' checked() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'checked', function( $checked, $current = true ) {\n return checked( $checked, $current );\n } ) );\n\n // Add WordPress' selected() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'selected', function( $selected, $current = true ) {\n return selected( $selected, $current );\n } ) );\n\n // Add WordPress' disabled() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'disabled', function( $disabled, $current = true ) {\n return disabled( $disabled, $current );\n } ) );\n\n return $twig;\n }", "public function getFilters()\n {\n return array(\n new \\Twig_SimpleFilter('ellipse', array($this, 'getEllipse')),\n );\n }", "public function getFilters()\n {\n return array(\n new \\Twig_SimpleFilter('aliasToLabel', array($this, 'aliasToLabel')),\n );\n }", "public function getFilters(): array\n {\n return [\n new \\Twig_SimpleFilter('extract', [$this, 'extract']),\n ];\n }", "private static function addFunctions()\n {\n \tself::$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) {\n return sprintf('%s', ltrim($asset, '/'));\n\t\t}));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('getBaseUrl', function () {\n return getBaseUrl();\n }));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('csrf_token', function () {\n return csrf_token();\n }));\n }", "public function getFilters()\n {\n return array(\n new Twig_SimpleFilter('raw', 'twig_raw_filter', array('is_safe' => array('all'))),\n );\n }", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('iconFile', [$this, 'iconFile'], ['is_safe' => ['html']])\n ];\n }", "public function getFilters()\n\t{\n\t\treturn [\n\t\t\tnew \\Twig_SimpleFilter('basename', 'basename'),\n\t\t\tnew \\Twig_SimpleFilter('get_class', 'get_class'),\n\t\t\tnew \\Twig_SimpleFilter('json_decode', 'json_decode'),\n\t\t\tnew \\Twig_SimpleFilter('_', 'echo'),\n\t\t];\n\t}", "public function getFilters()\r\n {\r\n return array(\r\n 'localizeddate' => new Twig_Filter_Function('twig_localized_date_filter', array('needs_environment' => true)),\r\n );\r\n }", "public function getFilters()\n {\n return array(\n new Twig_SimpleFilter('formatDate', array($this, 'formatDate'), array('rawDate', 'format')),\n new Twig_SimpleFilter('russianPluralForm', array($this, 'russianPluralForm'), array('string', 'count', 'delimiter')),\n );\n }", "public function getFilters()\n {\n $filters = [];\n\n $filters[] = new \\Twig_Filter('date_format', [$this, 'filterDateFormat']);\n $filters[] = new \\Twig_Filter('truncate', 'b_truncate');\n $filters[] = new \\Twig_Filter('nl2p', 'b_nl2p', ['is_safe' => ['html']]);\n $filters[] = new \\Twig_Filter('human_file_size', 'b_human_file_size');\n $filters[] = new \\Twig_Filter('json_decode', 'json_decode');\n\n return $filters;\n }", "function twig_urlencode_filter($url, $raw = false)\n{\n if (is_array($url)) {\n return http_build_query($url, '', '&');\n }\n if ($raw) {\n return rawurlencode($url);\n }\n return urlencode($url);\n}", "public function getFilters() {\n\t\treturn array(\n\t\t\tnew Twig_SimpleFilter('trans', '__'),\n\t\t\tnew Twig_SimpleFilter('c', '__c'),\n\t\t\tnew Twig_SimpleFilter('d', '__d'),\n\t\t\tnew Twig_SimpleFilter('dc', '__dc'),\n\t\t\tnew Twig_SimpleFilter('n', '__n')\n\t\t);\n\t}", "private function filter($name, $method = null): Twig_SimpleFilter\n\t{\n\t\treturn $this->extension(Twig_SimpleFilter::class, $name, $method);\n\t}", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( new Twig_SimpleFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n\t\treturn $twig;\n\t}", "public function twig_filter_persian()\n\t{\n\t\treturn new \\Twig_SimpleFilter('persian', function ($_number)\n\t\t{\n\t\t\treturn \\lib\\utility\\human::number($_number, $this->data->site['currentlang']);\n\t\t});\n\t}", "public function twig_filter_tdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('tdate', function ($_string, $_format =\"Y/m/d\", $_convert = true)\n\t\t{\n\t\t\t$result = $_string;\n\t\t\tif($this->data->site['currentlang'] == 'fa')\n\t\t\t{\n\t\t\t\t$result = \\lib\\utility\\jdate::date($_format, $_string, $_convert);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = date($_format, strtotime($_string));\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t});\n\t}", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('country', [$this, 'getCountry']),\n new \\Twig_SimpleFilter('language', [$this, 'getLanguage']),\n new \\Twig_SimpleFilter('locale_date', [$this, 'getLocaleDate']),\n ];\n }", "function add_to_twig($twig) {\n $twig->addExtension(new \\Twig_Extension_StringLoader());\n $twig->addFunction(new \\Twig_SimpleFunction('script', 'CodekippleWPTheme\\Timber\\Site\\script'));\n $twig->addFunction(new \\Twig_SimpleFunction('css', 'CodekippleWPTheme\\Timber\\Site\\css'));\n $twig->addFilter('body_class', new \\Twig_Filter_Function('CodekippleWPTheme\\Timber\\Site\\body_class'));\n\n return $twig;\n }", "public function getFilters () {\n $filters = array( 'word_limiter' => new Twig_Filter_Function( 'twig_word_limiter_filter', array( 'needs_environment' => true ) ) );\n\n return $filters;\n }", "function test_function_filter() {\n\t\t$var = new LiquidVariable('var | test_function_filter');\n\t\t$this->context->set('var', 1000);\n\t\t$this->context->add_filters('test_function_filter');\n\t\t$this->assertIdentical('worked', $var->render($this->context));\t\t\n\t\t\n\t}", "private function filters() {\n\n\n\t}", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('getBarMsgs', [$this, 'getRedisMsgs']),\n new \\Twig_SimpleFilter('json_decode', [$this, 'jsonDecode']),\n new \\Twig_SimpleFilter('routeExists', [$this, 'routeExists'])\n ];\n }", "public function getFilters() {\n\n return [\n new TwigFilter('trans_items', [$this, 'translationItems']),\n ];\n }", "public function twig_filter_sdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('sdate', function ($_string, $_max =\"day\", $_format =\"Y/m/d\")\n\t\t{\n\t\t\treturn \\lib\\utility::humanTiming($_string, $_max, $_format, $this->data->site['currentlang']);\n\t\t});\n\t}", "public function getFilters()\n {\n $filters = array(\n new Twig_SimpleFilter('age', 'twig_age_filter'),\n );\n\n return $filters;\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n\n\t\t$function = new Twig_SimpleFunction('get_post_format', function($id) {\n\t\t\treturn get_post_format($id);\n\t\t});\n\t\t$twig->addFunction($function);\n\n\t\t$get_theme_mod = new Twig_SimpleFunction('get_theme_mod', function($id) {\n\t\t\treturn get_theme_mod($id);\n\t\t});\n\t\t$twig->addFunction($get_theme_mod);\n\n $gustav_comment_form = new Twig_SimpleFunction('gustav_comment_form', function($id) {\n $args = array(\n 'fields' => array(\n 'author' => '<div class=\"form-group\"><label for=\"author\">' . __( 'Name' ) . '</label><input id=\"author\" class=\"form-control\" name=\"author\" type=\"text\" value=\"\" /></div>',\n 'email' => '<div class=\"form-group\"><label for=\"email\">' . __( 'Email' ) . '</label> ' .\n \t '<input id=\"email\" class=\"form-control\" name=\"email\" type=\"text\" value=\"\" /></div>',\n \t 'url' => '<div class=\"form-group\"><label for=\"url\">' . __( 'Website' ) . '</label>' .\n \t '<input id=\"url\" class=\"form-control\" name=\"url\" type=\"text\" value=\"\" /></div>',\n ),\n 'comment_field' => '<div class=\"form-group\"><label for=\"comment\">' . _x( 'Comment', 'noun' ) . '</label><textarea id=\"comment\" class=\"form-control\" name=\"comment\" aria-required=\"true\"></textarea></p>',\n 'class_submit' => 'btn btn-default',\n 'title_reply' => null\n );\n\n ob_start();\n comment_form($args, $id);\n $output = ob_get_contents();\n ob_end_clean();\n\n return $output;\n });\n $twig->addFunction($gustav_comment_form);\n\n return $twig;\n }", "public function getFilters()\n {\n return [\n 'setting' => new TwigFilter(\n 'setting',\n [$this, 'settingFilter'],\n []\n ),\n ];\n }", "function minorite_exposed_filters($variables) {\n return drupal_render_children($variables['form']);\n}", "public function twig_filter_fcache()\n\t{\n\t\treturn new \\Twig_SimpleFilter('fcache', function ($string)\n\t\t{\n\t\t\tif(file_exists($string))\n\t\t\t{\n\t\t\t\treturn $string.'?'.filemtime($string);\n\t\t\t}\n\t\t});\n\t}", "public function provideTemplateTwigObjects(FilterControllerEvent $event)\n { $repository = $this->doctrine->getRepository('EMSCoreBundle:ContentType');\n $contentTypes = $repository->findBy([\n 'deleted' => false,\n// 'rootContentType' => true,\n ], [\n 'orderKey' => 'ASC'\n ]);\n\n $this->twig->addGlobal('contentTypes', $contentTypes);\n \n $envRepository = $this->doctrine->getRepository('EMSCoreBundle:Environment');\n $contentTypes = $envRepository->findBy([\n 'inDefaultSearch' => true,\n ]);\n \n $defaultEnvironments = [];\n foreach ($contentTypes as $contentType) {\n $defaultEnvironments[] = $contentType->getName();\n }\n\n $this->twig->addGlobal('defaultEnvironments', $defaultEnvironments);\n }", "public function getFilters() {\n\t\treturn array(\n\t\t\t'size' => new Twig_Filter_Function('Cake_Number_Filters::size'),\n\t\t\t'pct' => new Twig_Filter_Function('Cake_Number_Filters::percentage'),\n\t\t\t'curr' => new Twig_Filter_Function('Cake_Number_Filters::currency'),\n\t\t\t'p' => new Twig_Filter_Function('Cake_Number_Filters::precision'),\n\t\t);\n\t}", "public function getFunctions()\n {\n return array(\n new \\Twig_SimpleFunction('renderPaginator', array(\n $this,\n 'renderPaginator'\n ), array(\n 'is_safe' => array(\n 'html'\n ),\n 'needs_environment' => true\n )),\n new \\Twig_SimpleFunction('renderPaginatorLimit', array(\n $this,\n 'renderPaginatorLimit'\n ), array(\n 'is_safe' => array(\n 'html'\n ),\n 'needs_environment' => true\n ))\n );\n }", "public function registerMarkupTags() {\n return [\n 'filters' => [\n 'formatMoney' => ['Elearning\\System\\Classes\\Helper', 'formatMoney'],\n 'formatHtml' => ['Elearning\\System\\Classes\\Helper', 'formatHtml'],\n 'generateRating' => ['Elearning\\System\\Classes\\Helper', 'generateRating'],\n 'formatDate' => ['Elearning\\System\\Classes\\Helper', 'formatDate'],\n 'formatProvince' => ['Elearning\\System\\Classes\\Helper', 'formatProvince'],\n 'formatDistrict' => ['Elearning\\System\\Classes\\Helper', 'formatDistrict'],\n 'formatDateForm' => ['Elearning\\System\\Classes\\Helper', 'formatDateForm'],\n 'checkStudentCourse' => ['Elearning\\System\\Classes\\Helper', 'checkStudentCourse'] \n ]\n ];\n }", "public function getFilters()\n {\n return [\n new TwigFilter('dump', 'dump'),\n new TwigFilter('dd', 'dd'),\n ];\n }", "public function getFilters(): array\n {\n return [\n new TwigFilter('sonata_urlsafeid', [$this, 'getUrlsafeIdentifier']),\n ];\n }", "function default_template_filter_active_name()\r\n{\r\n $template = '{foreach from=$element_list item=element}\n{if $element[\"filter\"][\"is_active\"] == 1}\n{foreach from=$element[\"filter\"][\"values_attribute\"] item=value}\r\n{if $value[\"val\"] == 1}\n{$element[\"filter\"][\"name_attribute\"]} {$value[\"name\"]}\n{/if}\n{/foreach}\r\n{/if}\n{/foreach}';\n\n\t$template = str_replace(\"\\r\\n\", \"\", $template);\r\n\t$template = str_replace(\"\\n\", \"\", $template);\n\t\r\n return $template;\r\n}", "function shortcodeFilters($atts, $content=null, $code=\"\") {\r\n\t\t\tglobal $trackthebook;\r\n\t\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->render('filter');\r\n\t\t\t$filters_code = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t\r\n\t\t\treturn $filters_code;\r\n\t\t}", "public function getFunctions()\n {\n return array(\n 'renderInfo' => new \\Twig_Function_Method($this, 'renderInfo', array(\"is_safe\" => array(\"html\"))),\n );\n }", "function twig_age_filter($birthdate)\n{\n if (!$birthdate instanceof \\DateTime) $birthdate = new \\DateTime($birthdate);\n $age = $birthdate->diff(new \\DateTime())->y;\n\n return $age;\n}", "public function getTwigFunctions()\n {\n return $this->twigFunctions;\n }", "public function render_filtered_list( $atts ) {\n $id = $atts['id'];\n $context = $this->fetch_base_config( $id, get_post( $id ) );\n $context['selector'] = 'feed' . $id;\n $context['cdp_indexes'] = cdp_get_option('cdp_indexes');\n $context['filters'] = $this->fetch_filters( $atts ); // get_post_meta( $id, 'yali_list_filters', true);\n $context['lang_key'] = get_post_meta( $id, 'yali_cb_lang_selection', true);\n $context['types'] = $this->convert_to_str( get_post_meta( $id, 'yali_list_filters_types', true) );\n $context['date_display'] = get_post_meta( $id, 'yali_filtered_list_date_display', true);\n $context = $this->fetch_btn_config( $context, $id, get_post_meta( $id ) );\n\n switch ( $context['lang_key'] ) {\n case 'en-us' :\n $context['lang_value'] = 'English';\n break;\n case 'fr-fr' :\n $context['lang_value'] = 'French';\n break;\n case 'pt-br' :\n $context['lang_value'] = 'Portuguese';\n break;\n }\n\n return Twig::render( 'content_blocks/post-filtered-list.twig', $context );\n }", "function _add_template_loader_filters()\n {\n }", "public function getFunctions()\n {\n return [\n new \\Twig_SimpleFunction(\n 'documents_folder',\n function ($path, $recursive = true) {\n $folders = new FolderModel();\n $folder = $folders->where('path',$path)->first();\n\n return ($recursive) ? view('lwv.module.documents::folder/tree', compact('folder'))->render() : view('lwv.module.documents::folder/folder', compact('folder'))->render();\n }\n , ['is_safe' => ['html']]\n ),\n new \\Twig_SimpleFunction(\n 'documents_resolutions',\n function ($path) {\n $folders = new FolderModel();\n $folder = $folders->where('path',$path)->first();\n\n return view('lwv.module.documents::resolutions/folder', compact('folder'))->render();\n }\n , ['is_safe' => ['html']]\n ),\n ];\n }", "function theme_simplenews_filter_form($variables) {\n $form = $variables['form'];\n\n $output = '<div id=\"simplenews-admin-filter\">';\n $output .= drupal_render($form['filters']);\n $output .= '</div>';\n $output .= drupal_render_children($form);\n return $output;\n}", "function genesisawesome_custom_filters( $filters ) {\n\n\t$filters['email'] = 'sanitize_email';\n\t$filters['integer'] = 'genesisawesome_intval';\n\n\treturn $filters;\n\n}", "public function getFunctions()\n {\n return array(\n 'simplethings_formextra_validation' => new \\Twig_Function_Method($this, 'getValidationConstraints', array('is_safe' => array('html'))),\n );\n }", "protected static function getFacadeAccessor() { return 'parse.twig'; }", "abstract public function filters();", "public function getCloseTagsFilter()\n {\n $name = 'close_tags';\n\n $callback = function ($input) {\n return preg_replace_callback('#<\\s*(img|br|hr)\\s*([^>]+\\s*)>#', function ($matches) {\n return sprintf('<%s %s/>', $matches[1], $matches[2]);\n }, $input);\n };\n\n return new TwigFilter($name, $callback, [\n 'is_safe' => ['html'],\n ]);\n }", "function smarty_function_value_filter($params)\n{\n \n App::uses('SmartyComponent', 'Controller/Component');\n $Smarty = new SmartyComponent(new ComponentCollection());\n\n $assignments = array('id_attribute' => $params['id_attribute']\n ,'name_attribute' => $params['name_attribute']\n ,'values_attribute' => $params['values_attribute']);\n if(isset($params['is_active']))$assignments['is_active'] = $params['is_active'];\n if(isset($params['alias_micro_template']))\n {\n $params['template'] = $params['alias_micro_template'];\n $display_template = $Smarty->load_template($params, 'value_filter');\n }\n else $display_template = $params['template'];\n $Smarty->display($display_template, $assignments);\n\n}", "public function getFunctions()\n {\n return array(\n 'snide_travinizer_github_url' => new \\Twig_Function_Method(\n $this,\n 'getUrl',\n array('is_safe'=> array('html'))\n ),\n 'snide_travinizer_github_commit_url' => new \\Twig_Function_Method(\n $this,\n 'getCommitUrl',\n array('is_safe'=> array('html'))\n )\n );\n }", "function _dotgo_filter_prepare() {\n\n}", "public function onTwigSiteVariables()\n {\n }", "public function renderFilters()\n {\n $this->timber->filter->issueDetect();\n $this->timber->filter->configLibs();\n $this->timber->security->cookieCheck();\n $this->services->Common->renderFilter(array('staff', 'admin'), '/admin/calendar');\n\n if( !($this->timber->access->checkPermission('view.calendar')) ){\n $this->timber->redirect( $this->timber->config('request_url') . '/404' );\n }\n }", "public function twig_filter_jdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('jdate', function ($_string, $_format =\"Y/m/d\", $_convert = true)\n\t\t{\n\t\t\treturn \\lib\\utility\\jdate::date($_format, $_string, $_convert);\n\t\t});\n\t}", "public function getFilters(): array {\n\n return [\n new TwigFilter(\"adminBSBButtonLink\", [$this, \"bootstrapButtonLinkFilter\"], [\"is_safe\" => [\"html\"]]),\n new TwigFilter(\"adminBSBButtonSubmit\", [$this, \"bootstrapButtonSubmitFilter\"], [\"is_safe\" => [\"html\"]]),\n ];\n }", "public function compile(Twig_Compiler $compiler);", "public function getTag()\n\t{\n\t\treturn 'filter';\n\t}", "public function getFunctions()\n {\n return [\n new \\Twig_SimpleFunction('line', [$this, 'line'], ['is_safe' => ['html']])\n ];\n }", "public function tagsfilterAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromRoute('tag', null);\n\n // Filter posts by tag\n $query = $this->entityManager->getRepository(Post::class)->findPostsByTag($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFunction('file_exists', new Twig_Function_Function('file_exists'));\n $twig->addFunction('environment', new Twig_Function_Function('get_environment'));\n return $twig;\n }", "public function filters()\n {\n return [\n \n ];\n }", "public function getFunctions()\n {\n //Function definition\n return array(\n 'tyhand_docdownloader_url' => new \\Twig_Function_Method($this, 'url', array('is_safe' => array('html')))\n );\n }", "public function registerMarkupTags()\n {\n // Check the translate plugin is installed\n if (class_exists('RainLab\\Translate\\Behaviors\\TranslatableModel')) {\n return ['filters' => [\n 'cast_to_array' => [$this, 'castToArray']\n ]];\n }\n\n return [\n 'filters' => [\n '_' => ['Lang', 'get'],\n '__' => ['Lang', 'choice'],\n 'cast_to_array' => [$this, 'castToArray']\n ]\n ];\n }", "public function getFunctions()\n\t{\n\t\treturn array(\n\t\t\tnew Twig_SimpleFunction('field_list_value', array($this, 'fieldListValue')),\n\t\t\tnew Twig_SimpleFunction('get_flash', 'Session::get_flash'),\n\t\t\tnew Twig_SimpleFunction('get_link', 'CMF::getLink'),\n new Twig_SimpleFunction('get_type', 'CMF::getType'),\n new Twig_SimpleFunction('get_slug', 'CMF::getSlug'),\n\t\t\tnew Twig_SimpleFunction('video_embed', 'CMF\\\\Field\\\\Object\\\\VideoEmbed::getEmbedCode'),\n\t\t\tnew Twig_SimpleFunction('get_route', 'Router::get'),\n\t\t\tnew Twig_SimpleFunction('get_setting', array($this, 'settings')),\n\t\t\tnew Twig_SimpleFunction('static_url', 'CMF::getStaticUrl'),\n\t\t\tnew Twig_SimpleFunction('pluralize', 'Inflector::pluralize'),\n\t\t\tnew Twig_SimpleFunction('singularize', 'Inflector::singularize'),\n\t\t\tnew Twig_SimpleFunction('ordinalize', 'Inflector::ordinalize'),\n\t\t\tnew Twig_SimpleFunction('str_repeat', 'str_repeat'),\n\t\t\tnew Twig_SimpleFunction('array_to_attr', 'array_to_attr'),\n\t\t\tnew Twig_SimpleFunction('phpinfo', 'phpinfo'),\n\t\t\tnew Twig_SimpleFunction('basename', 'basename'),\n\t\t\tnew Twig_SimpleFunction('uri', array($this, 'uri')),\n\t\t\tnew Twig_SimpleFunction('base', array($this, 'base')),\n\t\t\tnew Twig_SimpleFunction('image', 'CMF\\\\Image::getUrl'),\n\t\t\tnew Twig_SimpleFunction('crop_url', 'CMF\\\\Image::getUrl'),\n\t\t\tnew Twig_SimpleFunction('asset', 'CMF::asset'),\n\t\t\tnew Twig_SimpleFunction('link' , 'CMF::link'),\n\t\t\tnew Twig_SimpleFunction('lang_enabled', 'CMF::langEnabled'),\n\t\t\tnew Twig_SimpleFunction('language', 'CMF::lang'),\n\t\t\tnew Twig_SimpleFunction('default_language', 'CMF::defaultLang'),\n\t\t\tnew Twig_SimpleFunction('languages', 'CMF::languages'),\n\t\t\tnew Twig_SimpleFunction('languageUrls', 'CMF::languageUrls'),\n\t\t\tnew Twig_SimpleFunction('all_languages', 'Admin::languages'),\n\t\t\tnew Twig_SimpleFunction('_', 'Lang::get'),\n\t\t\tnew Twig_SimpleFunction('session_set', 'Session::set'),\n\t\t\tnew Twig_SimpleFunction('session_get', 'Session::get'),\n\t\t\tnew Twig_SimpleFunction('get_content', 'file_get_contents'),\n\t\t\tnew Twig_SimpleFunction('module_url', 'CMF::moduleUrl'),\n\t\t\tnew Twig_SimpleFunction('current_module', 'CMF::currentModule'),\n\t\t\tnew Twig_SimpleFunction('get_options', 'CMF::getOptions'),\n\t\t\tnew Twig_SimpleFunction('get_options_select', array($this, 'getOptionsSelect')),\n\t\t\tnew Twig_SimpleFunction('get_hostname', array($this, 'getHostname')),\n\t\t\tnew Twig_SimpleFunction('array_as_hidden_inputs', 'CMF::arrayAsHiddenInputs'),\n new Twig_SimpleFunction('get_class', 'get_class'),\n new Twig_SimpleFunction('is_subclass_of', 'is_subclass_of'),\n new Twig_SimpleFunction('admin_url', 'CMF::adminUrl'),\n new Twig_SimpleFunction('admin_path', 'CMF::adminPath')\n\t\t);\n\t}", "function _twig_default_filter($value, $default = '')\n{\n if (twig_test_empty($value)) {\n return $default;\n }\n return $value;\n}", "public function register_filters() {\n\n\t\t}", "public function getFunctions()\n {\n return array(\n 'page' => new Twig_Function_Method($this, 'page'),\n );\n }", "private static function _getFilter() {}", "public function getFunctions()\n {\n return array(\n 'page_url' => new \\Twig_Function_Method($this, 'url'),\n );\n }", "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}", "public function registerFilters() {\n//\t $this->addFilter('get_avatar', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterGetLinkedInAvatar'], 10, 3);\n\t $this->addFilter('CommentModel.created', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterMarkCommentWithLinkedInUserId']);\n\t $this->addFilter('pre_comment_approved', ['Chayka\\\\LinkedIn\\\\LinkedInHelper', 'filterApproveLinkedInUserComment'], 10, 2);\n\t\t/* chayka: registerFilters */\n }", "public function getFunctions()\n {\n return [\n new \\Twig_SimpleFunction('icon', [$this, 'icon'], ['is_safe' => ['html']])\n ];\n }", "public function twig_filter_readableSize()\n\t{\n\t\treturn new \\Twig_SimpleFilter('readableSize', function ($_string, $_type = 'file', $_emptyTxt = null)\n\t\t{\n\t\t\treturn \\lib\\utility\\upload::readableSize($_string, $_type, $_emptyTxt);\n\t\t});\n\t}", "public function getFunctions()\n {\n return array(\n 'logincidadao_initializeForm' => new \\Twig_Function_Method($this, 'initializeForm', array(\n 'is_safe' => array(\n 'html'\n )\n ))\n );\n }", "function search_filters(array $options = array())\n{\n return get_view()->searchFilters($options);\n}", "function register_variablefilter($smarty, $function)\n{\n $_name = (is_array($function)) ? $function[0] : $function;\n $smarty->registered_filters['variable'][$_name] = $function;\n}", "public function getFunctions()\n {\n return array(\n new \\Twig_SimpleFunction('dashboard_count_block_render', array($this, 'dashboardRender'), array(\n 'is_safe' => array('html'),\n 'needs_environment' => true\n )),\n new \\Twig_SimpleFunction('dashboard_message_block_render', array($this, 'dashboardMessageRender'), array(\n 'is_safe' => array('html'),\n 'needs_environment' => true\n )),\n );\n \n }" ]
[ "0.7266409", "0.7158364", "0.7114199", "0.7074342", "0.7071912", "0.68723786", "0.68254596", "0.6820187", "0.6811788", "0.6756551", "0.6747228", "0.6747228", "0.6747228", "0.67433894", "0.674186", "0.6719879", "0.66673166", "0.660422", "0.6603044", "0.6595181", "0.65920454", "0.6560056", "0.65474796", "0.6455595", "0.642521", "0.6384703", "0.638384", "0.6336825", "0.63288605", "0.6276819", "0.62657994", "0.6174648", "0.6135973", "0.61267656", "0.6118003", "0.60933864", "0.6077871", "0.60746884", "0.60736006", "0.6022923", "0.59621537", "0.5960545", "0.59585655", "0.5954682", "0.59462655", "0.5935292", "0.58371246", "0.5832622", "0.58251095", "0.58162475", "0.58012664", "0.58011085", "0.5790184", "0.5770164", "0.5762456", "0.57557744", "0.5724277", "0.5710222", "0.570722", "0.57060444", "0.56819975", "0.567656", "0.56754816", "0.5663491", "0.56583023", "0.56456435", "0.5611982", "0.55931664", "0.5592388", "0.558456", "0.55758905", "0.5571395", "0.55538887", "0.5534233", "0.55273795", "0.5518021", "0.55162716", "0.5502555", "0.5502337", "0.54930043", "0.5481678", "0.5478605", "0.5475775", "0.54692405", "0.5463482", "0.545711", "0.5451581", "0.5435821", "0.5425703", "0.54057395", "0.5402142", "0.5388913", "0.53750306", "0.5368005", "0.53679216", "0.53665507", "0.536527", "0.53652227", "0.53591746", "0.53513974" ]
0.61681473
32
Slugify filter for twig templates
public function slugify($string) { $slugify = new Slugify(); return $slugify->slugify($string); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twig_safe_filter($string)\n{\n return $string;\n}", "function twig_raw_filter($string)\n{\n return $string;\n}", "public function slugPattern();", "public function slug(): string;", "public function slug();", "public function slug();", "public function sluggable()\n {\n return 'title';\n }", "public function generateSlug();", "public function getTemplateSlug(): string;", "public function resluggify()\n {\n return $this->sluggify(true);\n }", "public function makeSlug () {\n\t\treturn UTF8::slugify($this->name);\n\t}", "public function getSlug();", "public function getSlug();", "public function getSlug();", "public function getSlug();", "abstract public static function slug(): string;", "public function slug($name);", "public function getFilters()\n {\n return array(\n 'shortenUrl' => new \\Twig_SimpleFilter('shorten_url', 'shortenUrl'),\n );\n }", "public function getSlug() : string\n {\n return 'template';\n }", "function slug($value){\n//the pre_quote function is just used to quote regular expressions so that it doesn't get mixed up and result in an error\n //remove all characters not in the list(that what this means when we include \"empty string\")\n $value = preg_replace('![^'.preg_quote('_').'\\pL\\pN\\s]+!u','',mb_strtolower($value));\n\n //replace underscore with a dash\n $value = preg_replace('!['.preg_quote('_').'\\s]+!u','-',$value);\n\n //remove whitespace with the trim function\n //'-' was added as an argument so that the trim function does not remove it too\n\n return trim($value, '-');\n\n}", "function acf_slugify($str = '', $glue = '-')\n{\n}", "function twig_title_string_filter(Twig_Environment $env, $string)\n {\n return ucwords(strtolower($string));\n }", "function slugify ($str) { // turn name into slug for ID\r\n\t$slug = str_replace(' ','-',strtolower($str));\r\n\treturn $slug;\t\r\n}", "static public function slugify($text) { \n # Replace non letter or digits by -\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n # Trim\n $text = trim($text, '-');\n\n # Transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n # Lowercase\n $text = strtolower($text);\n\n # Remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text)) return 'n-a';\n\n return apply_filters( 'div_sluglify', $text );\n }", "function twig_urlencode_filter($url, $raw = false)\n{\n if (is_array($url)) {\n return http_build_query($url, '', '&');\n }\n if ($raw) {\n return rawurlencode($url);\n }\n return urlencode($url);\n}", "function slugify($value)\n{\n return Stringy::slugify($value);\n}", "public function slugStrategy(): string\n {\n return 'name';\n }", "public function getName() {\n return 'Slug';\n }", "public function getSlug(){\n $slugString = sprintf(\"%s\",$this->transaction_role);\n $phalconSlugLibrary = new \\Phalcon\\Utils\\Slug();\n return $phalconSlugLibrary->generate($slugString);\n }", "public function filter($value)\n {\n return ! empty($value) ? $this->slugger->slugify($value) : null;\n }", "function as_slug_this($content) {\n\t\treturn preg_replace(\"/-$/\",\"\",preg_replace('/[^a-z0-9]+/i', \"-\", strtolower($content)));\n\t}", "function slugify($title) {\n $title = strip_tags($title);\n // Preserve escaped octets.\n $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);\n // Remove percent signs that are not part of an octet.\n $title = str_replace('%', '', $title);\n // Restore octets.\n $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);\n $title = remove_accents($title);\n if (seems_utf8($title)) {\n if (function_exists('mb_strtolower')) {\n $title = mb_strtolower($title, 'UTF-8');\n }\n $title = utf8_uri_encode($title, 200);\n }\n $title = strtolower($title);\n $title = preg_replace('/&.+?;/', '', $title); // kill entities\n $title = preg_replace('/[^%a-z0-9 _-]/', '', $title);\n $title = preg_replace('/\\s+/', '-', $title);\n $title = preg_replace('|-+|', '-', $title);\n $title = trim($title, '-');\n return $title;\n}", "public function slugs();", "public function getSlugKey()\n {\n return 'slug';\n }", "function get_sanitize_callback($slug = '')\n {\n }", "protected function generateSlugFrom()\n {\n $slugFields = static::$slugFieldsFrom;\n\n $slugSource = collect($slugFields)\n ->map(function (string $fieldName) {\n return data_get($this, $fieldName, '');\n })\n ->implode('-');\n\n return substr($slugSource, 0, 100);\n }", "public function sluggable()\n {\n return ['slug' =>\n ['source' => 'name',],\n ];\n }", "function the_slug($echo=true){\n $slug = basename(get_permalink());\n do_action('before_slug', $slug);\n $slug = apply_filters('slug_filter', $slug);\n if( $echo ) echo $slug;\n do_action('after_slug', $slug);\n return $slug;\n}", "function the_slug($echo=false){\n\t$slug = basename(get_permalink());\n\tdo_action('before_slug', $slug);\n\t$slug = apply_filters('slug_filter', $slug);\n\tif( $echo ) echo $slug;\n\tdo_action('after_slug', $slug);\n\treturn $slug;\n}", "public function toSlug() : Manipulator\n {\n $modifiedString = $this->toLower()\n ->replace(' ', '-')\n ->replace('+', '-plus')\n ->replace('#', '-sharp')\n ->removeSpecialCharacters(['-'])\n ->toString();\n\n return new static($modifiedString);\n }", "public function get_source_slug();", "public function getSlug(ContentfulEntry $contentfulEntry): string;", "function php_slug($string) \n { $slug = preg_replace('/[^a-z0-9-]+/', '-', trim(strtolower($string)));return $slug; }", "function dunkdog_template_filter( $template_path ) { \n\tif(is_search()){\n\t\treturn $template_path;\n\t}\n\n\t$type = get_post_type(); \n if ( ( $type == 'dd-player' ) || ( $type == 'dd-team' ) || ( $type == 'dd-player-ranking' ) || ($type == 'dd-team-ranking' ) ){\n if ( is_single() ) {\n \t$prefix = 'single';\n }\n if ( is_archive()){\n \t$prefix = 'archive';\n }\n if ( is_tax()){\n \t$prefix = 'taxonomy';\n\n \t// if(get_query_var('taxonomy')=='dd-conference'){\n \t// \t$type = 'dd-team';\n \t// }else{\n \t\t$type = 'dd-player'; // forcing tax to be player; no other need for team or ranking taxonomy\n \t// }\n }\n\n $template_path = dunkdog_template_function($prefix . '-' . $type, false);\n \n }\n \n if(DD_DEBUG){global $wp_query; krumo('template_path', $template_path, $prefix, $type, $wp_query);}\n\treturn $template_path;\n}", "private function slugify( $text ){\n\t\treturn sanitize_title_with_dashes( $text, '', 'save' );\n\t}", "public function makeSlug () {\n\t\tif(empty($this->slug)) {\n\t\t\t$this->slug = UTF8::slugify($this->name);\n\t\t}\n\t\treturn $this->slug;\n\t}", "function generateSlugVar( $string, $wordLimit = 0 )\n{\n $separator = '-';\n\n if ( 0 != $wordLimit ) {\n $wordArr = explode( ' ', $string );\n $string = implode( ' ', array_slice( $wordArr, 0, $wordLimit ) );\n }\n\n $quoteSeparator = preg_quote( $separator, '#' );\n\n $trans = array(\n '&.+?;' => '',\n '[^\\w\\d _-]' => '',\n '\\s+' => $separator,\n '(' . $quoteSeparator . ')+' => $separator,\n );\n\n $string = strip_tags( $string );\n foreach ( $trans as $key => $val ) {\n $string = preg_replace( '#' . $key . '#i', $val, $string );\n }\n\n $string = strtolower( $string );\n\n return trim( trim( $string, $separator ) );\n}", "public function getFieldSlug();", "function eb_convert_title_html_tags( $string ) {\r\n global $wp_current_filter;\r\n $filter = end($wp_current_filter);\r\n $search = array('#span#', '#/span#');\r\n $replace = ( in_array($filter, array('wp_title', 'the_title_rss')) || ($filter == 'the_title' && (is_admin() || in_array('wp_head', $wp_current_filter))) ) ? '' : array('<span>', '</span>');\r\n $string = str_replace( $search, $replace, $string );\r\n\r\n return $string;\r\n}", "public function getSlug()\n\t{\n\t\treturn strtolower($this->getName());\n\t}", "public static function getSlugField()\n {\n return 'slug';\n }", "function to_slug($x, $counter = null) {\n\n $x = strtolower(trim($x));\n $x = str_replace('&', ' and ', $x);\n $x = preg_replace('/[\\'\"\\(\\)]/', '', $x);\n $x = preg_replace('/[^a-z0-9-]/i', '-', $x);\n $x = preg_replace('/-{2,}/', '-', $x);\n $x = trim($x, '-');\n\n if ($counter > 1) {\n $x .= '-' . $counter;\n }\n\n return $x;\n }", "public static function makeSlug($name);", "function slugify( $text ) {\n\n\t\t// replace non-alphanumeric characters with a hyphen\n\t\t$text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n\t\t// trim off any trailing or leading hyphens\n\t\t$text = trim($text, '-');\n\n\t\t// transliterate from UTF-8 to ASCII\n\t\tif (function_exists('iconv')) {\n\t\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t\t}\n\n\t\t// lowercase\n\t\t$text = strtolower($text);\n\n\t\t// remove unwanted characters\n\t\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\n\t\t// ensure that this slug is unique\n\t\t$i=1;\n\t\twhile ( array_key_exists( $text, $this->dbs ) ) {\n\t\t\t$text .= \"-$i\";\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $text;\n\t}", "protected function slugField()\n {\n return 'slug';\n }", "function flugin_slugify($text, $replacment = '-')\n {\n $text = preg_replace('~[^\\pL\\d]+~u', $replacment, $text);\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, $replacment);\n\n // remove duplicate -\n $text = preg_replace('~-+~', $replacment, $text);\n\n // lowercase\n $text = strtolower($text);\n\n return $text;\n }", "public function putSlugName(?string $string, string $extension = '.html'): string;", "public function getSlugKeyName(): string;", "public function slug() {\n\t\treturn $this->createSlug($this->title);\n\t}", "function twig_title_string_filter(Twig_Environment $env, $string)\n {\n if (null !== ($charset = $env->getCharset())) {\n return mb_convert_case($string, MB_CASE_TITLE, $charset);\n }\n return ucwords(strtolower($string));\n }", "function twig_lower_filter(Twig_Environment $env, $string)\n {\n if (null !== ($charset = $env->getCharset())) {\n return mb_strtolower($string, $charset);\n }\n return strtolower($string);\n }", "function getFullSlug($locale=''){\n /** @var JSP trick */\n $locale = ($locale)?:app()->getLocale();\n return str_replace('{product?}',$this->{'slug:'.$locale},trans('routes.products',array(),$locale));\n }", "public function test_slugify() {\n $this->assertEquals('normal_string', DynamicMenu_Menu::slugify('normal string'));\n // converts hyphen to underscore\n $this->assertEquals('hyphened_string', DynamicMenu_Menu::slugify('hyphened-string'));\n // converts caps to lowercase\n $this->assertEquals('normal_title', DynamicMenu_Menu::slugify('Normal Title'));\n // any other special character to no space\n $this->assertEquals('havingsymbol', DynamicMenu_Menu::slugify('having@symbol'));\n $this->assertEquals('quotedstring', DynamicMenu_Menu::slugify('quoted\\'string')); \n }", "function slugify2($text){\r\n\r\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\r\n\r\n\r\n\r\n // transliterate\r\n\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n\r\n\r\n // remove unwanted characters\r\n\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n\r\n\r\n // trim\r\n\r\n $text = trim($text, '-');\r\n\r\n\r\n\r\n // remove duplicated - symbols\r\n\r\n $text = preg_replace('~-+~', '-', $text);\r\n\r\n\r\n\r\n // lowercase\r\n\r\n $text = strtolower($text);\r\n\r\n\r\n\r\n if (empty($text)) {\r\n\r\n return 'n-a';\r\n\r\n }\r\n\r\n\r\n\r\n return $text;\r\n\r\n}", "public function slug($slug);", "function fs_to_slug($string){\r\n\treturn strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string)));\r\n}", "protected function _inflectClassNameSlug() {\n\t\t$className = get_class($this);\n\t\t$parts = explode('Shortcode', $className);\n\t\t$shortcodeName = end($parts);\n\t\t\n\t\t$regex = '/(^|[a-z])([A-Z])/';\t\t\t\n\t\t$slug = preg_replace($regex, '$1_$2', $shortcodeName);\n\t\t\n\t\t$slug = strtolower($slug);\n\t\t$slug = trim($slug, '_ ');\n\t\t\n\t\treturn $slug;\n\t}", "public function calculateSlug() {\n $this->slug = strtolower(str_replace(array(\" \", \"_\"), array(\"-\", \"-\"), $this->nombre)).rand(1, 100);\n }", "public function getSlug()\n {\n $slug = $this->cekUrl(str_slug($this->param));\n return $slug;\n }", "public function getSlug()\n {\n return $this->provider .'-'. str_replace('_', '-', $this->postId);\n }", "public function slug()\n\t{\n\t\t$explode = explode('/', $this->getField('key'));\n\n\t\t// Check if the page have a parent.\n\t\tif(!empty($explode[1])) {\n\t\t\treturn $explode[1];\n\t\t}\n\n\t\treturn $explode[0];\n\t}", "public function getSlugAttribute ($value){\n $value = strtolower(preg_replace(\"/[^a-zA-Z0-9]+/\",'-',$value));\n return $value;\n\n }", "function slugify($string, $separador = ' ')\n {\n $string = strtolower(trim(strip_tags($string)));\n\n //replace single quotes and double quotes first\n //$string = preg_replace('/[\\']/i', '', $string);\n //$string = preg_replace('/[\"]/i', '', $string);\n //$string = preg_replace('/&/', 'y', $string);\n\n //replace acentos y eñes\n //$con_tilde = array('á','é','í','ó','ú','ñ');\n //$sin_tilde = array('a','e','i','o','u','n');\n //$string = str_replace($con_tilde, $sin_tilde, $string);\n\n //remove non-valid characters\n //$string = preg_replace('/[^-a-z0-9]/i', $separador, $string);\n //$string = preg_replace('/-[-]*/i', $separador, $string);\n\n //remove from beginning and end\n $string = preg_replace('/' . $separador . '$/i', '', $string);\n $string = preg_replace('/^' . $separador . '/i', '', $string);\n\n return $string;\n }", "public function getSlug(): string\n {\n return $this->name_slug;\n }", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "function wpsctSlug($str) {\r\n $str = strtolower(trim($str));\r\n $str = preg_replace('/[^a-z0-9-]/', '_', $str);\r\n $str = preg_replace('/-+/', \"_\", $str);\r\n return $str;\r\n }", "function slug($object)\n {\n $id = isset($object->id)?$object->id:'';\n $title = isset($object->title)?$object->title:'';\n return str_slug($id.'-'.$title);\n }", "public function sluggable()\n {\n return [\n 'slug' => [\n 'source' => 'titre'\n ]\n ];\n }", "public static function getSlug(): string\n {\n return static::SLUG;\n }", "function wp_filter_wp_template_unique_post_slug($override_slug, $slug, $post_id, $post_status, $post_type)\n {\n }", "public function twig_filter_sdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('sdate', function ($_string, $_max =\"day\", $_format =\"Y/m/d\")\n\t\t{\n\t\t\treturn \\lib\\utility::humanTiming($_string, $_max, $_format, $this->data->site['currentlang']);\n\t\t});\n\t}", "public function getSlug()\n\t{\n\t\treturn self::buildSlug();\n\t}", "public function makeslug()\n {\n echo $this->blog_articles_model->make_slug();\n }", "function sluggify_string($string, $separator = '-') {\n return url_title($string, $separator, $lowercase = TRUE);\n}", "function sluggify_string($string, $separator = '-') {\n return url_title($string, $separator, $lowercase = TRUE);\n}", "public function slugify($slug) {\n // Check if path auto is installed.\n if (\\Drupal::moduleHandler()->moduleExists('pathauto')) {\n $slug = \\Drupal::service('pathauto.alias_cleaner')->cleanString($slug);\n }\n else {\n // Remove HTML tags.\n $slug = preg_replace('/<(.*?)>/u', '', $slug);\n\n // Remove inner-word punctuation.\n $slug = preg_replace('/[\\'\"‘’“”]/u', '', $slug);\n\n // Make it lowercase.\n $slug = mb_strtolower($slug, 'UTF-8');\n\n // Get the \"words\". Split on anything that is not a unicode letter or number.\n // Periods are OK too.\n preg_match_all('/[\\p{L}\\p{N}\\._-]+/u', $slug, $words);\n $slug = implode('-', array_filter($words[0]));\n }\n\n return $slug;\n }", "public function setSlugPattern($pattern);", "function make_slug($string) {\n $trim_data= preg_replace('/\\s+/u', '-', trim($string));\n $lower_data= strtolower($trim_data) ;\n return $lower_data;\n //return strtolower($lower_data);\n}", "public function sanitize_slug($slug)\n {\n }", "static function unslugify( $string ) {\n # Remove hyphens\n $text = str_replace( '-', ' ', $string);\n\n # Remove underscores\n $text = str_replace( '_', ' ', $text);\n \n # Remove underscores\n $text = ucwords($text);\n \n return apply_filters( 'unslugify', $text );\n }", "public function sluggable() {\n return [\n 'slug_curso' => [\n 'source' => 'titulo'\n ]\n ];\n }", "function get_post_format_slugs()\n {\n }", "public function blog_urlSlugGenerator()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('title', true);\n $output['response'] = $this->common->_urlSlugGenerator('tbl_blog', 'id', 'slug', $slug);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }", "public function generateSlug()\n {\n if ($this->slug != str_slug($this->title)) {\n $this->slug = str_slug($this->title);\n }\n\n while ($count = self::where(['slug' => $this->slug])->where('id', '!=', $this->id)->count()) {\n $this->slug .= '-' . $count;\n }\n }", "public function slugTarget(){\n\t\treturn 'title';\n\t}", "protected function getSlug(){\n $this->Name = UrlUtils::getSlug($this->FriendlyName);\n return $this->Name;\n }", "function slug(string $input, string $preserve = '', string $replace = '-'): string\n{\n static $map;\n $map ??= require 'statics/slug-map.php';\n\n $preserve && $preserve = preg_quote($preserve, '~');\n $replace || $replace = '-';\n\n $out = preg_replace(['~[^\\w'. $preserve . $replace .']+~', '~['. $replace .']+~'],\n $replace, strtr($input, $map));\n\n return strtolower(trim($out, $replace));\n}", "function slugify($text)\r\n{\r\n // replace non letter or digits by -\r\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\r\n\r\n // transliterate\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n // remove unwanted characters\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n // trim\r\n $text = trim($text, '-');\r\n\r\n // remove duplicate -\r\n $text = preg_replace('~-+~', '-', $text);\r\n\r\n // lowercase\r\n $text = strtolower($text);\r\n\r\n if (empty($text)) {\r\n return 'n-a';\r\n }\r\n\r\n return $text;\r\n}", "public function createSlug($text) {\n $text = sanitize_title($text);\n return $text;\n }", "public function createSlug($text) {\n $text = sanitize_title($text);\n return $text;\n }", "function slugify($text)\n{\n // replace non letter or digits by -\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n if (function_exists('iconv')) {\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n }\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}" ]
[ "0.7095691", "0.681836", "0.6521152", "0.645451", "0.63917077", "0.63917077", "0.61965716", "0.61899906", "0.6089282", "0.6077197", "0.606477", "0.6022422", "0.6022422", "0.6022422", "0.6022422", "0.60057706", "0.60047704", "0.59801406", "0.5942131", "0.5916942", "0.589463", "0.586949", "0.5861643", "0.58536893", "0.5824205", "0.5823518", "0.5783178", "0.5782848", "0.5750495", "0.57469165", "0.57402617", "0.57303315", "0.57147855", "0.568935", "0.5681034", "0.5674468", "0.5671123", "0.5662093", "0.55996597", "0.5593503", "0.55934745", "0.55907357", "0.5580934", "0.55800253", "0.55438113", "0.5533894", "0.5529737", "0.5518194", "0.5504812", "0.54966706", "0.54875493", "0.54816175", "0.5479788", "0.5476613", "0.5474511", "0.54715514", "0.5457491", "0.545731", "0.5451088", "0.5448119", "0.54479384", "0.5446452", "0.5435165", "0.5434818", "0.54315937", "0.5423168", "0.5421711", "0.5420473", "0.54197276", "0.5414485", "0.54054207", "0.5390169", "0.53893554", "0.5377646", "0.53704596", "0.53694016", "0.53677493", "0.5358857", "0.53555065", "0.53519356", "0.5347283", "0.5341853", "0.53416306", "0.5340405", "0.5340405", "0.53332776", "0.5329078", "0.5323483", "0.532037", "0.5316927", "0.5312406", "0.53057617", "0.5301741", "0.5301498", "0.5298164", "0.5294739", "0.52930856", "0.52921295", "0.52891994", "0.52891994", "0.52880657" ]
0.0
-1
Title filter for twig templates
public function titleFilter($value) { return Strings::formatForTitle($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twig_title_string_filter(Twig_Environment $env, $string)\n {\n return ucwords(strtolower($string));\n }", "function _block_template_render_title_tag()\n {\n }", "function _wp_render_title_tag()\n {\n }", "function conure_filter_wp_title( $title ){\n\treturn $title . esc_attr( get_bloginfo( 'name' ) );\n}", "function cucina_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t<?php\n\t}", "protected function renderPageTitle() {}", "private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n return $title;\n }", "public function get_title()\n {\n return __('Post Filter Bar', 'elementor-super-cat');\n }", "function twig_title_string_filter(Twig_Environment $env, $string)\n {\n if (null !== ($charset = $env->getCharset())) {\n return mb_convert_case($string, MB_CASE_TITLE, $charset);\n }\n return ucwords(strtolower($string));\n }", "function thrive_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t<?php\n\t}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "private function renderTitle()\n\t{\n\t\treturn '<h1 class=\"block-new-title\">' . $this->title . '</h1>';\n\t}", "public function getTitle() {\n return \\Drupal::config('taxonomy_facets.settings')->get('page_title');\n }", "function eb_convert_title_html_tags( $string ) {\r\n global $wp_current_filter;\r\n $filter = end($wp_current_filter);\r\n $search = array('#span#', '#/span#');\r\n $replace = ( in_array($filter, array('wp_title', 'the_title_rss')) || ($filter == 'the_title' && (is_admin() || in_array('wp_head', $wp_current_filter))) ) ? '' : array('<span>', '</span>');\r\n $string = str_replace( $search, $replace, $string );\r\n\r\n return $string;\r\n}", "function pgm_register_custom_admin_titles() {\n add_filter('the_title','pgm_custom_admin_titles',99,2);\n}", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "static function title($content='') {\n\t\treturn self::tag('title', false, strip_tags($content));\n\t}", "public function getMetaTitle() {\n\t\t$title = $this->data()->getTitle();\n\t\t$filter = $this->FilterDescription();\n\t\tif($filter) {\n\t\t\t$title = \"{$title} - {$filter}\";\n\t\t}\n\n\t\t$this->extend('updateMetaTitle', $title);\n\t\treturn $title;\n\t}", "public function computedTitle();", "function smarty_outputfilter_admintitle($source, $view)\n{\n // get all the matching H1 tags\n $regex = \"/<h1>[^<]*<\\/h1>/\";\n preg_match_all($regex, $source, $h1);\n $regex = \"/<h2>[^<]*<\\/h2>/\";\n preg_match_all($regex, $source, $h2);\n $regex = \"/<h3>[^<]*<\\/h3>/\";\n preg_match_all($regex, $source, $h3);\n\n // init vars\n $titleargs = array();\n $header1 = $header2 = $header3 = '';\n\n // set the title\n // header level 1\n if (isset($h1[0]) && isset($h1[0][1])) {\n $header1 = $h1[0][1];\n }\n if (isset($header1) && !empty($header1)) {\n $titleargs[] = $header1;\n }\n // header level 2\n if (isset($h2[0][0])) {\n $header2 = $h2[0][0];\n }\n if (isset($header2) && !empty($header2)) {\n $titleargs[] = $header2;\n }\n // header level 3\n if (isset($h3[0]) && isset($h3[0][1])) {\n $header3 = $h3[0][1];\n }\n if (isset($header3) && !empty($header3)) {\n $titleargs[] = $header3;\n }\n\n if (!empty($titleargs)) {\n PageUtil::setVar('title', System::getVar('sitename') . ' - ' . strip_tags(implode(' / ', $titleargs)));\n }\n\n // return the modified source\n return $source;\n}", "private function _getTitle()\r\n\t{\r\n\t\t$input\t= dunloader( 'input', true );\r\n\t\t$action\t= $input->getVar( 'action', 'themes' );\r\n\t\t$task\t= $input->getVar( 'task', null );\r\n\t\t\r\n\t\treturn '<h1>' . t( 'themer.admin.module.title', t( 'themer.admin.module.title.' . $action . ( $task ? '.' . $task : '' ) ) ) . '</h1>';\r\n\t}", "function filter_wp_title( $title ) {\n\tglobal $page, $paged;\n\n\tif ( is_feed() )\n\t\treturn $title;\n\n\t$site_description = get_bloginfo( 'description' );\n\n\t$filtered_title = $title . get_bloginfo( 'name' );\n\t$filtered_title .= ( ! empty( $site_description ) && ( is_front_page() ) ) ? ' | ' . $site_description: '';\n\t$filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ) : '';\n\n\treturn $filtered_title;\n}", "public function get_title();", "function page_title($title = ''){\r\n\tglobal $eqdkp, $user;\r\n\t$pt_prefix\t\t= (defined('IN_ADMIN')) ? $user->lang['admin_title_prefix'] : $user->lang['title_prefix'];\r\n\t$main_title\t\t= sprintf($pt_prefix, $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']);\r\n\treturn sanitize((( $title != '' ) ? $title.' - ' : '').$main_title, TAG);\r\n}", "protected function get_title()\n {\n return get_string(\"column_title\", 'local_questionbanktagfilter');\n }", "function cheffism_title_filter( $title, $sep ) {\n global $page, $paged;\n\n if ( is_feed() )\n return $title;\n\n // Add a page number if necessary:\n if ( $paged >= 2 || $page >= 2 )\n $title = $title . $sep . sprintf( __( 'Page %s', 'cheffism' ), max( $paged, $page ) );\n\n return $title;\n}", "public function getTitle() {\n\t\treturn '';\n\t}", "public function filter__the_title_parts( $title ) {\n\t\tglobal $posts;\n\n\t\tif ( ! is_single() && ! is_page() || ! $this->is_supported_post_type( $posts[0]->post_type ) ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$cmpvalues = $this->get_enabled_singular_options( $posts[0]->post_type );\n\t\tif ( ! isset( $cmpvalues['mt_seo_title'] ) || ! $cmpvalues['mt_seo_title'] ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$mt_seo_title = (string) get_post_meta( $posts[0]->ID, 'mt_seo_title', true );\n\t\tif ( empty( $mt_seo_title ) ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\t$mt_seo_title = $this->do_title_placeholder_substitutions( $title['title'], $mt_seo_title );\n\t\t$mt_seo_title = wp_strip_all_tags( $mt_seo_title );\n\n\t\t$title['title'] = $mt_seo_title;\n\t\treturn $title;\n\t}", "function decode_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', false, 'right' ); ?></title>\n\t\t<?php\n\t}", "function genesis_do_search_title() {\n\n\t$title = sprintf( '<div class=\"archive-description\"><h1 class=\"archive-title\">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search results for: ', 'genesis' ) ), get_search_query() );\n\n\techo apply_filters( 'genesis_search_title_output', $title ) . \"\\n\";\n\n}", "private function getTitle(): string\n {\n /**\n * This is the title being overwritten by a middleware, view\n * composer, etc. by using the share() method.\n */\n $metaTitle = $this->context->get('__env')->shared('meta_title') ?? '';\n\n if (! $metaTitle) {\n if (! $this->context->get('is_term')) {\n $metaTitle = $this->augmented($this->context->get('meta_title'));\n }\n\n $metaTitle = $metaTitle ?? config('findable.default_meta_title');\n }\n\n $parsedTitle = $this->parseMergeTags($metaTitle);\n $parsedTitle = trim($parsedTitle, ' |');\n\n // Use regular title as fallback if the parsed is empty.\n return $parsedTitle ?? $this->augmented($this->context->get('title'));\n }", "public function title($name);", "public function getTitle(): string\n {\n return$this->attrs['title'] ?? '';\n }", "public function filters_the_title($title){\n\t\n\t$title = $this->formatting->wptexturize($title);\n\t$title = $this->formatting->convert_chars($title);\n\t\n\treturn trim($title);\n }", "function generate_filter_the_archive_title( $title ) {\n\t\tif ( is_category() ) {\n\t\t\t$title = single_cat_title( '', false );\n\t\t} elseif ( is_tag() ) {\n\t\t\t$title = single_tag_title( '', false );\n\t\t} elseif ( is_author() ) {\n\t\t\t/*\n\t\t\t * Queue the first post, that way we know\n\t\t\t * what author we're dealing with (if that is the case).\n\t\t\t */\n\t\t\tthe_post();\n\t\t\t$title = sprintf( '%1$s<span class=\"vcard\">%2$s</span>',\n\t\t\t\tget_avatar( get_the_author_meta( 'ID' ), 75 ),\n\t\t\t\tget_the_author()\n\t\t\t);\n\t\t\t/*\n\t\t\t * Since we called the_post() above, we need to\n\t\t\t * rewind the loop back to the beginning that way\n\t\t\t * we can run the loop properly, in full.\n\t\t\t */\n\t\t\trewind_posts();\n\t\t}\n\n\t\treturn $title;\n\n\t}", "protected function view_getPageTitle() {\n return 'HalloPizza';\n }", "function wp_title_filter( $title, $sep ) {\n\tif ( is_feed() ) {\n\t\treturn $title;\n\t}\n\t\n\tglobal $page, $paged;\n\n\t// Add the blog name\n\t$title = get_bloginfo( 'name', 'display' ) . \" \" . $title;\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) ) {\n\t\t$title .= \" $sep $site_description\";\n\t}\n\n\t// Add a page number if necessary:\n\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\n\t\t$title .= \" $sep \" . sprintf( __( 'Pag. %s', '_s' ), max( $paged, $page ) );\n\t}\n\n\treturn $title;\n}", "function wt_html_widget_title( $title ) {\n\treturn wt_html_sanitize_title( $title );\n}", "public function getTitle() {\n\t\treturn Template::getSiteTitle();\n\t}", "public function titleCallback() {\r\n return [\r\n '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),\r\n ];\r\n }", "function filter_special_event_page_title( $title, $id = null ) {\n\tif ( is_post_type_archive( 'special_event' ) ) {\n\t\t$title = 'Special Events';\n\t}\n\n\treturn $title;\n}", "public function getTitle(): string\n {\n return I18N_PAGES;\n }", "function FilterTitle($text) {\n\t\t\treturn ucfirst(trim($text));\n\t\t}", "function sanitize_title_with_dashes($title, $raw_title = '', $context = 'display')\n {\n }", "function kvell_edge_woocommerce_template_single_title() {\n\t\t$tag = kvell_edge_options()->getOptionValue( 'edgtf_single_product_title_tag' );\n\t\tif ( $tag === '' ) {\n\t\t\t$tag = 'h1';\n\t\t}\n\t\t\n\t\tthe_title( '<' . $tag . ' itemprop=\"name\" class=\"edgtf-single-product-title\">', '</' . $tag . '>' );\n\t}", "public function get_title()\n {\n return __('[D.Korol] Blog Single Page Widget', 'elementor-header-bullet');\n }", "protected function getTitle() {\n\t\t$result = $this->overlayFile->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->overlayFile->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "function MyApp_Interface_HEAD_Title()\n {\n $comps=preg_split('/::/',parent::MyApp_Interface_HEAD_Title());\n $keys=array(\"Initials\",\"Name\",\"Title\");\n \n $unit=$this->Unit();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($unit,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n \n $event=$this->Event();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($event,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n\n return join(\"::\",array_reverse($comps)); \n }", "public function processTitle($title)\r\n {\r\n // The title is not processed in a new view\r\n if ($this->isNewView()) {\r\n return '';\r\n }\r\n\r\n // Checks if the title contains html tags\r\n if (preg_match('/<[^>]+>/', $title)) {\r\n $this->addToViewConfiguration('general', [\r\n 'titleNeedsFormat' => 1\r\n ]);\r\n }\r\n\r\n // Processes localization tags\r\n $title = $this->getController()\r\n ->getQuerier()\r\n ->parseLocalizationTags($title);\r\n\r\n // Processes field tags\r\n $title = $this->getController()\r\n ->getQuerier()\r\n ->parseFieldTags($title);\r\n\r\n return $title;\r\n }", "public function get_title()\n {\n }", "public function get_title()\n {\n }", "public function title() {\n return \"{$this->venuename} ({$this->id})\";\n }", "public function title()\n {\n return \"$this->name ($this->format_sti)\";\n }", "function get_title($title) \n{\n global $scelus;\n return $title . (isset($scelus['title_append']) ? $scelus['title_append'] : null);\n}", "public function wp_title_filter( $title, $sep ) {\n global $paged, $page;\n\n if ( is_feed() )\n return $title;\n\n // Add the site name.\n $title .= ' ' . $sep . ' ' . get_bloginfo( 'name' );\n\n // Add the site description for the home/front page.\n $site_description = get_bloginfo( 'description', 'display' );\n if ( $site_description && ( is_home() || is_front_page() ) )\n $title = \"$title $sep $site_description\";\n\n // Add a page number if necessary.\n if ( $paged >= 2 || $page >= 2 )\n $title = \"$title $sep \" . sprintf( __( 'Page %s', 'paperplane' ), max( $paged, $page ) );\n\n return $title;\n }", "function filter_chapel_hour_page_title( $title, $id = NULL ) {\n if ( is_post_type_archive( 'chapel_hour' ) ) {\n $title = 'Chapel Hour Episodes';\n }\n\n return $title;\n}", "public function getPageTitle()\n {\n return parent::getPageTitle() ?:\n (\n isset($this->get['pages']) ? $this->tableAdmin->translate('Pages') :\n (\n isset($this->get['products']) ? $this->tableAdmin->translate('Products') :\n (\n isset($this->get['urls']) ? $this->tableAdmin->translate('URL') :\n ''\n )\n )\n );\n }", "function superfood_elated_woocommerce_template_single_title() {\n\n\t\t$tag = superfood_elated_options()->getOptionValue('eltdf_single_product_title_tag');\n\t\tif($tag === '') {\n\t\t\t$tag = 'h2';\n\t\t}\n\t\tthe_title('<' . $tag . ' itemprop=\"name\" class=\"eltdf-single-product-title\">', '</' . $tag . '>');\n\t}", "public abstract function getTitle();", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "public function getTitle(): string;", "protected function getTitle() {\n\t\t$result = $this->getFile()->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->getFile()->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "public function getTitle()\n {\n return $this->originalAsset->getTitle();\n }", "public function getTitle(): string\n {\n return $this->title ?? $this->name;\n }", "function get_page_by_title_filtered( $title ){\n $page = get_page_by_title_safely($title);\n return do_shortcode($page->post_content);\n}", "function minorite_views_pre_render(&$view) {\n $view->set_title(t($view->get_title()));\n}" ]
[ "0.6988802", "0.6949313", "0.69462824", "0.67185676", "0.67180306", "0.67174226", "0.6642708", "0.6589577", "0.6546351", "0.6519805", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.651563", "0.65155625", "0.6513709", "0.6513709", "0.6493724", "0.64767265", "0.6443873", "0.64256024", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.63982743", "0.638807", "0.6382978", "0.63812375", "0.63749886", "0.6373678", "0.63722557", "0.6365751", "0.6360597", "0.6360045", "0.63348323", "0.6322285", "0.6279283", "0.62772834", "0.62608683", "0.6210809", "0.62101287", "0.62090415", "0.61993027", "0.6193603", "0.6179572", "0.617859", "0.6176604", "0.6156925", "0.61541146", "0.61475635", "0.6144352", "0.61339325", "0.612838", "0.61092794", "0.61079586", "0.60993415", "0.6094552", "0.60751504", "0.60747147", "0.60737276", "0.60711074", "0.60705477", "0.6058356", "0.6057731", "0.60566676", "0.6054623", "0.6049527", "0.604697", "0.60439295", "0.60439295", "0.60439295", "0.60439295", "0.60439295", "0.60439295", "0.60439295", "0.60439295", "0.60369176", "0.6035493", "0.6033819", "0.6028058", "0.60212785" ]
0.60745007
78
asset visioning filter for twig templates
public function autoVersionFilter($value) { $autoVersion = new AutoVersion(env('DOCUMENT_ROOT')); return $autoVersion->file($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twig_raw_filter($string)\n{\n return $string;\n}", "function twig_safe_filter($string)\n{\n return $string;\n}", "private function setup_filters() {\n add_filter( 'timber/twig', function( $twig ) {\n\n // ped_icon()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'icon',\n [ __CLASS__, 'get_icon' ]\n ) );\n\n // ped_logo()\n $twig->addFunction( new \\Twig_SimpleFunction( PEDESTAL_PREFIX . 'logo',\n [ __CLASS__, 'get_logo' ]\n ) );\n\n return $twig;\n }, 99 );\n }", "private static function addFunctions()\n {\n \tself::$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) {\n return sprintf('%s', ltrim($asset, '/'));\n\t\t}));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('getBaseUrl', function () {\n return getBaseUrl();\n }));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('csrf_token', function () {\n return csrf_token();\n }));\n }", "public function getTag()\n {\n return 'assets';\n }", "function add_to_twig($twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t// $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\treturn $twig;\n\t}", "public function filterLoad($asset) {}", "function add_to_twig($twig) {\n $twig->addExtension(new \\Twig_Extension_StringLoader());\n $twig->addFunction(new \\Twig_SimpleFunction('script', 'CodekippleWPTheme\\Timber\\Site\\script'));\n $twig->addFunction(new \\Twig_SimpleFunction('css', 'CodekippleWPTheme\\Timber\\Site\\css'));\n $twig->addFilter('body_class', new \\Twig_Filter_Function('CodekippleWPTheme\\Timber\\Site\\body_class'));\n\n return $twig;\n }", "function add_to_twig( $twig ) {\n\t\t// $twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t// $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "public function getFilters()\n {\n return array(\n 'shortenUrl' => new \\Twig_SimpleFilter('shorten_url', 'shortenUrl'),\n );\n }", "function blog_view($context) {\n Timber::render('category/blog.twig', $context);\n}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "public function output(Event $event)\n {\n $page = $event['page'];\n $uri = $this->grav['uri'];\n $uri = $uri->base().$page->rawRoute();\n $twig = $this->grav['twig'];\n $config = (array) $this->config->get('plugins');\n $config = $config['imgcaptions'];\n $content = $page->getRawContent();\n if ($config['mode'] == 'markdown') {\n preg_match_all(\n $this::REGEX_IMG_WRAPPING_LINK,\n $content,\n $wrappers,\n PREG_SET_ORDER\n );\n if (count($wrappers) != 0) {\n foreach ($wrappers as $wrap) {\n $content = str_replace($wrap[0], $wrap['image'] . '___' . $wrap['url'], $content);\n }\n }\n preg_match_all(\n $this::REGEX_MARKDOWN_LINK,\n $content,\n $matches,\n PREG_SET_ORDER\n );\n foreach ($matches as $match) {\n $attrs = array();\n $attrs['src'] = $uri.DS.$match['file'].$match['ext'];\n $attrs['alt'] = (isset($match['alt']) ? $match['alt'] : '');\n $attrs['title'] = (isset($match['title']) ? $match['title'] : '');\n if (isset($match['type'])) {\n if ($match['type'] == 'id') {\n $id = substr($match['grav'], strpos($match['grav'], \"=\") + 1);\n $attrs['id'] = $id;\n } elseif ($match['type'] == 'classes') {\n $classes = substr($match['grav'], strpos($match['grav'], \"=\") + 1);\n $attrs['class'] = str_replace(',', ' ', $classes);\n }\n }\n if (isset($match['extra']) && !empty($match['extra'])) {\n $extra = trim($match['extra'], '{}');\n $extras = explode(' ', $extra);\n $id = $classes = $attributes = array();\n foreach ($extras as $extra) {\n if (Utils::startsWith($extra, '#')) {\n $id[] = substr($extra, 1);\n } elseif (Utils::startsWith($extra, '.')) {\n $classes[] = substr($extra, 1);\n } else {\n $attributes[] = $extra;\n }\n }\n if (!empty($id)) {\n $attrs['id'] = implode(' ', $id);\n if (!isset($match['type']) && $match['type'] == 'id') {\n $attrs['id'] = $attrs['id'] . ' ' . implode(' ', $id);\n } else {\n $attrs['id'] = implode(' ', $id);\n }\n }\n if (!empty($classes)) {\n if (!isset($match['type']) && $match['type'] == 'classes') {\n $attrs['class'] = $attrs['class'] . ' ' . implode(' ', $classes);\n } else {\n $attrs['class'] = implode(' ', $classes);\n }\n }\n if (!empty($attributes)) {\n foreach ($attributes as $attribute) {\n if (Utils::contains($attribute, '=')) {\n $attribute = explode('=', $attribute);\n $attrs[$attribute[0]] = $attribute[1];\n }\n }\n }\n }\n if (isset($match['url']) && !empty($match['url'])) {\n $replace = $twig->processTemplate(\n 'partials/figure.html.twig', \n [\n 'attrs' => $attrs,\n 'url' => trim($match['url'], '_')\n ]\n );\n } else {\n $replace = $twig->processTemplate(\n 'partials/figure.html.twig', \n [\n 'attrs' => $attrs\n ]\n );\n }\n $content = str_replace($match[0], $replace, $content);\n }\n } elseif ($config['mode'] == 'html') {\n $content = $page->content();\n\n $unwrap = $this::REGEX_IMG_P;\n $content = preg_replace($unwrap, \"$1\", $content);\n\n $wrap = $this::REGEX_IMG;\n $content = preg_replace($wrap, '<figure role=\"group\" $2>$1</figure>', $content);\n\n $title = $this::REGEX_IMG_TITLE;\n $content = preg_replace($title, \"$0<figcaption>$1</figcaption>\", $content);\n }\n $page->setRawContent($content);\n }", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('iconFile', [$this, 'iconFile'], ['is_safe' => ['html']])\n ];\n }", "public function getFilters()\n {\n return array(\n new \\Twig_SimpleFilter('ellipse', array($this, 'getEllipse')),\n );\n }", "public function functional_asset_url() {\n\n\t\t$log_url = WP_CONTENT_URL . '/uploads/nginx-helper/';\n\n\t\treturn apply_filters( 'nginx_asset_url', $log_url );\n\n\t}", "public function provideTemplateTwigObjects(FilterControllerEvent $event)\n { $repository = $this->doctrine->getRepository('EMSCoreBundle:ContentType');\n $contentTypes = $repository->findBy([\n 'deleted' => false,\n// 'rootContentType' => true,\n ], [\n 'orderKey' => 'ASC'\n ]);\n\n $this->twig->addGlobal('contentTypes', $contentTypes);\n \n $envRepository = $this->doctrine->getRepository('EMSCoreBundle:Environment');\n $contentTypes = $envRepository->findBy([\n 'inDefaultSearch' => true,\n ]);\n \n $defaultEnvironments = [];\n foreach ($contentTypes as $contentType) {\n $defaultEnvironments[] = $contentType->getName();\n }\n\n $this->twig->addGlobal('defaultEnvironments', $defaultEnvironments);\n }", "function _preview_theme_template_filter()\n {\n }", "function twig_urlencode_filter($url, $raw = false)\n{\n if (is_array($url)) {\n return http_build_query($url, '', '&');\n }\n if ($raw) {\n return rawurlencode($url);\n }\n return urlencode($url);\n}", "public function getFilters()\r\n {\r\n\r\n return array(new \\Twig_SimpleFilter('montantTva', array($this, 'montantTva')));\r\n }", "function asset($asset)\n{\n return ASSET_PREFIX . '/'. $asset;\n}", "public function renderFile(Environment $twig): string;", "public function filter_timber_twig_add_basic_filters( $twig ) {\n $function_names = [\n // PHP Functions\n 'addslashes', // http://php.net/manual/en/function.addslashes.php\n 'nl2br', // http://php.net/manual/en/function.nl2br.php\n\n // WordPress functions\n 'antispambot', // https://developer.wordpress.org/reference/functions/antispambot/\n 'esc_attr', // https://developer.wordpress.org/reference/functions/esc_attr/\n 'esc_html', // https://developer.wordpress.org/reference/functions/esc_html/\n 'esc_url', // https://developer.wordpress.org/reference/functions/esc_url/\n 'esc_js', // https://developer.wordpress.org/reference/functions/esc_js/\n 'esc_textarea', // https://developer.wordpress.org/reference/functions/esc_textarea/\n 'sanitize_email', // https://developer.wordpress.org/reference/functions/sanitize_email/\n ];\n foreach ( $function_names as $func ) {\n if ( function_exists( $func ) ) {\n $twig->addFilter( new \\Twig_SimpleFilter( $func, $func ) );\n }\n }\n return $twig;\n }", "function v2_mumm_include_asset($variable, $type) {\n $path = drupal_get_path('theme', 'v2_mumm');\n if ($type == 'css') {\n foreach ($variable as $key => $item) {\n drupal_add_css($path . '/css/' . $item . '.css', array(\n 'group' => CSS_THEME,\n 'type' => 'file',\n 'media' => 'screen',\n 'preprocess' => TRUE,\n 'every_page' => TRUE,\n 'group' => CSS_THEME,\n 'weight' => $key,\n ));\n }\n }\n if ($type == 'js') {\n foreach ($variable as $key => $item) {\n drupal_add_js($path . '/js/' . $item . '.js', array(\n 'type' => 'file',\n 'scope' => 'footer',\n 'group' => JS_THEME,\n 'every_page' => TRUE,\n 'preprocess' => TRUE,\n 'cache' => TRUE,\n 'weight' => $key,\n ));\n }\n }\n}", "public function filterContent($asset)\r\n {\r\n $images = array();\r\n $content = $asset->getContent();\r\n\r\n // get images and the related path\r\n if (preg_match_all('/url\\(\\s*[\\'\"]?([^\\'\"]+)[\\'\"]?\\s*\\)/Ui', $asset->getContent(), $matches)) {\r\n foreach ($matches[0] as $i => $url) {\r\n if ($path = realpath($asset['base_path'].'/'.ltrim(preg_replace('/'.preg_quote($asset['base_url'], '/').'/', '', $matches[1][$i], 1), '/'))) {\r\n $images[$url] = isset($images[$url]) ? false : $path;\r\n }\r\n }\r\n }\r\n\r\n // check if image exists and filesize < 5kb\r\n foreach ($images as $url => $path) {\r\n if ($path && filesize($path) <= 5120 && preg_match('/\\.(gif|png|jpg|svg)$/i', $path, $extension)) {\r\n $content = str_replace($url, sprintf('url(data:image/%s;base64,%s)', str_replace(array('jpg','svg'), array('jpeg','svg+xml'), strtolower($extension[1])), base64_encode(file_get_contents($path))), $content);\r\n }\r\n }\r\n\r\n $asset->setContent($content);\r\n }", "function add_to_twig($twig) {\n $function = new Twig_SimpleFunction('enqueue_script', function ($handle) {\n // register it elsewhere\n wp_enqueue_script( $handle);\n });\n $twig->addFunction($function);\n\n $function = new Twig_SimpleFunction('enqueue_style', function ($handle) {\n // register it elsewhere\n wp_enqueue_style( $handle);\n });\n $twig->addFunction($function);\n\n return $twig;\n }", "function smarty_modifier_toAssetPath($string) {\n\n if (strpos($string, \"::\") !== false) {\n $parts = explode(\"::\", $string);\n $src = ModulesContext::instance()->getConfig()->get(\"businessRoot\", \"src\");\n $base = trim(str_replace(\"::\", \"/\", $src), \"/\");\n $result = \"$base/$parts[0]/assets/$parts[1]\";\n } else {\n $result = \"assets/$result\";\n }\n\n $resultingPath = Loader::toSinglePath($result, \".tpl\");\n\n return $resultingPath;\n}", "function asset($url = '')\n{\n return ASSET . $url;\n}", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFunction('file_exists', new Twig_Function_Function('file_exists'));\n $twig->addFunction('environment', new Twig_Function_Function('get_environment'));\n return $twig;\n }", "private function addTwigFunctions() : void {\n\t\t$msgFunc = new Twig_SimpleFunction( 'msg', function ( $key, $params = [] ) {\n\t\t\t$params = is_array( $params ) ? $params : [];\n\t\t\treturn $this->i18n->msg(\n\t\t\t\t$key, [ 'domain' => 'popular-pages', 'variables' => $params ]\n\t\t\t);\n\t\t} );\n\t\t$this->twig->addFunction( $msgFunc );\n\n\t\t// Fetching assessments info, case-insensitive.\n\t\t$assessmentFunc = new Twig_SimpleFunction(\n\t\t\t'assessments', function (\n\t\t\t\tstring $type, string $value\n\t\t\t) {\n\t\t\t\t$dataset = $this->api->getAssessmentConfig()[$type];\n\t\t\t\tforeach ( $dataset as $key => $values ) {\n\t\t\t\t\tif ( strtolower( $value ) === strtolower( $key ) ) {\n\t\t\t\t\t\treturn $values;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $dataset['Unknown'];\n\t\t\t} );\n\t\t$this->twig->addFunction( $assessmentFunc );\n\n\t\t// Add ucfirst() (Twig's capitalize() will make the other chars lowercase).\n\t\t$ucfirstFunc = new Twig_SimpleFilter( 'ucfirst', function ( string $value ) {\n\t\t\treturn ucfirst( $value );\n\t\t} );\n\t\t$this->twig->addFilter( $ucfirstFunc );\n\t}", "protected function getTwigService()\n {\n $a = $this->get('request_stack');\n $b = $this->get('logger');\n $c = $this->get('knp_menu.matcher');\n\n $d = new \\Troopers\\AsseticInjectorBundle\\Twig\\AsseticExtension(${($_ = isset($this->services['assetic.asset_factory']) ? $this->services['assetic.asset_factory'] : $this->getAssetic_AssetFactoryService()) && false ?: '_'}, $this->get('templating.name_parser'), false, array(), array(0 => 'FrameworkBundle', 1 => 'SecurityBundle', 2 => 'TwigBundle', 3 => 'MonologBundle', 4 => 'SwiftmailerBundle', 5 => 'DoctrineBundle', 6 => 'SensioFrameworkExtraBundle', 7 => 'AppBundle', 8 => 'A2lixTranslationFormBundle', 9 => 'BazingaJsTranslationBundle', 10 => 'AsseticBundle', 11 => 'TroopersAsseticInjectorBundle', 12 => 'TroopersAlertifyBundle', 13 => 'FOSUserBundle', 14 => 'FOSJsRoutingBundle', 15 => 'JMSSerializerBundle', 16 => 'LiipImagineBundle', 17 => 'KnpMenuBundle', 18 => 'DoctrineBehaviorsBundle', 19 => 'SncRedisBundle', 20 => 'StofDoctrineExtensionsBundle', 21 => 'VictoireAnalyticsBundle', 22 => 'VictoireBlogBundle', 23 => 'VictoireBusinessEntityBundle', 24 => 'VictoireBusinessPageBundle', 25 => 'VictoireCoreBundle', 26 => 'VictoireCriteriaBundle', 27 => 'VictoireFilterBundle', 28 => 'VictoireFormBundle', 29 => 'VictoireI18nBundle', 30 => 'VictoireMediaBundle', 31 => 'VictoirePageBundle', 32 => 'VictoireQueryBundle', 33 => 'VictoireSeoBundle', 34 => 'VictoireSitemapBundle', 35 => 'VictoireTemplateBundle', 36 => 'VictoireTwigBundle', 37 => 'VictoireUIBundle', 38 => 'VictoireUserBundle', 39 => 'ViewReferenceBundle', 40 => 'VictoireWidgetBundle', 41 => 'VictoireWidgetMapBundle'), new \\Symfony\\Bundle\\AsseticBundle\\DefaultValueSupplier($this));\n $d->setCollector($this->get('troopers_assetic_injector.collector'));\n\n $e = new \\Knp\\Menu\\Util\\MenuManipulator();\n\n $f = new \\Symfony\\Bridge\\Twig\\AppVariable();\n $f->setEnvironment('prod');\n $f->setDebug(false);\n if ($this->has('security.token_storage')) {\n $f->setTokenStorage($this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n if ($this->has('request_stack')) {\n $f->setRequestStack($a);\n }\n\n $this->services['twig'] = $instance = new \\Twig_Environment($this->get('twig.loader'), array('debug' => false, 'strict_variables' => false, 'exception_controller' => 'twig.controller.exception:showAction', 'form_themes' => array(0 => 'form_div_layout.html.twig'), 'autoescape' => 'name', 'cache' => (__DIR__.'/twig'), 'charset' => 'UTF-8', 'paths' => array(), 'date' => array('format' => 'F j, Y H:i', 'interval_format' => '%d days', 'timezone' => NULL), 'number_format' => array('decimals' => 0, 'decimal_point' => '.', 'thousands_separator' => ',')));\n\n $instance->addExtension($this->get('twig.extension.text'));\n $instance->addExtension($this->get('twig.extension.intl'));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\LogoutUrlExtension(${($_ = isset($this->services['security.logout_url_generator']) ? $this->services['security.logout_url_generator'] : $this->getSecurity_LogoutUrlGeneratorService()) && false ?: '_'}));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\SecurityExtension($this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE)));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\TranslationExtension($this->get('translator.default')));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\AssetExtension($this->get('assets.packages')));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\CodeExtension(${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, ($this->targetDirs[3].'/app'), 'UTF-8'));\n $instance->addExtension(new \\Victoire\\Bundle\\CoreBundle\\Twig\\Extension\\RoutingExtension($this->get('victoire_page.page_helper'), $this->get('router'), $this->get('victoire_i18n.locale_resolver'), $a, $b, $this->get('victoire.repository.error_page'), 'en'));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\YamlExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\StopwatchExtension($this->get('debug.stopwatch', ContainerInterface::NULL_ON_INVALID_REFERENCE), false));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\ExpressionExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\HttpKernelExtension());\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\HttpFoundationExtension($a, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}));\n $instance->addExtension(new \\Symfony\\Bridge\\Twig\\Extension\\FormExtension(array(0 => $this, 1 => 'twig.form.renderer')));\n $instance->addExtension(new \\Doctrine\\Bundle\\DoctrineBundle\\Twig\\DoctrineExtension());\n $instance->addExtension($d);\n $instance->addExtension($this->get('troopers_alertifybundle.twig.extension'));\n $instance->addExtension(new \\JMS\\Serializer\\Twig\\SerializerRuntimeExtension());\n $instance->addExtension(new \\Liip\\ImagineBundle\\Templating\\ImagineExtension($this->get('liip_imagine.cache.manager')));\n $instance->addExtension(new \\Knp\\Menu\\Twig\\MenuExtension(new \\Knp\\Menu\\Twig\\Helper($this->get('knp_menu.renderer_provider'), $this->get('knp_menu.menu_provider'), $e, $c), $c, $e));\n $instance->addExtension($this->get('victoire_core.twig.cms_extension'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_form'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_icon'));\n $instance->addExtension($this->get('victoire_form.twig.extension.bootstrap_flash'));\n $instance->addExtension($this->get('victoire_media.menu.twig.extension'));\n $instance->addExtension($this->get('victoire_media.twig_extension.svg'));\n $instance->addExtension($this->get('victoire_page.twig.page_extension'));\n $instance->addExtension($this->get('victoire_widget.twig.link_extension'));\n $instance->addGlobal('app', $f);\n $instance->addRuntimeLoader(new \\Symfony\\Bundle\\TwigBundle\\ContainerAwareRuntimeLoader($this, array('Symfony\\\\Bridge\\\\Twig\\\\Extension\\\\HttpKernelRuntime' => 'twig.runtime.httpkernel', 'Symfony\\\\Bridge\\\\Twig\\\\Form\\\\TwigRenderer' => 'twig.form.renderer', 'JMS\\\\Serializer\\\\Twig\\\\SerializerRuntimeHelper' => 'jms_serializer.twig_extension.serializer_runtime_helper'), $b));\n $instance->addGlobal('upload_dir', '/uploads/media/');\n $instance->addGlobal('mediabundleisactive', true);\n $instance->addGlobal('mediamanager', $this->get('victoire_media.media_manager'));\n (new \\Symfony\\Bundle\\TwigBundle\\DependencyInjection\\Configurator\\EnvironmentConfigurator('F j, Y H:i', '%d days', NULL, 0, '.', ','))->configure($instance);\n\n return $instance;\n }", "function assetTags ($type, $paths, $incTag, $blockTag) {\n\n $paths = uv($paths);\n if (!is_array($paths)) {\n $paths = !$paths ? [] : [$paths];\n }\n // if ($type == 'js') {\n // $jsData = Tht::module('Js')->u_plugin('jsData');\n // if ($jsData) { array_unshift($paths, $jsData); }\n // }\n\n if (!count($paths)) { return ''; }\n\n $nonce = Tht::module('Web')->u_nonce();\n\n $includes = [];\n $blocks = [];\n foreach ($paths as $path) {\n\n if (!OTypeString::isa($path)) {\n $this->error(\"Path must be a `url` or `$type` TypeString: `$path`\");\n }\n\n if (HtmlTypeString::isa($path)) {\n $tag = $path->u_stringify();\n $blocks []= $tag;\n }\n else if (!UrlTypeString::isa($path)){\n\n // Inline it in the HTML document\n $str = $path->u_stringify();\n if ($type == 'js' && !preg_match('#\\s*\\(function\\(\\)\\{#', $str)) {\n $str = \"(function(){\" . $str . \"})();\";\n }\n\n $vals = [\n 'body' => OTypeString::create('html', $str),\n ];\n if ($type == 'js') {\n $vals['nonce'] = $nonce;\n }\n $blockTag->u_fill(OMap::create($vals));\n $blocks []= $blockTag->u_stringify();\n }\n else {\n if ($path->u_is_relative()) {\n // TODO: Link to asset, with cache time set to file modtime\n\n // $basePath = ;\n // if (defined('BASE_URL')) {\n // $basePath = preg_replace('#' . BASE_URL . '#', '', $basePath);\n // }\n\n // $filePath = Tht::getThtFileName(Tht::path('pages', $basePath));\n // $path->u_query([ 'cache' => filemtime($filePath));\n }\n\n $vals = [\n 'url' => $path\n ];\n if ($type == 'js') {\n $vals['nonce'] = $nonce;\n }\n $incTag->u_fill(OMap::create($vals));\n $includes []= $incTag->u_stringify();\n }\n }\n\n $sIncludes = implode(\"\\n\", $includes);\n $sBlocks = implode(\"\\n\\n\", $blocks);\n\n return $sIncludes . \"\\n\" . $sBlocks;\n }", "public function generate()\r\n\t{\r\n\t\tif (TL_MODE == 'BE')\r\n\t\t{\r\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\r\n\t\t\t$objTemplate->wildcard = '### ISOTOPE ECOMMERCE: KIENER CUSTOM FILTER ###';\r\n\t\t\t$objTemplate->title = $this->headline;\r\n\t\t\t$objTemplate->id = $this->id;\r\n\t\t\t$objTemplate->link = $this->name;\r\n\t\t\t$objTemplate->href = $this->Environment->script.'?do=modules&amp;act=edit&amp;id=' . $this->id;\r\n\r\n\t\t\treturn $objTemplate->parse();\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::generate();\r\n\t}", "public function filterLoad(AssetInterface $asset)\n {\n\n }", "public function isVisibleOnFrontEnd()\n\t{\n\t\treturn ivFilepath::matchSuffix($this->name, ivPool::get('conf')->get('/config/imagevue/settings/includefilesext'));\n\t}", "function rewrite_static_tags() {\n\tadd_rewrite_tag('%proxy%', '([^&]+)');\n add_rewrite_tag('%manual%', '([^&]+)');\n add_rewrite_tag('%manual_file%', '([^&]+)');\n add_rewrite_tag('%file_name%', '([^&]+)');\n add_rewrite_tag('%file_dir%', '([^&]+)');\n}", "public function add_to_twig( $twig ) {\n $twig->addFunction(new Timber\\Twig_Function('img', array($this, 'img')));\n return $twig;\n }", "function ajarRenderDinamycBlock($attributes, $content) {\n return '<h1 class=\"my-3\">'.$attributes['content'].'</h1>'.\n '<img src=\"'.$attributes['mediaURL'].'\" alt=\"'.$attributes['mediaAlt'].'\" />'.\n '<hr>';\n}", "public function addToTwig($twig)\n {\n /* this is where you can add your own functions to twig */\n $twig->addExtension(new Twig_Extension_StringLoader());\n /**\n * Deprecated: Twig_Filter_Function, use Twig_SimpleFilter\n * http://twig.sensiolabs.org/doc/deprecated.html#filters\n * $twig->addFilter( 'whatever', new Twig_Filter_Function( 'whatever' ) );\n */\n $twig->addFilter('format_for_title', new Twig_SimpleFilter('format_for_title', array($this, 'titleFilter')));\n $twig->addFilter('slugify', new Twig_SimpleFilter('slugify', array($this, 'slugify')));\n $twig->addFilter('mdfive', new Twig_SimpleFilter('mdfive', array($this, 'mdfive')));\n $twig->addFilter('str_to_bool', new Twig_SimpleFilter('str_to_bool', array($this, 'strToBool')));\n $twig->addFilter(\n 'auto_version_path',\n new Twig_SimpleFilter('auto_version_path', array($this, 'autoVersionFilter'))\n );\n return $twig;\n }", "public function getFilters() {\n return array(\n new \\Twig_SimpleFilter(\"format_bytes\", array($this, \"formatBytes\"))\n );\n }", "public function render(AssetCollection $collection);", "public function getFilters()\r\n {\r\n return array(\r\n new \\Twig_SimpleFilter('sha1', array($this, 'sha1Filter')),\r\n );\r\n }", "public function privacyAction( \\Twig\\Environment $twig ) : Response\n\t{\n\t\treturn $twig->render( '@AimeosShop/Page/privacy.html.twig' );\n\t}", "public function filter_timber_twig_add_functions( $twig ) {\n // Function to check if doing email and alternate strings\n $twig->addFunction( new \\Twig_SimpleFunction( 'if_email', function( $email_str, $standard_str ) {\n if ( $this->is_email() ) {\n return $email_str;\n }\n return $standard_str;\n } ) );\n\n // Get the current Unix epoch time in milliseconds\n $twig->addFunction( new \\Twig_SimpleFunction( 'now', function() {\n return round( microtime( true ) * 1000 );\n } ) );\n\n // Add WordPress' checked() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'checked', function( $checked, $current = true ) {\n return checked( $checked, $current );\n } ) );\n\n // Add WordPress' selected() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'selected', function( $selected, $current = true ) {\n return selected( $selected, $current );\n } ) );\n\n // Add WordPress' disabled() function to Twig\n $twig->addFunction( new \\Twig_SimpleFunction( 'disabled', function( $disabled, $current = true ) {\n return disabled( $disabled, $current );\n } ) );\n\n return $twig;\n }", "public function getFilters()\n {\n return array(\n new \\Twig_SimpleFilter('aliasToLabel', array($this, 'aliasToLabel')),\n );\n }", "public function getFilters()\n {\n return array(\n 'safe' => new Twig_Filter_Function('twig_safe_filter', array('is_escaper' => true)),\n );\n }", "function asset_image_tag($asset, $thumbnail_type = 'full', $options = array(), $relative_path = null)\n{\n if ($asset == null) {\n return '';\n }\n $options = array_merge(array(\n 'alt' => $asset->getDescription() . ' ' . $asset->getCopyright(),\n 'title' => $asset->getDescription() . ' ' . $asset->getCopyright()\n ), $options);\n\n if($asset->isImage())\n {\n $src = $asset->getUrl($thumbnail_type, $relative_path);\n }\n else\n {\n if($thumbnail_type == 'full')\n {\n throw new sfAssetException('Impossible to render a non-image asset in an image tag');\n }\n else\n {\n switch($asset->getType())\n {\n case 'txt':\n $src = '/sfAssetsLibraryPlugin/images/txt.png';\n break;\n case 'xls':\n $src = '/sfAssetsLibraryPlugin/images/xls.png';\n break;\n case 'doc':\n $src = '/sfAssetsLibraryPlugin/images/doc.png';\n break;\n case 'pdf':\n $src = '/sfAssetsLibraryPlugin/images/pdf.png';\n break;\n case 'html':\n $src = '/sfAssetsLibraryPlugin/images/html.png';\n break;\n case 'archive':\n $src = '/sfAssetsLibraryPlugin/images/archive.png';\n break;\n case 'bin':\n $src = '/sfAssetsLibraryPlugin/images/bin.png';\n break;\n default:\n $src = '/sfAssetsLibraryPlugin/images/unknown.png';\n }\n }\n }\n return image_tag($src, $options);\n}", "public function getFilters(): array\n {\n return [\n new TwigFilter('sonata_urlsafeid', [$this, 'getUrlsafeIdentifier']),\n ];\n }", "function st_asset($file, $echo = false){\r $file = ST_THEME_URL.'assets/'.$file;\r if($echo){\r echo $file;\r }else{\r return $file;\r }\r}", "function load_assets( $attr, $content ) {\n\tJetpack_Gutenberg::load_assets_as_required( FEATURE_NAME );\n\twp_localize_script(\n\t\t'jetpack-block-' . sanitize_title_with_dashes( FEATURE_NAME ),\n\t\t'imageCompareHandle',\n\t\tarray(\n\t\t\t'msg' => __( 'Slide to compare images', 'jetpack' ),\n\t\t)\n\t);\n\tif ( Blocks::is_amp_request() ) {\n\t\t$content = preg_replace(\n\t\t\t'#<div class=\"juxtapose\".+?</div>#s',\n\t\t\trender_amp( $attr ),\n\t\t\t$content\n\t\t);\n\t}\n\n\treturn $content;\n}", "public function onTwigSiteVariables()\n {\n }", "function twig_html_to_text(string $string): string\n{\n $string = preg_replace('/<a[^>]*>/', '', $string);\n $string = str_replace('</a>', '', $string);\n $string = str_replace('<b>', '', $string);\n $string = str_replace('</b>', '', $string);\n $string = str_replace('<i>', '', $string);\n $string = str_replace('</i>', '', $string);\n $string = str_replace('<u>', '', $string);\n $string = str_replace('</u>', '', $string);\n $string = str_replace('<li>', '', $string);\n $string = str_replace('</li>', '', $string);\n $string = preg_replace('/<p[^>]*>/', '', $string);\n $string = str_replace('</p>', '', $string);\n $string = preg_replace('/<style>[^<]*<\\/style>/', '', $string);\n\n // additional substitions\n $string = str_replace(\"\\\\\", \"\\\\\\\\\", $string);\n $string = str_replace(\"\\r\", '', $string);\n $string = str_replace(\"\\n\", '', $string);\n $string = str_replace('<br>', \"\\n\", $string);\n $string = str_replace('<br\\>', \"\\n\", $string);\n $string = str_replace('<hr>', \"---\\n\", $string);\n $string = str_replace('&nbsp;', ' ', $string);\n return $string;\n}", "protected static function getFacadeAccessor() { return 'parse.twig'; }", "public function functional_asset_path() {\n\n\t\t$log_path = WP_CONTENT_DIR . '/uploads/nginx-helper/';\n\n\t\treturn apply_filters( 'nginx_asset_path', $log_path );\n\n\t}", "public function instagram()\n {\n # Get Verses\n # TODO : Make Random\n $verses = $this->getDoctrine()->getRepository(Verse::class)\n ->findAll();\n\n return $this->render('components/_instagram-area.html.twig', [\n 'verses' => $verses\n ]);\n\n }", "public function getFilters()\n\t{\n\t\treturn array(\n\t\t\tnew \\Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),\n\t\t\t// @deprecated 3.2.0 Uses twig's JS escape method instead of addslashes\n\t\t\tnew \\Twig_SimpleFilter('addslashes', 'addslashes'),\n\t\t);\n\t}", "function dunkdog_template_filter( $template_path ) { \n\tif(is_search()){\n\t\treturn $template_path;\n\t}\n\n\t$type = get_post_type(); \n if ( ( $type == 'dd-player' ) || ( $type == 'dd-team' ) || ( $type == 'dd-player-ranking' ) || ($type == 'dd-team-ranking' ) ){\n if ( is_single() ) {\n \t$prefix = 'single';\n }\n if ( is_archive()){\n \t$prefix = 'archive';\n }\n if ( is_tax()){\n \t$prefix = 'taxonomy';\n\n \t// if(get_query_var('taxonomy')=='dd-conference'){\n \t// \t$type = 'dd-team';\n \t// }else{\n \t\t$type = 'dd-player'; // forcing tax to be player; no other need for team or ranking taxonomy\n \t// }\n }\n\n $template_path = dunkdog_template_function($prefix . '-' . $type, false);\n \n }\n \n if(DD_DEBUG){global $wp_query; krumo('template_path', $template_path, $prefix, $type, $wp_query);}\n\treturn $template_path;\n}", "public static function asset(string $path): string\n {\n /*\n to DOOOO\n viewNamespaceToPath => /images/prova.png\n viewNamespaceToDir => c:\\var\\wwww\\test\\images\\prova.png\n viewNamespaceToAsset => http://example.com/images/prova.png\n */\n // dddx(\\Module::asset('blog:img/logo.img')); //localhost/modules/blog/img/logo.img\n\n if (Str::startsWith($path, 'https://')) {\n return $path;\n }\n if (Str::startsWith($path, 'http://')) {\n return $path;\n }\n\n if (File::exists(public_path($path))) {\n return $path;\n }\n\n if (Str::startsWith($path, '/theme/pub')) {\n $path = 'pub_theme::'.Str::after($path, '/theme/pub');\n }\n\n if (Str::startsWith($path, 'theme/pub')) {\n $path = 'pub_theme::'.Str::after($path, 'theme/pub');\n }\n\n $ns = Str::before($path, '::');\n $ns_after = Str::after($path, '::');\n if ($ns === $path) {\n $ns = inAdmin() ? 'adm_theme' : 'pub_theme';\n }\n\n $ns_after0 = Str::before($ns_after, '/');\n $ns_after1 = Str::after($ns_after, '/');\n $ns_after = str_replace('.', '/', $ns_after0).'/'.$ns_after1;\n\n if (Str::startsWith($ns_after, '/')) {\n $ns_after = Str::after($ns_after, '/');\n }\n if (\\in_array($ns, ['pub_theme', 'adm_theme'], true)) {\n $theme = config('xra.'.$ns);\n\n $filename_from = self::fixPath(base_path('Themes/'.$theme.'/Resources/'.$ns_after));\n // $filename_from = Str::replace('/Resources//', '/Resources/', $filename_from);\n $asset = 'themes/'.$theme.'/'.$ns_after;\n $filename_to = self::fixPath(public_path($asset));\n $asset = Str::replace(url(''), '', asset($asset));\n\n if (! File::exists($filename_to)) {\n if (! File::exists(\\dirname($filename_to))) {\n File::makeDirectory(\\dirname($filename_to), 0755, true, true);\n }\n try {\n File::copy($filename_from, $filename_to);\n } catch (\\Exception $e) {\n throw new \\Exception('message:['.$e->getMessage().']\n path :['.$path.']\n file from ['.$filename_from.']\n file to ['.$filename_to.']');\n }\n }\n Assert::string($asset, 'wip');\n\n return $asset;\n }\n\n $module_path = Module::getModulePath($ns);\n if (Str::endsWith($module_path, '/')) {\n $module_path = Str::beforeLast($module_path, '/');\n }\n $filename_from = self::fixPath($module_path.'/Resources/'.$ns_after);\n $asset = 'assets/'.$ns.'/'.$ns_after;\n $filename_to = self::fixPath(public_path($asset));\n $asset = Str::replace(url(''), '', asset($asset));\n if (! File::exists($filename_from)) {\n throw new \\Exception('file ['.$filename_from.'] not Exists , path ['.$path.']');\n }\n\n // dddx(app()->environment());// local\n if (! File::exists($filename_to) || 'production' !== app()->environment()) {\n if (! File::exists(\\dirname($filename_to))) {\n File::makeDirectory(\\dirname($filename_to), 0755, true, true);\n }\n // 105 If condition is always true.\n // if (File::exists($filename_from)) {\n File::copy($filename_from, $filename_to);\n // }\n }\n Assert::string($asset, 'wip');\n\n return $asset;\n\n // return asset(self::viewNamespaceToAsset($path));\n }", "function asset($path) {\n echo getAbsolutePath() . \"public/$path\";\n}", "public function getFilters(): array\n {\n return [\n new \\Twig_SimpleFilter('extract', [$this, 'extract']),\n ];\n }", "protected function getTwigFilters()\n\t{\n\t\t$filters = [];\n\n\t\t// rex_i18n::translate\n\t\t$filters[] = new Twig_SimpleFilter('translate', function ($string) {\n \t\treturn rex_i18n::translate($string);\n\t\t});\n\n\t\t// rex_i18n::msg\n\t\t$filters[] = new Twig_SimpleFilter('msg', function ($string, array $arguments = []) {\n\t\t\treturn call_user_func_array(array('rex_i18n', 'msg'), array_merge(array($string), $arguments));\n\t\t}, array('is_variadic' => true));\n\n\t\t// any rexXXX::getYYY() method\n\t\t$filters[] = new Twig_SimpleFilter('get*', function ($name, $class = null) {\n\t\t\t$method = 'get' . $name;\n\n\t\t\tif(is_object($class) && substr(get_class($class), 0, 3) == 'rex')\n\t\t\t{\n\t\t\t\tif(method_exists($class, $method))\n\t\t\t\t{\n\t\t\t\t\t$arguments = func_get_args() > 2 ? array_slice(func_get_args(), 2) : [];\n\n\t\t\t\t\treturn call_user_func_array(array($class, $method), $arguments);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\t// any rexXXX::hasYYY() method\n\t\t$filters[] = new Twig_SimpleFilter('has*', function ($name, $class = null) {\n\t\t\t$method = 'has' . $name;\n\n\t\t\tif(is_object($class) && substr(get_class($class), 0, 3) == 'rex')\n\t\t\t{\n\t\t\t\tif(method_exists($class, $method))\n\t\t\t\t{\n\t\t\t\t\t$arguments = func_get_args() > 2 ? array_slice(func_get_args(), 2) : [];\n\n\t\t\t\t\treturn call_user_func_array(array($class, $method), $arguments);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t});\n\n\t\treturn array_merge($filters, $this->twig_filter);\n\t}", "function pixtulate_type_filter ( $content ) {\r\n\t$post_type = get_post_type();\r\n\r\n\tif($post_type == 'page' || $post_type == 'post') {\r\n\t\t$pixtulate_connector = get_option ( 'pixtulate_connector' );\r\n\t\t$base_url = get_site_url();\r\n\r\n\t\t$base_url_arr = parse_url($base_url);\r\n\r\n\t\tif ($base_url_arr[path]) {\r\n\t\t\t$base_url_mod = $base_url_arr[scheme]. '\\:\\/\\/' .$base_url_arr[host]. '\\\\' .$base_url_arr[path];\r\n\t\t} else {\r\n\t\t\t$base_url_mod = $base_url_arr[scheme]. '\\:\\/\\/' .$base_url_arr[host];\r\n\t\t}\r\n\r\n\t\tif($pixtulate_connector == $base_url)\r\n\t\t\treturn preg_replace(\"/(src=\\\")(.*)([^>]*)(\".$base_url_mod.\"\\/)/\", \"data-$1$2$3\", $content);\r\n\t\t\t// return preg_replace(\"/(src=\\\")(.*)([^>]*)/\", \"data-$1$2$3\", $content);\r\n\t\telse\r\n\t\t\treturn preg_replace(\"/(src=\\\")(.*)([^>]*)(uploads\\/)/\", \"data-$1$3\", $content);\r\n\t}\r\n}", "function my_asset($path = null)\n{\n return route('homepage') . env('ASSET_URL') . '/' . $path;\n}", "public function onTwigSiteVariables()\n {\n $this->grav['assets']->addJs('plugin://shoppingcart-shipping-payment-method/service/script.js');\n }", "public function tags()\n\t{\n\t\t$tags = '';\n\n\t\tif ($this->collection->shouldCombine())\n\t\t{\n\t\t\t$tags = $this->tag($this->collection->cacheFileUrl);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($this->collection->items as $asset)\n\t\t\t{\n\t\t\t\t$tags .= $this->tag($asset->url);\n\t\t\t}\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function beforeRender() {\n\t\t$this->registerAssets();\n\t}", "public function filterDump(AssetInterface $asset)\n {\n $targetPath = '/bundles/lokosshop';\n\n $content = $this->filterReferences(\n $asset->getContent(),\n function ($matches) use ($targetPath) {\n $url = $matches['url'];\n\n if (strpos($url, 'http') === 0) {\n return 'url(\"'.$url.'\")';\n }\n\n if (strpos($url, '../') === 0 && (strpos($url, '/images/') !== false)) {\n $path = $targetPath.substr($url, strpos($url, '/images/'));\n\n return str_replace($url, $path, $matches[0]);\n }\n\n if (strpos($url, '../') === 0 && (strpos($url, '/fonts/') !== false)) {\n $path = $targetPath.substr($url, strpos($url, '/fonts/'));\n\n return str_replace($url, $path, $matches[0]);\n }\n\n return $url;\n }\n );\n\n $asset->setContent($content);\n }", "public function render()\n {\n $brandImage = config('laravolt.ui.brand_image');\n $isSvg = Str::of($brandImage)->startsWith('<svg');\n\n if (!$brandImage) {\n $brandImage = 'laravolt/img/default/logo.png';\n }\n\n return view('laravolt::components.brand-image', compact('brandImage', 'isSvg'));\n }", "function _add_template_loader_filters()\n {\n }", "function tripal_views_views_pre_render(&$view) {\n\n // We need to unset the exposed_input for the view so we can repopulate that\n // variable. This is necessary if we're using the file_upload_combo\n // custom form element which adds the file_path variable to the $_GET after the\n // view has populated the $view->exposed_input variable\n unset($view->exposed_input);\n\n // Add css if tripal admin tagged view\n if ($view->tag == 'tripal admin') {\n $tripal_admin_view_css = drupal_get_path('module', 'tripal_views') . '/theme/css/tripal_views_admin_views.css';\n drupal_add_css($tripal_admin_view_css);\n }\n\n}", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( new Twig_SimpleFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n\t\treturn $twig;\n\t}", "public function getFilters()\n {\n $filters = array(\n // formatting filters\n new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('format', 'sprintf'),\n new Twig_SimpleFilter('replace', 'strtr'),\n new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('abs', 'abs'),\n // encoding\n new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'),\n new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'),\n new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'),\n // string filters\n new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('upper', 'strtoupper'),\n new Twig_SimpleFilter('lower', 'strtolower'),\n new Twig_SimpleFilter('striptags', 'strip_tags'),\n new Twig_SimpleFilter('trim', 'trim'),\n new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),\n // array helpers\n new Twig_SimpleFilter('join', 'twig_join_filter'),\n new Twig_SimpleFilter('split', 'twig_split_filter'),\n new Twig_SimpleFilter('sort', 'twig_sort_filter'),\n new Twig_SimpleFilter('merge', 'twig_array_merge'),\n new Twig_SimpleFilter('batch', 'twig_array_batch'),\n // string/array filters\n new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)),\n new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)),\n new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)),\n // iteration and runtime\n new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),\n new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'),\n // escaping\n new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n );\n if (function_exists('mb_get_info')) {\n $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true));\n $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true));\n }\n return $filters;\n }", "public function filters()\n {\n return [\n 'src' => \"trim\"\n ];\n }", "function twig_age_filter($birthdate)\n{\n if (!$birthdate instanceof \\DateTime) $birthdate = new \\DateTime($birthdate);\n $age = $birthdate->diff(new \\DateTime())->y;\n\n return $age;\n}", "public function getFilters()\n {\n return array(\n 'sortable' => new \\Twig_Filter_Method($this, 'sortable', array('is_safe' => array('html'))),\n 'paginate' => new \\Twig_Filter_Method($this, 'paginate', array('is_safe' => array('html')))\n );\n }", "function asset_url() {\n return url(\"/\");\n }", "public function before_render() {}", "function asset($name) {\n $url;\n\n if (config('mode') === 'development') {\n $url = config('asset_url') . $name;\n } else {\n $url = config('app_url') . $name;\n }\n\n return $url;\n}", "public function onAssetsInitialized(): void\n {\n $isProduction = $this->config->get(\"plugins.$this->name.isProduction\", true);\n $minified = $isProduction ? '.min' : '';\n\n /** @var Assets */\n $assets = $this->grav['assets'];\n\n $assets->addCss(\"plugin://{$this->name}/css/style$minified.css\");\n $assets->addJs(\n \"plugin://{$this->name}/js/taxonomy-filter$minified.js\",\n ['group' => 'head', 'position' => 'after', 'loading' => 'defer']\n );\n $assets->addInlineJs(\n \"const taxonomyFilters = \" . json_encode($this->routes),\n ['group' => 'head', 'position' => 'after']\n );\n }", "public function getFilters()\n\t{\n\t\treturn [\n\t\t\tnew \\Twig_SimpleFilter('basename', 'basename'),\n\t\t\tnew \\Twig_SimpleFilter('get_class', 'get_class'),\n\t\t\tnew \\Twig_SimpleFilter('json_decode', 'json_decode'),\n\t\t\tnew \\Twig_SimpleFilter('_', 'echo'),\n\t\t];\n\t}", "protected function getWpraLinkFilter()\n {\n $name = 'wpralink';\n $callback = function ($text, $url, $flag, $options) {\n if (!$flag) {\n return $text;\n }\n\n return sprintf('<a %s>%s</a>', $this->prepareLinkAttrs($url, $options), $text);\n };\n $options = [\n 'is_safe' => ['html'],\n ];\n\n return new TwigFilter($name, $callback, $options);\n }", "function add_to_twig($twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\treturn $twig;\n\t}", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "function render_block_core_tag_cloud($attributes)\n {\n }", "function twig_constant($constant, $object = null)\n{\n if (null !== $object) {\n $constant = get_class($object).'::'.$constant;\n }\n return constant($constant);\n}", "function asset($name = null)\n {\n $document = explode('/', rtrim(app('http.request')->uri, \"/\"));\n $document = end($document);\n\n $defaultPath = $document === 'public' ? 'assets/' : 'public/assets/';\n\n $packpage = new \\Anonym\\Assets\\VersionPackpage('', '%f', $defaultPath);\n return $name !== null ? $packpage->getUrl($name) : $defaultPath;\n }", "protected function getWpraFunction()\n {\n return new TwigFunction('wpra', 'wpra_container');\n }", "public function assets() {\n\t\tif ($this->assetsLoaded) {\n\t\t\treturn '';\n\t\t}\n\t\t$this->assetsLoaded = true;\n\t\treturn ''.\n\t\t\t$this->Html->script($this->assetsPath . 'bootstrap-typeahead.js', $this->assetsOptions);\n\t}", "public function generate()\n {\n \n if (TL_MODE == 'BE') {\n $template = new \\BackendTemplate('be_wildcard');\n \n $template->wildcard = 'pdfbo';\n //$template->title = $this->headline;\n $template->title = \"\";\n $template->id = $this->id;\n $template->link = $this->name;\n $template->href = 'contao?do=themes&amp;table=tl_module&amp;act=edit&amp;id='.$this->id;\n \n return $template->parse();\n }\n \n return parent::generate();\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n\n\t\t$function = new Twig_SimpleFunction('get_post_format', function($id) {\n\t\t\treturn get_post_format($id);\n\t\t});\n\t\t$twig->addFunction($function);\n\n\t\t$get_theme_mod = new Twig_SimpleFunction('get_theme_mod', function($id) {\n\t\t\treturn get_theme_mod($id);\n\t\t});\n\t\t$twig->addFunction($get_theme_mod);\n\n $gustav_comment_form = new Twig_SimpleFunction('gustav_comment_form', function($id) {\n $args = array(\n 'fields' => array(\n 'author' => '<div class=\"form-group\"><label for=\"author\">' . __( 'Name' ) . '</label><input id=\"author\" class=\"form-control\" name=\"author\" type=\"text\" value=\"\" /></div>',\n 'email' => '<div class=\"form-group\"><label for=\"email\">' . __( 'Email' ) . '</label> ' .\n \t '<input id=\"email\" class=\"form-control\" name=\"email\" type=\"text\" value=\"\" /></div>',\n \t 'url' => '<div class=\"form-group\"><label for=\"url\">' . __( 'Website' ) . '</label>' .\n \t '<input id=\"url\" class=\"form-control\" name=\"url\" type=\"text\" value=\"\" /></div>',\n ),\n 'comment_field' => '<div class=\"form-group\"><label for=\"comment\">' . _x( 'Comment', 'noun' ) . '</label><textarea id=\"comment\" class=\"form-control\" name=\"comment\" aria-required=\"true\"></textarea></p>',\n 'class_submit' => 'btn btn-default',\n 'title_reply' => null\n );\n\n ob_start();\n comment_form($args, $id);\n $output = ob_get_contents();\n ob_end_clean();\n\n return $output;\n });\n $twig->addFunction($gustav_comment_form);\n\n return $twig;\n }", "public function getName()\n {\n return 'assets';\n }", "public function getName()\n {\n return 'assets';\n }", "public function composer_additional_assets() { ?>\n\n <script id=\"cv-builder-cv_blog-script\">\n (function($){\n \"use strict\";\n\n $(document).on( 'cv-composer-load-cv_blog', function() {\n\n var $modal = $('#cv-composer-absolute-container').children().last();\n var $styleControl = $modal.find('.control-style select');\n var $columnsControl = $modal.find('.control-masonry_columns');\n\n $styleControl.on( 'change', function() {\n\n var val = $styleControl.val();\n\n // Show/hide columns control\n if ( 'masonry' === val ) {\n $columnsControl.fadeIn();\n }\n else {\n $columnsControl.hide();\n }\n\n }).trigger('change');\n });\n })(jQuery);\n </script>\n\n <?php }", "function admin_asset(string $path = ''): string\n {\n return Admin::app()->asset($path);\n }", "function asset($component)\n{\n echo \"resources/$component\";\n}", "public function render_asset_tag($type, $name, $data = array())\n\t{\n\t\t$validated_data = $this->_validate_asset_data($type, $name, $data);\n\n\t\treturn $this->_build_assets_tags($type, $this->_combine_assets($type, array($name => $validated_data)), FALSE);\n\t}", "public function getCode()\n {\n return 'resource_to_asset';\n }", "public function getName()\r\n {\r\n return 'geschke_translatorgui_bundle_twig_extension';\r\n }", "function getAccueil($sub_path = 'portfolio') {\r\n include 'models/bdd.php';\r\n include 'models/twig.php';\r\n $retour_projets = $bdd->query(\"SELECT id, nom, img_desktop, contributeurs, description FROM projets\");\r\n $retour_data = $bdd->query('SELECT nom FROM projets');\r\n echo $twig->render(\r\n \"accueil.html.twig\", \r\n [\r\n \"data\" => $retour_data,\r\n \"projets\" => $retour_projets,\r\n 'sub_path' => $sub_path\r\n ]\r\n );\r\n}" ]
[ "0.624124", "0.61871594", "0.6012887", "0.5906205", "0.58823305", "0.58775187", "0.58203185", "0.57720083", "0.5765488", "0.57581127", "0.56353873", "0.556471", "0.556471", "0.556471", "0.5471461", "0.5469218", "0.545421", "0.543704", "0.5433962", "0.5419945", "0.5384254", "0.5374018", "0.5356994", "0.5356092", "0.53521836", "0.5340563", "0.5321026", "0.531519", "0.52743727", "0.5256635", "0.5251484", "0.5251299", "0.5217402", "0.5215397", "0.5211808", "0.52071714", "0.51818585", "0.5147644", "0.51412475", "0.513692", "0.5130996", "0.5127453", "0.51152307", "0.5115149", "0.5104678", "0.50955", "0.5092479", "0.5090673", "0.5083198", "0.5067412", "0.50642776", "0.5047947", "0.504554", "0.50453734", "0.504046", "0.5034504", "0.5033094", "0.5027383", "0.50175923", "0.5011203", "0.50105906", "0.5005733", "0.5005583", "0.499099", "0.49906453", "0.49843198", "0.49825963", "0.49778488", "0.49639246", "0.4962521", "0.49515882", "0.49495378", "0.49424717", "0.49350506", "0.49319664", "0.49295694", "0.49270207", "0.49253997", "0.49242637", "0.49216443", "0.4920478", "0.492025", "0.4908957", "0.49029166", "0.49012738", "0.48963335", "0.48953778", "0.48795328", "0.4873901", "0.48708746", "0.48666757", "0.4864137", "0.4861907", "0.4861907", "0.4860722", "0.4853713", "0.485039", "0.48454332", "0.48441407", "0.48349637", "0.483179" ]
0.0
-1
Get Gigazone info block
public function getGigazoneInfo($attributes) { $attr = shortcode_atts(array( 'wrap_tag' => 'div', 'wrap_class' => 'gigazone-info', ), $attributes); wp_enqueue_style('gigazone-info', get_bloginfo('stylesheet_directory') . '/css/gigazone.css'); return $this->getInfo( array_merge( $attr, [ 'uri' => GigaZoneFromPaulBunyan::PBC_PATH . '/gigazone/index.html', 'class' => 'GigaZone\\Info\\GigaZoneFromPaulBunyan' ] ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBlockInfo();", "function groom_block_info()\n{\n $blocks['groom_calendar_standard'] = array(\n 'info' => t('Calendrier Groom - Standard'),\n );\n $blocks['groom_calendar_solo'] = array(\n 'info' => t('Calendrier Groom - Solo'),\n );\n $blocks['groom_calendar_vip'] = array(\n 'info' => t('Calendrier Groom - VIP'),\n );\n\n return $blocks;\n}", "public function getInfoBlock()\n {\n $k = 'info_block';\n if (!$this->hasData($k)) {\n $blockName = $this->getPostInfoBlockName();\n if ($blockName) {\n $block = $this->getLayout()->getBlock($blockName);\n }\n\n if (empty($block)) {\n $block = $this->getLayout()->createBlock($this->_defaultPostInfoBlock, uniqid(microtime()));\n }\n\n $this->setData($k, $block);\n }\n\n return $this->getData($k)->setPost($this->getPost());\n }", "public function getInfo();", "public function getInfoHtml()\n {\n return $this->getInfoBlock()->toHtml();\n }", "public function getInfo() {}", "public function getInfo() {}", "function tammuz_block_info() {\r\n\t$blocks = array();\r\n\t\r\n\r\n\t$blocks['add_journey'] = array(\r\n\t\t// The name that will appear in the block list.\r\n\t\t'info' => t('Add a journey to the customer'),\r\n\t\t// Default setting.\r\n\t\t'cache' => DRUPAL_CACHE_PER_ROLE,\r\n\t);\r\n\treturn $blocks;\r\n}", "function getInfo();", "public function getinfo() { \n return $this->bitcoin->getinfo();\n }", "public function getGigazoneInfoThatIsNotCachedFromGetInfo()\n {\n $driver = \\Mockery::mock();\n $pool = \\Mockery::mock();\n $pool->shouldReceive('save');\n $item = \\Mockery::mock();\n $item->shouldReceive('isMiss')->andReturn(true);\n $item->shouldReceive('lock');\n $item->shouldReceive('expiresAfter');\n $item->shouldReceive('set');\n $pool->shouldReceive('getItem')->andReturn($item);\n $info = new GigaZoneFromPaulBunyan(['pool' => $pool, 'uri' => GigaZoneFromPaulBunyan::PBC_PATH . '/gigazone/index.html']);\n\n $get = $info->getInfo();\n $this->assertContains('GigaZone', $get);\n }", "public function getInfo ()\n {\n return $this->info;\n }", "public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\n\t{\n\t\treturn $this->info;\n\t}", "public function getInfo()\r\n {\r\n return $this->info;\r\n }", "public function getInformation();", "public function info() {\n\t\tglobal $db,$dbprefix;\n\t\t$query = \"SELECT \" . $dbprefix . \"keg_statuses.status, \" . $dbprefix . \"locations.location, \" . $dbprefix . \"keg_sizes.size, \" . $dbprefix . \"beers.beer, \" . $dbprefix . \"keg_warnings.warning FROM \" . $dbprefix . \"kegs INNER JOIN \" . $dbprefix . \"keg_statuses ON \" . $dbprefix . \"kegs.status=\" . $dbprefix . \"keg_statuses.id INNER JOIN \" . $dbprefix . \"locations ON \" . $dbprefix . \"kegs.location=\" . $dbprefix . \"locations.id INNER JOIN \" . $dbprefix . \"keg_sizes ON \" . $dbprefix . \"kegs.size=\" . $dbprefix . \"keg_sizes.id LEFT OUTER JOIN \" . $dbprefix . \"beers ON \" . $dbprefix . \"kegs.beer=\" . $dbprefix . \"beers.id LEFT OUTER JOIN \" . $dbprefix . \"keg_warnings ON \" . $dbprefix . \"kegs.warning=\" . $dbprefix . \"keg_warnings.id WHERE \" . $dbprefix . \"kegs.id=\" . $this->id . \" AND \" . $dbprefix . \"kegs.size=\" . $this->size;\n\t\tif (!($result = $db->query($query))) {\n\t\t\techo \"<p>Error getting info for keg \" . $this->id . \": #\" . $db->errno . \": \" . $db->error . \"</p>\\r\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t$row = $result->fetch_assoc();\n\n\t\techo \"<h2>\" . $row['size'] . \" keg #\" . $this->id . \"</h2>\\r\";\n\t\techo \"<p><strong>Status</strong>: \" . $row['status'] . \"<br />\\r\";\n\t\techo \"<strong>Beer</strong>: \";\n\t\techo ($row['beer']) ? $row['beer'] : \"(empty)\";\n\t\techo \"<br />\\r<strong>Location</strong>: \" . $row['location'] . \"</p>\\r\";\n\n\t\treturn TRUE;\n\t}", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInformation()\n {\n return $this->values[\"info\"];\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "public function info();", "public function info();", "public function get_info()\n {\n return $this->_request('getinfo');\n }", "function info() {\n\t \treturn $this->description;\n\t }", "function getInfo() {\n return array(\n 'author' => 'Sam Wilson',\n 'email' => '[email protected]',\n 'date' => '2012-03-10',\n 'name' => 'Proofread Page',\n 'desc' => 'View images side-by-side with pages, for viewing and editing.',\n 'url' => 'http://www.dokuwiki.org/plugin:proofreadpage',\n );\n }", "public function getGaid();", "public function getMiningInfo();", "public function getInfo()\n {\n return self::_mapFacebookInfo($this->getInfo_Raw());\n }", "function qodef_re_marker_info_template() {\n\n $html = '<script type=\"text/template\" class=\"qodef-info-window-template\">\n\t\t\t\t<div class=\"qodef-info-window\">\n\t\t\t\t\t<div class=\"qodef-info-window-inner\">\n\t\t\t\t\t\t<a href=\"<%= itemUrl %>\"></a>\n\t\t\t\t\t\t<% if ( featuredImage ) { %>\n\t\t\t\t\t\t\t<div class=\"qodef-info-window-image\">\n\t\t\t\t\t\t\t\t<img src=\"<%= featuredImage[0] %>\" alt=\"<%= title %>\" width=\"<%= featuredImage[1] %>\" height=\"<%= featuredImage[2] %>\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<% } %>\n\t\t\t\t\t\t<div class=\"qodef-info-window-details\">\n\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t<%= title %>\n\t\t\t\t\t\t\t</h5>\n\t\t\t\t\t\t\t<p><%= address %></p>\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</script>';\n\n print bridge_qode_get_module_part($html);\n\n }", "function rspgnome_getmoduleinfo(){\n\t$info = array(\n\t\t\"name\"=>\"The RSP gnome\",\n\t\t\"version\"=>\"0.9\",\n\t\t\"author\"=>\"Markus Wienhoefer\",\n\t\t\"category\"=>\"Forest Specials\",\n\t\t\"download\"=>\"core_module\",\n\t\t\"prefs\"=>array(\n\t\t\t\"playerpoints\"=>\"Player points at start of game,int|0\",\n\t\t\t\"gnomepoints\"=>\"Gnome points at start of game,int|0\",\n\t\t)\n\t);\n\treturn $info;\n}", "function getReturningBaggageInfo() {\n return $this->returningBaggageInfo;\n }", "public function info()\n {\n return $this->info;\n }", "public function info()\n {\n return $this->info;\n }", "public static function get_block_data()\n {\n }", "public function getInfo() {\n\t\t\t$rec = array(\n\t\t\t\t'ff' => array(\n\t\t\t\t\t'name' => 'Firefox',\n\t\t\t\t\t'href' => 'https://www.mozilla.org/en-US/firefox/new/',\n\t\t\t\t\t'ttl' => 'Open the Firefox download page.'\n\t\t\t\t),\n\t\t\t\t'gc' => array(\n\t\t\t\t\t'name' => 'Google Chrome',\n\t\t\t\t\t'href' => 'http://www.google.com/chrome/eula.html',\n\t\t\t\t\t'ttl' => 'Open the Google Chrome EULA page.'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$isValid = false;\n\t\t\t\n\t\t\tforeach ($rec as $key => $value) {\n\t\t\t\tif ($this->bc == $key) {\n\t\t\t\t\t$isValid = true;\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$isValid) {\n\t\t\t\t$this->bc = 'ff';\n\t\t\t}\n\t\t\t\n\t\t\t$info = array(\n\t\t\t\t'name' => $rec[$this->bc]['name'],\n\t\t\t\t'href' => $rec[$this->bc]['href'],\n\t\t\t\t'ttl' => $rec[$this->bc]['ttl']\n\t\t\t);\n\t\t\t\n\t\t\treturn $info;\n\t\t}", "public function getInfo()\n\t{\n\t\treturn $this->resource->get($this->name)->getContent();\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'zone', 'give_context', 'include_breadcrumbs', 'guid');\n return $info;\n }", "function get_global_content_blocks()\n {\n #global $db_settings, $pdo;\n $gcb_result = Database::$content->query(\"SELECT id, identifier, content FROM \".Database::$db_settings['gcb_table'].\" ORDER BY id ASC\");\n while($row = $gcb_result->fetch())\n {\n $gcb[$row['identifier']] = $row['content'];\n #if($row['content_formatting']==1) $gcb[$row['id']] = auto_html($gcb[$row['id']]);\n }\n if(isset($gcb))\n {\n return $gcb;\n }\n return false;\n }", "public function getInfo()\n {\n return self::jsonDecode($this->fields['info']->getValue());\n }", "public function getInfo()\n {\n $result = $this->client->GetInfo();\n if ($this->errorHandling($result, 'Could not get info from FRITZ!Box')) {\n return;\n }\n\n return $result;\n }", "public function getInfo()\n {\n if (!empty($this->info)) {\n return $this->info;\n }\n\n // fallback to seat information\n if (!empty($this->seat)) {\n return $this->seat->getDisplayname();\n }\n\n return null;\n }", "function getBuildingInfo() {\n return getOne(\"SELECT * FROM building WHERE id = ?\",[getLogin()['bid']]);\n}", "function getInfo()\n {\n $info = parent::info();\n $info['name'] = 'GlossaryFilters';\n $info['class'] = 'org.minervaeurope.museoweb.GlossaryFilters';\n $info['package'] = 'Museo&Web CMS';\n $info['version'] = '1.0.0';\n $info['author'] = 'Daniele Ugoletti, Gruppo Meta';\n $info['author-email'] = '[email protected]';\n $info['url'] = 'http://www.minervaeurope.org';\n return $info;\n }", "public function info(): string;", "public function getInformation()\n {\n return $this->information;\n }", "public static function getInfo()\n {\n return [\n 'name' => __('carrier_sdek'),\n 'tracking_url' => 'https://new.cdek.ru/tracking?order_id=%s',\n ];\n }", "public function getInfo()\r\n {\r\n return $this->setNuki(\r\n __FUNCTION__\r\n );\r\n }", "public static function getInfo(){\n \t$COINS = \\Config::get('coins');\n\t\t$dogecoin = new \\Dogecoin($COINS['DOGE']['USER'],$COINS['DOGE']['PASS'],$COINS['DOGE']['IP'],$COINS['DOGE']['PORT'],'http');\n\t\t$data = $dogecoin->getinfo();\n\t return $data;\n\t}", "public function getGP() {\n\t\t\treturn \"<p>GP: \".$this->gp.\"</p>\";\n\t\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts'; \n\t\t$info['hacked_by']=NULL; \n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function getInfo(){\n return array(\n 'author' => 'seism',\n 'email' => '[email protected]',\n 'date' => '2011-5-1',\n 'name' => 'Embed GitHub Plugin',\n 'desc' => 'Show a GitHUb widget in your wiki',\n 'url' => 'http://www.dokuwiki.org/wiki:plugins',\n );\n }", "public function getInfo()\n {\n return $this->lastInfo;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\treturn $info;\n\t}", "public static function getInfo(){ //функция для получения массива общей информации из бд\n \n $db = Db::getConnection(); //инициализируем подключение к бд\n \n $info = array(); //инициализируем переменную \n \n $result = $db->query('SELECT * FROM info'); // получаем из базы список\n \n $result->setFetchMode(PDO::FETCH_ASSOC);\n \n $row = $result->fetch();\n foreach ($row as $key => $value) { //перебираем массив полученный из бд и формируем массив для вывода на страницу сайта\n $info[$key] = $value;\n }\n \n return $info; //возвращаем массив\n }", "public static function returnInfo() {\n }", "abstract public function information();", "public abstract function getInfo () : string;", "public function info()\n {\n $info = array();\n $info['author'] = 'Philip Withnall';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 1;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'page', 'id');\n return $info;\n }", "public function getmininginfo(){\n return $this->bitcoin->getmininginfo();\n }", "function info()\n\t{\n\t\treturn array();\n\t}", "public function getInfo(){\n $info = $this->getData();\n $price = $this->getData('price');\n $info['formatted_price'] = $this->priceHelper->currency($price, true, false);\n $info['website'] = $this->websiteHelper->getWebsites();\n $info['customergroup'] = $this->customerGroupHelper->getCustomerGroups();\n\n return $info;\n }", "function gauntlet_getmoduleinfo(){\n\t$info = array(\n\t\t\"name\"=>\"The Gauntlet\",\n\t\t\"version\"=>\"1.1\",\n\t\t\"author\"=>\"`\\$Red Yates\",\n\t\t\"category\"=>\"Village\",\n\t\t\"download\"=>\"core_module\",\n\t\t\"settings\"=>array(\n\t\t\t\"The Gauntlet Settings,title\",\n\t\t\t\"visits\"=>\"Visits allowed per day (0 for unlimited),int|1\",\n\t\t\t\"visitsdk\"=>\"Visits allowed per dk (0 for unlimited),int|0\",\n\t\t\t\"goldcost\"=>\"Gold cost,int|250\",\n\t\t\t\"minhpadd\"=>\"Minimum maxhitpoints to add,int|2\",\n\t\t\t\"maxhpadd\"=>\"Maximum maxhitpoints to add,int|4\",\n\t\t\t\"mincharmcost\"=>\"Minimum charm cost,int|2\",\n\t\t\t\"maxcharmcost\"=>\"Maximum charm cost,int|5\",\n\t\t\t\"minturnscost\"=>\"Minimum turns cost,int|1\",\n\t\t\t\"maxturnscost\"=>\"Maximum turns cost,int|2\",\n\t\t\t\"minhpcost\"=>\"Minimum health cost in percent,range,0,100,5|10\",\n\t\t\t\"maxhpcost\"=>\"Maximum health cost in percent,range,0,100,5|35\",\n\t\t\t\"(At 100 players won't be killed but will be left with 1 hp.),note\",\n\t\t\t\"gauntletloc\"=>\"Village in which to be located,location|\".\n\t\t\t\t((is_module_active(\"cities\") && is_module_active(\"racetroll\"))?\n\t\t\t\t\tget_module_setting(\"villagename\",\"racetroll\"):\n\t\t\t\t\tgetsetting(\"villagename\", LOCATION_FIELDS)),\n\t\t\t\"carrydk\"=>\"Do max hitpoints gained carry across DKs?,bool|1\",\n\t\t),\n\t\t\"prefs\"=>array(\n\t\t\t\"The Gauntlet Preferences,title\",\n\t\t\t\"seen\"=>\"Times seen today,int|0\",\n\t\t\t\"seendk\"=>\"Times seen this dragonkill,int|0\",\n\t\t\t\"extrahps\"=>\"How many extra hitpoints has the user gained?,int\",\n\t\t),\n\t);\n\treturn $info;\n}", "protected function info()\n\t\t{\n\t\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Jason Verhagen';\n\t\t$info['organisation']='HolleywoodStudio.com';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=9;\n\t\t$info['locked']=false;\n\t\t$info['update_require_upgrade']=1;\n\t\t$info['parameters']=array('name','title','template_main','template_style','start_video','max_videos','orderby','embed_allowed','show_player','player_align','player_width','player_height','style','nothumbplayer','thumbnail','formorelead','formoretext','formoreurl');\n\t\treturn $info;\n\t}", "public function getGeneralInformation() {\n\t\tif (!$this->hasDetails) {\n\t\t\t$this->injectDetails();\n\t\t}\n\t\treturn $this->generalInformation;\n\t}", "function gloss_info()\n{\n\treturn array(\n\t\t\"name\" => \"Gloss code\",\n\t\t\"description\" => \"[gloss] code for linguistic texts\",\n\t\t\"website\" => \"http://github.com/rohkea/mybb-glosses\",\n\t\t\"author\" => \"Dmitry Kushnariov\",\n\t\t\"authorsite\" => \"http://github.com/rohkea/\",\n\t\t\"version\" => \"1.00\",\n\t\t\"guid\" => \"34a6d11ef2094ff979e1a85e06e8119a\",\n\t\t\"compatibility\" => \"*\"\n\t);\n}", "public static function returnInfo() {\n ##\n }", "public static function returnInfo() {\n ##\n }", "public function getGigazoneInfoThatIsNotCached()\n {\n dd(\"Something\");\n $driver = \\Mockery::mock();\n $pool = \\Mockery::mock();\n $pool->shouldReceive('save');\n $item = \\Mockery::mock();\n $item->shouldReceive('isMiss')->andReturn(true);\n $item->shouldReceive('lock');\n $item->shouldReceive('expiresAfter');\n $item->shouldReceive('set');\n $pool->shouldReceive('getItem')->andReturn($item);\n $info = new GigaZoneFromPaulBunyan(['pool' => $pool, 'uri' => GigaZoneFromPaulBunyan::PBC_PATH . '/gigazone/index.html']);\n\n $get = $info->getGigazoneInfo();\n $this->assertContains('GigaZone', $get);\n }", "public function getPublicBlock() {\n return '';\n }", "function info()\n {\n $data = array(\n 'name' => \"MostViewed\",\n 'description' => \"List the most viewed contenttype\",\n 'keywords' => \"most viewed\",\n 'author' => \"Nacho Fernandez\",\n 'link' => \"http://www.fernandezsansalvador.es\",\n 'version' => \"0.1\",\n 'required_bolt_version' => \"1.4\",\n 'highest_bolt_version' => \"1.4\",\n 'type' => \"General\",\n 'first_releasedate' => \"2014-01-19\",\n 'latest_releasedate' => \"2014-01-19\",\n 'dependencies' => \"\",\n 'priority' => 10\n );\n\n return $data;\n\n }", "public function get_grid_info($info=null){\n\t\t\tif(isset($this->GridInfo) === false){\n\t\t\t\t$result = $this->makeCallToAPI('get_grid_info', true, null, array(\n\t\t\t\t\t'GridInfo' => array('object'=>array())\n\t\t\t\t));\n\n\t\t\t\t$this->GridInfo = WebUI\\GridInfo::f();\n\t\t\t\tforeach($result->GridInfo as $k=>$v){\n\t\t\t\t\t$this->GridInfo[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn (isset($info) && is_string($info) && ctype_graph($info)) ? $this->GridInfo[$info] : $this->GridInfo;\n\t\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('username', 'period', 'display', 'title', 'width', 'height');\n return $info;\n }", "public function info()\n {\n return $this->type('info');\n }", "public function getInfoBuffer()\n {\n return $this->infoBuffer;\n }", "public function getSplashBlock() {\r\n\t\t$html = '<p>Personnel handles the storing & presentation of faculty & staff records.</p>';\r\n\t\t$html .= '<p><b>Available Shortcode:</b><br /><code>[ofa-personnel][/ofa-personnel]</code></p>';\r\n\t\t$html .= '<p><b>Shortcode Attributes:</b><br /><code>view=\"list-all\"</code> (default)</br /><code>view=\"profile\"</code><br /><code>search=\"true\"</code><br /><code>search=\"false\"</code> (default)<br /><code>groupid=\"#\"</code> (The ID of the group to list)</p>';\r\n\t\treturn $html;\r\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n $info['parameters'] = array('param', 'limit', 'hot', 'date_key', 'username_key', 'title', 'check');\n return $info;\n }", "public function getInfo()\n\t{\n\t\treturn array();\n\t}", "public function getInfo()\n {\n $this->checkJMBG();\n\n $arr = array();\n $arr['jmbg'] = $this->getJMBG();\n $arr['valid'] = ($this->isValid()) ? 'true' : 'false';\n $arr['gender'] = $this->getGender();\n $arr['country'] = $this->getCountry();\n $arr['region'] = $this->getRegion();\n $arr['birth_date'] = $this->getBirthday('Y-m-d');\n $arr['birth_timestamp'] = $this->getBirthdayTimeStamp();\n $arr['age'] = $this->getAge();\n return $arr;\n }", "private function info() {\n $this->client->info();\n }", "public function getinfo()\n\t{\n\t\treturn $this->connect('getinfo');\n\t}", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=2;\n\t\t$info['locked']=false;\n\t\t$info['parameters']=array('root','sort','search','max','param','select','template_set','display_type');\n\t\treturn $info;\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 2;\n $info['locked'] = false;\n return $info;\n }", "function info()\n\t{\n\t\t$info=array();\n\t\t$info['author']='Chris Graham';\n\t\t$info['organisation']='ocProducts';\n\t\t$info['hacked_by']=NULL;\n\t\t$info['hack_version']=NULL;\n\t\t$info['version']=3;\n\t\t$info['locked']=true;\n\t\t$info['update_require_upgrade']=1;\n\t\treturn $info;\n\t}", "public function info()\n {\n $info = array();\n $info['author'] = 'Chris Graham';\n $info['organisation'] = 'ocProducts';\n $info['hacked_by'] = null;\n $info['hack_version'] = null;\n $info['version'] = 15;\n $info['locked'] = false;\n return $info;\n }" ]
[ "0.7077036", "0.64321584", "0.63295966", "0.62422055", "0.62365973", "0.6216665", "0.6216665", "0.61927336", "0.61782676", "0.6176385", "0.6061429", "0.60334307", "0.60310966", "0.60021585", "0.60021585", "0.5957673", "0.594172", "0.59319556", "0.5895099", "0.5895099", "0.5895099", "0.5895099", "0.5895099", "0.5895099", "0.5895099", "0.5819883", "0.5793344", "0.5793344", "0.5793344", "0.5793344", "0.5793344", "0.57835287", "0.57835287", "0.5782404", "0.572546", "0.5715937", "0.5708874", "0.5661304", "0.5652083", "0.56480217", "0.5630171", "0.5622022", "0.56209123", "0.56209123", "0.5619939", "0.560532", "0.5590198", "0.55851907", "0.55843866", "0.55803055", "0.5574395", "0.5567427", "0.5565063", "0.55620265", "0.5561331", "0.5541905", "0.55285066", "0.55138314", "0.55100435", "0.55057347", "0.55009884", "0.54871917", "0.54870933", "0.5477574", "0.5477574", "0.5477574", "0.54722106", "0.54646075", "0.5456967", "0.5448858", "0.54471403", "0.5437813", "0.54342645", "0.54338", "0.5425046", "0.542462", "0.5420316", "0.54095757", "0.54050547", "0.5393008", "0.5393008", "0.539097", "0.53849983", "0.5380398", "0.5379537", "0.5378826", "0.5376573", "0.5376357", "0.5369207", "0.5363706", "0.53597337", "0.5357416", "0.5355107", "0.53544503", "0.53509104", "0.5350204", "0.5350204", "0.5350204", "0.53388184", "0.5324113" ]
0.6316966
3
Form Fields short code For generating a form from short code values Example: [contactus new_line="," delimiter="|" questions="Your Name,Your Email|email" headings="A title prior to Your Name Field|yourname" inputs="yourname|name"]This is the form description[/contactus] In this example: The tag is "contactus", which will be in the "tag" key for the view The questions csv has a new line character of "," and a delimiter of "|" so if this was a csv file/string it would look like this: "Your Name", "Your Email"|"email", The first column is the field label and used as the field name run through slugify These values get parsed add applied to the "questions" key There's a title of "A title prior to Your Name Field" that gets applied prior to the "yourname" field The actual name of the input for "yourname" (slugify the label) will be "name" set in the inputs
public function formFieldsShortCode($attributes, $content, $tag) { /** @var string $questions */ /** @var string $special_questions */ /** @var string $new_line */ /** @var string $delimiter */ /** @var string $inputs */ /** @var string $headings */ $defaults = array( "name" => $tag, "questions" => "", "new_line" => ",", "delimiter" => "|", "inputs" => "", "headings" => "", "ids" => "", "special_questions" => "" ); $attr = shortcode_atts($defaults, $attributes); extract($attr); /** @var string $special_questions */ $special_questions = $attr['special_questions']; /** @var string $delimiter */ $delimiter = $attr['delimiter']; /** @var string $new_line */ $new_line = $attr['new_line']; /** @var string $name */ $name = $attr['name']; /** @var string $questions */ $questions = $attr['questions']; $context = self::get_context(); foreach (array_keys($defaults) as $default) { switch ($default) { case ('new_line'): case ('delimiter'): case ('legend'): break; case ('special_questions'): $context[$default] = strpos($special_questions, $delimiter) !== false ? explode($delimiter, $special_questions) : [$special_questions]; break; default: $this->parseCsv($context, $$default, $default, $delimiter, $new_line); break; } } $autoVersion = new AutoVersion; // add styles ass needed if (stripos($questions, 'range') !== false) { wp_enqueue_style( 'bootstrap-slider', '/../' . $autoVersion->file('/bower_components/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css') ); } if (stripos($questions, 'boolean') !== false) { wp_enqueue_style( 'bootstrap-switch', '/../' . $autoVersion->file('/bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css') ); } $context['name'] = $name; $context['new_line'] = $new_line; $context['delimiter'] = $delimiter; $context['action'] = '/app/' . $name; $context['method'] = 'POST'; $context['content'] = $content; $context['legend'] = Strings::formatForTitle(str_replace('-', ' ', $name)); $context['tag'] = $tag; $context['submitId'] = 'doFormSubmit'; return Timber::compile(['forms/form-template.twig'], $context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function formShort()\n {\n $form = new Form(new Category);\n\n $form->tab('Настройки', function($form){\n $form->display('id');\n $form->alias('alias','Алиас');\n $form->text('name','Название');\n });\n $form->tab('SEO', function($form){\n $form->textarea('seo_title','seo title');\n $form->textarea('seo_desc','seo description');\n $form->textarea('seo_key','seo keywords');\n\n });\n return $form;\n }", "public function getTemplateExample()\n\t{\n\t\t// start form\n\t\t$value = \"\\n\";\n\t\t$value .= '{form:' . $this->getName() . \"}\\n\";\n\n\t\t/**\n\t\t * At first all the hidden fields need to be added to this form, since\n\t\t * they're not shown and are best to be put right beneath the start of the form tag.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// is a hidden field\n\t\t\tif(($object instanceof SpoonFormHidden) && $object->getName() != 'form')\n\t\t\t{\n\t\t\t\t$value .= \"\\t\" . '{$hid' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . \"}\\n\";\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Add all the objects that are NOT hidden fields. Based on the existance of some methods\n\t\t * errors will or will not be shown.\n\t\t */\n\t\tforeach($this->getFields() as $object)\n\t\t{\n\t\t\t// NOT a hidden field\n\t\t\tif(!($object instanceof SpoonFormHidden))\n\t\t\t{\n\t\t\t\t// buttons\n\t\t\t\tif($object instanceof SpoonFormButton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$btn' . SpoonFilter::toCamelCase($object->getName()) . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// single checkboxes\n\t\t\t\telseif($object instanceof SpoonFormCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// multi checkboxes\n\t\t\t\telseif($object instanceof SpoonFormMultiCheckbox)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$chk' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.chk' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// dropdowns\n\t\t\t\telseif($object instanceof SpoonFormDropdown)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error} class=\"errorArea\"{/option:ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . '} {$ddm' . str_replace('[]', '', SpoonFilter::toCamelCase($object->getName())) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// imagefields\n\t\t\t\telseif($object instanceof SpoonFormImage)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpImageField}</span> {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// filefields\n\t\t\t\telseif($object instanceof SpoonFormFile)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$file' . SpoonFilter::toCamelCase($object->getName()) . '} {$file' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// radiobuttons\n\t\t\t\telseif($object instanceof SpoonFormRadiobutton)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<div{option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<p class=\"label\">' . SpoonFilter::toCamelCase($object->getName()) . '</p>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$rbt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<ul class=\"inputList\">' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\\t\" . '<li><label for=\"{$' . $object->getName() . '.id}\">{$' . $object->getName() . '.rbt' . SpoonFilter::toCamelCase($object->getName()) . '} {$' . $object->getName() . '.label}</label></li>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\\t\" . '{/iteration:' . $object->getName() . '}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '</ul>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</div>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// datefields\n\t\t\t\telseif($object instanceof SpoonFormDate)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpDateField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// timefields\n\t\t\t\telseif($object instanceof SpoonFormTime)\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} <span class=\"helpTxt\">{$msgHelpTimeField}</span> {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\n\t\t\t\t// textfields\n\t\t\t\telseif(($object instanceof SpoonFormPassword) || ($object instanceof SpoonFormTextarea) || ($object instanceof SpoonFormText))\n\t\t\t\t{\n\t\t\t\t\t$value .= \"\\t\" . '<p{option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error} class=\"errorArea\"{/option:txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '<label for=\"' . $object->getAttribute('id') . '\">' . SpoonFilter::toCamelCase($object->getName()) . '</label>' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\\t\" . '{$txt' . SpoonFilter::toCamelCase($object->getName()) . '} {$txt' . SpoonFilter::toCamelCase($object->getName()) . 'Error}' . \"\\n\";\n\t\t\t\t\t$value .= \"\\t\" . '</p>' . \"\\n\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $value . '{/form:' . $this->getName() . '}';\n\t}", "function form_shortcode( $atts ) {\n \n if ( isset( $atts['form'] ) ) {\n \n $form_id_or_key = $atts['form'];\n unset( $atts['form'] );\n \n ob_start();\n \n $this->render( $form_id_or_key, $atts );\n \n $output = ob_get_clean();\n \n return $output;\n \n }\n \n }", "function add_shortcode() {\n\t\tadd_shortcode( 'contact-form', array( 'Grunion_Contact_Form', 'parse' ) );\n\t\tadd_shortcode( 'contact-field', array( 'Grunion_Contact_Form', 'parse_contact_field' ) );\n\t}", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "function shortcode_field() {\n\n\t\t$shortcode = '[file id=\"' . get_the_ID() . '\" ]';\n\n\t\t?>\n\t\t<div class=\"misc-pub-section\">\n\t\t\t<label for=\"attachment_url\"><?php _e( 'File Shortcode:' ); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat urlfield\" readonly=\"readonly\" name=\"attachment_url\" value=\"<?php echo esc_attr($shortcode); ?>\" />\n\t\t</div>\n\t\t<?php\n\t}", "function wpcf7dtx_tag_generator($contact_form, $options = '')\r\n{\r\n $options = wp_parse_args($options);\r\n global $wpcf7_dynamic_fields_config;\r\n $type = $options['id'];\r\n $input_type = str_replace('dynamic_', '', $type);\r\n $utm_source = urlencode(home_url());\r\n $description = sprintf(\r\n __('Generate a form-tag for %s with a dynamic default value. For more details, see %s fields in the %s.', 'contact-form-7-dynamic-text-extension'),\r\n esc_html($wpcf7_dynamic_fields_config[$type]['description']), // dynamic description\r\n // Link to specific form-tag documentation\r\n sprintf(\r\n '<a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/form-tags/%s?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" title=\"%s\" target=\"_blank\" rel=\"noopener\">%s</a>',\r\n esc_attr(str_replace('_', '-', $type)), // URL component\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_attr__('View this form-tag on the DTX Documentation website', 'contact-form-7-dynamic-text-extension'), // Link title\r\n esc_html(ucwords(str_replace('_', ' ', $type))) // Link label\r\n ),\r\n // Link to general DTX documentation\r\n sprintf(\r\n '<a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" title=\"%s\" target=\"_blank\" rel=\"noopener\">%s</a>',\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_attr__('Go to DTX Documentation website', 'contact-form-7-dynamic-text-extension'),\r\n esc_html__('DTX knowledge base', 'contact-form-7-dynamic-text-extension')\r\n )\r\n );\r\n\r\n // Open Form-Tag Generator\r\n printf(\r\n '<div class=\"control-box dtx-taggen\"><fieldset><legend>%s</legend><table class=\"form-table\"><tbody>',\r\n wp_kses($description, array('a' => array('href' => array(), 'target' => array(), 'rel' => array(), 'title' => array()))) //Tag generator description\r\n );\r\n\r\n // Input field - Required checkbox (not available for some fields)\r\n if (!in_array($input_type, array('hidden', 'quiz', 'submit', 'reset'))) {\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-required'), // field id\r\n esc_html__('Field type', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'required',\r\n 'id' => $options['content'] . '-required'\r\n )),\r\n esc_html__('Required field', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n }\r\n\r\n // Input field - Field Name (not available for some fields)\r\n if (!in_array($input_type, array('submit', 'reset'))) {\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><input %s /></td></tr>',\r\n esc_attr($options['content'] . '-name'), // field id\r\n esc_html__('Name', 'contact-form-7-dynamic-text-extension'), // field label\r\n wpcf7_format_atts(array(\r\n 'type' => 'text',\r\n 'name' => 'name',\r\n 'id' => $options['content'] . '-name',\r\n 'class' => 'tg-name oneline',\r\n 'autocomplete' => 'off'\r\n ))\r\n );\r\n }\r\n\r\n // Input field - Dynamic value/options\r\n $value_name = __('Dynamic value', 'contact-form-7-dynamic-text-extension');\r\n $value_description = __('Can be static text or a shortcode.', 'contact-form-7-dynamic-text-extension');\r\n $value_placeholder = \"CF7_GET key='foo'\";\r\n $value_input_type = '<input %s />';\r\n switch ($input_type) {\r\n case 'textarea':\r\n $value_placeholder = \"CF7_get_post_var key='post_excerpt'\";\r\n $value_input_type = '<textarea %s></textarea>';\r\n break;\r\n case 'select':\r\n $value_name = __('Dynamic options', 'contact-form-7-dynamic-text-extension');\r\n $value_description .= ' ' . __('If static text, use one option per line. Can define static key/value pairs using pipes.', 'contact-form-7-dynamic-text-extension');\r\n $value_description .= ' ' . __('If shortcode, it must return only option or optgroup HTML and can override the first option and select default settings here.', 'contact-form-7-dynamic-text-extension');\r\n $value_placeholder = \"hello-world | Hello World\" . PHP_EOL . \"Foo\";\r\n $value_input_type = '<textarea %s></textarea>';\r\n break;\r\n case 'checkbox':\r\n case 'radio':\r\n $value_name = __('Dynamic options', 'contact-form-7-dynamic-text-extension');\r\n $value_description .= ' ' . __('If static text, use one option per line. Can define static key/value pairs using pipes.', 'contact-form-7-dynamic-text-extension');\r\n $value_description .= ' ' . __('If shortcode, it must return only option or optgroup HTML.', 'contact-form-7-dynamic-text-extension');\r\n $value_placeholder = \"hello-world | Hello World\" . PHP_EOL . \"Foo\";\r\n $value_input_type = '<textarea %s></textarea>';\r\n break;\r\n default: // All other text fields\r\n break;\r\n }\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td>' . $value_input_type . '<br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-values'), // field id\r\n esc_html($value_name), // field label\r\n wpcf7_format_atts(array(\r\n 'name' => 'values',\r\n 'id' => $options['content'] . '-values',\r\n 'class' => 'multiline',\r\n 'placeholder' => $value_placeholder,\r\n 'list' => 'dtx-shortcodes'\r\n )),\r\n esc_html($value_description),\r\n esc_attr($utm_source), // UTM source\r\n esc_attr($type), // UTM content\r\n esc_html__('View DTX shortcode syntax documentation', 'contact-form-7-dynamic-text-extension') // Link label\r\n );\r\n\r\n if ($input_type == 'select') {\r\n // Input field - Multiple selections checkbox\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-multiple'), // field id\r\n esc_html__('Multiple Options', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'multiple',\r\n 'id' => $options['content'] . '-multiple',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Allow user to select multiple options', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n\r\n // Input field - Include blank checkbox\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-include_blank'), // field id\r\n esc_html__('First Option', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'include_blank',\r\n 'id' => $options['content'] . '-include_blank',\r\n 'class' => 'include_blankvalue option'\r\n )),\r\n esc_html__('Insert a blank item as the first option', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n }\r\n\r\n // Input field - Dynamic placeholder (not available for some fields)\r\n if (!in_array($input_type, array('hidden', 'radio', 'checkbox', 'quiz', 'submit', 'reset'))) {\r\n $placeholder_description = '';\r\n if (in_array($input_type, array('select', 'checkbox', 'radio'))) {\r\n $placeholder_label = __('First Option Label', 'contact-form-7-dynamic-text-extension');\r\n $placeholder_description .= __('Optionally define a label for the first option.', 'contact-form-7-dynamic-text-extension') . ' ';\r\n } else {\r\n $placeholder_label = __('Dynamic placeholder', 'contact-form-7-dynamic-text-extension');\r\n }\r\n $placeholder_description .= __('Can be static text or a shortcode.', 'contact-form-7-dynamic-text-extension');\r\n $placeholder_input_type = $input_type == 'textarea' ? $value_input_type : '<input %s />';\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><input %s />' . $placeholder_input_type . '<br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/shortcodes/dtx-attribute-placeholder/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-placeholder'), // field id\r\n esc_html($placeholder_label), // field label\r\n wpcf7_format_atts(array(\r\n 'type' => 'hidden',\r\n 'name' => 'placeholder',\r\n 'class' => 'option'\r\n )),\r\n wpcf7_format_atts(array(\r\n 'name' => 'dtx-placeholder',\r\n 'id' => $options['content'] . '-placeholder', // field id\r\n 'class' => 'multiline dtx-option',\r\n 'placeholder' => \"CF7_get_post_var key='post_title'\",\r\n 'list' => 'dtx-shortcodes'\r\n )),\r\n esc_html($placeholder_description), // Small note below input\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_html__('View DTX placeholder documentation', 'contact-form-7-dynamic-text-extension') //Link label\r\n );\r\n }\r\n\r\n // Additional fields for select regarding placeholder options\r\n if ($input_type == 'select') {\r\n\r\n // Input field - Hide Blank Option\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label><br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/form-tags/dynamic-select/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-dtx_hide_blank'), // field id\r\n esc_html__('Hide First Option', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'dtx_hide_blank',\r\n 'id' => $options['content'] . '-dtx_hide_blank',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Hide the first blank option from being visible in the drop-down', 'contact-form-7-dynamic-text-extension'), // checkbox label\r\n esc_html__('Optional. Only works if \"First Option\" is checked.', 'contact-form-7-dynamic-text-extension'), // Small note below input\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_html__('View Dynamic Select documentation', 'contact-form-7-dynamic-text-extension') //Link label\r\n );\r\n\r\n // Input field - Disable Blank Option\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label><br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/form-tags/dynamic-select/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-dtx_disable_blank'), // field id\r\n esc_html__('Disable First Option', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'dtx_disable_blank',\r\n 'id' => $options['content'] . '-dtx_disable_blank',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Disable the first blank option from being selectable in the drop-down', 'contact-form-7-dynamic-text-extension'), // checkbox label\r\n esc_html__('Optional. Only works if \"First Option\" is checked.', 'contact-form-7-dynamic-text-extension'), // Small note below input\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_html__('View Dynamic Select documentation', 'contact-form-7-dynamic-text-extension') //Link label\r\n\r\n );\r\n } elseif (in_array($input_type, array('checkbox', 'radio'))) {\r\n // Additional fields for checkboxes and radio buttons\r\n\r\n // Input field - Checkbox Layout Reverse Option\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-label_first'), // field id\r\n esc_html__('Reverse', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'label_first',\r\n 'id' => $options['content'] . '-label_first',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Put a label first, an input last', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n\r\n // Input field - Label UI\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-use_label_element'), // field id\r\n esc_html__('Label', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'use_label_element',\r\n 'id' => $options['content'] . '-use_label_element',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Wrap each item with label element', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n\r\n // Input field - Exclusive Checkbox\r\n if ($input_type == 'checkbox') {\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-exclusive'), // field id\r\n esc_html__('Exclusive', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'exclusive',\r\n 'id' => $options['content'] . '-exclusive',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Make checkboxes exclusive', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n }\r\n }\r\n\r\n // Input field - Dynamic default value (not available for some fields)\r\n if (in_array($input_type, array('select'))) {\r\n $default_input_type = '<input %s />';\r\n $default_placeholder = '';\r\n if ($input_type == 'checkbox') {\r\n $default_input_type = '<textarea %s></textarea>';\r\n $default_description = __('Optionally define the default on/off status of the checkboxes by putting a 1 (checked) or 0 (not checked) on each line that corresponds with the options.', 'contact-form-7-dynamic-text-extension') . ' ';\r\n $default_placeholder = '0' . PHP_EOL . '1';\r\n } else {\r\n $default_description = __('Optionally define the option that is selected by default. This can be different than the first [blank] option. If options use key/value pairs, only define the key here.', 'contact-form-7-dynamic-text-extension') . ' ';\r\n }\r\n $default_description .= __('Can be static text or a shortcode.', 'contact-form-7-dynamic-text-extension');\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><input %s />' . $default_input_type . '<br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/form-tags/dynamic-select/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-default'), // field id\r\n esc_html__('Selected Default'), // field label\r\n wpcf7_format_atts(array(\r\n 'type' => 'hidden',\r\n 'name' => 'default',\r\n 'class' => 'option'\r\n )),\r\n wpcf7_format_atts(array(\r\n 'name' => 'dtx-default',\r\n 'id' => $options['content'] . '-default', // field id\r\n 'class' => 'oneline dtx-option',\r\n 'placeholder' => $default_placeholder,\r\n 'list' => 'dtx-shortcodes'\r\n )),\r\n esc_html($default_description), // Small note below input\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_html__('View Dynamic Select documentation', 'contact-form-7-dynamic-text-extension') //Link label\r\n );\r\n }\r\n\r\n //Input field - ID attribute\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><input %s /></td></tr>',\r\n esc_attr($options['content'] . '-id'), // field id\r\n esc_html__('Id attribute', 'contact-form-7-dynamic-text-extension'), // field label\r\n wpcf7_format_atts(array(\r\n 'type' => 'text',\r\n 'name' => 'id',\r\n 'id' => $options['content'] . '-id', // field id\r\n 'class' => 'idvalue oneline option'\r\n ))\r\n );\r\n\r\n //Input field - Class attribute\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><input %s /></td></tr>',\r\n esc_attr($options['content'] . '-class'), // field id\r\n esc_html__('Class attribute', 'contact-form-7-dynamic-text-extension'), // field label\r\n wpcf7_format_atts(array(\r\n 'type' => 'text',\r\n 'name' => 'class',\r\n 'id' => $options['content'] . '-class', // field id\r\n 'class' => 'classvalue oneline option'\r\n ))\r\n );\r\n\r\n //Input field - Readonly attribute (not available for hidden, submit, or quiz fields)\r\n if (!in_array($input_type, array('hidden', 'submit', 'quiz'))) {\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-readonly'), // field id\r\n esc_html__('Read only attribute', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'readonly',\r\n 'id' => $options['content'] . '-readonly',\r\n 'class' => 'readonlyvalue option'\r\n )),\r\n esc_html__('Do not let users edit this field', 'contact-form-7-dynamic-text-extension') // checkbox label\r\n );\r\n }\r\n\r\n // Input field - Page load data attribute (triggers the loading of a frontend script)\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label><br /><small>%s <a href=\"https://aurisecreative.com/docs/contact-form-7-dynamic-text-extension/form-tag-attribute-after-page-load/?utm_source=%s&utm_medium=link&utm_campaign=contact-form-7-dynamic-text-extension&utm_content=form-tag-generator-%s\" target=\"_blank\" rel=\"noopener\">%s</a></small></td></tr>',\r\n esc_attr($options['content'] . '-dtx_pageload'), // field id\r\n esc_html__('Cache Compatible', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'dtx_pageload',\r\n 'id' => $options['content'] . '-dtx_pageload',\r\n 'class' => 'option'\r\n )),\r\n esc_html__('Get the dynamic value after the page has loaded', 'contact-form-7-dynamic-text-extension'), // checkbox label\r\n esc_html__('May impact page performance.', 'contact-form-7-dynamic-text-extension'), // Small note below input\r\n esc_attr($utm_source), //UTM source\r\n esc_attr($type), //UTM content\r\n esc_html__('View DTX page load documentation', 'contact-form-7-dynamic-text-extension') //Link label\r\n\r\n );\r\n\r\n // Input field - Akismet module (only available for text, email, and url fields)\r\n if (in_array($input_type, array('text', 'email', 'url'))) {\r\n switch ($input_type) {\r\n case 'email':\r\n $akismet_name = 'author_email';\r\n $akismet_desc = __(\"This field requires author's email address\", 'contact-form-7-dynamic-text-extension');\r\n break;\r\n case 'url':\r\n $akismet_name = 'author_url';\r\n $akismet_desc = __(\"This field requires author's URL\", 'contact-form-7-dynamic-text-extension');\r\n break;\r\n default:\r\n $akismet_name = 'author';\r\n $akismet_desc = __(\"This field requires author's name\", 'contact-form-7-dynamic-text-extension');\r\n break;\r\n }\r\n printf(\r\n '<tr><th scope=\"row\"><label for=\"%s\">%s</label></th><td><label><input %s />%s</label></td></tr>',\r\n esc_attr($options['content'] . '-readonly'), // field id\r\n esc_html__('Akismet', 'contact-form-7-dynamic-text-extension'), // field Label\r\n wpcf7_format_atts(array(\r\n 'type' => 'checkbox',\r\n 'name' => 'akismet:' . $akismet_name,\r\n 'id' => $options['content'] . '-akismet-' . $akismet_name,\r\n 'class' => 'akismetvalue option'\r\n )),\r\n esc_html($akismet_desc) // checkbox label\r\n );\r\n }\r\n\r\n //Close Form-Tag Generator\r\n printf(\r\n '</tbody></table></fieldset></div><div class=\"insert-box\"><input type=\"text\" name=\"%s\" class=\"tag code\" readonly=\"readonly\" onfocus=\"this.select()\" /><div class=\"submitbox\"><input type=\"button\" class=\"button button-primary insert-tag\" value=\"%s\" /></div><br class=\"clear\" /></div>',\r\n esc_attr($type),\r\n esc_html__('Insert Tag', 'contact-form-7-dynamic-text-extension')\r\n );\r\n}", "function sc_shortcode_form() {\r\n\tglobal $sc_url;\r\n\t$fields = get_option('sc_form');\r\n\t$settings = get_option('sc_settings');\r\n\r\n\t$form = '';\r\n\t$form .= '<div id=\"sc_form\">';\r\n\t$form .= '<div class=\"mess\"></div>';\r\n\t$form .= '<form method=\"post\" action=\"\" onsubmit=\"return scCheckForm2()\">';\r\n\t\r\n\tif( $fields!='' ): for($i=0; $i<count($fields); $i++):\r\n\t\t\r\n\t\tif( $fields[$i]['req']==1 ){ $mend = 'mendatory '; $ast = '* '; }\r\n\t\telse { $mend = ''; $ast = ''; }\r\n\t\t\r\n\t\tif( $fields[$i]['mail']==1 ) $mail = 'sc_mail';\r\n\t\telse $mail = '';\r\n\t\t\r\n\t\t$lbl = '<label class=\"'. $mend. $mail .'\" for=\"field_'. $i .'_sc\">'. $ast . $fields[$i]['label'] .'</label>';\r\n\t\t$hid = '<input name=\"field_name[]\" value=\"'. $fields[$i]['label'] .'\" type=\"hidden\" style=\"display:none;\" />';\r\n\t\t\r\n\t\tif( $fields[$i]['type']=='textbox' )\r\n\t\t\t$in = '<input class=\"drwr-txtInp-sc\" name=\"field_val[]\" id=\"field_'. $i .'_sc\" type=\"text\" />';\r\n\t\telse\r\n\t\t\t$in = '<textarea class=\"drwr-txtArea-sc\" rows=\"5\" cols=\"5\" name=\"field_val[]\" id=\"field_'. $i .'_sc\"></textarea>';\r\n\t\t\r\n\t\t$form .= \"\\n\\n<p>\".$hid;\r\n\t\t$form .= \"\\n\".$lbl;\r\n\t\t$form .= \"\\n\".$in.\"</p>\";\r\n\t\r\n\tendfor; endif;\r\n\t\r\n\t\r\n\t//add captcha code starts \r\n\tif( $settings['sc_captcha']==1 ){\r\n\t\t\r\n\t\t$form .= '<p><label>Security Code</label>';\r\n\t\t$form .= '<img src=\"'. $sc_url .'/includes/captcha/securimage_show.php?sid='. md5(uniqid(time())) .'\" alt=\"Security Code\" id=\"sc_image_sc\" style=\"float:left\" />';\r\n\t\t\r\n\t\t$form .= '<a href=\"#\" onclick=\"document.getElementById(\\'sc_image_sc\\').src = \\''. $sc_url .'/includes/captcha/securimage_show.php?sid=\\' + Math.random(); return false\"><img src=\"'. $sc_url .'/includes/captcha/images/refresh.png\" alt=\"Reload Image\" title=\"Reload Image\" style=\"float:left;padding-left:10px;\" /></a></p>';\r\n\t\t\r\n\t\t$form .= '<p><label for=\"sc_code_sc\" class=\"mendatory\">* Verify Code</label>';\r\n\t\t$form .= '<input name=\"sc_code\" id=\"sc_code_sc\" type=\"text\" style=\"text-align:center;\" /></p>';\r\n\t\r\n\t}\r\n\t//add captcha code ends\r\n\t\r\n\t\r\n\t\t$form .= '<p><label>*required fields</label><input value=\"Submit\" type=\"submit\" id=\"sc_submit_sc\" /></p>';\r\n\t$form .= '</form>';\r\n\t$form .= '</div>';\r\n\r\n\t$form .= '<div id=\"sc_thanku_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_thanku'] .'</div></div>';\r\n\t$form .= '<div id=\"sc_error_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_error'] .'</div></div>';\r\n\r\n\treturn $form;\r\n}", "function shorten_keys_form() {\n $form = drupal_get_form('shorten_keys');\n return drupal_render($form);\n}", "public function meta_box_display_forms() {\n\t?>\n\t\t<p><?php _e( 'Add forms to your Posts or Pages by locating the <strong>Add Form</strong> button in the area above your post/page editor.', 'visual-form-builder-pro' ); ?></p>\n \t<p><?php _e( 'You may also manually insert the shortcode into a post/page or the template tag into a template file.', 'visual-form-builder-pro' ); ?></p>\n \t<p>\n \t\t<?php _e( 'Shortcode', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"[vfb id='<?php echo (int) $_REQUEST['form']; ?>']\" readonly=\"readonly\" />\n \t</p>\n \t<p>\n \t\t<?php _e( 'Template Tag', 'visual-form-builder-pro' ); ?>\n \t\t<input value=\"&lt;?php vfb_pro( 'id=<?php echo (int) $_REQUEST['form']; ?>' ); ?&gt;\" readonly=\"readonly\"/>\n \t</p>\n\t<?php\n\t}", "function mk_customizerForm($cName, $cGen, $str = ''){\n\t$str='<h4><a href=\"#\">Customize Descriptions</a></h4>\n\t\t<p>Enter characters name to personalize each &amp; every descriptions on this page to your character.</p>';\n\t\t\t$str .='<form action=\"' . htmlspecialchars(THIS_PAGE) . '\" method=\"get\">\n\t\t\t\t<input type=\"text\" name=\"codeName\"\n\t\t\t\t\tvalue=\"' . $cName . '\" placeholder=\"Alias / Codename?\"><br>\n\t\t\t\t\t<input type=\"radio\" name=\"gender\"';\n\n\t\t\t\t\tif ((isset($cGen)) && ($cGen==\"female\")){ $str .= \"checked\"; }\n\n\t\t\t\t\t$str .='value=\"female\"> Female <input type=\"radio\" name=\"gender\"';\n\n\t\t\t\t\tif ((isset($cGen)) && ($cGen==\"male\")){ $str .= \"checked\"; }\n\n\t\t\t\t\t$str .='value=\"male\"> Male\n\t\t\t\t\t<br /><br/>';\n\n\t\t\t\t$str .='<input type=\"hidden\" name=\"CharID\" value=\"0\">\n\t\t\t\t<input type=\"submit\" value=\"Submit\">\n\t\t\t</form>\n\t\t<hr />';\n\n\treturn $str;\n}", "function contact_fields() {\n\t\n?>\t<div class=\"contact-address two-fifths first\" >\n\n\t<?php\n\techo do_shortcode('[contact-card]');//}\n\t ?>\n\t\t\n\t\t</div> \n\t\t\n\t\t<div class=\"three-fifths\"> <?php\tif( get_field('contact_page_message') ): \n\t\t\t the_field('contact_page_message'); \n\t\tendif; \n\t\t\t\n\t\t\n\t\techo do_shortcode('[contact]' );?>\n\t\t\n\t\t</div><?php\n\t\n\t\t\n\t\t}", "function mango_wpcf7_text_shortcode_handler ( $tag ) {\n $tag = new WPCF7_Shortcode( $tag );\n if ( empty( $tag->name ) )\n\t\treturn '';\n\t\n $validation_error = wpcf7_get_validation_error ( $tag->name );\n $class = wpcf7_form_controls_class ( $tag->type, 'wpcf7-text' );\n\n if ( in_array ( $tag->basetype, array ( 'email', 'url', 'tel' ) ) )\n\t\t$class .= ' wpcf7-validates-as-' . $tag->basetype;\n\n if ( $validation_error )\n\t\t$class .= ' wpcf7-not-valid';\n\t\t$atts = array ();\n\t\t$atts_id = '';\n\t\t$atts[ 'size' ] = $tag->get_size_option ( '40' );\n\t\t$atts[ 'maxlength' ] = $tag->get_maxlength_option ();\n\t\t$atts[ 'minlength' ] = $tag->get_minlength_option ();\n\n if ( $atts[ 'maxlength' ] && $atts[ 'minlength' ] && $atts[ 'maxlength' ] < $atts[ 'minlength' ] ) {\n\t\tunset( $atts[ 'maxlength' ], $atts[ 'minlength' ] );\n }\n\t\n $atts[ 'class' ] = $tag->get_class_option ( $class );\n $atts[ 'id' ] = $tag->get_id_option ();\n $atts_id = $atts[ 'id' ];\n $atts[ 'tabindex' ] = $tag->get_option ( 'tabindex', 'int', true );\n\n if ( $tag->has_option ( 'readonly' ) )\n\t\t$atts[ 'readonly' ] = 'readonly';\n\n if ( $tag->is_required () )\n\t\t$atts[ 'aria-required' ] = 'true';\n\t\t$atts[ 'aria-invalid' ] = $validation_error ? 'true' : 'false';\n\t\t$value = (string)reset ( $tag->values );\n\n if ( $tag->has_option ( 'placeholder' ) || $tag->has_option ( 'watermark' ) ) {\n\t\t$atts[ 'placeholder' ] = $value;\n\t\t$value = '';\n }\n\t\n $value = $tag->get_default_option ( $value );\n $value = wpcf7_get_hangover ( $tag->name, $value );\n $atts[ 'value' ] = $value;\n\n if ( wpcf7_support_html5 () ) {\n\t\t$atts[ 'type' ] = $tag->basetype;\t\n\t}\n\telse {\n\t\t$atts[ 'type' ] = 'text';\n }\n $atts[ 'name' ] = $tag->name;\n $atts = wpcf7_format_atts ( $atts );\n\t\n if ( $atts_id == 'disabledInput' )\n $html = sprintf (\n '<input %1$s disabled />%2$s', $atts, $validation_error );\n else\n $html = sprintf (\n '<input %1$s />%2$s', $atts, $validation_error );\n\t\treturn $html;\n\t}", "function hgr_minimal_input($atts,$content = null) {\n\t\t\t$output = $label_text = $input_type = $input_type_front = $hgr_question_id = $input_validate = '';\n\t\t\t\n\t\t\t/*\n\t\t\t\tWordPress function to extract shortcodes attributes\n\t\t\t\tRefference: http://codex.wordpress.org/Function_Reference/shortcode_atts\n\t\t\t*/\n\t\t\textract(shortcode_atts(array(\n\t\t\t\t'label_text'\t\t\t=>\t'',\n\t\t\t\t'input_type'\t\t\t=>\t''\n\t\t\t), $atts));\n\t\t\t\n\t\t\t/*\n\t\t\t\tShortcode content output\n\t\t\t*/\n\t\t\tswitch($input_type){\n\t\t\t\tcase 'text':\n\t\t\t\t\t$input_type_front = 'text';\n\t\t\t\t\t$input_validate = 'data-validate=\"none\"';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'e-mail':\n\t\t\t\t\t$input_type_front = 'email';\n\t\t\t\t\t$input_validate = 'data-validate=\"email\"';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'telephone':\n\t\t\t\t\t$input_type_front = 'tel';\n\t\t\t\t\t$input_validate = 'data-validate=\"none\"';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$hgr_question_id = \"q-\".uniqid();\n\n\t\t\t$output .= '<li>';\n\t\t\t\t$output .= '<span><label for=\"'.$hgr_question_id.'\"><h2 '.$GLOBALS[\"hgr_label_style\"].'>'.$label_text.'</h2></label></span>';\n\t\t\t\t$output .= '<input id=\"'.$hgr_question_id.'\" name=\"'.$hgr_question_id.'\" type=\"'.$input_type_front.'\" '.$GLOBALS[\"hgr_input_text_style\"].' '.$input_validate.' data-question=\"'.$label_text.'\"/>';\n\t\t\t$output .= '</li>';\n\t\t\t\n\t\t\t/*\n\t\t\t\tReturn the output\n\t\t\t*/\n\t\t\treturn $output;\n\t\t}", "function short_code_func(){\n\t\t$opt_val = get_option( 'wpCertifications_configData' );\n\n\t\t$savedData = json_decode($opt_val);\n\n\t\t$view_bag['list_id'] = $savedData->list_id;\n\t\t$view_bag['api_key'] = $savedData->api_key;\n\n\t\t$sc = new wpCertifications();\n\t\t$content = $sc->get_render( 'form.php', $view_bag );\n return $content;\n\t}", "public function fields()\n\t{\n\t\t$fields = array(\n\t\t\t'tag_manager_head'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Head code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_head',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'tag_manager_body'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Tag Manager Body code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'tag_manager_body',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t\t'analytics'\t=> array(\n\t\t\t\t'label'\t\t\t=> __( 'Analytics code', 'purple' ),\n\t\t\t\t'option'\t\t=> 'analytics',\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Filters the Google Tracking Options fields\n\t\t * @param array $fields\n\t\t *\n\t\t * @since Purple 1.0.0\n\t\t */\n\t\treturn apply_filters( 'purple_google_tracking_fields', $fields );\n\t}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function form($atts)\n{\n $prenom = \"\";\n $nom = \"\";\n $mail = \"\";\n $sujet = \"\";\n $msg = \"\";\n\n extract(shortcode_atts(\n array(\n 'firstname' => 'true',\n 'lastname' => 'true',\n 'email' => 'true',\n 'subject' => 'true',\n 'message' => 'true',\n\n ), $atts));\n\n if ($firstname == \"true\") {\n $prenom = '<label>First name:</label><input type=\"text\" name=\"fname\" required>';\n }\n\n if ($lastname == \"true\") {\n $nom = '<label>Last name:</label><input type=\"text\" name=\"lname\" required>';\n }\n\n if ($email == \"true\") {\n $mail = '<label>Email:</label><input type=\"email\" name=\"email\" required>';\n }\n if ($subject == \"true\") {\n $sujet = '<label>Subject:</label><input type=\"text\" name=\"subject\" required>';\n }\n\n if ($message == \"true\") {\n $msg = '<label>Message:</label><textarea name=\"msg\"></textarea>';\n }\n\n echo '<form method=\"POST\" >' . $prenom . $nom . $mail . $sujet . $msg . '<input style=\"margin-top : 20px;\" value=\"Send\" type=\"submit\" name=\"send\"></form>';\n}", "function describefield($field, $html = true)\n{\n\t$res = \"\";\n\tif($html)\n\t\t$res.= \"<b>\".htmlspecialchars($field[3]).\"</b>: \";\n\telse\n\t\t$res.= htmlspecialchars($field[3]).\": \";\n\n\t$atnybble = \"at nybble \".htmlspecialchars($field[1]);\n\tswitch ($field[0])\n\t{\n\t\tcase 'checkbox':\n\t\t\t$res .= \"checkbox $atnybble with mask \".htmlspecialchars($field[2]);\n\t\t\tbreak;\n\t\tcase 'value':\n\t\t\t$res .= \"value $atnybble\";\n\t\t\tbreak;\n\t\tcase 'signedvalue':\n\t\t\t$res .= \"signed value $atnybble\";\n\t\t\tbreak;\n\t\tcase 'index':\n\t\t\t$res .= \"index at $atnybble\";\n\t\t\tbreak;\n\t\tcase 'binary':\n\t\t\t$res .= \"binary editor $atnybble\";\n\t\t\tbreak;\n\t\tcase 'list':\n\t\t\t$listentries = str_replace(\"\\n\", ', ', rtrim($field[2]));\n\t\t\t$res .= \"list $atnybble: \".htmlspecialchars($listentries).\"\";\n\t\tbreak;\n\t}\n\n\tif ($field[4] != '') $res.= \". \".htmlspecialchars($field[4]).\"\";\n\t\n\treturn $res;\n}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "public static function generate($fields) {\n $form=\"\";\n $extraOptions=[];\n // wildCard will be applied all inputs\n $wildCard=isset($fields[\"*\"]) ? $fields[\"*\"]:[];\n // exclude given elements\n if(isset($fields[\"_exclude\"])) {\n foreach ($fields[\"_exclude\"] as $value) {\n unset($fields[$value]);\n }\n }\n foreach ($fields as $key => $val) {\n if($key==\"*\"||$key==\"_exclude\") continue;\n if(!empty($wildCard)) {\n $val=array_replace_recursive($val,$wildCard);\n }\n $inputOptions=isset($val[\"options\"]) ? $val[\"options\"] : [];\n \n $placeholder=isset($val[\"placeholder\"]) ? $val[\"placeholder\"] : null;\n switch ($val[\"type\"]) {\n case 'select':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"data\"],$inputOptions);\n break;\n case 'password':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n break;\n case 'checkbox':\n case 'radio':\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$val[\"value\"],null); // removed $val[\"checked\"] for unwanted results\n break;\n case 'color':\n case 'number':\n case 'file';\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$inputOptions);\n break;\n // other elements share the same parameters.\n default:\n try {\n\n $form.=cForm::{\"c\".ucfirst($val[\"type\"])}($key,$val[\"label\"],$placeholder,$inputOptions);\n }catch(\\Exception $err) {\n if(config('app.debug')==false) { // only show error on debug\n dump(\"Error on generating form\",$err,$key,$val);\n }\n }\n break;\n }\n }\n return $form;\n }", "function cjpopups_shortcode_form($options){\n\tinclude(sprintf('%s/shortcode_form.php', cjpopups_item_path('includes_dir')));\n\treturn implode(\"\\n\", $display);\n}", "function htheme_contact_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_contact_form($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function shortcode_input( $atts ){\n\n $a = shortcode_atts( [\n 'placeholder' => 'Please Fill Out',\n 'name' => '',\n 'for' => '',\n 'id' => '',\n 'label_name' => 'Label',\n 'label_class' => '',\n 'input_class' => '',\n 'display' => 'block'\n ],\n $atts);\n\n return \"<label style='display:{$a['display']};' class='{$a['label_class']}' for='{$a['for']}'>{$a['label_name']}:</label>\n <input class='{$a['input_class']}' placeholder='{$a['placeholder']}' name='{$a['name']}' id='{$a['id']}'/>\n \";\n\n}", "abstract public function getFormDesc();", "function speakerbureau_form($atts, $content=null) {\n\n $atts = shortcode_atts(\n array(),\n $atts,\n 'contact_form'\n );\n\n // return HTML\n ob_start();\n include 'templates/contact-form.php';\n\n return ob_get_clean();\n}", "function pgm_register_shortcodes(){\n add_shortcode('pgm_form','pgm_form_shortcode');\n}", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "function build_form($echo = true) {\n\t\n\t\t$output = '\n\t\t<form method=\"' . $this->form['method'] . '\"';\n\t\t\n\t\tif (!empty($this->form['enctype'])) $output .= ' enctype=\"' . $this->form['enctype'] . '\"';\n\t\t\n\t\tif (!empty($this->form['action'])) $output .= ' action=\"' . $this->form['action'] . '\"';\n\t\t\n\t\tif (!empty($this->form['id'])) $output .= ' id=\"' . $this->form['id'] . '\"';\n\t\t\n\t\tif (count($this->form['class']) > 0) $output .= $this->_output_classes($this->form['class']);\n\t\t\n\t\tif ($this->form['novalidate']) $output .= ' novalidate';\n\t\t\n\t\t$output .= '>';\n\t\t\n\t\tif ($this->form['add_honeypot']) \n\t\t\t$this->add_input('Leave blank to submit', array(\n\t\t\t\t'name' => 'honeypot',\n\t\t\t\t'slug' => 'honeypot',\n\t\t\t\t'id' => 'form_honeypot',\n\t\t\t\t'wrap_tag' => 'div',\n\t\t\t\t'wrap_class' => array('form_field_wrap', 'hidden'),\n\t\t\t\t'wrap_id' => '',\n\t\t\t\t'wrap_style' => 'display: none'\n\t\t\t));\n\t\t\n\t\tif ($this->form['add_nonce'] && function_exists('wp_create_nonce')) \n\t\t\t$this->add_input('WordPress nonce', array(\n\t\t\t\t'value' => wp_create_nonce($this->form['add_nonce']),\n\t\t\t\t'add_label' => false,\n\t\t\t\t'type' => 'hidden'\n\t\t\t));\n\t\t\n\t\tforeach ($this->inputs as $key => $val) :\n\t\t\t\n\t\t\t$min_max_range = $element = $end = $attr = $field = $label_html = '';\n\t\t\t\n\t\t\t// Set the field value to incoming\n\t\t\t$val['value'] = isset($_REQUEST[$val['name']]) && !empty($_REQUEST[$val['name']]) ? \n\t\t\t\t$_REQUEST[$val['name']] : \n\t\t\t\t$val['value'];\n\t\t\t\n\t\t\tswitch ($val['type']) :\n\t\t\t\t\n\t\t\t\tcase 'html':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = $val['label'];\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'title':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = '\n\t\t\t\t\t<h3>' . $val['label'] . '</h3>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$element = 'textarea';\n\t\t\t\t\t$end = '>' . $val['value'] . '</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'select':\n\t\t\t\t\t$element = 'select';\n\t\t\t\t\t$end = '>' . $this->_output_options_select($val['options']) . '\n\t\t\t\t\t</select>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_checkbox($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_radios($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'number':\n\t\t\t\t\t$min_max_range .= !empty($val['min']) ? ' min=\"' . $val['min'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['max']) ? ' max=\"' . $val['max'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['step']) ? ' step=\"' . $val['step'] . '\"' : '';\n\t\t\t\t\n\t\t\t\tcase 'submit':\n\t\t\t\t\t$this->has_submit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault :\n\t\t\t\t\t$element = 'input';\n\t\t\t\t\t$end .= ' type=\"' . $val['type'] . '\" value=\"' . $val['value'] . '\"';\n\t\t\t\t\t$end .= $val['checked'] ? ' selected' : '';\n\t\t\t\t\t$end .= $this->field_close();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tendswitch;\n\t\t\t\n\t\t\t$id = !empty($val['id']) ? ' id=\"' . $val['id'] . '\"' : '';\n\t\t\t$class = count($val['class']) ? ' class=\"' . $this->_output_classes($val['class']) . '\"' : '';\n\t\t\t$attr = $val['autofocus'] ? ' autofocus' : '';\n\t\t\t$attr = $val['checked'] ? ' checked' : '';\n\t\t\t$attr = $val['required'] ? ' required' : '';\n\t\t\t\n\t\t\t// Build the label\n\t\t\tif (!empty($label_html)) :\n\t\t\t\t$field .= $label_html;\n\t\t\telseif ($val['add_label'] && $val['type'] != 'hidden' && $val['type'] != 'submit' && $val['type'] != 'title' && $val['type'] != 'html') :\n\t\t\t\t$val['label'] .= $val['required'] ? ' <strong>*</strong>' : '';\n\t\t\t\t$field .= '\n\t\t\t\t\t<label for=\"' . $val['id'] . '\">' . $val['label'] . '</label>';\n\t\t\tendif;\n\t\t\t\n\t\t\tif (!empty($element))\n\t\t\t\t$field .= '\n\t\t\t\t\t<' . $element . $id . ' name=\"' . $val['name'] . '\"' . $min_max_range . $attr . $end;\n\t\t\telse \n\t\t\t\t$field .= $end;\n\t\t\t\n\t\t\t// Parse and create wrap, if needed\n\t\t\tif ($val['type'] != 'hidden' && $val['type'] != 'html' && !empty($val['wrap_tag'])) :\n\t\t\t\n\t\t\t\t$wrap_before = '\n\t\t\t\t<' . $val['wrap_tag'];\n\t\t\t\t$wrap_before .= count($val['wrap_class']) > 0 ? $this->_output_classes($val['wrap_class']) : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_style']) ? ' style=\"' . $val['wrap_style'] . '\"' : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_id']) ? ' id=\"' . $val['wrap_id'] . '\"' : '';\n\t\t\t\t$wrap_before .= '>';\n\t\t\t\t\n\t\t\t\t$wrap_after = '\n\t\t\t\t</' . $val['wrap_tag'] . '>';\n\t\t\t\t\n\t\t\t\t$output .= $wrap_before . $field . $wrap_after;\n\t\t\telse : \n\t\t\t\t$output .= $field;\n\t\t\tendif;\n\t\t\t\n\t\tendforeach;\t\n\t\t\n\t\tif (! $this->has_submit) $output .= '\n\t\t\t\t<div class=\"form_field_wrap\">\n\t\t\t\t\t<input type=\"submit\" value=\"Submit\" name=\"submit\">\n\t\t\t\t</div>';\n\t\t\n\t\t$output .= '\n\t\t</form>';\n\t\t\n\t\tif ($echo) echo $output;\n\t\telse return $output;\n\t\t\n\t}", "function field($name, $value='') {\n\t\t$str = '<div class=\"field is-size-6\"><label class=\"label\" for=\"'.$name.'-input\">'.$name.'</label>';\n\t\t$str .= '<div class=\"control\"><input class=\"input\" name=\"'.$name.'\" id=\"'.$name.'-input\" type=\"text\" value=\"'.$value.'\"></div></div>'.\"\\n\";\n\t\treturn $str;\n\t}", "public function field_code() {\n\t\t// Display the tokens in the right column of the page\n\t\techo '<div id=\"tokens-description\" style=\"position:absolute;margin-left:600px;margin-right:50px;\">';\n\t\techo '<span>' . __( 'Use tokens in your custom variables to make your fields dynamic based on context. Here are some of the tokens you can use:' ) . '</span>';\n\t\techo '<table style=\"text-align:left;\">';\n\t\techo '<thead><tr><td>' . __( 'Token', 'wp-google-analytics' ) . '</td><td>' . __( 'Description', 'wp-google-analytics' ) . '</td><td>' . __( 'Return value', 'wp-google-analytics' ) . '</td></tr></thead>';\n\t\techo '<tbody>';\n\t\tforeach( $this->tokens as $token ) {\n\t\t\techo '<tr>';\n\t\t\techo '<td>' . esc_html( $token['token'] ) . '</td>';\n\t\t\techo '<td>' . esc_html( $token['description'] ) . '</td>';\n\t\t\techo '<td>' . esc_html( $token['retval'] ) . '</td>';\n\t\t\techo '</tr>';\n\t\t}\n\t\techo '</tbody>';\n\t\techo '</table>';\n\t\techo '</div>';\n\n\t\techo '<input name=\"wga[code]\" id=\"wga-code\" type=\"text\" value=\"' . esc_attr( $this->_get_options( 'code' ) ) . '\" />';\n\t\techo '<p class=\"description\">' . __( 'Paste your Google Analytics tracking ID (e.g. \"UA-XXXXXX-X\") into the field.', 'wp-google-analytics' ) . '</p>';\n\t}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "function acf_form_head()\n{\n}", "function uc_file_build_email_form($form, &$form_state, $settings, $token_filters) {\n $form['from'] = array(\n '#type' => 'textfield',\n '#title' => t('Sender'),\n '#default_value' => $settings['from'],\n '#description' => t('The \"From\" address.'),\n '#required' => TRUE,\n );\n $form['addresses'] = array(\n '#type' => 'textarea',\n '#title' => t('Recipients'),\n '#default_value' => $settings['addresses'],\n '#description' => t('Enter the email addresses to receive the notifications, one on each line. You may use order tokens for dynamic email addresses.'),\n '#required' => TRUE,\n );\n $form['subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Subject'),\n '#default_value' => $settings['subject'],\n '#required' => TRUE,\n );\n $form['message'] = array(\n '#type' => 'textarea',\n '#title' => t('Message'),\n '#default_value' => $settings['message'],\n '#text_format' => $settings['format'],\n );\n\n $form['token_help'] = array(\n '#type' => 'fieldset',\n '#title' => t('Replacement patterns'),\n '#description' => t('You can make use of the replacement patterns in the recipients field, the subject, and the message body.'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n foreach ($token_filters as $name) {\n $form['token_help'][$name] = array(\n '#type' => 'fieldset',\n '#title' => t('@name replacement patterns', array('@name' => drupal_ucfirst($name))),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n }\n\n return $form;\n}", "function sc_myShortcode( $attrs, $content = null ) {\n\t// Default attributes.\n\tSDES_Static::set_default_keyValue( $attrs, 'attr1', 'SomeValue' );\n\tSDES_Static::set_default_keyValue( $attrs, 'attr2', 'AnotherValue' );\n\t// Sanitize input.\n\t$attrs['attr1'] = esc_attr( $attrs['attr1'] );\n\t$attrs['attr2'] = esc_attr( $attrs['attr2'] );\n\n\t// Shortcode logic.\n\n\t// Set context for view.\n\t$context['disp1'] = $attrs['attr1'];\n\t$context['disp2'] = $attrs['attr2'];\n\t// Render HTML.\n\treturn rencer_sc_myShortcode( $context );\n}", "function token_rules_input_evaluator_help($variables) {\r\n\r\n foreach ($variables as $name => $info) {\r\n $type = _token_rules_map_type($info['type']);\r\n if ($type) {\r\n $form[$name] = array(\r\n '#type' => 'fieldset',\r\n '#title' => t('Replacement patterns for @name', array('@name' => $info['label'])),\r\n '#collapsible' => TRUE,\r\n '#collapsed' => TRUE,\r\n );\r\n $form[$name]['content'] = array(\r\n '#value' => theme('token_help', $type, TOKEN_PREFIX. $name . ':', TOKEN_SUFFIX),\r\n );\r\n }\r\n }\r\n return $form;\r\n}", "function pm_contact_form_shortcode( $atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'show_form_id'\t=> '',\n\t\t'class'\t\t\t=> '',\n\t), $atts));\n\n\t$result = '';\n\n\tob_start(); \n\n\t// Assigning a master css class and hooking into KC\n\t$master_class = apply_filters( 'kc-el-class', $atts );\n\t$master_class[] = 'pm-team';\n\n\t// Retrieving user define classes\n\t$classes = array( 'row about-content' );\n\t(!empty($class)) ? $classes[] = $class : ''; ?>\n\n\t<div id=\"contact\">\n\t\t<div class=\"row form-section\">\n\t\t\t<div id=\"contact-form\" class=\"twelve columns\">\n\t\t\t\t<!-- <form name=\"contactForm\" id=\"contactForm\" method=\"post\" action=\"\">\t -->\n\t\t\t\t\t<?php echo do_shortcode( '[contact-form-7 id=\"'. $show_form_id .'\" title=\"\"]' ); ?>\n\t\t\t\t<!-- </form> /contactForm -->\n\n\t\t\t\t<!-- message box -->\n\t\t\t\t<div id=\"message-warning\"></div>\n\t\t\t\t<div id=\"message-success\">\n\t\t\t\t\t<i class=\"fa fa-check\"></i>Your message was sent, thank you!<br />\n\t\t\t\t</div>\n\n\t\t\t</div> <!-- /contact-form --> \t\n\t\t</div> <!-- /form-section --> \n\t</div> <!-- /contact-->\n\n\t<?php \n\t$result .= ob_get_clean();\n\treturn $result;\n\n}", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "function slb_register_shortcodes() {\n\tadd_shortcode('slb_form', 'slb_form_shortcode');\n}", "function dm_hubspot_form_shortcode($atts) {\n\textract(shortcode_atts(array(\n\t\t'portal_id' => '219987',\n\t\t'id' => '',\n\t\t'campaign_id' => '',\n\t\t'include_script' => true\n\t), $atts));\n\n\tob_start();\n?>\n\t<?php if ($include_script): ?>\n\t\t<script charset=\"utf-8\" src=\"//js.hubspot.com/forms/current.js\"></script>\n\t<?php endif; ?>\n\t<script>\n\t\tvar formProps = {\n\t\t\tportalId: '<?php echo $portal_id; ?>',\n\t\t\tformId: '<?php echo $id; ?>'\n\t\t};\n\t\t<?php if (!empty($campaign_id)): ?>\n\t\tformProps.sfdcCampaignId = '<?php echo $campaign_id; ?>';\n\t\t<?php endif; ?>\n\t\thbspt.forms.create(formProps);\n\t</script>\n<?php\n\t$output = ob_get_clean();\n\treturn $output;\n}", "function show_form( $atts=null, $form=true ) {\n global $wpdb, $isPolitical, $currencySymbol, $eligibility;\n \n $check_security = $this->check_security();\n \n if($check_security!==true) {\n return false;\n exit();\n }\n \n extract( shortcode_atts( array(\n 'amounts' => null,\n 'amount_as_input' => null,\n 'source' => null,\n 'thanks_url' => null,\n 'custom_amt_off' => 'false',\n 'button' => 'Submit',\n 'default_state' => null\n ), $atts ) );\n if(isset($_GET['amounts']) && !empty($_GET['amounts'])) {\n $amounts = $_GET['amounts'];\n }\n \n if(isset($_GET['source'])) {\n $source = $_GET['source'];\n } else if(isset($_GET['refcode'])) {\n $source = $_GET['refcode'];\n }\n \n if($amounts) {\n $amounts = explode(',', $amounts);\n $this->custom_amt_options = array();\n \n foreach($amounts as $amount) {\n $ths_amt = round($amount, 0);\n $ths_amt = (string) $ths_amt;\n $this->custom_amt_options[$ths_amt*100] = '$'.$ths_amt;\n }\n $this->custom_amt_options['custom'] = '<label for=\"custom_dollar_amt\">Other:</label> $<input type=\"text\" %s class=\"amount custom_dollar_amt\" /> <small>('.strtoupper($currencySymbol).')</small>';\n }\n \n $form_fields = '';\n // Loop through and generate the elements\n \n if(isset($source) && !empty($source)) {\n $form_fields .= '<input type=\"hidden\" name=\"Source\" value=\"'.$source.'\" />';\n }\n \n if(isset($this->config_errors) && !empty($this->config_errors)) {\n $form_fields .= $this->config_errors;\n }\n foreach($this->fieldsets as $fieldset_name => $fields) {\n if($isPolitical!=='true' && $fieldset_name=='Employment') {\n continue;\n } else {\n if(isset($thanks_url)) {\n $form_fields .= '<input type=\"hidden\" value=\"'.$thanks_url.'\" id=\"thanks_url\" />';\n }\n $form_fields .= '<fieldset><legend>'.$fieldset_name.'</legend>';\n if(isset($fields['html_intro'])) {\n $form_fields .= $fields['html_intro'];\n unset($fields['html_intro']);\n }\n foreach($fields as $field_key => $field) {\n if(!isset($field['type'])) {\n var_dump($field);\n }\n switch($field['type']) {\n case 'text':\n if(!isset($field['show_pre_div']) || $field['show_pre_div']=='true') {\n $form_fields .= '\n <div class=\"input';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n }\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">This field cannot be left blank.</div>';\n }\n if(isset($field['slug'])) {\n if(!isset($field['show_label']) || $field['show_label']!='false') {\n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>';\n }\n $form_fields .= '<input type=\"text\" ';\n $form_fields .= 'name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\" value=\"';\n if(isset($_POST[$field['slug']])) {\n $form_fields .= $_POST[$field['slug']];\n }\n $form_fields .= '\"';\n } else {\n if(!isset($field['show_label']) || $field['show_label']!='false') {\n $form_fields .= '\n <label for=\"'.$field['id'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>';\n }\n $form_fields .= '<input type=\"text\" ';\n $form_fields .= ' id=\"'.$field['id'].'\" value=\"\"';\n }\n if(!empty($field['label']) && (!isset($field['show_placeholder']) || $field['show_placeholder']=='true')) {\n $form_fields .= ' placeholder=\"'.$field['label'].'\"';\n }\n $form_fields .= ' />';\n if(!isset($field['show_post_div']) || $field['show_post_div']=='true') {\n $form_fields .= '</div>';\n }\n break;\n case 'file':\n $file = true;\n $form_fields .= '\n <div class=\"file';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n if(isset($field['error']) && $field['error']===true && $field['required']=='true') {\n $form_fields .= '<div class=\"errMsg\">You must provide a '.$field['label'].'.</div>';\n } else if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">There was a problem uploading your file.</div>';\n }\n \n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>\n <input type=\"file\" name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\" />\n </div>\n ';\n break;\n case 'hidden':\n $form_fields .= '<input type=\"hidden\" name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\" value=\"';\n if(isset($_POST[$field['slug']])) {\n $form_fields .= $_POST[$field['slug']];\n } else if(isset($field['value'])) {\n $form_fields .= $field['value'];\n }\n $form_fields .= '\" />';\n break;\n case 'password':\n $form_fields .= '\n <div class=\"password ';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">This field cannot be left blank.</div>';\n }\n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>\n <input type=\"password\" name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\" value=\"';\n if(isset($_POST[$field['slug']])) {\n $form_fields .= $_POST[$field['slug']];\n }\n $form_fields .= '\"/>\n </div>\n ';\n break;\n case 'textarea':\n $form_fields .= '\n <div class=\"textarea';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">This field cannot be left blank.</div>';\n }\n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>\n <textarea name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\">';\n if(isset($_POST[$field['slug']])) {\n $form_fields .= $_POST[$field['slug']];\n }\n $form_fields .= '</textarea>\n </div>\n ';\n break;\n case 'checkbox':\n if(isset($field['options']) && !empty($field['options'])) {\n $form_fields .= '<fieldset id=\"ngp_'.$field['slug'].'\" class=\"checkboxgroup';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error\">\n <div class=\"errMsg\">You must check at least one.</div>';\n } else {\n $form_fields .= '\">';\n }\n $form_fields .= '<legend>'.$field['label'];\n if($field['required']=='true') $form_fields .= '<span class=\"required\">*</span>';\n $form_fields .= '</legend>';\n $i = 0;\n foreach($field['options'] as $val) {\n $i++;\n $form_fields .= '<div class=\"checkboxoption\"><input type=\"checkbox\" value=\"'.$val.'\" name=\"'.$field['slug'].'['.$i.']['.$val.']\" id=\"option_'.$i.'_'.$field['slug'].'\" class=\"'.$field['slug'].'\" /> <label for=\"option_'.$i.'_'.$field['slug'].'\">'.$val.'</label></div>'.\"\\r\\n\";\n }\n $form_fields .= '</fieldset>';\n } else {\n $form_fields .= '<div id=\"ngp_'.$field['slug'].'\" class=\"checkbox\">';\n $form_fields .= '<div class=\"checkboxoption\"><input type=\"checkbox\" name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\" class=\"'.$field['slug'].'\" /> <label for=\"'.$field['slug'].'\">'.$field['label'].'</label></div>'.\"\\r\\n\";\n $form_fields .= '</div>';\n }\n break;\n case 'radio':\n if(isset($field['slug'])) {\n $form_fields .= '\n <fieldset id=\"radiogroup_'.$field['slug'].'\" class=\"radiogroup';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n } else {\n $form_fields .= '\n <fieldset id=\"radiogroup_'.$field['id'].'\" class=\"radiogroup';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n }\n $form_fields .= '\"><legend>'.$field['label'];\n if($field['required']=='true') { $form_fields .= '<span class=\"required\">*</span>'; }\n $form_fields .= '</legend>';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">You must select an option.</div>';\n }\n $i = 0;\n if($field['label']=='Amount' && isset($this->custom_amt_options)) {\n $the_options = $this->custom_amt_options;\n } else {\n $the_options = $field['options'];\n }\n \n if(isset($_GET['amt']) && empty($_POST)) {\n if(strpos($_GET['amt'], '.')===false) {\n $get_amt = $_GET['amt'];\n } else {\n $get_amt = $_GET['amt'];\n }\n \n if(array_key_exists($get_amt, $the_options)) {\n $amt = $get_amt;\n } else {\n $custom_amt = $_GET['amt'];\n }\n } else if(isset($_POST['custom_dollar_amt'])) {\n $custom_amt = $_POST['custom_dollar_amt'];\n } else if(isset($field['slug']) && isset($_POST[$field['slug']])) {\n $amt = $_POST[$field['slug']];\n }\n \n foreach($the_options as $val => $labe) {\n $i++;\n if($val=='custom' && $custom_amt_off=='false') {\n $replace = (isset($custom_amt)) ? 'value=\"'.$custom_amt.'\"' : '';\n $form_fields .= '<div class=\"radio custom-donation-amt\">'.sprintf($labe, $replace).'</div>'.\"\\r\\n\";\n } else {\n $form_fields .= '<div class=\"radio\"><input type=\"radio\" value=\"'.$val.'\"';\n if(isset($field['slug'])) {\n $form_fields .= ' name=\"'.$field['slug'].'\"';\n $form_fields .= ' id=\"'.$i.'_'.$field['slug'].'\" class=\"amount '.$field['slug'].'\"';\n } else {\n $form_fields .= ' id=\"'.$i.'_'.$field['id'].'\" class=\"amount '.$field['id'].'\"';\n }\n if(isset($amt) && $amt==$val) {\n $form_fields .= ' checked';\n }\n $form_fields .= '> <label for=\"'.$i.'_';\n if(isset($field['slug'])) {\n $form_fields .= $field['slug'];\n } else {\n $form_fields .= $field['id'];\n }\n $form_fields .= '\">'.$labe.'</label></div>'.\"\\r\\n\";\n }\n }\n $form_fields .= '</fieldset>';\n break;\n case 'select':\n if(!isset($field['show_pre_div']) || $field['show_pre_div']=='true') {\n $form_fields .= '\n <div class=\"input';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n }\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">You must select an option.</div>';\n }\n if(isset($field['slug'])) {\n if(!isset($field['show_label']) || $field['show_label']!='false') {\n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>';\n }\n $form_fields .= '<select name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\">'.\"\\r\\n\";\n } else {\n if(!isset($field['show_label']) || $field['show_label']!='false') {\n $form_fields .= '\n <label for=\"'.$field['id'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>';\n }\n $form_fields .= '<select id=\"'.$field['id'].'\">'.\"\\r\\n\";\n }\n $field_ref = (isset($field['slug'])) ? $field['slug'] : $field['id'];\n if($field_ref!='State' && $field_ref!='cardExpiryMonth' && $field_ref!='cardExpiryYear') {\n $form_fields .= '\n <option>Select an option...</option>\n ';\n }\n foreach($field['options'] as $key => $val) {\n $form_fields .= '<option value=\"'.$key.'\"';\n if(isset($field['slug']) && isset($_POST[$field['slug']]) && $_POST[$field['slug']]==$key) {\n $form_fields .= ' selected=\"selected\"';\n } else if(!empty($default_state) && $default_state==$key) {\n $form_fields .= ' selected=\"selected\"';\n }\n $form_fields .= '>'.$val.'</option>'.\"\\r\\n\";\n }\n $form_fields .= '</select>';\n if(!isset($field['show_post_div']) || $field['show_post_div']=='true') {\n $form_fields .= '</div>';\n }\n break;\n case 'multiselect':\n $form_fields .= '\n <div class=\"multiselect ';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= ' error';\n }\n $form_fields .= '\">';\n if(isset($field['error']) && $field['error']===true) {\n $form_fields .= '<div class=\"errMsg\">This field cannot be left blank.</div>';\n }\n $form_fields .= '\n <label for=\"'.$field['slug'].'\">'.$field['label'];\n if($field['required']=='true') { $form_fields .= ' <span class=\"required\">*</span>'; }\n $form_fields .= '</label>\n <select multiple name=\"'.$field['slug'].'\" id=\"'.$field['slug'].'\">'.\"\\r\\n\";\n foreach($field['options'] as $key => $val) {\n $form_fields .= '<option value=\"'.$key.'\">'.$val.'</option>'.\"\\r\\n\";\n }\n $form_fields .= '\n </select>\n </div>\n ';\n break;\n }\n }\n $form_fields .= '</fieldset>';\n }\n }\n \n $return = '';\n \n if(!empty($form_fields)) {\n $return .= '<div id=\"stripe-msgs\" style=\"display:none;\"></div><form name=\"stripe_payment\" class=\"stripe_payment_submission\" id=\"stripe-payment-form\" action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">';\n \n // if(function_exists('wp_nonce_field')) {\n // $return .= wp_nonce_field('stripe_nonce_field', 'stripe_add', true, false);\n // }\n \n $return .= $form_fields;\n \n $return .= '<div class=\"submit\">\n <input type=\"submit\" value=\"'.$button.'\" />\n </div>\n <div class=\"stripe-payment-form-row-progress\">\n <span class=\"message\"></span>\n </div>';\n if($isPolitical==='true') {\n $return .= str_replace('{{button}}', $button, $eligibility);\n }\n // $return .= '<p class=\"addtl-donation-footer-info\">'.str_replace(\"\\r\\n\", '<br />', str_replace('&lt;i&gt;', '<i>', str_replace('&lt;/i&gt;', '</i>', str_replace('&lt;u&gt;', '<u>', str_replace('&lt;/u&gt;', '</u>', str_replace('&lt;b&gt;', '<b>', str_replace('&lt;/b&gt;', '</b>', get_option('stripe_payments_footer_info')))))))).'</p>';\n $return .= '</form>';\n \n return $return;\n }\n }", "abstract function builder_form(): string;", "public function build_admin_field($_meta) {\r\n $html = '';\r\n $field_class = isset($_meta[\"field_class\"]) ? $_meta[\"field_class\"] : \"\";\r\n /* Add a special class if only for textarea field */\r\n $field_class .= ($_meta[\"type\"] == \"textarea\") ? \" short\" : \"\";\r\n /* Add a special class if only for radio field */\r\n $field_class .= ($_meta[\"type\"] == \"radio\") ? \" select short\" : \"\";\r\n \r\n /* Identify the field's type and start rendering */\r\n if ($_meta[\"type\"] == \"text\" || $_meta[\"type\"] == \"email\" || $_meta[\"type\"] == \"number\" || $_meta[\"type\"] == \"datepicker\" || $_meta[\"type\"] == \"colorpicker\") {\r\n $html = $this->build_input_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"textarea\") {\r\n $html = $this->build_textarea_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"radio\") {\r\n $html = $this->build_radio_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"checkbox\") {\r\n $html = $this->build_checkbox_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"select\") {\r\n $html = $this->build_select_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"image\") {\r\n $html = $this->build_image_field($_meta);\r\n } else if ($_meta[\"type\"] == \"url\") {\r\n $html = $this->build_url_field($_meta, \"wccaf\", $field_class, \"\", \"no\", \"\", \"\", true);\r\n } else if ($_meta[\"type\"] == \"html\") {\r\n $html = $_meta[\"html\"];\r\n } else {\r\n /* Unlikely */\r\n $html = '';\r\n }\r\n /* Final html tag */\r\n return $html;\r\n }", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "function wck_output_form_field( $meta, $details, $value = '', $context = '', $post_id = '' ){\r\n\t\t$element = '';\r\n\t\r\n\t\tif( $context == 'edit_form' ){\r\n\t\t\t$edit_class = '.mb-table-container ';\r\n\t\t\t$var_prefix = 'edit';\r\n\t\t}\r\n\t\telse if( $context == 'fep' ){\r\n\t\t\t/* id prefix for frontend posting */\r\n\t\t\t$frontend_prefix = 'fep-';\r\n\t\t}\r\n\t\telse{\r\n if( isset( $details['default'] ) && !( $this->args['single'] == true && !is_null( $value ) ) ) {\r\n $value = apply_filters(\"wck_default_value_{$meta}_\" . Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ), $details['default']);\r\n }\r\n }\r\n\r\n /* for single post meta metaboxes we need a prefix in the name attr of the input because in the case we have multiple single metaboxes on the same\r\n post we need to prevent the fields from having the same name attr */\r\n if( $this->args['context'] == 'post_meta' && $this->args['single'] && $context != 'fep' )\r\n $single_prefix = $this->args['meta_name'].'_';\r\n else\r\n $single_prefix = '';\r\n\r\n $element .= '<label for=\"'. $single_prefix . esc_attr( Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ) ) .'\" class=\"field-label\">'. apply_filters( \"wck_label_{$meta}_\". Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ), ucfirst($details['title']) ) .':';\r\n if( !empty( $details['required'] ) && $details['required'] )\r\n\t\t\t$element .= '<span class=\"required\">*</span>';\r\n\t\t$element .= '</label>';\r\n\t\t\r\n\t\t$element .= '<div class=\"mb-right-column\">';\t\r\n\t\t\r\n\t\t/* \r\n\t\tinclude actual field type\r\n\t\tpossible field types: text, textarea, select, checkbox, radio, upload, wysiwyg editor, datepicker, country select, user select, cpt select\r\n\t\t*/\r\n\t\t\r\n\t\tif( function_exists( 'wck_nr_get_repeater_boxes' ) ){\r\n\t\t\t$cfc_titles = wck_nr_get_repeater_boxes();\r\n\t\t\tif( in_array( $details['type'], $cfc_titles ) ){\r\n\t\t\t\t$details['type'] = 'nested repeater';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif( file_exists( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' ) ){\r\n\t\t\trequire( dirname( __FILE__ ).'/fields/'.$details['type'].'.php' );\r\n\t\t}\r\n\r\n // Add a filter that allows us to add support for custom field types, not just the ones defined in fields (wck api)\r\n $element .= apply_filters('wck_output_form_field_customtype_' . $details['type'], '', $value, $details, $single_prefix);\r\n\t\t\r\n\t\tif( !empty( $details['description'] ) ){\r\n\t\t\t$element .= '<p class=\"description\">'. $details['description'].'</p>';\r\n\t\t}\r\n\t\t\r\n\t\t$element .= '</div><!-- .mb-right-column -->';\r\n\r\n\t\t$element = apply_filters( \"wck_output_form_field_{$meta}_\" . Wordpress_Creation_Kit_PB::wck_generate_slug( $details['title'], $details ), $element );\r\n\t\t\r\n\t\treturn $element;\r\n\t\t\t\t\r\n\t}", "function os2forms_nemid_webform_edit_component($component) {\n $form = array();\n $form['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Default value'),\n '#default_value' => $component['value'],\n '#description' => t('The default value of the field.') . ' ' . theme('webform_token_help'),\n '#size' => 60,\n '#maxlength' => 1024,\n '#weight' => 0,\n );\n $form['display']['placeholder'] = array(\n '#type' => 'textfield',\n '#title' => t('Placeholder'),\n '#default_value' => $component['extra']['placeholder'],\n '#description' => t('The placeholder will be shown in the field until the user starts entering a value.'),\n '#weight' => 10,\n '#parents' => array('extra', 'placeholder'),\n );\n $form['display']['disabled'] = array(\n '#type' => 'checkbox',\n '#title' => t('Readonly'),\n '#default_value' => $component['extra']['disabled'],\n '#description' => t('Make this field non-editable. Useful for setting an unchangeable default value.'),\n '#weight' => 20,\n '#parents' => array('extra', 'disabled'),\n );\n $form['display']['element_hidden'] = array(\n '#type' => 'checkbox',\n '#title' => t('Hidden'),\n '#default_value' => $component['extra']['hidden'],\n '#description' => t('Make this field hidden.'),\n '#weight' => 10,\n '#parents' => array('extra', 'hidden'),\n );\n return $form;\n}", "public function generateFormProperites(){\r\n\t\t$formProperties = $this->formProperties;\r\n\t\t$formTags = '<form ';\r\n\t\tif(sizeof($formProperties) > 0) {\r\n\t\t\tforeach($formProperties as $key=>$params){\r\n\t\t\t\t$formTags .= $key.'=\"'.$params.'\" ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$formTags\t\t.= '>';\r\n\t\treturn $formTags;\r\n\t}", "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "function ROMP_enquiry_form_page_shortcode(){\n\n?>\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\"><div class=\"loading\">Loading&#8230;</div></div>\n\t\t\t\t<form method=\"POST\" onsubmit=\"enquiryPageSubmitFunction()\" id=\"form-enquiry-page\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<fieldset id=\"personal_information\">\n\t\t\t\t\t\t\t<legend>Personal Information:</legend>\n\t\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t \t<select name=\"title\" id=\"title\" class=\"form-control\">\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Select Title\">Select Title</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Mr\">Mr</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Mrs\">Mrs</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Miss\">Miss</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Ms\">Ms</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Dr\">Dr</option>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"Other\">Other</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"fname\" name=\"fname\" placeholder=\"Enter First Name\" required>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"sname\" name=\"sname\" placeholder=\"Surname\" required>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-6 col-xl-6\">\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t <input type=\"tel\" class=\"form-control\" id=\"landline\" name=\"landline\" placeholder=\"Phone Number\">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t <input type=\"tel\" class=\"form-control\" id=\"mobile\" name=\"mobile\" placeholder=\"Mobile Number\" required>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t <input type=\"email\" class=\"form-control email\" id=\"email\" name=\"email\" placeholder=\"Email Address\" required>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<fieldset id=\"postcode_section\">\n\t\t\t\t\t\t\t<legend>About Your Property:</legend>\n\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-xl-12\">\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"form-group theLabel\">\n\t\t\t\t\t\t\t\t <input type=\"text\" id=\"postcode\" placeholder=\"Postcode\" name=\"postcode\">\n\t\t\t\t\t\t\t\t <span id=\"enquiry_page_lookup_field\"></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-6 col-xl-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group theLabel\">\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"county\" name=\"county\" placeholder=\"County\" readonly>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class=\"form-group theLabel\">\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"postal_town\" name=\"postal_town\" placeholder=\"Postal Town\" readonly>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"street_address1\" name=\"street_address1\" placeholder=\"Address Line 1\" readonly>\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"street_address2\" name=\"street_address2\" placeholder=\"Address Line 2\" readonly>\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"street_address3\" name=\"street_address3\" placeholder=\"Address Line 3\" readonly>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-6 col-xl-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t <select class=\"form-control\" id=\"property_type\" name=\"property_type\">\n\t\t\t\t\t\t\t\t \t<option value=\"Type of Property\">Type of Property</option>\n\t\t\t\t\t\t\t\t \t<option value=\"Self-Contained Studio\">Self-Contained Studio</option>\n\t\t\t\t\t\t\t\t \t<option value=\"1-Bed Flat\">1-Bed Flat</option>\n\t\t\t\t\t\t\t\t \t<option value=\"2-Bed Flat\">2-Bed Flat</option>\n\t\t\t\t\t\t\t\t \t<option value=\"3-Bed Flat\">3-Bed Flat</option>\n\t\t\t\t\t\t\t\t \t<option value=\"4-Bed Flat\">4-Bed Flat</option>\n\t\t\t\t\t\t\t\t \t<option value=\"1-Bed Terraced\">1-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"2-Bed Terraced\">2-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"3-Bed Terraced\">3-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"4-Bed Terraced\">4-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"5-Bed Terraced\">5-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"6-Bed Terraced\">6-Bed Terraced</option>\n\t\t\t\t\t\t\t\t \t<option value=\"1-Bed Semi-Detached\">1-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"2-Bed Semi-Detached\">2-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"3-Bed Semi-Detached\">3-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"4-Bed Semi-Detached\">4-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"5-Bed Semi-Detached\">5-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"6-Bed Semi-Detached\">6-Bed Semi-Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"1-Bed Detached\">1-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"2-Bed Detached\">2-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"3-Bed Detached\">3-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"4-Bed Detached\">4-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"5-Bed Detached\">5-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"6-Bed Detached\">6-Bed Detached</option>\n\t\t\t\t\t\t\t\t \t<option value=\"1-Bed Apartment\">1-Bed Apartment</option>\n\t\t\t\t\t\t\t\t \t<option value=\"2-Bed Apartment\">2-Bed Apartment</option>\n\t\t\t\t\t\t\t\t \t<option value=\"3-Bed Apartment\">3-Bed Apartment</option>\n\t\t\t\t\t\t\t\t \t<option value=\"4-Bed Apartment\">4-Bed Apartment</option>\n\t\t\t\t\t\t\t\t \t<option value=\"5-Bed Apartment\">5-Bed Apartment</option>\n\t\t\t\t\t\t\t\t \t<option value=\"Land\">Land</option>\n\t\t\t\t\t\t\t\t \t<option value=\"Guest House\">Guest House</option>\n\t\t\t\t\t\t\t\t \t<option value=\"Hotel\">Hotel</option>\n\t\t\t\t\t\t\t\t \t<option value=\"Commercial Property\">Commercial Property</option>\n\t\t\t\t\t\t\t\t </select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"estimated_val\" name=\"estimated_val\" placeholder=\"Enter Estimated Value\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"estimated_secured_debts\" name=\"estimated_secured_debts\" placeholder=\"Estimated Secured Debts\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-xl-12\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t <textarea class=\"form-control\" cols=\"40\" rows=\"10\" id=\"rfs\" name=\"rfs\" placeholder=\"Reason For Selling\"></textarea>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"col-12 col-sm-12 col-md-12 col-xl-12\">\n\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-block btn-primary disabled\" id=\"submitButton\" disabled>Submit</button>\n\t\t\t\t\t\t\t\t<div class=\"alert alert-warning\" role=\"alert\"><strong>Warning!</strong> Email Address Invalid! Please use valid email address!</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n<?php\n\t}", "function df_fields($fields) {\r\n\t$fields['author'] = '<p class=\"comment-form-author\"><label>'.__(\"Name:\",THEME_NAME).'<span>*</span></label><input type=\"text\" placeholder=\"'.__(\"Name..\",THEME_NAME).'\" name=\"author\" id=\"author\">';\r\n\t$fields['email'] = '<p class=\"comment-form-email\"><label>'.__(\"E-mail:\",THEME_NAME).'<span>*</span></label><input type=\"text\" placeholder=\"'.__(\"E-mail..\",THEME_NAME).'\" name=\"email\" id=\"email\"><div class=\"clear\"></div>';\r\n\t$fields['url'] = '';\r\n\r\n\treturn $fields;\r\n}", "function custom_field_tag($name, $custom_value) {\t\n $custom_field = $custom_value['CustomField'];\n $field_name = 'custom_field_values.'.$custom_value['CustomField']['id'];\n\n switch($custom_field['field_format']) {\n case \"date\" :\n $out = $this->Form->input($field_name, array('type'=>'text', 'size'=>10, 'label'=>false, 'div'=>false)); \n // TODO : calender \n // $out .= calendar_for(field_id)\n break;\n case \"text\" :\n $out = $this->Form->input($field_name, array('type'=>'textarea', 'rows'=>3, 'style'=> 'width:90%', 'label'=>false, 'div'=>false ));\n break;\n case \"bool\" :\n $out = $this->Form->input($field_name, array('type'=>'checkbox', 'label'=>false, 'div'=>false));\n break;\n case \"list\" :\n $empty = true;\n $selected = null;\n $type = 'select';\n if($custom_field['is_required']) {\n $empty = false;\n if(empty($custom_field['default_value'])) {\n $options[] = '--- '.__('Please Select').' ---';\n } elseif(empty($this->request->data['custom_field_values'][$custom_value['CustomField']['id']])) {\n $selected = $custom_field['default_value'];\n }\n }\n App::Import('vendor', 'georgious-cakephp-yaml-migrations-and-fixtures/spyc/spyc');\n $list = Spyc::YAMLLoad($custom_value['CustomField']['possible_values']);\n $options = array();\n if(!empty($list)) {\n foreach($list as $item) {\n $options[$item] = $item;\n }\n }\n \n $out = $this->Form->input($field_name, array_merge(compact('type', 'empty', 'selected', 'options'), array('label'=>false, 'div'=>false)));\n break;\n default :\n $out = $this->Form->input($field_name, array('type'=>'text', 'label'=>false, 'div'=>false));\n break;\n }\n return $out;\n }", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function field($key = '', $value = null, $id = null, $options = array()) {\r\n $_options = array(\r\n 'key' => array(\r\n 'label' => __('Key', true),\r\n 'value' => $key,\r\n ),\r\n 'value' => array(\r\n 'label' => __('Value', true),\r\n 'value' => $value,\r\n ),\r\n );\r\n $options = array_merge($_options, $options);\r\n $uuid = String::uuid();\r\n\r\n $fields = '';\r\n if ($id != null) {\r\n $fields .= $this->Form->input('Meta.'.$uuid.'.id', array('type' => 'hidden', 'value' => $id));\r\n }\r\n $fields .= $this->Form->input('Meta.'.$uuid.'.key', $options['key']);\r\n $fields .= $this->Form->input('Meta.'.$uuid.'.value', $options['value']);\r\n $fields = $this->Html->tag('div', $fields, array('class' => 'fields'));\r\n\r\n $actions = $this->Html->link(__('Remove', true), '#', array('class' => 'remove-meta', 'rel' => $id), null, null, false);\r\n $actions = $this->Html->tag('div', $actions, array('class' => 'actions'));\r\n\r\n $output = $this->Html->tag('div', $actions . $fields, array('class' => 'meta'));\r\n return $output;\r\n }", "function hgr_minimal_form($atts, $content = null ) {\n\t\t\twp_enqueue_script('hgr-vc-modernizr');\n\t\t\twp_enqueue_script('hgr-vc-classie');\n\t\t\twp_enqueue_script('hgr-vc-stepsform');\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t\tEmpty vars declaration\n\t\t\t*/\n\t\t\t$output = $form_size = $form_style = $form_size_class = $label_text_size = $label_text_color = $input_text_color = $next_icon_color = $confirmation_text = $confirmation_text_size = $confirmation_text_color = $steps_text_color = $form_input_color = $progress_bar_bgcolor = $email_form = $confirmation_text_style = $progress_bar_style = $steps_text_style = $next_icon_style = $label_text_style = $input_text_style = $form_input_style = $hgr_minimal_sendmail = $css = '';\n\t\t\t\n\t\t\t/*\n\t\t\t\tWordPress function to extract shortcodes attributes\n\t\t\t\tRefference: http://codex.wordpress.org/Function_Reference/shortcode_atts\n\t\t\t*/\n\t\t\textract(shortcode_atts(array(\n\t\t\t\t'form_size'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'form_style'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'label_text_size'\t\t\t\t=>\t'',\n\t\t\t\t'label_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'input_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'next_icon_color'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text_size'\t\t=>\t'',\n\t\t\t\t'confirmation_text_color'\t\t=>\t'',\n\t\t\t\t'steps_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'form_input_color'\t\t\t\t=>\t'',\n\t\t\t\t'progress_bar_bgcolor'\t\t\t=>\t'',\n\t\t\t\t'email_form'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'css'\t\t\t\t\t\t\t=>\t'',\n\t\t\t), $atts));\n\t\t\t\n\t\t\t$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts );\n\t\t\t\n\t\t\tswitch($form_size){\n\t\t\t\tcase 'large':\n\t\t\t\t\t$form_size_class = 'simform-large';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'medium':\n\t\t\t\t\t$form_size_class = 'simform-medium';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'small':\n\t\t\t\t\t$form_size_class = 'simform-small';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tswitch($form_style){\n\t\t\t\tcase 'standard':\n\t\t\t\t\t$confirmation_text_style = '';\n\t\t\t\t\t$progress_bar_style = '';\n\t\t\t\t\t$steps_text_style = '';\n\t\t\t\t\t$next_icon_style = '';\n\t\t\t\t\t$label_text_style = '';\n\t\t\t\t\t$input_text_style = '';\n\t\t\t\t\t$form_input_style = 'rgba(0,0,0,0.1)';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'advanced':\t\t\t\t\t\n\t\t\t\t\t$confirmation_text_style = 'style=\"'.($confirmation_text_size !== '' ? 'font-size:'.$confirmation_text_size.'px;' : '').''.($confirmation_text_color !== '' ? 'color:'.$confirmation_text_color.';' : '').'\"';\n\t\t\t\t\t$progress_bar_style = 'style=\"'.($progress_bar_bgcolor !== '' ? 'background:'.$progress_bar_bgcolor : '').'\"';\n\t\t\t\t\t$steps_text_style = 'style=\"'.($steps_text_color !== '' ? 'color:'.$steps_text_color : '').'\"';\n\t\t\t\t\t$next_icon_style = 'style=\"'.($next_icon_color !== '' ? 'color:'.$next_icon_color : '').'\"';\n\t\t\t\t\t$label_text_style = 'style=\"'.($label_text_size !== '' ? 'font-size:'.$label_text_size.'px;' : '').''.($label_text_color !== '' ? 'color:'.$label_text_color.';' : '').'\"';\n\t\t\t\t\t$input_text_style = 'style=\"'.($input_text_color !== '' ? 'color:'.$input_text_color : '').'\"';\n\t\t\t\t\t$form_input_style = ($form_input_color !== '' ? $form_input_color : 'rgba(0,0,0,0.1)');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$GLOBALS['hgr_label_style'] = $label_text_style;\n\t\t\t$GLOBALS['hgr_input_text_style'] = $input_text_style;\n\t\t\t$GLOBALS['hgr_minimal_sendmail'] = $email_form;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$output .= '<script>\n\t\t\t\tjQuery( document ).ready(function() {\n\t\t\t\t\t//Add form size class\n\t\t\t\t\tjQuery(\"#theForm\").addClass(\"'.$form_size_class.'\");\n\t\t\t\t\t\n\t\t\t\t\t//Add form background color\n\t\t\t\t\tjQuery(\"head\").append(\"<style>.hgr-minimal-form .simform ol:before{background:'.$form_input_style.';}</style>\");\n\t\t\t\t\t\n\t\t\t\t\tvar theForm = document.getElementById( \"theForm\" );\n\t\t\t\t\tnew stepsForm( theForm, {\n\t\t\t\t\t\tonSubmit : function( form ) {\n\t\t\t\t\t\t\tclassie.addClass( theForm.querySelector( \".simform-inner\" ), \"hide\" );\n\t\t\t\t\t\t\tvar messageEl = theForm.querySelector( \".final-message\" );\n\t\t\t\t\t\t\tmessageEl.innerHTML = \"'.$confirmation_text.'\";\n\t\t\t\t\t\t\tclassie.addClass( messageEl, \"show\" );\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// Submits the form\n\t\t\t\t\tstepsForm.prototype._submit = function() {\n\t\t\t\t\t\t// get all the inputs into an array.\n\t\t\t\t\t\tvar $inputs = jQuery(\"#theForm :input\");\n\n\t\t\t\t\t\tvar values = {};\n\t\t\t\t\t\t$inputs.each(function() {\n\t\t\t\t\t\t\tif( jQuery(this).val() != \"\" ) {\n\t\t\t\t\t\t\t\tvalues[jQuery(this).attr(\"data-question\")] = jQuery(this).val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// send email\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\taction: \"mail_before_submit\",\n\t\t\t\t\t\t\twhatever: values,\n\t\t\t\t\t\t\t_ajax_nonce: \"'.wp_create_nonce( \"my_email_ajax_nonce\" ).'\"\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tjQuery.post(\"'. get_bloginfo(\"url\").'/wp-admin/admin-ajax.php\", data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// show confirmation text\n\t\t\t\t\t\tthis.options.onSubmit( this.el );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>';\n\t\t\t\n\t\t\t\t$output .= '<div class=\"hgr-minimal-form ' . esc_attr( $css_class ) . '\">';\n\t\t\t\t\t$output .= '<form id=\"theForm\" class=\"simform\" autocomplete=\"off\">';\n\t\t\t\t\t\t$output .= '<div class=\"simform-inner\">';\n\t\t\t\t\t\t\t$output .= '<ol class=\"questions\">';\n\t\t\t\t\t\t\t\t$output .= do_shortcode($content);\n\t\t\t\t\t\t\t$output .= '</ol><!-- /questions -->';\n\t\t\t\t\t\t\t$output .= '<button class=\"submit\" type=\"submit\">Send answers</button>';\n\t\t\t\t\t\t\t$output .= '<div class=\"controls\" '.$progress_bar_style.'>';\n\t\t\t\t\t\t\t\t$output .= '<button class=\"hgr-next-button\" '.$next_icon_style.'></button>';\n\t\t\t\t\t\t\t\t$output .= '<div class=\"progress\"></div>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"number\" '.$steps_text_style.'>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-current\"></span>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-total\"></span>';\n\t\t\t\t\t\t\t\t$output .= '</span>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"error-message\"></span>';\n\t\t\t\t\t\t\t$output .= '</div><!-- / controls -->';\n\t\t\t\t\t\t$output .= '</div><!-- /simform-inner -->';\n\t\t\t\t\t\t$output .= '<span class=\"final-message\" '.$confirmation_text_style.'></span>';\n\t\t\t\t\t$output .= '</form><!-- /simform -->';\n\t\t\t\t$output .= '</div>';\n\t\t\t\n\t\t\t/*\n\t\t\t\tReturn the output\n\t\t\t*/\n\t\t\treturn $output;\n\t\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function setfield( $field_name, $options ) {\n\n//if( $this->debug ) {\n//print \"<pre>\";\n//print \"Options:\\n-----------------------------\\n\";\n//print_r( $options );\n//print $options['name'];\n//print $options['value'];\n//print \"\\n--------------------------------------\\n\";\n//print \"</pre>\";\n//}\n\n/*\n Options (to this function, not an HTML menu option) is an associative array, which gives\n you great flexibility in setting any number\n of options you want.\n \n\tarray(\n\t\t'name' => 'email',\n\t\t'value'\t=> '[email protected]',\n\t\t'label' => 'Email Address',\n\t\t'required' => 1\n\t\t);\n */\n \n$this->fields[$field_name]['name'] = ( $options['name'] ) ? $options['name'] : '';\n\n$this->fields[$field_name]['value'] = ( $options['value'] )\t? $options['value'] : '';\n\nif( $this->debug ) {\nprint \"<pre>\";\nprint \"Value (option): \" . $options['value'] . \"\\n\";\nprint \"Value: \" . $this->fields[$field_name]['value'] . \"\\n\";\nprint \"</pre>\";\n}\n\n$this->fields[$field_name]['label'] = ( $options['label'] )\t? $options['label'] : '';\n\n$this->fields[$field_name]['required'] = ( $options['required'] ) ? $options['required'] : '';\n\n/*\nthe short circuit are a little space saving, but not too much, perl is much more elegant\nthis might be clearest\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][name] = $options['name'];\n\t}\n\tif( $options['value'] ) {\n\t\t$this->fields[$field_name][value] = $options['name']\n\t}\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][label] = $options['name']\n\t}\n\tif( $options['name'] ) {\n\t\t$this->fields[$field_name][is_required] = $options['name']\n\t}\n \tif( $options['name'] ) {\n\t\t$this->fields[$field_name][invalid] = $options['name']\n\t}\n*/\n\t//$this->fields[$field_name][error] ???\n\n}", "public function Render_Shortcode($attr,$content,$shortcode) {\r\n $vcff_forms = vcff_get_library('vcff_forms');\r\n // Retrieve the form instance\r\n $form_instance = $vcff_forms->vcff_focused_form;\r\n // Retrieve the form supports\r\n $form_supports = $form_instance->supports; \r\n // If no support instance could be found\r\n if (!isset($form_supports[$attr['machine_code']])) { return 'No element instance found for '.$attr['machine_code']; }\r\n // Retrieve the element instance\r\n $support_el = $form_supports[$attr['machine_code']];\r\n // Render the instance\r\n return $support_el->Render($contents);\r\n }", "function form($instance) {\n\t\t\n\t\t$defaults= array(\t\t\t\t\n\t\t\t'skill_title' => 'Skill',\n\t\t\t'skill_level' => '70',\t\t\t\n\t\t\t'skill_color' => '#ebebeb'\t\t\n\t\t);\n\t\t\n\t\t$instance = wp_parse_args($instance, $defaults);\n\t\textract($instance);\n\t\t\n\t\t?>\n\t\t\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_title') ?>\">\n\t\t\t\tSkill Title<br/>\n\t\t\t\t<?php echo aq_field_input('skill_title', $block_id, $skill_title) ?>\t\t\n\t\t\t</label>\n\t\t</p>\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_level') ?>\">\n\t\t\t\tSkill Level<br/>\n\t\t\t\t<?php echo aq_field_input('skill_level', $block_id, $skill_level, 'min', 'number') ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<div class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_color') ?>\">\n\t\t\t\tSkill Graph Color<br/>\n\t\t\t\t<?php echo aq_field_color_picker('skill_color', $block_id, $skill_color) ?>\n\t\t\t</label>\n\t\t\t\n\t\t</div>\n\t\t\n\t\t\n\t\t<?php\n\t\t\n\t}", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "function get_fields($name_suffix='',$title='',$description='',$enabled=1,$cost=NULL,$one_per_member=0)\n\t{\n\t\trequire_lang('points');\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('TITLE'),do_lang_tempcode('DESCRIPTION_TITLE'),'custom_title'.$name_suffix,$title,true));\n\t\t$fields->attach(form_input_text(do_lang_tempcode('DESCRIPTION'),do_lang_tempcode('DESCRIPTION_DESCRIPTION'),'custom_description'.$name_suffix,$description,true));\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('COST'),do_lang_tempcode('HOW_MUCH_THIS_COSTS'),'custom_cost'.$name_suffix,$cost,true));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('ONE_PER_MEMBER'),do_lang_tempcode('DESCRIPTION_ONE_PER_MEMBER'),'custom_one_per_member'.$name_suffix,$one_per_member==1));\n\t\t$fields->attach(form_input_tick(do_lang_tempcode('ENABLED'),'','custom_enabled'.$name_suffix,$enabled==1));\n\t\treturn $fields;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function qform_build($table, $simple = false, $utf8 = true, $val = 'sql')\n{\n global $dbh;\n $res = sql_query(\"SELECT * FROM $table\");\n $fields = mysqli_num_fields($res);\n $rows = mysqli_num_rows($res);\n $i = 0;\n echo \"Your '\".$table.\"' table has \".$fields.\" fields and \".$rows.\" records <br />\";\n echo \"Copy & paste the following to create qform_def: <br /><hr />\";\n\n $mysql_data_type_hash = array(1=>'tinyint',2=>'smallint',3=>'int',4=>'float',5=>'double',7=>'timestamp',8=>'bigint',9=>'mediumint',10=>'date',\n 11=>'time',12=>'datetime',13=>'year',16=>'bit',252=>'text',253=>'varchar',254=>'char',246=>'decimal');\n while ($i < $fields) {\n $tbl = mysqli_fetch_field_direct($res, $i);\n $type = $mysql_data_type_hash[$tbl->type];\n $name = $tbl->name;\n $len = $tbl->length;\n $flags = $tbl->flags;\n $ftitle = ucwords(strtolower(str_replace('_', ' ', $name)));\n $ffield = $name;\n $fsize = 0;\n\n if (($type == 'blob') || ($type == 'text')) {\n $ftype = 'text';\n $fsize = '500,200';\n } elseif ($type == 'date') {\n $ftype = 'date';\n } elseif ($type == 'time') {\n $ftype = 'time';\n } else {\n $ftype = 'varchar';\n if ($utf8) {\n $len = $len / 3;\n }\n $fsize = $len;\n }\n\n if ($val == 'val') {\n $var = \"\\$val['$ffield']\";\n } else {\n $var = \"'sql'\";\n }\n\n echo \"<p>// $name :: $type :: $len<br />\";\n\n if ($simple) {\n echo \"\\$qform_def['$name'] = array ('title' => '$ftitle',<br />\\n\"\n .\"'field' => '$ffield',<br />\\n\"\n .\"'type' => '$ftype',<br />\\n\";\n if ($fsize) {\n echo \"'size' => '$fsize',<br />\\n\";\n }\n echo \"'value' => $var);\\n\"\n .\"</p>\";\n } else {\n echo \"\\$qform_def['$name']['title'] = '$ftitle';<br />\\n\"\n .\"\\$qform_def['$name']['field'] = '$ffield';<br />\\n\"\n .\"\\$qform_def['$name']['type'] = '$ftype';<br />\\n\";\n if ($fsize) {\n echo \"\\$qform_def['$name']['size'] = '$fsize';<br />\\n\";\n }\n echo \"\\$qform_def['$name']['value'] = 'sql';\\n\"\n .\"</p>\";\n }\n $i++;\n }\n echo '<hr />';\n}", "public static function shortcode_handler($tag) {\r\r\n $tag = new WPCF7_FormTag($tag);\r\r\n //ob_start();\r\r\n //print_r($tag);\r\r\n //return print_r($tag, true);\r\r\n return $tag->content;\r\r\n }", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "static function parse( $attributes, $content ) {\n\t\t// Create a new Grunion_Contact_Form object (this class)\n\t\t$form = new Grunion_Contact_Form( $attributes, $content );\n\n\t\t$id = $form->get_attribute( 'id' );\n\n\t\tif ( !$id ) { // something terrible has happened\n\t\t\treturn '[contact-form]';\n\t\t}\n\n\t\tif ( is_feed() ) {\n\t\t\treturn '[contact-form]';\n\t\t}\n\n\t\t// Only allow one contact form per post/widget\n\t\tif ( self::$last && $id == self::$last->get_attribute( 'id' ) ) {\n\t\t\t// We're processing the same post\n\n\t\t\tif ( self::$last->attributes != $form->attributes || self::$last->content != $form->content ) {\n\t\t\t\t// And we're processing a different shortcode;\n\t\t\t\treturn '';\n\t\t\t} // else, we're processing the same shortcode - probably a separate run of do_shortcode() - let it through\n\n\t\t} else {\n\t\t\tself::$last = $form;\n\t\t}\n\n\t\t// Enqueue the grunion.css stylesheet if self::$style allows it\n\t\tif ( self::$style && ( empty( $_REQUEST['action'] ) || $_REQUEST['action'] != 'grunion_shortcode_to_json' ) ) {\n\t\t\t// Enqueue the style here instead of printing it, because if some other plugin has run the_post()+rewind_posts(),\n\t\t\t// (like VideoPress does), the style tag gets \"printed\" the first time and discarded, leaving the contact form unstyled.\n\t\t\t// when WordPress does the real loop.\n\t\t\twp_enqueue_style( 'grunion.css' );\n\t\t}\n\n\t\t$r = '';\n\t\t$r .= \"<div id='contact-form-$id'>\\n\";\n\n\t\tif ( is_wp_error( $form->errors ) && $form->errors->get_error_codes() ) {\n\t\t\t// There are errors. Display them\n\t\t\t$r .= \"<div class='form-error'>\\n<h3>\" . __( 'Error!', 'jetpack' ) . \"</h3>\\n<ul class='form-errors'>\\n\";\n\t\t\tforeach ( $form->errors->get_error_messages() as $message )\n\t\t\t\t$r .= \"\\t<li class='form-error-message'>\" . esc_html( $message ) . \"</li>\\n\";\n\t\t\t$r .= \"</ul>\\n</div>\\n\\n\";\n\t\t}\n\n\t\tif ( isset( $_GET['contact-form-id'] ) && $_GET['contact-form-id'] == self::$last->get_attribute( 'id' ) && isset( $_GET['contact-form-sent'] ) ) {\n\t\t\t// The contact form was submitted. Show the success message/results\n\n\t\t\t$feedback_id = (int) $_GET['contact-form-sent'];\n\n\t\t\t$back_url = remove_query_arg( array( 'contact-form-id', 'contact-form-sent', '_wpnonce' ) );\n\n\t\t\t$r_success_message =\n\t\t\t\t\"<h3>\" . __( 'Message Sent', 'jetpack' ) .\n\t\t\t\t' (<a href=\"' . esc_url( $back_url ) . '\">' . esc_html__( 'go back', 'jetpack' ) . '</a>)' .\n\t\t\t\t\"</h3>\\n\\n\";\n\n\t\t\t// Don't show the feedback details unless the nonce matches\n\t\t\tif ( $feedback_id && wp_verify_nonce( stripslashes( $_GET['_wpnonce'] ), \"contact-form-sent-{$feedback_id}\" ) ) {\n\t\t\t\t$r_success_message .= self::success_message( $feedback_id, $form );\n\t\t\t}\n\n\t\t\t$r .= apply_filters( 'grunion_contact_form_success_message', $r_success_message );\n\t\t} else {\n\t\t\t// Nothing special - show the normal contact form\n\n\t\t\tif ( $form->get_attribute( 'widget' ) ) {\n\t\t\t\t// Submit form to the current URL\n\t\t\t\t$url = remove_query_arg( array( 'contact-form-id', 'contact-form-sent', 'action', '_wpnonce' ) );\n\t\t\t} else {\n\t\t\t\t// Submit form to the post permalink\n\t\t\t\t$url = get_permalink();\n\t\t\t}\n\n\t\t\t// For SSL/TLS page. See RFC 3986 Section 4.2\n\t\t\t$url = set_url_scheme( $url );\n\n\t\t\t// May eventually want to send this to admin-post.php...\n\t\t\t$url = apply_filters( 'grunion_contact_form_form_action', \"{$url}#contact-form-{$id}\", $GLOBALS['post'], $id );\n\n\t\t\t$r .= \"<form action='\" . esc_url( $url ) . \"' method='post' class='contact-form commentsblock'>\\n\";\n\t\t\t$r .= $form->body;\n\t\t\t$r .= \"\\t<p class='contact-submit'>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='submit' value='\" . esc_attr( $form->get_attribute( 'submit_button_text' ) ) . \"' class='pushbutton-wide'/>\\n\";\n\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t$r .= \"\\t\\t\" . wp_nonce_field( 'contact-form_' . $id, '_wpnonce', true, false ) . \"\\n\"; // nonce and referer\n\t\t\t}\n\t\t\t$r .= \"\\t\\t<input type='hidden' name='contact-form-id' value='$id' />\\n\";\n\t\t\t$r .= \"\\t\\t<input type='hidden' name='action' value='grunion-contact-form' />\\n\";\n\t\t\t$r .= \"\\t</p>\\n\";\n\t\t\t$r .= \"</form>\\n\";\n\t\t}\n\n\t\t$r .= \"</div>\";\n\n\t\treturn $r;\n\t}", "function _sp_custom_box_contact_form_shortcode( $post ) {\n\n\t$output = '';\n\n\t$output .= '<div class=\"settings-container\">' . PHP_EOL;\t\n\t$output .= '[sp-contact id=\"' . $post->ID . '\"]' . PHP_EOL;\n\t$output .= '<p class=\"howto\">' . __( 'Paste this shortcode on the page you want this contact form to show.', 'sp-theme' ) . '</p>' . PHP_EOL;\n\t$output .= '</div>' . PHP_EOL;\n\n\techo $output;\n}", "public function getInputHtml($field, $value = null) \n\t{\n\n\t $theField = craft()->fields->getFieldById($field->fieldId);\n\t $fieldType = $theField->getFieldType();\n\n\t $requiredField = $field->required; \n\t $theField->required = $requiredField; \n\n\t $attributes \t\t\t= $theField->attributes;\n\t $pluginSettings \t= craft()->plugins->getPlugin('FormBuilder2')->getSettings(); // DEPRICATE\n\n\t craft()->path->setTemplatesPath(craft()->path->getPluginsPath());\n\n\t $templatePath = craft()->path->getPluginsPath() . 'plugins/formbuilder2/templates/inputs/';\n\t $customTemplatePath = craft()->path->getPluginsPath() . 'formbuilder2/templates/custom/inputs/';\n\t $extension = '.twig';\n\n\t if (isset($attributes['settings']['placeholder'])) { $varPlaceholder = $attributes['settings']['placeholder']; } else { $varPlaceholder = null; }\n\t if (isset($attributes['settings']['options'])) { $varOptions = $attributes['settings']['options']; } else { $varOptions = null; }\n\t if (isset($attributes['settings']['values'])) { $varValues = $attributes['settings']['values']; } else { $varValues = null; }\n\t if (isset($attributes['settings']['default'])) { $varOn = $attributes['settings']['default']; } else { $varOn = null; }\n\t if (isset($attributes['settings']['checked'])) { $varChecked = $attributes['settings']['checked']; } else { $varChecked = null; }\n\t if (isset($attributes['settings']['minuteIncrement'])) { $varMinuteIncrement = $attributes['settings']['minuteIncrement']; } else { $varMinuteIncrement = null; }\n\t if (isset($attributes['settings']['showTime'])) { $varShowTime = $attributes['settings']['showTime']; } else { $varShowTime = null; }\n\t if (isset($attributes['settings']['showDate'])) { $varShowDate = $attributes['settings']['showDate']; } else { $varShowDate = null; }\n\t if (isset($attributes['settings']['min'])) { $varMin = $attributes['settings']['min']; } else { $varMin = null; }\n\t if (isset($attributes['settings']['max'])) { $varMax = $attributes['settings']['max']; } else { $varMax = null; }\n\n\t $variables = [\n\t \t'type' \t\t\t\t\t=> $attributes['type'],\n\t \t'label' \t\t\t\t\t=> $attributes['name'],\n\t \t'handle' \t\t\t\t=> $attributes['handle'],\n\t \t'instructions' \t=> $attributes['instructions'],\n\t \t'placeholder' \t\t=> $varPlaceholder,\n\t \t'options' \t\t\t\t=> $varOptions,\n\t \t'value' \t\t\t\t => null,\n\t \t'values' \t\t\t\t=> $varValues,\n\t \t'on'\t\t \t\t\t\t=> $varOn,\n\t \t'checked'\t\t \t\t=> $varChecked,\n\t \t'minuteIncrement' => $varMinuteIncrement,\n\t \t'showTime'\t\t\t \t=> $varShowTime,\n\t \t'showDate'\t\t\t \t=> $varShowDate,\n\t \t'min' \t\t\t\t\t\t=> $varMin,\n\t \t'max' \t\t\t\t\t\t=> $varMax,\n\t \t'requiredJs'\t\t\t=> null,\n\t \t'required'\t \t\t=> $theField->required\n\t ];\n\n\t $html = '';\n\n\t switch ($theField->type) {\n\t case \"PlainText\":\n\t \tif ($attributes['settings']['multiline']) {\n\t \t if (IOHelper::fileExists($customTemplatePath . 'textarea' . $extension)) {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/textarea', $variables);\n\t \t } else {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/textarea', $variables);\n\t \t\t}\n\t\t } else {\n\t \t if (IOHelper::fileExists($customTemplatePath . 'text' . $extension)) {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/text', $variables);\n\t \t } else {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/text', $variables);\n\t\t \t}\n\t\t }\n\t break;\n\t case \"Checkboxes\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'checkbox' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/checkbox', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/checkbox', $variables);\n\t \t}\n\t break;\n\t case \"RadioButtons\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'radio' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/radio', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/radio', $variables);\n\t \t}\n\t break;\n\t case \"Dropdown\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'select' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/select', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/select', $variables);\n\t \t}\n\t break;\n\t case \"MultiSelect\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'select' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/multiselect', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/multiselect', $variables);\n\t \t}\n\t break;\n\t case \"RichText\":\n\t \t$variables['requiredJs'] = 'redactor';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'richtext' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/richtext', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/richtext', $variables);\n\t \t}\n\t break;\n\t case \"Lightswitch\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'lightswitch' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/lightswitch', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/lightswitch', $variables);\n\t \t}\n\t break;\n\t case \"Color\":\n\t \t$variables['value'] = '#000000';\n\t \t$variables['requiredJs'] = 'colorpicker';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'color' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/color', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/color', $variables);\n\t \t}\n\t break;\n\t case \"Date\":\n\t \t$variables['requiredJs'] = 'dateandtime';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'datetime' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/datetime', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/datetime', $variables);\n\t \t}\n\t break;\n\t case \"Number\":\n\t \t$variables['value'] = craft()->numberFormatter->formatDecimal($attributes['settings']['decimals'], false);\n\t \tif (IOHelper::fileExists($customTemplatePath . 'number' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/number', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/number', $variables);\n\t \t}\n\t break;\n\t case \"Assets\":\n\t if (IOHelper::fileExists($customTemplatePath . 'file' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/file', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/file', $variables);\n\t \t}\n\t break;\n\t }\n\n\t return $html;\n\t}", "function print_input_fields()\n{\n\t$fields = func_get_args();\n\tforeach ($fields as $field)\n\t{\n\t\t$value = array_key_value($_POST,$field,'');\n\t\t$label = ucwords(str_replace('_',' ',$field));\n\t\tprint <<<EOQ\n <tr>\n <td valign=top align=right>\n <b>$label:</b>\n </td>\n <td valign=top align=left>\n <input type=\"text\" name=\"$field\" size=\"40\" value=\"$value\">\n </td>\n </tr>\nEOQ;\n\t}\n}", "function get_fields()\n\t{\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('MAIL_DOMAIN'),do_lang_tempcode('DESCRIPTION_MAIL_DOMAIN'),'dpop3','',true));\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('MAIL_COST'),do_lang_tempcode('_DESCRIPTION_MAIL_COST'),'pop3',NULL,true));\n\t\treturn $fields;\n\t}", "public static function add_tag_panel( $form, $args = '' ) {\n\t\t$type = self::$tag_name;\n\t\tif ( ! class_exists( 'WPCF7_TagGenerator' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$args = wp_parse_args( $args, array() );\n\t\t$desc = __('Generate a form-tag for a Dynamic Select field. For more details, see %s.');\n\t\t$desc_link = '<a href=\"https://wordpress.org/plugins/contact-form-7-dynamic-select-extension/\" target=\"_blank\">'.__( 'Contact Form 7 - Dynamic Select Extension').'</a>';\n\t\t?>\n\t\t\t<div class=\"control-box\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend><?php echo sprintf( esc_html( $desc ), $desc_link ); ?></legend>\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr($args['content'].'-required'); ?>\"><?php echo esc_html(__('Required field', 'contact-form-7')); ?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"required\" id=\"<?php echo esc_attr($args['content'].'-required' ); ?>\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-name'); ?>\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('Name', 'contact-form-7')); ?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"name\" class=\"tg-name oneline\" id=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-name' ); ?>\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-id'); ?>\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('Id attribute', 'contact-form-7')); ?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"id\" class=\"idvalue oneline option\" id=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-id'); ?>\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-class'); ?>\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('Class attribute', 'contact-form-7'));?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"class\" class=\"classvalue oneline option\" id=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-class'); ?>\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-values'); ?>\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('Filter')); ?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"values\" class=\"tg-name oneline\" id=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-values' ); ?>\" /><br />\n\t\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('You can enter any filter. Use single quotes only.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSee docs &amp; examples.'));\n\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t\t\t<label for=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-multiple'); ?>\"><?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_html(__('Allow multiple selections', 'contact-form-7')); ?></label>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"multiple\" class=\"multiplevalue option\" id=\"<?php\n\t\t\t\t\t\t\t\t\t\t\techo esc_attr($args['content'].'-multiple' ); ?>\" />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</fieldset>\n\t\t\t</div>\n\t\t\t<div class=\"insert-box\">\n\t\t\t\t<input type=\"text\" name=\"dynamicdropdown\" class=\"tag code\" readonly=\"readonly\" onfocus=\"this.select()\" />\n\t\t\t\t<div class=\"submitbox\">\n\t\t\t\t\t<input type=\"button\" class=\"button button-primary insert-tag\" value=\"<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function displayForm()\r\n {\r\n $id_default_lang = $this->context->language->id;\r\n $languages = $this->context->language->getLanguages();\r\n\r\n $fields_form = array(\r\n 'fieldbrandslider-general' => array(\r\n 'form' => array(\r\n 'legend' => array(\r\n 'title' => $this->l('Manufacturer Carousel Options'),\r\n 'icon' => 'icon-cogs'\r\n ),\r\n 'input' => array(\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_title',\r\n 'label' => $this->l('Title'),\r\n 'desc' => $this->l('This title will appear just before the manufacturer carousel, leave it empty to hide it completely'),\r\n 'required' => false,\r\n 'lang' => true,\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_maxitem',\r\n 'label' => $this->l('Max item'),\r\n 'desc' => $this->l('The item number is showing on desstop screen'),\r\n 'suffix' => 'item',\r\n 'class' => 'fixed-width-xs',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_minitem',\r\n 'label' => $this->l('Min item'),\r\n 'desc' => $this->l('The item number is showing on mobile'),\r\n 'suffix' => 'item',\r\n 'class' => 'fixed-width-xs',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Auto scroll'),\r\n 'desc' => $this->l('Scroll the manufacturers automatically'),\r\n 'name' => 'fieldbrand_autoscroll',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'autoscroll_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'autoscroll_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_autoscrolldelay',\r\n 'label' => $this->l('Auto scroll delay'),\r\n 'desc' => $this->l('Delay between the auto scrolls'),\r\n 'suffix' => 'milliseconds',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Pause on hover'),\r\n 'desc' => $this->l('Pause the carousel on mouse hover'),\r\n 'name' => 'fieldbrand_pauseonhover',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'pauseonhover_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'pauseonhover_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show pagination'),\r\n 'name' => 'fieldbrand_pagination',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'pagination_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'pagination_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show navigation'),\r\n 'name' => 'fieldbrand_navigation',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'navigation_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'navigation_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show manufacturers title'),\r\n 'name' => 'fieldbrand_mantitle',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'mantitle_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'mantitle_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n )\r\n ),\r\n // Submit Button\r\n 'submit' => array(\r\n 'title' => $this->l('Save'),\r\n 'name' => 'saveFrontpageBlocksOptions'\r\n )\r\n )\r\n )\r\n );\r\n\r\n $helper = new HelperForm();\r\n\r\n $helper->module = $this;\r\n $helper->name_controller = $this->name;\r\n $helper->token = Tools::getAdminTokenLite('AdminModules');\r\n $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;\r\n\r\n $helper->default_form_language = $id_default_lang;\r\n $helper->allow_employee_form_lang = $id_default_lang;\r\n\r\n $helper->title = $this->displayName;\r\n $helper->show_toolbar = true;\r\n $helper->toolbar_scroll = true;\r\n $helper->submit_action = 'submit'.$this->name;\r\n\r\n foreach($languages as $language){\r\n $helper->languages[] = array(\r\n 'id_lang' => $language['id_lang'],\r\n 'iso_code' => $language['iso_code'],\r\n 'name' => $language['name'],\r\n 'is_default' => ($id_default_lang == $language['id_lang'] ? 1 : 0)\r\n );\r\n }\r\n\r\n // Load current values\r\n $helper->fields_value['fieldbrand_maxitem'] = Configuration::get($this->name . '_MAXITEM');\r\n $helper->fields_value['fieldbrand_minitem'] = Configuration::get($this->name . '_MINITEM');\r\n $helper->fields_value['fieldbrand_autoscroll'] = Configuration::get($this->name . '_AUTOSCROLL');\r\n $helper->fields_value['fieldbrand_autoscrolldelay'] = Configuration::get($this->name . '_AUTOSCROLLDELAY');\r\n $helper->fields_value['fieldbrand_pauseonhover'] = Configuration::get($this->name . '_PAUSEONHOVER');\r\n $helper->fields_value['fieldbrand_pagination'] = Configuration::get($this->name . '_PAGINATION');\r\n $helper->fields_value['fieldbrand_navigation'] = Configuration::get($this->name . '_NAVIGATION');\r\n $helper->fields_value['fieldbrand_mantitle'] = Configuration::get($this->name . '_MANTITLE');\r\n\r\n foreach($languages as $language){\r\n $helper->fields_value['fieldbrand_title'][$language['id_lang']] = Configuration::get($this->name . '_TITLE', $language['id_lang']);\r\n }\r\n\r\n return $helper->generateForm($fields_form);\r\n }", "public static function showWebformShortCode($atts)\n\t{\n\t\t$params = shortcode_atts(array(\n\t\t\t'url' => 'null',\n\t\t\t'css' => 'on',\n\t\t\t'center' => 'off',\n\t\t\t'center_margin' => '200',\n\t\t\t'variant' => ''\n\t\t), $atts);\n\n\t\t$div_start = $div_end = '';\n\t\tif ($params['center'] == 'on')\n\t\t{\n\t\t\t$div_start = '<div style=\"margin-left: auto; margin-right: auto; width: ' . $params['center_margin'] . 'px;\">';\n\t\t\t$div_end = '</div>';\n\t\t}\n\n\t\t$css = ($params['css'] == \"off\") ? htmlspecialchars(\"&css=1\") : \"\";\n\n\t\t$variant_maps = array('A' => 0, 'B' => 1, 'C' => 2, 'D' => 3, 'E' => 4, 'F' => 5, 'G' => 6, 'H' => 7);\n\t\t$params['variant'] = strtoupper($params['variant']);\n\t\t$variant = (in_array($params['variant'], array_keys($variant_maps))) ? htmlspecialchars(\"&v=\" . $variant_maps[$params['variant']]) : \"\";\n\n\t\t$params['url'] = self::replaceHttpsToHttpIfSslOn($params['url']);\n\n\t\treturn $div_start . '<script type=\"text/javascript\" src=\"' . $params['url'] . $css . $variant . '\"></script>' . $div_end;\n\t}", "function gtags_add_tags_form() {\n\tglobal $show_group_add_form;\n\tif ($show_group_add_form) return;\n\t$show_group_add_form = true;\n\t?>\n\t<p class=\"editfield\">\n\t\t<label for=\"group-tags\">Mots-clés</label>\n\t\t<input type=\"text\" name=\"group-tags\" id=\"group-tags\" value=\"<?php gtags_group_tags() ?>\" />\n\t\tSéparez les mots-clés par des virgules\n\t\t<?php gtags_show_tags_chooser(); ?>\n\t\t\n\t</p>\n\t<?php\n}", "function filter_shortcode_contact_form( $content, $code, Array $attrs, $context)\n\t{\n\t\treturn $this->build_jambo_form( $attrs, $context )->get();\n\t}", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "function group_field( $group_key ) {\n // get the group field object\n $group_field = get_field_object( $group_key );\n\n // init return variable\n $output = '';\n\n // group title\n $output .= '<h2>' . $group_field[ 'label' ] . '</h2>';\n\n // display each question, it there's a reply\n foreach ( $group_field['sub_fields'] as $subfield ) {\n $reply = $group_field['value'][$subfield['name']];\n // if it's Control placeholder field, or tags field, skip it\n if ( 'Controls' != $subfield['label'] &&\n 'Select at least 3 tags that describe your actions. We encourage you to add additional tags as needed.' != $subfield['label'] &&\n 'Additional tags' != $subfield['label'] ) :\n $output .= '<div class=\"form-question ' . $subfield['key'] . '\">\n <h3>' . $subfield['label'] . '</h3>\n <div class=\"reply\">\n ' . $group_field['value'][$subfield['name']] . '\n </div>\n </div><!-- end of form-question -->';\n endif;\n }\n\n echo $output;\n}", "function toString($showRequiredLabel = false, $showAsMergedField = false) \n\t{\n\t\t// Determine if there's an error or not, allow CSS to show that.\n\t\t$errorcss = false;\n\t\tif ($this->renderWithErrors) {\n\t\t\t$errorcss = \"row-has-errors\";\n\t\t}\n\t\t\n\t\t// Formfield class, on by default\n\t\t$trclass = \" class=\\\"form-field $errorcss\\\"\";\n\t\tif (!$this->isformfield) {\n\t\t\t$trclass = \" class=\\\"$errorcss\\\"\";\n\t\t}\n\t\t\n\t\t// Don't need rows for merged fields\n\t\tif (!$showAsMergedField) {\n\t\t\t$elementString = \"<tr valign=\\\"top\\\"$trclass>\\n\";\n\t\t}\n\t\t\n\t\t// Provide the option of showing the required field.\n\t\t$requiredHTML = false;\n\t\tif ($showRequiredLabel && $this->required) {\n\t\t\t$requiredHTML = '<span class=\"description req\"> (' . $this->getTranslationString('required') .')</span>';\n\t\t}\n\n\t\t// The label - if a normal row, this is just a table heading\n\t\tif (!$showAsMergedField) \n\t\t{\n\t\t\t$elementString .= \"\\t\".'<th scope=\"row\"><label for=\"'.$this->name.'\">'.$this->label.$requiredHTML.'</label></th>'.\"\\n\";\t\t \n\t\t\n\t\t\t// Start the table data for the form element and description \n\t\t\t$elementString .= \"\\t<td>\\n\\t\\t\";\n\t\t}\n\t\telse {\n\t\t\t$elementString .= \"\\t<div class=\\\"subelement-title\\\"><b>$this->label$requiredHTML</b></div>\\n\";\n\t\t}\n\n\t\t// Have we got any details on the maximum string length?\n\t\t$sizeInfo = false;\n\t\tif ($this->type == 'textarea' && \t\t\t\t\t\t// Text Area only\n\t\t\t$this->validationRules && \t\t\t\t\t\t\t// Have validation rules\n\t\t\tisset($this->validationRules['maxlen']) && \t\t\t// Have a maximum length\n\t\t\t$maxLen = ($this->validationRules['maxlen'] + 0)) \t// And it's greater than 0\n\t\t{\n\t\t\t$sizeInfo = 'textarea_counter';\n\n\t\t\t// Hide size counter when not in use.\n\t\t\t$this->afterFormElementHTML = '<span id=\"'. $this->name .'_count\" class=\"character_count_area\" style=\"display: none\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"max_characters\" style=\"display: none\">'.$maxLen.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"count_field\"></span> characters remaining\n\t\t\t\t\t\t\t\t\t\t\t</span>' . $this->afterFormElementHTML; \n\t\t}\n\t\t\n\t\t// Build CSS information\n\t\t$elementclass = \"class=\\\"$this->cssclass $sizeInfo\\\"\";\n\t\t$elementID = \"id=\\\"$this->name\\\"\";\n\t\t\n\t\t// The actual form element\n\t\tswitch ($this->type)\n\t\t{\n\t\t\tcase 'select':\n\t\t\t\t$elementString .= \"<select name=\\\"$this->name\\\" $elementclass $elementID>\";\n\t\t\t\tif (!empty($this->seleu_itemlist))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->seleu_itemlist AS $value => $label)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$htmlselected = \"\";\n\t\t\t\t\t\tif ($value == $this->value) {\n\t\t\t\t\t\t\t$htmlselected = ' selected=\"selected\"';\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$elementString .= \"\\n\\t\\t\\t\";\n\t\t\t\t\t\t$elementString .= '<option value=\"'.$value.'\"'.$htmlselected.'>'.$label.'&nbsp;&nbsp;</option>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$elementString .= \"\\n</select>\";\n\t\t\t\tbreak; \n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 'radio':\n\t\t\t\t$elementString .= \"\\n\";\n\t\t\t\tif (!empty($this->seleu_itemlist))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->seleu_itemlist AS $value => $label)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$htmlselected = \"\";\n\t\t\t\t\t\tif ($value == $this->value) {\n\t\t\t\t\t\t\t$htmlselected = ' checked=\"checked\"';\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$elementString .= \"\\n\\t\\t\\t\";\n\t\t\t\t\t\t$elementString .= '<input type=\"radio\" name=\"'.$this->name.'\" '.$elementclass.' value=\"'.$value.'\"'.$htmlselected.' style=\"width: auto;\">&nbsp;&nbsp;'.$label.'<br/>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$elementString .= \"\\n\";\n\t\t\t\tbreak; \n\t\t\t\n\t\t\tcase 'textarea':\t\t\t\t\n\t\t\t\t$elementString .= \"<textarea name=\\\"$this->name\\\" rows=\\\"$this->textarea_rows\\\" cols=\\\"$this->textarea_cols\\\" $elementID $elementclass>$this->value</textarea>\"; \n\t\t\t\tbreak; \n\n\t\t\tcase 'uploadfile':\n\t\t\t\tif ($this->showExistingFile) {\n\t\t\t\t\t$elementString.= '<div class=\"existing_file\">'. apply_filters('formbuilder_existing_file', $this->value) . '</div>';\n\t\t\t\t}\n\t\t\t\t$elementString .= \"<input type=\\\"file\\\" name=\\\"$this->name\\\" $elementclass $elementID/>\"; \n\t\t\t\tbreak; \t\t\t\t\n\t\t\t\t\n\t\t\tcase 'checkbox':\n\t\t\t\t$checked = \"\";\n\t\t\t\tif ($this->value == 1 || $this->value == \"on\")\n\t\t\t\t\t$checked = ' checked=checked';\n\t\t\t\t\n\t\t\t\t$elementString .= \"<input type=\\\"checkbox\\\" name=\\\"$this->name\\\" $checked $elementclass $elementID/> $this->checkbox_label\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'checkboxlist':\n\t\t\t\tif ($this->seleu_itemlist) \n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$totalCols = $this->checkboxListCols;\n\t\t\t\t\t\n\t\t\t\t\t// If we only have a few items, reduce the number of columns.\n\t\t\t\t\tif (count($this->seleu_itemlist) < (2*$this->checkboxListCols)) {\n\t\t\t\t\t\t$totalCols = floor($totalCols/2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$itemCount = 0; // Current item we're dealing with per col\n\t\t\t\t\t$itemsPerCol = ceil(count($this->seleu_itemlist) / $totalCols); // The number of items per column\t\t\t\t\t\n\t\t\t\t\t$closedOff = false; // Flag indicating if we've closed off the div section.\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Width style to indicate how wide to set the column.\n\t\t\t\t\t$colWidth = floor(100/$totalCols);\n\t\t\t\t\t\n\t\t\t\t\tforeach ($this->seleu_itemlist AS $value => $label)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Start column off\n\t\t\t\t\t\tif ($itemCount == 0) {\n\t\t\t\t\t\t\t$elementString .= sprintf('<div class=\"form-checklist-col\" style=\"float: left; width: %s%%;\">', $colWidth);\n\t\t\t\t\t\t\t$closedOff = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$htmlselected = \"\";\n\t\t\t\t\t\tif (is_array($this->value) && array_key_exists($value, $this->value)) {\n\t\t\t\t\t\t\t$htmlselected = ' checked=\"checked\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$elementString .= \"\\n\\t\\t\\t\";\n\t\t\t\t\t\t$elementString .= sprintf('<input type=\"checkbox\" name=\"%s_%s\" %s style=\"width: auto\"/>&nbsp;%s<br/>', \n\t\t\t\t\t\t\t\t\t\t\t$this->name, \n\t\t\t\t\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t\t\t\t\t$htmlselected, \n\t\t\t\t\t\t\t\t\t\t\t$label\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$itemCount++;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Finish column off\n\t\t\t\t\t\tif ($itemCount >= $itemsPerCol) {\n\t\t\t\t\t\t\t$itemCount = 0;\n\t\t\t\t\t\t\t$elementString .= '</div>';\n\t\t\t\t\t\t\t$closedOff = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} // end foreach\n\t\t\t\t\t\n\t\t\t\t\t// Add closing divs\n\t\t\t\t\tif (!$closedOff) {\n\t\t\t\t\t\t$elementString .= '</div>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$elementString .= \"\\n\";\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\tbreak; \n\t\t\t\t\t\t\t\n\t\t\t/* A static type is just the value field. */\n\t\t\tcase 'static':\n\t\t\t\t$elementString .= $this->value;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t/* Custom elements - just dump the provided HTML */\n\t\t\tcase 'custom':\n\t\t\t\t$elementString .= $this->customHTML;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t/* Merged elements - turn each sub element into HTML, and render. */\n\t\t\tcase 'merged':\n\t\t\t\t\t\n\t\t\t\t\t$elementString .= '<table><tr>';\n\t\t\t\t\t\n\t\t\t\t\t// Wrap inner elements in a table.\n\t\t\t\t\tif (!empty($this->subElementList))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($this->subElementList as $subelem)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$elementString .= '<td>';\n\t\t\t\t\t\t\t$elementString .= $subelem->toString(true, true);\n\t\t\t\t\t\t\t$elementString .= '</td>';\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$elementString .= '</tr></table>';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t/* The default is just a normal text box. */\n\t\t\tdefault:\n\t\t\t\t// Add a default style\n\t\t\t\tif (!$this->cssclass) {\n\t\t\t\t\t$elementclass = 'class=\"regular-text\"';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Got a max length?\n\t\t\t\t$elementSize = false;\n\t\t\t\tif ($this->text_maxlen > 0) {\n\t\t\t\t\t$elementSize = \" maxlength=\\\"$this->text_maxlen\\\"\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$elementString .= \"<input type=\\\"text\\\" name=\\\"$this->name\\\" value=\\\"$this->value\\\" $elementSize $elementID $elementclass/>\";\n\t\t\t\tbreak; \n\t\t}\n\t\t\n\t\t$elementString .= \"\\n\";\n\t\t\t\t\n\t\t// Add extra HTML after form element if specified\n\t\tif ($this->afterFormElementHTML) {\n\t\t\t$elementString .= $this->afterFormElementHTML . \"\\n\";\n\t\t}\n\t\t\n\t\t// Only add description if one exists.\n\t\tif ($this->description) {\n\t\t\t$elementString .= \"\\t\\t\".'<span class=\"setting-description\"><br>'.$this->description.'</span>'.\"\\n\";\n\t\t}\n\t\t\n\t\t// Close off row tags, except if a merged field\n\t\tif (!$showAsMergedField) \n\t\t{\n\t\t\t$elementString .= \"\\t</td>\\n\"; \t\t\t\t\n\t\t\t$elementString .= '</tr>'.\"\\n\";\n\t\t}\n\t\treturn $elementString;\n\t}", "function createFieldForm($arrLang)\n{\n\n $arrFields = array(\"conference_name\" => array(\"LABEL\" => $arrLang['Conference Name'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:300px;\"),\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_owner\" => array(\"LABEL\" => $arrLang['Conference Owner'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_number\" => array(\"LABEL\" => $arrLang['Conference Number'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_pin\" => array(\"LABEL\" => $arrLang['Moderator PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_1\" => array(\"LABEL\" => $arrLang['Moderator Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_pin\" => array(\"LABEL\" => $arrLang['User PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_1\" => array(\"LABEL\" => $arrLang['User Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_3\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"start_time\" => array(\"LABEL\" => $arrLang['Start Time (PST/PDT)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"DATE\",\n \"INPUT_EXTRA_PARAM\" => array(\"TIME\" => true, \"FORMAT\" => \"%Y-%m-%d %H:%M\",\"TIMEFORMAT\" => \"12\"),\n \"VALIDATION_TYPE\" => \"ereg\",\n \"VALIDATION_EXTRA_PARAM\" => \"^(([1-2][0,9][0-9][0-9])-((0[1-9])|(1[0-2]))-((0[1-9])|([1-2][0-9])|(3[0-1]))) (([0-1][0-9]|2[0-3]):[0-5][0-9])$\"),\n \"duration\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"duration_min\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n/*\n \"recurs\" => array(\"LABEL\" => $arrLang['Recurs'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"reoccurs_period\" => array(\"LABEL\" => $arrLang[\"Reoccurs\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_period,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n \"reoccurs_days\" => array(\"LABEL\" => $arrLang[\"for\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_days,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n*/\n \"max_participants\" => array(\"LABEL\" => $arrLang['Max Participants'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:50px;\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n );\n return $arrFields;\n}", "function smarty_compiler_display_form($tag_attrs, &$compiler)\n{\n\t$_params = $compiler->_parse_attrs($tag_attrs);\n\t\n\tif (!isset($_params['name'])) {\n\t\t$compiler->_syntax_error(\"display_form: missing 'name' parameter\", E_USER_WARNING);\n\t\treturn;\n\t}\n\n\t// whats this meant to be?\n\t$_params['name'] = str_replace('\\'', '', $_params['name']);\n\n\t$output = 'global $xnyo_parent, $forms; '.\"\\n\";\n\t$output .= 'if (!is_object($forms) && !$xnyo_parent->load_plugin(\\'forms\\')) {'.\"\\n\";\n\t$output .= \"\\t\".'$xnyo_parent->trigger_error(\\'Unable to load forms plugin, cant display form.\\', WARNING);'.\"\\n\";\n\t$output .= '} else {'.\"\\n\";\n\t$output .= \"\\t\".'$forms->display(\\''.$_params['name'].'\\', $this);'.\"\\n\";\n\t$output .= \"\\t\".'require_once($forms->get_compiled_filename());'.\"\\n\";\n\t$output .= '}'.\"\\n\";\n\treturn $output;\n}", "function ptf_code_integration_controls_fields( $fields ) {\n \n // Custom CSS\n $fields[] = array(\n 'type' => 'textarea',\n 'settings' => 'ptf_custom_css',\n 'label' => __( 'Custom CSS', 'artcore' ),\n 'description' => __( 'Enter your custom css code below.', 'artcore' ),\n 'help' => '',\n 'section' => 'ptf_custom_code_options',\n 'default' => '',\n 'priority' => 10,\n );\n \n return $fields;\n}", "function MYMODULE_my_custom_form(&$form_state) {\n // Add some normal FAPI item.\n $form['title'] = array (\n '#type' => 'textfield',\n '#title' => 'Title',\n '#required' => true,\n '#default_value' => NULL,\n '#maxlength' => 255,\n '#weight' => -5,\n );\n // Add special CCK form items.\n module_load_include('inc', 'content', 'includes/content.node_form');\n // Assume a hypothetical content type called \"article\"\n $type = content_types('article');\n // Go through each of its custom fields and add them to our form.\n foreach ($type['fields'] as $field_name => $field) {\n // If we wanted a specific field, we'd filter it here, by name:\n // if ($field_name == 'field_article_my_custom_field') { }\n // But for this example we're going to add them all.\n $form['#field_info'][$field['field_name']] = $field;\n $form += (array) content_field_form($form, $form_state, $field);\n }\n $form['submit'] = array (\n '#value' => 'Submit',\n '#type' => 'submit',\n );\n return $form;\n}", "public function addMetaFieldsToAddForm()\n\t{\n\t\t$interval = $this->getMetaFields('interval');\n\t\t$animation = $this->getMetaFields('animation');\n\n\t\t?>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"interval\">Tijd tussen slides</label>\n\t\t\t\t<input name=\"interval\" id=\"interval\" type=\"text\" value=\"<?php echo $interval;?>\" size=\"40\">\n\t\t\t\t<p class=\"description\">De tijd tussen slides in milliseconden (1000ms = 1s).</p>\n\t\t\t</div>\n\t\t\t<div class=\"form-field\">\n\t\t\t\t<label for=\"animation\">Animatie</label>\n\t\t\t\t<select name=\"animation\" id=\"animation\">\n\t\t\t\t\t<option <?php selected($animation, 'slide'); ?> value=\"slide\">Slide</option>\n\t\t\t\t\t<option <?php selected($animation, 'fade'); ?> value=\"fade\">Fade</option>\n\t\t\t\t</select>\n\t\t\t\t<p class=\"description\">Selecteer de animatie die gebruikt wordt door de slideshow.</p>\n\t\t\t</div>\n\t\t<?php\n\t}", "public function addShortcode()\n {\n WPShortcode::addShortCode('acoBolsista', $this->todo->getController('indicacao'), 'acoBolsistaShortcode');\n WPShortcode::addShortCode('acoVoluntario', $this->todo->getController('indicacao'), 'acoVoluntarioShortcode');\n WPShortcode::addShortCode('acoColaborador', $this->todo->getController('indicacao'), 'acoColaboradorShortcode');\n WPShortcode::addShortCode('pibexBolsista', $this->todo->getController('indicacao'), 'pibexBolsistaShortcode');\n WPShortcode::addShortCode('pibexVoluntario', $this->todo->getController('indicacao'), 'pibexVoluntarioShortcode');\n WPShortcode::addShortCode('pibexColaborador', $this->todo->getController('indicacao'), 'pibexColaboradorShortcode');\n }", "function create_user_registration_form($data) {\n foreach($data as $key => $val) {\n echo '<div class=\"form-group\">\n <label for=\"'.$val.'\" class=\"pl-1\">'.$key.':';\n if ($val != \"mobile\") echo '*'; echo '</label>\n <input type=\"'.USERS_FORM_TYPES[$key].'\" class=\"form-control\"\n name=\"'.$val.'\" placeholder=\"'.$key.'\" maxlength=\"40\"';\n if (isset($_POST[$val])) echo ' value=\"'.$_POST[$val].'\"';\n echo '></div>';\n }\n }", "function formBlocks($dataArray, $offset, $length) {\n\t$data = array_slice($dataArray, $offset, $length);\n\tforeach($data as $name => $value) {\n\t\techo <<<EOT\n\t\t<fieldset>\n\t\t\t<label for=\"$name\">$value[0]: </label><br />\n\t\t\t<input autocomplete=\"$value[4]\" id=\"$name\" type=\"$value[1]\" name=\"$name\" value=\"$value[3]\" placeholder=\"$value[2]\" required />\n\t\t</fieldset>\\n\nEOT;\n\t}\n}", "function fusion_element_gravityform() {\nif( class_exists ('GFAPI')) {\n // get list of forms for select form field\n $forms = GFAPI::get_forms();\n $formList = array();\n foreach ($forms as $form ) {\n $formList[ $form['id'] ] = $form['title'];\n };\n\n\n fusion_builder_map( array(\n 'name' => esc_attr__( 'Gravity Form', 'fusion-builder' ),\n 'shortcode' => 'gravityform',\n 'params' => array(\n array(\n 'type' => 'select',\n 'heading' => esc_attr__( 'Select Form', 'fusion-builder' ),\n 'description' => esc_attr__( 'Select the form to use', 'fusion-builder' ),\n 'param_name' => 'id',\n 'value' => $formList ),\n array(\n 'type' => 'radio_button_set',\n 'heading' => esc_attr__( 'Ajax', 'fusion-builder' ),\n 'description' => esc_attr__( 'Enable Ajax for form submissions', 'fusion-builder' ),\n 'param_name' => 'ajax',\n 'value' => array(\n 'true' => esc_attr__( 'Yes', 'fusion-builder' ),\n 'false' => esc_attr__( 'No', 'fusion-builder' ),\n ),\n ),\n array(\n 'type' => 'radio_button_set',\n 'heading' => esc_attr__( 'Title', 'fusion-builder' ),\n 'description' => esc_attr__( 'Show Form Title', 'fusion-builder' ),\n 'param_name' => 'title',\n 'value' => array(\n 'true' => esc_attr__( 'Yes', 'fusion-builder' ),\n 'false' => esc_attr__( 'No', 'fusion-builder' ),\n ),\n ),\n array(\n 'type' => 'radio_button_set',\n 'heading' => esc_attr__( 'Description', 'fusion-builder' ),\n 'description' => esc_attr__( 'Show Form Description', 'fusion-builder' ),\n 'param_name' => 'description',\n 'value' => array(\n 'true' => esc_attr__( 'Yes', 'fusion-builder' ),\n 'false' => esc_attr__( 'No', 'fusion-builder' ),\n ),\n ),\n ),\n ) );\n }\n}", "public function auto_build_form($form_content, $data){\r\n\t\treturn \"<form method='post' enctype='multipart/form-data' action='#' \" . (isset($data['onsubmit']) ? \" onsubmit='\" . $data['onsubmit'] . \"' \" : \"onsubmit=\\\"return validateFields()\\\"\") .\r\n\t\t\t\" >\" .\r\n\t\t\t$form_content .\r\n\t\t\t\"</form>\";\r\n\t}", "public function index()\n {\n $shortcode_info = Shortcodable::shortcode_class_info();\n $shortcode = $this->request->postVar('ShortcodeType');\n $classname = isset($shortcode_info['sc_class_map'][$shortcode]) ? $shortcode_info['sc_class_map'][$shortcode] : '';\n $shortcodeLabel = isset($shortcode_info['sc_label_map'][$shortcode]) ? $shortcode_info['sc_label_map'][$shortcode] : $shortcode;\n\n // essential fields\n $fields = FieldList::create([\n DropdownField::create('ShortcodeType', '', $shortcode_info['sc_label_map'])\n ->setEmptyString(_t('Shortcodable.SHORTCODETYPE', 'Shortcode type'))\n ->addExtraClass('shortcode-type _form-group')\n ]);\n\n if ($classname && class_exists($classname)) {\n $classObj = singleton($classname);\n $fields->insertAfter('ShortcodeType', HeaderField::create('ShortCodeHeading', $shortcodeLabel));\n\n if (is_subclass_of($classObj, DataObject::class)) {\n if (singleton($classname)->hasMethod('getShortcodableRecords')) {\n $dataObjectSource = singleton($classname)->getShortcodableRecords();\n } elseif (singleton($classname)->hasMethod('get_shortcodable_records')) {\n $dataObjectSource = singleton($classname)->get_shortcodable_records();\n } else {\n $dataObjectSource = $classname::get()->map()->toArray();\n }\n $fields->push(\n DropdownField::create('id', $classObj->singular_name(), $dataObjectSource)\n ->setHasEmptyDefault(true)\n );\n }\n\n $attrFields = null; // shortcode may not need any attributes at all\n if ($classObj->hasMethod('getShortcodeFields')) {\n $attrFields = $classObj->getShortcodeFields();\n }\n // Legacy fallback (from when shortcodable was a Trait) probably safe to remove at some point...\n elseif ($classObj->hasMethod('shortcode_attribute_fields')){\n $attrFields = $classObj::shortcode_attribute_fields();\n }\n if ($attrFields) {\n foreach($attrFields as $attrField){\n $fields->push($attrField);\n }\n }\n }\n\n // actions\n $actions = FieldList::create();\n if($type = $this->request->postVar('ShortcodeType')) {\n $actions->push(\n FormAction::create('insert', _t('Shortcodable.BUTTONINSERTSHORTCODE', 'Insert shortcode'))\n // ->addExtraClass('btn btn-primary font-icon-tick')\n ->addExtraClass('btn btn-primary font-icon-plus-circled')\n ->setUseButtonTag(true)\n );\n }\n\n // form\n $form = Form::create($this, 'ShortcodeForm', $fields, $actions)\n ->loadDataFrom($this->request->postVars())\n ->addExtraClass('htmleditorfield-form htmleditorfield-shortcodable _cms-edit-form');\n\n $this->extend('updateShortcodeForm', $form);\n\n// if ($data = $this->getShortcodeData()) {\n// $form->loadDataFrom($data['atts']);\n//\n// // special treatment for setting value of UploadFields\n// foreach ($form->Fields()->dataFields() as $field) {\n// if (is_a($field, 'UploadField') && isset($data['atts'][$field->getName()])) {\n// $field->setValue(['Files' => explode(',', $data['atts'][$field->getName()])]);\n// }\n// }\n// }\n\n return $form->forTemplate();\n }", "public function generateForm() : string\n {\n $fields = $this->fields;\n $availableFormFields = [];\n\n $this->form = '';\n foreach ($fields as $field => $config) {\n $fieldClass = config('platform.fields.' . $config['tag']);\n\n if (is_null($fieldClass)) {\n throw new TypeException('Field ' . $config['tag'] . ' does not exist');\n }\n\n\n $config['lang'] = $this->language;\n $config['prefix'] = $this->buildPrefix($config);\n $config = $this->fill($config);\n\n\n $firstTimeRender = false;\n if (!in_array($fieldClass, $availableFormFields)) {\n array_push($availableFormFields, $fieldClass);\n $firstTimeRender = true;\n }\n\n $field = (new $fieldClass())->create($config, $firstTimeRender);\n $this->form .= $field->render();\n }\n\n return $this->form;\n }", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "function form_text_one_col ($size, $display, $key='', $maxsize=0, $required=FALSE)\n{\n // If not specified, fill in default values\n\n if ('' == $key)\n $key = $display;\n\n if (0 == $maxsize)\n $maxsize = $size;\n\n if (\"\" != $display)\n $display .= \":\";\n\n // If this is a required field, make sure it has a leading '*'\n\n if ($required)\n $display = '<FONT COLOR=RED>*</FONT>&nbsp;' . $display;\n\n // If magic quotes are on, strip off the slashes\n\n if (! array_key_exists ($key, $_POST))\n $text = '';\n else\n {\n if (1 == get_magic_quotes_gpc())\n $text = stripslashes ($_POST[$key]);\n else\n $text = $_POST[$key];\n }\n\n // Spit out the HTML\n\n echo \" <TR>\\n\";\n echo \" <TD COLSPAN=2>\\n\";\n echo \" &nbsp;<BR>$display<BR>\\n\";\n printf (\" <INPUT TYPE=TEXT NAME=%s SIZE=%d MAXLENGTH=%d VALUE=\\\"%s\\\">\\n\",\n\t $key,\n\t $size,\n\t $maxsize,\n\t $text);\n echo \" </TD>\\n\";\n echo \" </tr>\\n\";\n}", "function form( $instance ) {\n\t\t$defaults = array( 'title' => '', 'quote' => 'Lorum ipsum dolor sit amet, consectetur adipscing elit. nullam dapi-bus venenatis lacus, eget viverra mauris.', 'name' => 'John Smith', 'company' => 'RD Managing Director' );\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\t\t\n\t\t<!--<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\n\t\t</p>-->\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'quote' ); ?>\">Testimonial:</label>\n\t\t\t<textarea id=\"<?php echo $this->get_field_id( 'quote' ); ?>\" name=\"<?php echo $this->get_field_name( 'quote' ); ?>\" style=\"width:100%;\"><?php echo $instance['quote']; ?></textarea>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'name' ); ?>\">Name:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'name' ); ?>\" name=\"<?php echo $this->get_field_name( 'name' ); ?>\" value=\"<?php echo $instance['name']; ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'company' ); ?>\">Company:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'company' ); ?>\" name=\"<?php echo $this->get_field_name( 'company' ); ?>\" value=\"<?php echo $instance['company']; ?>\" style=\"width:100%;\" />\n\t\t</p>\n\n<?php\n\t}", "function getFormField($arr)\n{\n\t$name = '';\n\t$parms = '';\n\t$val = '';\n\t$type = '';\n\n\textract($arr);\n\n\tif(!$parms)\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'textarea':\n\t\t\t\t$parms = 'rows=\"15\" cols=\"35\" wrap=\"virtual\"';\n\t\t\t\tbreak;\n\t\t\tcase 'file':\n\t\t\tcase 'text':\n\t\t\tcase 'password':\n\t\t\t\t$parms = 'size=\"35\"';\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tswitch($type)\n\t{\n\t\tcase 'textarea':\n\t\t\t$str = '<textarea name=\"' . $name . '\" ' . $parms . '>' . $val . '</textarea>';\n\t\t\tbreak;\n\t\tcase 'select':\n\t\t\t$str = '<select name=\"' . $name . '\" ' . $parms . '>' . $val . '</select>';\n\t\t\tbreak;\n\t\tcase 'disptext':\n\t\t\t$str = $val;\n\t\t\tbreak;\n\t\tcase 'checkbox':\n\t\t\t$str = '<input type=\"checkbox\" name=\"' .$name . '\" ' . $val . ' />';\n\t\t\tbreak;\n\t\tcase 'null':\n\t\t\t$str = '';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = '<input type=\"' . $type . '\" name=\"' . $name . '\" ' . $parms . ' value=\"' . $val . '\" />';\n\t\t\tbreak;\n\t}\n\treturn $str;\n}", "public function get_shortcode() {\n\t\t$args = array();\n\t\tforeach ($this->args as $k => $v) {\n\t\t\t// Only include info if it's not the default... save space and easier to read shortcodes\n\t\t\tif (isset($this->defaults[$k]) && $this->defaults[$k] != $v) { // && (!empty($this->defaults[$k]) && !empty($v))) {\n\t\t\t\tif ( !empty($v) ) {\n\t\t\t\t\tif ( is_array($v) ) {\n\t\t\t\t\t\t$args[] = $k.'=\"'.implode(',', $v).'\"';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Direct filtering on a field\n\t\t\telseif (!isset($this->defaults[$k])) {\n\t\t\t\t$args[] = $k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args = implode(' ', $args);\n\t\tif (!empty($args)) {\n\t\t\t$args = ' '.$args;\n\t\t}\n\t\treturn '[summarize-posts'.$args.']';\n\t}", "function display_short_answer_form($question_num){\r\n include(\"variables.inc\");\r\n\tif($question_num == 0) $question_num = 1;\r\n echo(\"\\t<TABLE WIDTH=\\\"$table_width\\\">\\n\");\r\n echo(\"\\t\\t<TR>\\n\");\r\n echo(\"\\t\\t\\t<TD WIDTH=\\\"50\\\"><P>\" . $question_num . \")</P></TD>\\n\");\r\n echo(\"\\t\\t\\t<TD WIDTH=\\\"580\\\"> \\n\\t\\t\\t\\t\\n\");\r\n echo(\"\\t\\t\\t\\t<INPUT TYPE=\\\"text\\\" NAME=\\\"question_A\\\" SIZE=\\\"85\\\">\\n\");\r\n echo(\"\\t\\t\\t</TD>\\n\");\r\n echo(\"\\t\\t</TR>\\n\");\r\n echo(\"\\t\\t\\t<TD WIDTH=\\\"50\\\">Solution:</TD>\\n\");\r\n echo(\"\\t\\t\\t<TD WIDTH=\\\"580\\\"> \\n\\t\\t\\t\\t\\n\");\r\n echo(\"\\t\\t\\t\\t<TEXTAREA NAME=\\\"answer_A\\\" cols=\\\"65\\\" rows=\\\"10\\\"></textarea>\\n\");\r\n echo(\"\\t\\t\\t</TD>\\n\");\r\n echo(\"\\t\\t</TR>\\n\");\r\n echo(\"\\t\\t<TD COLSPAN=\\\"2\\\"></TD>\\n\");\r\n echo(\"\\t\\t</TR>\\n\");\r\n echo(\"\\t</TABLE>\\n\"); \r\n}", "public function _settings_field_contact_form_summary() {\n global $zendesk_support;\n $value = $zendesk_support->_is_default( 'contact_form_summary' ) ? '' : $zendesk_support->settings['contact_form_summary'];\n ?>\n <input type=\"text\" class=\"regular-text\" name=\"zendesk-settings[contact_form_summary]\" value=\"<?php echo $value; ?>\"\n placeholder=\"<?php echo $zendesk_support->default_settings['contact_form_summary']; ?>\"/>\n <?php\n }", "private function process_raw_shortcode()\n\t{\n\t // GENERAL DETAILS\n\t $this->length \t= strlen($this->raw);\n\t $this->end\t= $this->start + $this->length;\n\n\t // KEY & VALUE\n\t $key_val_pair \t= explode('::', $this->raw);\n\n\t // check to see if both key and value have been given\n\t if (sizeof($key_val_pair) > 1)\n\t {\n\t\t $this->key = $key_val_pair[0];\n\t\t $this->value = $key_val_pair[1];\t\n\t }else{\n\t\t $http = strpos($this->raw, 'http');\n\n\t\t if($http === false){\n\t\t\t $this->key = 'internal';\n\t\t }else{\n\t\t\t $this->key = 'external';\n\t\t }\n\t\t $this->value = $this->raw;\n\t }\n\t}", "public function setAsStaticForm() {\n\t\treturn $this->form_tag(implode('<br />', $this->_elements));\n\t}" ]
[ "0.64892805", "0.6223353", "0.6174602", "0.6160791", "0.6129121", "0.59559196", "0.5926511", "0.5884824", "0.5873213", "0.5849319", "0.58040047", "0.574726", "0.5735506", "0.57145536", "0.5705095", "0.5690671", "0.56738734", "0.56662333", "0.56560475", "0.5653904", "0.5645139", "0.5644849", "0.56391424", "0.5638557", "0.56382567", "0.5601514", "0.55866045", "0.55727655", "0.5568778", "0.5557376", "0.555465", "0.55455244", "0.55417305", "0.5537823", "0.5525155", "0.5519896", "0.5515388", "0.55147475", "0.5513493", "0.55125517", "0.55062944", "0.55052954", "0.549944", "0.54981136", "0.549172", "0.5477929", "0.54677606", "0.54638606", "0.54608846", "0.54500735", "0.5447977", "0.5425216", "0.54074943", "0.54010653", "0.5396114", "0.5395077", "0.5386428", "0.53855157", "0.5363927", "0.53606576", "0.5359576", "0.5344382", "0.5340377", "0.53262573", "0.5322356", "0.53170913", "0.53126055", "0.5312394", "0.5300558", "0.52983344", "0.5293832", "0.52792835", "0.52767116", "0.52766067", "0.527654", "0.5275609", "0.5272481", "0.5272066", "0.5262027", "0.5260956", "0.5257615", "0.5256972", "0.5254458", "0.5245047", "0.5240446", "0.5238465", "0.5237721", "0.52368677", "0.5235615", "0.5234322", "0.5233257", "0.52326816", "0.52304256", "0.52217114", "0.5220974", "0.52202195", "0.5216226", "0.521341", "0.5210967", "0.52101356" ]
0.7102121
0
Parse scv values and add them to view context
private function parseCsv(&$context, $list, $key, $delimiter = "|", $newLine = ",") { try { if (!is_array($list) && strlen($list) > 0) { $list = str_replace($newLine, "\r\n", $list); $csv = Reader::createFromString($list); $csv->setDelimiter($delimiter); $csv->setNewline("\n\r"); $context[$key] = $csv->fetchAll(); } } catch (\Exception $ex) { $context[$key] = [$ex->getMessage(), false]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getViewVars();", "public function getViewVars();", "public function onTwigSiteVariables()\n {\n }", "function setContext( )\n\t{\n\t\t$args = new safe_args();\n\t\t$args->set('name', \tREQUIRED, 'string');\n\t\t$args->set('value', REQUIRED, 'any');\t\t\n\t\t$args = $args->get(func_get_args());\n\t\t\t\n\t\t$this->context[$args['name']] = $args['value'];\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }", "function showValue( $appctx )\n\t\t{\n\t\t}", "public function onTwigSiteVariables() {\n if ($this->grav['page']->template() == 'proposal') {\n $this->grav['twig']->twig_vars['proposal'] = $this->fetchProposal();\n $this->grav['twig']->twig_vars['currency_symbol'] = $this->getSymbolOfCurrencyCode($this->config->get('plugins.proposal.stripe_currency'));\n }\n }", "public function prepareVars()\n {\n $this->vars['searchBox'] = $this;\n $this->vars['cssClasses'] = implode(' ', $this->cssClasses);\n $this->vars['placeholder'] = lang($this->prompt);\n $this->vars['value'] = $this->getActiveTerm();\n }", "public function process()\n\t{\n\t\ttry {\n\t\t\t# Bind variables to local scope:\n\t\t\tforeach ($this->variables as $k => $v)\n\t\t\t\t${$k} = $v;\n\n\t\t\t# Start output buffering:\n\t\t\tob_start();\n\n\t\t\t# Do replacements:\n\t\t\t$this->replaced_contents = $this->contents;\n\t\t\tforeach (self::$replacements as $this->from => $this->to)\n\t\t\t\t$this->replaced_contents = preg_replace ($this->from, $this->to, $this->replaced_contents);\n\n\t\t\t$this->evaled_result = eval ('?>'.$this->replaced_contents.'<?php ');\n\n\t\t\tif ($this->evaled_result === false)\n\t\t\t\tthrow new ViewParserException ('Error on parsing view code');\n\t\t\telse\n\t\t\t\techo $this->evaled_result;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t# Ensure that capture has ended and rethrow:\n\t\t\tob_end_clean();\n\t\t\tthrow $e;\n\t\t}\n\n\t\t# End output buffering:\n\t\treturn $this->result = ob_get_clean();\n\t}", "public function renderContext() {\n\t}", "protected function parseVariable(): void\n {\n $sBaseUrl = $this->sBaseUrl;\n\n /**\n * $getCurrentTplName is used in \"variables.inc.php\" file\n */\n $getCurrentTplName = static function () use ($sBaseUrl) {\n $aDirs = explode('/', $sBaseUrl);\n return !empty($aDirs[2]) ? $aDirs[2] : PH7_DEFAULT_THEME;\n };\n\n $this->setVariables(include('variables.inc.php'));\n }", "public function parse(&$segments)\n\t{\n\t\t$item = $this->menu->getActive();\n\t\t$vars = array();\n\t\t$db = JFactory::getDbo();\n\n\t\t// Count route segments\n\t\t$count = count($segments);\n\n\t\t/*\n\t\t * count = 1 : event / category or non-querystring needing views\n\t\t */\n\t\tif ($count == 1)\n\t\t{\n\t\t\t$category_table = JTable::getInstance('Category', 'JTable', array('dbo', $db));\n\t\t\t$category_table->load(array('alias' => $segments[0], 'extension' => 'com_jticketing'));\n\n\t\t\tif ($category_table->id)\n\t\t\t{\n\t\t\t\t$vars['view'] = 'events';\n\t\t\t\t$vars['filter_cat'] = $category_table->id;\n\t\t\t}\n\t\t\telseif ($eventtable_id = $this->_getEventRow($segments[0])->id)\n\t\t\t{\n\t\t\t\t$vars['view'] = 'event';\n\t\t\t\t$vars['id'] = $event_table_id;\n\t\t\t}\n\t\t\telseif (in_array($segments[0], $this->views))\n\t\t\t{\n\t\t\t\t$vars['view'] = $segments[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * If we dont get a valid category or event alias, or a\n\t\t\t\t * valid view set set the variables to a non-existing\n\t\t\t\t * event id and ensure that the view throws a 404 for a \n\t\t\t\t * non exiting event\n\t\t\t\t */\n\t\t\t\t$vars['view'] = 'event';\n\t\t\t\t$vars['id'] = 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vars['view'] = $segments[0];\n\n\t\t\tswitch ($segments[0])\n\t\t\t{\n\t\t\t\tcase 'orders':\n\t\t\t\tif (isset($segments[1]))\n\t\t\t\t{\n\t\t\t\t\t$vars['orderid'] = $segments[1];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tif (in_array($segments[0], $this->views_needing_id))\n\t\t\t\t{\n\t\t\t\t\t$event_table = $this->_getEventRow($segments[1]);\n\n\t\t\t\t\t$vars['id'] = $event_table->id;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (in_array($segments[0], $this->views_needing_tmpl))\n\t\t\t{\n\t\t\t\t$vars['tmpl'] = 'component';\n\t\t\t}\n\t\t}\n\n\t\treturn $vars;\n\t}", "public function getContextValue();", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }", "private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }", "public function parse(&$segments)\n\t{\n\t\t$vars = array();\n\n\t\t// Get the view from the active menu\n\t\t$app = Factory::getApplication();\n\t\t$activeMenu = $app->getMenu()->getActive();\n\n\t\t// The Edit profile page may not have an Itemid, so we take the first segment element\n\t\tif ($activeMenu)\n\t\t{\n\t\t\t$view = $activeMenu->query['view'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$view = $segments[0];\n\t\t}\n\n\t\t$db = Factory::getDbo();\n\n\t\tswitch ($view)\n\t\t{\n\t\t\tcase 'days':\n\t\t\t\tbreak;\n\t\t\tcase 'levels':\n\t\t\t\t$vars['view'] = 'level';\n\t\t\t\tbreak;\n\t\t\tcase 'profile':\n\t\t\t\tswitch ($segments[0])\n\t\t\t\t{\n\t\t\t\t\tcase 'speaker':\n\t\t\t\t\t\t$vars['task'] = 'speaker.edit';\n\t\t\t\t\t\t$vars['layout'] = 'edit';\n\n\t\t\t\t\t\tif (array_key_exists(2, $segments))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$vars['conference_speaker_id'] = $segments[2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'session':\n\t\t\t\t\t\t$vars['task'] = 'session.' . $segments[1];\n\t\t\t\t\t\t$vars['layout'] = 'edit';\n\n\t\t\t\t\t\tif (array_key_exists(2, $segments))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$vars['conference_session_id'] = $segments[2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'speaker':\n\t\t\t\t// This handles the view=speaker&layout=edit URL\n\t\t\t\t$vars['view'] = 'speaker';\n\t\t\t\t$vars['layout'] = 'edit';\n\n\t\t\t\tif (array_key_exists(2, $segments))\n\t\t\t\t{\n\t\t\t\t\t$vars['conference_speaker_id'] = $segments[2];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'session':\n\t\t\t\t// This handles the view=session&layout=edit URL\n\t\t\t\t$vars['view'] = 'session';\n\n\t\t\t\tif (count($segments) === 1)\n\t\t\t\t{\n\t\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t\t->select($db->quoteName('conference_session_id'))\n\t\t\t\t\t\t->from($db->quoteName('#__conference_sessions'))\n\t\t\t\t\t\t->where($db->quoteName('slug') . ' = ' . $db->quote($segments[0]));\n\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t$vars['conference_session_id'] = $db->loadResult();\n\t\t\t\t}\n\n\t\t\t\tif (array_key_exists(2, $segments))\n\t\t\t\t{\n\t\t\t\t\t$vars['layout'] = 'edit';\n\t\t\t\t\t$vars['conference_session_id'] = $segments[2];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'sessions':\n\t\t\t\t$vars['view'] = 'session';\n\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select($db->quoteName('conference_session_id'))\n\t\t\t\t\t->from($db->quoteName('#__conference_sessions'))\n\t\t\t\t\t->where($db->quoteName('slug') . ' = ' . $db->quote($segments[0]));\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$vars['conference_session_id'] = $db->loadResult();\n\t\t\t\tbreak;\n\t\t\tcase 'speakers':\n\t\t\t\t$vars['view'] = 'speaker';\n\t\t\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select($db->quoteName('conference_speaker_id'))\n\t\t\t\t\t->from($db->quoteName('#__conference_speakers'))\n\t\t\t\t\t->where($db->quoteName('slug') . ' = ' . $db->quote($segments[0]));\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$vars['conference_speaker_id'] = $db->loadResult();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $vars;\n\t}", "public function prepareVars()\n {\n $this->vars['statuses'] = IssueStatus::active()->get()->lists('name', 'id');\n $this->vars['model'] = $this->model;\n }", "public function pushContext() {\n\t\t// Count the number of contexts created\n\t\t$index = count($this->context);\n\n\t\t// If no context\n\t\tif ($index == 0 && !empty($this->tpl_vars)) {\n\t\t\t// Copy the variables in context #0\n\t\t\t$this->context[0] = $this->tpl_vars;\n\t\t\t$index = 1;\n\t\t}\n\n\t\t// Create a new context\n\t\t$this->context[$index] = array();\n\n\t\t// Copy global vars\n\t\tforeach ($this->tpl_vars_global_keys as $key) {\n\t\t\t$this->context[$index][$key] = $this->tpl_vars[$key];\n\t\t}\n\n\t\t$this->tpl_vars = &$this->context[$index];\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "protected function parseItemValue(XTemplate $xtpl, $value){\n\t\t$xtpl->assign ( 'value', $value );\t\t\t\t\n\t\t$xtpl->parse('main.row.column' );\n\t}", "public function site_vars(){\n $loc = DB::table('site_vars')->where('site_code', Auth::user()->site_code)->get();\n \n return view('admin.laxyo.sitevarcontent', compact('loc'));\n }", "function beforeRender() {\n parent::beforeRender();\n \n if(!$this->request->is('restful')) {\n $msid = null;\n \n if(!empty($this->params->named['matchserver'])) {\n $msid = $this->params->named['matchserver'];\n } elseif(!empty($this->request->data['MatchServerAttribute']['match_server_id'])) {\n $msid = $this->request->data['MatchServerAttribute']['match_server_id'];\n }\n \n $this->set('vv_msid', $msid);\n \n // To get the Match Server description, we have to walk all the way back\n // to the Server\n \n if($msid) {\n $serverId = $this->MatchServerAttribute->MatchServer->field('server_id', array('MatchServer.id' => $msid));\n \n if($serverId) {\n $this->set('vv_server_desc', $this->MatchServerAttribute->MatchServer->Server->field('description', array('Server.id' => $serverId)));\n }\n }\n \n // Pull the set of attributes available for the match service and\n // structure them suitably for the view\n \n $supportedAttrs = $this->MatchServerAttribute->supportedAttributes();\n \n $attrs = array();\n $attrTypes = array();\n \n foreach($supportedAttrs as $a => $acfg) {\n $attrs[$a] = $acfg['label'];\n \n if($acfg['type']) {\n $attrTypes[$a] = $this->CoExtendedType->active($this->cur_co['Co']['id'], $acfg['type']);\n }\n }\n \n $this->set('vv_available_attributes', $attrs);\n $this->set('vv_available_attribute_types', $attrTypes);\n }\n }", "function prepareTemplateVars() {\n\t\t$calcModel = KenedoModel::getModel('ConfigboxModelAdmincalculations');\n\t\t$this->calculations = $calcModel->getRecords(array('admincalculations.product_id'=>$this->productId));\n\n\t\t$this->addViewCssClasses();\n\n\t}", "private function _add_vars()\n\t{\n\t\t// --------------------------------------\n\t\t// Only continue if request is a page\n\t\t// and we have segments to check\n\t\t// --------------------------------------\n\n\t\tif (empty(ee()->uri->segments) && $this->settings['set_all_segments'] == 'n') return;\n\n\t\t// --------------------------------------\n\t\t// Initiate uri instance\n\t\t// --------------------------------------\n\n\t\t$this->uri = new EE_URI;\n\t\t$this->uri->_fetch_uri_string();\n\n\t\tif ($this->settings['ignore_pagination'] == 'y')\n\t\t{\n\t\t\t// Get rid of possible pagination segment at the end\n\t\t\t$this->uri->uri_string = preg_replace('#/[PC]\\d+$#', '', $this->uri->uri_string);\n\t\t}\n\n\t\t$this->uri->_explode_segments();\n\t\t$this->uri->_reindex_segments();\n\n\t\t// --------------------------------------\n\t\t// Suggestion by Leevi Graham:\n\t\t// check for pattern before continuing\n\t\t// --------------------------------------\n\n\t\tif ( ! empty($this->settings['uri_pattern']) && ! preg_match($this->settings['uri_pattern'], $this->uri->uri_string)) return;\n\n\t\t// --------------------------------------\n\t\t// Initiate some vars\n\t\t// $data is used to add to global vars\n\t\t// $cats is used to keep track of all category ids found\n\t\t// --------------------------------------\n\n\t\t$data = $cats = array();\n\n\t\t// Also initiate this single var to an empty string\n\t\t$data['segment_category_ids'] = '';\n\t\t$data['segment_category_ids_piped'] = '';\n\n\t\t// --------------------------------------\n\t\t// Number of segments to register - 9 is hardcoded maximum\n\t\t// --------------------------------------\n\n\t\t$num_segs = ($this->settings['set_all_segments'] == 'y') ? 9 : $this->uri->total_segments();\n\n\t\t// --------------------------------------\n\t\t// loop through segments and set data array thus: segment_1_category_id etc\n\t\t// --------------------------------------\n\n\t\tfor ($nr = 1; $nr <= $num_segs; $nr++)\n\t\t{\n\t\t\tforeach ($this->fields AS $field)\n\t\t\t{\n\t\t\t\t$data[\"segment_{$nr}_{$field}\"] = '';\n\t\t\t}\n\t\t}\n\n\t\t// Initiate last segment vars\n\t\tforeach ($this->fields AS $field)\n\t\t{\n\t\t\t$data[\"last_segment_{$field}\"] = '';\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Force lowercase segment array\n\t\t// --------------------------------------\n\n\t\t$segment_array = array_map('strtolower', $this->uri->segment_array());\n\n\t\t// --------------------------------------\n\t\t// Execute the rest only if there are segments to check\n\t\t// --------------------------------------\n\n\t\tif ($segment_array)\n\t\t{\n\t\t\t// --------------------------------------\n\t\t\t// Query database for these segments\n\t\t\t// Use lowercase for case insensitive comparison,\n\t\t\t// for when DB collation is case sensitive\n\t\t\t// --------------------------------------\n\n\t\t\tee()->db->select('cat_url_title, '. implode(', ', array_keys($this->fields)))\n\t\t\t ->from('categories')\n\t\t\t ->where('site_id', $this->site_id)\n\t\t\t ->where_in('cat_url_title', $segment_array);\n\n\t\t\t// --------------------------------------\n\t\t\t// Filter by category groups set in settings\n\t\t\t// --------------------------------------\n\n\t\t\tif (isset($this->settings['category_groups']))\n\t\t\t{\n\t\t\t\tif ($groups = array_filter($this->settings['category_groups']))\n\t\t\t\t{\n\t\t\t\t\tee()->db->where_in('group_id', $groups);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --------------------------------------\n\t\t\t// Execute query and get results\n\t\t\t// --------------------------------------\n\n\t\t\t$query = ee()->db->get();\n\n\t\t\t// --------------------------------------\n\t\t\t// If we have matching categories, continue...\n\t\t\t// --------------------------------------\n\n\t\t\tif ($query->num_rows())\n\t\t\t{\n\t\t\t\t// --------------------------------------\n\t\t\t\t// Associate the results\n\t\t\t\t// --------------------------------------\n\n\t\t\t\t$rows = $this->_associate_results($query->result_array(), 'cat_url_title');\n\n\t\t\t\t// --------------------------------------\n\t\t\t\t// Load typography if private var is set\n\t\t\t\t// --------------------------------------\n\n\t\t\t\tif ($this->format || $this->settings['parse_file_paths'] == 'y')\n\t\t\t\t{\n\t\t\t\t\tee()->load->library('typography');\n\t\t\t\t}\n\n\t\t\t\t// --------------------------------------\n\t\t\t\t// loop through segments\n\t\t\t\t// --------------------------------------\n\n\t\t\t\tforeach ($segment_array as $n => $seg)\n\t\t\t\t{\n\t\t\t\t\t// Skip non-matching segments\n\t\t\t\t\tif ( ! isset($rows[$seg])) continue;\n\n\t\t\t\t\t// Get the category row\n\t\t\t\t\t$row = $rows[$seg];\n\n\t\t\t\t\t// Overwrite values in data array\n\t\t\t\t\tforeach ($this->fields AS $name => $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Format category name if private var is set\n\t\t\t\t\t\tif ($name == 'cat_name' && $this->format)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$row[$name] = ee()->typography->format_characters($row[$name]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Parse file paths\n\t\t\t\t\t\tif ($name == 'cat_image' && $this->settings['parse_file_paths'] == 'y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$row[$name] = ee()->typography->parse_file_paths($row[$name]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Set value in for segment_x_yyy\n\t\t\t\t\t\t$data[\"segment_{$n}_{$field}\"] = $row[$name];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add found id to cats array\n\t\t\t\t\t$cats[] = $row['cat_id'];\n\t\t\t\t}\n\n\t\t\t\t// --------------------------------------\n\t\t\t\t// Set last_segment_category_x vars\n\t\t\t\t// --------------------------------------\n\n\t\t\t\t$last = $this->uri->total_segments();\n\n\t\t\t\tforeach ($this->fields AS $name => $field)\n\t\t\t\t{\n\t\t\t\t\t$data['last_segment_'.$field] = $data['segment_'.$last.'_'.$field];\n\t\t\t\t}\n\n\t\t\t\t// --------------------------------------\n\t\t\t\t// Create inclusive stack of all category ids present in segments\n\t\t\t\t// --------------------------------------\n\n\t\t\t\t$data['segment_category_ids'] = implode('&',$cats);\n\t\t\t\t$data['segment_category_ids_piped'] = implode('|',$cats);\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Finally, add data to global vars\n\t\t// Swapping $data and existing global vars makes a difference in EE2.4+\n\t\t// --------------------------------------\n\n\t\tee()->config->_global_vars = array_merge(ee()->config->_global_vars, $data);\n\t\t//ee()->config->_global_vars = array_merge($data, ee()->config->_global_vars);\n\t}", "private function process(ViewSource $source, ContextInterface $context): ViewSource\n {\n foreach ($this->processors as $processor) {\n $source = $processor->process($source, $context);\n }\n\n return $source;\n }", "private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }", "function prepare_vars_for_template_usage()\n {\n }", "public function prepareVars()\n {\n $this->vars['value'] = $this->getKeyValue();\n $this->vars['field'] = $this->formField;\n $this->vars['nameValue'] = $this->getNameValue();\n $this->vars['descriptionValue'] = $this->getDescriptionValue();\n $this->vars['addresses'] = $this->getAddresses();\n $this->vars['listWidget'] = $this->listWidget;\n $this->vars['searchWidget'] = $this->searchWidget;\n\n $this->vars['title'] = $this->title;\n $this->vars['prompt'] = str_replace('%s', '<i class=\"icon-th-list\"></i>', e(trans($this->prompt)));\n\n }", "private function XML_getXSSVulnerableParams() {\n\t\t$vulnerableParamsEntity = $this->xmlHandler->createElement('vulnerableparams');\n\n\t\t$vulnerableFormsEntity = $this->xmlHandler->createElement('vulnerableforms');\n\n\t\tforeach($this->XSSReport->getVulnerableDataInfo() as $formDataSet ) {\n\n\t\t\t$formEntity = $this->xmlHandler->createElement('form');\n\t\t\t$formIDAttrEntity = $this->xmlHandler->createAttribute('form_id');\n\t\t\t$formIDAttrEntity->appendChild(\n\t\t\t\t$this->xmlHandler->createTextNode($formDataSet->getFormID()));\n\n\t\t\t$formEntity->appendChild($formIDAttrEntity);\n\n\t\t\tforeach($formDataSet->getVulnerableParams() as $paramDataSet) {\n\n\t\t\t\t$vulnerableParamEntity = $this->xmlHandler->createElement('vulnerableparam');\n\n\t\t\t\t$paramNameEntity = $this->xmlHandler->createElement('paramname');\n\t\t\t\t$paramNameEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData( $paramDataSet->getParamName() )));\n\n\t\t\t\t$vulnerableParamEntity->appendChild($paramNameEntity);\n\n\t\t\t\t$xssTypeEntity = $this->xmlHandler->createElement('xsstype');\n\t\t\t\t$xssTypeEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData( $paramDataSet->getXSSType() )));\n\n\t\t\t\t$vulnerableParamEntity->appendChild($xssTypeEntity);\n\n\t\t\t\t// check values = vulnerable values ($paramValuesEntity)\n\t\t\t\t// inject values = exploits ($exploitsEntity)\n\t\t\t\tif(count($paramDataSet->vulnerableParamValues['check']) !== 0) {\n\t\t\t\t\t$paramValuesEntity = $this->xmlHandler->createElement('vulnerablevalues');\n\n\t\t\t\t\tforeach($paramDataSet->vulnerableParamValues['check'] as $techniqueName => $paramValues) {\n\n\t\t\t\t\t\t$techniqueEntity = $this->xmlHandler->createElement('checktechnique');\n\t\t\t\t\t\t$techniqueNameAttrEntity = $this->xmlHandler->createAttribute('technique_name');\n\t\t\t\t\t\t$techniqueNameAttrEntity->appendChild($this->xmlHandler->createTextNode($techniqueName));\n\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueNameAttrEntity);\n\n\n\t\t\t\t\t\tforeach($paramValues as $paramValueSet) {\n\t\t\t\t\t\t\t$valueEntity = $this->xmlHandler->createElement('value');\n\t\t\t\t\t\t\t$valueEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData($paramValueSet['vulnerableValue']) ));\n\n\t\t\t\t\t\t\t$techniqueEntity->appendChild($valueEntity);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$paramValuesEntity->appendChild($techniqueEntity);\n\t\t\t\t\t}\n\n\t\t\t\t\t$vulnerableParamEntity->appendChild($paramValuesEntity);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif(count($paramDataSet->vulnerableParamValues['inject']) !== 0) {\n\t\t\t\t\t$exploitsEntity = $this->xmlHandler->createElement('exploits');\n\n\t\t\t\t\tforeach($paramDataSet->vulnerableParamValues['inject'] as $techniqueName => $exploits) {\n\t\t\t\t\t\t$techniqueEntity = $this->xmlHandler->createElement('exploittechnique');\n\t\t\t\t\t\t$techniqueNameAttrEntity = $this->xmlHandler->createAttribute('technique_name');\n\t\t\t\t\t\t$techniqueNameAttrEntity->appendChild($this->xmlHandler->createTextNode($techniqueName));\n\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueNameAttrEntity);\n\n\t\t\t\t\t\tforeach($exploits as $exploitValueSet) {\n\t\t\t\t\t\t\t//'resultQueue' => array stepID -> value\n\t\t\t\t\t\t\t//'resultData' => string\n\t\t\t\t\t\t\t$techniqueExploitKindEntity = $this->xmlHandler->createElement('exploitkind');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$techniqueValueQueueEntity = $this->xmlHandler->createElement('valuesqueue');\n\t\t\t\t\t\t\t$techniqueValueQueueEntity->appendChild($this->xmlHandler->createTextNode(implode(' ->-> ', $this->filtrateData($exploitValueSet['resultQueue']) )));\n\n\t\t\t\t\t\t\t$techniqueDataEntity = $this->xmlHandler->createElement('exploitdata');\n\t\t\t\t\t\t\t$techniqueDataEntity->appendChild($this->xmlHandler->createTextNode($this->filtrateData($exploitValueSet['resultData']) ));\n\n\t\t\t\t\t\t\t$techniqueExploitKindEntity->appendChild($techniqueValueQueueEntity);\n\t\t\t\t\t\t\t$techniqueExploitKindEntity->appendChild($techniqueDataEntity);\n\n\t\t\t\t\t\t\t$techniqueEntity->appendChild($techniqueExploitKindEntity);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$exploitsEntity->appendChild($techniqueEntity);\n\t\t\t\t\t}\n\n\t\t\t\t\t$vulnerableParamEntity->appendChild($exploitsEntity);\n\t\t\t\t}\n\n\t\t\t\t$formEntity->appendChild($vulnerableParamEntity);\n\t\t\t}\n\n\t\t\t$vulnerableFormsEntity->appendChild($formEntity);\n\t\t}\n\n\t\t$vulnerableParamsEntity->appendChild($vulnerableFormsEntity);\n\n\t\treturn $vulnerableParamsEntity;\n\t}", "public function shareVisualsVars(View $view)\n {\n // Forward to layouts\n $view->with('visualLogo', $this->_getCacheEntry(AppCacheManager::EXTRANET_VISUAL_LOGO));\n $view->with('visualLogoLarge', $this->_getCacheEntry(AppCacheManager::EXTRANET_VISUAL_LOGO_LARGE));\n $view->with('visualLoginBackground', $this->_getCacheEntry(AppCacheManager::EXTRANET_VISUAL_AUTH_BACKGROUND));\n $view->with('visualFavicon', $this->_getCacheEntry(AppCacheManager::EXTRANET_VISUAL_FAVICON));\n\n }", "function _filter_do_shortcode_context()\n {\n }", "protected function process()\n {\n // Assign raw URI\n $uri = $this->getRequest()->getRequestUri();\n $this->view()->assign('uri', $uri);\n\n // Assign all route params\n $params = $this->params()->fromRoute();\n $this->view()->assign('params', $params);\n\n // Specify template,\n // otherwise template will be set up as {controller}-{action}\n $this->view()->setTemplate('demo-route');\n\n // Assign route list to template\n $this->loadRoutes();\n }", "private function _extractParts($value) {}", "abstract protected function prepareContextItem();", "protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }", "public function render_to_var($context = array()){\n\t\tob_start();\n\t\t$this->render($context);\n // we have to get rid of newlines, tabs, etc because WP can create convert \n // some things to `<br>` automatically...and we don't want that!\n\t\t$value = preg_replace(\"/\\r+|\\n+|\\t+/\", \"\", ob_get_contents());\n\t\tob_end_clean();\n\t\treturn $value;\n\t}", "protected function _parseTemplate() {}", "public function setcontext($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->context !== $v) {\n $this->context = $v;\n $this->modifiedColumns[] = ActionTypePeer::CONTEXT;\n }\n\n\n return $this;\n }", "public function __Init_Context() {\r\n $this->_Load_Context();\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_init_context',$this);\r\n }", "private function set_context_vars() {\n\n\t\t$this->total_pages = $this->data->get_total_pages();\n\t\t$this->total_items = $this->data->get_total_items();\n\t\t$this->current_page = $this->data->get_current_page();\n\t\t$this->current_url = $this->get_current_url();\n\n\t\tif ( 1 === $this->current_page ) {\n\t\t\t$this->disable_first = ' disabled';\n\t\t}\n\n\t\tif ( $this->current_page === $this->total_pages ) {\n\t\t\t$this->disable_last = ' disabled';\n\t\t}\n\t}", "protected function variablesAssign()\n {\n $app = $this->app;\n $this->request = $app['request'];\n $this->session = $app['session'];\n $this->template = $app['template'];\n $this->theme = $app['theme'];\n\n // Set Request Format\n switch ($this->request->getRequestFormat()) {\n case 'json':\n $this->format = 'json';\n break;\n\n case 'xml':\n $this->format = 'xml';\n break;\n\n case 'csv':\n $this->format = 'csv';\n break;\n\n case 'html':\n default:\n $this->format = 'html';\n break;\n }\n }", "protected function parse(): void\n {\n $lines = preg_split('/\\r\\n|\\r|\\n/', $this->content);\n\n foreach ($lines as $line) {\n if (mb_strlen(trim($line)) && ! (mb_strpos(trim($line), '#') === 0)) {\n [$key, $value] = explode('=', (string) $line);\n $this->variables[$key] = $this->formatValue($value);\n }\n }\n }", "public function prepareVars()\n {\n $this->vars['history'] = $this->model->revision_history;\n $this->vars['chapter_id'] = $this->model->id;\n }", "public function onTwigSiteVariables()\n\t{\n\t\trequire_once __DIR__ . '/classes/datetools.php';\n\n\t\t$args = [];\n\t\t$args['config'] = $this->grav['config'];\n\n\t\t$twig = $this->grav['twig'];\n\t\t$twig->twig_vars['datetools'] = new DateTools($args);\n\t\t//$twig->twig->addGlobal('datetools', new DateTools($args));\n\t}", "private function simpleValueCallback($matches)\n {\n // Get the type of value\n $valueType = $matches[1];\n \n // Get the attribute list if any\n $attributes = isset($matches[3]) ? $this->parseAttributes($matches[3]) : array();\n \n // Retrieve the value from the values array\n $value = $this->getLiteral($matches[2]);\n \n switch($valueType)\n {\n case 'Subview':\n \n // Reset value\n $value = $matches[2];\n \n\t // Get skin name\n\t $skinName = $this->parent->config->get('com.b2bfront.site.skin', true) ;\n\t \n\t if(!$skinName || !Tools::exists(BF_ROOT . '/skins/' . $skinName . '.skin'))\n\t {\n\t \t$skinName = 'default';\n\t }\n \n // Load a subview into this view.\n $viewPath = BF_ROOT . 'skins/' . \n $skinName . \n '.skin/views/' . $value . '.view.php';\n \n if(file_exists($viewPath))\n {\n // Enable collection of output\n ob_start();\n \n // Read view file\n include $viewPath;\n \n // Parse?\n $subviewText = $attributes['static'] ? ob_get_clean() : $this->parse(ob_get_clean());\n \n //Finish reading output\n $value = $this->wrapSubview($subviewText, $value);\n }\n else\n {\n throw new Exception('View: ' . $this->name . ': Unable to find subview file: ' . $value);\n }\n\n break;\n \n case 'String':\n \n $value = strval($value);\n \n if($attributes['limit'])\n {\n // Check for a 'continues' value\n $continues = $attributes['continues'] && strlen($value) > $attributes['limit']\n ? $attributes['continues'] : '';\n \n // Limit the maximum length\n $value = substr($value, 0, intval($attributes['limit'])) . $continues;\n }\n \n if($attributes['lcase'])\n {\n // Lowercase version\n $value = strtolower($value);\n }\n \n break;\n \n case 'QRCode':\n \n // Create QR Code if possible\n if(!include_once(BF_ROOT . '/libraries/phpqrcode/qrlib.php'))\n {\n // Failed, output nothing:\n $value = '';\n }\n else\n {\n // Create QR\n try \n {\n $location = Tools::randomPath(BF_ROOT . '/temp/', 'png', 'qrc');\n QRcode::png($value, $location, 'L', 4, 2);\n \n // Get URL\n $QRCodeURL = $this->parent->config->get('com.b2bfront.site.url', true) . \n '/' . Tools::relativePath($location);\n \n // Replace\n $value = '<img src=\"' . $QRCodeURL . '\" />';\n \n // Set TTL\n $this->parent->setFileTTL(Tools::relativePath($location), 10);\n }\n catch(Exception $exception)\n {\n $this->parent->log('QRCode', 'Failed to generate QR Code using phpqrcode library.');\n }\n }\n \n \n break;\n \n case 'Integer':\n \n // Cast to integer\n $value = intval($value);\n \n // Any offset?\n if($attributes['offset'])\n {\n $value += intval($attributes['offset']);\n }\n \n break;\n \n case 'Decimal':\n \n // Check for dps attribute\n $dp = $attributes['dps'] ? intval($attributes['dps']) : $this->doublePrecision;\n \n // Cast to decimal\n $value = number_format(doubleval($value), $dp, '.', '');\n \n break;\n }\n \n return $value;\n }", "public function parse(&$segments)\n\t{\n\t\t// Initialize variables.\n\t\t$vars = [];\n\n\t\t// If no segments exist then we are at the tracker list\n\t\tif (empty($segments))\n\t\t{\n\t\t\t$vars['view'] = 'trackers';\n\n\t\t\treturn $vars;\n\t\t}\n\n\t\t// Get the item from the segment\n\t\t$segment = array_shift($segments);\n\t\tlist ($view, $jcItemId) = explode('-', $segment);\n\n\t\t$db = JFactory::getDbo();\n\n\t\t$vars['view'] = $view;\n\n\t\t// Move forward based on view\n\t\tswitch ($view)\n\t\t{\n\t\t\tcase 'tracker':\n\t\t\t\t// Search the database for the appropriate tracker.\n\t\t\t\t$db->setQuery(\n\t\t\t\t\t$db->getQuery(true)\n\t\t\t\t\t\t->select('tracker_id')\n\t\t\t\t\t\t->from('#__code_trackers')\n\t\t\t\t\t\t->where('jc_tracker_id = ' . (int) $jcItemId)\n\t\t\t\t\t, 0, 1\n\t\t\t\t);\n\t\t\t\t$trackerId = (int) $db->loadResult();\n\n\t\t\t\t// If the tracker isn't found throw a 404.\n\t\t\t\tif (!$trackerId)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidArgumentException('Tracker not found.', 404);\n\t\t\t\t}\n\n\t\t\t\t// We're on a valid tracker, finish up the processing\n\t\t\t\t$vars['tracker_id'] = $jcItemId;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'issue';\n\t\t\t\t// Search the database for the appropriate issue.\n\t\t\t\t$db->setQuery(\n\t\t\t\t\t$db->getQuery(true)\n\t\t\t\t\t\t->select('issue_id')\n\t\t\t\t\t\t->from('#__code_tracker_issues')\n\t\t\t\t\t\t->where('jc_issue_id = ' . (int) $jcItemId)\n\t\t\t\t\t, 0, 1\n\t\t\t\t);\n\t\t\t\t$issueId = (int) $db->loadResult();\n\n\t\t\t\t// If the issue isn't found throw a 404.\n\t\t\t\tif (!$issueId)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidArgumentException('Issue not found.', 404);\n\t\t\t\t}\n\n\t\t\t\t// We're on a valid issue, finish up the processing\n\t\t\t\t$vars['issue_id'] = $jcItemId;\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Unsupported resource\n\t\t\t\tthrow new InvalidArgumentException('Resource not found.', 404);\n\t\t}\n\n\t\treturn $vars;\n\t}", "protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n }", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "function values( $vars ) {\n foreach($vars as $k=>$v) {\n $this->_vars[\"$k\"] = $v;\n }\n }", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "protected function _getContextDataDef()\n\t{\n\t\t$contextData = parent::_getContextDataDef();\n\n\t\t// define context data to be retrieved. Cannot be done at class level,\n\t\t// as some default values are dynamic\n\t\t$addedContextData = array(\n\n\t\t\t// search string applied to either sef or non sef\n\t\t\tarray('name' => 'search_pageid', 'html_name' => 'search_pageid', 'default' => '', 'type' => 'string')\n\t\t\t// component used in url\n\t\t, array('name' => 'filter_component', 'html_name' => 'filter_component', 'default' => '', 'type' => 'string')\n\t\t\t// show all/only with duplicates/only w/o duplicates\n\t\t, array('name' => 'filter_duplicate', 'html_name' => 'filter_duplicate', 'default' => 0, 'type' => 'int')\n\t\t\t// show all/only with aliases/only w/o aliases\n\t\t, array('name' => 'filter_alias', 'html_name' => 'filter_alias', 'default' => 0, 'type' => 'int')\n\t\t\t// show all/only custom/only automatic\n\t\t, array('name' => 'filter_url_type', 'html_name' => 'filter_url_type', 'default' => 0, 'type' => 'int')\n\t\t\t// show all/only one language\n\t\t, array('name' => 'filter_language', 'html_name' => 'filter_language', 'default' => '', 'type' => 'string')\n\n\t\t\t// show all/only with duplicates/only w/o duplicates\n\t\t, array('name' => 'filter_title', 'html_name' => 'filter_title', 'default' => 0, 'type' => 'int')\n\t\t\t// show all/only with aliases/only w/o aliases\n\t\t, array('name' => 'filter_desc', 'html_name' => 'filter_desc', 'default' => 0, 'type' => 'int')\n\n\t\t\t// show/hide duplicates/404 on metas page\n\t\t, array('name' => 'filter_hide_urls', 'html_name' => 'filter_hide_urls', 'default' => 0, 'type' => 'int')\n\n\t\t\t// show/hide duplicates/404 on metas page\n\t\t, array('name' => 'filter_hit_type', 'html_name' => 'filter_hit_type', 'default' => 0, 'type' => 'int')\n\t\t\t// requested or not\n\t\t, array('name' => 'filter_requested_urls', 'html_name' => 'filter_requested_urls', 'default' => 0, 'type' => 'int')\n\n\t\t);\n\n\t\treturn array_merge($contextData, $addedContextData);\n\t}", "public function execute($viewContext) {\n !empty($this->title) ? $viewContext->title = $this->title : null;\n !empty($this->viewFile) ? $viewContext->viewFile = PathUtility::getViewFilePath($this->viewFile) : null;\n !empty($this->layout) ? $viewContext->layout = PathUtility::getViewFilePath($this->layout) : null;\n !empty($this->model) ? $viewContext->model = $this->model : null;\n\n if (!empty($this->viewData)) {\n $viewContext->viewData = array_unique(array_merge($viewContext->viewData, $this->viewData), \\SORT_REGULAR);\n }\n }", "public static function filter($tpl_source, $smarty) {\n \tif(strstr($tpl_source, \"{{sf_view\")===false && strstr($tpl_source, \"{sf_view\")===false) {\n \t\treturn $tpl_source;\n \t}\n\n $single_delim = !(strstr($tpl_source, \"{{sf_view\")!==false);\n\n if($single_delim) {\n $s = $tpl_source;\n $pattern=\"/\\{sf_view(.*)\\}/\";\n $replacement=\"<sf_view$1>\";\n $s = preg_replace($pattern, $replacement, $s);\n $s = str_replace(\"{/sf_view}\",\"</sf_view>\",$s);\n } else {\n $s = $tpl_source;\n $s = str_replace(\"{{\", \"<\", $s);\n $s = str_replace(\"}}\", \">\", $s);\n }\n\n if(property_exists($smarty, \"source\")) {\n\t $current_file = $smarty->source->filepath;\n\t $current_file = realpath($current_file);\n } else {\n $current_file = $smarty->compiler_object->template->resource_name;\n }\n $template_dir=SmartyFaces::resolvePath(SmartyFaces::$config['view_dir']);\n $file_name=str_replace($template_dir.DIRECTORY_SEPARATOR, \"\", $current_file);\n\n require_once(dirname(__FILE__).\"/FileUtils.php\");\n $subview_dir=SmartyFaces::resolvePath(SmartyFaces::$config['tmp_dir']).\"/subview\";\n if(!file_exists($subview_dir)) @mkdir($subview_dir,0777,true);\n $file = $subview_dir.DIRECTORY_SEPARATOR.$file_name;\n $file_dir = dirname($file);\n \n \t$files=FileUtils::getFilesFromDir($file_dir);\n \tforeach($files as $file){\n \t\tif(substr($file, -5)==\".view\"){\n \t\t\t@unlink($file);\n \t\t}\n \t}\n \t// clear sessions\n \t$state=SmartyFacesContext::getState();\n \tunset($state[$file_name]);\n \tSmartyFacesContext::setState($state);\n \n $create_file = str_replace($template_dir, \"\", $current_file);\n $create_file = $subview_dir.$create_file.\".source\";\n $dir=dirname($create_file);\n if(!file_exists($dir)) {\n\t @mkdir($dir,0777,true);\n }\n @file_put_contents($create_file, $s);\n \n return $tpl_source;\n }", "protected function setTemplateVariables() {}", "public function get_vb_data ($vars = array());", "public function getCvv()\n {\n return $this->getParameter('cvv');\n }", "function smarty_function_value_filter($params)\n{\n \n App::uses('SmartyComponent', 'Controller/Component');\n $Smarty = new SmartyComponent(new ComponentCollection());\n\n $assignments = array('id_attribute' => $params['id_attribute']\n ,'name_attribute' => $params['name_attribute']\n ,'values_attribute' => $params['values_attribute']);\n if(isset($params['is_active']))$assignments['is_active'] = $params['is_active'];\n if(isset($params['alias_micro_template']))\n {\n $params['template'] = $params['alias_micro_template'];\n $display_template = $Smarty->load_template($params, 'value_filter');\n }\n else $display_template = $params['template'];\n $Smarty->display($display_template, $assignments);\n\n}", "public function prepareVars()\n {\n $this->vars['posts'] = $this->prepareHtml();\n $this->vars['model'] = $this->model;\n }", "function ProcessValuesView(&$values, &$pageObject)\n{\n\n\t\t\n$tmpColor = $values[\"Color\"];\n$values = calendar_convertValues($values);\n$values[\"Color\"] = $tmpColor;\n\nif($values[\"DayEvent\"]==1)\n{\n\t$values[\"TimeField\"]=\"\";\n\t$values[\"EndTime\"]=\"\";\n}\n\ncalendar_hideEmptyFields($pageObject, $values);\n;\t\t\n}", "function build($view) {\n\t\t//$_GET['gamme'] = 3;\n\t\t(is_as_get(\"gamme\")) ? $gamme = $_GET['gamme'] : $gamme = WEBSHOP_COLL_SEGMENT_ID;\n\t\tif ((strpos($_SERVER['SCRIPT_FILENAME'], \"/content/\") === false )&& ($_SERVER['REQUEST_URI']!='/')) {} else {\n\n\t\t\tif (is_file($_SERVER['DOCUMENT_ROOT'].'/modules/webshop/custom/class.'.$view.'.php')) {\n\n\t\t\t\tinclude_once('modules/webshop/custom/class.'.$view.'.php');\n\t\t\t\t$this->view = new $view($this);\n\t\t\t\t$params = Array('segment' => $this->models['shop']->segment($gamme));\n\t\t\t\t$this->view->render($params);\n\n\t\t\t} else\techo \"SegmentDetailController.build > Incorrect View given for display : /modules/webshop/custom/class.\".$view.\".php<br/>\";\n\t\t}\n\t}", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\tif ($values['Color']) {\n\t$xt->assign(\"bgc_category\",'style=\"background:'.$values['Color'].';\" ');\n}\n\n\n;\t\t\n}", "public function getsvinfoAction()\n {\n $uid = $this->uid;\n $fid = $this->_request->getParam('fid', null);\n\n $result1 = Hapyfish2_Island_Bll_SuperVisitor::getSuperVisitor($uid, $fid);\n\n // update by hdf add compound visitor\n $result2 = Hapyfish2_Island_Bll_CompoundSuperVisitor::getSuperVisitor($uid, $fid);\n $result['spVisitors'] = array_merge($result1['spVisitors'], $result2['spVisitors']); \n\n $this->echoResult($result);\n }", "public function compose(View $view)\n {\n $select = trans('keywords.Select');\n $view->with(['counters'=>$this->counters,\"select_trans\"=>$select]);\n }", "private function initSmarty($viewPath){\n\t\t$constantsUser = get_defined_constants(true);\n\n\t\tforeach ($constantsUser['user'] as $constant => $value) {\n\t\t\t$this->smarty->assign($constant, $value);\n\t\t}\n\n\t\t// Set important variables to smart\n\t\t$this->smarty->assign('bundle', $this->bundle);\n\t\t$this->smarty->assign('viewPath', $viewPath);\n\t\t$this->smarty->assign('HOST', $this->request->root());\n\n\t\t// Assign vars from $this->variables\n\t\t$this->smarty->assign($this->variables);\n\n\t\t// Assign messages\n\t\t$this->smarty->assign(\"messageError\", @$this->controller->getMessage(\"messageError\"));\n\t\t$this->smarty->assign(\"messageSuccess\", @$this->controller->getMessage(\"messageSuccess\"));\n\t\t$this->smarty->assign(\"messageWarning\", @$this->controller->getMessage(\"messageWarning\"));\n\t\t$this->smarty->assign(\"messageInfo\", @$this->controller->getMessage(\"messageInfo\"));\n\n\t}", "function SetSessionFilterValues($sv1, $so1, $sc, $sv2, $so2, $parm) {\n\t\t$_SESSION['sv1_deals_details_' . $parm] = $sv1;\n\t\t$_SESSION['so1_deals_details_' . $parm] = $so1;\n\t\t$_SESSION['sc_deals_details_' . $parm] = $sc;\n\t\t$_SESSION['sv2_deals_details_' . $parm] = $sv2;\n\t\t$_SESSION['so2_deals_details_' . $parm] = $so2;\n\t}", "public function __construct() {\n\n $this->conf = $this->conf();\n\n $h = $this->conf[0];\n\n $this->vids = $this->getVids($h);\n\n }", "protected function processing()\n {\n $currentRouteSettings[] = $this->transformator->buildConfiguration(\n $this->getRouteString()\n )[$this->getRouteString()];\n \n foreach($currentRouteSettings as $routeName => $routeValue) {\n $this->setControllerName($routeValue['controller']);\n $this->setActionName($routeValue['action']);\n $this->setHttpMethodName($routeValue['method']);\n }\n\n $this->setParameters($this->searchParam());\n }", "protected function loadParserData()\n {\n // Load plug-in's variables into the parser\n ExpressionParser::setVars($this->piVars);\n // Load specific configuration into the extra data\n $extraData = array();\n if (is_array($this->conf['context.'])) {\n $extraData = GeneralUtility::removeDotsFromTS($this->conf['context.']);\n }\n // Allow loading of additional extra data from hooks\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['setExtraDataForParser'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['setExtraDataForParser'] as $className) {\n $hookObject = GeneralUtility::getUserObj($className);\n $extraData = $hookObject->setExtraDataForParser($extraData, $this);\n }\n }\n // Add the extra data to the parser and to the TSFE\n if (count($extraData) > 0) {\n ExpressionParser::setExtraData($extraData);\n // TODO: this should not stay\n // This was added so that context can be available in the local TS of the templatedisplay\n // We must find another solution so that the templatedisplay's TS can use the tx_expressions_parser\n $GLOBALS['TSFE']->tesseract = $extraData;\n }\n }", "function asp_parse_options() {\r\r\n foreach ( wd_asp()->o as $def_k => $o ) {\r\r\n if ( preg_match(\"/\\_def$/\", $def_k) ) {\r\r\n $ok = preg_replace(\"/\\_def$/\", '', $def_k);\r\r\n\r\r\n // Dang, I messed up this elegant solution..\r\r\n if ( $ok == \"asp_it\")\r\r\n $ok = \"asp_it_options\";\r\r\n\r\r\n wd_asp()->o[$ok] = asp_decode_params( get_option($ok, wd_asp()->o[$def_k]) );\r\r\n wd_asp()->o[$ok] = array_merge(wd_asp()->o[$def_k], wd_asp()->o[$ok]);\r\r\n }\r\r\n }\r\r\n // Long previous version compatibility\r\r\n if ( wd_asp()->o['asp_caching'] === false )\r\r\n wd_asp()->o['asp_caching'] = wd_asp()->o['asp_caching_def'];\r\r\n\r\r\n // The globals are a sitewide options\r\r\n wd_asp()->o['asp_glob'] = get_site_option('asp_glob', wd_asp()->o['asp_glob_d']);\r\r\n wd_asp()->o['asp_glob'] = array_merge(wd_asp()->o['asp_glob_d'], wd_asp()->o['asp_glob']);\r\r\n}", "protected function processVariable(\n File $phpcsFile,\n $stackPtr\n ) {\n }", "protected function buildControllerContext() {}", "public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }", "function process(){\n if(isset($this->displayParams['collection_field_list'])){\n if($this->action_type == 'editview'){\n $this->viewtype = 'EditView';\n }else {\n if($this->action_type == 'detailview'){\n $this->viewtype = 'DetailView';\n }\n }\n $relatedObject = BeanFactory::getObjectName($this->related_module);\n vardefmanager::loadVardef($this->related_module, $relatedObject);\n foreach($this->value_name as $key_value=>$field_value){\n $this->count_values[$key_value] = $key_value;\n $this->process_form($relatedObject,$key_value,$field_value);\n }\n $this->process_label($relatedObject);\n }else{\n die(\"the array collection_field_list isn't set\");\n }\n }", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\t$xt->assign(\"bg_edit\",\"style=\\\"background-color:\" . $values[\"Color\"].\";\\\"\");\n;\t\t\n}", "protected function applyVars()\n\t{\n\t\tforeach ($this->data as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$this->parseToElement($key, $value);\n\t\t\t} else {\n\t\t\t\t$results = @$this->xpath->query(\"//*[@c.\" . $key . \"]\");\n\t\t\t\tif ($results->length > 0) {\n\t\t\t\t\t// Get HTML\n\t\t\t\t\t$node = $results->item(0);\n\t\t\t\t\tif ($node->hasAttribute('c.if')) {\n\t\t\t\t\t\t$expression = $node->getAttribute('c.if');\n\t\t\t\t\t\t$node->removeAttribute('c.if');\n\t\t\t\t\t\t$condition_control = new Condition($expression, $this->data, $value);\n\t\t\t\t\t\tif (!$condition_control->getResult()) {\n\t\t\t\t\t\t\t$node->parentNode->removeChild($node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$node->removeAttribute('c.' . $key);\n\t\t\t\t\t$this->setElementContent($node, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function initVarfromXml() {\n if ((array) $this->xml_data) {\n foreach ($this->xml_data->xpath('//page_group') as $item) {\n foreach ($item->children() as $child) {\n $seq = 0;\n if (!empty($child['seq'])) {\n $seq = (string) $child['seq'];\n }\n if ($seq < 99) {\n\n if ($child['type'] == 'IE') {\n foreach ($child->xpath('input') as $value) {\n $tp = 0;\n if (empty($value->value)) {\n $datav = (string) $value->default;\n } else {\n $datav = (string) $value->value;\n }\n if (strtolower($value->type) == 'number')\n $tp = 1;\n if (empty($this->sccpvalues[(string) $value->name])) {\n $this->sccpvalues[(string) $value->name] = array('keyword' => (string) $value->name, 'data' => $datav, 'type' => $tp, 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$value->name, 'data' =>(string)$value->default, 'type'=> '0');\n }\n }\n }\n if ($child['type'] == 'IS' || $child['type'] == 'IED') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n// $this->sccpvalues[] = array('keyword' => (string)$child->name, 'data' =>(string)$child-> default,'type'=>'0');\n }\n }\n if ($child['type'] == 'SLD' || $child['type'] == 'SLS' || $child['type'] == 'SLT' || $child['type'] == 'SL' || $child['type'] == 'SLM' || $child['type'] == 'SLZ' || $child['type'] == 'SLZN' || $child['type'] == 'SLA') {\n if (empty($child->value)) {\n $datav = (string) $child->default;\n } else {\n $datav = (string) $child->value;\n }\n if (empty($this->sccpvalues[(string) $child->name])) {\n $this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq);\n }\n }\n }\n }\n }\n }\n }", "public function parse(Request $request)\n { \n $path = $request->file('filedoc');\n $filePath = $path->getRealPath();\n $content = utf8_encode(file_get_contents($filePath)) ;\n\n preg_match_all('`\\$.+?\\$`', $content, $matches);\n //dd($matches[0]);\n $variables = $matches[0];\n\n return view('variables_form', compact('variables'));\n /*$file = fopen($filePath, 'r');\n\n while(!feof($file)) {\n echo fgets($file). \"<br>\";\n }\n\n fclose($file);*/\n\n //$phpWord = IOFactory::createReader('Word2007')->load($request->file('filedoc')->path());\n\n \n }", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "public function getParamsToView();", "protected function processVariable(File $phpcsFile, $stackPtr)\n {\n\n }", "function studeon_vc_add_params_classes($classes, $sc, $atts) {\n\t\tif (in_array($sc, array('vc_section', 'vc_row', 'vc_row_inner', 'vc_column', 'vc_column_inner', 'vc_column_text'))) {\n\t\t\tif (!empty($atts['scheme']) && !studeon_is_inherit($atts['scheme']))\n\t\t\t\t$classes .= ($classes ? ' ' : '') . 'scheme_' . $atts['scheme'];\n\t\t} else if (in_array($sc, array('vc_empty_space'))) {\n\t\t\tif (!empty($atts['alter_height']) && !studeon_is_off($atts['alter_height']))\n\t\t\t\t$classes .= ($classes ? ' ' : '') . 'height_' . $atts['alter_height'];\n\t\t\tif (!empty($atts['hide_on_mobile'])) {\n\t\t\t\tif (strpos($atts['hide_on_mobile'], '1')!==false)\t$classes .= ($classes ? ' ' : '') . 'hide_on_mobile';\n\t\t\t\tif (strpos($atts['hide_on_mobile'], '2')!==false)\t$classes .= ($classes ? ' ' : '') . 'hide_on_notebook';\n\t\t\t\tif (strpos($atts['hide_on_mobile'], '3')!==false)\t$classes .= ($classes ? ' ' : '') . 'hide_on_tablet';\n\t\t\t}\n\t\t} else if (in_array($sc, array('vc_progress_bar'))) {\n\t\t\tif (!empty($atts['narrow']) && (int) $atts['narrow']==1)\n\t\t\t\t$classes .= ($classes ? ' ' : '') . 'vc_progress_bar_narrow';\n\t\t} else if (in_array($sc, array('vc_message'))) {\n\t\t\tif (!empty($atts['closeable']) && (int) $atts['closeable']==1)\n\t\t\t\t$classes .= ($classes ? ' ' : '') . 'vc_message_box_closeable';\n\t\t}\n\t\treturn $classes;\n\t}", "public function visit($v);", "function init(&$context){}", "public function Hello1()\n {\n $v = $this->request->getParam('v');\n $this->view->set(array(\n 'v' => $v . \" Hello 1\"\n ));\n }", "protected static function handle_vars($content) {\n\t\treturn preg_replace('/{\\- VAR ([a-z_]+)\\: (.*?) \\-}/', '<?php \\$$1 = $2; ?>', $content);\n\t}", "function emvideo_dotsub_extract($parse = '') {\n // Here we assume that a URL will be passed in the form of\n // http://dotsub.com/view/730d7b48-532a-4ec2-a0c6-ba0ac47d611\n // or embed code in the form of <embed src=\"http://dotsub.com/static/players/portalplayer.swf?plugins=dotsub&uuid=730d7b48-532a-4ec2-a0c6-ba0ac47d6116&type=video&lang=eng\"\n\n return array(\n '@dotsub\\.com/view/([^\"]+)@i', \n '@dotsub\\.com/static/players/portalplayer.swf?plugins=dotsub&uuid=([^\\?]+)@i',\n );\n}", "public function prepareVars()\n {\n if ($this->formField->disabled) {\n $this->previewMode = true;\n }\n\n $permissionsData = $this->formField->getValueFromData($this->model);\n if (!is_array($permissionsData)) {\n $permissionsData = [];\n }\n\n $this->vars['checkboxMode'] = $this->getControlMode() === 'checkbox';\n $this->vars['permissions'] = $this->getFilteredPermissions();\n $this->vars['baseFieldName'] = $this->getFieldName();\n $this->vars['permissionsData'] = $permissionsData;\n $this->vars['field'] = $this->formField;\n }", "protected function initVars() {\n\n\t\t}", "public function addVariables($tvs = array());", "protected function parse()\n {\n\t$event_lines = explode(HCAL_LINE_SPLITER, $this->_Content);\n\n\tforeach ($event_lines as $line)\n\t{\n\t $result = $this->parseProperty($line);\n\t $this->_Properties[$result['name']] = $result['value'];\n\t}\n }", "public function parse_template ($val) {\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'\\\\{{', '\\\\}}', '\\\\{%', '\\\\%}', '\\\\{\"', '\\\\\"}', '\\\\{\\'', '\\\\\\'}',\n\t\t\t\t'\\\\{!', '\\\\!}', '\\\\{#', '\\\\#}'\n\t\t\t),\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOQUOTE#', '#ECQUOTE#', '#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#',\n\t\t\t\t'#ECHARDCODE#'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\t$val = preg_replace_callback ('/\\{\\{ ?(.*?) ?\\}\\}/', array ($this, 'replace_vars'), $val);\n\t\t$val = preg_replace_callback ('/\\{[\\'\"] ?(.*?) ?[\\'\"]\\}/', array ($this, 'replace_strings'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\% ?(.*?) ?\\%\\}/', array ($this, 'replace_blocks'), $val);\n\t\t$val = preg_replace_callback ('/\\{\\! ?(.*?) ?\\!\\}/s', array ($this, 'replace_includes'), $val);\n\t\t$val = preg_replace_callback ('/\\{# ?(.*?) ?#\\}/s', array ($this, 'hard_codes'), $val);\n\t\t$val = str_replace (\n\t\t\tarray (\n\t\t\t\t'#EOBRACE#', '#ECBRACE#', '#EOBLOCK#', '#ECBLOCK#', '#EOQUOTE#', '#ECQUOTE#',\n\t\t\t\t'#EOINCLUDE#', '#ECINCLUDE#', '#EOHARDCODE#', '#ECHARDCODE#'),\n\t\t\tarray (\n\t\t\t\t'{{', '}}', '{%', '%}', '{\"', '\"}', '{!', '!}', '{#', '#}'\n\t\t\t),\n\t\t\t$val\n\t\t);\n\t\treturn $val;\n\t}", "function phptemplate_preprocess_views_view(&$vars) {\r\n $vars['css_name'] = $vars['css_name'] .' view-style-'. views_css_safe(strtolower($vars['view']->type));\r\n}", "protected function processVariableInString(\n File $phpcsFile,\n $stackPtr\n ) {\n }", "function default_view_context() {\n return array(\n 'metaTitle' => 'Suicide MVC', // Set in \"<head><meta>\"\n 'metaAuthor' => '', // Displayed in \"#container > #footer\" && set in \"<head><meta>\"\n 'heading' => 'Suicide MVC', // Displayed in \"#container > #header > h1\"\n\n 'styleSheets' => 'CakePHP/cake.generic.css', // ';' delimited list of paths from the $viewStyleDirectory\n 'jscripts' => '', // ';' delimited list of paths from the $viewJavascriptDirectory\n // 'sections' => 'data_list.php' // (useful to implement?)\n\n 'data' => NULL // used by model, never need to modify\n );\n}", "protected function inflateFrom(\\stdClass $sc)\n\t{\n\t\tif (property_exists($sc, 'Version')) {\n\t\t\t$this->Version = (string)($sc->Version);\n\t\t}\n\t\tif (property_exists($sc, 'VersionCodename')) {\n\t\t\t$this->VersionCodename = (string)($sc->VersionCodename);\n\t\t}\n\t\tif (property_exists($sc, 'StorageRole')) {\n\t\t\t$this->StorageRole = (bool)($sc->StorageRole);\n\t\t}\n\t\tif (property_exists($sc, 'AuthenticationRole')) {\n\t\t\t$this->AuthenticationRole = (bool)($sc->AuthenticationRole);\n\t\t}\n\t\tif (property_exists($sc, 'SoftwareBuildRole')) {\n\t\t\t$this->SoftwareBuildRole = (bool)($sc->SoftwareBuildRole);\n\t\t}\n\t\tif (property_exists($sc, 'OverseerRole')) {\n\t\t\t$this->ConstellationRole_Legacy = (bool)($sc->OverseerRole);\n\t\t}\n\t\tif (property_exists($sc, 'ConstellationRole')) {\n\t\t\t$this->ConstellationRole = (bool)($sc->ConstellationRole);\n\t\t}\n\t\tif (property_exists($sc, 'ExperimentalOptions') && !is_null($sc->ExperimentalOptions)) {\n\t\t\t$val_2 = [];\n\t\t\tif ($sc->ExperimentalOptions !== null) {\n\t\t\t\tfor($i_2 = 0; $i_2 < count($sc->ExperimentalOptions); ++$i_2) {\n\t\t\t\t\t$val_2[] = (string)($sc->ExperimentalOptions[$i_2]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->ExperimentalOptions = $val_2;\n\t\t}\n\t\tif (property_exists($sc, 'ServerStartTime')) {\n\t\t\t$this->ServerStartTime = (int)($sc->ServerStartTime);\n\t\t}\n\t\tif (property_exists($sc, 'ServerStartHash')) {\n\t\t\t$this->ServerStartHash = (string)($sc->ServerStartHash);\n\t\t}\n\t\tif (property_exists($sc, 'CurrentTime')) {\n\t\t\t$this->CurrentTime = (int)($sc->CurrentTime);\n\t\t}\n\t\tif (property_exists($sc, 'ServerLicenseHash')) {\n\t\t\t$this->ServerLicenseHash = (string)($sc->ServerLicenseHash);\n\t\t}\n\t\tif (property_exists($sc, 'ServerLicenseFeaturesAll')) {\n\t\t\t$this->ServerLicenseFeaturesAll = (bool)($sc->ServerLicenseFeaturesAll);\n\t\t}\n\t\tif (property_exists($sc, 'ServerLicenseFeatureSet')) {\n\t\t\t$this->ServerLicenseFeatureSet = (int)($sc->ServerLicenseFeatureSet);\n\t\t}\n\t\tif (property_exists($sc, 'LicenseValidUntil')) {\n\t\t\t$this->LicenseValidUntil = (int)($sc->LicenseValidUntil);\n\t\t}\n\t\tif (property_exists($sc, 'EmailsSentSuccessfully')) {\n\t\t\t$this->EmailsSentSuccessfully = (int)($sc->EmailsSentSuccessfully);\n\t\t}\n\t\tif (property_exists($sc, 'EmailsSentErrors')) {\n\t\t\t$this->EmailsSentErrors = (int)($sc->EmailsSentErrors);\n\t\t}\n\t\tif (property_exists($sc, 'EmailsWaitingInQueue')) {\n\t\t\t$this->EmailsWaitingInQueue = (int)($sc->EmailsWaitingInQueue);\n\t\t}\n\t\tif (property_exists($sc, 'ScheduledEmailThreadCurrentState')) {\n\t\t\t$this->ScheduledEmailThreadCurrentState = (int)($sc->ScheduledEmailThreadCurrentState);\n\t\t}\n\t\tif (property_exists($sc, 'ScheduledEmailThreadLastCalculateDurationNanos')) {\n\t\t\t$this->ScheduledEmailThreadLastCalculateDurationNanos = (int)($sc->ScheduledEmailThreadLastCalculateDurationNanos);\n\t\t}\n\t\tif (property_exists($sc, 'ScheduledEmailThreadWaitingUntil')) {\n\t\t\t$this->ScheduledEmailThreadWaitingUntil = (int)($sc->ScheduledEmailThreadWaitingUntil);\n\t\t}\n\t\tif (property_exists($sc, 'ScheduledEmailThreadLastWakeTime')) {\n\t\t\t$this->ScheduledEmailThreadLastWakeTime = (int)($sc->ScheduledEmailThreadLastWakeTime);\n\t\t}\n\t\tif (property_exists($sc, 'ScheduledEmailThreadLastWakeSentEmails')) {\n\t\t\t$this->ScheduledEmailThreadLastWakeSentEmails = (bool)($sc->ScheduledEmailThreadLastWakeSentEmails);\n\t\t}\n\t\tif (property_exists($sc, 'SelfBackup')) {\n\t\t\t$val_2 = [];\n\t\t\tif ($sc->SelfBackup !== null) {\n\t\t\t\tfor($i_2 = 0; $i_2 < count($sc->SelfBackup); ++$i_2) {\n\t\t\t\t\tif (is_array($sc->SelfBackup[$i_2]) && count($sc->SelfBackup[$i_2]) === 0) {\n\t\t\t\t\t// Work around edge case in json_decode--json_encode stdClass conversion\n\t\t\t\t\t\t$val_2[] = \\Comet\\SelfBackupStatistics::createFromStdclass(new \\stdClass());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$val_2[] = \\Comet\\SelfBackupStatistics::createFromStdclass($sc->SelfBackup[$i_2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->SelfBackup = $val_2;\n\t\t}\n\t\tforeach(get_object_vars($sc) as $k => $v) {\n\t\t\tswitch($k) {\n\t\t\tcase 'Version':\n\t\t\tcase 'VersionCodename':\n\t\t\tcase 'StorageRole':\n\t\t\tcase 'AuthenticationRole':\n\t\t\tcase 'SoftwareBuildRole':\n\t\t\tcase 'OverseerRole':\n\t\t\tcase 'ConstellationRole':\n\t\t\tcase 'ExperimentalOptions':\n\t\t\tcase 'ServerStartTime':\n\t\t\tcase 'ServerStartHash':\n\t\t\tcase 'CurrentTime':\n\t\t\tcase 'ServerLicenseHash':\n\t\t\tcase 'ServerLicenseFeaturesAll':\n\t\t\tcase 'ServerLicenseFeatureSet':\n\t\t\tcase 'LicenseValidUntil':\n\t\t\tcase 'EmailsSentSuccessfully':\n\t\t\tcase 'EmailsSentErrors':\n\t\t\tcase 'EmailsWaitingInQueue':\n\t\t\tcase 'ScheduledEmailThreadCurrentState':\n\t\t\tcase 'ScheduledEmailThreadLastCalculateDurationNanos':\n\t\t\tcase 'ScheduledEmailThreadWaitingUntil':\n\t\t\tcase 'ScheduledEmailThreadLastWakeTime':\n\t\t\tcase 'ScheduledEmailThreadLastWakeSentEmails':\n\t\t\tcase 'SelfBackup':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->__unknown_properties[$k] = $v;\n\t\t\t}\n\t\t}\n\t}", "public function initVarfromDefs() {\n foreach ($this->extconfigs->getextConfig('sccpDefaults') as $key => $value) {\n if (empty($this->sccpvalues[$key])) {\n $this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');\n }\n }\n }", "public function handle(ValueContext $valueContext);", "public function mission_vision_values(Request $request)\n { \n $post = Page::with('sections', 'sliders')->where('code', 'mission_vision_values')->first();\n\n return view('mission_vision_values', compact('post'));\n }" ]
[ "0.50243545", "0.50243545", "0.50173795", "0.48855525", "0.47947076", "0.4750203", "0.47338724", "0.47316697", "0.4728217", "0.47142047", "0.46994922", "0.46594214", "0.4632845", "0.4627187", "0.46226275", "0.46197537", "0.4597984", "0.4597542", "0.4591438", "0.45863324", "0.45798948", "0.45672792", "0.456274", "0.45460355", "0.45409882", "0.45317316", "0.4527458", "0.45266935", "0.45200792", "0.45195976", "0.44887125", "0.44824862", "0.44785655", "0.44688043", "0.44513935", "0.44173285", "0.4406572", "0.4394036", "0.4393569", "0.4389466", "0.43890953", "0.4382187", "0.4382041", "0.4370089", "0.4353865", "0.43537107", "0.43404424", "0.43390983", "0.43390873", "0.43380788", "0.43323234", "0.43314537", "0.433035", "0.43298736", "0.43144187", "0.4306132", "0.43014127", "0.42961407", "0.42949829", "0.42828247", "0.42786244", "0.42747122", "0.42740685", "0.4273033", "0.42678982", "0.42528704", "0.42517325", "0.42478508", "0.42459232", "0.4241868", "0.42413893", "0.42408293", "0.4226367", "0.4219265", "0.42190123", "0.42187127", "0.42111152", "0.42003536", "0.4198033", "0.41951355", "0.4190492", "0.41849363", "0.4180336", "0.41666827", "0.41594455", "0.41550556", "0.41490892", "0.41467595", "0.41462353", "0.41414747", "0.41390777", "0.4131245", "0.41302982", "0.41259247", "0.4121051", "0.41184288", "0.4117875", "0.4115655", "0.41154677", "0.41153297", "0.41128826" ]
0.0
-1
Get image shortcode Get image by id, usage [getimage 12345] This will output the image with height and width attributes and class of getimage
public function getMediaImageShortCode($attributes, $content, $tag) { if ($attributes) { $image = wp_get_attachment_image_src($attributes[0], ''); return '<!-- '. $content .' --><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" class="' . $tag . '" />'; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImage( $post_id ) {}", "public function getImage($id)\n\t{\n\t\t$object = Image::read($id);\n\t\t\n\t\tif (!$object) {\n\t\t\treturn $this->error(404);\n\t\t}\n\t\t\n\t\t$response = Api::transform($object);\n\n\t\treturn $this->response($response, 'image');\n\t}", "public function showImageFromGet() {\n\n\t\t// $imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t$imageID = intval( UniteFunctionsRev::getGetVar( 'img' ) );\n\t\t$maxWidth = UniteFunctionsRev::getGetVar( 'w',-1 );\n\t\t$maxHeight = UniteFunctionsRev::getGetVar( 'h',-1 );\n\t\t$type = UniteFunctionsRev::getGetVar( 't','' );\n\n\t\t// set effect\n\t\t$effect = UniteFunctionsRev::getGetVar( 'e' );\n\t\t$effectArgument1 = UniteFunctionsRev::getGetVar( 'ea1' );\n\n\t\tif ( ! empty( $effect ) ) {\n\t\t\t$this->setEffect( $effect,$effectArgument1 ); }\n\n\t\t$this->showImageByID( $imageID );\n\t\techo 'sechs<br>';\n\t\t// $this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t}", "function L_getImage($number) {\n\t\t\n\t\tglobal $post;\n\t\t$img = '';\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t\t$img = $matches [1] [$number];\n\n\t\treturn $img;\n\t\n\t}", "public function getPhoto($id);", "public function getImage($id){\n $id = strip_tags($id);\n\n $sql = \"SELECT * FROM image WHERE id = :id LIMIT 1\";\n $query = $this->db->prepare($sql);\n $parameters = array(':id' => $id);\n\n $query->execute($parameters);\n\n return $query->fetchAll();\n }", "protected function getImageWithId($id){\n $conn = static::connect();\n $stmt = $conn->prepare(\"SELECT * FROM images where id=:id\");\n $stmt->bindValue('id', $id, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "function getImageId();", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "public function show($id)\n {\n return Image::find($id);\n }", "function image($id) {\n\t\t\t$image = $id;\n\t\t\tif ( -1 == $image ) {\n\t\t\t\t$image = get_template_directory_uri(). '/img/promo-placeholder.jpg';\n\t\t\t} else {\n\t\t\t\t$image = wp_get_attachment_image_src($id, 'carousel');\n\t\t\t\t$image = $image[0];\n\t\t\t}\n\t\t\techo($image);\n\t}", "function getImage();", "public function getImage($image_id)\n {\n $data = ImageModel::find($image_id);\n\t\treturn $this->sendResponse($data);\n }", "function cultiv8_getImage( $post_id = null, $size = 'large' ){\n\tif( null == $post_id ) {\n\t\tglobal $post;\t\n\t\t$post_id = $post -> ID;\n\t}\t\n\t\n\t// Check for a CTC image\n\t$img = get_post_meta( $post_id, '_ctc_image' , true ); \n\t\n\t// Fall back to the post thumbnail\n\tif( empty( $img ) ) {\n\t\t$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size );\n\t\tif( $thumbnail ) $img = $thumbnail[0];\n\t}\n\t\n\t// Fall back to the site feed logo\n\tif( empty( $img ) )\n\t\t$img = get_theme_mod( 'cultiv8_feed_logo', '' );\n\t\n\t// Fall back to the site logo\n\tif( empty( $img ) )\n\t\t$img = cultiv8_get_site_logo();\n\t\t\t\n\treturn $img;\n\t\n}", "public function show($id)\n {\n return $this->get('/images/' . $this->encodePath($id));\n }", "public static function get_image($user_id);", "function getThumbnail()\n\t{\n\t\t$id= FormUtil :: getPassedValue('id', isset ($args['id']) ? $args['id'] : null, 'GET');\n\t\t$width= FormUtil :: getPassedValue('width', isset ($args['width']) ? $args['width'] : null, 'GET');\n\t\tif (!SecurityUtil :: checkPermission('crpLicense::License', '::', ACCESS_READ))\n\t\t\tpnShutDown();\n\n\t\t$file= $this->dao->getFile($id, 'image', true);\n\t\t$modifiedDate= $this->dao->getLicenseDate($id, 'lu_date');\n\n\t\tif (!(is_numeric($width) && $width > 0))\n\t\t\t$width= pnModGetVar('crpLicense', 'image_width');\n\t\t$params['width']= $width; //\t$params['append_ghosted']=1;\n\t\t$params['modifiedDate']= $modifiedDate;\n\n\t\tcrpLicense :: imageGetThumbnail($file['binary_data'], $file['name'], $file['content_type'], $params);\n\t}", "function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}", "public function output() {\n $image = get_api_media( $this->params->id );\n\n // Add any custom classes to the already existing class parameter\n if ( $this->params->class ) {\n $regex = '/class=\"(.+?)\"/';\n $image = preg_replace( $regex, 'class=\"$1 ' . $this->params->class . '\"', $image );\n }\n // Only get the image tag\n if ( $this->params->img_only ) {\n $regex = '/(<img.*?>)/';\n $matches = [];\n preg_match( $regex, $image, $matches );\n $image = $matches[0];\n }\n\n return $image;\n }", "public function getImage(string $id) : string {\n return file_get_contents($this->end_point, false, stream_context_create([\n 'http' => [\n 'method' => 'POST',\n 'header' => \"Content-Type: application/json\\r\\n\",\n 'content' => json_encode([\n 'action' => 'image_file_by_id',\n 'id' => $id,\n 'session' => $this->session\n ])\n ]\n ]));\n }", "public function selectImage($id) {\n $sql = \"SELECT * FROM `images` WHERE `id` = :id\"; \n $stmt = $this->pdo->prepare($sql); \n $stmt->bindValue('id', $id); \n $stmt->execute(); \n return $stmt->fetch(PDO::FETCH_ASSOC); \n }", "public function myImage($id = NULL) {\n // formatted data:\n $ruta = $this->webroot . 'img/';\n switch ($id) {\n \tcase 1:\n \t\t$img = '<img src=\"'.$ruta.'checked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n \t\n \tdefault:\n \t\t$img = '<img src=\"'.$ruta.'unchecked.jpg\" alt=\"usuario\" style=\"width=\"32px\" height=\"32px\" !important\">';\n \t\tbreak;\n }\n \t \n return $img;\n }", "public function getImageByID ($id_image = 0) {\n $this->connection->where('id_image', $id_image);\n $result = $this->connection->select('base64', 'images');\n\n if ($result && $result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n $image = array(\n 'base64' => $row['base64'],\n );\n\n // if (file_exists('./images/' . $row['filename'])) {\n // $image['base64'] = base64_encode(file_get_contents('./images/' . $row['filename']));\n // }\n break;\n }\n\n return $image;\n }\n\n return null;\n }", "public function getImageTag();", "public function get_img($img_id){\n\t\treturn $this->db->select()\n\t\t\t->from(\"slide\")\n\t\t\t->where(\"sli_id\",$img_id)\n\t\t\t->get()\n\t\t\t->row();\n\t}", "function getImage($id){\n\trequire_once __DIR__ . '/database_handler.php';\n\t$db = new database_handler();\n\t//$id = $_POST['id'];\n\t$imageQuery = \"SELECT image from IMAGE where id = '$id'\";\n\t$imageString=\"\";\n\tif(!$imageStmt = $db->con->prepare($imageQuery)){\n\t\t\techo \"Prepare failed: (\" . $db->con->errno . \")\" . $db->con->error;\n\t\t}\n\t\t$imageStmt->execute();\n\t\t$imageStmt->bind_result($imageString);\n\t\t$imageStmt->fetch();\n\t\t$imageStmt->close();\n\t\t$imageString = base64_encode($imageString);\n\t\treturn $imageString;\n}", "function getImage( $options ) {\r\n\r\n\tglobal $cacheImages, $refreshCache, $site;\r\n\r\n\tif ( $refreshCache )\r\n\t\t$ext = '?' . time();\r\n\r\n\tif ( $cacheImages && !$options['id'] ) {\r\n\t\techo DOC_ROOT . TEMP_DIR . '/' . $site . '/' . $options['type'] . '.gif' . $ext;\r\n\t}\r\n\telse if ( $cacheImages ) {\r\n\t\techo DOC_ROOT . TEMP_DIR . '/' . $site . '/' . $options['type'] . $options['id'] . '.gif' . $ext;\r\n\t}\r\n\telse if ( $options['id'] ) {\r\n\t\techo DOC_ROOT . 'image.php?type=' . $options['type'] . '&id=' . $options['id'];\r\n\t}\r\n\telse {\r\n\t\techo DOC_ROOT . 'image.php?type=' . $options['type'];\r\n\t}\r\n}", "function getImageByImageId() {\n if($this->image_id == '') return;\n\n $sql = \"SELECT * FROM \".$this->tableImages().\" WHERE image_id = \".$this->image_id;\n return $this->db->query($sql)->row_array();\n\t}", "public function getImage() {}", "function get_image($image_id)\n\t{\n\t\t// global variables from config/db_config.php\n\t\tglobal $idea_db;\n\t\tglobal $images_db_table;\n\t\tglobal $db_hostname;\n\t\tglobal $db_user;\n\t\tglobal $db_password;\n\n\t\t$query = \"SELECT * FROM $images_db_table WHERE id='$image_id';\";\n\n\t\tif ($result = receive_query($query, $db_hostname, $db_user,\n\t\t$db_password,$idea_db))\n\t\t{\n\t\t\t// extract record from query\n\t\t\t$row = $result->fetch_array();\n\t\t\treturn $row['filename'];\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function GET($id,$width,$height) {\n\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\n\t\t$sql = new SELECT_SQL($this->db,'image');\n\t\t$sql->col($sql->getAlias() . '.*');\n\t\t$sql->where($sql->getAlias() . '.id = ?',$id);\n\n\t\t$this->image = $sql->get();\n\n\t\tif (! $this->image) {\n\t\t\tself::send_error_message(FALSE,404);\n\t\t}\n\n\t\tif ($this->image->IsVideo) {\n\t\t\t//ImageMagick tries valiantly, and takes ... forever\n\t\t\thttp_response_code(405);\n\t\t\tprint \"Cannot preview videos\\n\";\n\t\t\texit(0);\n\t\t}\n\n\n\t\t$this->buildPreview();\n\t\t$this->sendPreview();\n\n\t}", "function cpo_image_url( $id, $size = 'full' ) {\n\t$url = '';\n\tif ( is_numeric( $id ) ) {\n\t\t$url = wp_get_attachment_image_src( $id, $size );\n\t\t$url = $url[0];\n\t} else {\n\t\t$url = $id;\n\t}\n\n\treturn $url;\n}", "function image($file_name,$title,$class='',$id) {\n \tif ($id) $id = \"id = '\".$id.\"'\"; \n \t$data = '<img src=\"'.BASE_PATH.'/img/'.$file_name.'\" title = \"'.$title.'\" border=\"0\" align=\"absmiddle\" '.$id.' class=\"'.$class.'\" />';\n return $data;\n }", "public function show_image() {\n\t $options = Request::get(\"params\");\n\t $img_id = Request::get(\"id\");\n\t $img_size = $options[0];\n \t$this->use_view=false;\n\t\t$this->use_layout=false;\n \tif(!$size = $img_size) $size=110;\n \telse{\n\t\t\tif(strrpos($size, \".\")>0) $size = substr($size, 0, strrpos($size, \".\"));\n\t\t}\n \t$img = new WildfireFile($img_id);\n $img->show($size);\n }", "public function actionImage($id) {\n return $this->render('image', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function getImageUrl();", "function faculty_get_photo( $id = null ) {\n $thumbnail_id = get_post_thumbnail_id( $id );\n\n if ( $thumbnail_id ) {\n return wp_get_attachment_url( $thumbnail_id );\n }\n\n return get_stylesheet_directory_uri() . '/static/img/knight.png';\n}", "public function gezippercolorimg($id){\n\n\n\n $productid = Zippercolor::find($id);\n \n\n $filePath = base_path().\"/storage/app/zipper/\".$productid->productImage; \n header('Content-type: image/jpeg');\n $img = Image::make($filePath);\n return $img->response('jpg');\n\n \n }", "public function gezippercolorimg($id){\n\n\n\n $productid = Zippercolor::find($id);\n \n\n $filePath = base_path().\"/storage/app/zipper/\".$productid->productImage; \n header('Content-type: image/jpeg');\n $img = Image::make($filePath);\n return $img->response('jpg');\n\n \n }", "public static function getImage($id) {\n if (!$img = get_the_post_thumbnail_url($id, 'thumbnail')) {\n $url = BaseController::getPluginUrl();\n $img = $url . 'assets/images/default-badge.png';\n }\n\n return $img;\n }", "function get_hisrc_img( $img_id, $link='', $width_mobile='200', $height_mobile='200' ) {\n $out = '';\n if ( $img_id !='' ) {\n $img_src_mobile = wp_get_attachment_image_src( $img_id, array( $width_mobile, $height_mobile ) );\n $img_src_desktop = wp_get_attachment_image_src( $img_id, array( 400, 400 ) );\n $out .= '<div class=\"hisrc\">';\n if ( $link != '' ) {\n $out .= '<a href=\"'.$link.'\"><img src=\"'.$img_src_mobile[0].'\" width=\"'.$width_mobile.'\" height=\"'.$height_mobile.'\"\n data-1x=\"'.$img_src_desktop[0].'\" alt=\"'.$post->post_title.'\" /></a>';\n } else {\n $out .= '<img src=\"'.$img_src_mobile[0].'\" width=\"'.$width_mobile.'\" height=\"'.$height_mobile.'\"\n data-1x=\"'.$img_src_desktop[0].'\" alt=\"'.$post->post_title.'\" />';\n }\n $out .= '</div>';\n }\n return $out;\n}", "public function get($options=[])\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildImageElement($options);\n\t}", "function get_show_image($imageSize='shows-thumb', $showID=false, $returnUrlOnly = false, $showTitle = false, $phpThumbOptions='&f=jpg&q=95&zc=1&fltr[]=ric|5|5'){ \n if (!function_exists('gigx_get_image_size')) return;\n $imageSizeAttribs = gigx_get_image_size($imageSize);\n $width = $imageSizeAttribs['width'];\n $height = $imageSizeAttribs['height'];\n if (!$showID) $showID = get_the_ID();\n if (!$showTitle) $showTitle = get_the_title($showID);\n $img = array();\n if(has_post_thumbnail($showID)) {\n $img=wp_get_attachment_image_src(get_post_thumbnail_id($showID), $imageSize, false); \n }\n if(empty($img)) {\n $img= wp_get_attachment_image_src (get_post_thumbnail_id(get_page_by_title('Default',false,'page')->ID), $imageSize, false); \n }\n if (function_exists('getphpthumburl') && $phpThumbOptions) {\n $img[0]=getphpthumburl($img[0],'w='.$width.'&h='.$height.$phpThumbOptions);\n }\n if ($returnUrlOnly) return $img[0];\n $img_html= '<img src=\"'.$img[0].'\" width=\"'.$img[1].'\" height=\"'.$img[2].'\" alt=\"'.$showTitle.'\" title=\"'.$showTitle.'\"/>';\n return $img_html;\n}", "function goods_viewImgProduct(){\n $sql = \"select * from gd_image where get_imgid=:get_imgid order by gd_imgid ASC\";\n $args = [':get_imgid'=>$this->id];\n return $this->run($sql, $args);\n }", "public function find(string $id): Image\n {\n return $this->single(Image::class, \"2.0/product_images/$id\");\n }", "public function getImage(){\n $images = $this->getImageUrls($this->image_size);\n return Utils::saveImage($images->attr('data-url'));\n }", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "function get_attachment_icon_src($id = 0, $fullsize = \\false)\n {\n }", "static function img($source, $id = Null, $class = Null) \n {\n $file_name = array_pop(explode(\"/\", $source));\n $name = array_shift(explode(\".\", $file_name));\n return '<img' . self::_id($id) . self::_class($class) . ' src=\"'.$source.'\" title=\"'.$name.'\" alt=\"'.$name.'\" />'.self::$_nl;\n }", "public function getPicture($id, Request $request)\n {\n $set = Set::find($id);\n if ($set == null) {\n return response([\"error\" => \"Invalid ID was given.\"], 400);\n }\n $imageName = $set->set_image_name_final;\n $strURL = \"/images/cards/full/\" . (string)$imageName . \".jpg\";\n if (file_exists(public_path() . $strURL)) {\n $input = $request->all();\n if (array_key_exists('size', $input)) {\n if (!is_numeric($input['size'])) {\n return response([\"error\" => \"Size must be a numerical value.\"], 400);\n }\n $size = intval($input['size']);\n return Image::make(public_path() . $strURL)->resize($size, null, function($constraint){$constraint->aspectRatio();})->response('png');\n }\n return Image::make(public_path() . $strURL)->response('png');\n }\n return response([\"error\" => \"An error occurred.\"], 500);\n }", "function get_image_url( $id, $width=false, $height=false ) {\n\t\t\n\t\t/**/\n\t\t// Get attachment and resize but return attachment path (needs to return url)\n\t\t$attachment = wp_get_attachment_metadata( $id );\n\t\t$attachment_url = wp_get_attachment_url( $id );\n\t\tif (isset($attachment_url)) {\n\t\t\tif ($width && $height) {\n\t\t\t\t$uploads = wp_upload_dir();\n\t\t\t\t$imgpath = $uploads['basedir'].'/'.$attachment['file'];\n\t\t\t\terror_log($imgpath);\n\t\t\t\t$image = image_resize( $imgpath, $width, $height );\n\t\t\t\tif ( $image && !is_wp_error( $image ) ) {\n\t\t\t\t\terror_log( is_wp_error($image) );\n\t\t\t\t\t$image = path_join( dirname($attachment_url), basename($image) );\n\t\t\t\t} else {\n\t\t\t\t\t$image = $attachment_url;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$image = $attachment_url;\n\t\t\t}\n\t\t\tif (isset($image)) {\n\t\t\t\treturn $image;\n\t\t\t}\n\t\t}\n\t}", "public function getImageAttribute(): string\n {\n $gettyImage = new GettyImage($this->getty_image, 0);\n\n return $gettyImage->outputImage();\n }", "function getImg() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $episode_index = $f3->get('PARAMS.param2');\n $data = $tvdb->getSeries($series);\n\n if ($episode_index) {\n\t\t//if requesting episode image\n $chunks = explode(\",\", $episode_index);\n \t\t$season = $chunks[0]; //\techo \"Season \" . $season;\n \t\t$ep = $chunks[1]; //\t\techo \"Ep\" . $ep;\n \t\t$episode = $tvdb->getEpisode($data[0]->id, $season, $ep, 'en');\n\t\t echo $episode->thumbnail;\n } \n else {\n\t\t//if requesting show images\n $banner = $tvdb->getBanners($data[0]->id);\n $banner_j = json_encode($banner);\n echo $banner_j;\n }\n}", "public function getImageAttribute(): string\n {\n $gettyImage = new GettyImage($this->getty_image, 1);\n\n if ($this->getty_image == \"\") {\n return '<div class=\"noImage\"><i class=\"fa fa-user\"></i></div>';\n }\n else {\n return $gettyImage->outputImage();\n }\n }", "static function getImage($_objectId)\n {\n return Db::query(\"SELECT *\n FROM Images \n WHERE ImageObject = ?\", $_objectId);\n }", "function get()\r\n\t{\r\n\t\t// Get the properties from the URI\r\n\t\t$default = array('file','width','height','crop','quality','nocache');\r\n\t\t$uri_array = $this->uri->uri_to_assoc(3, $default);\r\n\r\n\t\tif( $uri_array['file'] == NULL)\r\n\t\t{\r\n\t\t\t// Don't continue\r\n\t\t\tlog_message(\"error\",\"BackendPro->Image->get : Badly formed image request string: \" . $this->uri->uri_string());\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Try to find the image\r\n\t\tforeach($this->config->item('image_folders') as $folder)\r\n\t\t{\r\n\t\t\tif ( file_exists($folder.$uri_array['file']))\r\n\t\t\t{\r\n\t\t\t\t$this->img_path = $folder.$uri_array['file'];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Image couldn't be found\r\n\t\tif ($this->img_path == NULL)\r\n\t\t{\r\n\t\t\tlog_message(\"error\",\"BackendPro->Image->get : Image dosn't exisit: \" . $uri_array['file']);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Get the size and MIME type of the requested image\r\n\t\t$size = GetImageSize($this->img_path);\r\n\t\t$width = $size[0];\r\n\t\t$height = $size[1];\r\n\r\n\t\t// Make sure that the requested file is actually an image\r\n\t\tif (substr($size['mime'], 0, 6) != 'image/')\r\n\t\t{\r\n\t\t\tlog_message(\"error\",\"BackendPro->Image->get : Requested file is not an accepted type: \" . $this->img_path);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Before we start to check for caches and alike, lets just see if the image\r\n\t\t// was requested with no changes, if so just return the normal image\r\n\t\tif( $uri_array['width'] == NULL AND $uri_array['height'] == NULL AND $uri_array['watermark'] == NULL AND $uri_array['crop'] == NULL AND $uri_array['quality'] == NULL)\r\n\t\t{\r\n\t\t\t$data\t= file_get_contents($this->img_path);\r\n\t\t\theader(\"Content-type:\". $size['mime']);\r\n\t\t\theader('Content-Length: ' . strlen($data));\r\n\t\t\tprint $data;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// We know we have to do something, so before we do lets see if there is\r\n\t\t// cache of the image already\r\n\t\tif( $uri_array['nocache'] == NULL)\r\n\t\t{\r\n\t\t\t// TODO: This should check to see if the image has changed since the last cache?\r\n\t\t\t$image_cache_string = $this->img_path . \" - \" . $uri_array['width'] . \"x\" . $uri_array['height'];\r\n\t\t\t$image_cache_string.= \"x\" . $uri_array['crop'] . \"x\" . $uri_array['quality'];\r\n\t\t\t$image_cache_string = md5($image_cache_string);\r\n\r\n\t\t\tif (file_exists($this->cache.$image_cache_string))\r\n\t\t\t{\r\n\t\t\t\t// Yes a cached image exists\r\n\t\t\t\t$data\t= file_get_contents($this->cache.$image_cache_string);\r\n\r\n\t\t\t\t// Before we output the image, does the local cache have the image?\r\n\t\t\t\t$this->_ConditionalGet($data);\r\n\r\n\t\t\t\theader(\"Content-type: \". $size['mime']);\r\n\t\t\t\theader('Content-Length: ' . strlen($data));\r\n\t\t\t\tprint $data;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// CROP IMAGE\r\n\t\t$offsetX = 0;\r\n\t\t$offsetY = 0;\r\n\t\tif( $uri_array['crop'] != NULL)\r\n\t\t{\r\n\t\t\t$crop = explode(':',$uri_array['crop']);\r\n\t\t\tif(count($crop) == 2)\r\n\t\t\t{\r\n\t\t\t\t$actualRatio = $width / $height;\r\n\t\t\t\t$requestedRatio = $crop[0] / $crop[1];\r\n\r\n\t\t\t\tif ($actualRatio < $requestedRatio)\r\n\t\t\t\t{ \t// Image is too tall so we will crop the top and bottom\r\n\t\t\t\t\t$origHeight\t= $height;\r\n\t\t\t\t\t$height\t\t= $width / $requestedRatio;\r\n\t\t\t\t\t$offsetY\t= ($origHeight - $height) / 2;\r\n\t\t\t\t}\r\n\t\t\t\telse if ($actualRatio > $requestedRatio)\r\n\t\t\t\t{ \t// Image is too wide so we will crop off the left and right sides\r\n\t\t\t\t\t$origWidth\t= $width;\r\n\t\t\t\t\t$width\t\t= $height * $requestedRatio;\r\n\t\t\t\t\t$offsetX\t= ($origWidth - $width) / 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// RESIZE\r\n\t\t$ratio = $width / $height;\r\n\t\t$new_width = $width;\r\n\t\t$new_height = $height;\r\n\t\tif( $uri_array['width'] != NULL AND $uri_array['height'] != NULL)\r\n\t\t{\r\n\t\t\t// Resize image to fit into both dimensions\r\n\t\t\t$new_ratio = $uri_array['width'] / $uri_array['height'];\r\n\t\t\tif($ratio > $new_ratio)\r\n\t\t\t{\r\n\t\t\t\t// Height is larger\r\n\t\t\t\t$uri_array['height'] = NULL;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Width is larger\r\n\t\t\t\t$uri_array['width'] = NULL;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( $uri_array['width'] == NULL AND $uri_array['height'] != NULL)\r\n\t\t{\t// Keep height ratio\r\n\t\t\t$new_height = $uri_array['height'];\r\n\t\t\t$new_width = $new_height * $ratio;\r\n\t\t}\r\n\t\telse if ( $uri_array['width'] != NULL AND $uri_array['height'] == NULL)\r\n\t\t{\t// Keep width ratio\r\n\t\t\t$new_width = $uri_array['width'];\r\n\t\t\t$new_height = $new_width / $ratio;\r\n\t\t}\r\n\r\n\t\t// QUALITY\r\n\t\t$quality = ($uri_array['quality'] != NULL) ? $uri_array['quality'] : $this->config->item('image_default_quality');\r\n\r\n\t\t$dst_image = imagecreatetruecolor($new_width, $new_height);\r\n\t\t$src_image = imagecreatefromjpeg($this->img_path);\r\n\t\timagecopyresampled($dst_image,$src_image,0, 0, $offsetX, $offsetY, $new_width, $new_height, $width, $height );\r\n\r\n\t\t// SAVE CACHE\r\n\t\tif( $uri_array['nocache'] == NULL)\r\n\t\t{\r\n\t\t\t// Make sure Cache dir is writable\r\n\t\t\t// INFO: This may be the source of the images sometimes not showing, seems some of the cache files can't be found\r\n\t\t\t// INFO: Since we are running this on a linux server its fine but this could cause issues http://codeigniter.com/forums/viewthread/94359/\r\n\t\t\tif ( !is_really_writable($this->cache))\r\n\t\t\t//if( !is_writable($this->cache))\r\n\t\t\t{\r\n\t\t\t\tlog_message('error',\"BackendPro->Image->get : Cache folder isn't writable: \" . $this->cache);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Write image to cache\r\n\t\t\t\timagejpeg($dst_image,$this->cache.$image_cache_string,$quality);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\theader(\"Content-type:\". $size['mime']);\r\n\t\timagejpeg($dst_image,NULL,$quality);\r\n\t}", "function img($image,$layout='')\n{\n return $image;\n}", "public function getImage($class = null)\n {\n $images = $this->images;\n\n if (! empty($class)) {\n $images = $images->where('class', $class);\n }\n \n return $images->first();\n }", "function LayoutGetImage($params=null) // must return string\n{\n global $DB, $sdurl, $userinfo, $plugin_names, $plugin_folder_to_id_arr;\n\n // Below are several security checks to assure, that the passed on plugin-id\n // is valid, the plugin and it's image path exist etc.\n if( !isset($params) || !is_array($params) || (count($params) < 1) ||\n (count($params) > 2) || empty($userinfo['pluginviewids']) )\n {\n return '';\n }\n $image_id = Is_Valid_Number($params[0], 0, 1);\n $plugin_id = 17; //default!\n $w = $h = 0;\n if(isset($params[1]))\n {\n if($p_arr = @preg_split('#,#',$params[1],0,PREG_SPLIT_NO_EMPTY))\n {\n $plugin_id = Is_Valid_Number($p_arr[0], 17, 1);\n $p_arr = array_slice($p_arr,1);\n foreach($p_arr as $p)\n {\n if($p2_arr = @preg_split('#=#',$p,0,PREG_SPLIT_NO_EMPTY))\n {\n if(($p2_arr[0]=='w') && isset($p2_arr[1])) $w = intval($p2_arr[1]);\n if(($p2_arr[0]=='h') && isset($p2_arr[1])) $h = intval($p2_arr[1]);\n }\n }\n\n }\n }\n\n // Sanity checks:\n if( ($image_id < 0) || !$plugin_id || !isset($plugin_names[$plugin_id]) ||\n !in_array($plugin_id, $userinfo['pluginviewids']) )\n {\n return '';\n }\n\n if(empty($image_id))\n {\n $image_id = ' ORDER BY RAND() LIMIT 1';\n }\n else\n {\n $image_id = ' AND i.imageid = '.(int)$image_id;\n }\n $columns = '';\n if($plugin_id >= 5000)\n {\n $columns= ', s.folder, s.access_view';\n }\n\n if(!$folder = array_search($plugin_id, $plugin_folder_to_id_arr)) return '';\n $folder = 'plugins/'.$folder.'/images/';\n if(!is_readable(ROOT_PATH.$folder)) return '';\n\n $sections = empty($userinfo['categoryviewids']) ? '0' : implode(',',$userinfo['categoryviewids']);\n $DB->ignore_error = true;\n $image_arr = $DB->query_first(\"SELECT i.* $columns FROM {p\".$plugin_id.'_images} i'.\n ' INNER JOIN {p'.$plugin_id.'_sections} s ON s.sectionid = i.sectionid'.\n ' WHERE i.activated = 1 AND s.activated = 1 '.\n ' AND s.sectionid IN (%s) %s',\n $sections, $image_id);\n $DB->ignore_error = false;\n\n if(!$image_arr || empty($image_arr['imageid']))\n {\n return 'Image not available!';\n }\n $imagetitle = htmlspecialchars($image_arr['title'], ENT_COMPAT);\n if(isset($image_arr['folder'])) $folder .= $image_arr['folder']; // Media Gallery subfolder support\n $img_md_exists = file_exists(ROOT_PATH.$folder . 'md_' . $image_arr['filename']);\n $image_path = $folder . ($img_md_exists ? 'md_' : '') . $image_arr['filename'];\n if(!$w || !$h)\n {\n list($w, $h, $type, $attr) = @getimagesize(ROOT_PATH.$image_path);\n }\n\n return '<img title=\"' . $imagetitle . '\" alt=\"image\" src=\"' .\n $sdurl. $image_path . '\" width=\"' . $w . '\" height=\"' . $h . '\" />';\n\n}", "function wprt_get_image( $args = array() ) {\n\t$default = array(\n\t\t'post_id' => get_the_ID(),\n\t\t'size' => 'thumbnail',\n\t\t'format' => 'html', // html or src\n\t\t'attr' => '',\n\t\t'meta_key' => '',\n\t\t'scan' => true,\n\t\t'default' => '',\n\t);\n\n\t$args = wp_parse_args( $args, $default );\n\n\tif ( ! $args['post_id'] )\n\t\t$args['post_id'] = get_the_ID();\n\n\t// Get image from cache\n\t$key = md5( serialize( $args ) );\n\t$image_cache = wp_cache_get( $args['post_id'], 'wprt_get_image' );\n\n\tif ( ! is_array( $image_cache ) )\n\t\t$image_cache = array();\n\n\tif ( empty( $image_cache[$key] ) ) {\n\t\t// Get post thumbnail\n\t\tif ( has_post_thumbnail( $args['post_id'] ) ) {\n\t\t\t$id = get_post_thumbnail_id();\n\t\t\t$html = wp_get_attachment_image( $id, $args['size'], false, $args['attr'] );\n\t\t\tlist( $src ) = wp_get_attachment_image_src( $id, $args['size'], false, $args['attr'] );\n\t\t}\n\n\t\t// Get the first image in the custom field\n\t\tif ( ! isset( $html, $src ) && $args['meta_key'] ) {\n\t\t\t$id = get_post_meta( $args['post_id'], $args['meta_key'], true );\n\n\t\t\t// Check if this post has attached images\n\t\t\tif ( $id ) {\n\t\t\t\t$html = wp_get_attachment_image( $id, $args['size'], false, $args['attr'] );\n\t\t\t\tlist( $src ) = wp_get_attachment_image_src( $id, $args['size'], false, $args['attr'] );\n\t\t\t}\n\t\t}\n\n\t\t// Get the first attached image\n\t\tif ( ! isset( $html, $src ) ) {\n\t\t\t$image_ids = array_keys( get_children( array(\n\t\t\t\t'post_parent' => $args['post_id'],\n\t\t\t\t'post_type'\t => 'attachment',\n\t\t\t\t'post_mime_type' => 'image',\n\t\t\t\t'orderby' => 'menu_order',\n\t\t\t\t'order'\t => 'ASC',\n\t\t\t) ) );\n\n\t\t\t// Check if this post has attached images\n\t\t\tif ( ! empty( $image_ids ) ) {\n\t\t\t\t$id = $image_ids[0];\n\t\t\t\t$html = wp_get_attachment_image( $id, $args['size'], false, $args['attr'] );\n\t\t\t\tlist( $src ) = wp_get_attachment_image_src( $id, $args['size'], false, $args['attr'] );\n\t\t\t}\n\t\t}\n\n\t\t// Get the first image in the post content\n\t\tif ( ! isset( $html, $src ) && ( $args['scan'] ) ) {\n\t\t\tpreg_match( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', get_post_field( 'post_content', $args['post_id'] ), $matches );\n\n\t\t\tif ( !empty( $matches ) ) {\n\t\t\t\t$html = $matches[0];\n\t\t\t\t$src = $matches[1];\n\t\t\t}\n\t\t}\n\n\t\t// Use default when nothing found\n\t\tif ( ! isset( $html, $src ) && !empty( $args['default'] ) ) {\n\t\t\tif ( is_array( $args['default'] ) ) {\n\t\t\t\t$html = $args['html'];\n\t\t\t\t$src = $args['src'];\n\t\t\t} else {\n\t\t\t\t$html = $src = $args['default'];\n\t\t\t}\n\t\t}\n\n\t\t// Still no images found?\n\t\tif ( ! isset( $html, $src ) )\n\t\t\treturn false;\n\n\t\t$output = 'html' === strtolower( $args['format'] ) ? $html : $src;\n\n\t\t$image_cache[$key] = $output;\n\t\twp_cache_set( $args['post_id'], $image_cache, 'wprt_get_image' );\n\t}\n\t// If image already cached\n\telse {\n\t\t$output = $image_cache[$key];\n\t}\n\n\t$output = apply_filters( 'wprt_get_image', $output, $args );\n\n\treturn $output;\n}", "public function image($id = null)\n {\n return new Resource\\Image($this, $id);\n }", "function image($img,$attribute = array()){\r\n\t\t$tmp = '';\r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\r\n\t\t$default = ''; $width = 0;\r\n\t\t$folder = ''; $height = 0;\r\n\r\n\t\t$att = array();\r\n\t\tif(isset($attribute['default'])){\r\n\t\t\t$att['default'] = $attribute['default'];\r\n\t\t\tunset($attribute['default']);\r\n\t\t}\r\n\t\tif(isset($attribute['folder'])){\r\n\t\t\t$att['folder'] = $attribute['folder'];\r\n\t\t\tunset($attribute['folder']);\r\n\t\t}\r\n\t\tif(isset($attribute['fixed'])){\r\n\t\t\t$att['fixed'] = $attribute['fixed'];\r\n\t\t\tunset($attribute['fixed']);\r\n\t\t}\r\n\t\tif(isset($attribute['absolute'])){\r\n\t\t\t$att['absolute'] = $attribute['absolute'];\r\n\t\t\tunset($attribute['absolute']);\r\n\t\t}\r\n\t\tif(isset($attribute['fullpath'])){\r\n\t\t\t$att['fullpath'] = $attribute['fullpath'];\r\n\t\t\tunset($attribute['fullpath']);\r\n\t\t}else{\r\n\t\t\t$att['fullpath'] = 'true';\r\n\t\t}\r\n\r\n\t\tBASIC::init()->imported('media.mod');\r\n\t\t$media = new BASIC_MEDIA($img, $att);\r\n\r\n\t\tif(isset($attribute['width'])) $width = $attribute['width'];\r\n\t\tif(isset($attribute['height'])) $height = $attribute['height'];\r\n\r\n\t\tif($media->info['type'] == 13 || $media->info['type'] == 4){\r\n\t\t\t$this->headSpecial('<!--[if IE]><script type=\"text/javascript\" src=\"'.BASIC::init()->ini_get('root_virtual').BASIC::init()->ini_get('basic_path').'scripts/flash/flash.js\" defer=\"defer\"></script><![endif]-->','Flash');\r\n\t\t}\r\n\t\treturn $media->view($width,$height,$attribute) . $tmp;\r\n\t}", "public function getImageAction()\n {\n $homebanner = $this->_getInitialBanner();\n $em = $this->getDoctrine()->getManager();\n $tagname = $homebanner->getName(); // Get image tag for home page banner slides\n\n $images = '';\n // TODO: add ability to use comma separated tags\n if (!empty($tagname)) {\n $images = $em->createQueryBuilder()\n ->select('bl')\n ->from('CmsXutBundle:Gist', 'bl')\n ->where('bl.type = :gisttype')\n ->setParameter('gisttype', 'image')\n ->addOrderBy('bl.date_created');\n\n $tag = $em->getRepository('CmsXutBundle:Tag')->findOneByName($tagname);\n if (count($tag) > 0) {\n $images = $images->innerJoin('bl.tags', 'tg')\n ->andWhere('tg.id = :tag')\n ->setParameter('tag', $tag->getId());\n\n $images = $images->getQuery()\n ->getResult();\n } else {\n $images = '';\n }\n }\n\n return $this->render('CmsHomeBannerBundle:Homebanner:images.html.twig', array(\n 'images' => $images,\n 'banner' => $homebanner\n ));\n }", "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "public function getImageDetails($id)\n {\n \tif(!$this->token)\n \t{\n \t\treturn parent::getImageDetails($id);\n \t}\n \t\n static $method = 'flickr.photos.getSizes';\n\n if (empty($id)) {\n /**\n * @see Zend_Service_Exception\n */\n require_once 'Zend/Service/Exception.php';\n throw new Zend_Service_Exception('You must supply a photo ID');\n }\n $options = array(\n \t'api_key' => $this->apiKey,\n \t'auth_token' => $this->token, \n \t'method' => $method, \n \t'photo_id' => $id\n );\n $options = $this->signOptions($this->secret, $options);\n\n $restClient = $this->getRestClient();\n $restClient->getHttpClient()->resetParameters();\n $response = $restClient->restGet('/services/rest/', $options);\n\n $dom = new DOMDocument();\n $dom->loadXML($response->getBody());\n $xpath = new DOMXPath($dom);\n self::_checkErrors($dom);\n $retval = array();\n /**\n * @see Zend_Service_Flickr_Image\n */\n require_once 'Zend/Service/Flickr/Image.php';\n foreach ($xpath->query('//size') as $size) {\n $label = (string) $size->getAttribute('label');\n $retval[$label] = new Zend_Service_Flickr_Image($size);\n }\n\n return $retval;\n }", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'height:'.$image[2].'px':'') : $image[0];\n }\n}", "public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}", "public function show($id)\n {\n //\n $image = Image::findOrFail($id);\n return view('image.show', compact('image'));\n }", "public function loadproductimagebyid($id){\n\t\t$this->db->where('Product_Id', $id);\n\t\t$query=$this->db->get('tbl_product_images');\n\t\treturn $query->result();\n\t}", "public function get_images_byID($id) {\n $sql = \"select * from advertisement_image where AdsID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->result();\n }", "public function imgShow($id)\n {\n $this->db->where('id', $id);\n $query1 = $this->db->from('job_ads')\n ->join('cities', 'cities.cityId=job_ads.cityId')\n ->join('paper', 'paper.paperId=job_ads.paperId')\n ->join('departments', 'departments.depttId=job_ads.depttId')\n ->join('categories', 'categories.catId=job_ads.catId')\n ->get();\n return $query1->row_array();\n }", "public function get_all_img_byID($id) {\n $sql = \"select * from advertisement_image where AdsID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->result();\n }", "public function getImageContent($imageid){\n $stmt = $this->con->prepare(\"SELECT image FROM list_student WHERE id = ?\");\n $stmt->bind_param(\"i\", $imageid);\n $stmt->execute();\n $stmt->bind_result($image);\n $stmt->fetch();\n return $image; \n }", "public function buscaImagen($id){\n if(empty($id))\n return '';\n \n $sql = \"Select imagen from item where id=:id\";\n\t\t$db = Yii::app()->getDb();\n\t\t$cmd = $db->createCommand($sql);\n\t\t$nombre = \"$id\";\n\t\t$cmd->bindParam(':id', $id);\n\t\treturn $cmd->queryAll();\n }", "public function getIcon($id, Request $request)\n {\n $set = Set::find($id);\n if ($set == null) {\n return response([\"error\" => \"Invalid ID was given.\"], 400);\n }\n $imageName = $set->set_image_name_final;\n $strURL = \"/images/cards/icon/\" . (string)$imageName . \".jpg\";\n if (file_exists(public_path() . $strURL)) {\n $input = $request->all();\n if (array_key_exists('size', $input)) {\n if (!is_numeric($input['size'])) {\n return response([\"error\" => \"Size must be a numerical value.\"], 400);\n }\n $size = intval($input['size']);\n return Image::make(public_path() . $strURL)->resize($size, null, function($constraint){$constraint->aspectRatio();})->response('png');\n }\n return Image::make(public_path() . $strURL)->response('png');\n }\n return response([\"error\" => \"An error occurred.\"], 500);\n }", "public function product_get_images_id($id)\n {\n \n $query = \"SELECT * FROM \" . $this->db_table_prefix. \"images where product_id = '\" . $id . \"' order by id DESC\";\n $result = $this->commonDatabaseAction($query);\n// if (mysql_num_rows($result) > 0)\n if ($this->rowCount > 0)\n {\n return $this->resultArray($result);\n }\n else\n {\n return null;\n }\n }", "function template_bits_bit_row_image( $id, $image ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<img id='img-item-{$id}' src='{$this->ipsclass->skin_acp_url}/images/{$image}' border='0' alt='' />\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function get_images($img_id, $image_sizes)\n{\n if ($image_sizes)\n foreach ($image_sizes as $size_name => $size) {\n $img = get_image($img_id, $size['w'], $size['h']);\n $image['url_' . $size_name] = $img['url'];\n $image['file_' . $size_name] = $img['filename'];\n }\n\n if (!$img)\n $img = get_image($img_id);\n \n $image['img_id'] = $img['id'];\n $image['name'] = $img['name'];\n $image['alt'] = $img['alt'];\n $image['title'] = $img['title'];\n $image['url'] = $img['url'];\n\n return $image;\n}", "public function photoShow($id)\n {\n //\n }", "public function view($imageId) {\n \n }", "public function getImageId()\n {\n return $this->imageid;\n }", "function get_featured_image( $id ) {\n\treturn wp_get_attachment_image_src( get_post_thumbnail_id( $id ), IMAGE_CAPTIONS_IMAGE_SIZE )[0];\n}", "public function getImage($imageId, $options = array())\n {\n list($config) = $this->parseOptions($options, 'config');\n if (empty($imageId)) {\n throw new \\InvalidArgumentException(\n 'request $imageId should not be empty.'\n );\n }\n\n return $this->sendRequest(\n HttpMethod::GET,\n array(\n 'config' => $config,\n ),\n '/image/' . $imageId\n );\n }", "public function image();", "public function image();", "public static function main() {\n\t\t$page = file_get_html('http://photography.nationalgeographic.com/photography/photo-of-the-day/nature-weather/');\n\t\t$link = $page->find('#search_results', 0)->find('a', 0)->href;\n\n\t\t$page = file_get_html('http://photography.nationalgeographic.com'.$link);\n\t\t$img = $page->find('meta[property=og:image]', 0)->content;\n\t\treturn $img;\n\t}", "function cc_get_attachment_image($id, $width) {\n if ($attachments = cc_get_attachment($id)) {\n foreach ($attachments as $attachment => $attachment_id) {\n $image = wp_get_attachment_image_src($attachment, full);\n \n // Check if the image is the requested width, and break if it is.\n if ($image[1] == $width) { break; }\n }\n }\n return $image;\n}", "public function get_image_link()\n {\n }", "public function getImage()\n {\n return $this->get('image');\n }", "function shortcode_user_avatar($atts, $content = null) {\nextract( shortcode_atts( \n array('id' => '0',), $atts \n ) \n );\n\nreturn get_avatar( $id, 96 ); // display the specific user_id's avatar\t\n }", "public function viewOne($image_id){\n $image = Image::find($image_id);\n \n if(empty($image)){\n return $this->jsonResponse(\"error\", \"Cannot find image\", Input::get('callback'));\n }\n \n return $this->jsonResponse(\"ok\", \"Image found\", Input::get('callback'), $image->first());\n }", "function get_attachment_icon($id = 0, $fullsize = \\false, $max_dims = \\false)\n {\n }", "function cbv_get_image_src( $id, $size = 'full' ){\n if( isset( $id ) ){\n $afbeelding = wp_get_attachment_image_src($id, $size, false );\n if( is_array( $afbeelding ) && isset( $afbeelding[0] ) ){\n return $afbeelding[0];\n }\n }\n return false;\n}", "public function getimagebykatid($id){\n $query = $this->db->table($this->table)\n ->where('kategori_id',$id)\n ->where('status_cd','normal')\n ->get();\n return $query;\n }", "public function show($id)\n\t{\n\t\t$frame = Frame::find($id);\n\n\t\t$response = Response::make($frame->image(), 200);\n\t\t$response->headers->set('Content-Type','image/jpeg');\n\t\treturn $response;\n\t}", "public function getImageid()\n {\n return $this->imageid;\n }", "public function load($id)\n\t{\n\t\treturn Image::model()->findByPk($id);\n\t}", "private function _getImageLink($id, $type)\n\t{\n\t\treturn _PS_BASE_URL_.__PS_BASE_URI__.'modules/'.$this->name.'/images/'.$id.'-'.$type.'.jpg';\n\t}" ]
[ "0.7104804", "0.6935665", "0.6839103", "0.67598784", "0.6744578", "0.6686752", "0.6667791", "0.6666223", "0.66611093", "0.66611093", "0.66611093", "0.66611093", "0.66453236", "0.6640188", "0.661659", "0.6579652", "0.6553719", "0.65091443", "0.6463857", "0.6458857", "0.64249694", "0.64224553", "0.64088035", "0.63942057", "0.63900065", "0.6383614", "0.636492", "0.6361662", "0.6358663", "0.6327719", "0.6319735", "0.6316518", "0.62777877", "0.6221705", "0.6220605", "0.6220058", "0.62106776", "0.6176904", "0.6161019", "0.6113204", "0.610384", "0.610384", "0.60953426", "0.60671395", "0.6042406", "0.6030996", "0.60220706", "0.6021186", "0.6015716", "0.60030514", "0.6002156", "0.59968114", "0.59882975", "0.59521186", "0.5945583", "0.5937965", "0.59229577", "0.59223026", "0.58902293", "0.5889516", "0.5883504", "0.58834964", "0.5870727", "0.58660626", "0.5860174", "0.58493423", "0.5839306", "0.5837365", "0.5836987", "0.58308154", "0.58302724", "0.5828204", "0.581891", "0.58184206", "0.5814802", "0.5805648", "0.58051527", "0.5804088", "0.5801803", "0.57956284", "0.57915205", "0.5790059", "0.5789457", "0.57839686", "0.578364", "0.578108", "0.5770463", "0.5770463", "0.5766336", "0.5766255", "0.575905", "0.5756719", "0.5746225", "0.57447124", "0.5737952", "0.57377195", "0.5729345", "0.5718927", "0.57119673", "0.5699598", "0.5697453" ]
0.0
-1
Get environment var by short key usage: [env APP_ENV] will get the APP_ENV environment variable and return it
public function getEnvShortCode($attributes) { if ($attributes) { return env($attributes[0], $attributes[0]); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function env($key = null)\n{\n if (!isset($GLOBALS['configs']))\n $GLOBALS['configs'] = json_decode(file_get_contents($GLOBALS['config_path'] . DIRECTORY_SEPARATOR . 'env.json'));\n\n if (!is_null($key) && isset($GLOBALS['configs']->$key))\n return $GLOBALS['configs']->$key;\n elseif (is_null($key) && isset($GLOBALS['configs']))\n return $GLOBALS['configs'];\n else\n Throw new \\Atom\\Environment\\EnvironmentException(\"Environment variable \" . $key . \" not found.\");\n}", "function get_environment(): string {\n return getenv('APP_ENV') ?\n getenv('APP_ENV') : 'default';\n}", "public static function getEnvVariable($key) \n {\n // TODO - Check for other methods of getting env variables\n return getenv($key);\n }", "public static function get()\n\t{\n\t\t// then return content of APPLICATION_ENV\n\t\t// else return \"development\"\n\t\treturn (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : \"development\");\n\t}", "function env($key)\n {\n if(!is_string($key)) {\n throw new \\InvalidArgumentException(\"Please provide string argument.\");\n }\n\n $json = file_get_contents('env.json');\n $data = (array) json_decode($json);\n\n if(!array_key_exists($key, $data)) {\n throw new \\ErrorException(\"The given key not match with any.\");\n }\n\n return $data[$key];\n }", "public static function readEnv($key)\n {\n return self::$environment[$key];\n }", "function gocardless_env($key = '')\n {\n $config = config('gocardless');\n $env = config('gocardless.environment');\n if (empty($env) && empty($config['environments'][$env])) {\n return null;\n }\n if (empty($key) && ! empty($config['environments'][$env])) {\n return $config['environments'][$env];\n }\n if (array_key_exists($env, $config['environments'])) {\n return $config['environments'][$env][$key];\n }\n return null;\n }", "function env($key, $default = NULL)\n\t{\n\t\treturn Env::get($key, $default);\n\t}", "function env(?string $key = null, $default = null)\n{\n return array_get($_SERVER, $key, $default);\n}", "function env_get( $variable ){\n\t\t// not this function!\n\t\t$data = file_get_contents( 'env/env.json' );\n\t\t$json = json_decode( $data, true );\n\t\treturn $json[ $variable ];\n\t}", "function env(string $key, $default = null)\n{\n return Env::get($key, $default);\n}", "function env($name)\n{\n return Env::get($name);\n}", "public function getEnv():string\n {\n return $this->env;\n }", "public function env($key = null);", "function env(string $name, mixed $default = null, bool $server = true): mixed\n{\n return System::envGet($name, $default, $server);\n}", "private static function getEnvKey($string)\n {\n preg_match('~%env\\((.*?)\\)%~', $string, $matches);\n\n return (count($matches) > 0) ? $matches[1] : null;\n }", "public static function env($key,$raw=false)\n\t{\n\t\tif(!empty($_ENV[$key]))\n\t\t\t$value = $_ENV[$key];\n\t\telse\n\t\t\t$value = @getenv($key);\n\t\treturn ($raw) ? $value : self::clear_value($value);\n\t}", "function env($key, $default = null)\n {\n if(isset($_ENV[$key]))\n return $_ENV[$key];\n\n return $default;\n }", "function env(string $key = null, mixed $or = null)\n{\n return Env::env($key, $or);\n}", "public function get_env()\n {\n return $this->env;\n }", "function getEnvValue($name)\n{\n return $_ENV[$name] ?? getenv($name);\n}", "function env($key, $default = null)\n{\n $value = getenv($key);\n if ($value === false) {\n return value($default);\n }\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n return $value;\n}", "function env($str){\n\treturn (getenv($str))?:$_SERVER[$str]; // generate library path:\n}", "function env($key, $default = null)\n {\n $value = getenv($key);\n if ($value === false) {\n return value($default);\n }\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n if (strlen($value) > 1 && Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n return $value;\n }", "function env($key) {\n\n\t\tif ($key == 'HTTPS') {\n\t\t\tif (isset($_SERVER) && !empty($_SERVER)) {\n\t\t\t\treturn (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');\n\t\t\t} else {\n\t\t\t\treturn (strpos(env('SCRIPT_URI'), 'https://') === 0);\n\t\t\t}\n\t\t}\n\n\t\tif ($key == 'SCRIPT_NAME') {\n\t\t\tif (env('CGI_MODE')) {\n\t\t\t\t$key = 'SCRIPT_URL';\n\t\t\t}\n\t\t}\n\n\t\t$val = null;\n\t\tif (isset($_SERVER[$key])) {\n\t\t\t$val = $_SERVER[$key];\n\t\t} elseif (isset($_ENV[$key])) {\n\t\t\t$val = $_ENV[$key];\n\t\t} elseif (getenv($key) !== false) {\n\t\t\t$val = getenv($key);\n\t\t}\n\n\t\tif ($key == 'REMOTE_ADDR' && $val == env('SERVER_ADDR')) {\n\t\t\t$addr = env('HTTP_PC_REMOTE_ADDR');\n\t\t\tif ($addr != null) {\n\t\t\t\t$val = $addr;\n\t\t\t}\n\t\t}\n\n\t\tif ($val !== null) {\n\t\t\treturn $val;\n\t\t}\n\n\t\tswitch ($key) {\n\t\t\tcase 'DOCUMENT_ROOT':\n\t\t\t\t$offset = 0;\n\t\t\t\tif (!strpos(env('SCRIPT_NAME'), '.php')) {\n\t\t\t\t\t$offset = 4;\n\t\t\t\t}\n\t\t\t\treturn substr(env('SCRIPT_FILENAME'), 0, strlen(env('SCRIPT_FILENAME')) - (strlen(env('SCRIPT_NAME')) + $offset));\n\t\t\tbreak;\n\t\t\tcase 'PHP_SELF':\n\t\t\t\treturn r(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));\n\t\t\tbreak;\n\t\t\tcase 'CGI_MODE':\n\t\t\t\treturn (substr(php_sapi_name(), 0, 3) == 'cgi');\n\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (strlen($value) > 1 && startsWith($value, '\"') && endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env(string $key, $default = null)\n {\n switch (true) {\n case isset($_SERVER[$key]):\n $value = $_SERVER[$key];\n break;\n case isset($_ENV[$key]):\n $value = $_ENV[$key];\n break;\n case (function_exists('apache_getenv') && apache_getenv($key) !== false):\n $value = apache_getenv($key);\n break;\n default:\n $value = getenv($key);\n break;\n }\n if ($value === false) {\n return $default;\n }\n return value($value);\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (strlen($value) > 1 && Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n if ($value === false) return value($default);\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n return $value;\n }", "public function getEnv($name);", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n\n case 'false':\n case '(false)':\n return false;\n\n case 'empty':\n case '(empty)':\n return '';\n\n case 'null':\n case '(null)':\n return;\n }\n\n if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n if (class_exists(IlluminateEnv::class)) {\n return IlluminateEnv::get($key, $default);\n }\n\n return Env::get($key, $default);\n }", "public static function getEnvironmentVariable($key, $default)\n\t{\n\t\tif (false !== ($val = getenv('env.' . $key))) {\n\t\t\treturn $val;\n\t\t}\n\n\t\tif (false !== ($val = getenv($key))) {\n\t\t\treturn $val;\n\t\t}\n\n\t\t// none defined\n\t\treturn $default;\n\t}", "public function getEnvironmentKey(string $key)\n {\n return self::$defaultEnv[$key] ?? null;\n }", "protected function getEnvironmentVariable($key)\n {\n return GeneralUtility::getIndpEnv($key);\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n\n case 'false':\n case '(false)':\n return false;\n\n case 'empty':\n case '(empty)':\n return '';\n\n case 'null':\n case '(null)':\n return;\n }\n\n if ($value[0] === '\"' && $value[count($value) - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "public function getEnv()\n {\n return $this->env;\n }", "public function getEnv()\n {\n return $this->env;\n }", "public function getEnv() {\n\t\treturn APPLICATION_ENV;\n\t}", "function my_getenv($key)\n {\n\t $return = array();\n\t \n\t if ( is_array( $_SERVER ) AND count( $_SERVER ) )\n\t {\n\t\t if( isset( $_SERVER[$key] ) )\n\t\t {\n\t\t\t $return = $_SERVER[$key];\n\t\t }\n\t }\n\t \n\t if ( ! $return )\n\t {\n\t\t $return = getenv($key);\n\t }\n\t \n\t return $return;\n }", "function getEnvironment() {\n return Environment::env();\n}", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false && isset($_ENV[$key])) {\n $value = $_ENV[$key];\n }\n\n if ($value === false) {\n return $default;\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n $strLen = strlen($value);\n\n if ($strLen > 1 && $value[0] === '\"' && $value[$strLen - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return $default;\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return;\n }\n\n if (substr($value, 0, 1) === '\"' && substr($value, strlen($value), -1) === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "function getEnvironment(){ return $_ENV['CURRENT_ENVIRONMENT']; }", "function env($key, $default = null)\n\t{\n\t\t$value = getenv($key);\n\t\t\n\t\tif ($value === false && array_key_exists($key, $_ENV)) $value = $_ENV[$key];\n\t\tif ($value === false) return value($default);\n\n\t\tswitch (strtolower($value))\n\t\t{\n\t\t\tcase 'true':\n\t\t\tcase '(true)':\n\t\t\t\treturn true;\n\n\t\t\tcase 'false':\n\t\t\tcase '(false)':\n\t\t\t\treturn false;\n\n\t\t\tcase 'empty':\n\t\t\tcase '(empty)':\n\t\t\t\treturn '';\n\n\t\t\tcase 'null':\n\t\t\tcase '(null)':\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Str::startsWith($value, '\"') && Str::endsWith($value, '\"'))\n\t\t{\n\t\t\treturn substr($value, 1, -1);\n\t\t}\n\n\t\treturn $value;\n\t}", "private static function getEnvironmentForVariables($var=array(),$environment=null)\r\n {\r\n //environment variable specified by the variable is checked in the defined file\r\n //and the value is returned accordingly.\r\n return $environment[$var[0]] ?? $var[1];\r\n }", "private static function getEnvVariable($name)\n {\n if (array_key_exists($name, $_SERVER)) {\n return $_SERVER[$name];\n }\n\n if (array_key_exists($name, $_ENV)) {\n return $_ENV[$name];\n }\n\n $value = getenv($name);\n\n return $value === false ? null : $value;\n }", "public function env($key, $default = false)\n {\n if (isset($_ENV[$key])) {\n return $_ENV[$key];\n }\n return $default;\n }", "public function environment()\n {\n return \\Config::get('app')['env'];\n }", "public static function get($key)\n {\n if (!empty($key)) {\n if (strpos($key, 'server.') === 0) {\n $varName = substr($key, 7);\n return isset($_SERVER[$varName]) ? $_SERVER[$varName] : '';\n } elseif (strpos($key, 'env.') === 0) {\n $varName = substr($key, 4);\n $value = getenv($varName);\n return ($value !== false) ? $value : '';\n } else {\n return isset(self::$map[$key]) ? self::$map[$key] : '';\n }\n }\n return '';\n }", "public function getEnv($key = null, $default = null)\n {\n if (null === $key) {\n return $_ENV;\n }\n\n return (isset($_ENV[$key])) ? $_ENV[$key] : $default;\n }", "public function env($val)\n\t{\n\t\treturn env($val);\n\t}", "public function get($key, $default = '')\n {\n if (!is_null($this->_env)) {\n $env = ($this->has($key)) ? getenv($key) : var_export($default, true);\n\n switch ($env) {\n case 'true':\n return true;\n case 'false':\n return false;\n default:\n return $env;\n }\n }\n\n return var_export($default, true);\n }", "function env( string $key, $default = '' ) { // phpcs:ignore NeutronStandard.Functions.TypeHint.NoArgumentType, NeutronStandard.Functions.TypeHint.NoReturnType, Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound\n\t$value = $_ENV[ $key ] ?? $default;\n\n\t// Return bool value for 'true' or 'false'.\n\tswitch ( $value ) {\n\t\tcase 'true':\n\t\t\treturn true;\n\t\tcase 'false':\n\t\t\treturn false;\n\t}\n\n\treturn $value;\n}", "public function getEnvironmentVariable($name)\n\t{\n\t\tswitch (true) {\n\t\t\tcase array_key_exists($name, $_ENV):\n\t\t\t\treturn $_ENV[$name];\n\t\t\tcase array_key_exists($name, $_SERVER):\n\t\t\t\treturn $_SERVER[$name];\n\t\t\tdefault:\n\t\t\t\t$environment = getenv($name);\n\t\t\t\treturn (!$environment) ? null : $environment;\n\t\t}\n\t}", "protected function getCurrentEnv() {\n if (empty($this->env)) {\n $this->env = shell_exec('echo -n $'.self::ENV_VARIABLE_NAME);\n }\n return $this->env;\n }", "public static function envVarKey($var = null)\n {\n // Value not set. Return the .htaccess environment var\n if (is_null($var)) {\n return self::$htaccess_env;\n }\n\n // Value set. If it is not empty, set it. Otherwise, skip it\n if (!empty($var)) {\n self::$htaccess_env = $var;\n }\n\n return self::$htaccess_env;\n }", "function environment($key = null, $default = null)\n {\n /** @var \\Phanda\\Environment\\Repository $environment */\n $environment = phanda('environment');\n\n if (is_null($key)) {\n return $environment;\n }\n\n if (is_array($key)) {\n $environment->set($key);\n return null;\n }\n\n $value = $environment->get($key, $default);\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "public function getEnv()\n {\n return self::$environment;\n }", "function derive_environment()\n{\n $envname = 'crm'; // Assume prod environment for now.\n $env_shortname = strrchr(BASE_DIR, '_');\n if ($env_shortname !== false) {\n $env_shortname = substr($env_shortname, 1);\n if ($env_shortname != 'prod') {\n $envname = \"crm$env_shortname\";\n }\n }\n return $envname;\n}", "function get_http_env(): ?string\n {\n if ( ! \\defined( 'HTTP_ENV_CONFIG' ) ) {\n return null;\n }\n\n return strtoupper( HTTP_ENV_CONFIG );\n }", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "private static function loadEnvSettings()\n {\n require_once self::$envPath;\n return $env;\n }", "public function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return $this->value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n case '(false)':\n return false;\n case 'empty':\n case '(empty)':\n return '';\n case 'null':\n case '(null)':\n return null;\n }\n\n if (($valueLength = strlen($value)) > 1 && $value[0] === '\"' && $value[$valueLength - 1] === '\"') {\n return substr($value, 1, -1);\n }\n\n return $value;\n }", "protected function getEnvironment($paramName){\n\t\t$funcGetArgs = func_get_args();\n\t\treturn call_user_func_array(array($this->getRequestInstance(), 'getParamEnv'), $funcGetArgs);\n\t}", "function menv($key, $default = null)\n {\n $value = env($key);\n if(!is_null($value)){\n return $value;\n }elseif (isset($_ENV[$key])) {\n $value = $_ENV[$key];\n } elseif (isset($_SERVER[$key])) {\n $value = $_SERVER[$key];\n }\n return is_null($value) ? value($default) : $value;\n }", "public static function env()\n {\n return self::context()->env();\n }", "function env($envString, $defaultVariable = \"\") {\n\tif (! getenv($envString)) {\n\t\treturn $defaultVariable;\n\t}\n\treturn getenv($envString);\n}", "function env($key, $default = '')\n {\n static $variables;\n\n //TODO: Changes flag in env to reload its value.\n\n if ($variables === null) {\n $variables = Dotenv::createImmutable(base_directory());\n $variables->safeLoad();\n }\n\n return (!empty(getenv($key)) && getenv($key) != '') ? getenv($key) : $default;\n }", "public function getEnvironment($name);", "public function environment()\n {\n return $this->env;\n }", "function apache_getenv($variable, $walk_to_top = false)\n{\n}", "function env() {\n if (defined('WP_ENV')) {\n return WP_ENV;\n } else {\n define('WP_ENV', getenv('WP_ENV') ?? 'production');\n }\n return WP_ENV;\n}", "public function getEnvironment()\n {\n return $this->getConfigData('environment');\n }", "public static function getEnv(string $name)\n {\n if (array_key_exists($name, $_SERVER)) {\n return (string) $_SERVER[$name];\n }\n if (array_key_exists($name, $_ENV)) {\n return (string) $_ENV[$name];\n }\n\n return getenv($name);\n }", "public static function GetEnv(string $envSection , string $key): mixed{\n $content = self::Load();\n try {\n if(array_key_exists($key,$content[$envSection])){\n return $content[$envSection][$key];\n } \n }catch (Exception ){\n throw new Exception(\"Evironment $envSection dosen't exist in file env.json\");\n }\n throw new Exception(\"Evironment $envSection dosen't have key '$key' in file env.json\");\n }", "public function getEnvironment()\n {\n return $this->config['environment'];\n }", "public function getEnvironment()\n {\n return $this->getConfig('environment');\n }", "public static function getEnv()\n {\n //($s = yaml_parse_file(\"/var/www/app.env\")) || die(\"YAML file not found\");\n //var_dump($s);\n //$thing = file_get_contents(\"/var/www/app.env\");\n //$data = Spyc::YAMLLoad('../spyc-0.6.1/spyc.yaml');\n return yaml_parse_file(\"/var/www/app.env\");\n }", "public static function environment() {\n\t\treturn env('HORIZON_MODE');\n\t}", "function getenv_docker($env, $default) {\n if ($fileEnv = getenv($env . '_FILE')) {\n return rtrim(file_get_contents($fileEnv), \"\\r\\n\");\n }\n else if (($val = getenv($env)) !== false) {\n return $val;\n }\n else {\n return $default;\n }\n}", "function getEnvVar(string $name, string $fallback = null, array $valid_values = null) {\n $value = getenv($name);\n $required = $fallback === null;\n\n if ($value === false && $required) {\n print(\"⚠️ Required environment variable '$name' is not set!\" . PHP_EOL);\n exit(1);\n }\n\n if (!$value && $fallback !== null) {\n $value = $fallback;\n print(\"ℹ️ Environment variable '$name' is not set, using fallback '$fallback'\" . PHP_EOL);\n }\n\n if ($valid_values != null && !in_array($value, $valid_values)) {\n print(\"⚠️ Environment variable '$name' has invalid value\");\n exit(1);\n }\n\n return $value;\n}", "public function testEnvVar() {\n putenv('LING_ENV=dev');\n $this->assertSame(env('env.LING_ENV'), 'dev');\n }", "public static function getEnvironment() {\n return self::whichEnv();\n }", "public static function env()\n {\n return function () {\n return getenv(self::ENV_APIKEY);\n };\n }", "public static function env()\n {\n return function () {\n return getenv(self::ENV_APIKEY);\n };\n }", "public function environment() : string\n {\n return $this->environment;\n }", "function envvalue($name, $default)\n{\n $value = getenv($name);\n return $value == false ? $default : $value;\n}", "public function getEnv($variable)\n\t{\n\t\tif (!isset($this->_env[$variable])) {\n\t\t\tloadClass('Logger')->error('Docker environment variable not found: '.$variable);\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->_env[$variable];\n\t}", "function config($key, $default = null)\n {\n $output = $default;\n\n $cmd = '$output = $_ENV[\\''. str_replace('.', '\\'][\\'', $key). '\\'];';\n\n eval($cmd);\n\n return $output;\n }", "public static function getEnv($name,$default = null) {\n\t if(isset($_ENV[$name])) {\n $value = trim($_ENV[$name]);\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n\t return true;\n\t case 'false':\n\t case '(false)':\n\t return false;\n\t case 'empty':\n\t case '(empty)':\n\t return '';\n\t case 'null':\n\t case '(null)':\n\t return;\n\t }\n\n\t if (Str::startsWith($value, '\"') && Str::endsWith($value, '\"')) {\n\t $value = substr($value, 1, -1);\n\t }\n\n\t return $value;\n\t }\n\t return $default;\n\t}", "public function getLabel(): string\n {\n return 'ENV variables';\n }", "function env( string $name, $default = null, bool $strtolower = false )\n {\n if ( ! isset( $_ENV[ $name ] ) ) {\n return $default;\n }\n\n if ( is_int_val( $_ENV[ $name ] ) ) {\n return (int) $_ENV[ $name ];\n }\n\n if ( \\in_array( $_ENV[ $name ], [ 'True', 'true', 'TRUE' ], true ) ) {\n return true;\n }\n if ( \\in_array( $_ENV[ $name ], [ 'False', 'false', 'FALSE' ], true ) ) {\n return false;\n }\n if ( \\in_array( $_ENV[ $name ], [ 'Null', 'null', 'NULL' ], true ) ) {\n return '';\n }\n\n if ( $strtolower ) {\n return strtolower( $_ENV[ $name ] );\n }\n\n return $_ENV[ $name ];\n }", "public function getEnvironment() {\n\n return trim($this->environment);\n }" ]
[ "0.72921985", "0.7256407", "0.7096181", "0.7038018", "0.69798934", "0.6937763", "0.69366926", "0.69218016", "0.6919505", "0.6861253", "0.68130076", "0.68105924", "0.6783765", "0.67084414", "0.6689476", "0.66790086", "0.66522956", "0.66488606", "0.6618874", "0.65932304", "0.6564968", "0.6529182", "0.6494342", "0.64642465", "0.6461195", "0.6450899", "0.6434465", "0.6429936", "0.6428719", "0.64283", "0.6422214", "0.64212376", "0.639734", "0.6395251", "0.6390345", "0.6389383", "0.6388424", "0.63813525", "0.63813525", "0.6376884", "0.6362301", "0.6362099", "0.6361393", "0.63608223", "0.6356809", "0.6335586", "0.6325135", "0.63053584", "0.6302089", "0.6279187", "0.62715095", "0.6250337", "0.6233309", "0.6180565", "0.6180057", "0.61749065", "0.6173808", "0.6160521", "0.6145958", "0.6139973", "0.61329067", "0.61194575", "0.6107343", "0.6107343", "0.6107343", "0.6107343", "0.6107343", "0.6107343", "0.6074142", "0.6049401", "0.6041906", "0.60397947", "0.60370255", "0.6020154", "0.6018457", "0.59897107", "0.59791535", "0.59619546", "0.59312284", "0.5918522", "0.58995515", "0.5894588", "0.58850944", "0.58812904", "0.58804435", "0.5873975", "0.5867569", "0.58445007", "0.5821281", "0.5788515", "0.5767784", "0.5767784", "0.57479644", "0.57405776", "0.5736968", "0.5736953", "0.5733716", "0.5708491", "0.5699713", "0.5699163" ]
0.615748
58
Execute the console command.
public function handle() { //dd(QueueWorker::listActiveQueueWorkers()); $urlPattern = 'http://www1.vinci.com.br/assets/website/images/wine_seals/decanter%s'; exec('ls -la public/assets/website/images/wine_seals/decanter | grep .png', $output); $lines = collect($output); $lines->transform(function($line) use ($urlPattern) { $segments = explode(' ', $line); $imgName = end($segments); return sprintf($urlPattern, $imgName); }); foreach ($lines as $line) { file_put_contents(storage_path('app/seals.txt'), $line . PHP_EOL, FILE_APPEND); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Astronomy Picture of the Day
public function astronomy(): RequestResponse { return static::send('astronomy'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pictures_erotica_anime()\n\t{\n\t\tif (preg_match('/(.*)\\s+-\\s+\\d+\\s+of\\s+\\d+\\s+-\\s+yEnc\\s+\".*\"/i', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public static function main() {\n\t\t$page = file_get_html('http://photography.nationalgeographic.com/photography/photo-of-the-day/nature-weather/');\n\t\t$link = $page->find('#search_results', 0)->find('a', 0)->href;\n\n\t\t$page = file_get_html('http://photography.nationalgeographic.com'.$link);\n\t\t$img = $page->find('meta[property=og:image]', 0)->content;\n\t\treturn $img;\n\t}", "public function createImage1(){\n $this->createHexagon(150,75, 50, 200, 150, 325, 275, 325, 350,200, 275, 75);\n $this->createCircle(200, 200, 200, 200, 0, 360);\n $this->createLine(200, 125, 125, 200);\n $this->createLine(200, 125, 275, 200);\n $this->createLine(125, 200, 200, 275);\n $this->createLine(275, 200, 200, 275);\n $this->generateImage();\n }", "function altlab_timeline_featured_image($entry, $form){\n $timeline_type = rgar($entry, '3');//entry field ID is 3\n if ($timeline_type == 'First computer I owned' ){//response\n $img_id = 6895;//id of image in wp media library\n }\n if ($timeline_type == 'First time online'){\n $img_id = 6899;\n }\n if ($timeline_type == 'First email'){\n $img_id = 6900;\n }\n if ($timeline_type == 'First cell phone'){\n $img_id = 6898;\n }\n \n set_post_thumbnail( $entry['post_id'], $img_id );\n}", "function getImg() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $episode_index = $f3->get('PARAMS.param2');\n $data = $tvdb->getSeries($series);\n\n if ($episode_index) {\n\t\t//if requesting episode image\n $chunks = explode(\",\", $episode_index);\n \t\t$season = $chunks[0]; //\techo \"Season \" . $season;\n \t\t$ep = $chunks[1]; //\t\techo \"Ep\" . $ep;\n \t\t$episode = $tvdb->getEpisode($data[0]->id, $season, $ep, 'en');\n\t\t echo $episode->thumbnail;\n } \n else {\n\t\t//if requesting show images\n $banner = $tvdb->getBanners($data[0]->id);\n $banner_j = json_encode($banner);\n echo $banner_j;\n }\n}", "function main_image_alma() {\n\talma_get_first_image( 'portfolio-thumbnail' );\n}", "public function image();", "public function image();", "public function getOpengraphImage();", "protected function imageName() {}", "function logo ()\n {\n global $connection;\n $sql = \"SELECT * FROM slike_logo sl ORDER BY sl.putanja_logo DESC LIMIT 0,1\";\n $sum = $connection->query($sql)->fetchAll();\n foreach($sum as $item) :\n echo \"<a href='index.php?page=pocetna'><img src=$item->putanja_logo alt=$item->ime_slike title='NanoSoft DeLux' width='177' height='106'/></a>\";\n endforeach;\n }", "private function getBuildingAnimation(){\n $img = NULL;\n\n $building = $this->getBuilding();\n \n if ($building){\n if (!strcmp(\"factory\", $building)) {\n $image = \"img/smoke2.png\";\n }\n }\n\n return $image;\n }", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "static function getInfo($day) {\n\t\tif (Advent::acceptDay($day) && Advent::isActiveDay($day)) {\n\t\t\t$result['url'] = '?'.URL_PHOTO.'='.$day;\n\n\t\t\t$extensions = ['jpg', 'jpeg', 'png', 'gif'];\n\t\t\tforeach ($extensions as $extension) {\n\t\t\t\t$file = PRIVATE_FOLDER.'/'.$day.'.'.$extension;\n\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t$result['type'] = self::getMimeType($extension);\n\t\t\t\t\t$result['path'] = $file;\n\t\t\t\t\t$result['extension'] = $extension;\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// nothing found, default image\n\t\t\t$result['type'] = 'image/png';\n\t\t\t$result['path'] = './assets/img/404.png';\n\t\t\t$result['extension'] = 'png';\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn NULL;\n\t}", "public function get_image_title()\n {\n }", "public function createImage2(){\n $this->createCircle(100, 100, 50, 50, 0, 360);\n $this->createCircle(400, 100, 50, 50, 0, 360);\n $this->createCircle(110, 200, 50, 50, 0, 360);\n $this->createCircle(250, 300, 50, 50, 0, 360);\n $this->createCircle(390, 200, 50, 50, 0, 360);\n $this->createLine(125, 100, 375, 100);\n $this->createLine(100, 125, 100, 175);\n $this->createLine(400, 125, 400, 175);\n $this->createLine(125, 220, 225, 300);\n $this->createLine(275, 300, 375, 220);\n $this->generateImage();\n }", "function feeling($type){\r\n global $lang;\r\n return \"<img src='images/feeling/\".$type.\".gif' border='0' title='\".$lang[$type].\"'>\";\r\n}", "public function picture(){\n }", "public function get_description()\n {\n return 'Populate your image of the day gallery with 40 LOLCAT images. After installing the addon select the image of the day in the usual way by going to Admin zone > Content > Images of the day and select the image you want to display.';\n }", "function imgrace($id)\n{\nif ($id == 1)\n{\necho \"<img src=\\\"images/races/1-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 2)\n{\necho \"<img src=\\\"images/races/2-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 3)\n{\necho \"<img src=\\\"images/races/3-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 4)\n{\necho \"<img src=\\\"images/races/4-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 5)\n{\necho \"<img src=\\\"images/races/5-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 6)\n{\necho \"<img src=\\\"images/races/6-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 7)\n{\necho \"<img src=\\\"images/races/7-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 8)\n{\necho \"<img src=\\\"images/races/8-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 9)\n{\necho \"<img src=\\\"images/races/9-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 10)\n{\necho \"<img src=\\\"images/races/10-0.gif\\\" alt=\\\"\\\">\";\n}\nelseif ($id == 11)\n{\necho \"<img src=\\\"images/races/11-0.gif\\\" alt=\\\"\\\">\";\n}\n}", "function cpl_wra() {\n\t//You May NOT Edit It!\n\techo \"<img src='http://www.auburnflame.com/brk1.gif'>\";\n}", "public function aparecer() {\n // Referencia al objeto dentro de la clase\n echo '<img src=\"' . $this -> foto . '\">';\n\n }", "function get_icon($ending)\n{\n\tswitch($ending)\n\t{\n\t\tcase '.avi':\n\t\tcase 'mpeg':\n\t\tcase '.mpg':\n\t\tcase 'divx':\n\t\tcase '.mkv':\n\t\tcase '.ogm':\n\t\tcase '.mp4':\n\t\tcase '.wmv':\n\t\tcase '.vob':\n\t\tcase '.flv':\n\t\t\t$img = 'movie.png';\n\t\t\tbreak;\n\t\tcase '.pdf':\n\t\tcase '.dvi':\n\t\t\t$img = 'acroread.png';\n\t\t\tbreak;\n\t\tcase '.doc':\n\t\tcase 'docx':\n\t\tcase '.xls':\n\t\tcase 'xlsx':\n\t\tcase '.pps':\n\t\tcase 'ppsx':\n\t\tcase '.odt':\n\t\tcase '.odp':\n\t\tcase '.odx':\n\t\t\t$img = 'office.png';\n\t\t\tbreak;\n\t\tcase '.mp3':\n\t\tcase '.wma':\n\t\tcase '.aac':\n\t\tcase '.ogg':\n\t\tcase 'flac':\n\t\t\t$img = 'audio.png';\n\t\t\tbreak;\n\t\tcase '.mov':\n\t\tcase '.3gp':\n\t\t\t$img = 'quicktime.png';\n\t\t\tbreak;\n\t\tcase 'html':\n\t\tcase '.htm':\n\t\tcase '.php':\n\t\tcase '.cgi':\n\t\t\t$img = 'html.png';\n\t\t\tbreak;\n\t\tcase '.jpg':\n\t\tcase 'jpeg':\n\t\tcase '.png':\n\t\tcase '.bmp':\n\t\tcase 'tiff':\n\t\tcase '.xpm':\n\t\tcase '.gif':\n\t\tcase '.ico':\n\t\t\t$img = 'image.png';\n\t\t\tbreak;\n\t\tcase '.nfo':\n\t\tcase '.sfv':\n\t\t\t$img = 'info.png';\n\t\tbreak;\n\t\tcase '.tar':\n\t\t\t$img ='tar.png';\n\t\t\tbreak;\n\t\tcase '.tgz':\n\t\tcase 'r.gz':\n\t\tcase '.bz2':\n\t\tcase '.rar':\n\t\tcase '.zip':\n\t\t\t$img = 'tgz.png';\n\t\t\tbreak;\n\t\tcase '.iso':\n\t\tcase '.mdf':\n\t\tcase '.mds':\n\t\tcase '.ccd':\n\t\tcase '.bin':\n\t\tcase '.cue':\n\t\tcase '.nrg':\n\t\tcase '.vcd':\n\t\t\t$img = 'cdrom.png';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$img = 'file.png';\n\t\t\tbreak;\n\t}\n\treturn($img);\n}", "function write_index_in_image($im, $future = \"\"){\n $today = str_split(strval(getdate()[0]) );\n //TODO: different dates and times will place this in different areas.\n //this will be used for OCR.\n for($i=0;$i< sizeof($today)-1;$i++){\n $color = imagecolorallocatealpha ( $im , 0xDD, 0xDD, 0xDD, $today[$i] );\n imagesetpixel ( $im , 2 + $i, 2, $color );\n }\n }", "function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}", "function be_schema_default_image($graph_piece)\n{\n $use_default = false;\n if (has_post_thumbnail()) {\n $image_src = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');\n if (empty($image_src[1]) || 1199 > $image_src[1])\n $use_default = true;\n } else {\n $use_default = true;\n }\n\n if ($use_default) {\n $graph_piece['image']['@id'] = home_url('#logo');\n }\n return $graph_piece;\n}", "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "public function getLogo();", "public function getAbsolutePicture();", "public function logoAction();", "public function getPhoto() {\n return DATADIR . 'alumni/' . $this->shortName . '.jpg';\n }", "public function preview_image()\n {\n return 'contact-area/04.png';\n }", "function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "public function getDemonstrativos();", "function image() {\n echo json_encode(array('element' => '<img src=\"msbienvenuebackground.png\" alt=\"Welcome\">'));\n exit;\n }", "function display_image($entity)\n{\n\tglobal $config;\n\t\n\techo '\n\t\t\t<div class=\"heading-block clearfix\">\n\t\t\t\t<div class=\"heading-thumbnail\">';\n\t\t\t\t\n\t\n\tif (isset($entity->thumbnailUrl))\n\t{\n\t\techo '<img src=\"' . $config['thumbnail_cdn'] . get_thumbnail_url($entity->thumbnailUrl) . '\" />';\t\t\n\t}\t\n\telse\n\t{\n\t\techo '<img src=\"images/no-icon.svg\" />';\n\t}\n\t\t\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<div class=\"heading-body\">\n\t\t\t\t\t<div class=\"heading-title\">';\n\t\t\t\t\t\n\techo get_literal_display($entity->name);\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"heading-description\">';\n\t\t\t\t\t\n\tif (isset($entity->description))\n\t{\n\t\techo '<div class=\"caption\">' . get_literal_display($entity->description) . '</div>';\n\t}\t\t\t\n\t\n\techo '<div id=\"identifiers\">';\n\techo '<ul class=\"identifier-list\">';\n\techo '<li><a class=\"external\" href=\"' . $entity->{'@id'} . '\" target=\"_new\">' . $entity->{'@id'} . '</a></li>';\n\techo '</ul>';\n\techo '</div>';\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t\t\t\n\t// Display image\n\techo '<div>';\t\n\techo '<img class=\"image\" src=\"' .$entity->contentUrl->{'@id'} . '\" />';\t\n\techo '</div>';\n\n\n\n\techo '\n\t\t<script>figure_is_part_of(\"' . $entity->{'@id'} . '\", \"cited_by\");</script> \n\t';\n}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "public function showImage()\n {\n }", "public function get_title() {\n\t\treturn __( 'Happyden Featured Image', 'happyden' );\n\t}", "function affiche_image(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['grade']==0){\n\t\t\treturn\"<img src='ressources/membre.png' title='Membre' alt='Membre'>\";\n\t\t}\n\t\tif($infos_id['grade']==10){\n\t\t\treturn \"<img src='ressources/users.png' title='Conseil' alt='Membre du conseil'>\";\n\t\t}\n\t\tif($infos_id['grade']==20){\n\t\t\treturn \"<img src='ressources/admin.png' title='Vice président' alt='Vice président'>\";\n\t\t}\n\t\tif($infos_id['grade']==30){\n\t\t\treturn \"<img src='ressources/boss.png' title='Président' alt='Président'>\";\n\t\t}\n\t}", "protected function getImageAttributes() {}", "public function displayAnime ($name) {\n $anime = new Anime();\n $anime->getAnime($name);\n ?>\n <div class=\"background\">\n <div class=\"cover\">\n <?php echo $anime->getPicDir(); ?>\n </div>\n <div class=\"description\">\n <?php echo $anime->description; ?>\n </div>\n <div class=\"eps\">\n <?php\n $eps = DataBase::Current()->ReadRows(\"SELECT * from {'dbprefix'}episodes WHERE name='\".$name.\"'\");\n if ($eps) {\n foreach ($eps as $ep) {\n ?>\n <div class=\"episode<?PHP echo $ep->episode; ?>\">\n <?php\n echo $ep->name;\n echo $ep->title;\n ?>\n </div>\n <?php\n }\n }\n ?>\n </div>\n </div>\n <?PHP\n }", "public function cd_image()\n\t{\n\t\tif (preg_match('/^\\[www\\..+?\\]-\\[(.+?)\\]-\\[\\d+\\/\\d+\\] \".+?\" - \\d+[,.]\\d+ [mMkKgG][bB] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//Slender.The.Arrival-WaLMaRT.PC - [01/26] - \"wmt-stal.nfo\" - yEnc\n\t\t//The.Night.of.the.Rabbit-FLT - [03/66] - \"flt-notr.r00\" - FAiRLIGHT - 5,10 GB - yEnc\n\t\t//Resident.Evil.Revelations-FLT - PC GAME - [03/97] - \"Resident.Evil.Revelations-FLT.r00\" - FAiRLIGHT - yEnc\n\t\t//Afterfall.Insanity.Dirty.Arena.Edition-WaLMaRT - [MULTI6][PCDVD] - [02/45] - \"wmt-adae.r00\" - PC GAME - yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9.-]{10,}) -( PC GAME -| [A-Z0-9\\[\\]]+ -)? \\[\\d+\\/\\d+\\] - \".+?\" - (.+? - (\\d+[,.]\\d+ [mMkKgG][bB] - )?)?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[01/46] - Crashtime 5 Undercover RELOADED - \"rld-ct5u.nfo\" - PC - yEnc\n\t\t//[01/76] - Of.Orcs.And.Men-SKIDROW - \"sr-oforcsandmen.nfo\" - yEnc\n\t\t//PC Game - [01/71] - MotoGP 13-RELOADED Including NoDVD Fix - \"MotoGP 13-RELOADED Including NoDVD Fix nfo\" - yEnc\n\t\tif (preg_match('/^(PC Game - )?\\[\\d+\\/\\d+\\] - (.+?) - \".+?\" -( .+? -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//Magrunner Dark Pulse FLT (FAiRLIGHT) - [02/70] - \"flt-madp par2\" - PC - yEnc\n\t\t//MotoGP 13 RELOADED - [01/71] - \"rld-motogp13 nfo\" - PC - yEnc\n\t\t//Dracula 4: Shadow of the Dragon FAiRLIGHT - [01/36] - \"flt-drc4 nfo\" - PC - yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9: ]{8,}(-[a-zA-Z]+)?)( \\(.+?\\)| - [\\[A-Z0-9\\]]+)? - \\[\\d+\\/\\d+\\] - \".+?\" - .+? - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[NEW PC GAME] - Lumber.island-WaLMaRT - \"wmt-lisd.nfo\" - [01/18] - yEnc\n\t\t//Trine.2.Complete.Story-SKIDROW - \"sr-trine2completestory.nfo\" - [01/78] - yEnc\n\t\tif (preg_match('/^(\\[[A-Z ]+\\] - )?([a-zA-Z0-9.-]{10,}) - \".+?\" - \\[\\d+\\/\\d+\\] - yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Uploader.Presents-Metal.Gear.Rising.Revengeance-RELOADED(51/65]\"rld-megerire.r48\" yEnc\n\t\tif (preg_match('/^Uploader\\.Presents-(.+)[\\(\\[]\\d+\\/\\d+\\]\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function preview_image()\n {\n return 'contact-area/02.png';\n }", "function displayMovie(array $aMovie, array $aCovers)\n{\n ?>\n <div class=\"movie\">\n <img src=\"images/<?= $aCovers[$aMovie['cover']]; ?>\">\n\n <p>\n <strong><?= $aMovie['title']; ?></strong> - <em><?= displayDuration($aMovie['duration']); ?></em>\n </p>\n </div>\n<?php\n}", "public function getEvolutionIcons()\n {\n // get annotation the count\n $annotationCounts = Request::processRequest(\n \"Annotations.getAnnotationCountForDates\", array('getAnnotationText' => 1));\n\n // create & render the view\n $view = new View('@Annotations/getEvolutionIcons');\n $view->annotationCounts = reset($annotationCounts); // only one idSite allowed for this action\n\n return $view->render();\n }", "function draw_y ($image, $black, $grey, $light_grey, $tab) // affiche les infos de l'axe des ordonnees\n\t{\n\t\tImageTTFText ($image, 10, 0, 3, 20, $grey, $this->path, $this->yname);\n\n\t\t//l'origine\n\t\tImageTTFText ($image, 10, 0, 0, $this->y(0) + 3, $black, $this->path, 0);\n\n\t\t$nb_draw = floor($this->ref_height / 30);\n\t\t$i = $this->max_y / $nb_draw;\n\t\t$stop = $nb_draw * $i;\n\n\t\t// affiche les reperes en fonction de la hauteur de l'axe\n\t\t$compt = 0;\n\t\twhile($i <= $stop)\n\t\t{\n\t\t\t$compt++;\nimageline($image, $this->x(0) - 5, $this->y($i), $this->x(0), $this->y($i), $black);\nimageline($image, $this->x(0) + 1, $this->y($i), $this->pic_width - 30, $this->y($i), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i) + 3, $black, $this->path, $i);\n\t\t\t$i += $this->max_y / $nb_draw;\n\t\t\t\n\t\t}\n\t\tif ($compt == 1)\n\t\t{\n\t\t\t$i -= $this->max_y / $nb_draw;\nimageline($image, $this->x(0) - 5, $this->y($i/2), $this->x(0), $this->y($i/2), $black);\nimageline($image, $this->x(0) + 1, $this->y($i/2), $this->pic_width - 30, $this->y($i/2), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i/2) + 3, $black, $this->path, $i/2);\n\t\t}\n\t}", "private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }", "public function timeImage($timestamp) {\n\t\t\t\t\t\t\n\t\t\tswitch (claimants::callTime($timestamp)) {\n\t\t\t\tcase 1:\n\t\t\t\t\t$_imageLink = '<img src=\"'.HomeUrl.'skins/cash/images/mornon.png\" title=\"Claimant was called in the Morning\" border=\"0\" height=\"18\" width=\"18\">';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$_imageLink = '<img src=\"'.HomeUrl.'skins/cash/images/afton.png\" title=\"Claimant was called in the Afternoon\" border=\"0\" height=\"18\" width=\"18\">';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$_imageLink = '<img src=\"'.HomeUrl.'skins/cash/images/nigon.png\" title=\"Claimant was called in the Evening\" border=\"0\" height=\"18\" width=\"18\">';\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t\treturn $_imageLink;\n\t\t}", "function factures_autoriser(){}", "function Image() {\r\n\t\treturn $this->ResizedAdvertisementImage();\r\n\t}", "public function getDemographics(){\r\n \treturn $this->demographics; \r\n\t}", "private function _annotate()\n\t{\n\t\t$this->bg->annotateImage( $this->text, 373, 19, 0, 'TOTAL KILLS');\n\t\t$this->bg->annotateImage( $this->text, 471, 19, 0, $this->totalKills);\n\t\t$this->bg->annotateImage( $this->text, 373, 33, 0, 'TOTAL DEATHS');\n\t\t$this->bg->annotateImage( $this->text, 471, 33, 0, $this->totalDeaths);\n\t\t$this->bg->annotateImage( $this->text, 374, 47, 0, 'KD RATIO');\n\t\t$this->bg->annotateImage( $this->text, 471, 47, 0, $this->killDeathRatio);\n\t\t$this->bg->annotateImage( $this->text, 374, 73, 0, 'WEAPON OF CHOICE');\n\n\t\t//this sets the weapon text to the very right so we can prevent overflow\n\t\t$this->bg->annotateImage( $this->bigText, (500 - $this->metrics['favoriteWeapon']['textWidth']) - 10, 95, 0, $this->favoriteWeapon);\n\t\t//put the spartans name in the middle of the image (horizontally)\n\t\t$this->bg->annotateImage( $this->bigText, (250 - ($this->metrics['spartan']['textWidth'] / 2)), 35, 0, rawurldecode($this->spartan));\n\t}", "function affiche_image_armure($image_armures, $nom_armure, $defense_armure, $description_armures,\n\t\t\t\t\t\t\t $BonusPerception_armures, $bonusPv_armure){\n\t\t\t\t\t\t\t\t \n\t$description_arme = $description_armures;\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\techo \"<td width=50 height=50 align=center>\n\t\t\t<img tabindex='0' src='../images/armures/$image_armures' width=50 height=50 \n\t\t\t\t\tdata-toggle='popover' data-trigger='focus' data-html='true' data-placement='bottom'\n\t\t\t\t\ttitle=\\\"<b>$nom_armure</b>\\\" \";\n\techo \"\t\t\tdata-content=\\\"\t<div><img src=../images/armures/$image_armures></div>\n\t\t\t\t\t\t\t\t\t<div><u>Defense :</u> $defense_armure</div>\";\n\t\t\t if($BonusPerception_armures){\n\t\t\t\techo \"<div><u>Bonus Perception :</u> $BonusPerception_armures</div>\";\n\t\t\t }\n\t\t\t if($bonusPv_armure){\n\t\t\t\techo \"<div><u>bonus Pv :</u> $bonusPv_armure</div>\";\n\t\t\t }\n\t\t\t echo \"<div><b>Description</b></div><div>$description_armures</div>\\\" >\";\n}", "public function multimedia_anime()\n\t{\n\t\tif (preg_match('/(.+?\\s*\\((360|480|720|1080)p\\|.+?\\s*~bY\\s*.+?)\\s*\\[\\d+\\/\\d+\\]\\s*- \"(?P<release>.+?\\[(?P<crc>[0-9A-Fa-f]+)\\]).+?' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match['release'];\n\t\t}\n\n\t\t//[Hatsuyuki]_Seirei_Tsukai_no_Blade_Dance_-_03_[720p] [E18FCA59] [01/18]\n\t\tif (preg_match('#(?P<release>\\[[A-Z0-9-]+\\][\\w_-]+_\\d+_\\[\\d{3,4}[ip]\\]\\s*\\[[(?P<crc>0-9A-Fa-f]{8}\\])\\s\\[\\d+/(\\d+)\\]#i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match['release'];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function getImage() {}", "function display_graphic($piece)\n{\n}", "function marcadeagua($img_original, $img_marcadeagua, $img_nueva, $calidad)\n{\n $info_original = getimagesize($img_original);\n $anchura_original = $info_original[0];\n $altura_original = $info_original[1];\n // obtener datos de la \"marca de agua\" \n $info_marcadeagua = getimagesize($img_marcadeagua);\n $anchura_marcadeagua = $info_marcadeagua[0];\n $altura_marcadeagua = $info_marcadeagua[1];\n // calcular la posición donde debe copiarse la \"marca de agua\" en la fotografia \n $horizmargen = ($anchura_original - $anchura_marcadeagua)/2;\n $vertmargen = ($altura_original - $altura_marcadeagua)/2;\n // crear imagen desde el original \n $original = ImageCreateFromJPEG($img_original);\n ImageAlphaBlending($original, true);\n // crear nueva imagen desde la marca de agua \n $marcadeagua = ImageCreateFromPNG($img_marcadeagua);\n // copiar la \"marca de agua\" en la fotografia \n ImageCopy($original, $marcadeagua, $horizmargen, $vertmargen, 0, 0, $anchura_marcadeagua, $altura_marcadeagua);\n // guardar la nueva imagen \n ImageJPEG($original, $img_nueva, $calidad);\n // cerrar las imágenes \n ImageDestroy($original);\n ImageDestroy($marcadeagua);\n}", "function header_image()\n {\n }", "public function ShowAirlineAction()\n {\n $em = $this->getDoctrine()->getManager();\n $Airline=$em->getRepository('MyAppEspritBundle:Airlinecompany')->findAll();\n $imgs=array();\n foreach ($Airline as $key => $entity)\n {\n if($entity->getPicture() == null)\n {\n $imgs[$key] = \"iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAMAAAACDyzWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAP9QTFRF8vLy2dnZ5ubm/Pz81tbW4ODg3t7e29vbsLCw5+fn0tLS7Ozs+fn539/fz8/PsrKy/f39/v7+u7u79fX1ra2tysrKyMjIw8PD6enpy8vLs7OzsbGx+/v7xMTEzs7O7+/v3Nzcrq6u6+vrtLS0uLi4rKysxsbGycnJurq6+vr64uLiwsLCzc3Ntra219fX9PT01NTU4eHh7u7utbW1vr6++Pj45eXl4+Pj0NDQwcHBubm5x8fHvb299/f38/Pz1dXV8fHxwMDA6Ojo9vb20dHR3d3dvLy82traxcXFr6+v2NjYt7e35OTkv7+/09PT7e3t6urq8PDwq6urzMzM////kkQrbAAAIOdJREFUeNrsnWlD2soChrNgpWyC1IqCQLV6lOJS64JV61672O1O/v9vuaxhJgyQPZnM+344xypkfTJPZslEMRAkwig4BAgARAAgggBABAAiCABEACCCAEAEACIIAEQAIIIAQAQAIggARAAgggBABAAiCABEACCCAEAEACIIAESSAuBTOo9jhLhOsbO+6a0EbOyv6DiOiLuUry5OvSq4dvnzFkcScROteuPHPSA0jLhJKbNU8acSAg0jLvR7cnHtVy24dvkeGkZ8169tAKFhJAj9OgAQGkYc5OHk7trwF0CjtgMNI/ZyXz0qGX4DCA0jfuvXIYDQMOKvfp0C2NMw+o4R3/TrGEBoGJmj36PqvbNvOC3RoGFkhn7vfj0YwQIIDSO+6dcVgIbRrELDiB/6dQkgNIxwcn138mCEAyA0jEykspQpGWEBaBiL0DDC6Hfptbtvui3JoGHEs369AAgNI5716wnAnoYXcOwRw7ipau6/7KUUg4aRrn4vTspGNABCw4gn/XoGsKvhNDQM/UYIIDQsdU4vrspGtABCwxJnc71TNKIGsKfhjzgX0G90AELD0G+0AELD0G+0AELD0uUgfebPgvwquY6hYZn0u/r10IgXgNAw9BstgNAw9BsxgF0Nr0HDiU9udfnQiCeA0LAEyW7Vi0ZcAYSGk6/f6ou/C/S7xDr+RKBh6Dc6AKFh6DdaAKHhxEZNn/u/0CBKK2g4idnb2P1iiAGgsQcNQ79RAggNQ78RAwgNQ7/RAtjV8GdoOCEJsjQJEBJoOCF5Dkq/AQMIDUO/0QJo7H2DhqHfCAGEhoVP4CdQEfwCQgJVWPA1ycAVufdtFxqGfqMDEBqGfiMGEBoWMiENawpFj92aPDQsWMKabSAkMKBh0fQb1uyjYZVM0DD0GymAQTeoIwLqN1QAoWFhEuobKcOsHEDDQuj37c9bI5kAQsPQb7QA9kb2QMPQb4QAQsPQb7QAQsMxzu3PtzUj6QD2nm9p4VzHMa/Sr8JfaRRdZNAw9BspgNAw9BstgAE+Zoq4Sz79FM2KoxqlAg3HKfrKfsOQC0BoGPqNFkBoGPqNGEDjDzQst36jBhAajkGU9zs1Q1YAoeHo9VttRnwBRHwA/nxqi6XhB2VzerLlU+hXLACF0vDtmVonc1JXz4R5ACtq/cYCQGE0/KX1SGzm8eOtCHv0Mb0Yg4sgBgciG38NF/8eEUd51Gox3yWdfDo2AKAQGta1DnGcdr4c532Kg35jA2DMNbzpAr9+nuJbJYmFfmMEYFfD9ZhqWEkR12kv7EG/YgAYVw0XW8RTCtk41qd2N2JzYcSoySCOGn44Il7zHDsPt9LPMRJMjA5MdituGs62iffUj2O1TzHSb9wAjJ2Gz4g/OYvRPsVJv7EDMF4aLuWJX1ksxmWnztNqzOp4Mbs/CeqVZG5aKoh/UeOxU8X6VtwqRbHrt8zFRcOviZ9ZLEG/YgAYFw3/a/sKIHkV/S7FTr8xBTAWGs51iM+5h35FAbCr4eWINVxS/eaPtKMdIXO4vJozAKAoGtaI/+lE2SL9Uj2I55mO6+DJaDX8pR0AgOQmsj2KqX7jDKCRW41Ow7VHEkiievwirvqNNYBRaviZBJRoukTO0gfxPctxfn4hKg2/JoElgl7YYmd90wCAbjV8mJQbwOHAhNBHSR9+XY31k3oxf4IrAg3XMiTAPIbcFRFr/QoAYAQafiaB5ibMEWcx168IAIauYY0EnOfweoXLVxexf1BegIeof4Sp4QYJPAth7ctZNRX/syvCU/wharhcDx5AEs71JIB+RQEwPA3vPZIwokG/YgHY1XA1jGKjmCLhpBL8rWz1RowzK8pEOmFouNQkYSXgntlSZqliAEDRNHweGn+kHeisaKLoVygADeMgYA2/kBDT/gP9igZgwBo+I+HmL/QrGoCBajhs/oKqCz+c3F0bADAwDadfksIfIUG8Ovn10lHJAICiadjHZ9Ad9cr5PUOfYPoVEcBANLx3QKJJxt9dEU2/QgLY07DPA4uVDIkq7XsfhXlfFUy/ggLos4ZreRJljvx6WrN0VL0X8GSKCKCfGr4+L5CIox77cTk9/Lp7MABgZBrWG5tnC47zdETikILqcLsrm4dJ0K/AABqbjIaV5zaRLI/nNeH1KzKAtIb3nomMqZvMXd+dPBgAMCoNH2aIpMkPrFtZypQMABiFhgtdDZ8WiLR5JbZ+RQewr+HiEZE490LrV3gAexrOyMwfqZ+JrN8EAGjcv/u8JjGAy+80wU+g6ABWVraqb2XF77/1pZUiAIw0z4R83f4gJ3+rb3YJ+QcAI01vKucNOTW8/OZDSI94AsCpKfVPhYwa7ur3bVCjWgGg7ejD0yGdhjfe7a6ZTYEAMHIAZdPwQL8AMD4Akv8k0vBIvwAwRgBKpGGmtAeAsQFQFg2zFxoAjA+AUmj4v62ltwQAxhNACTQ8UcoDwFgBmHQNT15gADBeAE4oKknhNbgDwJgBmGANb7x7P1m6A8DYAZhUDfMvLAAYPwCZhtok6xcAxhTABGqYq18AGFsAk6bhq+2LKX8BgPEEMFEa7ur3kgBAsQBMkIan6hcAxhrApGh4un4BYLwBTISGV7bSlwQAiglgAjT8bZZ+AWDsARRdw7P1CwDjD6DQGp6nXwAoAIBdDb/5kFD9AkAhABRVwyfbdzY+BQDjD2AkGv6dSqVeLXT/43L2rpVP8/ULAAUBkH6MMeg8/lio/LO8reP09u+CmvFfvwBQGADD0fDjq2xu+rbuHS/89le/AFAcAIPX8OKmjXf05v406/7pFwAKBGCwGk7d237tm76pzlnYzvef9ktrACgMgIFpuPPi8A1tOS3ji34BYKwAzMx9v0vz8/6P377f+FVczBFZyh75oF8AGCsAF218/qaqnZ75Oa3+7023UzT/ufGsXwAoHIDG3/VOsfbKt9Iv62WG8MZvjn5/OdwEACgWgMbpxVXZqPjyZq92S/e29SWNrRKv7Kd3CABMNoB9DRsVH/g7KHvf/tNFL/oFgEICaFTWH4ueXxJc2PRnDxqP7vULAMUEsKfh27o3/lIzW51r5c1NbVDzPtvcPNyb+dnnoX6/7xAAKAeAPQ17e8NXa2rlY+/Px4OO9eP11MKMfhKt3dPv/goBgNIAaFSWdt03Shca/IUWjz/OaGbM5P9MqbR8eXSnXwAoLoDG6b7rvuEjfmGmLMxtYKw/cd8rU7us7hAAKBeAxoLbvuEDXrdvTXu02W93PnFHePvzba4JAGUD8Kz3qisXGl7k9LzVzh3UadoLbAmaTz8ZRmkBAEoG4Gt3Q7Tyk9WPvZbDKnU7P0awtvJzcEd5DgClA9DFEK3WxHJKFRd9y/WzoqnfkdHvAaB8AA7eOOnldB+mXI5i+Gfqd5QXACgfgM403LT6t/jRfVvik66v7DMNOgsAUD4AnWj4wFr/uL7xNJhhf4etUJeaAFBCAG1r+Mba/vLHU3/erze/7q0F6g8AKCGANjXcsbQ/l1pe8Fv72ev7fbKUqbUMAJQQQFsabt9aSqumF/4u05/6fb8/LKXqYRsAygigDQ1rljWrXvi72z4Zed3SMXIPAKUEcK6GVbYCvHfjTb/fxmMULGZ/BoBSAjhHwx12ygP9xgf9jh4s2fNyGwgAEwPgTA1n2fqH6ot+RxZmR2kpAFBSAGdo+Nlze52p3/fvvs1pX8wDQEkBnKrhOnuf1vKi3y3OyOcmK+EOAJQVwCkaZmvAf3zU7zCvmRX8BYDSAsjV8COjyOu6n/odNjJ+YRSfAoDSAsjTMFMDKab81e+wMabmsh4CABMH4ISGj5gmQNfjXy62r2YNtGY2TgWAEgNo1fAx/bUv7vW7MfMDf+i1HAJAmQFkNXzk9vbMrn55N5oqAJQaQFrDzBwclSD0O8g5vZ5bACg3gGMNP9J3gHv1QPQ7qAkzkx0dAUC5ATQ1/OK5CfptdcvWtBuLbopaAJhYAIcavvZaAF68+Wrzk3QRWGsDQNkB7Gs4RX/nPCj9Dh9TotfVBIDSA9jT8AFdKtUD0+/gLpAubY8BIAAkZGMpM66EaI75+7D91cnHF6jtK3YAIAAkzeu7k4fRV5y+4mHts339Dkbd0G2BCwAQAJJNo3RUHY5VUYLU72Sv8z8ACABJbyR+ZajhhUD1O3jyhHZwHQBKD+BN/6MDDRcLgep3UA2hHz1ZBIDSAzicDKur4Xu71dKhfpfW/3PTaE2PTL0HgNIDaA6E6Wr4yYl+33wlrvKD2sIvAFB6AMdPTF7frb8NVr8DB9cc3gQCwCQD+Eh9/mH5zWqw+u2HngDkAABKDiC9yE27s2h9eLPs4anhM4ctgQAwyQDSI2Hy9mbRWtt9t+qBP6YhpgIAJQeQbhdODfqGVwPUby8dapW3AFByAKmjU6rPeG7YJ/1a6j3GKQCUHMDcJAwzNbz7ZtUrfwz0bQAoNYBtajS+Qg3RWg1IvxOPoDwCQKkB7DCVYGqk9HJA+rVWg1MAUGoA6QcytenPDfunX+uYQBUASg0g3S92bhkpvRqEfvsjEKmVPgFAqQFcZJsB2QeWlmf806+GwDwABIDDvLLWOGgNL/ukX2ux+xEASg3g00wbmtT5p99eUgAQAHJObpP33PCyz/oFgADQroJNDfupXygYANqshJgarjp/57V9AFEJkRtAukLKnxVmdft/y/7yh2YYADi3IZquh7xd8rkIpBuinwGg1ADSA6I3J/887BDx+SaQHoOIrji5AWzTB4pTCd71vRUagxEA4JSxeXuT+v1A9cP5p2HqoRAMx5IdwEPq83WefgPoCqFeyoQBqbIDSM9cf8DVr++dwfWZ2geAcgF4NqVNjvNKOb80TM9H+BcASg4g3SZXmT0c0C8N03PlfwSAkgP4m/p82bTtu901fqu0HxpuTLM+AJQQQEJNlFHqTNWvj6NSMTUHAJxWHr2a+1CcDxrG5EQAcFq3RO81wRvvPq/N/IJXDdNvJj4DgNIDSBdItTr5uv1h3jc8apieJ/8HAJQeQPqWzFDXbY078PJ4HN0Igyl6ASDTFL1ZnaNfHzRcoTbQ3vsKAWCyARyf34P0S8cmRq41zBS45wAQAJpv7sitLh86eFWhSw3TDd9GBgACwNEs0ZtbhS6JubZtlNxp+IvTRhgAmHgAmwP9DnqFHcxT7kbDdBXEVj8cAEw+gO29gX77eWg7wMm5hulmb7tvJQGACQeQvM5ujV/h5uRVDY41zBSAWQIAAWAvF2lqgMqpkyLQqYbpO0BbAxEAYPIBXNmq0oMC7XWPudMwg5JCACAA7PX9vl9jzFhy+MpW+7NWdug2QLvvSweAyQbwavuCfUzI7ktUXWj4L70W+7UdAJhcAFe20pcTlQP7ZZMzDR+U3K0EACYWwG9d/U42jxi60/em29Jwh35P63j0NQCUF8CBfgcj85nS6bBN/Ncww7i9gVgAMMkAjvQ7bAtkvlkhxG8NnzMr2CQAUHIAx/oddIecersNnKdh9gaw1gGAkgN4sn3H/oJddlF1TuAsDd8wLTB2e4EBYFIBXPlE63eQf+xqb4iPGn7cYxb+pQ0ApQbQot8hJGwhtfeb+KbhzjVbvB4RACgzgBP6HeSZuU0zTjPEJw13yux25QkAlBhAnn4nH5jslYFuLMzRcIYt/2yPggGAiQTw2/ef0x48an9hv1/7QXzQ8BF7/2dc1wGgxABO0S/3NtAoNolnDf+wLvOIAEBpAZyu32FrXdGyCI141PDHkmWJTwQASgvgznT9jp4PsfJy++hFw/Vj6za9EAAoLYAn27/mnu28dSE1Dxr+cWpdmos+PgCYEADn6XeYl4nFHGfcaXhnc2JRWQIAZQVwvn6HqUwsp3jedsFNp3pjXdCfNgCUFUA7+uU3B/abThx7WD00yicXbAtg1hV/ADABAK7sf9+xf8ZfOMt6eOWEmef+U8alzFLF4/0fAEwEgDvf91ecnPJ8ibO00482HySv5x/MVhxKw+cEAEoKoAP9jgRa4y2veLxo46ubOvWV8tVQw8UnAgDlBNCZfkf9t4f8Re5VmjPKwfrza0u/20jD10cEAMoJoFP9jvqFX09d7KH2zBmq9aieKTxz9zWcrRMAKCeAv7ZPXJ73xdqMRZfKf7SFhYXnVErt/u8sWy5O/2z56r2nVzsAQFEBPHOnX1PDt/7sQflo19OrHQCgqAAuuNSvmac9H7Z/wdH0HQAwQQB+c61fs1ZxX/K4+dmOs+k7AGBiANQvPeh3PJzU0+Erm1OwrbnXMAAUEkDl/dUK8SMHrm8FD5+dTt8BABMDYD79XCc+5eaPmw2//eF8+g4AmBAA9ZX9xhPxL0cV3dlWF7OpyaWs7b5bBYAyAKi836lpxNfU8w5MfNgquJm+AwAmBMCP6UXDZ/76A/w+/ivOX3np9jzjbvoOAJgMAPW1/UauSYLJwdntDAhLiqbOGfPnQsMAUCgAu/q9bdVJcGmn8mfZsrV9sHz8eiFla7WONQwAYwNgZmFu2u++PZIwkkmlUq96a8x3f3A0j4xTDQPA2AA4N2vv330jsc/a53cbADCJAF6mP60QEeJIwwBQFADvPPf9hhYnGgaAYgAohn5daBgACgHgZXprhYgU2xoGgCIAeLF9RQSLXQ0DwPgDKJZ+HWoYAMYeQOH060jDADDuAAqoXycaBoDxBrCr3w0ibGxoGADGGsC3VUH1O9bwVwAoLoAC69euhgFgfAEUW782NQwAYwug8Po1Nbz9FQCKB+DM05YcDQPAeALocFCTuBoGgLEEMDH6nVueA8BIU0y8fudpeAEARpp64vU7Z6/OAGCkOfA2nFN8DR8DwEjzIoN+Z1xa7T0AGGmupdDv9L17NgBgtGnKod9p5XsZAEac07rTEXSCa7i69V9yGmESAKBxPBbUbpL1y9Pwbx0ARp+/bUn0O6Hho5wBAGOQ244k+rVoeLFoAMBYRD8rEG8vOxBQw6nbJJy6ZABoGOXlz88peaIuHKUPDAAYm2iTr39Oeg6XV08BYDxiefOuJCl21jcBYBzycHJ3bciYsyRoWHwA76tHJUPOdDWcA4AR6/f30r0hbRKgYcEBlFa/idGw2ABKrN+kaFhkAEtH1XtD+hQLQmtYYACv704ewJ/oGhYXQOg3ERoWFUDol9Xw1iYAhH6hYVkArCxloN9kaFhEAEs3SxqIm9BwXUgNCwgg9JskDYsHIPSbKA0LB+BNFfqdpeEsAAwypxdXZXA2Iy+iaVgsACvr0G/CNCwUgNBv8jQsEIDQr10NVw8AoP/ZXO8UAVfiNCwMgKnqGchKoIYFARD6dZhzUTQsBoDQb2I1LASAB2noN6kaFgDA3OryIXhypeEfABD6hYbFBhD6TbaGYw4g9OtVw+kfANB9slt16DfZGg4YQGZaxZSqOWvM+1E9t7FobfSzQv1SjcfhVentMf9Bwli1Zr41eSlrKOaqLSdcoQ9j0gHsJdPwS78A0B6AhDynVQA4jt274nn6BYB2AVQOl3+tAEAz9m5J1PS5zUUDwHkAGsW35qsdACDJ2/je3sbuFwMA+gWgoVxsXwHA0W2gDf1+quuGYwBjWNtTY3JBKORy+ApvWQHMaM2J6z9Xaand5DV2I3LZtTcrqtqqcKvMSvc7zYrOA3DWhuiVpqpWcuOf2Qp5Q2v2NkXL0hDnep9r8Y9QWcv3N51frc9pvYXl5gKo9JfS1Br6vG1mtnPKoeleuN3F5RtcALu14b6GleGnKvo0APWsNjgWepIA7J6ALPuCPWVsJFLQzJ1V1JWt9OWQ2om5x3V19AUGQK3366ZlffTZzxbGR7kx/LllLlQrjDdFNY/IaHvVnJG33MJnM+MrizM/emt0s6HPUjCz2nzZcsDy5jZXeNuZyU6atpwaNnflJhXc+39fw0p5uO2FLBfAXH68Uc1cogDUmbPYYr2cKo/O3bd379fGv2YPgZ4anyD6yOmZ4WL5AOZN9rvUZa03o+UMuynDM9EYXx7lArPp1FZwttEY40pSqekAWldbsdxYVKwbZPlCSrcA2DC3MqNzAexrOM+2R1gBzPI2KiEAGvRZbFrvDAv64HCebN9xDvPEqWWBSY1wmlIC0p+mfu7vvFLgLLAb6nQXmG9Y+Ov+mSUwy9vICQD1Ard9arzj1naDnPULKZ0FMMXuAQfAkYapQ24BcGLbWwkFUONXjvW2qV9unbkwBUDzc1NO+JTkuSAMTrjC/YYyWXZP3OA1bQGo8VfLXWvF4O6NavCXM6jn8QAcapj3hz6AuQJ3j5MH4PisqwX6+OdH+i3wmyyog19gABzduU054RmqdKAWrdLnifpMnjl/1Bd6p0MfFzkFbuP6+OOpzHQAM5Mf0pg9pL6sMReEysDB386pAJLL9U8r1HJZAM1rq5By0GYhIICN8V7nqOO0+O7OlEOF805w+mgxRy7HXZ9K3ROlKM5NkRcMw/xDd5V5+stN6gvMuTQ3rDnejeaUfaYuNCuA1NYXqKWM+aPKe5W++2jRW8DcA47/0LuYpwDYKl6aGp4AsDA+6KmQ3skeDYAadWzMC/18531m/GmF4wCmR5PbgMUHUKOvbfpGh/qGavm9SpHArLc50fwzrZjWZjRE07unco7RxJdT4y8o/IJOZ7dzCoBd/ZgatgJYphashdQ+GCKAufExaHIO/7cloquBAagRzqIJdcwtv2fOPrNelQegEjiAhAegTnNm2ATQIJfpQaO0FUCFB6CaGACpYk+dPPwn24/jQ54KDUDFMYDEXwAb9gDMcQFU3AE4qg1bAdQSDGBBzVA3KBMArnxKX6oG/fuyOkw5AgAVpwBqrgHs/qE13NPWjC8rvgI4rA3bApAkA0A6DGj9m5ud7z/X+qfC5LXB79EMFMBGiACO69JN3c4NpN8A9jUsKYApBsDeETh588taDeB2AwULoN50BiCn98Q+gFQ7dyEbBYA9DatTAWTLi4QBSB9vJT/Qr7W3rt8alwsBQKrnP0PCBJBuzs5kIwCwq+EugRICOO7a0LOmfkfniO1l0PSwACznC5bm/6ABZDsdUkoEAJJXuxvHsgFYMLu3c4NzfrL9i65usb29llvBoADMpib7n4IG0Ciz3V7DW8FQAdT09vqGJAAW1P7AN3N1ucEN18r+9x22vt+afmYDAjDL7QANHMCJ0S3l8AE0jGezbzjhAFpak4a1ja5+j1KWjyiZqQOCggCQO8LLbi149j7PAdDQ2YutP4gqbACVUaO0tRYcVqIBMDdqfP5lGbM5GOJWmBimFRyA445hRQkZwG4hqFqL0dAB7NWGv0kHYGWk3+5Vzxm1ruf5leYgACyMi1rnAGpeFDwY9pphB1GFD+BoiJYVwEQrON/X7/7KxDkyNyvFGxIZAIC5aecvJAANnbrx0qMBcNA3LBWA3UP7a/tk8kxr4x/znG9G0hWXotvH/QOQ6nQsTFl6aAD2NSwXgKPa73QAcxEDOL4LKLNdJL4DyDzyFA2APQ2vyQTgY0+/swE0IgaQ3yShUDeNvgGo2QCw7OdwLN4IrMtPG3sVWQDMvznh32zFCMDyNAC5S20EDSB/PKDhH4DkhXx64W1gKnEA6iv7HaqKyxNNhuoWnlIJ0X0GMGM5S/xHmhRmbPx4YG15CoDTH8tUx0egxauEtCwAFsasKzQbTgHMskeO7gs+T1+Nt8S8AJtJA/D2/WVNHXdAlacMmtY4LdHjzzaNis8A0uO0+wBSnbVMC3V23HBsfoR5cod6PLdMpgKYN49AbtQSU6B3oLt0piGgOd51+hJwDCB95LKW0TBfloaN0t2D3uKNHUkCgPn0E+/JxuFHMpO/zs0bXugJQH2aacetkZkGO/KZs40VSxWfv3MMgFn+MI2pe8h72jjnAkDLbrIPJf0dNkpb+2eSA2BXvw1jxrPbGve3ZlK+A8jDyRxhrzc0rT8NC/OHBm+EI5WWLQB1/iO406+HyQ3t35x4AdCYeDA9dUc/N2y9uxUfQOX9Ts2wHH22IdpafBTKEz0owz/4BKDG2ZJ+JUQZJmcFcIIwy8wIdPVl+mOZk0xYpnZge0g4taIB9k4BzLAAWwDMFcy+4Yk78AQA+DG9yA5G6B12bdZomIzlqdRxz23Z98EIhTK3sttiH1fsXweFyWEskyMtevdPDkbDtCw1mKy1PLbMIZLXXQFYNve3P7WHdW6YnLpGazj4OdvCnJxooN/hegdno6BNPH6VG48NzWgTNyDDgQrdo+/XcKzRnFNqmSnoxo+nZBWzAlAw+89MeHizYw07eLtLnN0VR41DbCoTVejhSIXxNUit1fy8UwAz5iFs6YbBm55NaZoazofwgsjwXtMw0q85IiarTZkXzyh37726f+RODta7L/N75jpleKvHL8b4t5u5Gds4WKKduc10pdJdSkXhtuEY5e4f2e3KKRr7eTeZewjv97+2vK4kdgCO9StGeJMWpYKfsjFE+c3aefLpOKxyKXF75FcaUfAXEwBDLC9CKmc/7+wZoqVhafhohTFlbVwANL7sbuwlBkDR9GveBzYL5iMtlXCmQNdGifwdaiFJS0nMngR1gHrRDRkTSrkRPIBhleWI/3CEcOoCB/A8reJMipoQ5KUIvweI0BoOFkDoNwEa/rYnLIDQLzQcIYDF+lYW5w8ajgrAL8sbOZy8ZGj4c3AaDgxA6BcajhBA6BcajhLAw+VV6DdpGg6mOz8QAM/SBzhj0HBUAEK/0HCUAEK/ydXwe/817DuA0C80HCGAxc76Js4TNBwVgIdXH05xkpKu4VpsAYR+ZdDwmq8a9hFA6BcajhLA8tUF9AsNRwagVr3BmZFHw/vH8QKw+Aj9QsPRAQj9QsNRAgj9yqjhFV807AOApcxSBecDGo4KwPLJxTVOBjQcFYDQr9wabkQLIPQLDUcJ4MPJHfQLDUcG4H31qIRTAA03ogEQ+kX6WfCiYfcAQr+IDxp2DSD0i/ihYZcAlo6q9zjuyFjD1cUwAXy4+/WAg474oGFXAEK/iF8adgEg9Itwk3ejYecAXt+dQL+IXxp2DGBlKQP9Ir5p2CGApaOl1zjOyHQNp5tBAgj9Ij5r2BGA0C/it4adAHhT1XB8ERsafgoCwNOLqzIOLuKzhm0DCP0iQWjYLoDQLxKIhu0BCP0iDnNrU8O2ANxc7xRxSJEgNGwHQOgXCUzD8wGEfhHXGr6seQYQ+kWC1LCCo4REGQCIAEAEACIIAEQAIIIAQAQAIggARAAgggBABAAiCABEACCCAEAEACIIAEQAIIIAQAQAIggARAAgggBABAAiiK38X4ABAJQhP9nQvpVSAAAAAElFTkSuQmCC\";\n }\n else\n {\n $imgs[$key] = base64_encode(stream_get_contents($entity->getPicture()));\n }\n\n\n }\n\n return $this->render(\"MyAppEspritBundle:Ween/AirlineCompany:Showairlinecompany.html.twig\",array(\"airlines\"=>$Airline,\"images\"=>$imgs));\n\n }", "private function generateThumbnailGD(){\n\t\t\n\t}", "abstract public function show($img);", "public function getCrearFoto(){\n\t\treturn 'formulario de de crear Albumes';\n\t}", "function amap_ma_get_entity_img($u, $namecleared) {\n if (!$namecleared)\n return false;\n\n if (elgg_instanceof($u, 'user') || elgg_instanceof($u, 'group')) {\n $entity_img = elgg_view('output/img', array(\n 'src' => $u->getIconURL('tiny'),\n 'alt' => $namecleared,\n 'class' => \"mapicon\",\n ));\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $entity_img = elgg_view('output/url', array(\n 'href' => \"agora/view/{$u->guid}/\" . elgg_get_friendly_title($namecleared),\n 'text' => elgg_view('agora/thumbnail', array('classfdguid' => $u->guid, 'size' => 'tiny', 'tu' => $u->time_updated)),\n 'class' => \"mapicon\",\n ));\n } else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n $entity_img = elgg_view('output/img', array(\n 'src' => $u->getIconURL('tiny'),\n 'alt' => $namecleared,\n 'class' => \"mapicon\",\n ));\n }\n return $entity_img;\n}", "protected function fetchIntroImage(){\n $this->imageIntro = $this->getImageTypeFromImages('intro');\n }", "public function getSponsorlogo() {}", "public function definition()\n {\n\n $image = UploadedFile::fake()->image('avatar1.jpg', 1500, 900)->size(100);\n $nameImage = md5(time()) . '-akunaipa.jpg';\n $cargar = $image->storeAs('public/images', $nameImage);\n $publicationId = Publication::all()->random(1)->first()->id;\n return [\n 'url' => env('APP_URL') . 'storage/images/' . $nameImage,\n 'order' => $this->faker->numberBetween(1, 4),\n 'publication_id' => $publicationId\n ];\n }", "public function setOnBoardImgs(){\n $onBoardImgs=\"\";\n $onBoardImgs.=$this->getMarkerTag($this->filePathFocus,$this->markerImage,$this->markerAt);\n if(!empty($this->sOnBoard)){\n $komas=explode(\",\",$this->sOnBoard);\n foreach($komas as $koma){$onBoardImgs.=$this->getImageTag($koma,\"S\",$this->filePathKoma);}\n }\n\n if(!empty($this->gOnBoard)){\n $komas=explode(\",\",$this->gOnBoard);\n foreach($komas as $koma){$onBoardImgs.=$this->getImageTag($koma,\"G\",$this->filePathKoma);}\n }\n return $onBoardImgs;\n }", "function doc_pic ($a,$showdetails=false,$force=false) {\r\n\tGLOBAL $HTTP_SERVER_VARS;\r\n\t\t$SRC=$a[SRC];\r\n\t\t$path=$a[path];\r\n\t\t$HREF=$a[HREF];\r\n\t\t$BORDER=$a[BORDER];\r\n\t\t$ALIGN=$a[ALIGN];\r\n\t\t$HVSPACE=$a[HVSPACE];\r\n\t\t$ALT=$a[ALT];\r\n\t\t$WIDTH=$a[WIDTH];\r\n\t\t$HEIGHT=$a[HEIGHT];\r\n\r\n\t\tif (''==$SRC) {\r\n\t\t\tif ($showdetails) {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn(\"Kein Bild\");\r\n\t\t\t} else {\r\n\t\t\t\t$this->_debug2('doc_pic');\r\n\t\t\t\treturn('');\r\n\t\t\t}\r\n\t\t}\r\n\t if (''==$path) {\r\n\t \t$path=$SRC;\r\n\t }\r\n\t if (ereg(\"^/\",$SRC)) {\r\n\t \t## if unset, assume DOCUMENT_ROOT to be the path\r\n\t \tif (!$this->layoutpath) {\r\n\t \t\t$this->layoutpath = $HTTP_SERVER_VARS[\"DOCUMENT_ROOT\"];\r\n\t \t}\r\n\t\t\t$SRC= $this->layouturl . $SRC;\r\n\t\t\t$path=$this->layoutpath . $path;\r\n\t\t}\r\n\t if (file_exists($path)) {\r\n\t\t\t$WH=GetImageSize($path);\r\n\t\t} else {\r\n\t\t\t$this->defval($force, $this->picture_def['force']);\r\n\t\t\tif (!$force) {\r\n\t\t\t\t$this->_debug2('doc_pic not found');\r\n\t\t\t\treturn(\"Bild: '$path' nicht vorhanden!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($WIDTH>0) {\r\n\t\t\t$WH[0]=$WIDTH;\r\n\t\t}\r\n\t\tif ($HEIGHT>0) {\r\n\t\t\t$WH[1]=$HEIGHT;\r\n\t\t}\r\n\t\t$this->defval($BORDER, $this->picture_def['BORDER']);\r\n\t\t$this->defval($ALIGN, $this->picture_def['ALIGN']);\r\n\t\t$this->defval($HVSPACE, $this->picture_def['HVSPACE']);\r\n\t\t$this->defval($ALT, $this->picture_def['ALT']);\r\n\r\n\t\t$r.=($BORDER!='') ? sprintf($this->picture['BORDER'],$BORDER) : '';\r\n\t\t$r.=o_iftrue($ALIGN, $this->picture['ALIGN']);\r\n\t\tif ($HVSPACE) {\r\n\t\t\t$r.=sprintf($this->picture['HVSPACE'],$HVSPACE,$HVSPACE);\r\n\t\t}\r\n\t\t$r.=sprintf($this->picture['ALT'],HTMLSpecialChars($ALT));\r\n\t\t$r.=sprintf($this->picture['WIDTH'],$WH[0]);\r\n\t\t$r.=sprintf($this->picture['HEIGHT'],$WH[1]);\r\n\r\n\t\t$out=sprintf($this->picture['pictag'],$SRC,$r);\r\n\r\n\t\tif ($HREF) {\r\n\t\t\t$out=$this->doc_anker('NULL',$HREF,$out);\r\n\t\t}\r\n\r\n\t\tif ($showdetails) {\r\n\t\t\t$name=ereg_Replace(\"^.*/\",\"\",$SRC);\r\n\t\t\t$out=\"<SMALL>'<B>$name</B>'&nbsp;\".\r\n\t\t\t \"$WH[0]x$WH[1]&nbsp;Pixel</SMALL>\\n$out\";\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_pic',$out);\r\n\t\treturn($out);\r\n\t}", "function xstats_getShipIcon( $race, $picturesmall, $ownerindex) {\n include ('../../inc.conf.php');\n return( '<img src=\"../../daten/'.$race.'/bilder_schiffe/'.$picturesmall.'\" height=\"24\" border=\"1\" style=\"border:1px solid '.$spielerfarbe[$ownerindex].'\">' );\n}", "function format_images_for_subject($exam_subject) {\n\t\t$image_set = find_images_for_subject($exam_subject); \n\t\t$images = [];\n\t\t//(re)construct name from database\n\t\tfor($i=0 ; $image = mysqli_fetch_assoc($image_set) ; $i++) {\n\t\t\tif($image[\"semester_season\"] === \"WS\"){\n\t\t\t\t$image_name = \"Wintersemester\";\n\t\t\t} else if ($image[\"semester_season\"] === \"SS\"){\n\t\t\t\t$image_name = \"Sommersemester\";\n\t\t\t}\n\t\t\t$image_name .= \"_20\";\n\t\t\t$image_name .= $image[\"semester_year\"];\n\t\t\tif($image[\"semester_season\"] === \"WS\"){\n\t\t\t\t$image_name .= \"_\".($image[\"semester_year\"]+1);\n\t\t\t}\n\t\t\t$image_name .= \".PNG\"; //.png on computer,.PNG on 000webhost\n\t\t\t$images[$i] = htmlentities($image_name);\n\t\t}\n\t\treturn $images;\n\t}", "public function getAlias()\n {\n return 'imagine';\n }", "public function getAlias()\n {\n return 'imagine';\n }", "function ext_formatPostComic($content) {\r\n\t\r\n\tif ($content->type == 'comic') {\r\n\t\t$date = date(\"Ymd\", $content->date);\r\n\t\t$content->comic_image = 'cm_' . $date . '_' . substr(md5($date), 0, 1) . '.png';\r\n\t}\r\n\t\r\n\treturn $content;\r\n\r\n}", "function immagine_stampa_low($id_img=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\tif ($id_img==\"\") {\n\t\treturn \"\";\n\t}else {\n\t\t$q_img=\"SELECT low_res, med_res FROM immagine WHERE id_img=$id_img\";\n\t\t$r_img=$db->query($q_img);\n\t\tif (!$r_img) {\n\t\t\treturn \"\";\n\t\t}\n\t\telse {\n\t\t\t$ro_img=mysql_fetch_array($r_img);\n\t\t\t$img=\"<img width=\\\"176px\\\" src=\\\"\".$ro_img['low_res'].\"\\\"/>\";\n\t\t\t$a='<a href=\"';\n $a.=$ro_img['med_res'];\n $a.='\"';\n $a.= 'rel=\"lightbox\">';\n\t\t\t$img = $a . $img . \"</a>\";\n\t\t\treturn $img;\n\t\t}\n\t}\n\t\n}", "public function setSOnHandImgs(){\n $sOnHandImgs=\"\";\n if(!empty($this->sOnHand)){\n $komas=explode(\",\",$this->sOnHand);\n $class=\"\";\n foreach($komas as $koma){\n $pngimg=$this->filePathKoma;\n $pngimg.=\"S\";\n $komatopng=$this->komatopng($koma);\n $komadata=$this->komatopng(strtolower($koma));\n $pngimg.=$komatopng;\n $imageTag= $this->makeImageTag($class,$pngimg,$komadata);\n $sOnHandImgs.=$imageTag;\n }}\n return $sOnHandImgs;\n }", "public function getWebPicture();", "function showImage()\n\t{\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\timagegif($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\timagejpeg($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\timagepng($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}", "public function get_game_one_image () {\n\t\treturn get_field('field_5b476fbb1dd99', $this->get_id());\n\t}", "public function getImageTag();", "protected function generateHighDensityGraphic() {}", "public function show($page)\n {\n header('Content-Type: image/png');\n echo $this->image[$page]->encode('png');\n\n }", "public function getMetaImage() {\n return (isset($this->metaImage) && $this->metaImage!='') ? $this->metaImage : LOGO;\n }", "public function getImageName();", "function deco_display_awkward_gallery(){\n\t\t//this loops the most recent featured items\n\t\t$items = deco_get_random_featured_items(10);\n\t\tif ($items!=null) \n\t\t{\n\t\tset_items_for_loop($items);\n\t\twhile(loop_items()):\n\t\n\t\t\t$index = 0; \n\t\t\twhile ($file = loop_files_for_item()):\n\t\t\t if ($file->hasThumbnail()):\n\t\t\t //this makes sure the loop grabs only the first image for the item \n\t\t\t if ($index == 0): \n\t\t\t //item_file('fullsize uri') broke in Omeka version 1.3, so I use getWebPath instead...\n\t\t \t echo '<div><img src=\"'.$file->getWebPath('fullsize').'\" alt=\"\" title=\"\"/>'; \n\t\t \t endif;\n\t\t\t endif; \n\t\t\tendwhile;\n\t\t\t\n\t\t\techo '<div class=\"showcase-caption\">';\n\t\t\techo /*Item Title and Link*/'<h3>'.link_to_item().'</h3>';\n\t\t\techo /*Item Description Excerpt*/'<p>'.item('Dublin Core', 'Description',array('snippet'=>190));\n\t\t\techo /*Link to Item*/ link_to_item(' ...more ').'</p></div></div>';\n\t\t\t\n\t\t\tendwhile; \n}else \n\t\t\t{\n \techo'<div><img src=\"'.uri('').'/themes/deco/images/emptyslideshow.png\" alt=\"Oops\" /><div class=\"showcase-caption\"><h3>UH OH!</h3><br/><p>There are no featured images right now. You should turn off \"Display Slideshow\" in the theme settings until you have some.</p></div></div>';\n \t\t}}", "function draw_pic ($tab)\n\t{\n\t\t$image = imagecreate($this->pic_width, $this->pic_height);\n\n\t\t// allocation des couleurs\n\t\t$white = imagecolorallocate($image, 255, 255, 255);\n//\t\t$black = imagecolorallocate($image, 0, 0, 0);\t\t\n\t\t$black = imagecolorallocate($image, 50, 58, 77);\t\t\n $grey = imagecolorallocate($image, 84, 96, 117);\n\t\t$red = imagecolorallocate($image, 255, 0, 0);\n\t\t$blue = imagecolorallocate($image, 199, 205, 209);\n\t\t$light_grey = imagecolorallocate($image, 211, 217, 232);\n\t\t$title_color = $black;\n\t\t$shadow_color = $black;\n\n\t\t// calcul de l'echelle a utiliser pour le repere du graphique\n\t\t$this->get_xy($tab);\n\t\t$this->calc_scale();\n\n\t\t// affichage du repere\n\t\timageline($image, 30, 30, 30, $this->pic_height - 60, $black);\n\t\timageline($image, 25, $this->pic_height - 60, $this->pic_width - 30, $this->pic_height - 60,$black);\n\n\t\t// affichage des fleches\n\t\timagefilledpolygon($image, array(26, 30, 34, 30, 30, 22), 3, $black);\n//\t\timagefilledpolygon($image, array($this->pic_width - 30, $this->pic_height - 64, $this->pic_width - 30, $this->pic_height - 56, $this->pic_width - 23, $this->pic_height - 60), 3, $black);\n\n\t\t// affichage de l'echelle des ordonnees et des abcisses\n\t\t$this->draw_y($image, $black, $grey, $light_grey, $tab);\n\t\t$this->draw_x($image, $black, $grey, $tab, $title_color);\n\n\t\t// affichage de l'histogram et de l'echelle des abcisses\n\t\t$this->draw_histo($image, $tab, $blue, $black, $shadow_color);\n\n\t\t//creation et affichage de l'image finale\n\t\timagegif($image);\n\t}", "function getAtkImag($atk) {\n $atkimgpath = 'img/atkimg/' . $atk . '.jpg';\n if (file_exists($atkimgpath)) {\n $atkimg = $atkimgpath;\n } else {\n $atkimg = 'img/atkimg/def.jpg';\n }\n return $atkimg;\n}", "public function getImage(): string\n {\n switch ($this->relation->getType()) {\n case AllianceEnum::ALLIANCE_RELATION_WAR:\n return 'war_negative';\n case AllianceEnum::ALLIANCE_RELATION_PEACE:\n case AllianceEnum::ALLIANCE_RELATION_FRIENDS:\n return 'friendship_positive';\n case AllianceEnum::ALLIANCE_RELATION_ALLIED:\n return 'alliance_positive';\n case AllianceEnum::ALLIANCE_RELATION_TRADE:\n return 'trade_positive';\n case AllianceEnum::ALLIANCE_RELATION_VASSAL:\n return 'vassal_positive';\n }\n\n return '';\n }", "public function colorImage() {}", "public function getCategoryImage($categoryId)\n {\n //$AccentOpaque = array(\"15\",\"50\",\"51\",\"52\",\"57\");\n //$Williamsburg = array(\"26\",\"86\",\"87\",\"88\",\"93\"); \n //$Carolina = array(\"23\",\"59\",\"66\",\"274\"); \n //$Springhill = array(\"25\",\"77\",\"78\",\"79\",\"84\");\n\t $AccentOpaque = array(\"57\");\n\t\t$Hammermill = array(\"246\");\n\t\t$Williamsburg = array(\"93\"); \n\t\t$Carolina = array(\"66\"); \n\t\t$Springhill = array(\"84\");\n\t\t//$PPAllBrands = array(\"209\");\n\t\t$Envelope = array(\"131\");\n\t\t$Forms = array(\"262\", \"263\", \"264\", \"265\", \"266\", \"267\", \"269\", \"270\", \"271\");\n\t\t$Bristols = array(\"233\", \"234\", \"235\", \"236\", \"237\", \"238\", \"239\", \"240\", \"241\");\n\t\t$Specialty = array(\"152\");\n\t\t$HotCupsLids = array(\"182\", \"178\", \"179\", \"183\", \"181\", \"220\", \"228\", \"229\", \"230\");\n\t\t$ColdCupsLids = array(\"158\", \"154\", \"275\", \"276\", \"277\");\n\t\t$FoodPackaging = array(\"213\", \"172\", \"212\", \"221\", \"222\", \"223\", \"214\", \"278\");\n \n //For category logo\n if(in_array($categoryId, $AccentOpaque)){\n //$catImgLogo = \"logo-accentopaque.jpg\";\n $catImgLogo = \"Accent Opaque\";\n }\n\t\t else if(in_array($categoryId, $Hammermill)){\n $catImgLogo = \"Hammermill\";\n }\n else if(in_array($categoryId, $Williamsburg)){\n $catImgLogo = \"Williamsburg\";\n }\n else if(in_array($categoryId, $Carolina)){\n $catImgLogo = \"Carolina\";\n }\n else if(in_array($categoryId, $Springhill)){\n $catImgLogo = \"Springhill\";\n }\n\t\t else if(in_array($categoryId, $Envelope)){\n $catImgLogo = \"Envelope\";\n }\n\t\t else if(in_array($categoryId, $Forms)){\n $catImgLogo = \"Forms\";\n }\n\t\t else if(in_array($categoryId, $Bristols)){\n $catImgLogo = \"Bristols\";\n }\n\t\t else if(in_array($categoryId, $Specialty)){\n $catImgLogo = \"Specialty\";\n }\n\t\t else if(in_array($categoryId, $HotCupsLids)){\n $catImgLogo = \"Hot Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $ColdCupsLids)){\n $catImgLogo = \"Cold Cups and Lids\";\n }\n\t\t else if(in_array($categoryId, $FoodPackaging)){\n $catImgLogo = \"Food Packaging\";\n }\n return $catImgLogo;\n }", "function display_facebook_og(){\n global $post;\n $img_array=get_field('design_image');\n //echo '<meta property=\"og:url\" content=\"'.get_permalink($post->ID).'\"/>';\n echo '<meta property=\"og:image\" content=\"'.$img_array[\"sizes\"][\"medium\"].'\"/>';\n}", "function ImgMrFox()\n{\n \treturn GetWoodyImgQuote('fantasticmrfox.jpg', '了不起的狐狸爸爸会干很多事情,但是刺猬才会干大事。');\n}", "public function setGOnHandImgs(){\n $gOnHandImgs=\"\";\n if (!empty($this->gOnHand)){\n $komas=explode(\",\",$this->gOnHand);\n $class=\"\";\n\n foreach($komas as $koma){\n $pngimg=$this->filePathKoma;\n $pngimg.=\"G\";\n $komatopng=$this->komatopng($koma);\n $komadata=$this->komatopng(strtolower($koma));\n $pngimg.=$komatopng;\n $imageTag= $this->makeImageTag($class,$pngimg,$komadata);\n $gOnHandImgs.=$imageTag;\n }\n }\n return $gOnHandImgs;\n }", "function createThumbImg($aprox)\n {\n // imagem de origem\n $img_origem= $this->createImg();\n\n // obtm as dimenses da imagem original\n $origem_x= ImagesX($img_origem);\n $origem_y= ImagesY($img_origem);\n \n // obtm as dimenses do thumbnail\n $vetor= $this->getThumbXY($origem_x, $origem_y, $aprox);\n $x= $vetor['x'];\n $y= $vetor['y'];\n \n // cria a imagem do thumbnail\n $img_final = ImageCreateTrueColor($x, $y);\n ImageCopyResampled($img_final, $img_origem, 0, 0, 0, 0, $x+1, $y+1, $origem_x, $origem_y);\n // o arquivo gravado\n if ($this->ext == \"png\")\n imagepng($img_final, $this->destino);\n\t\telseif ($this->ext == \"gif\")\n imagegif($img_final, $this->destino);\n elseif ($this->ext == \"jpg\")\n imagejpeg($img_final, $this->destino);\n\t\t\telseif ($this->ext == \"bmp\")\n imagewbmp($img_final, $this->destino);\n }", "private function write_image($m)\n {\n $mr = new \\eol_schema\\MediaResource();\n \n if(!@$m['sciname']) {\n // print_r($m);\n $m['sciname'] = \"Cephalopoda\";\n $taxonID = 8;\n }\n \n $taxonID = '';\n if(isset($this->taxon_scinames[$m['sciname']])) $taxonID = $this->taxon_scinames[$m['sciname']];\n else {\n $this->debug['undefined sciname'][$m['sciname']] = '';\n }\n \n $mr->taxonID = $taxonID;\n $mr->identifier = pathinfo($m['media_url'], PATHINFO_BASENAME);\n $mr->format = Functions::get_mimetype($m['media_url']);\n $mr->type = Functions::get_datatype_given_mimetype($mr->format);\n $mr->language = 'en';\n $mr->furtherInformationURL = $m['source_url'];\n $mr->accessURI = $m['media_url'];\n // $mr->CVterm = $o['subject'];\n $mr->Owner = @$m['creator'];\n // $mr->rights = $o['dc_rights'];\n // $mr->title = $o['dc_title'];\n $mr->UsageTerms = $m['license'];\n $mr->description = self::concatenate_desc($m);\n // $mr->LocationCreated = $o['location'];\n // $mr->bibliographicCitation = $o['dcterms_bibliographicCitation'];\n // if($reference_ids = @$this->object_reference_ids[$o['int_do_id']]) $mr->referenceID = implode(\"; \", $reference_ids);\n if($agent_ids = self::create_agent(@$m['creator'])) $mr->agentID = implode(\"; \", $agent_ids);\n if(!isset($this->object_ids[$mr->identifier])) {\n $this->archive_builder->write_object_to_file($mr);\n $this->object_ids[$mr->identifier] = '';\n }\n // print_r($mr); exit;\n }", "public function get_image_link()\n {\n }" ]
[ "0.59292287", "0.5619393", "0.55596745", "0.5508537", "0.5503939", "0.5495754", "0.54593724", "0.54593724", "0.5451625", "0.53893644", "0.53775597", "0.53613424", "0.5355737", "0.53093463", "0.5298351", "0.527316", "0.52683204", "0.5257538", "0.52479964", "0.52401066", "0.52357286", "0.5226831", "0.522604", "0.52258575", "0.51963985", "0.5174183", "0.5164061", "0.5164061", "0.51475537", "0.51450694", "0.51442313", "0.51422495", "0.51227874", "0.5112331", "0.5087249", "0.5087249", "0.5087249", "0.5087249", "0.5081421", "0.5070423", "0.50626594", "0.5056189", "0.5043947", "0.50422853", "0.5033245", "0.5031089", "0.5024659", "0.5021923", "0.4999992", "0.49921793", "0.498816", "0.49841347", "0.49803746", "0.4980366", "0.49768162", "0.496859", "0.49685356", "0.4967841", "0.49497172", "0.4948545", "0.4941348", "0.49408543", "0.49408543", "0.49399278", "0.49330646", "0.4928952", "0.49288", "0.49262717", "0.49221256", "0.49145165", "0.49128404", "0.49050647", "0.49047855", "0.49038532", "0.4901656", "0.49015698", "0.48985112", "0.48985112", "0.48980534", "0.4896343", "0.48963323", "0.48958963", "0.4894899", "0.4894021", "0.48917547", "0.48908684", "0.48851708", "0.48831537", "0.4876243", "0.48665765", "0.48644245", "0.48613754", "0.4856676", "0.48560736", "0.48546797", "0.48522717", "0.48512715", "0.485076", "0.48486692", "0.4845483", "0.4837099" ]
0.0
-1
__construct an example of how to access settings variable and its values.
public function pluginReadSettingsPage() { $this->getOptions(); global $rundizable_wp_features_optname; $output['rundizable_wp_features_optname'] = $rundizable_wp_features_optname; $Loader = new \RundizableWpFeatures\App\Libraries\Loader(); $Loader->loadView('admin/readsettings_v', $output); unset($Loader, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($settings='') \n\t{\t\n\t\t$this->settings = $this->_settings(); \n\t}", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __construct()\n\t{\n\t\t// Set the prefix.\n\t\t$this->setting_prefix = Config::getInstance()->getFrameworkConfig('setting_prefix');\n\t}", "public function __construct()\n {\n $this->setting = new Setting();\n }", "public function __construct() {\n $this->config = \\Drupal::config('lesson3.settings');\n }", "private function __construct() {\n \n \n $objCore = Engine_Core_Core::getInstance();\n $this->_appSetting = $objCore->getAppSetting();\n \n\n }", "public function __construct()\n {\n $this->branche = new Settings();\n }", "public function __construct()\n {\n $this->_settings = $this->getQuickviewSettings();\n }", "public function __construct( array $settings ) {\n\t\t$this->settings = $settings;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->initSettings();\n }", "function __construct($settings = array()){\n\t\t$config = Configure::read('Bitly');\n\t\tif (empty($config)) {\n\t\t\t$config = array();\n\t\t}\n\n\t\t$this->_set($config);\n\t\t$this->_set($settings);\n\t}", "public function __construct(\n\t\tSettings $settings\n )\n\t{\n\t\t$this->settings = $settings;\n\t}", "function __construct() {\n\t\t$settings = new CSS_Tricks_Can_He_Loginz_Settings();\n\n\t\t// The meta_key for our plugin options in the database.\n\t\t$settings_slug = $settings -> settings_slug;\n\t\t\n\t\t// The array of settings for this plugin.\n\t\t$settings_array = $settings -> settings_array;\n\n\t\t// The admin UI text for the settings page.\n\t\t$plugin_label = esc_html__( 'CSS-Tricks Can He Loginz Settings', 'css-tricks-can-he-loginz' );\n\n\t\t// Pass this stuff to the client plugin, which will automatically draw a settings page.\n\t\tparent::__construct( $settings_slug, $settings_array, $plugin_label );\n\n\t}", "public function __construct()\n {\n if (file_exists('bm-config.php')) {\n require_once('bm-config.php');\n } else if (file_exists('../bm-config.php')) {\n require_once('../bm-config.php');\n } else {\n $settings = array();\n }\n\n $defaults = array(\n 'cookie_name' => 'bm',\n 'debug' => false,\n 'use_wp_login' => false,\n 'session_duration' => 43200,// 12 hours\n 'log_directory' => '.',\n 'log_level' => 4,\n );\n $this->settings = array_merge($defaults, $settings);\n }", "public function __construct(array $settings = array())\n {\n }", "public function __construct() {\n\t\tself::$IP = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : \"127.0.0.1\"; \t\t\n\t\tself::$SETTINGS = array(\n\t\t\tnew SecuritySetting(1, \"SITE_LOAD\", 20, \"1 MINUTE\"),\n\t\t\tnew SecuritySetting(2, \"ACTION_HANDLER\", 15, \"1 MINUTE\"),\n\t\t\tnew SecuritySetting(3, \"LOGIN_ATTEMPT\", 7, \"10 MINUTE\"),\n\t\t\tnew SecuritySetting(4, \"EMAIL\", 5, \"1 MINUTE\"),\n\t\t\tnew SecuritySetting(5, \"CHANGE_PASSWORD\", 5, \"20 MINUTE\"),\n\t\t\tnew SecuritySetting(6, \"REGISTRATIONS\", 15, \"30 MINUTE\"),\n\t\t\tnew SecuritySetting(7, \"FORUM_POST\", 5, \"30 SECOND\"),\n\t\t\tnew SecuritySetting(8, \"MESSAGE_CENTRE\", 10, \"1 MINUTE\")\n\t\t);\n\t}", "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "public function __construct( $settings ) {\n\t\t$this->settings = (array) $settings;\n\t}", "public function __construct () {\n\t\tglobal $_CONSTANTS;\n\t\t$a=array(\"'\");\n\t\t$b=array(\"\");\n\t\tforeach (parse_ini_file(\"settings.ini\") as $key=>$value) { \n\t\t\t${$key} = $value;\n\t\t\tif ($key==\"host\") {\n\t\t\t\tdefine(HOST,'https://' . $value);\n\t\t\t} else { \t\t\t\n\t\t\t\tdefine(strtoupper($key),str_replace($a,$b,$value));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->host=HOST;\n\t}", "function __construct()\n {\n $this->link = mysql_connect($cfg['database_host'], $cfg['database_user'], $cfg['database_password']);\n if (!$this->link) \n {\n echo 'Settings class error: ' . mysql_error();\n return;\n }\n \n $sel_db = mysql_select_db($cfg['database_name']);\n \n if (!$sel_db) \n {\n echo 'Settings class error: ' . mysql_error();\n return;\n }\n \n $result = mysql_query(\"SELECT * FROM settings\");\n \n if(mysql_num_rows($result) > 0)\n {\n while($row = mysql_fetch_array($result))\n {\n $this->values[$row['key']] = $row['value'];\n }\n }\n }", "public function __construct() {\n\n // Loading module configuration file data\n $this->_config = Kohana::config('modulename')->as_array();\n\n // Say hi! usign date entered in the config file\n echo 'Hello Modulename! '.$this->_config['some_config_value'];\n\n }", "public function __construct()\n {\n global $settings, $viewController, $canLogin, $canRegister, $pinRequired, $activationRequired, $minimumAgeRequired, $minimumAge;\n\n // set the required templates\n $canLogin = $settings->get(TBL_SETTINGS_LOGIN_ENABLE);\n $canRegister = $settings->get(TBL_SETTINGS_REGISTER_ENABLE);\n $pinRequired = $settings->get(TBL_SETTINGS_PIN_REQUIRED);\n $activationRequired = $settings->get(TBL_SETTINGS_ACTIVATION_REQUIRED);\n $minimumAgeRequired = $settings->get(TBL_SETTINGS_MINIMUM_AGE_REQUIRED);\n $minimumAge = $settings->minimumAge();\n\n // load the view\n $viewController->loadView(\"ad_authenticationSettings.html\");\n }", "public function __construct($setting)\n {\n $this->setting = $setting;\n }", "abstract protected function define_my_settings();", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "public function __construct($settings) {\n\t\t$this->setting['length'] = $settings['length'];\n\t\t$this->setting['width'] = $settings['width'];\n\t\t$this->setting['height'] = $settings['height'];\n\t}", "function __construct() {\n $this->EE =& get_instance(); \n $this->EE->lang->loadfile('design');\n $this->EE->lang->loadfile('snippet_editor');\n $this->EE->db->select('settings')\n ->from('exp_modules')\n ->where('module_name', 'Snippet_editor')\n ->limit(1);\n $query = $this->EE->db->get();\n $this->settings = unserialize($query->row('settings')); \n }", "private function __construct()\n {\n require __DIR__ . \"/../config.php\";\n $this->setting = $confSettings;\n $this->adminLinks = $admin_link_array;\n $this->memberLinks = $member_link_array;\n }", "function __construct($settings=array()){\n\t\t\n\t\tOpenPayU_Configuration::setEnvironment('sandbox');\n\t\t//PayU::$apiKey \t\t= $settings['apiKey'];\n\t\t/*PayU::$apiLogin \t= $settings['apiLogin'];\n\t\tPayU::$merchantId = $settings['merchantId'];\n\t\tPayU::$language \t= $settings['language'];\n\t\tPayU::$isTest \t\t= $settings['test'];*/\n\t}", "function __construct()\n\t{\n\t\t$this->_ci =& get_instance();\n\n\t\t//load config\n\t\t$this->_ci->load->config('twilio', TRUE);\n\n\t\t$this->account_sid = $this->_ci->config->item('account_sid', 'twilio');\n\t\t$this->auth_token = $this->_ci->config->item('auth_token', 'twilio');\t\t\n\t}", "public function __construct()\n {\n parent::__construct();\n\n // Restrict access - View and Manage.\n $this->auth->restrict($this->permissionView);\n $this->auth->restrict($this->permissionManage);\n\t\t\n\t\t$this->load->model('bookmakers/bookmakers_model');\n\t\t$this->load->model('sports/sports_model');\n\t\t\n\t\t$this->load->helper('date_helper');\n\t\t\n\t\t$language = $this->input->cookie('language');\n\t\t$this->lang->load('settings',$language);\n\t\t\n if (! class_exists('settings_lib', false)) {\n $this->load->library('settings/settings_lib');\n }\n\n Template::set('toolbar_title', 'Site Settings');\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct()\r\n {\r\n $this->view = new stdClass;\r\n $this->view->placeHolder = $this->placeHolder;\r\n $this->view->settingOptionName = $this->settingOptionName;\r\n }", "public function __construct()\n\t{\n\t\t$codeigniter =& get_instance();\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_start');\n\t\t\n\t\t// Set the cache time from the config file\n\t\t$codeigniter->config->load('ionize', TRUE);\n\t\t$this->cache_time = $codeigniter->config->config['ionize']['data_model_cache'];\n\t\t\n\t\tif($codeigniter->session->language != \"\")\n\t\t{\n\t\t\t$cache = $codeigniter->cache->file->get(md5($codeigniter->session->language).'.Settings');\n\t\t\tif($cache != FALSE)\n\t\t\t{\n\t\t\t\t$settings = unserialize($cache);\n\t\t\t\t\n\t\t\t\t// Restore datas from cached class\n\t\t\t\t$this->_data \t\t= $settings->_data;\n\t\t\t\t$this->_raw_data \t= $settings->_raw_data;\n\t\t\t\t$this->_lang_data \t= $settings->_lang_data;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_end');\n\t\t\n\t\t// Generating class\n\t\t$this->initialize();\n\t\t\n\t\t// Saving instance reference\n\t\tself::$instance = $this;\n\t}", "function __construct(){\n parent::__construct();\n $this->load->model(\"Settings_model\");\n $this->load->helper(\"utils\");\n $this->checkAuth();\n }", "public function __construct() {\n $this->addVar([\n 'base_url' => 'http://example.com',\n 'base_dir' => '/',\n 'theme_dir' => 'themes',\n 'plugins_dir' => 'plugins'\n ], false, true);\n }", "function __construct() {\r\n $this->config->token = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"token\", '');\r\n $this->config->api = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"api\", '');\r\n $this->config->sender = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"sender\", '');\r\n\t}", "private function __construct()\n {\n // Set plugin file variables\n $this->file = __FILE__;\n $this->basename = plugin_basename($this->file);\n $this->plugin_dir = plugin_dir_path($this->file);\n $this->plugin_url = plugin_dir_url($this->file);\n\n // Load textdomain\n load_plugin_textdomain(self::TEXT_DOMAIN, false, dirname($this->basename) . '/languages');\n\n $this->settings = new SettingsPage();\n }", "public function __construct($settings) {\n $this->settings = array_merge($this->settings, $settings);\n }", "function __construct($settings) {\n // vars\n $this->name = 'cities';\n $this->label = __('Estados e Cidades');\n $this->category = __(\"Basic\",'acf'); // Basic, Content, Choice, etc\n $this->defaults = array(\n // add default here to merge into your field.\n // This makes life easy when creating the field options as you don't need to use any if (isset('')) logic. eg:\n //'preview_size' => 'thumbnail'\n );\n\n // do not delete!\n parent::__construct();\n\n // settings\n $this->settings = $settings;\n }", "public function __construct()\n {\n //$this->setting_array['user'] = new user(this);\n }", "public function __construct()\n {\n $this->st = site_settings::find(1);\n $this->middleware('guest');\n }", "public function settings()\n {\n }", "public function __construct() {\n parent::__construct();\n $this->middleware('guest', ['except' => 'logout']);\n \\View::share('settings', SiteSetting::getSettingObject());\n }", "public function __construct(array $settings) {\n $this->settings = $settings;\n }", "public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }", "public function __construct()\r\n\t{\r\n\t\t$this->ci =& get_instance();\r\n\t\t\r\n\t\t$this->ci->load->config('config');\r\n\t\t$this->alias_config = $this->ci->config->item('alias_config');\r\n\t\t$this->upload_config = $this->ci->config->item('upload_config');\r\n\t}", "public function __construct()\n\t{\n\t\t$this->registry\t\t= ipsRegistry::instance();\n\t\t$this->DB\t\t\t= $this->registry->DB();\n\t\t$this->settings\t\t=& $this->registry->fetchSettings();\n\t\t$this->lang\t\t\t= $this->registry->getClass('class_localization');\n\t}", "function __construct() {\r\n\t\t$this->ini = eZINI::instance(\"bfeztag_metadata.ini\");\r\n\t}", "public function __construct()\n {\n $this->fileprefix = Config::get('constants.FILEPREFIX');\n $this->filepermission = Config::get('constants.FILEPERMISSION');\n }", "public function init() {\r\n\t\tregister_setting( $this->key, $this->key );\r\n\t}", "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "function __construct(array $settings)\n {\n // Add more stuff to fluff out the configuration here\n $this->stdSettings = array(\n \"dr\" => $_SERVER['DOCUMENT_ROOT'],\n \"ds\" => DIRECTORY_SEPARATOR\n );\n \n $this->settings = array_merge($this->stdSettings, $settings);\n }", "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model(\"setting_m\");\n\t\t$language = $this->session->userdata('lang');\n\t\t$this->lang->load('setting', $language);\n\t}", "public function __construct()\r\n\t{\r\n\t\t$this->db = Zend_Registry::get('database');\r\n\t\t$this->conf = Zend_Registry::get('settings');\r\n\t}", "public function __construct(Settings $_settings) {\n\t\t$this->settings = $_settings;\n\n\n\n\t\t// hooks\n\t\tadd_action('init', array($this, 'on_init'));\n\t\tadd_action('after_setup_theme', array($this, 'on_after_setup_theme'));\n\n\t}", "public function __construct()\n {\n \tglobal $psp;\n\n \t$this->the_plugin = $psp;\n\t\t\t$this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/smushit/';\n\n\t\t\t$this->settings = $this->the_plugin->get_theoption( 'psp_smushit' );\n\t\t\t\n\t\t\t$this->init();\n }", "public function __construct() {\n $CI = & get_instance();\n $results = $CI->db->get('Settings')->result();\n\n foreach ($results as $setting) {\n\n $CI->config->set_item($setting->SettingName, $setting->SettingValue);\n }\n\n $results = $CI->db->get('Schools')->result();\n $schoolIdsValue = array();\n $schoolsInfo = array();\n\n $masterSchoolId = 1;\n\n foreach ($results as $school) {\n array_push($schoolIdsValue, $school->SchoolId);\n\n if ($school->IsMaster == 1) {\n $masterSchoolId = $school->SchoolId;\n }\n \n $schoolsInfo[$school->SchoolId] = $school;\n }\n\n $CI->config->set_item(\"school_ids\", $schoolIdsValue);\n $CI->config->set_item(\"school_metas\", $schoolsInfo);\n $CI->config->set_item(\"master_school_id\", $masterSchoolId);\n }", "function __construct($settings=FALSE)\n\t{\n\t\t// define a constant for the current site_id rather than calling $PREFS->ini() all the time\n\t\tif (defined('SITE_ID') == FALSE) {\n\t\t\tdefine('SITE_ID', get_instance()->config->item('site_id'));\n\t\t}\n\n\t\t$this->addon_id = strtolower(substr(__CLASS__, 0, -4));\n\t\tif(!isset($this->EE->session->cache[$this->addon_id])) {\n\t\t\t$this->EE->session->cache[$this->addon_id][\"members\"] = array();\n\t\t}\n\t}", "public function __construct()\r\n {\r\n try\r\n {\r\n parent::__construct();\r\n $this->tbl \t= \t$this->db->SITESETTING; \r\n\t\t $this->tbl_lang \t= $this->db->LANGUAGE; \r\n $this->conf \t=\t&get_config();\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function __construct() {\n $this->secretKey = $GLOBALS['config']['secret_key'];\n $this->accessKey = $GLOBALS['config']['access_key'];\n $this->sellerId = $GLOBALS['config']['seller_id'];\n $this->signatureMethod = $GLOBALS['config']['signature_method'];\n $this->signatureVersion = $GLOBALS['config']['signature_version'];\n $this->marketplaceId = $GLOBALS['config']['marketplace_id'];\n $this->version = $GLOBALS['config']['version'];\n }", "public function __construct()\n {\n $this->tpl = new \\Phalcon\\Config($this->tpl);\n self::$instance = $this;\n }", "public function init() {\n register_setting( $this->key, $this->key );\n }", "public function __construct()\n {\n $this->_config = sspmod_janus_DiContainer::getInstance()->getConfig();\n }", "protected function __construct() {\n\t\t\t$this->settings_page_id = 'permalink';\n\n\t\t\t// This is the 'option_name' key used in the wp_options table.\n\t\t\t$this->setting_option_key = 'learndash_settings_permalinks';\n\n\t\t\t// This is the HTML form field prefix used.\n\t\t\t$this->setting_field_prefix = 'learndash_settings_permalinks';\n\n\t\t\t// Used within the Settings API to uniquely identify this section.\n\t\t\t$this->settings_section_key = 'learndash_settings_permalinks';\n\n\t\t\t// Section label/header.\n\t\t\t$this->settings_section_label = __( 'LearnDash Permalinks', 'learndash' );\n\n\t\t\t// Used to show the section description above the fields. Can be empty.\n\t\t\t$this->settings_section_description = __( 'Controls the URL slugs for the custom posts used by LearnDash.', 'learndash' );\n\n\t\t\tadd_action( 'admin_init', array( $this, 'admin_init' ) );\n\n\t\t\tparent::__construct();\n\t\t\t$this->save_settings_fields();\n\t\t}", "public function __construct()\n {\n parent::__construct();\n// $this->upper_limit = self::getConfig('kandianbao', 'upper_limit')->config_value ?: 600;\n// $this->designArea = self::getConfig('kandianbao', 'area')->config_value;\n list($this->keywords, $this->keyword_num) = self::get_keyword_num();\n $this->keyword_catch_num = self::getConfig('kandianbao', 'keyword_catch_num')->config_value;\n }", "protected function __construct()\n {\n // Define the constants\n define('VALIB_CONFIG', $this->loadConfig());\n }", "public function init() {\n register_setting( self::$key, self::$key );\n }", "public function __construct()\n\t{\n\t\t//GSMS::$config =& get_config();\n\t\tGSMS::$class['system_log']->log('debug', \"Config Class Initialized\");\n\n\t\t// Set the base_url automatically if none was provided\n\t\tif (GSMS::$config['base_url'] == '')\n\t\t{\n\t\t\tif (isset($_SERVER['HTTP_HOST']))\n\t\t\t{\n\t\t\t\t$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';\n\t\t\t\t$base_url .= '://'. $_SERVER['HTTP_HOST'];\n\t\t\t\t$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$base_url = 'http://localhost/';\n\t\t\t}\n\t\t\tGSMS::$siteURL=$base_url;\n\t\t\t$this->set_item('base_url', $base_url);\n\t\t\t\n\t\t}\n\t}", "abstract public function get_settings();", "public function get_settings()\n {\n }", "function __construct()\n\t{\n\n\t\tparent::__construct();\n\t\t\n\t\t$this->data['isnewmember'] = false;\n\t\t\n\t\t\n\t\t$this->load->library('ion_auth');\n\n\t\t$this->phrases = $this->config->item('words');\n\n\t\t$this->data['site_settings'] = $this->config->item('site_settings');\n\t\t\t\t\n\t\t$this->isdemo = FALSE;\n\t}", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "public function init()\n {\n register_setting($this->key, $this->key);\n }", "public function __construct() {\r\n\t\t$this->_val = new \\tinyPHP\\Classes\\Core\\Val();\r\n\t}", "public function __construct() {\n\t\t\t$this->parent_menu_page_url = 'admin.php?page=learndash_lms_settings';\n\t\t\t$this->menu_page_capability = LEARNDASH_ADMIN_CAPABILITY_CHECK;\n\t\t\t$this->settings_page_id = 'learndash_lms_settings_custom_labels';\n\t\t\t$this->settings_page_title = esc_html__( 'Custom Labels', 'learndash' );\n\t\t\t$this->settings_tab_title = $this->settings_page_title;\n\t\t\t$this->settings_tab_priority = 20;\n\t\t\t$this->show_quick_links_meta = false;\n\n\t\t\tparent::__construct();\n\t\t}", "public function __construct() {\n\t\t$this->init();\n\t\t$this->register_globals();\n\t}", "protected function __construct() {\n\t\tglobal $conf, $DB;\n\t\tself::$_conf = $conf;\n\t\tself::$_DB = $DB;\n\t}", "function __construct() {\n\t\t$this->init();\n\t\t$this->register_globals();\n\t}", "public function __construct()\n\t{\n\t\t$doc = FDocument::getConfig();\n\t\t$this->base_dir = $doc->get('base_dir').$this->baseTemplate.DS.$doc->get('template');\n\t\t$this->base_url = $doc->get('base').$this->baseTemplate.DS.$doc->get('template').DS;\n\t\t$this->title\t= $doc->get('title');\n\t}", "function __construct(/*$value=NULL,$key=NULL,$settings=array()*/){\n $this->err = new opc_status($this->_init_msgs());\n $this->val = $this->s_get('val_init');\n $this->err->mode_success = 2;\n $this->err->lev_base = 2;\n $ar = func_get_args();\n call_user_func_array(array(&$this,'init'),$ar);\n }", "public function __construct()\n {\n $this->smsSettings = sms_setting();\n Config::set('twilio-notification-channel.auth_token', $this->smsSettings->auth_token);\n Config::set('twilio-notification-channel.account_sid', $this->smsSettings->account_sid);\n Config::set('twilio-notification-channel.from', $this->smsSettings->from_number);\n\n Config::set('nexmo.api_key', $this->smsSettings->nexmo_api_key);\n Config::set('nexmo.api_secret', $this->smsSettings->nexmo_api_secret);\n Config::set('services.nexmo.sms_from', $this->smsSettings->nexmo_from_number);\n\n Config::set('services.msg91.key', $this->smsSettings->msg91_auth_key);\n Config::set('services.msg91.msg91_from', $this->smsSettings->msg91_from);\n }", "public static function init()\n\t{\n\t\tself::initSettings();\n\t\tself::setupSettings();\n\t\tself::validateSettings();\n\t}", "public function __construct()\n {\n add_action('buzz-seo-settings-page-save-SettingsAdmin', array($this, 'rewritePermalinks'), 10, 2);\n\n // Allow seeing the results of our save immidiately\n add_action('buzz-seo-settings-page-save-SettingsAdmin', array($this, 'redirectAfterSave'), 99, 2);\n\n parent::__construct('SettingsAdmin');\n\n if (isset($_GET['saved'])) {\n $this->setTalData('message', __(\"Settings saved.\", \"buzz-seo\"));\n }\n\n // grab app\n $seo = \\NextBuzz\\SEO\\App::getInstance();\n\n // grapping every feature\n $features = $seo->getFeatures();\n\n // check if its an array\n if (is_array($features) == false) {\n throw new \\Exception(__(\"No Features available\", \"buzz-seo\"), 401);\n }\n\n $optionList = array();\n\n /* @var $class \\NextBuzz\\SEO\\Features\\BaseFeature */\n foreach ($features as $key => $class) {\n if ($class->allowDisable()) {\n array_push($optionList, array(\n 'key' => $key,\n 'name' => ucfirst($class->name()),\n 'desc' => ucfirst($class->desc()),\n 'check' => isset($this->options['features'][$key]) && $this->options['features'][$key] === \"1\",\n ));\n }\n }\n\n $this->setTalData(array(\n 'options' => $optionList,\n 'hasOptions' => count($optionList) > 0\n ));\n }", "public function __construct($settingsManager){\r\n // load all options\r\n $this->_config = $settingsManager->getOptions();\r\n }", "function __construct() {\n $this->getSystemConfig();\n }", "public function __construct()\n {\n $this->smsSettings = sms_setting();\n Config::set('twilio-notification-channel.auth_token', $this->smsSettings->auth_token);\n Config::set('twilio-notification-channel.account_sid', $this->smsSettings->account_sid);\n Config::set('twilio-notification-channel.from', $this->smsSettings->from_number);\n \n Config::set('nexmo.api_key', $this->smsSettings->nexmo_api_key);\n Config::set('nexmo.api_secret', $this->smsSettings->nexmo_api_secret);\n Config::set('services.nexmo.sms_from', $this->smsSettings->nexmo_from_number);\n\n Config::set('services.msg91.key', $this->smsSettings->msg91_auth_key);\n Config::set('services.msg91.msg91_from', $this->smsSettings->msg91_from);\n }", "public function __construct ($t=null,$c=null)\n\t\t{\n\t\t\t$this->config = parse_ini_file (\"../robot/settings.ini.php\");\n\t\t\t$this->t = $t;\n\t\t\t$this->c = $c;\n\t\t}", "public function __construct()\n\t{\n\t\t$this->setting = array_merge($this->setting, config('setting_epay', 'sms'));\n\t}", "public function __construct ($settings = array()) {\n $init_core = isset($settings[\"init_core\"]) ? $settings[\"init_core\"] : true;\n $start_sessions = isset($settings[\"start_sessions\"]) ? $settings[\"start_sessions\"] : true;\n\n if ($init_core) {\n Core::init(array(\n \"start_sessions\" => $start_sessions\n ));\n }\n }", "function __construct() {\n //added for code coverage.\n //$this->testValue = $testValue;\n }", "public function __construct()\n {\n $this->_config = request('_config');\n }", "public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }", "public function __construct() {\n $this->config();\n parent::__construct();\n }" ]
[ "0.7668059", "0.76312965", "0.76312965", "0.76312965", "0.7488203", "0.74873394", "0.7392064", "0.7227838", "0.7144004", "0.70597947", "0.70490205", "0.7039332", "0.7037621", "0.7014021", "0.70105183", "0.6957057", "0.6932968", "0.6888244", "0.68772376", "0.68737733", "0.6839477", "0.68184525", "0.6791598", "0.6790602", "0.67899495", "0.6774222", "0.67555165", "0.6734846", "0.67250687", "0.6722271", "0.6704685", "0.6693609", "0.66822386", "0.6678926", "0.6667749", "0.6667749", "0.666481", "0.66595227", "0.6652301", "0.66359353", "0.6635799", "0.662196", "0.6607711", "0.6606424", "0.6604724", "0.66008633", "0.6597474", "0.65846694", "0.657619", "0.6572313", "0.6571004", "0.65522844", "0.65424037", "0.6524294", "0.65238976", "0.6523652", "0.65197957", "0.65197957", "0.65197957", "0.651713", "0.6502356", "0.64887184", "0.647137", "0.6461006", "0.64562255", "0.64513516", "0.6450339", "0.64423424", "0.6441861", "0.64396745", "0.64354724", "0.6430523", "0.6424311", "0.6423937", "0.6419804", "0.6403475", "0.6375214", "0.6372519", "0.63719827", "0.6370152", "0.63678044", "0.63641834", "0.6363666", "0.63609993", "0.6357182", "0.6351044", "0.6346736", "0.6337188", "0.63307494", "0.63246405", "0.63220847", "0.6308649", "0.6298915", "0.62958384", "0.6278646", "0.62705517", "0.626875", "0.6263242", "0.62620366", "0.6249221", "0.6249076" ]
0.0
-1
pluginReadSettingsPage setup settings menu to go to settings page.
public function pluginSettingsMenu() { $hook_suffix = add_options_page(__('Rundizable WP Features', 'rundizable-wp-features'), __('Rundizable WP Features', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-settings', [$this, 'pluginSettingsPage']); add_action('load-' . $hook_suffix, [$this, 'registerScripts']); unset($hook_suffix); //add_options_page(__('Rundizable WP Features read settings value', 'rundizable-wp-features'), __('Rundizable WP Features read settings', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-read-settings', [$this, 'pluginReadSettingsPage']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pluginReadSettingsPage()\n {\n $this->getOptions();\n global $rundizable_wp_features_optname;\n\n $output['rundizable_wp_features_optname'] = $rundizable_wp_features_optname;\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/readsettings_v', $output);\n unset($Loader, $output);\n }", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "public function initialize_settings_page()\n {\n }", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "public function settings_page() {\r\n\t\tadd_submenu_page( 'edit.php?post_type=news', __( 'Settings', 'news-manager' ), __( 'Settings', 'news-manager' ), 'manage_options', 'news-settings', array( $this, 'options_page' ) );\r\n\t}", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "public function add_settings_page() {\n add_options_page( \n \"WP BXSlider Settings\", // $page_title\n \"WP BXSlider\", // $menu_title\n \"manage_options\", // $capability (ie: permissions)\n $this->name, // $menu_slug\n array($this, 'render_admin_page') // callback to render view\n );\n }", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }", "public function plugin_settings_page() {\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\twp_die( esc_html( 'You do not have sufficient permissions to access this page.' ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Render the settings template.\r\n\t\t\tinclude( sprintf( '%s/templates/settings.php', dirname( __FILE__ ) ) );\r\n\t\t}", "public function add_settings_page() {\n\t\tadd_submenu_page(\n\t\t\t'case27/tools.php',\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t'manage_options',\n\t\t\t'theme-mapservice-settings',\n\t\t\tfunction() {\n\t\t\t\t$config = $this->get_config();\n\t\t\t\trequire locate_template( 'templates/admin/theme-options/map-services.php' );\n\t\t\t}\n\t\t);\n\t}", "public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}", "function admin_settings_pages( $settings_pages )\n{\n $settings_pages[] = array(\n 'id' => 'general',\n 'option_name' => 'general_settings',\n 'menu_title' => __( 'Configuratie', 'textdomain' ),\n 'icon_url' => 'dashicons-layout',\n );\n // Register setting page: 'Option for site'\n $settings_pages[] = array(\n 'id' => 'admin_settings_general',\n 'option_name' => 'general_option',\n 'menu_title' => __( 'Option for site', 'textdomain' ),\n 'parent' => 'general',\n );\n return $settings_pages;\n}", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "public function add_menu() {\r\n\t\t\t\t// Add a page to manage this plugin's settings.\r\n\t\t\tadd_options_page(\r\n\t\t\t\t'Sift Ninja Settings',\r\n\t\t\t\t'Sift Ninja',\r\n\t\t\t\t'manage_options',\r\n\t\t\t\t'sift_ninja',\r\n\t\t\t\tarray( &$this, 'plugin_settings_page' )\r\n\t\t\t);\r\n\t\t}", "function coolRahulSoni_custom_settings_add_menu() {\n add_menu_page( 'CoolRahulSoni Custom Settings', 'CoolRahulSoni Custom Settings', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99 );\n}", "public function menu_item() {\n add_options_page('ShareFile API', 'ShareFile API', 'read', 'sharefile-api', array($this, 'settings_page'));\n }", "public function create_plugin_settings_page() {\n\t\t$page_title = 'Boss Directory Settings';\n\t\t$menu_title = 'Settings';\n\t\t$capability = 'manage_options';\n\t\t$slug = 'boss_directory';\n\t\t$callback = array( $this, 'plugin_settings_page_content' );\n\t\t$icon = 'dashicons-admin-plugins';\n\t\t$position = 99;\n\n\t\tadd_submenu_page( 'edit.php?post_type=listing', $page_title, $menu_title, $capability, $slug, $callback );\n\t}", "public function pluginSettingsPage()\n {\n // check permission.\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have permission to access this page.'));\n }\n\n // load config values to get settings config file.\n $loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $config_values = $loader->loadConfig();\n if (is_array($config_values) && array_key_exists('rundiz_settings_config_file', $config_values)) {\n $settings_config_file = $config_values['rundiz_settings_config_file'];\n } else {\n echo 'Settings configuration file was not set.';\n die('Settings configuration file was not set.');\n exit;\n }\n unset($config_values, $loader);\n\n $RundizSettings = new \\RundizableWpFeatures\\App\\Libraries\\RundizSettings();\n $RundizSettings->settings_config_file = $settings_config_file;\n\n $options_values = $this->getOptions();\n\n // if form submitted\n if (isset($_POST) && !empty($_POST)) {\n if (!wp_verify_nonce((isset($_POST['_wpnonce']) ? $_POST['_wpnonce'] : ''))) {\n wp_nonce_ays('-1');\n }\n\n // populate form field values.\n $options_values = $RundizSettings->getSubmittedData();\n\n // you may validate form here first.\n // then save data.\n $result = $this->saveOptions($options_values);\n\n if ($result === true) {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n } else {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n }\n }// endif $_POST\n\n $output['settings_page'] = $RundizSettings->getSettingsPage($options_values);\n unset($RundizSettings, $options_values);\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/settings_v', $output);\n unset($Loader, $output);\n }", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "public function settings_reading_admin_init(){\n /*\n // pull the backend setting for the page.\n $landing_page_id = get_option( 'ditarole_page' );\n if(function_exists('icl_object_id')) {\n $landing_page_id = icl_object_id($landing_page_id, 'page', false, ICL_LANGUAGE_CODE);\n }\n */\n\n // register our setting\n $args = array(\n 'type' => 'string', \n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => NULL,\n );\n register_setting( \n 'reading', // option group \"reading\", default WP group\n 'ccmsversion_page', // option name\n $args \n );\n\n // add our new setting\n add_settings_field(\n 'ccmsversion_page', // ID\n __('CCMS Versions Landing Page', 'textdomain'), // Title\n array( $this, 'setting_callback_function'), // Callback\n 'reading', // page\n 'default', // section\n array( 'label_for' => 'ccmsversion_page' )\n );\n\n }", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function create_plugin_settings_page() {\n \t$page_title = 'My Awesome Settings Page';\n \t$menu_title = 'Awesome Plugin';\n \t$capability = 'manage_options';\n \t$slug = 'smashing_fields';\n \t$callback = array( $this, 'plugin_settings_page_content' );\n \t$icon = 'dashicons-admin-plugins';\n \t$position = 100;\n\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "public function add_settings_page() {\n\t\t$this->settings_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Settings', 'conf-schedule' ),\n\t\t\t__( 'Settings', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-settings',\n\t\t\tarray( $this, 'print_settings_page' )\n \t);\n\t}", "function BitTicket_plugin_settings() {\r\n add_menu_page('BitTicket', 'BitTicket', 'administrator', 'BitTicket_settings', 'BitTicket_display_settings');\r\n}", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function add_settings_page() {\n\tadd_menu_page( __( 'Theme Options' ), __( 'Theme Options' ), 'manage_options', 'settings', 'theme_settings_page');\n}", "public function render_settings_page()\n {\n }", "public function settings_page() {\n\t\tTheme_My_Login_Admin::settings_page( array(\n\t\t\t'title' => __( 'Theme My Login reCAPTCHA Settings', 'theme-my-login' ),\n\t\t\t'options_key' => $this->options_key\n\t\t) );\n\t}", "public function settings()\n\t\t{\n\t\t\t$section = 'reading';\n\t\t\tadd_settings_section(\n\t\t\t\t$this->tag . '_settings_section',\n\t\t\t\t$this->name . ' Settings',\n\t\t\t\tfunction () {\n\t\t\t\t\techo '<p>Configuration options for the ' . esc_html( $this->name ) .' plugin.</p>';\n\t\t\t\t},\n\t\t\t\t$section\n\t\t\t);\n\t\t\tforeach ( $this->settings AS $id => $options ) {\n\t\t\t\t$options['id'] = $id;\n\t\t\t\tadd_settings_field(\n\t\t\t\t\t$this->tag . '_' . $id . '_settings',\n\t\t\t\t\t$id,\n\t\t\t\t\tarray( &$this, 'settings_field' ),\n\t\t\t\t\t$section,\n\t\t\t\t\t$this->tag . '_settings_section',\n\t\t\t\t\t$options\n\t\t\t\t);\n\t\t\t}\n\t\t\tregister_setting(\n\t\t\t\t$section,\n\t\t\t\t$this->tag,\n\t\t\t\tarray( &$this, 'settings_validate' )\n\t\t\t);\n\t\t}", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "function do_settings_sections($page)\n {\n }", "public function register_settings_page() {\n\t\tif ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$page_callback = array( $this->menu, 'load_page' );\n\n\t\tadd_menu_page(\n\t\t\t'Yoast SEO: ' . __( 'MultiSite Settings', 'wordpress-seo' ),\n\t\t\t__( 'SEO', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\tarray( $this, 'network_config_page' ),\n\t\t\tWPSEO_Utils::get_icon_svg()\n\t\t);\n\n\t\tif ( WPSEO_Utils::allow_system_file_edit() === true ) {\n\t\t\tadd_submenu_page(\n\t\t\t\t$this->menu->get_page_identifier(),\n\t\t\t\t'Yoast SEO: ' . __( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t__( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t'delete_users', 'wpseo_files',\n\t\t\t\t$page_callback\n\t\t\t);\n\t\t}\n\n\t\t// Add Extension submenu page.\n\t\tadd_submenu_page(\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\t'Yoast SEO: ' . __( 'Extensions', 'wordpress-seo' ),\n\t\t\t__( 'Extensions', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t'wpseo_licenses',\n\t\t\t$page_callback\n\t\t);\n\t}", "public function settings_page()\r\n {\r\n add_submenu_page('giga',\r\n __('Notifications', 'giga-messenger-bots'),\r\n __('Notifications', 'giga-messenger-bots'),\r\n 'manage_options',\r\n 'notifications',\r\n [$this, 'render']\r\n );\r\n }", "public function settings_page() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\tadd_action( 'inf_member_settings_after_header_' . $this->hook_suffix, array( 'Inf_Member_App_Settings', 'after_header' ) );\r\n\r\n Inf_Member_Settings::settings_page_template( $this->hook_suffix, __( 'Inf Member Settings', 'inf-member' ) );\r\n\t}", "public function settings_menu(){\n // add_submenu_page($parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '')\n add_submenu_page('tools.php','Checksum Generator', 'MD5 Checksums', 'manage_options', 'checksum-generator', array($this, 'theme_options_page'));\n\n //call register settings function\n add_action( 'admin_init', array($this, 'register_settings' ));\n }", "function cpjr3_settings_page() {\n\n add_options_page( __( 'Click Points Settings', 'cpjr3' ), __( 'Click Points', 'cpjr3' ), 'administrator', __FILE__, 'cpjr3_settings_fn' );\n\n}", "public function settings_screen() {\n\t\tglobal ${class_name};\n\t\tdo_action( ${class_name}->token . '_before_settings' );\n\t\tdo_action( $this->token . '_before_settings' );\n\t\tsettings_fields( $this->token );\n\t\tdo_settings_sections( $this->token );\n\t\tdo_action( $this->token . '_after_settings' );\n\t\tdo_action( ${class_name}->token . '_after_settings' );\n\t\tsubmit_button();\n\t}", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "function DisplaySettings()\n {\n $this->DisplayBreadcrumb();\n PrintPluginSettings($this->pluginid, array('form_wizard_settings','form_export_settings'), $this->_page);\n }", "function boj_menuexample_create_menu() {\n\tadd_options_page( 'My Plugin Settings Page', 'Menu Example Settings', 'manage_options', __FILE__, 'boj_menuexample_settings_page' );\n\t\n}", "public function page_init()\n { \n register_setting(\n 'my_option_group', // Option group\n 'my_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'CLAS DEPT Theme Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'dept_address', // ID\n 'Department Address', // Title \n array( $this, 'dept_address_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Footer Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'fb', \n 'Facebook Link', \n array( $this, 'fb_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'twitter', \n 'Twitter Link', \n array( $this, 'twitter_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'instagram', \n 'Instagram Link', \n array( $this, 'instagram_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'youtube', \n 'Youtube Link', \n array( $this, 'youtube_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'rss', \n 'RSS Link', \n array( $this, 'rss_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n \n }", "public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "function hoopsai_wp_settings_do_page() {\n ?>\n <div id=\"hoopsai_wp_settings\"></div>\n <?php\n }", "function settings_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-settings.php\" );\r\n }", "function star_networking_create_menu()\n{\n add_menu_page('Star Network Settings', 'Homepage Manager', 'administrator', __FILE__, 'star_networking_settings_page');\n\n //call register settings function\n add_action('admin_init', 'star_networking_settings');\n}", "public function registerMenu()\n\t\t{\n\t\t\tadd_options_page( 'Thingdom Settings', 'Thingdom Settings', 'manage_options', $this->slug, array($this, 'loadSettings')); \n\t\t\tadd_action('admin_init', array($this, 'registerSettings'));\n\t\t}", "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}", "public function settings_page_init() {\n $this->registration();\n $this->sections();\n }", "public function show_settings_page() : void {\n\t\t\t$categories = self::get_categories();\n\n\t\t\tSFWD_LMS::get_view(\n\t\t\t\t'support/help',\n\t\t\t\tarray(\n\t\t\t\t\t'categories' => $categories,\n\t\t\t\t),\n\t\t\t\ttrue\n\t\t\t);\n\t\t}", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "private\n\t\tstatic function get_settings_url() {\n\t\t\treturn admin_url( 'options-general.php?page=' . self::LINKID_SETTINGS_PAGE_ID );\n\t\t}", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public static function menu_subpage_settings(){\n \t\t\n\t\t\tadd_submenu_page('edit.php?post_type='.self::$post_type, \n\t\t\t\t\t\t\t self::$page_title_settings, \n\t\t\t\t\t\t\t 'Settings', \n\t\t\t\t\t\t\t self::$capability,\n\t\t\t\t\t\t\t 'menu_settings',\n array( __CLASS__, 'menu_generator_settings'));\n\t\t\n\t\t}", "public function page_init()\n { \n add_settings_section(\n 'setting_section_id', // ID\n 'My Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'id_number', // ID\n 'ID Number', // Title \n array( $this, 'id_number_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n );\n add_settings_field(\n 'checkbox', \n 'Checkbox', \n array( $this, 'checkbox_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'radio', \n 'Radio', \n array( $this, 'radio_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n add_settings_field(\n 'textarea', \n 'Textarea', \n array( $this, 'textarea_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n );\n add_settings_field(\n 'select', \n 'Select', \n array( $this, 'select_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n }", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "function on_admin_menu ()\n{\n /** @var Settings_Page|null The settings page */\n global $settings_page;\n $settings_page = new Settings_Page ();\n global $plugin_name;\n\n // adds a menu entry to the settings menu\n add_options_page (\n $plugin_name . ' Options',\n $plugin_name,\n 'manage_options',\n 'cap_meta_search_options',\n array ($settings_page, 'display')\n );\n}", "function insta_f_create_menu(){\n\tadd_options_page('Instagram Portfolio Settings', 'Instagram Portfolio', 'manage_options', INSTA_FOLIO_SETTINGS_PAGE, 'insta_f_settings_page');\t\n}", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "public function admin_settings(){\n\t\t$this->menu_pages['main'] = add_menu_page( $this::$plugin_name, 'WP LMS Settings', 'manage_options', $this::$plugin_name, array( $this, 'main_options_page' ) );\n\t\t//add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n\t\t\n\t\t//$this->menu_pages['schedule'] = add_submenu_page( \"edit.php?post_type=session\", 'WP LMS Schedule', 'Schedule Courses', 'manage_options', $this::$plugin_name.'_schedule', array( $this,\"schedule_page\" ), $this->plugin_img_url.'png/24/schedule.png' );\n\t\t//$this->menu_pages['assignments'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Assignments', 'Assignments', 'manage_options', $this::$plugin_name.'_assignment', array( $this,\"assignment_page\" ) );\n\t\t//$this->menu_pages['lectures'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Lectures', 'Lectures', 'manage_options', $this::$plugin_name.'_lecture', array( $this,\"lecture_page\" ) );\n\t\t//$this->menu_pages['settings'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Settings', 'Settings', 'manage_options', $this::$plugin_name.'_settings', array( $this,\"settings_page\" ) );\n\t\t//edit.php?post_type=student_directory\n\t\t$this->menu_pages['view-student'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS View Students', 'View Students', 'manage_options', $this::$plugin_name.'_view_student', array( $this,\"view_student\" ) );\n\t\t$this->menu_pages['student-attendance'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS Student attendance', 'Student Attendance', 'manage_options', $this::$plugin_name.'_student_attendance', array( $this,\"student_attendance\" ) );\n\t\t//$this->menu_pages['settings-student'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS Student Settings', 'Settings', 'manage_options', $this::$plugin_name.'_student_settings', array( $this,\"student_settings\" ) );\n\t\t$this->menu_pages['view-instructors'] = add_submenu_page( \"edit.php?post_type=instructor\", 'WP LMS View Instrustors', 'View Instrustors', 'manage_options', $this::$plugin_name.'_view_instructor', array( $this,\"view_instructor\" ) );\n\t\t//$this->menu_pages['view-course-students'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS View Course Students', 'View Enrollment', 'manage_options', $this::$plugin_name.'_view_enrollment', array( $this,\"view_enrollment\" ) );\n\t\t//add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\t}", "public function admin_init() {\n\t\t\tdo_action( 'learndash_settings_page_init', $this->settings_page_id );\n\t\t}", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function initSettingsPage()\n {\n // admin sections\n $this->_addSection('schemas', __('Schemas', 'my_seo_settings'));\n $this->_addSection('special', __('Thematic Schemas', 'my_seo_settings'));\n $this->_addSection('front_page', __('General Settings', 'my_seo_settings'));\n $this->_addSection('compatibility', __('Compatibility', 'my_seo_settings'));\n\n /*\n * Adds fields to default section\n */\n $this->_addSchemaTagLocation('generate_json_ld_fpwebpage_hook_short_code', __('Schema Tag Location', 'my_seo_settings'), 'front_page');\n $this->_addInputField('generate_json_ld_fpwebpage_name', __('Website Title', 'my_seo_settings'), 'front_page');\n\t\t$this->_addInputField('generate_json_ld_fpwebpage_inlanguage', __('Website Language', 'my_seo_settings'), 'front_page');\n // Schemas\n $this->_addCheckboxField('generate_json_ld_fpwebpage', __('WebPage Schema for Home Page', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_webpage', __('WebPage Schema for Pages', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_posts', __('WebPage Schema for Posts', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_menu', __('WPHeader Schema', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_fmenu', __('WPFooter Schema', 'my_seo_settings'), 'schemas');\n\t\t$this->_addInputField('generate_json_ld_logo_url', __( 'Logo URL', 'my_seo_settings'), 'schemas');\n\n // Special\n $recipeHint = 'On individual post editing page Recipe specific fields will appear. When filled in they would show up in a Recipe schema on the page.';\n $faqHint = 'FAQ questions and answers are being added manually. go to the each page/post editor you would like to add - this schema must be enabled to take effect';\n\n $this->_addCheckboxField('generate_json_ld_recipe', __('Recipe Schema', 'my_seo_settings'), 'special', $recipeHint);\n $this->_addCheckboxField('generate_json_ld_faq', __('FAQ Schema', 'my_seo_settings'), 'special', $faqHint);\n $this->_addCustomField('generate_json_ld_person_schema', __('Person Schema', 'my_seo_settings'), [$this, '_renderPersonSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_product_schema', __('Product Schema', 'my_seo_settings'), [$this, '_renderProductSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_contact_page_schema', __('Contact Page Schema', 'my_seo_settings'), [$this, '_renderContactPageSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_about_page_schema', __('About Page Schema', 'my_seo_settings'), [$this, '_renderAboutPageSchemaField'], 'special');\n\t\t$this->_addCheckboxField('search_bar', __('Search Bar - Does the website have a search bar?', 'my_seo_settings'), 'compatibility');\n\t\t$this->_addCheckboxField('generate_json_ld_author', __( 'Author Schema', 'my_seo_settings'), [$this, '_renderAuthorPageSchemaField'], 'special' );\n $this->_addCheckboxField('yoast_disable', __('Yoast schema Off', 'my_seo_settings'), 'compatibility');\n }", "function boj_menuexample_create_menu() {\r\n\t\r\n\t//create a submenu under Settings\r\n\tadd_options_page( 'Leo Plugin Settings Page', 'Menu Example Settings', 'manage_options', 'settings-submenu', 'boj_menuexample_settings_page' );\r\n\t\r\n}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "public function all_settings_link() {\n \tadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n }", "function settings_section() {\n\t\t}", "public function init_settings_page()\n\t\t{\n\n\t\t\t$this->template_header();\n\t\t\t$this->template_body();\n\t\t\t$this->template_footer();\n\n\t\t}", "public function showSettingsPage()\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $configValues = $config->read();\n\n // Regex out the setting values and comments to provide a list of settings that we can render out.\n foreach ($this->fieldGroups as $field => $group) {\n\n if (!key_exists($field, $this->labelOverrides)) {\n $label = ucwords(str_replace('_', ' ', $field));\n } else {\n $label = $this->labelOverrides[$field];\n }\n\n // Get the value from the settings file...\n $value = $configValues[$field];\n\n $inputType = Setting::TYPE_TEXT;\n if (in_array($field, $this->booleanFields)) {\n $inputType = Setting::TYPE_BOOL;\n }\n\n $inputComments = null;\n if (key_exists($field, $this->fieldComments)) {\n $inputComments = $this->fieldComments[$field];\n }\n\n $panelInputs[$group][] = new Setting($field, $label, $group, $value, $inputType, $inputComments);\n }\n\n\n return view('_pages.settings')->with('panels', $panelInputs);\n }", "public function settings_page() {\n do_action( 'rewardpoint_settings_start' );\n $current_tab = empty( $_GET['tab'] ) ? 'behavior' : sanitize_title( $_GET['tab'] );\n $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n $tabs = apply_filters( 'woocommerce_settings_tabs_array', array(\n 'behavior' => 'Behaviors',\n 'purchase' => 'Purchases',\n 'referral' => 'Referrals',\n 'invite' => 'Invite and Share',\n 'user-point' => 'Use Reward Points',\n ) );\n include 'views/html-admin-page.php';\n\t}", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "public function settings_page() {\n\n\t\t?>\n\n\t\t<div class=\"wrap schedule-a-visit-to-sherpa-settings\">\n\t\t\t\n\t\t\t<form id=\"schedule-a-visit-to-sherpa-form\" method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'schedule_a_visit_to_sherpa_data', 'schedule_a_visit_to_sherpa_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'schedule_a_visit_to_sherpa_settings_section' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'schedule-a-visit-to-sherpa' ); ?>\n\t\t\t\t\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n\t\t<?php\n\n\t}", "public function optionsdemo_create_settings() {\n\t\t\t$parent_slug = 'edit.php?post_type=optiondemo';\n\t\t\t$page_title = esc_html__( 'Settings', 'optionsdemo' );\n\t\t\t$menu_title = esc_html__( 'Settings', 'optionsdemo' );\n\t\t\t$capability = 'manage_options';\n\t\t\t$slug = 'optionsdemo';\n\t\t\t$callback = array( $this, 'optionsdemo_settings_content' );\n\t\t\t\n\t\t\t//add submenu to custom post\n\t\t\tadd_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $slug, $callback );\n\t\t}", "function sh_add_admin_page_callback(){\n //Generate custom settings admin page\n add_menu_page( 'Custom Options', 'Custom Settings', 'manage_options', 'custom_settings', 'sh_create_custom_settings_page' );\n}", "public function add_plugin_settings_page() {\n\t\tadd_options_page(\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t'manage_options',\n\t\t\t'bwcpp_settings',\n\t\t\tarray( $this, 'render_settings_page' )\n\t\t);\n\t}", "public function settings()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['save']) && $_POST['save'] == 'Save Settings')\n\t\t\t{\n\t\t\t\tPlugin::setAllSettings($_POST['setting'], 'mbblog');\n\t\t\t\tFlash::setNow('success', __('Settings have been saved!'));\t\t \t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->display('mbblog/views/admin/settings', array('settings' => Plugin::getAllSettings('mbblog')));\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "function plugin_settings_link( $links){ \n $settings_link = '<a href=\"options-general.php?page=esbs-plugin-settings\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n }", "public function redq_rental_get_settings_pages($settings)\n {\n $settings[] = include('includes/admin/class-redq-rental-settings-rnb.php');\n return $settings;\n }", "function myprefix_init_settings() {\t\n\t\n\t// Settings section:\n\t// Multiple settings can go into this section after we set it up.\n\t// We are going to add three settings into this one section.\n\t\tadd_settings_section(settingsSectionOneSlug, settingsSectionOneTitle, \n\t\t\tsettingsSectionOneCallbackFunction, settingsPageID);\n\t\n\t// Settings field:\n\t// We add settings fields to our settings section:\n\t\tadd_settings_field(settingOneSlug, settingOneTitle, settingOneCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingOneSlug ));\n\t\tadd_settings_field(settingTwoSlug, settingTwoTitle, settingTwoCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingTwoSlug ));\n\t\tadd_settings_field(settingThreeSlug, settingThreeTitle, settingThreeCallbackFunction, \n\t\t\tsettingsPageID, settingsSectionOneSlug, array( 'label_for' => settingThreeSlug ));\n\t\n\t// Setting:\n\t// Now we register our settings:\n\t\tregister_setting(settingsPageID, settingOneSlug, settingOneValidationFunction);\n\t\tregister_setting(settingsPageID, settingTwoSlug, settingTwoValidationFunction);\n\t\tregister_setting(settingsPageID, settingThreeSlug, settingThreeValidationFunction);\n}", "public function settings_page_content() {\n\t\t// Common items.\n\t\t$args = [\n\t\t\t'network' => $this->is_network(),\n\t\t];\n\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Is plugin active network wide.\n\t\t$networkwide = General::is_networkwide();\n\n\t\tswitch ( $tab ) {\n\t\t\tcase 'reports':\n\t\t\t\t$roles = Permission::get_roles();\n\t\t\t\t// If subsites can not over write.\n\t\t\t\tif ( ! Permission::can_overwrite() && $networkwide ) {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', true, [] );\n\t\t\t\t} else {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', $this->is_network(), [] );\n\t\t\t\t}\n\t\t\t\tforeach ( $roles as $role => $data ) {\n\t\t\t\t\t// Leave administrators please. They are powerful.\n\t\t\t\t\tif ( 'administrator' === $role ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! in_array( $role, $selected, true ) ) {\n\t\t\t\t\t\tunset( $roles[ $role ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only applicable on single/sub site.\n\t\t\t\t$args['roles'] = $roles;\n\t\t\t\t$args['dashboard_tree'] = Analytics_Settings::instance()->dashboard_tree();\n\t\t\t\t$args['statistics_tree'] = Analytics_Settings::instance()->statistics_tree();\n\t\t\t\t$args['dashboard_selected'] = beehive_analytics()->settings->get( 'dashboard', 'reports', false, [] );\n\t\t\t\t$args['statistics_selected'] = beehive_analytics()->settings->get( 'statistics', 'reports', false, [] );\n\t\t\t\tbreak;\n\t\t\tcase 'permissions':\n\t\t\t\t$args['roles'] = Permission::get_roles();\n\t\t\t\tbreak;\n\t\t\tcase 'tracking':\n\t\t\t\t$args['settings_page'] = Template::settings_page( 'general', $this->is_network() );\n\t\t\t\t$args['tracking'] = beehive_analytics()->settings->get( 'code', 'tracking' );\n\t\t\t\t$args['network_tracking'] = beehive_analytics()->settings->get( 'code', 'tracking', true );\n\t\t\t\t$args['auto_tracking'] = beehive_analytics()->settings->get( 'auto_track', 'google', $this->is_network() );\n\t\t\t\t$args['auto_tracking_code'] = beehive_analytics()->settings->get( 'auto_track', 'misc', $this->is_network() );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$anonymize_visible = true;\n\t\t\t\tif ( $networkwide && ! $this->is_network() ) {\n\t\t\t\t\tif ( beehive_analytics()->settings->get( 'anonymize', 'general', true )\n\t\t\t\t\t && beehive_analytics()->settings->get( 'force_anonymize', 'general', true )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$anonymize_visible = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Get Pro Sites levels.\n\t\t\t\t$args['ps_levels'] = $this->is_network() ? Permission::get_ps_levels() : false;\n\t\t\t\t$args['anonymize_visible'] = $anonymize_visible;\n\t\t\t\t$args['networkwide'] = $networkwide;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Render network settings content.\n\t\t$this->view( \"settings/tabs/{$tab}\", $args );\n\t}", "function plugin_admin_add_page() {\n\t\tadd_options_page('Tupuk Sample Plugin Settings', 'Tupuk Sample Plugin', 'manage_options', 'tupuk_sample_plugin', array($this, 'plugin_options_page'));\n\t\tadd_action( 'admin_init', array($this, 'register_mysettings') ); //call register settings function\n\t}", "public function add_reading_settings(){\n add_settings_section('theme-pages-section', __('Custom page settings', 'theme-translations '), array($this, 'add_additional_page_settings'), 'reading');\n }", "public function add_reading_settings(){\n add_settings_section('theme-pages-section', __('Custom page settings', 'theme-translations '), array($this, 'add_additional_page_settings'), 'reading');\n }", "public function add_settings_submenu() {\n add_options_page(\n 'Update Monitor Settings',\n 'Update Monitor',\n 'manage_options',\n 'update-monitor-menu',\n array($this, 'update_monitor_page')\n );\n }", "public function settingsPage() {\n require_once 'form.phtml';\n }", "public function add_option_pages(){\n $options = array(\n 'success_stories' => __('Success Stories', 'theme-translations'),\n 'team' => __('Team Page', 'theme-translations'),\n 'events' => __('Events Page', 'theme-translations'),\n );\n\n foreach ($options as $key => $name) {\n $option_name = 'theme_page_'.$key;\n\n register_setting( 'reading', $option_name );\n\n add_settings_field(\n 'theme_setting_'.$key,\n $name,\n\n array(__CLASS__, 'page_select_callback'),\n\n 'reading',\n 'theme-pages-section',\n\n array(\n 'id' => 'theme_setting_'.$key,\n 'option_name' => $option_name,\n )\n );\n }\n }", "private function _loadPageSettings(){\r\n\r\n $uri = $this->_getContentURI();\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.$uri.DS.'settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->pageSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $page_dir = ROOT.DS.'site'.DS.'content';\r\n foreach(explode('/', $uri) as $dir){\r\n $page_dir .= DS.$dir;\r\n if(!file_exists($page_dir)){\r\n mkdir($page_dir);\r\n }\r\n }\r\n $pageSettings = new stdClass();\r\n $pageSettings->page_title = '';\r\n $pageSettings->page_script = '';\r\n file_put_contents($settings, json_encode($pageSettings));\r\n }\r\n\r\n }", "public function page_init()\n {\n register_setting(\n 'sepw_option_group', // Option group\n 'sepw_settings', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'info_section_id',\n __('Guide', 'sepw'),\n array($this, 'print_info_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('Settings', 'sepw'), // Title\n array($this, 'print_settings_section_info'), // Callback\n 'sepw-setting-admin' // Page\n );\n\n add_settings_section(\n 'generate_section_id',\n __('Create Pricelist', 'sepw'),\n array($this, 'print_generate_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_field(\n 'product_fields',\n __('Filters', 'sepw'),\n array($this, 'product_fields_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'images_size',\n __('Thumbnail size', 'sepw'),\n array($this, 'images_size_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'cache_lifetime',\n __('Update Frequency', 'sepw'),\n array($this, 'cache_lifetime_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n }", "public function add_option_pages(){\n $options = array(\n 'tower_revenue' => __('Tower Revenue', 'theme-translations'),\n );\n\n foreach ($options as $key => $name) {\n $option_name = 'theme_page_'.$key;\n\n register_setting( 'reading', $option_name );\n\n add_settings_field(\n 'theme_setting_'.$key,\n $name,\n\n array(__CLASS__, 'page_select_callback'),\n\n 'reading',\n 'theme-pages-section',\n\n array(\n 'id' => 'theme_setting_'.$key,\n 'option_name' => $option_name,\n )\n );\n }\n }", "function admin_menu(){\t\tif(!empty($this->settings_manager->sections)){\n\t\t\tadd_theme_page(__('Theme Settings'), __('Theme Settings'), 'edit_theme_options', $this->options->option_name, array($this, 'theme_settings'));\n\t\t}\n\t}", "public function composerSettings() {\n\n if ( current_user_can('manage_options') && $this->composer->isPlugin()) {\n //add_options_page(__(\"Swift Page Builder Settings\", \"js_composer\"), __(\"Swift Page Builder\", \"js_composer\"), 'install_plugins', \"wpb_vc_settings\", array($this, \"composerSettingsMenuHTML\"));\n }\n }", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function display_plugin_admin_page() {\n\t\t\tinclude_once( 'views/settings-page.php' );\n\t\t}", "public function load_settings_page() : void {\n\n\t\t\tglobal $learndash_assets_loaded;\n\n\t\t\tself::enqueue_support_assets();\n\n\t\t\t$learndash_assets_loaded['styles']['learndash-admin-help-page-style'] = __FUNCTION__;\n\n\t\t\t$learndash_assets_loaded['scripts']['learndash-admin-help-page-script'] = __FUNCTION__;\n\t\t}" ]
[ "0.7682864", "0.7621314", "0.7515705", "0.7485657", "0.7411578", "0.73668146", "0.73350513", "0.72660524", "0.72298187", "0.7172007", "0.71311784", "0.7124491", "0.71132743", "0.7112662", "0.7100454", "0.7099325", "0.70944405", "0.70851076", "0.7076803", "0.70503736", "0.7037964", "0.7021592", "0.7014627", "0.7009788", "0.700059", "0.69968307", "0.6994436", "0.69938743", "0.69859314", "0.69859314", "0.69611293", "0.69260013", "0.6921236", "0.6913123", "0.69109887", "0.6889636", "0.68830997", "0.6879384", "0.68776834", "0.68575746", "0.684757", "0.6840416", "0.68357354", "0.6834844", "0.68172824", "0.6814678", "0.67866224", "0.67586386", "0.67584455", "0.6744585", "0.6736291", "0.6732301", "0.67272395", "0.67169935", "0.671658", "0.67135257", "0.67090356", "0.67080677", "0.67000943", "0.6697809", "0.66963416", "0.6696282", "0.6691037", "0.66906893", "0.6687111", "0.6682941", "0.6674415", "0.6669308", "0.6662649", "0.66584647", "0.66342986", "0.6627554", "0.66259116", "0.6624037", "0.6624029", "0.66163474", "0.6613653", "0.66091347", "0.660557", "0.66037315", "0.660349", "0.65877306", "0.6582094", "0.6576409", "0.6574778", "0.6571745", "0.6564503", "0.6563033", "0.6563033", "0.65622216", "0.6561963", "0.65537125", "0.65528876", "0.6550462", "0.65469635", "0.6538038", "0.65320385", "0.6529394", "0.6519173", "0.6515095" ]
0.7602575
2
pluginSettingsMenu display plugin settings page.
public function pluginSettingsPage() { // check permission. if (!current_user_can('manage_options')) { wp_die(__('You do not have permission to access this page.')); } // load config values to get settings config file. $loader = new \RundizableWpFeatures\App\Libraries\Loader(); $config_values = $loader->loadConfig(); if (is_array($config_values) && array_key_exists('rundiz_settings_config_file', $config_values)) { $settings_config_file = $config_values['rundiz_settings_config_file']; } else { echo 'Settings configuration file was not set.'; die('Settings configuration file was not set.'); exit; } unset($config_values, $loader); $RundizSettings = new \RundizableWpFeatures\App\Libraries\RundizSettings(); $RundizSettings->settings_config_file = $settings_config_file; $options_values = $this->getOptions(); // if form submitted if (isset($_POST) && !empty($_POST)) { if (!wp_verify_nonce((isset($_POST['_wpnonce']) ? $_POST['_wpnonce'] : ''))) { wp_nonce_ays('-1'); } // populate form field values. $options_values = $RundizSettings->getSubmittedData(); // you may validate form here first. // then save data. $result = $this->saveOptions($options_values); if ($result === true) { $output['form_result_class'] = 'notice-success'; $output['form_result_msg'] = __('Settings saved.'); } else { $output['form_result_class'] = 'notice-success'; $output['form_result_msg'] = __('Settings saved.'); } }// endif $_POST $output['settings_page'] = $RundizSettings->getSettingsPage($options_values); unset($RundizSettings, $options_values); $Loader = new \RundizableWpFeatures\App\Libraries\Loader(); $Loader->loadView('admin/settings_v', $output); unset($Loader, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function display_plugin_admin_page() {\n\t\t\tinclude_once( 'views/settings-page.php' );\n\t\t}", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "public function plugin_settings_page() {\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\twp_die( esc_html( 'You do not have sufficient permissions to access this page.' ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Render the settings template.\r\n\t\t\tinclude( sprintf( '%s/templates/settings.php', dirname( __FILE__ ) ) );\r\n\t\t}", "public function pluginSettingsMenu()\n {\n $hook_suffix = add_options_page(__('Rundizable WP Features', 'rundizable-wp-features'), __('Rundizable WP Features', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-settings', [$this, 'pluginSettingsPage']);\n add_action('load-' . $hook_suffix, [$this, 'registerScripts']);\n unset($hook_suffix);\n\n //add_options_page(__('Rundizable WP Features read settings value', 'rundizable-wp-features'), __('Rundizable WP Features read settings', 'rundizable-wp-features'), 'manage_options', 'rundizable-wp-features-read-settings', [$this, 'pluginReadSettingsPage']);\n }", "function BitTicket_plugin_settings() {\r\n add_menu_page('BitTicket', 'BitTicket', 'administrator', 'BitTicket_settings', 'BitTicket_display_settings');\r\n}", "function DisplaySettings()\n {\n $this->DisplayBreadcrumb();\n PrintPluginSettings($this->pluginid, array('form_wizard_settings','form_export_settings'), $this->_page);\n }", "public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public function add_menu() {\r\n\t\t\t\t// Add a page to manage this plugin's settings.\r\n\t\t\tadd_options_page(\r\n\t\t\t\t'Sift Ninja Settings',\r\n\t\t\t\t'Sift Ninja',\r\n\t\t\t\t'manage_options',\r\n\t\t\t\t'sift_ninja',\r\n\t\t\t\tarray( &$this, 'plugin_settings_page' )\r\n\t\t\t);\r\n\t\t}", "public function create_plugin_settings_page() {\n\t\t$page_title = 'Boss Directory Settings';\n\t\t$menu_title = 'Settings';\n\t\t$capability = 'manage_options';\n\t\t$slug = 'boss_directory';\n\t\t$callback = array( $this, 'plugin_settings_page_content' );\n\t\t$icon = 'dashicons-admin-plugins';\n\t\t$position = 99;\n\n\t\tadd_submenu_page( 'edit.php?post_type=listing', $page_title, $menu_title, $capability, $slug, $callback );\n\t}", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "public function create_plugin_settings_page() {\n \t$page_title = 'My Awesome Settings Page';\n \t$menu_title = 'Awesome Plugin';\n \t$capability = 'manage_options';\n \t$slug = 'smashing_fields';\n \t$callback = array( $this, 'plugin_settings_page_content' );\n \t$icon = 'dashicons-admin-plugins';\n \t$position = 100;\n\n \tadd_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "function settings_menu() {\n#\tregister_js(HD_PLUGIN_URL.'production/production.js',100);\n\thd_user_menu('System', 'admin_users','settings_gui', 55);\n}", "public function add_plugin_settings_page() {\n\t\tadd_options_page(\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t'manage_options',\n\t\t\t'bwcpp_settings',\n\t\t\tarray( $this, 'render_settings_page' )\n\t\t);\n\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "function options_panel() {\r\n // Include options panel\r\n include($this->pluginPath . \"/includes/settings.php\");\r\n }", "function boj_menuexample_create_menu() {\n\tadd_options_page( 'My Plugin Settings Page', 'Menu Example Settings', 'manage_options', __FILE__, 'boj_menuexample_settings_page' );\n\t\n}", "public function add_settings_page() {\n add_options_page( \n \"WP BXSlider Settings\", // $page_title\n \"WP BXSlider\", // $menu_title\n \"manage_options\", // $capability (ie: permissions)\n $this->name, // $menu_slug\n array($this, 'render_admin_page') // callback to render view\n );\n }", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "public function settings_page() {\r\n\t\tadd_submenu_page( 'edit.php?post_type=news', __( 'Settings', 'news-manager' ), __( 'Settings', 'news-manager' ), 'manage_options', 'news-settings', array( $this, 'options_page' ) );\r\n\t}", "public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}", "public function settings_page()\r\n {\r\n add_submenu_page('giga',\r\n __('Notifications', 'giga-messenger-bots'),\r\n __('Notifications', 'giga-messenger-bots'),\r\n 'manage_options',\r\n 'notifications',\r\n [$this, 'render']\r\n );\r\n }", "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "function tsuiseki_tracking_admin_menu() {\n add_menu_page('Tsuiseki Plugin Settings', 'Tsuiseki Settings', 'administrator', __FILE__, 'tsuiseki_tracking_settings_page');\n}", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "public function add_settings_page() {\n\t\tadd_submenu_page(\n\t\t\t'case27/tools.php',\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t_x( 'Map Services', 'Map Services page title in WP Admin', 'my-listing' ),\n\t\t\t'manage_options',\n\t\t\t'theme-mapservice-settings',\n\t\t\tfunction() {\n\t\t\t\t$config = $this->get_config();\n\t\t\t\trequire locate_template( 'templates/admin/theme-options/map-services.php' );\n\t\t\t}\n\t\t);\n\t}", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "public function plugin_page() {\n\t\t$this->setting_api->show_forms();\n\t}", "public function admin_settings(){\n\t\t$this->menu_pages['main'] = add_menu_page( $this::$plugin_name, 'WP LMS Settings', 'manage_options', $this::$plugin_name, array( $this, 'main_options_page' ) );\n\t\t//add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n\t\t\n\t\t//$this->menu_pages['schedule'] = add_submenu_page( \"edit.php?post_type=session\", 'WP LMS Schedule', 'Schedule Courses', 'manage_options', $this::$plugin_name.'_schedule', array( $this,\"schedule_page\" ), $this->plugin_img_url.'png/24/schedule.png' );\n\t\t//$this->menu_pages['assignments'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Assignments', 'Assignments', 'manage_options', $this::$plugin_name.'_assignment', array( $this,\"assignment_page\" ) );\n\t\t//$this->menu_pages['lectures'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Lectures', 'Lectures', 'manage_options', $this::$plugin_name.'_lecture', array( $this,\"lecture_page\" ) );\n\t\t//$this->menu_pages['settings'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS Settings', 'Settings', 'manage_options', $this::$plugin_name.'_settings', array( $this,\"settings_page\" ) );\n\t\t//edit.php?post_type=student_directory\n\t\t$this->menu_pages['view-student'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS View Students', 'View Students', 'manage_options', $this::$plugin_name.'_view_student', array( $this,\"view_student\" ) );\n\t\t$this->menu_pages['student-attendance'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS Student attendance', 'Student Attendance', 'manage_options', $this::$plugin_name.'_student_attendance', array( $this,\"student_attendance\" ) );\n\t\t//$this->menu_pages['settings-student'] = add_submenu_page( \"edit.php?post_type=student_directory\", 'WP LMS Student Settings', 'Settings', 'manage_options', $this::$plugin_name.'_student_settings', array( $this,\"student_settings\" ) );\n\t\t$this->menu_pages['view-instructors'] = add_submenu_page( \"edit.php?post_type=instructor\", 'WP LMS View Instrustors', 'View Instrustors', 'manage_options', $this::$plugin_name.'_view_instructor', array( $this,\"view_instructor\" ) );\n\t\t//$this->menu_pages['view-course-students'] = add_submenu_page( \"edit.php?post_type=course\", 'WP LMS View Course Students', 'View Enrollment', 'manage_options', $this::$plugin_name.'_view_enrollment', array( $this,\"view_enrollment\" ) );\n\t\t//add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\t}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function composerSettings() {\n\n if ( current_user_can('manage_options') && $this->composer->isPlugin()) {\n //add_options_page(__(\"Swift Page Builder Settings\", \"js_composer\"), __(\"Swift Page Builder\", \"js_composer\"), 'install_plugins', \"wpb_vc_settings\", array($this, \"composerSettingsMenuHTML\"));\n }\n }", "function coolRahulSoni_custom_settings_add_menu() {\n add_menu_page( 'CoolRahulSoni Custom Settings', 'CoolRahulSoni Custom Settings', 'manage_options', 'custom-settings', 'custom_settings_page', null, 99 );\n}", "function on_admin_menu ()\n{\n /** @var Settings_Page|null The settings page */\n global $settings_page;\n $settings_page = new Settings_Page ();\n global $plugin_name;\n\n // adds a menu entry to the settings menu\n add_options_page (\n $plugin_name . ' Options',\n $plugin_name,\n 'manage_options',\n 'cap_meta_search_options',\n array ($settings_page, 'display')\n );\n}", "public function add_plugin_admin_menu() {\n\t\t/*\n\t\t * Add a settings page for this plugin to the Settings menu.\n\t\t *\n\t\t * NOTE: Alternative menu locations are available via WordPress administration menu functions.\n\t\t *\n\t\t * Administration Menus: http://codex.wordpress.org/Administration_Menus\n\t\t *\n\t\t */\n\t\tadd_options_page( 'NERD Setup', 'NERD', 'manage_options', $this->plugin_name, array($this, 'display_plugin_setup_page')\n\t\t);\n\t}", "public function add_plugin_page(){\n\t\tadd_options_page(\n\t\t\t'Settings Admin',\n\t\t\t'myStickymenu',\n\t\t\t'manage_options',\n\t\t\t'my-stickymenu-settings',\n\t\t\tarray( $this, 'create_admin_page' )\n\t\t);\n\t}", "function plugin_options_page() {\n?>\n<div>\n<h2>SOPA intro page Settings</h2>\nOptions relating to the Custom Plugin.\n<form action=\"options.php\" method=\"post\">\n<?php settings_fields('plugin_options'); ?>\n<?php do_settings_sections(PLUGIN_SLUG); ?>\n\n<p class=\"submit\">\n<input type=\"submit\" name=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n</p>\n</form></div>\n\n<?php }", "function options_page(){\r\n include($this->plugin_dir.'/include/options-page.php');\r\n }", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "function cpjr3_settings_page() {\n\n add_options_page( __( 'Click Points Settings', 'cpjr3' ), __( 'Click Points', 'cpjr3' ), 'administrator', __FILE__, 'cpjr3_settings_fn' );\n\n}", "public function render_settings_page()\n {\n }", "function admin_menu(){\t\tif(!empty($this->settings_manager->sections)){\n\t\t\tadd_theme_page(__('Theme Settings'), __('Theme Settings'), 'edit_theme_options', $this->options->option_name, array($this, 'theme_settings'));\n\t\t}\n\t}", "public function register_menu()\n {\n add_menu_page('Coupons Settings', 'Coupons Settings', 'edit_others_posts', 'wpm_coupons_settings');\n add_submenu_page('wpm_coupons_settings', 'Coupons Settings', 'Coupons Settings', 'manage_options', 'wpm_coupons_settings', function () {\n $settings = json_decode(get_option('api_settings', true), true);\n\n include 'templates/settings_template.php';\n });\n }", "function plugin_page() {\n\n echo '<div class=\"wrap\">';\n echo '<h2>'.esc_html__( 'WC Sales Notification Settings','wc-sales-notification-pro' ).'</h2>';\n $this->save_message();\n $this->settings_api->show_navigation();\n $this->settings_api->show_forms();\n echo '</div>';\n\n }", "function crd_create_menu() {\n add_menu_page(\n 'My Cool Plugin Settings',\n 'Cool Settings',\n 'administrator',\n __FILE__,\n 'crd_settings_page',\n plugins_url('/images/icon.png', __FILE__)\n );\n}", "public function admin_menu() { \r\n\t\tadd_options_page( 'MF Timeline Settings', 'MF-Timeline', 'manage_options', 'mf-timeline', array( &$this, 'get_plugin_options_page' ) );\r\n\t}", "public function show_settings_page() : void {\n\t\t\t$categories = self::get_categories();\n\n\t\t\tSFWD_LMS::get_view(\n\t\t\t\t'support/help',\n\t\t\t\tarray(\n\t\t\t\t\t'categories' => $categories,\n\t\t\t\t),\n\t\t\t\ttrue\n\t\t\t);\n\t\t}", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function pluginReadSettingsPage()\n {\n $this->getOptions();\n global $rundizable_wp_features_optname;\n\n $output['rundizable_wp_features_optname'] = $rundizable_wp_features_optname;\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/readsettings_v', $output);\n unset($Loader, $output);\n }", "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "function adminMenu() {\r\n\t\t\tadd_options_page('Track The Book Settings', 'Track The Book', 8, 'trackthebook.php', array($this,'adminOptions'));\r\n\t\t}", "public function add_settings_submenu() {\n add_options_page(\n 'Update Monitor Settings',\n 'Update Monitor',\n 'manage_options',\n 'update-monitor-menu',\n array($this, 'update_monitor_page')\n );\n }", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function plugin_admin_add_page() {\n\t\tadd_options_page('Tupuk Sample Plugin Settings', 'Tupuk Sample Plugin', 'manage_options', 'tupuk_sample_plugin', array($this, 'plugin_options_page'));\n\t\tadd_action( 'admin_init', array($this, 'register_mysettings') ); //call register settings function\n\t}", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function settings_page() {\n\t\tTheme_My_Login_Admin::settings_page( array(\n\t\t\t'title' => __( 'Theme My Login reCAPTCHA Settings', 'theme-my-login' ),\n\t\t\t'options_key' => $this->options_key\n\t\t) );\n\t}", "public function admin_menu() {\n // Duplicate link into properties mgmt\n \tadd_submenu_page(\n \t\tself::SLUG,\n \t\t__('Settings'),\n \t\t__('Settings'),\n \t\t'manage_options',\n \t\tself::SLUG,\n \t\t1\n \t);\n }", "public function settings_page() {\n\n\t\t?>\n\n\t\t<div class=\"wrap schedule-a-visit-to-sherpa-settings\">\n\t\t\t\n\t\t\t<form id=\"schedule-a-visit-to-sherpa-form\" method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'schedule_a_visit_to_sherpa_data', 'schedule_a_visit_to_sherpa_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'schedule_a_visit_to_sherpa_settings_section' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'schedule-a-visit-to-sherpa' ); ?>\n\t\t\t\t\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n\t\t<?php\n\n\t}", "public function settings_page() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\tadd_action( 'inf_member_settings_after_header_' . $this->hook_suffix, array( 'Inf_Member_App_Settings', 'after_header' ) );\r\n\r\n Inf_Member_Settings::settings_page_template( $this->hook_suffix, __( 'Inf Member Settings', 'inf-member' ) );\r\n\t}", "public static function menu()\n\t\t\t{\n\t\t\t\t// Create menu tab\n\t\t\t\tadd_options_page(HE_PLUGINOPTIONS_NICK.' Plugin Options', HE_PLUGINOPTIONS_NICK, 'manage_options', HE_PLUGINOPTIONS_ID.'_options', array('HiddenEmpirePluginOptions', 'options_page'));\n\t\t\t}", "public function registerMenu()\n\t\t{\n\t\t\tadd_options_page( 'Thingdom Settings', 'Thingdom Settings', 'manage_options', $this->slug, array($this, 'loadSettings')); \n\t\t\tadd_action('admin_init', array($this, 'registerSettings'));\n\t\t}", "function hoopsai_wp_settings_do_page() {\n ?>\n <div id=\"hoopsai_wp_settings\"></div>\n <?php\n }", "function my_plugin_menu() {\n\t\tadd_options_page( 'Opções do Plugin', 'Marvel SC', 'manage_options', 'my-unique-identifier', 'my_plugin_options' );\n\t}", "function add_settings_page() {\n\tadd_menu_page( __( 'Theme Options' ), __( 'Theme Options' ), 'manage_options', 'settings', 'theme_settings_page');\n}", "public function settings_menu(){\n // add_submenu_page($parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '')\n add_submenu_page('tools.php','Checksum Generator', 'MD5 Checksums', 'manage_options', 'checksum-generator', array($this, 'theme_options_page'));\n\n //call register settings function\n add_action( 'admin_init', array($this, 'register_settings' ));\n }", "function projectpentagon_menu() {\n\tadd_menu_page('Project Pentagon', 'Project Pentagon', 'administrator', __FILE__, 'projectpentagon_htmlpage',plugins_url('/images/icon.png', __FILE__));\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'projectpentagon_mysettings' );\n\n}", "function hook_plugin_in_panel(){\n add_menu_page( 'Formularze zamówień', 'Formularze zamówień', 'manage_options', 'Formularze zamówień', 'load_plugin_backend' ); #settings for menu acces\n}", "public function add_settings_page() {\n\t\t$this->settings_page_id = add_submenu_page(\n\t\t\t'edit.php?post_type=schedule',\n\t\t\t__( 'Conference Schedule Settings', 'conf-schedule' ),\n\t\t\t__( 'Settings', 'conf-schedule' ),\n\t\t\t'edit_posts',\n\t\t\t'conf-schedule-settings',\n\t\t\tarray( $this, 'print_settings_page' )\n \t);\n\t}", "function bg_AddPluginMenuHtml() {\n global $bg_opts_apiKey, $bg_optionGroup, $bg_page;\n\n\tif ( !current_user_can( 'manage_options' ) ) {\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t}\n\techo '<div class=\"wrap\">';\n\techo('<h2>BeyondGrammar Settings</h2>');\n\t\t\n\techo('\t<form action=\"options.php\" method=\"post\">');\n\tsettings_fields($bg_optionGroup);\n\tdo_settings_sections($bg_page);\n\techo(\"<input name='Submit' type='submit' class='button-primary' value='Save Changes' />\");\n\techo('</form>');\n\techo '</div>';\n}", "public\tfunction\tpanelSettings() {\n\t\t\t//Load the panel matching the settings slug.\n\t\t\tself::panel('FrozenPlugin-settings');\n\t\t}", "function boj_menuexample_create_menu() {\r\n\t\r\n\t//create a submenu under Settings\r\n\tadd_options_page( 'Leo Plugin Settings Page', 'Menu Example Settings', 'manage_options', 'settings-submenu', 'boj_menuexample_settings_page' );\r\n\t\r\n}", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function all_settings_link() {\n \tadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n }", "public function admin_menu() {\n\t\tadd_options_page(__('Google Analytics', 'wp-google-analytics'), __('Google Analytics', 'wp-google-analytics'), 'manage_options', self::$page_slug, array( $this, 'settings_view' ) );\n\t}", "public function grp_settings_page_init(){\n\t\t$settings_page = add_menu_page( 'GRP Settings', 'GRP Settings', 'edit_theme_options', 'grp-settings', array($this,'grp_settings_page') );\n\t\t//add this action to save your setting page data\n\t\tadd_action( \"load-{$settings_page}\", array( $this, 'grp_load_settings_page' ) );\n\t}", "function my_plugin_menu() {\n add_menu_page( 'Nursing Schedule Panel', 'Nursing Schedule Panel ', 'manage_options', 'nursing-panel', 'my_plugin_options' ,'dashicons-calendar-alt',3);\n}", "function htpmpro_options_page_html() {\r\n\t // check user capabilities\r\n\t if ( ! current_user_can( 'manage_options' ) ) {\r\n\t \treturn;\r\n\t }\r\n\r\n\t // show message when updated\r\n\t if ( isset( $_GET['settings-updated'] ) ) {\r\n\t \tadd_settings_error( 'htpmpro_messages', 'htpmpro_message', esc_html__( 'Settings Saved', 'htpmpro' ), 'updated' );\r\n\t }\r\n\t \r\n\t // show error/update messages\r\n\t settings_errors( 'htpmpro_messages' );\r\n\t ?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<h1><?php echo esc_html( 'WP Plugin Manager' ); ?> <?php echo esc_html( get_admin_page_title() ); ?></h1>\r\n\t\t\t<form action=\"options.php\" method=\"post\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t// output general section and their fields\r\n\t\t\t\t\tdo_settings_sections( 'options_group_general' );\r\n\r\n\t\t\t\t\t// general option fields\r\n\t\t\t\t\tsettings_fields( 'options_group_general' );\r\n\r\n\t\t\t\t\t// output save settings button\r\n\t\t\t\t\tsubmit_button( 'Save Settings' );\r\n\t\t\t\t?>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t<?php\r\n}", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "function insta_f_create_menu(){\n\tadd_options_page('Instagram Portfolio Settings', 'Instagram Portfolio', 'manage_options', INSTA_FOLIO_SETTINGS_PAGE, 'insta_f_settings_page');\t\n}", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "function show_settings_tab(){\n woocommerce_admin_fields($this->get_settings());\n }", "public function create_maz_hspm_plugin_settings_page() {\n $page_title = 'Halve Spacers On Mobile Page';\n $menu_title = 'Halve Spacers On Mobile';\n $capability = 'manage_options';\n $slug = 'maz_hspm_fields';\n $callback = array( $this, 'maz_hspm_settings_content' );\n $icon = 'dashicons-admin-plugins';\n $position = 100;\n\n add_menu_page( $page_title, $menu_title, $capability, $slug, $callback, $icon, $position );\n }", "function ajx_plugin_menu() {\r\n\t\t\r\n\t\tadd_options_page( 'Ajaxify Plugin Options', 'Ajaxify', 'manage_options', 'aj-id', 'ajaxify_options' );\r\n\t}", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "function register_plugin_menu(){\n add_menu_page( 'Rss Multi Updater', 'Rss Multi Updater', 'manage_options', 'RssMultiUpdater', array(&$this, 'admin_page'), '', 26 ); \n \n }", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "function wprbd_menu_pages(){\n\n\tadd_menu_page('WPRBD Settings','WPRBD','manage_options','wprbd','wprbd_settings_page',WPRBD_PATH.'images/icon_wrapper.png',20);\n\n}", "public function add_menu() {\n\n add_options_page('Форум phpbb3 :: администрирование', 'Форум phpbb3', 'manage_options', 'phpbb3', array($this, 'plugin_options'));\n }", "public function add_settings_submenu(){\n //create new sub menu\n add_options_page('Google Map extension for Contact Form 7', 'CF7 Google Map', 'administrator','cf7-googleMap-settings', array($this,'show_settings_page') );\n }", "public function initialize_settings_page()\n {\n }", "public function register_settings_page() {\n\t\tif ( ! WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$page_callback = array( $this->menu, 'load_page' );\n\n\t\tadd_menu_page(\n\t\t\t'Yoast SEO: ' . __( 'MultiSite Settings', 'wordpress-seo' ),\n\t\t\t__( 'SEO', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\tarray( $this, 'network_config_page' ),\n\t\t\tWPSEO_Utils::get_icon_svg()\n\t\t);\n\n\t\tif ( WPSEO_Utils::allow_system_file_edit() === true ) {\n\t\t\tadd_submenu_page(\n\t\t\t\t$this->menu->get_page_identifier(),\n\t\t\t\t'Yoast SEO: ' . __( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t__( 'Edit Files', 'wordpress-seo' ),\n\t\t\t\t'delete_users', 'wpseo_files',\n\t\t\t\t$page_callback\n\t\t\t);\n\t\t}\n\n\t\t// Add Extension submenu page.\n\t\tadd_submenu_page(\n\t\t\t$this->menu->get_page_identifier(),\n\t\t\t'Yoast SEO: ' . __( 'Extensions', 'wordpress-seo' ),\n\t\t\t__( 'Extensions', 'wordpress-seo' ),\n\t\t\t'delete_users',\n\t\t\t'wpseo_licenses',\n\t\t\t$page_callback\n\t\t);\n\t}", "public function add_menu()\n {\n add_options_page(__('Master Link Plugin Settings'), __('Master Link Plugin'), 'manage_options', 'master_link_plugin', array(\n &$this,\n 'plugin_settings_page'\n ));\n }", "public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}" ]
[ "0.83143544", "0.81853884", "0.8106283", "0.80023885", "0.7971842", "0.7772082", "0.77567124", "0.76956517", "0.7680267", "0.76270235", "0.7621555", "0.759079", "0.7563021", "0.7514661", "0.748535", "0.7471654", "0.7452345", "0.737396", "0.7361573", "0.7333383", "0.7333381", "0.7292293", "0.7244879", "0.7225446", "0.722125", "0.7205759", "0.71894956", "0.71732086", "0.716671", "0.71631724", "0.7162661", "0.71200395", "0.7114023", "0.7113568", "0.7113359", "0.71122015", "0.70879066", "0.70835274", "0.7081417", "0.70685387", "0.70600754", "0.7053493", "0.7029203", "0.702023", "0.69852597", "0.6978001", "0.69766", "0.6976116", "0.6969747", "0.6969244", "0.6967132", "0.6964907", "0.6947549", "0.69466794", "0.69441575", "0.69311285", "0.69269997", "0.69228005", "0.6919603", "0.68981314", "0.6896608", "0.68934244", "0.6887873", "0.68803173", "0.6862366", "0.68608993", "0.685482", "0.6853175", "0.68506235", "0.6845367", "0.6842955", "0.6841057", "0.6839347", "0.68338794", "0.6833773", "0.68337256", "0.68296945", "0.68225574", "0.68217003", "0.68214405", "0.6818626", "0.68146425", "0.68097353", "0.67817664", "0.677862", "0.6766356", "0.6763705", "0.6759724", "0.67597055", "0.67588127", "0.6757037", "0.67535", "0.67528605", "0.6749962", "0.6736131", "0.67349976", "0.67257446", "0.67246705", "0.672355", "0.67225575" ]
0.7446709
17
registerHooks enqueue scripts and styles here.
public function registerScripts() { // font awesome. choose css fonts instead of svg, see more at https://fontawesome.com/how-to-use/on-the-web/other-topics/performance // to name font awesome handle as `plugin-name-prefix-font-awesome5` is to prevent conflict with other plugins that maybe use older version but same handle that cause some newer icons in this plugin disappears. wp_enqueue_style('rundizable-wp-features-font-awesome5', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/fontawesome/css/all.min.css', [], '5.5.0'); wp_enqueue_style('rundizable-wp-features-rd-settings-tabs-css', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/css/rd-settings-tabs.css', [], RUNDIZABLEWPFEATURES_VERSION); wp_enqueue_script('rundizable-wp-features-rd-settings-tabs-js', plugin_dir_url(RUNDIZABLEWPFEATURES_FILE).'assets/js/rd-settings-tabs.js', ['jquery'], RUNDIZABLEWPFEATURES_VERSION, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function enqueue_admin_scripts( $hook ) {\n\n\t\t$menu = $this->menu_settings();\n\n\t\tif ( 'appearance_page_' . $menu['menu_slug'] != $hook )\n\t return;\n\n\t\t// Enqueue custom option panel JS\n\t\twp_enqueue_script( 'lcars-custom', plugin_dir_url( dirname(__FILE__) ) . 'js/lcars-custom.js', array( 'jquery','wp-color-picker' ), lcars_Framework::VERSION );\n\n\t\t// Inline scripts from lcars-interface.php\n\t\tadd_action( 'admin_head', array( $this, 'of_admin_head' ) );\n\t}", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function enqueue_scripts() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 21 );\n\t\tadd_action( 'admin_init', array( $this, 'add_pagination' ) );\n\t\tadd_action( \"bc_plugin_browser_content_{$this->page_slug}\", array( $this, 'display_plugins_browser' ), 10, 2 );\n\t}", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "public function enqueue_front_end_scripts() {}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "public function enqueue_scripts() {\n\n if ( ! isset( $this->plugin_screen_hook_suffix ) ) {\n return;\n }\n\n $screen = get_current_screen();\n\n if ( $screen->id == $this->plugin_screen_hook_suffix ) {\n\n wp_enqueue_script( 'thickbox' );\n wp_enqueue_style( 'thickbox' );\n wp_enqueue_script( 'media-upload' );\n wp_enqueue_script( 'jquery-ui-datepicker' );\n wp_enqueue_script( 'chartjs', plugin_dir_url( __FILE__ ) . 'js/vendor/Chart.min.js', array(), $this->version );\n wp_enqueue_script( 'wpp-chart', plugin_dir_url( __FILE__ ) . 'js/chart.js', array('chartjs'), $this->version );\n wp_register_script( 'wordpress-popular-posts-admin-script', plugin_dir_url( __FILE__ ) . 'js/admin.js', array('jquery'), $this->version, true );\n wp_localize_script( 'wordpress-popular-posts-admin-script', 'wpp_admin_params', array(\n 'nonce' => wp_create_nonce( \"wpp_admin_nonce\" )\n ));\n wp_enqueue_script( 'wordpress-popular-posts-admin-script' );\n\n }\n\n }", "function wck_page_enqueue_scripts( $hook ) {\t\t\r\n\t\tif ( $hook == $this->hookname ) {\r\n\t\t\twp_enqueue_script( 'common' );\r\n\t\t\twp_enqueue_script( 'wp-lists' );\r\n\t\t\twp_enqueue_script( 'postbox' );\r\n\t\t}\r\n\t}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "public function enqueueScripts(){}", "public function adminEnqueueScripts($hook = '') {\n\n if (isset($_GET['page']) && $_GET['page'] == 'vcht-console') {\n global $wpdb;\n\n $settings = $this->getSettings();\n\n wp_register_script($this->_token . '-flat-ui', esc_url($this->assets_url) . 'js/flat-ui-pro.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-flat-ui');\n wp_register_script($this->_token . '-datatable', esc_url($this->parent->assets_url) . 'js/jquery.dataTables.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-datatable');\n wp_register_script($this->_token . '-bootstrap-datatable', esc_url($this->assets_url) . 'js/dataTables.bootstrap.min.js', array($this->_token . '-datatable'), $this->_version);\n wp_enqueue_script($this->_token . '-bootstrap-datatable');\n wp_register_script($this->_token . '-customScrollbar', esc_url($this->assets_url) . 'js/jquery.mCustomScrollbar.concat.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-customScrollbar');\n wp_register_script($this->_token . '-dropzone', esc_url($this->assets_url) . 'js/dropzone.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-dropzone');\n wp_register_script($this->_token . '-colpick', esc_url($this->assets_url) . 'js/colpick.min.js', array('jquery'), $this->_version);\n wp_enqueue_script($this->_token . '-colpick');\n wp_register_script($this->_token . '-mousetrap', esc_url($this->assets_url) . 'js/mousetrap.min.js', 'jquery', $this->_version);\n wp_enqueue_script($this->_token . '-mousetrap');\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_register_script($this->_token . '-admin', esc_url($this->assets_url) . 'js/admin.min.js', array('jquery',\n 'jquery-ui-core',\n 'jquery-ui-mouse',\n 'jquery-ui-position',\n 'jquery-ui-droppable',\n 'jquery-ui-draggable',\n 'jquery-ui-resizable',\n 'jquery-ui-sortable',\n 'jquery-effects-core',\n 'jquery-effects-drop',\n 'jquery-effects-fade',\n 'jquery-effects-bounce',\n 'jquery-effects-slide',\n 'jquery-effects-blind'), $this->_version);\n wp_enqueue_script($this->_token . '-admin');\n\n $texts = array(\n 'Yes' => __('Yes', 'WP_Visual_Chat'),\n 'No' => __('No', 'WP_Visual_Chat'),\n 'Online' => __('Online', 'WP_Visual_Chat'),\n 'Offline' => __('Offline', 'WP_Visual_Chat'),\n 'Log in' => __('Log in', 'WP_Visual_Chat'),\n 'Log out' => __('Log out', 'WP_Visual_Chat'),\n 'Drop files to upload here' => __('Drop files to upload here', 'WP_Visual_Chat'),\n 'File is too big (max size: {{maxFilesize}}MB)' => __('File is too big (max size: {{maxFilesize}}MB)', 'WP_Visual_Chat'),\n 'Invalid file type' => __('Invalid file type', 'WP_Visual_Chat'),\n 'You can not upload any more files' => __('You can not upload any more files', 'WP_Visual_Chat'),\n 'Shows an element of the website' => __('Shows an element of the website', 'WP_Visual_Chat'),\n 'remove' => __('Remove', 'WP_Visual_Chat'),\n 'display' => __('Display', 'WP_Visual_Chat'),\n 'search' => __('Search', 'WP_Visual_Chat'),\n 'showingPage' => sprintf(__('Showing page %1$s of %2$s', 'WP_Visual_Chat'), '_PAGE_', '_PAGES_'),\n 'filteredFrom' => sprintf(__('- filtered from %1$s documents', 'WP_Visual_Chat'), '_MAX_'),\n 'noRecords' => __('No documents to display', 'WP_Visual_Chat'),\n 'Do you want to reply ?' => __('Do you want to reply ?', 'WP_Visual_Chat'),\n 'New chat request from' => __('New chat request from', 'WP_Visual_Chat'),\n 'Another operator has already answered' => __('Another operator has already answered', 'WP_Visual_Chat'),\n '[username] stopped the chat' => __('[username] stopped the chat', 'WP_Visual_Chat'),\n 'Current operator' => __('Current operator', 'WP_Visual_Chat'),\n '[username1] tranfers the chat to [username2]' => __('[username1] tranfers the chat to [username2]', 'WP_Visual_Chat'),\n );\n global $wpdb;\n $userID = 0;\n $userWP = wp_get_current_user();\n $rows = $wpdb->get_results(\"SELECT * FROM \" . $wpdb->prefix . \"vcht_users WHERE userID=\" . $userWP->ID);\n $user = array();\n if (count($rows) == 0) {\n $uploadFolderName = md5(uniqid());\n $user = array(\n 'userID' => $userWP->ID,\n 'clientID' => md5(uniqid()),\n 'username' => $userWP->display_name,\n 'email' => $userWP->user_email,\n 'uploadFolderName' => $uploadFolderName,\n 'lastActivity' => date('Y-m-d H:i:s'),\n 'isOnline' => true, 'isOperator' => true,\n 'imgAvatar' => $this->assets_url . 'img/administrator-48.png',\n 'ip' => $_SERVER['REMOTE_ADDR']);\n\n $wpdb->insert($wpdb->prefix . 'vcht_users', $user);\n $user = (object) $user;\n $userID = $wpdb->insert_id;\n } else {\n $userID = $rows[0]->id;\n }\n wp_localize_script($this->_token . '-admin', 'vcht_data', array(\n 'websiteUrl' => get_home_url(),\n 'uploadsUrl' => $this->uploads_url,\n 'assetsUrl' => $this->assets_url,\n 'operatorID' => $user->ID,\n 'trackingDelay' => $settings->trackingDelay,\n 'ajaxCheckDelay' => $settings->ajaxCheckDelay,\n 'allowFilesFromOperators' => $settings->allowFilesFromOperators,\n 'filesMaxSize' => $settings->filesMaxSize,\n 'allowedFiles' => $settings->allowedFiles,\n 'isAdmin' => current_user_can('manage_options'),\n 'enableGeolocalization' => $settings->enableGeolocalization,\n 'userID' => $userID,\n 'enableVisitorsTracking' => $settings->enableVisitorsTracking,\n 'texts' => $texts));\n }\n }", "function inject_scripts() {\n\n\tglobal $wp_styles, $wp_scripts;\n\n\t//Default way of loading styles. Version number added to ensure\n\t//the correct version is sent to the client regardless of caching.\n\twp_register_style( 'style', get_stylesheet_uri(), false, '1.0.0' );\n\twp_enqueue_style( 'style' );\n\n\t// Adds an ie8 and below stylesheet:\t\n\twp_enqueue_style( 'ie8_style', get_stylesheet_directory_uri() . '/css/ie8.css', array( 'style' ) );\n\twp_style_add_data( 'ie8_style', 'conditional', 'lte IE 8' );\n\n\n\t$js_dir = get_template_directory_uri() . '/js';\n\t$js_libs = $js_dir . '/bower_components';\n\n\t//Loads requirejs, all scripts are set true to push them into the footer:\n\twp_enqueue_script( 'requrejs', $js_libs . '/requirejs/require.js', array(), '', true );\n\n\n\t//config file that depends on requirejs.\n\twp_register_script( 'optimize', $js_dir . '/optimize.min.js', '', '', true );\n\n\n\t//Creates a json object so the configjs knows its directory. \n\twp_localize_script( 'optimize', 'dir', array(\n\t\t'path'\t\t=> $js_dir,\n\t\t'ajax_url'\t=> admin_url( 'admin-ajax.php' )\n\t));\n\n\n\twp_enqueue_script( 'optimize', '', '', '', true );\n\n\t// Styles for the lightbox plugin.\n\twp_register_style('lightbox-style', $js_libs . '/lightbox2/dist/css/lightbox.min.css' );\n\twp_enqueue_style( 'lightbox-style' );\n\n}", "public static function register_hooks()\n\t{\n\t\tif (static::$hooks_registered) {\n\t\t\treturn;\n\t\t}\n\n\t\t// register all the scripts\n\t\tadd_action('wp_enqueue_scripts', [__CLASS__, '_wp_enqueue_scripts']);\n\n\t\t// add defer/async attributes if they are specified\n\t\tadd_filter('script_loader_tag', [__CLASS__, '_script_loader_tag'], 10, 2);\n\n\t\tadd_action('wp_footer', [__CLASS__, '_wp_footer'], static::$footer_scripts_priority);\n\n\t\tstatic::$hooks_registered = true;\n\t}", "function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "public function hook() {\n\t\tadd_action( 'admin_print_scripts', [ $this, 'admin_scripts' ] );\n\t\t// Elementor support.\n\t\tadd_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t// UGH! Beaver Builder hack.\n\t\tif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore\n\t\t\tadd_action( 'wp_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t}\n\n\t\tadd_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/navigation-menu/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t}", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "public function register(){\n add_action('admin_enqueue_scripts',array($this,'enqueue'));\n //load front end wp css & js\n add_action('wp_enqueue_scripts',array($this,'enqueue'));\n }", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }", "public function enqueue_scripts() {\r\n\r\n\t\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}", "protected function enqueue_scripts()\n {\n\n }", "public function registerScripts()\n {\n if(!wp_script_is('media-upload')):\n wp_enqueue_script('media-upload');\n endif;\n if(!wp_script_is('thickbox')):\n wp_enqueue_script('thickbox');\n endif;\n }", "function nft_load_scripts($hook) {\n\n // create my own version codes\n\n $my_js_ver = date(\"ymd-Gis\", filemtime( plugin_dir_path( __FILE__ ) . 'build/main.css' ));\n $my_css_ver = date(\"ymd-Gis\", filemtime( plugin_dir_path( __FILE__ ) . 'build/main.js' ));\n $my_css_ver2 = date(\"ymd-Gis\", filemtime( plugin_dir_path( __FILE__ ) . 'build/list.css' ));\n\n\twp_enqueue_script( 'nft-js', plugins_url( 'build/main.js', __FILE__ ), array(), $my_js_ver , true);\n\n\twp_register_style( 'nft-css', plugins_url( 'build/main.css', __FILE__ ), false, $my_css_ver );\n\twp_register_style( 'nft-css2', plugins_url( 'build/list.css', __FILE__ ), false, $my_css_ver2 );\n\twp_enqueue_style ( 'nft-css' );\n\twp_enqueue_style ( 'nft-css2' );\n}", "function tz_admin_enqueue_scripts($hook) {\n\tif ($hook == 'post.php' || $hook == 'post-new.php') {\n\t\twp_register_script('tz-admin', get_template_directory_uri() . '/js/jquery.custom.admin.js', 'jquery');\n\t\twp_enqueue_script('tz-admin');\n\t}\n}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "public function register_plugin_scripts() {\n\t\t//in case I need jQuery\n\t\t//wp_enqueue_script( 'jQuery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', array(), '1.10.2', true );\n\t\t\n\t\t//jQuery UI for Calendar \n\t\twp_enqueue_script( 'jQueryui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', array(), '1.10.3', true );\n\t\n\t\t// Main Team Manager JS\n\t\t// Old\n\t\t//wp_enqueue_script( 'HockeyMan', plugins_url( '/js/HockeyMan.js' , __FILE__ ), array(), '1.0.0', true );\n\t\t// New Hotness\n\t\twp_enqueue_script( 'bootstrap-combobox', plugins_url( '/js/bootstrap-combobox.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_enqueue_script( 'TeamManager', plugins_url( '/js/TeamManager.js' , __FILE__ ), array(), '1.0.0', true );\n\t\twp_localize_script( 'TeamManager', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n\t}", "public function enqueue_scripts($hook) {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Points_Of_Sale_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\tif ($hook != 'post.php' && $hook != 'post-new.php') {\n\t\t\treturn;\n\t\t}\n\n\t\t//DEFINE LANGUAGE OF GOOGLE MAPS\n\t\t$google_map_language = 'pt';\n\n\t\t$languageString = '';\n\t\tif ($google_map_language != '' && $google_map_language != 'pt') {\n\t\t\t$languageString = '&language=' . $google_map_language;\n\t\t}\n\n\t\t// INCLUDE THE .JS\n\t\tif (is_ssl()) {\n\t\t\twp_enqueue_script('pos_google_maps', 'https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places' . $languageString);\n\t\t} else {\n\t\t\twp_enqueue_script('pos_google_maps', 'http://maps.googleapis.com/maps/api/js?sensor=true&libraries=places' . $languageString);\n\t\t}\n\n\t\twp_enqueue_script('pos_locationpicker', plugin_dir_url(__FILE__) . 'js/locationpicker.jquery.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/points-of-sale-admin.js', array('pos_google_maps', 'jquery'), $this->version, false);\n\n\t\twp_localize_script($this->plugin_name, 'pos_locationpicker_data', $this->pos_localize_script());\n\n\t}", "function hookRegisterScripts() {\n\t \tif (!is_admin() && get_option('fse_load_fc_libs') == true) {\n\t \t\tif (get_option('fse_load_jquery') == true)\n\t \t\twp_enqueue_script('jquery');\n\t \t\tif (get_option('fse_load_jqueryui') == true)\n\t \t\twp_enqueue_script('jquery-ui-core');\n\n\t \t\twp_enqueue_script('fullcalendar', self::$plugin_js_url.'fullcalendar.min.js');\n\t \t\t//Pass Ajax Url to Javascript Paraemter\n\t \t\twp_localize_script('fullcalendar', 'WPCalendar', array('ajaxUrl'=>admin_url('admin-ajax.php')));\n\t \t}\n\t }", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "function gutenberg_register_scripts_and_styles() {\n\tgutenberg_register_vendor_scripts();\n\n\tregister_tinymce_scripts();\n\n\twp_register_script(\n\t\t'wp-url',\n\t\tgutenberg_url( 'build/url/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/url/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-autop',\n\t\tgutenberg_url( 'build/autop/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/autop/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-wordcount',\n\t\tgutenberg_url( 'build/wordcount/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/wordcount/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom-ready',\n\t\tgutenberg_url( 'build/dom-ready/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom-ready/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-a11y',\n\t\tgutenberg_url( 'build/a11y/index.js' ),\n\t\tarray( 'wp-dom-ready' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/a11y/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-hooks',\n\t\tgutenberg_url( 'build/hooks/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/hooks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-i18n',\n\t\tgutenberg_url( 'build/i18n/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/i18n/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-is-shallow-equal',\n\t\tgutenberg_url( 'build/is-shallow-equal/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/is-shallow-equal/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-token-list',\n\t\tgutenberg_url( 'build/token-list/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/token-list/index.js' ),\n\t\ttrue\n\t);\n\n\t// Editor Scripts.\n\twp_register_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_url( 'build/api-fetch/index.js' ),\n\t\tarray( 'wp-hooks', 'wp-i18n' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/api-fetch/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t\t'\\'fetch\\' in window' => 'wp-polyfill-fetch',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createNonceMiddleware( \"%s\" ) );',\n\t\t\t( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' )\n\t\t),\n\t\t'after'\n\t);\n\twp_add_inline_script(\n\t\t'wp-api-fetch',\n\t\tsprintf(\n\t\t\t'wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( \"%s\" ) );',\n\t\t\tesc_url_raw( get_rest_url() )\n\t\t),\n\t\t'after'\n\t);\n\n\twp_register_script(\n\t\t'wp-deprecated',\n\t\tgutenberg_url( 'build/deprecated/index.js' ),\n\t\tarray( 'wp-hooks' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/deprecated/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-blob',\n\t\tgutenberg_url( 'build/blob/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blob/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-compose',\n\t\tgutenberg_url( 'build/compose/index.js' ),\n\t\tarray( 'wp-element', 'wp-is-shallow-equal', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/compose/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-keycodes',\n\t\tgutenberg_url( 'build/keycodes/index.js' ),\n\t\tarray( 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/keycodes/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-html-entities',\n\t\tgutenberg_url( 'build/html-entities/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/html-entities/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-data',\n\t\tgutenberg_url( 'build/data/index.js' ),\n\t\tarray(\n\t\t\t'wp-element',\n\t\t\t'wp-compose',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'lodash',\n\t\t\t'wp-redux-routine',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/data/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-data',\n\t\timplode(\n\t\t\t\"\\n\",\n\t\t\tarray(\n\t\t\t\t'( function() {',\n\t\t\t\t'\tvar userId = window.userSettings.uid;',\n\t\t\t\t'\tvar storageKey = \"WP_DATA_USER_\" + userId;',\n\t\t\t\t'\twp.data',\n\t\t\t\t'\t\t.use( wp.data.plugins.persistence, { storageKey: storageKey } )',\n\t\t\t\t'\t\t.use( wp.data.plugins.controls );',\n\t\t\t\t'} )()',\n\t\t\t)\n\t\t)\n\t);\n\twp_register_script(\n\t\t'wp-core-data',\n\t\tgutenberg_url( 'build/core-data/index.js' ),\n\t\tarray( 'wp-data', 'wp-api-fetch', 'wp-url', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-data/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-dom',\n\t\tgutenberg_url( 'build/dom/index.js' ),\n\t\tarray( 'wp-tinymce', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/dom/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-serialization-spec-parser',\n\t\tgutenberg_url( 'build/block-serialization-spec-parser/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-serialization-spec-parser/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-dom',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'document.contains' => 'wp-polyfill-node-contains',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-shortcode',\n\t\tgutenberg_url( 'build/shortcode/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/shortcode/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-redux-routine',\n\t\tgutenberg_url( 'build/redux-routine/index.js' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/redux-routine/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-date',\n\t\tgutenberg_url( 'build/date/index.js' ),\n\t\tarray( 'moment' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/date/index.js' ),\n\t\ttrue\n\t);\n\tglobal $wp_locale;\n\twp_add_inline_script(\n\t\t'wp-date',\n\t\tsprintf(\n\t\t\t'wp.date.setSettings( %s );',\n\t\t\twp_json_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'l10n' => array(\n\t\t\t\t\t\t'locale' => get_user_locale(),\n\t\t\t\t\t\t'months' => array_values( $wp_locale->month ),\n\t\t\t\t\t\t'monthsShort' => array_values( $wp_locale->month_abbrev ),\n\t\t\t\t\t\t'weekdays' => array_values( $wp_locale->weekday ),\n\t\t\t\t\t\t'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),\n\t\t\t\t\t\t'meridiem' => (object) $wp_locale->meridiem,\n\t\t\t\t\t\t'relative' => array(\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'future' => __( '%s from now', 'default' ),\n\t\t\t\t\t\t\t/* translators: %s: duration */\n\t\t\t\t\t\t\t'past' => __( '%s ago', 'default' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'formats' => array(\n\t\t\t\t\t\t'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ),\n\t\t\t\t\t\t'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),\n\t\t\t\t\t\t'datetime' => __( 'F j, Y g:i a', 'default' ),\n\t\t\t\t\t),\n\t\t\t\t\t'timezone' => array(\n\t\t\t\t\t\t'offset' => get_option( 'gmt_offset', 0 ),\n\t\t\t\t\t\t'string' => get_option( 'timezone_string', 'UTC' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t'after'\n\t);\n\twp_register_script(\n\t\t'wp-element',\n\t\tgutenberg_url( 'build/element/index.js' ),\n\t\tarray( 'react', 'react-dom', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/element/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-compose',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-components',\n\t\tsprintf( 'wp.components.unstable__setSiteURL(%s);', json_encode( site_url() ) )\n\t);\n\twp_register_script(\n\t\t'wp-blocks',\n\t\tgutenberg_url( 'build/blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-block-serialization-spec-parser',\n\t\t\t'wp-data',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-shortcode',\n\t\t\t'lodash',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/blocks/index.js' ),\n\t\ttrue\n\t);\n\n\twp_add_inline_script(\n\t\t'wp-blocks',\n\t\tgutenberg_get_script_polyfill(\n\t\t\tarray(\n\t\t\t\t'\\'Promise\\' in window' => 'wp-polyfill-promise',\n\t\t\t)\n\t\t),\n\t\t'before'\n\t);\n\twp_register_script(\n\t\t'wp-viewport',\n\t\tgutenberg_url( 'build/viewport/index.js' ),\n\t\tarray( 'wp-element', 'wp-data', 'wp-compose', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/viewport/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/index.js' ),\n\t\tarray(\n\t\t\t'editor',\n\t\t\t'lodash',\n\t\t\t'moment',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-autop',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-data',\n\t\t\t'wp-core-data',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/index.js' ),\n\t\ttrue\n\t);\n\t// Remove it with 3.8.0 release.\n\twp_register_script(\n\t\t'wp-core-blocks',\n\t\tgutenberg_url( 'build/core-blocks/index.js' ),\n\t\tarray(\n\t\t\t'wp-block-library',\n\t\t\t'wp-deprecated',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/core-blocks/index.js' ),\n\t\ttrue\n\t);\n\twp_register_script(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/index.js' ),\n\t\tarray( 'wp-element', 'wp-components', 'wp-compose', 'wp-data', 'wp-i18n', 'lodash' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/index.js' ),\n\t\ttrue\n\t);\n\t// Loading the old editor and its config to ensure the classic block works as expected.\n\twp_add_inline_script(\n\t\t'editor',\n\t\t'window.wp.oldEditor = window.wp.editor;',\n\t\t'after'\n\t);\n\t$tinymce_settings = apply_filters(\n\t\t'tiny_mce_before_init',\n\t\tarray(\n\t\t\t'plugins' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_unique(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'tiny_mce_plugins',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t\t'colorpicker',\n\t\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t\t'lists',\n\t\t\t\t\t\t\t'media',\n\t\t\t\t\t\t\t'paste',\n\t\t\t\t\t\t\t'tabfocus',\n\t\t\t\t\t\t\t'textcolor',\n\t\t\t\t\t\t\t'fullscreen',\n\t\t\t\t\t\t\t'wordpress',\n\t\t\t\t\t\t\t'wpautoresize',\n\t\t\t\t\t\t\t'wpeditimage',\n\t\t\t\t\t\t\t'wpemoji',\n\t\t\t\t\t\t\t'wpgallery',\n\t\t\t\t\t\t\t'wplink',\n\t\t\t\t\t\t\t'wpdialogs',\n\t\t\t\t\t\t\t'wptextpattern',\n\t\t\t\t\t\t\t'wpview',\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar1' => implode(\n\t\t\t\t',',\n\t\t\t\tarray_merge(\n\t\t\t\t\tapply_filters(\n\t\t\t\t\t\t'mce_buttons',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'formatselect',\n\t\t\t\t\t\t\t'bold',\n\t\t\t\t\t\t\t'italic',\n\t\t\t\t\t\t\t'bullist',\n\t\t\t\t\t\t\t'numlist',\n\t\t\t\t\t\t\t'blockquote',\n\t\t\t\t\t\t\t'alignleft',\n\t\t\t\t\t\t\t'aligncenter',\n\t\t\t\t\t\t\t'alignright',\n\t\t\t\t\t\t\t'link',\n\t\t\t\t\t\t\t'unlink',\n\t\t\t\t\t\t\t'wp_more',\n\t\t\t\t\t\t\t'spellchecker',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'editor'\n\t\t\t\t\t),\n\t\t\t\t\tarray( 'kitchensink' )\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar2' => implode(\n\t\t\t\t',',\n\t\t\t\tapply_filters(\n\t\t\t\t\t'mce_buttons_2',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'strikethrough',\n\t\t\t\t\t\t'hr',\n\t\t\t\t\t\t'forecolor',\n\t\t\t\t\t\t'pastetext',\n\t\t\t\t\t\t'removeformat',\n\t\t\t\t\t\t'charmap',\n\t\t\t\t\t\t'outdent',\n\t\t\t\t\t\t'indent',\n\t\t\t\t\t\t'undo',\n\t\t\t\t\t\t'redo',\n\t\t\t\t\t\t'wp_help',\n\t\t\t\t\t),\n\t\t\t\t\t'editor'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'toolbar3' => implode( ',', apply_filters( 'mce_buttons_3', array(), 'editor' ) ),\n\t\t\t'toolbar4' => implode( ',', apply_filters( 'mce_buttons_4', array(), 'editor' ) ),\n\t\t\t'external_plugins' => apply_filters( 'mce_external_plugins', array() ),\n\t\t),\n\t\t'editor'\n\t);\n\tif ( isset( $tinymce_settings['style_formats'] ) && is_string( $tinymce_settings['style_formats'] ) ) {\n\t\t// Decode the options as we used to recommende json_encoding the TinyMCE settings.\n\t\t$tinymce_settings['style_formats'] = json_decode( $tinymce_settings['style_formats'] );\n\t}\n\twp_localize_script(\n\t\t'wp-block-library',\n\t\t'wpEditorL10n',\n\t\tarray(\n\t\t\t'tinymce' => array(\n\t\t\t\t'baseURL' => includes_url( 'js/tinymce' ),\n\t\t\t\t'suffix' => SCRIPT_DEBUG ? '' : '.min',\n\t\t\t\t'settings' => $tinymce_settings,\n\t\t\t),\n\t\t)\n\t);\n\n\twp_register_script(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/index.js' ),\n\t\tarray(\n\t\t\t'lodash',\n\t\t\t'tinymce-latest-lists',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-blob',\n\t\t\t'wp-blocks',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-core-data',\n\t\t\t'wp-data',\n\t\t\t'wp-date',\n\t\t\t'wp-deprecated',\n\t\t\t'wp-dom',\n\t\t\t'wp-element',\n\t\t\t'wp-hooks',\n\t\t\t'wp-html-entities',\n\t\t\t'wp-i18n',\n\t\t\t'wp-is-shallow-equal',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-nux',\n\t\t\t'wp-tinymce',\n\t\t\t'wp-token-list',\n\t\t\t'wp-url',\n\t\t\t'wp-viewport',\n\t\t\t'wp-wordcount',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/index.js' )\n\t);\n\n\twp_register_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/index.js' ),\n\t\tarray(\n\t\t\t'jquery',\n\t\t\t'lodash',\n\t\t\t'postbox',\n\t\t\t'media-models',\n\t\t\t'media-views',\n\t\t\t'wp-a11y',\n\t\t\t'wp-api-fetch',\n\t\t\t'wp-components',\n\t\t\t'wp-compose',\n\t\t\t'wp-block-library',\n\t\t\t'wp-date',\n\t\t\t'wp-data',\n\t\t\t'wp-dom-ready',\n\t\t\t'wp-editor',\n\t\t\t'wp-element',\n\t\t\t'wp-embed',\n\t\t\t'wp-i18n',\n\t\t\t'wp-keycodes',\n\t\t\t'wp-plugins',\n\t\t\t'wp-viewport',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/index.js' ),\n\t\ttrue\n\t);\n\twp_add_inline_script(\n\t\t'wp-edit-post',\n\t\tgutenberg_get_script_polyfill( array( 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata' ) ),\n\t\t'before'\n\t);\n\n\t// Editor Styles.\n\t// This empty stylesheet is defined to ensure backwards compatibility.\n\twp_register_style( 'wp-blocks', false );\n\n\t$fonts_url = '';\n\n\t/*\n\t * Translators: If there are characters in your language that are not supported\n\t * by Noto Serif, translate this to 'off'. Do not translate into your own language.\n\t */\n\tif ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'gutenberg' ) ) {\n\t\t$query_args = array(\n\t\t\t'family' => urlencode( 'Noto Serif:400,400i,700,700i' ),\n\t\t);\n\n\t\t$fonts_url = esc_url_raw( add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ) );\n\t}\n\n\twp_register_style(\n\t\t'wp-editor-font',\n\t\t$fonts_url,\n\t\tarray(),\n\t\tnull\n\t);\n\n\twp_register_style(\n\t\t'wp-editor',\n\t\tgutenberg_url( 'build/editor/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor-font', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/editor/style.css' )\n\t);\n\twp_style_add_data( 'wp-editor', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-post',\n\t\tgutenberg_url( 'build/edit-post/style.css' ),\n\t\tarray( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/edit-post/style.css' )\n\t);\n\twp_style_add_data( 'wp-edit-post', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-components',\n\t\tgutenberg_url( 'build/components/style.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/components/style.css' )\n\t);\n\twp_style_add_data( 'wp-components', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library',\n\t\tgutenberg_url( 'build/block-library/style.css' ),\n\t\tcurrent_theme_supports( 'wp-block-styles' ) ? array( 'wp-block-library-theme' ) : array(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/style.css' )\n\t);\n\twp_style_add_data( 'wp-block-library', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-edit-blocks',\n\t\tgutenberg_url( 'build/block-library/edit-blocks.css' ),\n\t\tarray(\n\t\t\t'wp-components',\n\t\t\t'wp-editor',\n\t\t\t// Always include visual styles so the editor never appears broken.\n\t\t\t'wp-block-library-theme',\n\t\t),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/edit-blocks.css' )\n\t);\n\twp_style_add_data( 'wp-edit-blocks', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-nux',\n\t\tgutenberg_url( 'build/nux/style.css' ),\n\t\tarray( 'wp-components' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/nux/style.css' )\n\t);\n\twp_style_add_data( 'wp-nux', 'rtl', 'replace' );\n\n\twp_register_style(\n\t\t'wp-block-library-theme',\n\t\tgutenberg_url( 'build/block-library/theme.css' ),\n\t\tarray(),\n\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/theme.css' )\n\t);\n\twp_style_add_data( 'wp-block-library-theme', 'rtl', 'replace' );\n\n\twp_register_script(\n\t\t'wp-plugins',\n\t\tgutenberg_url( 'build/plugins/index.js' ),\n\t\tarray( 'lodash', 'wp-element', 'wp-hooks', 'wp-compose' ),\n\t\tfilemtime( gutenberg_dir_path() . 'build/plugins/index.js' )\n\t);\n\n\tif ( defined( 'GUTENBERG_LIVE_RELOAD' ) && GUTENBERG_LIVE_RELOAD ) {\n\t\t$live_reload_url = ( GUTENBERG_LIVE_RELOAD === true ) ? 'http://localhost:35729/livereload.js' : GUTENBERG_LIVE_RELOAD;\n\n\t\twp_enqueue_script(\n\t\t\t'gutenberg-live-reload',\n\t\t\t$live_reload_url\n\t\t);\n\t}\n}", "function register_scripts_and_styles() {\n\t\tif(!is_admin()) {\n\n\t\t\t// register styles\n\t\t\twp_register_style('wpinabox/css', $this->assets('main.css'), array());\n\n\t\t\t// register scripts\n\t\t\twp_register_script('wpinabox/js', $this->assets('main.js'), array(), null, true);\n\n\t\t\t// enqueue styles/scripts\n\t\t\twp_enqueue_style('wpinabox/css');\t\t\t\n\t\t\twp_enqueue_script('wpinabox/js');\t\t\n\n\t\t} else {\n\t\t\t// admin-specific styles / scripts\n\t\t}\n\t}", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}", "public static function admin_enqueue_scripts() {\n\t\tglobal $pagenow;\n\t\t\n\t\twp_register_script('st-helper-click-tags', STAGS_URL.'/assets/js/helper-click-tags.js', array('jquery', 'st-helper-add-tags'), STAGS_VERSION);\n\t\twp_localize_script('st-helper-click-tags', 'stHelperClickTagsL10n', array( 'show_txt' => __('Display click tags', 'simpletags'), 'hide_txt' => __('Hide click tags', 'simpletags') ) );\n\t\t\n\t\t// Register location\n\t\t$wp_post_pages = array('post.php', 'post-new.php');\n\t\t$wp_page_pages = array('page.php', 'page-new.php');\n\t\t\n\t\t// Helper for posts/pages\n\t\tif ( in_array($pagenow, $wp_post_pages) || ( in_array($pagenow, $wp_page_pages) && is_page_have_tags() ) ) {\n\t\t\twp_enqueue_script('st-helper-click-tags');\n\t\t}\n\t}", "public function enqueue_scripts() {\n\n\t}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function admin_scripts() {\n\t\twp_enqueue_style( 'jquery-ui-datepicker', plugins_url( \"/css/smoothness/jquery-ui-1.10.3$this->load_dev_files.css\", __FILE__ ), array(), '1.10.3' );\n\t\twp_enqueue_style( 'visual-form-builder-style', plugins_url( \"/css/visual-form-builder-admin$this->load_dev_files.css\", __FILE__ ), array(), '20140412' );\n\t\twp_enqueue_style( 'wp-color-picker' );\n\t\twp_enqueue_style( 'thickbox' );\n\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\twp_enqueue_script( 'jquery-ui-draggable' );\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\twp_enqueue_script( 'wp-color-picker' );\n\t\twp_enqueue_script( 'thickbox' );\n\t\twp_enqueue_script( 'postbox' );\n\t\twp_enqueue_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );\n\t\twp_enqueue_script( 'vfb-admin', plugins_url( \"/js/vfb-admin$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-form-validation' ), '20140221', true );\n\t\twp_enqueue_script( 'nested-sortable', plugins_url( \"/js/jquery.ui.nestedSortable$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-ui-sortable' ), '1.3.6', true );\n\t\twp_enqueue_script( 'jquery-ui-timepicker', plugins_url( \"/js/jquery.ui.timepicker$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-ui-datepicker' ), '1.1.1', true );\n\n\t\t// Only load Google Charts if viewing Analytics to prevent errors\n\t\tif ( isset( $_REQUEST['page'] ) && in_array( $_REQUEST['page'], array( 'vfb-reports' ) ) ) {\n\t\t\twp_enqueue_script( 'raphael-js', plugins_url( '/js/raphael.min.js', __FILE__ ), array(), '2.1.0', false );\n\t\t\twp_enqueue_script( 'morris-js', plugins_url( '/js/morris.min.js', __FILE__ ), array( 'raphael-js' ), '0.4.3', false );\n\t\t\twp_enqueue_script( 'vfb-charts', plugins_url( \"/js/vfb-charts$this->load_dev_files.js\", __FILE__ ), array( 'morris-js' ), '20130916', false );\n\t\t}\n\n\t\t// Load CSS for Create Post add-on\n\t\tif ( class_exists( 'VFB_Pro_Create_Post' ) )\n\t\t\twp_enqueue_style( 'vfb-pro-create-post', plugins_url( '/vfb-pro-create-post/css/vfb-pro-create-post.css' ), array( 'jquery-ui-datepicker', 'visual-form-builder-style' ), '20130916' );\n\n\t\twp_localize_script( 'vfb-admin', 'VfbAdminPages', array( 'vfb_pages' => $this->_admin_pages ) );\n\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "function lightseek_scripts() {\n\t// Main CSS\n\twp_enqueue_style( 'lightseek-style', get_stylesheet_uri() );\n\n\twp_enqueue_style( 'additional-css', get_template_directory_uri() . '/additional_css.css', array(), '20230301' );\n\n\t// Web Font Loader\n\t// https://github.com/typekit/webfontloader\n\twp_enqueue_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), null );\n\n\t// Font Awesome async\n\twp_enqueue_script( 'fa', 'https://use.fontawesome.com/0581ebd445.js', array(), null );\n\n\t// Main Script\n\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/main.min.js', array( 'jquery', 'webfont' ), '20170202', true );\n\n\t// Utils Script\n\twp_enqueue_script( 'util', get_template_directory_uri() . '/js/src/bootstrap/util.js', array( 'jquery' ), '20160530', true );\n\n\t// Tabs Script\n\twp_enqueue_script( 'tabs', get_template_directory_uri() . '/js/src/bootstrap/tab.js', array( 'jquery' ), '20160530', true );\n\n\t// Collapse Script\n\twp_enqueue_script( 'collapse', get_template_directory_uri() . '/js/src/bootstrap/collapse.js', array( 'jquery' ), '20160530', true );\n\n}", "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/master.css' );\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function tfc_admin_scripts($hook) {\n\n\twp_enqueue_style( 'tfc-lc-switch', '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css' );\n\twp_enqueue_style( 'tfc-ui', TFC_URL . '/css/lc_switch.css' );\n\n\twp_enqueue_script('jquery-ui-core');\n\twp_enqueue_script('jquery-ui-slider');\n\twp_enqueue_script('jquery-ui-button');\n\twp_enqueue_media();\n\twp_enqueue_script('tfc-lc-switch', TFC_URL . '/js/lc_switch.min.js', array( 'jquery' ));\n\twp_enqueue_script('tfc-admin', TFC_URL . '/js/admin.js', array( 'jquery' ));\n}", "function wagw_scripts() {\n\t\t$theme = wp_get_theme();\n\t\t$ver = $theme->get( 'Version' );\n\t$themecsspath = get_stylesheet_directory() . '/style.css';\n\t$style_ver = filemtime( $themecsspath );\n\twp_enqueue_style( 'wagw-style', get_stylesheet_uri(),array(),$style_ver );\n\n\twp_enqueue_script( 'wagw-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'wagw-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\twp_enqueue_script( 'thickbox', true );\n\twp_enqueue_style( 'thickbox' );\n\n\tif ( is_page_template( 'slider-page.php' ) ) {\n\t\twp_enqueue_style( 'flexslider-css', get_stylesheet_directory_uri() . '/flexslider/flexslider.css' );\n\t}\n\n}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "function inject_scripts() {\n\n\tglobal $wp_styles, $wp_scripts;\n\n\t// Registers style and adds the version number to the url for caching.\n\twp_register_style( 'style', get_stylesheet_uri(), false, '1.0.0' );\n\twp_enqueue_style( 'style' );\n\n\t// Deregisters WordPress's local copy of jQuery:\n\twp_deregister_script( 'jquery' );\n\n\t$js_dir = get_template_directory_uri() . '/js';\n\t$js_libs = $js_dir . '/bower_components';\n\n\t// Registers requirejs.\n\twp_enqueue_script( 'requirejs', $js_libs . '/requirejs/require.js', '', '', true);\n\twp_register_script( 'optimize', $js_dir . '/optimize.min.js', 'requirejs', '', true );\n\n\t// Passes theme's directory path to requirejs.\n\twp_localize_script( 'optimize', 'dir', array(\n\t\t'path' => $js_dir\n\t));\n\n\twp_enqueue_script( 'optimize', '', '', '', true );\n\n\t// Script used to get a facebook share button.\n\twp_register_script( 'facebook', $js_dir . '/facebook.js', '', '', false );\n\twp_enqueue_script( 'facebook', '', '', '', false );\n\n\t// Styles for the lightbox plugin.\n\tif ( is_page( 'Gallery' ) ) {\n\t\twp_register_style( 'lightbox-style', $js_libs . '/lightbox2/dist/css/lightbox.min.css' );\n\t\twp_enqueue_style( 'lightbox-style' );\n\t}\n\n\t// Add Google Analytics tacking code to footer:\n\twp_register_script( 'googleAnalytics', $js_dir . '/googleAnalytics.js', '', '', true );\n\twp_enqueue_script( 'googleAnalytics', '', '', '', true );\n\n\t// Add IE9 and below conditional for various fallback methods:\n\twp_enqueue_script( 'html5shiv', $js_libs . '/html5shiv/html5shiv.min.js' );\n\twp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' );\n\n\twp_enqueue_script( 'respond', $js_libs . '/respond/dest/respond.min.js' );\n\twp_script_add_data( 'respond', 'conditional', 'lte IE 8' );\n\n\t// Add box-sizing: border-box; support to IE7 and below:\n\twp_enqueue_style( 'ie7_style', get_stylesheet_directory_uri() . '/css/ie7.css', array( 'style' ) );\n\twp_style_add_data( 'ie7_style', 'conditional', 'lte IE 7' );\n\n}", "function theme_scripts_and_styles() {\n if (!is_admin()) {\n global $wp_scripts;\n wp_deregister_script('jquery');\n foreach($wp_scripts->registered as $handle => $script) {\n $wp_scripts->add_data($handle, 'group', 1);\n }\n\n theme_scripts::register();\n theme_styles::register();\n\n // comment reply script for threaded comments\n if ( is_singular() && comments_open() && (get_option('thread_comments') == 1)) {\n wp_enqueue_script('comment-reply');\n }\n\n theme_styles::enqueue();\n theme_scripts::enqueue();\n }\n}", "public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}", "function _scripts() {\n\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/assets/vendor/bootstrap/css/bootstrap.min.css', array(), null );\n\n\twp_enqueue_style( 'cleanblog-css', get_template_directory_uri() . '/assets/css/clean-blog.min.css', array(), null );\n\n\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/vendor/font-awesome/css/font-awesome.min.css', array(), null );\n\n\twp_enqueue_style( 'font-lora', 'https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic', array(), null );\n\n\twp_enqueue_style( 'font-opensans', 'https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800', array(), null );\n\n\twp_enqueue_script( 'jquery-js', get_theme_file_uri( '/assets/vendor/jquery/jquery.min.js' ), array(), null );\n\t\n\twp_enqueue_script( 'bootstrap-js', get_theme_file_uri( '/assets/vendor/bootstrap/js/bootstrap.min.js' ), array(), null );\n\n\twp_enqueue_script( 'bootstrapvalidation', get_theme_file_uri( '/assets/js/jqBootstrapValidation.js' ), array(), null );\n\n\twp_enqueue_script( 'contact-me', get_theme_file_uri( '/assets/js/contact_me.js' ), array(), null );\n\n\twp_enqueue_script( 'cleanblog-js', get_theme_file_uri( '/assets/js/clean-blog.min.js' ), array(), null );\n\t\n}", "function enqueue(){\n wp_enqueue_style('login_css_bootstrap-grid', $this->plugin_url . 'assets/login-bootstrap-grid.css');\n wp_enqueue_style('login_css_bootstrap-reboot', $this->plugin_url . 'assets/login-bootstrap-reboot.css');\n wp_enqueue_style('login_css_style', $this->plugin_url . 'assets/login-style.css');\n wp_enqueue_style('register_css_style', $this->plugin_url . 'assets/register-style.css');\n\n //Enqueuing Scripts\n wp_enqueue_script('login-script', $this->plugin_url . 'assets/login-script.js');\n wp_localize_script( 'login-script', 'login_ajax',\n array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));\n\n wp_enqueue_script('register_js_script', $this->plugin_url . 'assets/register-script.js');\n wp_localize_script('register_js_script', 'register_object',\n array('ajaxurl' => admin_url('admin-ajax.php')));\n\n }", "function enqueue_scripts() {\n\n\t\t//$the_theme = wp_get_theme();\n\t\t// Get the custom theme data.\n\t\twp_enqueue_style( 'styles', get_stylesheet_directory_uri() . '/css/screen.css', array(), '2.2.2' );\n\t\twp_enqueue_style( 'webfonts' , 'https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:ital,wght@0,300;0,700;1,300&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap', array(), false);\n\n\t\t//wp_enqueue_script( 'jquery-last', get_template_directory_uri() . '/vendor/js/jquery-3.2.1.min.js', array(), '', true);\n\t\twp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/vendor/js/jquery.fancybox.min.js', array(), '', true);\n\t\twp_enqueue_script( 'swiper', get_template_directory_uri() . '/vendor/js/swiper.min.js', array(), '', true);\n\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/app.min.js', array('jquery', 'jquery-fancybox', 'swiper'), '2.0.1', true );\n\n\t\twp_localize_script( 'theme-scripts', 'config', array(\n\t\t\t'ajax_url'\t=>\tadmin_url('admin-ajax.php'),\n\t\t\t'site_url'\t=>\tget_bloginfo( 'url' ),\n\t\t\t'theme_url'\t=>\tget_bloginfo( 'template_url' ),\n\t\t));\n\n\t}", "public function public_enqueue_scripts() {\n\n\t\twp_register_script('custom-event-polyfill', get_template_directory_uri() . '/js/polyfill/custom-event.min.js', array(), $this->version, true);\n\t\twp_register_script('promise-polyfill', get_template_directory_uri() . '/js/polyfill/promise.min.js', array(), $this->version, true);\n\t\t// wp_register_script('scroll-polyfill', get_template_directory_uri() . '/js/polyfill/smoothscroll.min.js', array(), $this->version, true);\n\n\t\twp_register_script('tinyAnimate', get_template_directory_uri() . '/js/utils/TinyAnimate.js', array(), $this->version, true);\n\t\twp_register_script('swipe', get_template_directory_uri() . '/js/utils/swipe.js', array(), $this->version, true);\n\t\twp_register_script('collection', get_template_directory_uri() . '/js/utils/collection.js', array(), $this->version, true);\n\t\twp_register_script('media-player', get_template_directory_uri() . '/js/utils/media-player.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('media-player-v2', get_template_directory_uri() . '/js/utils/media-player-v2.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('build', get_template_directory_uri() . '/js/utils/build.js', array(), $this->version, true);\n\t\twp_register_script('ajax', get_template_directory_uri() . '/js/utils/ajax.js', array(), $this->version, true);\n\t\twp_register_script('marquee', get_template_directory_uri() . '/js/utils/marquee.js', array(), $this->version, true);\n\t\twp_register_script('popup', get_template_directory_uri() . '/js/utils/popup.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('calendar', get_template_directory_uri() . '/js/utils/calendar.js', array(), $this->version, true);\n\t\twp_register_script('translation', get_template_directory_uri() . '/js/utils/translation.js', array(), $this->version, true);\n\t\twp_register_script('grid-system', get_template_directory_uri() . '/js/utils/grid-system.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('sticky', get_template_directory_uri() . '/js/utils/sticky.js', array(), $this->version, true);\n\t\twp_register_script('custom-dispatcher', get_template_directory_uri() . '/js/utils/custom-dispatcher.js', array(), $this->version, true);\n// \t\twp_enqueue_script('grid', get_template_directory_uri() . '/js/grid.js', array('grid-system'), $this->version, true);\n// \t\twp_enqueue_script('projects-grid', get_template_directory_uri() . '/js/projects.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('project', get_template_directory_uri() . '/js/project.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('image', get_template_directory_uri() . '/js/image.js', array('tinyAnimate'), $this->version, true);\n\t\t// wp_register_script('grid-slideshow', get_template_directory_uri() . '/js/grid-slideshow.js', array('media-player', 'swipe', 'build'), $this->version, true);\n\n\t\t// wp_enqueue_script('home', get_template_directory_uri() . '/js/home.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('header', get_template_directory_uri() . '/js/header.js', array('popup', 'sticky', 'marquee'), $this->version, true);\n\t\t// wp_enqueue_script('single', get_template_directory_uri() . '/js/single.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('bios', get_template_directory_uri() . '/js/bios.js', array('popup'), $this->version, true);\n\t\t// wp_enqueue_script('agenda', get_template_directory_uri() . '/js/agenda.js', array('popup', 'ajax', 'build', 'calendar', 'grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('intro', get_template_directory_uri() . '/js/intro.js', array('media-player'), $this->version, true);\n\n\t\twp_register_script('cookies', get_template_directory_uri() . '/js/utils/cookies.js', array(), $this->version, false);\n\n\t\twp_register_script('gmap', get_template_directory_uri() . '/js/utils/gmap.js', array('gmap-api'), $this->version, true);\n\n\t}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "function load_scripts()\n{\n\t// CSS\n\twp_enqueue_style('normalize', get_template_directory_uri() . '/src/css/normalize.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('animate', get_template_directory_uri() . '/src/css/animate.min.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('bootstrap', get_template_directory_uri() . '/src/css/bootstrap.css', array(), '4.3.1', 'all');\n\twp_enqueue_style('plugins', get_template_directory_uri() . '/src/css/plugins.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('stylesheet-blog', get_template_directory_uri() . '/src/css/stylesheet-blog.css', array(), '1.0.0', 'all');\n\t// JS\n\twp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/src/js/bootstrap.min.js', array('jquery'), '4.3.1', true);\n\twp_enqueue_script('goTo', get_template_directory_uri() . '/src/js/wow.min.js', array(), '1.0.0', true);\n\twp_enqueue_script('wowInit', get_template_directory_uri() . '/src/js/wowInit.js', array(), '1.0.0', true);\n\twp_enqueue_script('menu', get_template_directory_uri() . '/src/js/menu.js', array('jquery'), '1.0.0', true);\n}", "private function add_hooks(){\n\t\n\t\tadd_action( 'plugin_action_links_' . UCLACOMPONENTSWP_PLUGIN_BASE, array( $this, 'add_plugin_action_link' ), 20 );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend_scripts_and_styles' ), 20 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts_and_styles' ), 20 );\n\t\n\t}", "function basel_enqueue_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) )\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\n\t\twp_register_script( 'maplace', get_template_directory_uri() . '/js/maplace-0.1.3.min.js', array('jquery', 'google.map.api'), '', true );\n\t\t\n\t\tif( ! basel_woocommerce_installed() )\n\t\t\twp_register_script( 'jquery-cookie', get_template_directory_uri() . '/js/jquery.cookie.js', array('jquery'), '1.4.1', true );\n\n\t\twp_enqueue_script( 'basel_html5shiv', get_template_directory_uri() . '/js/html5.js' );\n\t\twp_script_add_data( 'basel_html5shiv', 'conditional', 'lt IE 9' );\n\n\t\twp_dequeue_script( 'flexslider' );\n\t\twp_dequeue_script( 'photoswipe-ui-default' );\n\t\twp_dequeue_script( 'prettyPhoto-init' );\n\t\twp_dequeue_style( 'photoswipe-default-skin' );\n\n\t\tif( basel_get_opt( 'image_action' ) != 'zoom' ) {\n\t\t\twp_dequeue_script( 'zoom' );\n\t\t}\n\n\t\twp_enqueue_script( 'isotope', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array( 'jquery' ), '', true );\n\t\twp_enqueue_script( 'waypoints' );\n\t\twp_enqueue_script( 'wpb_composer_front_js' );\n\n\t\tif( basel_get_opt( 'minified_js' ) ) {\n\t\t\twp_enqueue_script( 'basel-theme', get_template_directory_uri() . '/js/theme.min.js', array( 'jquery', 'jquery-cookie' ), '', true );\n\t\t} else {\n\t\t\twp_enqueue_script( 'basel-libraries', get_template_directory_uri() . '/js/libraries.js', array( 'jquery', 'jquery-cookie' ), '', true );\n\t\t\twp_enqueue_script( 'basel-functions', get_template_directory_uri() . '/js/functions.js', array( 'jquery', 'jquery-cookie' ), '', true );\n\t\t}\n\n\t\t// Add virations form scripts through the site to make it work on quick view\n\t\tif( basel_get_opt( 'quick_view_variable' ) ) {\n\t\t\twp_enqueue_script( 'wc-add-to-cart-variation' );\n\t\t}\n\n\n\t\t$translations = array(\n\t\t\t'adding_to_cart' => esc_html__('Processing', 'basel'),\n\t\t\t'added_to_cart' => esc_html__('Product was successfully added to your cart.', 'basel'),\n\t\t\t'continue_shopping' => esc_html__('Continue shopping', 'basel'),\n\t\t\t'view_cart' => esc_html__('View Cart', 'basel'),\n\t\t\t'go_to_checkout' => esc_html__('Checkout', 'basel'),\n\t\t\t'loading' => esc_html__('Loading...', 'basel'),\n\t\t\t'countdown_days' => esc_html__('days', 'basel'),\n\t\t\t'countdown_hours' => esc_html__('hr', 'basel'),\n\t\t\t'countdown_mins' => esc_html__('min', 'basel'),\n\t\t\t'countdown_sec' => esc_html__('sc', 'basel'),\n\t\t\t'loading' => esc_html__('Loading...', 'basel'),\n\t\t\t'wishlist' => ( class_exists( 'YITH_WCWL' ) ) ? 'yes' : 'no',\n\t\t\t'cart_url' => ( basel_woocommerce_installed() ) ? esc_url( WC()->cart->get_cart_url() ) : '',\n\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t'add_to_cart_action' => ( basel_get_opt( 'add_to_cart_action' ) ) ? esc_js( basel_get_opt( 'add_to_cart_action' ) ) : 'widget',\n\t\t\t'categories_toggle' => ( basel_get_opt( 'categories_toggle' ) ) ? 'yes' : 'no',\n\t\t\t'enable_popup' => ( basel_get_opt( 'promo_popup' ) ) ? 'yes' : 'no',\n\t\t\t'popup_delay' => ( basel_get_opt( 'promo_timeout' ) ) ? (int) basel_get_opt( 'promo_timeout' ) : 1000,\n\t\t\t'popup_event' => basel_get_opt( 'popup_event' ),\n\t\t\t'popup_scroll' => ( basel_get_opt( 'popup_scroll' ) ) ? (int) basel_get_opt( 'popup_scroll' ) : 1000,\n\t\t\t'popup_pages' => ( basel_get_opt( 'popup_pages' ) ) ? (int) basel_get_opt( 'popup_pages' ) : 0,\n\t\t\t'promo_popup_hide_mobile' => ( basel_get_opt( 'promo_popup_hide_mobile' ) ) ? 'yes' : 'no',\n\t\t\t'product_images_captions' => ( basel_get_opt( 'product_images_captions' ) ) ? 'yes' : 'no',\n\t\t\t'all_results' => __('View all results', 'basel'),\n\t\t\t'product_gallery' => basel_get_product_gallery_settings(),\n\t\t\t'zoom_enable' => ( basel_get_opt( 'image_action' ) == 'zoom') ? 'yes' : 'no',\n\t\t\t'ajax_scroll' => ( basel_get_opt( 'ajax_scroll' ) ) ? 'yes' : 'no',\n\t\t\t'ajax_scroll_class' => apply_filters( 'basel_ajax_scroll_class' , '.main-page-wrapper' ),\n\t\t\t'ajax_scroll_offset' => apply_filters( 'basel_ajax_scroll_offset' , 100 ),\n\t\t\t'product_slider_auto_height' => ( apply_filters( 'basel_product_slider_auto_height' , false ) ) ? 'yes' : 'no',\n\t\t);\n\n\t\twp_localize_script( 'basel-functions', 'basel_settings', $translations );\n\t\twp_localize_script( 'basel-theme', 'basel_settings', $translations );\n\t\t\n\t\tif( ( is_home() || is_singular( 'post' ) || is_archive() ) && basel_get_opt('blog_design') == 'masonry' ) {\n\t\t\t// Load masonry script JS for blog\n\t\t\twp_enqueue_script( 'masonry' );\n\t\t}\n\n\t}", "function admin_scripts() {\r\n\t\t\twp_register_style( 'wpeologs_backend_css', WPEO_LOGS_URL . '/assets/css/backend.css', '', WPEO_LOGS_VERSION);\r\n\t\t\twp_enqueue_style( 'wpeologs_backend_css');\r\n\r\n\t\t\twp_enqueue_style( 'dashicons' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_chart_js', WPEO_LOGS_URL . '/assets/js/chart.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_chart_js' );\r\n\r\n\t\t\twp_register_script( 'wpeologs_backend_js', WPEO_LOGS_URL . '/assets/js/backend.js');\r\n\t\t\twp_enqueue_script( 'wpeologs_backend_js' );\r\n\t\t}", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "function enqueue_script($hook){\n\t\t\t\tif( strpos($hook, 'page_' . $this->settings['slug']) !== false ){\n\t\t\t\t\t\t\n\t\t\t\t\tgdlr_core_include_utility_script();\n\n\t\t\t\t\t// include the admin style\n\t\t\t\t\twp_enqueue_style('font-awesome', GDLR_CORE_URL . '/plugins/font-awesome/css/font-awesome.min.css');\n\t\t\t\t\twp_enqueue_style('gdlr-core-getting-start', GDLR_CORE_URL . '/framework/css/getting-start.css');\n\t\t\t\t\twp_enqueue_style('open-sans-css', 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext');\n\t\t\t\t\t\n\t\t\t\t\t// include the admin script\n\t\t\t\t\twp_enqueue_script('gdlr-core-getting-start', GDLR_CORE_URL . '/framework/js/getting-start.js', array('jquery'), false, true);\n\t\t\t\t\twp_localize_script('gdlr-core-getting-start', 'gdlr_core_ajax_message', array(\n\t\t\t\t\t\t'ajaxurl' => GDLR_CORE_AJAX_URL,\n\t\t\t\t\t\t'error_head' => esc_html__('An error occurs', 'goodlayers-core'),\n\t\t\t\t\t\t'error_message' => esc_html__('Please try again. If the problem still persists, please contact administrator for this.', 'goodlayers-core'),\n\t\t\t\t\t\t'nonce' => wp_create_nonce('gdlr_core_demo_import'),\n\n\t\t\t\t\t\t'importing_head' => esc_html__('Importing demo content. Please wait...', 'goodlayers-core'),\n\t\t\t\t\t\t'importing_content' => esc_html__('If you choose to download images from demo site, it can take up to 7-8 minutes so please be patient.', 'goodlayers-core'),\n\t\t\t\t\t));\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}", "function thoughts_register_scripts() {\n\twp_register_script( 'modernizr', get_template_directory_uri() . '/assets/js/components/modernizr/modernizr.js', array('jquery'), '1.0');\n wp_enqueue_script( 'modernizr' );\n\n wp_register_script( 'app', get_template_directory_uri() . '/assets/js/app.js', array('jquery', 'modernizr'), '1.0');\n wp_enqueue_script( 'app' );\n \n wp_register_style( 'app', get_template_directory_uri() . '/assets/css/app.css', array('bootstrap', 'bootstrap_theme'), '1.0', 'all' );\n wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/js/components/bootstrap/dist/css/bootstrap.min.css', array(), '3', 'all' );\n wp_register_style( 'bootstrap_theme', get_template_directory_uri() . '/assets/js/components/bootstrap/dist/css/bootstrap-theme.min.css', array(), '3', 'all' );\n wp_enqueue_style( 'app' );\n}", "static function enqueue_scripts() {\n\t\tif ( ! static::matches_custom_format( get_post_format() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//scripts\n\t\twp_register_script( 'custom-event-preview-script', get_stylesheet_directory_uri() . '/assets/js/cpf-event-preview.min.js', array( 'jquery' ), CURRENT_THEME_VERSION, true );\n\t\twp_enqueue_script( 'custom-event-preview-script' );\n\t\twp_localize_script( 'custom-event-preview-script', 'evtPreviewData', self::event_preview_data() );\n\t}", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function register_admin_scripts_and_styles() {\n\t\t\n\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "function wordpressboilerplate_scripts (){\n wp_enqueue_style( 'wordpressboilerplate-style', get_stylesheet_uri() );\n wp_enqueue_script( 'wordpressboilerplate-script', get_template_directory_uri() . 'js/main.js', array( 'jquery' ) );\n\n wp_register_style('animate.css', get_stylesheet_uri() . 'assets/vendor/font-awesome/css/font-awesome.min.css');\n}", "function enqueueFiles()\n{\n wp_enqueue_style('style', get_stylesheet_uri(), array(), '1.22');\n wp_enqueue_script('script', get_template_directory_uri() . '/assets/js/custom.js', array(), '1.22');\n}", "public function admin_enqueue_scripts( $hook_suffix ) {\n\t\t\t// Only load resources if they are needed on the current page\n\t\t\tif ( ! in_array( $hook_suffix, array( 'post.php', 'post-new.php' ) ) || ! ttfmake_post_type_supports_builder( get_post_type() ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twp_register_script(\n\t\t\t\t'ttfmake-sections/js/models/hero-block.js',\n\t\t\t\tget_stylesheet_directory_uri() . '/inc/gw214-builder/sections/js/models/hero-block.js',\n\t\t\t\tarray(),\n\t\t\t\t'0.1',\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_register_script(\n\t\t\t\t'ttfmake-sections/js/views/hero-block.js',\n\t\t\t\tget_stylesheet_directory_uri() . '/inc/gw214-builder/sections/js/views/hero-block.js',\n\t\t\t\tarray(),\n\t\t\t\t'0.1',\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_register_script(\n\t\t\t\t'ttfmake-sections/js/views/hero.js',\n\t\t\t\tget_stylesheet_directory_uri() . '/inc/gw214-builder/sections/js/views/hero.js',\n\t\t\t\tarray(),\n\t\t\t\t'0.1',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\t// Add the section CSS\n\t\t\twp_enqueue_style(\n\t\t\t\t'gw214-sections.css',\n\t\t\t\tget_stylesheet_directory_uri() . '/inc/gw214-builder/sections/css/gw214-sections.css',\n\t\t\t\tarray(),\n\t\t\t\t'0.1',\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\tadd_filter( 'ttfmake_builder_js_dependencies', array( $this, 'add_gw214_js_dependencies' ) );\n\t\t}", "public function admin_enqueue_scripts() {\n\t\t$pagenow = $GLOBALS['pagenow'];\n\n\t\tif ( ! ( self::is_term_edit( $pagenow ) || self::is_term_overview( $pagenow ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$asset_manager = new WPSEO_Admin_Asset_Manager();\n\t\t$asset_manager->enqueue_style( 'scoring' );\n\n\t\t$tab = new WPSEO_Help_Center_Template_Variables_Tab();\n\t\t$tab->enqueue_assets();\n\n\t\t$tag_id = filter_input( INPUT_GET, 'tag_ID' );\n\t\tif (\n\t\t\tself::is_term_edit( $pagenow ) &&\n\t\t\t! empty( $tag_id ) // After we drop support for <4.5 this can be removed.\n\t\t) {\n\t\t\twp_enqueue_media(); // Enqueue files needed for upload functionality.\n\n\t\t\t$asset_manager->enqueue_style( 'metabox-css' );\n\t\t\t$asset_manager->enqueue_style( 'snippet' );\n\t\t\t$asset_manager->enqueue_style( 'scoring' );\n\t\t\t$asset_manager->enqueue_script( 'metabox' );\n\t\t\t$asset_manager->enqueue_script( 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoTermScraperL10n', $this->localize_term_scraper_script() );\n\t\t\t$yoast_components_l10n = new WPSEO_Admin_Asset_Yoast_Components_l10n();\n\t\t\t$yoast_components_l10n->localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() );\n\n\t\t\t$asset_manager->enqueue_script( 'admin-media' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array(\n\t\t\t\t'choose_image' => __( 'Use Image', 'wordpress-seo' ),\n\t\t\t) );\n\t\t}\n\n\t\tif ( self::is_term_overview( $pagenow ) ) {\n\t\t\t$asset_manager->enqueue_script( 'edit-page-script' );\n\t\t}\n\t}", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "function asc_enqueue_scripts() {\n\t/**\n\t * Fires when scripts and styles are enqueued.\n\t *\n\t * @since 2.8.0\n\t */\n\tdo_action( 'asc_enqueue_scripts' );\n}", "function abyp_scripts() {\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n // Register scripts \n wp_register_script( 'modernizr', SCRIPTS . '/vendor/modernizr.custom.25133.js', false, false, true );\n wp_register_script( 'tween-max', SCRIPTS . '/vendor/TweenMax.min.js', false, false, true );\n wp_register_script( 'jquery-abyp', SCRIPTS . '/vendor/jquery-2.1.1.min.js', false, false, true );\n wp_register_script( 'easing', SCRIPTS . '/vendor/jquery.easing.1.3.js', false, false, true );\n wp_register_script( 'lightbox', SCRIPTS . '/vendor/lightbox-2.6.min.js', false, false, true );\n wp_register_script( 'vendor-bundle', SCRIPTS . '/vendor/vendor.bundle.js', false, false, true );\n wp_register_script( 'abyp-main', SCRIPTS . '/main.js', false, false, true );\n\n // Load the custom scripts \n wp_enqueue_script( 'modernizr' );\n wp_enqueue_script( 'tween-max' );\n wp_enqueue_script( 'jquery-abyp' );\n wp_enqueue_script( 'easing' );\n wp_enqueue_script( 'lightbox' );\n wp_enqueue_script( 'vendor-bundle' );\n wp_enqueue_script( 'abyp-main' ); \n\n // Load the stylesheets \n wp_enqueue_style( 'lightbox', THEMEROOT . '/assets/css/lightbox.css' );\n wp_enqueue_style( 'abyp-master', THEMEROOT . '/assets/css/master.css' );\n }", "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "function enqueue_styles_and_scripts() {\n\n\twp_enqueue_style('bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');\n\twp_enqueue_style('animate', get_theme_file_uri('/css/animate.css'));\n\twp_enqueue_style('et-line', get_theme_file_uri('/css/et-line.min.css'));\n\twp_enqueue_style('font-awesome', get_theme_file_uri('/css/font-awesome.min.css'));\n\n // Theme's default font from google fonts\n wp_enqueue_style('font-montserrat', '//fonts.googleapis.com/css?family=Montserrat');\n\n\t// Theme main stylesheet.\n\t// Update version automatically after each file modification\n \t$mainCssSrc = get_stylesheet_uri();\n\t$mainCssVer = filemtime( get_stylesheet_directory() . '/style.css');\n\n\twp_enqueue_style('main_style', $mainCssSrc, array(), $mainCssVer);\n\n // JS includes\n\twp_enqueue_script('bootstrap_js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js');\n\twp_enqueue_script('blocs', get_theme_file_uri('/js/blocs.js'), array('jquery'), '0.2', true);\n}", "public function admin_enqueue_scripts($hook)\n\t{\n\t\twp_register_script('sync-divi', WPSiteSync_Divi::get_asset('js/sync-divi.js'), array('sync'), WPSiteSync_Divi::PLUGIN_VERSION, TRUE);\n\t\twp_register_style('sync-divi', WPSiteSync_Divi::get_asset('css/sync-divi.css'), array('sync-admin'), WPSiteSync_Divi::PLUGIN_VERSION);\n\n\t\tif (in_array($hook, array('toplevel_page_et_divi_options', 'divi_page_et_divi_role_editor', 'post.php'))) {\n\t\t\t$theme = wp_get_theme();\n\n\t\t\t// check for Divi theme or Divi plugin\n//\t\t\tif (!defined('ET_BUILDER_PLUGIN_DIR') ||\n//\t\t\t\t('toplevel_page_et_divi_options' === $hook && ('Divi' !== $theme->name && 'Divi' !== $theme->parent_theme))) {\n//die('returning theme-name=' . $theme->name);\n//\t\t\t\treturn;\n//\t\t\t}\n\n\t\t\tif (defined('ET_BUILDER_PLUGIN_DIR') ||\t\t\t\t\t\t\t\t// defined in plugin\n\t\t\t\t('Divi' === $theme->name || 'Divi' === $theme->parent_theme)) {\t// theme/parent theme is Divi\n\t\t\t\twp_enqueue_script('sync-divi');\n\t\t\t\twp_enqueue_style('sync-divi');\n\t\t\t}\n\t\t}\n\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drinkers-edition-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function load_styles_and_scripts(){\r\n\r\n\t//register styles\r\n\twp_register_style('bootstrap-styles',get_template_directory_uri().'/css/bootstrap.min.css');\r\n\twp_register_style('main-styles',get_template_directory_uri().'/style.css');\r\n\r\n\t\r\n\t//register scripts\r\n\twp_register_script('bootstrap-scripts',get_template_directory_uri().'/js/bootstrap.min.js');\r\n\r\n\t//load styles\r\n\twp_enqueue_style('bootstrap-styles',get_template_directory_uri().'/css/bootstrap.min.css');\r\n\twp_enqueue_style('main-styles',get_template_directory_uri().'/style.css');\r\n\r\n\t\r\n\t//load scripts\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('bootstrap-scripts',get_template_directory_uri().'/js/bootstrap.min.js');\r\n\r\n}", "function mp_enqueue_scripts(){\n\n // Action pour shunter mp_register_style\n do_action('enqueue_scripts');\n\n // On charge les registers\n $enqueue_registers = mp_cache_data('mp_register_script');\n\n if( !empty($enqueue_registers) ){\n\n // On charge les registers\n foreach ($enqueue_registers as $handle => $args)\n mp_enqueue_script($handle);\n }\n\n}", "function ajout_scripts() {\n wp_register_script('bootstrap_script', get_template_directory_uri() . '/assets/scripts/bootstrap.min.js', array('jquery'),'1.1', true);\n wp_enqueue_script('bootstrap_script');\n \n wp_register_script('main_js', get_template_directory_uri() . '/assets/scripts/main.js', array('jquery'),'1.1', true);\n wp_enqueue_script('main_js');\n \n // enregistrement des styles\n wp_register_style( 'google_font', 'https://fonts.googleapis.com/css?family=Anton|Oxygen' );\n wp_enqueue_style( 'google_font' );\n \n wp_register_style( 'bootstrap_style', get_template_directory_uri() . '/assets/styles/bootstrap.min.css' );\n wp_enqueue_style( 'bootstrap_style' );\n \n // enregistrement des styles\n wp_register_style( 'main_style', get_template_directory_uri() . '/assets/styles/main.css' );\n wp_enqueue_style( 'main_style' );\n}", "function health_access2017_scripts() {\n\t// theme style.css file\n\t// wp_enqueue_style( 'google-fonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,900', false ); \n\twp_enqueue_style( 'health-access2017-style', get_stylesheet_uri() );\n\n\t//enqueue additional stylesheet for custom css to be added in addition to theme css\n\twp_enqueue_style( 'additional-styles', get_stylesheet_directory_uri() . '/custom.css' );\n\t\n\t// threaded comments\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\t// vendor scripts\n//\twp_enqueue_script(\n//\t\t'vendor',\n//\t\tget_template_directory_uri() . '/assets/vendor/newscript.js',\n//\t\tarray('jquery')\n//\t);\n\t// theme scripts\n\twp_enqueue_script(\n\t\t'theme-init',\n\t\tget_template_directory_uri() . '/assets/theme.js',\n\t\tarray('jquery')\n\t);\n}", "function awesome_script_enqueue() {\r\n\t//css\r\n\twp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.4', 'all');\r\n\twp_enqueue_style('customstyle', get_template_directory_uri() . '/css/katayam.css', array(), '1.0.0', 'all');\r\n\t//js\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('bootstrapjs', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '3.3.4', true);\r\n\twp_enqueue_script('customjs', get_template_directory_uri() . '/js/katayam.js', array(), '1.0.0', true);\r\n\t\r\n}", "public function enqueue_scripts()\n {\n }" ]
[ "0.7879211", "0.77769756", "0.77137274", "0.76955533", "0.7675727", "0.76540893", "0.76540893", "0.7641589", "0.7632634", "0.7595963", "0.7588584", "0.7582734", "0.75730586", "0.75711054", "0.75661224", "0.75432247", "0.75389075", "0.7535946", "0.7526404", "0.7516767", "0.75108695", "0.7504402", "0.7499381", "0.7493059", "0.74823225", "0.74789566", "0.74770504", "0.74753404", "0.74719405", "0.7471018", "0.7444437", "0.7443927", "0.743802", "0.7436243", "0.7435988", "0.7433585", "0.74284226", "0.74209064", "0.7417082", "0.7413019", "0.74114895", "0.7410624", "0.740458", "0.7395796", "0.7391349", "0.73907655", "0.7389747", "0.7389368", "0.7388691", "0.7388542", "0.7384329", "0.737752", "0.7376425", "0.7369835", "0.7369453", "0.73678654", "0.73602295", "0.73551625", "0.7352472", "0.7351136", "0.7340553", "0.73401475", "0.7338936", "0.7337794", "0.73320735", "0.7330315", "0.73294955", "0.7325613", "0.73254985", "0.7319277", "0.7318589", "0.7318508", "0.73162895", "0.7314811", "0.73098695", "0.7309726", "0.7307212", "0.7304469", "0.7303136", "0.7302737", "0.7301131", "0.729887", "0.72987586", "0.7292714", "0.72819597", "0.72802085", "0.72786534", "0.7277015", "0.72752315", "0.72750396", "0.72704744", "0.7270081", "0.7268083", "0.7263684", "0.7261013", "0.7259724", "0.7256184", "0.72530735", "0.7244763", "0.72447354" ]
0.75476325
15
Gets query for [[Semester1Students]].
public function getSemester1Students() { return $this->hasMany(Semester1Students::className(), ['semester' => 'semester_id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_students_list(){\n return $this->n->get_list_from_db();\n }", "private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}", "public function semesterOnePage() {\n return \\view('admin.students.one-results', [\n 'ones' => SemesterOne::query()->whereIn('user_id', User::query()->where('program_verified', true)->get())->paginate(config('mv-notification.paginate')),\n ]);\n }", "public function getStudentsQueryForGroup($group_id) {\n\t\treturn SQLQuery::create()->select(\"StudentGroup\")->whereValue(\"StudentGroup\",\"group\",$group_id);\n\t}", "public function getStudentsAssignment()\n {\n $where = [];\n foreach ($this->request->getQuery() as $key => $value) {\n if(!empty($value))\n $where[$key] = $value;\n }\n $response=$this->StudentHealths->StudentInfos->find()\n ->select(['name'=>'Students.name','id'=>'Students.id'])\n ->contain(['Students'])\n ->where($where) \n ->where(['is_deleted'=>'N'])\n ->where(['StudentInfos.session_year_id'=>$this->Auth->user('session_year_id')]);\n foreach ($response as $key => $value) {\n $option[$value->id]=$value->name;\n } \n if(!empty($option)){\n foreach ($option as $key => $value) {\n echo \"<option value='\".$key.\"'>\".$value.\"</option>\";\n }\n }\n exit;\n \n }", "public function getAllStudents(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->getAllStudents();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.getAllStudents()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function getStudentsByClass() {\n\t\t$students_by_class = Student::GetInstance()->getStudentsByClass( $_POST['class_id'] );\n\n\t\treturn jsonResult( $students_by_class );\n\n\t}", "public function getStudent(){\n\t\t$this->load->model('School_model');\n\t\t$this->School_model->getSchoolAll();\n\t}", "public function getStudents($params = array())\n {\n $sql = 'select * from engine4_users where user_id in (\n SELECT item_id FROM `engine4_user_fields_values` where field_id=1 and value=4\n )';\n \n $table = Engine_Api::_()->getDbtable('users', 'user')->getAdapter();\n $select = $table->query($sql)->fetchAll(); \n\n return $select;\n }", "public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}", "public function listOfStudents($skola) {\n\t\t\t$this->db->where('skolaId',$skola);\n\t\t\t $query = $this->db->get(\"predmet\");\n\t\t return $query;\n\t\t}", "public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}", "public function getSemester2Students()\n {\n return $this->hasMany(Semester2Students::className(), ['semester' => 'semester_id']);\n }", "public function mysearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\tif(Yii::app()->user->getState('stud_id'))\n\t\t{\n\t\t$criteria->condition = 'student_docs_trans_user_id = :student_user_id';\n\t $criteria->params = array(':student_user_id' => Yii::app()->user->getState('stud_id'));\n\t\t}\n\t\telse\n\t\t{\n\t\t$criteria->condition = 'student_docs_trans_user_id = :student_user_id';\n\t $criteria->params = array(':student_user_id' => $_REQUEST['id']);\n\t\t}\n\t\t$criteria->compare('student_docs_trans_id',$this->student_docs_trans_id);\n\t\t$criteria->compare('student_docs_trans_user_id',$this->student_docs_trans_user_id,true);\n\t\t$criteria->compare('student_docs_trans_stud_docs_id',$this->student_docs_trans_stud_docs_id,true);\n\t\t\n\t\t$student_docs = new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t$_SESSION['student_docs']=$student_docs;\n\t\treturn $student_docs;\n\t}", "function getAllStudents($classId) {\r\n $this->db->select('u.*');\r\n $this->db->from('subscription s');\r\n $this->db->from('user u');\r\n $this->db->where('u.id = s.subscriptionUser');\r\n $this->db->where('s.subscriptionClass', $classId);\r\n $this->db->where('s.subscriptionStartDate <= CURRENT_DATE()');\r\n $this->db->where('s.subscriptionEndDate >= CURRENT_DATE()');\r\n $this->db->group_by('u.id');\r\n return $this->db->get()->result();\r\n }", "public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }", "public function findStudentsByCourse(CourseInterface $course);", "public function get_session_wise_student() {\n\t\t$checker = array(\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\treturn $this->db->get_where('enrols', $checker);\n\t}", "public function getStudents()\n {\n return $this->hasMany(Student::className(), ['student_previous_qualification_id' => 'previousqualification_id']);\n }", "public function getAllStudents() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) { \n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $students = $student->getAllStudents();\n \n $model = array(\n 'user_data' => $user_data,\n 'students' => $students\n );\n BaseController::display(self::$controller . '/students.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "public function getAllStudentsResults() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) {\n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $results = $student->getAllStudentsResults();\n \n $model = array(\n 'user_data' => $user_data,\n 'results' => $results\n );\n BaseController::display(self::$controller . '/student-results.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "function show_students(){\n\t$query = $this->db->get('students');\n\t$query_result = $query->result();\n\treturn $query_result;\n\t}", "public function getStudents(): array\n {\n \n return $this->students;\n }", "public function getGrdStudents( $grdID, $sessionID ){\r\n\t\t$this->DDB = $this->load->database(\"default\",TRUE);\r\n\t\t\r\n\t\t$where = array(\"grade_id\" => $grdID, \"std_status_category\"=>\"Student\");\r\n\t\t$this->DDB->select(\"`id`,`official_name`,`abridged_name`, `gender`, `gs_id`,`section_dname` AS `section`,`student_status_name` AS `status`\");\r\n\t\t$this->DDB->from(\"`class_list`\");\r\n\t\t$this->DDB->where( $where );\r\n\t\t//$this->DDB->where(\"(std_status_category='Student' OR std_status_category='Fence')\", NULL, FALSE);\r\n\t\t$this->DDB->order_by(\"section_id\", \"ASC\");\r\n\t\t$this->DDB->order_by(\"call_name\", \"ASC\"); \r\n\t\t$query = $this->DDB->get();\r\n\t\tif( $query->num_rows() > 0 ){\r\n\t\t\t$results = $query->result_array();\r\n\t\t\treturn $results;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public function getStudents($univid) { //$univid is formal Argument\r\n\t\t//2. Build The Query\r\n\t\t\r\n $this->db->select('student_name,stu_enroll_no')->from('students');\r\n \r\n $this->db->where('university_id', $univid);\r\n \r\n\t\t//3. Execute the query\r\n $query = $this->db->get();\r\n\t\t\r\n\t\t//4. Return the result\r\n return $query->result_array(); \r\n }", "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }", "public function newStudentsInRisk(){\n return Aluriesgo::studentsInRiskQuery()->\n andWhere([\n 'codfac'=>$this->codfac,\n 'codperiodo'=>$this->codperiodo\n ])->\n andWhere(['not in',\n 'codalu', ArrayHelper::getColumn($this->studentsInRiskForThis(),'codalu')\n ])->all();\n \n }", "public function getstudent($txtStartDate,$txtEndDate,$txtSubject,$txtYear)\n\t{\n\t\tif($txtYear==\"1st\"){\n\t\t\t$this->db->where('payment_admission', 1);\n\t\t\t// $this->db->where('gen_type', $txtSubject);\n\t\t\t$this->db->where('gen_type', $txtSubject);\n\t\t\t$this->db->where('admission_payment_date >=', $txtStartDate);\n\t\t\t$this->db->where('admission_payment_date <=', $txtEndDate);\n\t\t\t$this->db->where('trsnfer_flag', 0);\n\t\t\t$this->db->where('cancel', 0);\n\t\t\t$this->db->order_by('college_roll', 'asc');\n\t\t\t$query=$this->db->get('admission_erp');\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\t$this->db->where('sub_honours', $txtSubject);\n\t\t\t$this->db->where('pay_status_part2', 1);\n\t\t\t$this->db->where('payment_date_2 >=', $txtStartDate);\n\t\t\t$this->db->where('payment_date_2 <=', $txtEndDate);\n\t\t\t$this->db->where('trsnfer_flag', 0);\n\t\t\t$this->db->where('cancel_flag', 0);\n\t\t\t$query=$this->db->get('student_dtl');\n\t\t\treturn $query->result();\n\t\t}\n\t}", "public function getStudentsByClassIdAndSubGen($lastSeasonId,$classe){\n // $this->db->select('students.*,points.subject,points.sc,points.te');\n $this->db->select('students.*');\n $this->db->join('classes','students.classe=classes.id');\n // $this->db->join('points','points.student=students.id');\n // $this->db->where('students.classe',$classeId);\n $filter = array(\n 'students.season'=>$lastSeasonId,\n 'classes.id'=>$classe\n // 'points.subject'=>$sub\n );\n $this->db->where($filter);\n // $this->db->where_in('points.subject',$ids);\n return $this->db->get('students')->result();\n }", "public function getStudents(int $id)\n {\n try {\n $students = Classroom::findOrFail($id)\n ->students()\n ->when(['student', $this->orderBy], Closure::fromCallable([$this, 'queryOrderBy']))\n ->when($this->limit, Closure::fromCallable([$this, 'queryLimit']));\n\n return StudentResource::collection($students);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n 'code' => 404,\n 'message' => 'Not Found',\n 'description' => 'Department ' . $id . ' not found.'\n ], 404);\n }\n }", "public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }", "public function getstudentbymajor($data) {\n $year = $data['year'];\n $major = $data['major'];\n\n if ($major == \"all\") {\n $this->db->where('year', $year);\n } else {\n $this->db->where('year', $year)->where('major', $major);\n }\n $query = $this->db->from('student_establish')->join('student', \"student.id_st= student_establish.id_st\")->get()->result_array();\n return $query;\n }", "public function searchCurrentStudent_testRun() {\n\n $this->db->select('110431 as ein,grp.groupId,grp.groupName,sec.sectionName,se.session,pr.programName,stu.studentId,stu_info.applicationId,stu_info.firstName,\n stu_info.lastName,stu_info.dateOfBirth,stu_info.gender,stu_info.religion,stu_info.fatherName,stu_info.motherName,prg.programId,prg.sectionId,prg.sessionId');\n $this->db->from('student stu');\n $this->db->join('programoffer prg', 'prg.programOfferId=stu.programOfferId');\n $this->db->join('program pr', 'pr.programId=prg.programId', \"left join\");\n $this->db->join('session se', 'se.sessionId=prg.sessionId', \"left join\");\n $this->db->join('section sec', 'sec.sectionId=prg.sectionId', \"left join\");\n $this->db->join('group grp', 'grp.groupId=prg.groupId', \"left join\");\n $this->db->join('studentinfo stu_info', 'stu_info.applicationId=stu.applicationId');\n // $this->db->limit(10); \n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "function searchforStudents() {\n $searchId = Input::get('sid');\n\n /* get project title according to the group's id */\n $protitle = DB::table('projects')\n ->where('groupID', $searchId)\n ->Where('status', 'Approved')\n ->pluck('title');\n\n /* get project id according to the group's id */\n $proid = DB::table('projects')\n ->where('title', $protitle)\n ->Where('status', 'Approved')\n ->pluck('id');\n\n /* mail adds. of members in the group */\n $groupmails = DB::table('research_groups')\n ->where('groupID', $searchId)\n ->pluck('mails');\n\n $explodedemails = explode(\"/\", $groupmails);\n $sendids = '';\n $sendnames = '';\n \n foreach ($explodedemails as $mail) {\n $id = (DB::table('students')\n ->where('email', $mail)\n ->pluck('regId'));\n\n $sendids .= $id . '/';\n\n /* get student name according to the student's id */\n $stuname = (DB::table('students')\n ->where('email', $mail)\n ->pluck('name'));\n $sendnames .= $stuname . '/';\n }\n \n $explodedsendids = explode(\"/\", rtrim($sendids, \"/\"));\n $explodedsendnames = explode(\"/\", rtrim($sendnames, \"/\"));\n $los = DB::table('settings')->first();\n \n $data = array(\"title\" => $protitle, \"pid\" => $proid, \"sname\" => $explodedsendnames,\n \"noofstu\" => sizeof($explodedemails), \"ids\" => $explodedsendids,\n \"ledrid\" => $explodedsendids[0], \"los\" => $los);\n return json_encode($data);\n }", "public function getstudentById ($student_number){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM students \";\n $sqlQuery .= \" WHERE student_number=’ $student_number ’ \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }", "public function get_student($id)\n\t\t{\n\t\t\treturn $this->conn->get($id);\n\t\t}", "function getstudent($search)\n {\n $q = \"select * from student where studid like '%$search%' or fname like '%$search%' or midname like '%$search%' or lname like '%$search%' or college like '%$search%' or course like '%$search%' or year like '%$search%' or section like '%$search%' order by section,year,course,college,lname,midname,fname,studid\";\n $r = mysql_query($q);\n\n return $r;\n }", "function get_smsstudents($inputarray = array()) {\n $college_id = isset($inputarray['college_id']) ? $inputarray['college_id'] : '';\n $course_id = isset($inputarray['course_id']) ? $inputarray['course_id'] : '';\n $branch_id = isset($inputarray['branch_id']) ? $inputarray['branch_id'] : '';\n $semister_id = isset($inputarray['semister_id']) ? $inputarray['semister_id'] : '';\n $section_id = isset($inputarray['section_id']) ? $inputarray['section_id'] : '';\n $religion = isset($inputarray['religion']) ? strtolower($inputarray['religion']) : '';\n\n $sql = \" select sr.*, users.users_type_id, users.username, users.`password` , users.email, users.id as users_id ,users.status\n\t\t\t from users\n\t\t\t inner join student_records as sr on sr.user_id=users.id\n\t\t\t inner join student_semisters as ss on ss.user_id=sr.user_id\n\t\t\t where users.users_type_id='1' and users.status='1' and ss.is_current='1' and sr.college_id = '\" . $college_id . \"' \n\t\t\t and sr.course_id = '\" . $course_id . \"' and sr.branch_id = '\" . $branch_id . \"' and ss.semister_id = '\" . $semister_id . \"'\n\t\t\t and sr.section_id='\" . $section_id . \"' \";\n if (!empty($religion)) {\n $sql .= \" and sr.religion='\" . $religion . \"' \";\n }\n\n $sql .= \" ORDER BY username \";\n\n $res = $this->db->query($sql);\n return $res->result();\n }", "function getSemesterDetails()\n\t{\n\t\t$query = $this->db->get(\"semester\");\n\t\t//print_r($query->result_array());\n\t\treturn $query->result_array();\n\t}", "public function fetchStudents()\n {\n //1st method to get all the record\n\n $students = Student::all();\n return $students;\n\n //2nd method to use where class mean to get a specific record\n\n // $students = Student::where('id', 33)->get();\n // return $students;\n\n //3rd method to select a range and get a specific records\n // $students = Student::whereBetween('id', [33, 44])->get();\n // return $students;\n\n //4th method to order by AScending or descending the with id base\n\n // $students = Student::whereBetween('id', [33, 44])->orderBy('id', 'DESC')->get();\n // return $students;\n\n }", "public function getStudents(SearchData $data)\n\t{\n\t\t$text = $data->getSearchText(); $field = $data->getSearchField();\n\t\t$sortBy = $data->getSortby(); $order = $data->getOrder();\n\t\t$limit = $data->getLimit(); $offset = $data->getOffset();\n\t\ttry {\n\t\t\t$students = array();\n\t\t\t\n\t\t\t$this->SQLBuilder->select();\n\t\t\tif ($text !== '') {\n\t\t\t\t$this->SQLBuilder->whereLike($field);\n\t\t\t}\n\t\t\t$this->SQLBuilder->orderBy($sortBy, $order);\n\t\t\t$this->SQLBuilder->limit($limit, $offset);\n\t\t\t$sql = $this->SQLBuilder->getSQL();\n\t\t\t\n\t\t\t$stmt = $this->pdo->prepare($sql);\n\t\t\t$values = array();\n\t\t\tif ($text !== '') {\n\t\t\t\t$values[':like'] = \"%$text%\";\n\t\t\t}\n\n\t\t\tif ( ($stmt->execute($values)) && ($stmt->rowCount() > 0) ) {\n\t\t\t\twhile ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t\t$students[] = $this->convertToObject($row);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$students = false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->lastCount = $this->foundRows();\n\t\t} catch (\\PDOException $e) {\n\t\t\tthrow new StudentException('Ошибка при получении данных студентов', 0, $e);\n\t\t}\n\t\treturn $students;\n\t}", "public function viewAllStudents() {\n return view('admin.students.student', [\n 'students' => User::query()->with('program')->paginate(config('mv-notification.paginate')),\n ]);\n }", "public function students() {\n return $this->_students;\n }", "public function index()\n {\n return Student::all();\n }", "public function index()\n {\n return Student::all();\n }", "function getStudentByMajorValidate(){\n\t\t\n\t\tif(@$this->major == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the major and institution are required!\", \"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->getStudentByMajor( $this->sanitize($this->major), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "function emarking_get_enroled_students_sql()\n{\n $query = 'SELECT u.*\n\t\t\tFROM {user_enrolments} ue\n\t\t\tJOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = ?)\n\t\t\tJOIN {context} c ON (c.contextlevel = 50 AND c.instanceid = e.courseid)\n\t\t\tJOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.roleid = 5 AND ra.userid = ue.userid)\n\t\t\tJOIN {user} u ON (ue.userid = u.id)\n\t\t\tGROUP BY u.id';\n \n return $query;\n}", "function getStudent($class_id){\n \t$result = array();\n \t$owner_id = $this->model->selectWhere(array('owner_id'),\"id = \".\"'$class_id'\"); \t \n \tif(isset($class_id)){\n \t\t$UserClassModel = new User_Class_Model(); \t\t\n \t\t$user_id = $UserClassModel->selectWhere(array('user_id'),\"class_id = \".\"'$class_id'\");\n \t\tif(isset($user_id)){\n \t\t\tforeach ($user_id as $key => $value) {\n \t\t\t\t$UserModel = new User_Model(); \t\t\t\t\n \t\t\t\t$user_id = $value['user_id'];\n \t\t\t\tif($owner_id[0]['owner_id']==$user_id)\n \t\t\t\t\tcontinue;\n \t\t\t\t$user = $UserModel->selectWhere('*',\"\tid = \".\"'$user_id'\");\n \t\t\t\tarray_push($result, $user);\n \t\t\t}\n \t\t\techo json_encode($result[0]);\n \t\t}\n \t}else{\n \t\techo json_encode('failed');\n \t} \t\t\n \t\n }", "public function semester($semester)\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria=new CDbCriteria;\n\t\t$sms=Yii::app()->session->get('sms');\n\t\t$sSmt=Yii::app()->session->get('smt');\n\t\t\n\t\t$criteria->compare('id_kls',$this->id_kls,true);\n\t\t$criteria->compare('id_sms',$this->id_sms,true);\n\t\t$criteria->compare('id_smt',$this->id_smt,true);\n\t\t$criteria->compare('id_mk',$this->id_mk,true);\n\t\t$criteria->compare('nm_kls',$this->nm_kls,true);\n\t\t/*\n\t\t$criteria->compare('sks_mk',$this->sks_mk,true);\n\t\t$criteria->compare('sks_tm',$this->sks_tm,true);\n\t\t$criteria->compare('sks_prak',$this->sks_prak,true);\n\t\t$criteria->compare('sks_prak_lap',$this->sks_prak_lap,true);\n\t\t$criteria->compare('sks_sim',$this->sks_sim,true);\n\t\t$criteria->compare('bahasan_case',$this->bahasan_case,true);\n\t\t$criteria->compare('tgl_mulai_koas',$this->tgl_mulai_koas,true);\n\t\t$criteria->compare('tgl_selesai_koas',$this->tgl_selesai_koas,true);\n\t\t$criteria->compare('id_mou',$this->id_mou,true);\n\t\t$criteria->compare('a_selenggara_pditt',$this->a_selenggara_pditt,true);\n\t\t$criteria->compare('kuota_pditt',$this->kuota_pditt,true);\n\t\t$criteria->compare('a_pengguna_pditt',$this->a_pengguna_pditt,true);\n\t\t$criteria->compare('id_kls_pditt',$this->id_kls_pditt,true);\n\t\t*/\n\t\t$criteria->select=\"mk.kode_mk,mk.nm_mk,mk.sks_mk,mk.id_mk,t.id_kls,t.nm_kls\";\n\t\t$criteria->join='JOIN akt_ajar_dosen as dosen ON dosen.id_kls=t.id_kls';\n\t\t$criteria->join = \"JOIN matkul as mk ON mk.id_mk=t.id_mk\";\n\t\t$criteria->condition = \"t.id_sms = :id_sms AND mk.semester= :semester AND t.id_smt= :id_smt\";\n\t\t\n\t\t$criteria->params = array (\t\n\t\t':id_sms' => $sms,\n\t\t':semester' => $semester,\n\t\t':id_smt' => $sSmt,\n\t\t);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>false,\n\t\t));\n\t}", "public function show(Semester $semester)\n {\n //\n }", "public function show(Semester $semester)\n {\n //\n }", "public function get_students_list_select(){\n\t\t$this->verify();\n\t\t$students=$this->admin_model->getStudentlistSELECT2($_GET['search']);\n\t\tforeach ($students as $key => $value) {\n\t\t\t$data[] = array('id' => $value['ADMISSION_NUMBER'], 'text' => $value['NAME']);\t\t\t \t\n \t\t}\n\t\techo json_encode($data);\n\t}", "public function getStudentInfo() {\n try {\n $this->dbh->query('SELECT * FROM student_info');\n $students = $this->dbh->resultSet();\n return $students;\n } catch(PDOException $e) {\n $this->response = [\n \"status\"=> \"error\",\n \"message\" => \"Unable to fetch all student details. Please contact the admin\"\n ];\n return $this->response;\n }\n\n }", "public static function getFreeStudents()\r\n\t{\r\n\t\t$discountModel = new self();\r\n\t\t$select = $discountModel->select()->distinct();\t\t\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t$select->from(array('d'=>'discount'), array('discount_code'));\r\n\t\t$select->joinLeft(array('e'=>'enrollment'),'e.discount_id = d.discount_id',array('enrolled'=>'count(e.enrollment_id)'));\t\t\t\t\t\t\r\n\t\t$select->where('d.course_id=4');\r\n\t\t$select->where('e.payment_received=\"Y\"');\r\n\t\t$select->where('d.is_active=\"Y\"');\r\n\t\t$select->group('d.discount_id');\r\n\t\t$select->order('enrolled desc');\t\t\r\n\t\treturn $discountModel->fetchAll($select);\r\n\t\t//return $select->__toString();\r\n\t}", "public function selectSingleStudents($id){\n\n $query=\"SELECT * FROM old_students WHERE id='$id'\";\n $restlt=database::connect()->query($query);\n if($restlt->num_rows>0){\n\n return $restlt;\n\n }else{\n return false;\n }\n }", "public static function onlineStudent(){\n $students = Roll::join('admissions','admissions.id', '=' , 'rolls.student_id' )\n ->where(['username' => Session::get('studentSession')])->first();\n \n return $students;// we will join the student with admission okay to have all his/her data's\n }", "function emarking_get_enroled_students($courseid)\n{\n global $DB;\n \n $query = emarking_get_enroled_students_sql();\n \n // Se toman los resultados del query dentro de una variable.\n $users = $DB->get_records_sql($query, array(\n $courseid\n ));\n \n return $users;\n}", "public function getFilteredStudentPicklistAction()\n {\n $params = $this->getAllParams();\n\n // construct the filters array based on the given parameters\n $filters = array();\n if ($params['graduationYear']) {\n $filters['graduationYear'] = $params['graduationYear'];\n }\n if ($params['graduationMonth']) {\n $filters['graduationMonth'] = $params['graduationMonth'];\n }\n if ($params['section']) {\n $filters['section'] = $params['section'];\n }\n if ($params['certificationLevels']) {\n $filters['certificationLevels'] = array();\n foreach ($params['certificationLevels'] as $certLevel) {\n $filters['certificationLevels'][] = $certLevel;\n }\n }\n if ($params['graduationStatus']) {\n $filters['graduationStatus'] = array();\n foreach ($params['graduationStatus'] as $gradStatus) {\n $filters['graduationStatus'][] = $gradStatus;\n }\n }\n\n // save the filters to the session, if applicable\n if (isset($params['sessionNamespace'])) {\n $session = new \\Zend_Session_Namespace($params['sessionNamespace']);\n $session->selectedCertifications = $filters['certificationLevels'];\n $session->selectedStatus = $filters['graduationStatus'];\n $session->selectedGradMonth = $filters['graduationMonth'];\n $session->selectedGradYear = $filters['graduationYear'];\n $session->selectedSection = $filters['section'];\n\n // set the flag so we know this namespace has been written to at least once\n $session->activated = true;\n }\n\n $students = \\Fisdap\\EntityUtils::getRepository('User')->getAllStudentsByProgram(\\Fisdap\\Entity\\User::getLoggedInUser()->getProgramId(), $filters);\n\n $list = array();\n foreach ($students as $student) {\n $label = $student['first_name'] . ' ' . $student['last_name'];\n if ($params['longLabel']) {\n $label .= \", \" . $student['cert_description'] . \": \" . $student['graduation_month'] . \"/\" . $student['graduation_year'];\n }\n $list[$student['id']] = $label;\n }\n\n $this->_helper->json($list);\n }", "function sqlStudentAll()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql = \"SELECT student_name,student_roll_number,student_dob,student_grade_id,student_id\"\n\t\t. \" FROM tbl_student INNER JOIN tbl_grade \"\n\t\t. \" ON tbl_grade.grade_id = tbl_student.student_grade_id \"\n\t\t. \"\";\n\n\t\treturn $sql;\n\t}", "function getstudentsubject(){ \n $classid = $_GET['classid'];\n $q = \"select * from studentsubject where classid=$classid\";\n $r = mysql_query($q);\n $result = array();\n while($row = mysql_fetch_array($r)){\n $q2 = 'select * from student where id='.$row['studid'].'';\n $r2 = mysql_query($q2);\n $result[] = mysql_fetch_array($r2);\n }\n return $result;\n }", "public function getStudentsForPath($path_id) {\n return $this->get('get_students_for_path', ['path_id' => $path_id]);\n }", "public function getStudent()\r\n {\r\n $sql=\"SELECT * FROM users WHERE role_id=2\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "public function actionIndex()\n {\n $session = \\yii::$app->session;\n $user_type = $session->get('type',-1);\n\n $searchModel = new StudentSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $s_name = isset($_GET['s_name']) ? trim($_GET['s_name']) : \"\";\n $s_city = isset($_GET['s_city']) ? trim($_GET['s_city']) : \"\";\n $s_date = isset($_GET['s_date']) ? trim($_GET['s_date']) : \"\";\n $s_sub = isset($_GET['s_sub']) ? trim($_GET['s_sub']) : \"\";\n $s_status_id = isset($_GET['s_status_id']) ? trim($_GET['s_status_id']) : \"\";\n $field = isset($_GET['field']) ? trim($_GET['field']) : \"\";\n $dir = isset($_GET['dir']) ? trim($_GET['dir']) : \"asc\";\n\n $q = \"1=1 \";\n $url = \"\";\n \n if ($field!=\"\") {\n // $url = \"?field=\".$field.\"&dir=\".$dir;\n }\n\n if ($s_city) {\n $q.= \" and city like '%\".$s_city.\"%'\";\n $url.= \"&s_city=\".$s_city;\n }\n\n if ($s_date) {\n $q.= \" and created_at like '%\".$s_date.\"%'\";\n $url.= \"&s_date=\".$s_date;\n }\n\n $q.= \" and grade_id >= '1'\";\n\n if ($s_status_id) {\n $q.= \" and student_status_id like '%\".$s_status_id.\"%'\";\n $url.= \"&s_status_id=\".$s_status_id;\n }\n\n if ($s_name) {\n $q.= \" and (fname like '%\".$s_name.\"%' or lname like '%\" .$s_name . \"%') \";\n $url.= \"&s_name=\".$s_name;\n }\n \n \n $students = Role::find(config('global.STUDENT_ROLE_ID'))->users()\n ->whereRaw($q);\n\n if ($field!=\"\") {\n // $q.= \" order by \".$field.\" \".$dir;\n $students = $students->orderBy($field, $dir);\n }\n \n if ($s_sub) {\n $url.= \"&s_sub=\".$s_sub;\n $students = $students->whereHas('subjects', function($subject) use ($s_sub) {\n return $subject->where('name', 'like', \"%\" . $s_sub . \"%\");\n });\n }\n \n if ($url !=\"\") {\n $url = substr($url, 1);\n }\n \n $students = $students->get(); \n $student_statuses = StudentStatus::all();\n $subjects = Subject::all();\n $data = [\n 'students' => $students,\n 'student_statuses' => $student_statuses,\n 'subjects' => $subjects,\n 'url' => $url,\n 'order' => [\n 'field' => $field,\n 'dir' => $dir\n ],\n 'old' => [\n 's_name' => $s_name,\n 's_city' => $s_city,\n 's_date' => $s_date,\n 's_sub' => $s_sub,\n 's_status_id' => $s_status_id,\n ]\n ];\n\n // session()->flash('error', null);\n if (count($students) == 0) {\n session()->flash('error', \"No search results!\");\n }\n\n return view('admin.students.index')->with('data', $data);\n }", "function ForEveningGetSelectedStudent($admission_session_id,$shift_id,$session_id,$prog_type_id,$test_id){\n\n $this->legacy_db->select(\"sl.*\");\n $this->legacy_db->from('selection_list AS sl');\n $this->legacy_db->join('program_list AS pl', ' sl.`PROG_LIST_ID` = pl.`PROG_LIST_ID`');\n $this->legacy_db->join('category AS cat', 'sl.`CATEGORY_ID` = cat.`CATEGORY_ID`');\n $this->legacy_db->join('admission_session AS ass', 'sl.`ADMISSION_SESSION_ID` = ass.`ADMISSION_SESSION_ID`');\n $this->legacy_db->join('applications AS app', 'sl.`APPLICATION_ID` = app.`APPLICATION_ID`');\n \n $this->legacy_db->join('admission_list AS al', 'sl.`ADMISSION_LIST_ID` = al.`ADMISSION_LIST_ID`');\n $this->legacy_db->where('ass.ADMISSION_SESSION_ID', $admission_session_id);\n $this->legacy_db->where('sl.SHIFT_ID', $shift_id);\n $this->legacy_db->where('ass.SESSION_ID', $session_id);\n $this->legacy_db->where('pl.PROGRAM_TYPE_ID', $prog_type_id);\n $this->legacy_db->where('sl.TEST_ID', $test_id);\n $this->legacy_db->where('sl.ACTIVE > 0 ');\n $this->legacy_db->where(\"sl.IS_PROVISIONAL = 'N' \");\n $this->legacy_db->where(\"sl.CATEGORY_ID \",SELF_FINANCE_EVENING_CATEGORY_ID );\n\n \n\n $this->legacy_db->order_by(\"al.LIST_NO\",\"DESC\");\n $result = $this->legacy_db->get()->result_array();\n echo $this->legacy_db->last_query();\n $key_array = array();\n foreach ($result as $row){\n\n if(!isset($key_array[$row['APPLICATION_ID']])){\n $key_array[$row['APPLICATION_ID']] = array(\"SELF\"=>null,\"MERIT\"=>null);\n }\n\n if(($row['CATEGORY_ID']==SELF_FINANCE_EVENING_CATEGORY_ID &&$key_array[$row['APPLICATION_ID']]['SELF']==null)){\n $key_array[$row['APPLICATION_ID']]['SELF'] = $row;\n }\n // array_push($key_array[$row['APPLICATION_ID']],$row);\n }\n return $key_array;\n }", "public function view_students()\n{\n $school =$this->getSchool(self::Admin,self::Active);\n$students =Student::where('user_id',$this->user_id())->orderBy('id','DES')->paginate(100);\n return view('home.student.index')->withS($school);\n}", "public function showStudents($season_id = null)\n {\n if (is_null($season_id)){\n $season_id = \\App\\Season::getLastSeasonID();\n }\n\n $student_registrations = \\App\\Registration::where([\n [\"season\",'=', $season_id]\n ])->get();\n \n $students = array();\n //get student infomations through registration->user_id\n foreach ($student_registrations as $registration) {\n $student = \\App\\User::join('student_infos','student_infos.user_id','=','users.id')\n ->where('user_id','=',$registration->user_id)\n ->select('users.name','student_infos.*')\n ->first();\n array_push($students, $student);\n }\n // dd($student_registrations);\n $all_season_id = \\App\\Season::getAllSeasonIDs();\n\n return view('internship.students-in-season',compact('students','all_season_id'));\n }", "public function actionStudents()\n\t{\n\t\t//$this->model = User::loadModel();\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '//drcUser/_list',\n\t\t\t'dataProvider' => $this->model->students(),\n\t\t\t'contentTitle' => 'DRC Students',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t));\n\t}", "public function searchClassByStudent_post()\n {\n /* code goes here */\n }", "function getStudentBySchoolValidate(){\n\t\t\n\t\tif(@$this->school == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the school and institution are required!\", \"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->getStudentBySchool( $this->sanitize($this->school), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function get_students($id){\n $data['students'] = $this->db->where('class_id',$id)->get('students')->result_array();\n $data['exams'] = $this->db->where('class_id',$id)->get('exams')->result_array();\n echo json_encode($data);\n }", "public function getCourseStudents ($id) {\n return $this->makeCall($id, $this->base . 'api/public/courses/' . $id . '/students', true);\n }", "public function show(students $students)\n {\n //\n }", "public function getAllStudentHasScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentHasScholarshipDAO->getAllStudentHasScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentHasScholarshipDAO.getAllStudentHasScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function getTotalStudents(){\n $total_stds = $this->getTotalStds();\n $total_stds_men = $this->getTotalStdsMen();\n $total_stds_women = $this->getTotalStdsWomen();\n\n $htmlResumenTotal = $this->str_students(1,\"\").' <tr class=\"numbers\">\n <td class=\"color-indico\">'.number_format($total_stds).'</td>\n <td class=\"color-blue\">'.number_format($total_stds_men).'('.number_format($total_stds_men * 100 / $total_stds).'%)</td>\n <td class=\"color-orange\">'.number_format($total_stds_women).' ('.number_format($total_stds_women * 100 / $total_stds).'%)</td>\n </tr>\n '.$this->str_students(2,\"\");\n return $htmlResumenTotal;\n }", "public function students()\r\n {\r\n $students = $this->student->GetAllStudents();\r\n $view = new view(\"Students\");\r\n $view->generate(array('students' => $students));\r\n\r\n }", "public function studentsListing() {\n \t$students = Student::all();\n \tif(count($students) > 0) {\n \t\treturn response() -> json([\"status\" => $this->status, \"success\" => true, \"count\" => count($students), \"data\" => $students]);\n \t}\n \telse {\n \t\treturn response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n \t}\n }", "public function courseStudents()\n {\n $courseClasses=CourseClasses::where('courses_id',$this->id)->get();\n $students = new Collection();\n foreach ($courseClasses as $class){\n $classStudents=Students::where(['classes_id'=>$class->classes_id,'sections_id'=>$class->sections_id])->get();\n $students = $students->merge($classStudents);\n }\n return $students;\n }", "public function getStudentData($user)\r\n\t{\r\n\t\t$sql = \"SELECT s.`id`, s.`index`, s.`fname`, s.`mname`, s.`lname`, \r\n\t\t\t\tf.`bill`, f.`balBF`, f.`bal`, f.`paid`, s.`pid`, p.`program` \r\n\t\t\t\tFROM `students` AS s, `finance` AS f, `program` AS p \r\n\t\t\t\tWHERE s.`id` = f.`sid` AND s.`id` = :u AND s.`pid` = p.`id` \r\n\t\t\t\tAND s.`type` = 2 AND s.`deleted` = 0\";\r\n\t\t$params = array(':u' => $user);\r\n\t\treturn $this->gh->getData($sql, $params);\r\n\t}", "public function schoolOfHumanitiesAndSocialSciences(){\n $name = 'SCHOOL OF HUMANITIES AND SOCIAL SCIENCES';\n $title = 'SHSS';\n\t\t$students = DB::table('students')\n ->where('students.faculty', '=', 'SHSS')->where('state', '=', 'Activated')\n ->whereNotIn('students.studentNo', function($q){\n $q->select('students_studentNo')->from('charge');\n })->paginate(15);\n\n return view('staff/faculty', compact('name','title','students'));\n\t}", "function woolman_get_semester($id) {\n static $semesters = array();\n if (!$semesters) {\n $semesters = woolman_get_civi_options(80, array('where' => '', 'order' => ''));\n }\n return woolman_aval($semesters, $id, 'unknown');\n}", "public function dataGrid(array $students)\n\t{\n\t\t$select = $this->select(self::SELECT_WITH_FROM_PART)->setIntegrityCheck(false);\n\t\t$select->joinInner('core_exam_management', 'exam_management_id = exam_student_exam_management');\n\t\t$select->joinInner('core_exam', 'exam_id = exam_management_exam');\n\t\t$select->joinInner('core_subject', 'exam_subject = subject_id');\n\t\t$select->where('exam_status = ?', 1);\n\t\t$select->where('exam_student_student IN (?)', $students);\n\t\t$select->order(array('exam_student_executed ASC'));\n\t\t\n\t\treturn $select;\n\t}", "function get_subject_scores(\r\n string $subject,\r\n string $stream,\r\n string $exam, \r\n string $grade\r\n ): string{\r\n return \"select \" \r\n .\" student.name as name ,\"\r\n .\" score.value as score \"\r\n .\" from score \"\r\n .\" inner join allocation on score.allocation=allocation.allocation\"\r\n .\" inner join teacher on teacher.teacher= allocation.teacher\"\r\n .\" inner join subject on teacher.subject=subject.subject\"\r\n .\" inner join student on score.student= student.student\"\r\n .\" inner join progress on progress.student= student.student\" \r\n .\" inner join stage on progress.stage= stage.stage\"\r\n .\" inner join stream on stage.stream= stream.stream\"\r\n .\" inner join grade on stream.grade=grade.grade\"\r\n .\" inner join school on school.school=grade.school\"\r\n .\" inner join term on score.term= term.term\"\r\n .\" where subject.name='$subject'\"\r\n .\" AND school.id='{$this->id}'\"\r\n .\" AND term.name= '$exam'\"\r\n .\" AND stream.name='$stream'\"\r\n .\" AND grade.name= '$grade'\";\r\n }", "public function getStudents($section_id, $status = \"In Progress\"){\n $stmt = $this->db->prepare(\"SELECT * FROM `student_educational` WHERE section_id = :section_id AND `status`=:status\");\n $stmt->execute([\"section_id\" => $section_id , \"status\" => $status]);\n\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n\n if(count($result) > 0){\n return $result;\n }\n return false;\n }", "public static function getStudents($vueFormat = true)\n {\n $entities = [];\n $entities = Student::active()->select(['first_name', 'last_name', 'id'])->get();\n if (!$vueFormat) {\n $_entities = [];\n foreach ($entities as $key => $value) {\n $_entities[$value->id] = $value->full_name;\n }\n\n return $_entities;\n }\n\n return self::vueDropdown($entities, 'id', 'full_name');\n }", "public function getStudent(int $id, string $table);", "public static function get_user_assessments($studentID)\n {\n //first get all of the qualifications they are on\n //then get all of the formal assessments on all of these. \n $projects = array();\n $userQuals = get_users_quals($studentID);\n if($userQuals)\n {\n foreach($userQuals AS $qual)\n {\n $array = Project::get_qual_assessments($qual->id);\n $projects = $projects + $array;\n }\n }\n $retval = new stdClass();\n $retval->quals = $userQuals;\n $retval->projects = $projects;\n return $retval;\n }", "public function searchRegisteredStudent($data) {\n\n $this->db->select('*');\n\n $this->db->from('student stu');\n $this->db->where('stu.programOfferId', $data['programOfferId']);\n // $this->db->where('stu.programOfferId', $dataa['programOfferId']); \n\n\n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "public function index()\n {\n $student = Student::all();\n return $student;\n }", "public function getStudents($idGroup)\n {\n return $this->db\n ->select('idStudent, surname, name, idGroup, groupName')\n ->from('StudentGroup')\n ->join('Student', 'idStudent')\n ->join('User', 'idUser')\n ->join('Group', 'idGroup')\n ->where('idGroup', $idGroup)\n ->get()\n ->result();\n }", "public function allstudent()\n {\n $students = Student::get();\n\n return view('admin.pages.all_student',compact('students'));\n }", "public function getStudentsByClassId($classeId,$lastSeasonId,$ids){\n $this->db->select('students.*,points.sc,points.te');\n $this->db->join('classes','students.classe=classes.id','left');\n $this->db->join('points','points.student=students.id','left');\n $this->db->where('students.classe',$classeId);\n $this->db->where('students.season',$lastSeasonId);\n $this->db->where_not_in('points.subject',$ids);\n return $this->db->get('students')->result();\n }", "public function getStudent( $id )\n\t{\n\t\treturn Student::find( $id );\n\t}", "public function get_school_list()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('cms_schools');\n\t\t$this->db->where('schl_status','0');\n\t\t$query = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $query->result();\n\t}", "public function semesterTwoPage() {\n return \\view('admin.students.two-results', [\n 'twos' => SemesterTwo::query()->whereIn('user_id', User::query()->where('program_verified', true)->get())->paginate(config('mv-notification.paginate')),\n ]);\n }", "public function former_student($year,$subject,$ddlSession)\n\t{\n\t\tif($year==\"1st\"){\n\t\t\t$this->db->where('gen_type', $subject);\n\t\t\t$this->db->where('trsnfer_flag', 1);\n\t\t\t$this->db->where('session_id', $ddlSession);\n\t\t\t$this->db->order_by('college_roll', 'asc');\n\t\t\t$query=$this->db->get('admission_erp');\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\t$this->db->where('sub_honours', $subject);\n\t\t\t$this->db->where('trsnfer_flag', 1);\n\t\t\t$this->db->where('session_id', $ddlSession);\n\t\t\t$query=$this->db->get('student_dtl');\n\t\t\treturn $query->result();\n\t\t}\n\t\t\n\t}", "public function getStudentsByCourse($id)\n {\n $subjects = TableRegistry::getTableLocator()->get('Reports');\n $subjects = $subjects->find('all')->where(['course_id' => $id])->distinct('student_id')->groupBy('student_id')->toArray();\n return $subjects;\n }", "private function create_get_students_in_class($classId)\n {\n $selectCreator = new SelectQueryCreator('account');\n $selectCreator->join_database('classuser', ['uid' => 'uid'], SelectQueryCreator::JOIN_TYPE_LEFT);\n $selectCreator->set_condition(['role' => 2, 'classId' => $classId]);\n return $selectCreator;\n }", "public function studentIndex()\n {\n $users = User::whereHas('roles', function($q){\n $q->where('role_user.role_id',4);\n })->where('organisationId',Auth::user()->organisationId)->get();\n\n $page['title'] = \"Students List\";\n return view('user.index',compact('users','students','page'));\n }", "public function getSemester()\n {\n return $this->belongsTo(Semester::class, 'semester_id')->first();\n }" ]
[ "0.62867033", "0.6280684", "0.6278451", "0.61720765", "0.61219054", "0.6096722", "0.6049759", "0.6027512", "0.59634036", "0.59612", "0.59146976", "0.5894346", "0.5893825", "0.58521855", "0.58391875", "0.5798891", "0.5762266", "0.57482725", "0.574648", "0.56992376", "0.56860495", "0.56789017", "0.56286573", "0.56277674", "0.56060743", "0.56035197", "0.56001925", "0.55952924", "0.5590763", "0.5570782", "0.555446", "0.55454075", "0.5544474", "0.5544289", "0.5539886", "0.5523279", "0.5516167", "0.55055445", "0.54804283", "0.54794866", "0.54730266", "0.546843", "0.54575956", "0.54561883", "0.54561883", "0.5453496", "0.5434172", "0.5433712", "0.5417328", "0.5414037", "0.5414037", "0.5411413", "0.53968674", "0.53960204", "0.53896", "0.53797", "0.5372074", "0.5365722", "0.5363872", "0.5361355", "0.53439415", "0.53392935", "0.533919", "0.5327329", "0.5325187", "0.5320091", "0.53154314", "0.53072035", "0.5296912", "0.5286672", "0.5284292", "0.52825314", "0.52795404", "0.52758217", "0.52749693", "0.5274646", "0.52730155", "0.52587754", "0.525779", "0.52541107", "0.5251374", "0.5245934", "0.52438897", "0.5236405", "0.5235151", "0.52342737", "0.5211802", "0.5208187", "0.5198138", "0.51931953", "0.5191289", "0.5187484", "0.51855165", "0.51799", "0.5178777", "0.5174773", "0.5167102", "0.51649666", "0.51515335", "0.51381195" ]
0.7380451
0
Gets query for [[Semester2Students]].
public function getSemester2Students() { return $this->hasMany(Semester2Students::className(), ['semester' => 'semester_id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_students_list(){\n return $this->n->get_list_from_db();\n }", "public function getSemester1Students()\n {\n return $this->hasMany(Semester1Students::className(), ['semester' => 'semester_id']);\n }", "public function getStudentsQueryForGroup($group_id) {\n\t\treturn SQLQuery::create()->select(\"StudentGroup\")->whereValue(\"StudentGroup\",\"group\",$group_id);\n\t}", "public function get_session_wise_student() {\n\t\t$checker = array(\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\treturn $this->db->get_where('enrols', $checker);\n\t}", "private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}", "public function getStudentsAssignment()\n {\n $where = [];\n foreach ($this->request->getQuery() as $key => $value) {\n if(!empty($value))\n $where[$key] = $value;\n }\n $response=$this->StudentHealths->StudentInfos->find()\n ->select(['name'=>'Students.name','id'=>'Students.id'])\n ->contain(['Students'])\n ->where($where) \n ->where(['is_deleted'=>'N'])\n ->where(['StudentInfos.session_year_id'=>$this->Auth->user('session_year_id')]);\n foreach ($response as $key => $value) {\n $option[$value->id]=$value->name;\n } \n if(!empty($option)){\n foreach ($option as $key => $value) {\n echo \"<option value='\".$key.\"'>\".$value.\"</option>\";\n }\n }\n exit;\n \n }", "public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}", "public function semesterTwoPage() {\n return \\view('admin.students.two-results', [\n 'twos' => SemesterTwo::query()->whereIn('user_id', User::query()->where('program_verified', true)->get())->paginate(config('mv-notification.paginate')),\n ]);\n }", "public function getAllStudents(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->getAllStudents();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.getAllStudents()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function getStudents($params = array())\n {\n $sql = 'select * from engine4_users where user_id in (\n SELECT item_id FROM `engine4_user_fields_values` where field_id=1 and value=4\n )';\n \n $table = Engine_Api::_()->getDbtable('users', 'user')->getAdapter();\n $select = $table->query($sql)->fetchAll(); \n\n return $select;\n }", "public function getStudentsByClass() {\n\t\t$students_by_class = Student::GetInstance()->getStudentsByClass( $_POST['class_id'] );\n\n\t\treturn jsonResult( $students_by_class );\n\n\t}", "public function getStudent(){\n\t\t$this->load->model('School_model');\n\t\t$this->School_model->getSchoolAll();\n\t}", "public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }", "function getSemesterDetails()\n\t{\n\t\t$query = $this->db->get(\"semester\");\n\t\t//print_r($query->result_array());\n\t\treturn $query->result_array();\n\t}", "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }", "public function getStudents()\n {\n return $this->hasMany(Student::className(), ['student_previous_qualification_id' => 'previousqualification_id']);\n }", "public function mysearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\tif(Yii::app()->user->getState('stud_id'))\n\t\t{\n\t\t$criteria->condition = 'student_docs_trans_user_id = :student_user_id';\n\t $criteria->params = array(':student_user_id' => Yii::app()->user->getState('stud_id'));\n\t\t}\n\t\telse\n\t\t{\n\t\t$criteria->condition = 'student_docs_trans_user_id = :student_user_id';\n\t $criteria->params = array(':student_user_id' => $_REQUEST['id']);\n\t\t}\n\t\t$criteria->compare('student_docs_trans_id',$this->student_docs_trans_id);\n\t\t$criteria->compare('student_docs_trans_user_id',$this->student_docs_trans_user_id,true);\n\t\t$criteria->compare('student_docs_trans_stud_docs_id',$this->student_docs_trans_stud_docs_id,true);\n\t\t\n\t\t$student_docs = new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t$_SESSION['student_docs']=$student_docs;\n\t\treturn $student_docs;\n\t}", "public function getStudents(): array\n {\n \n return $this->students;\n }", "function show_students(){\n\t$query = $this->db->get('students');\n\t$query_result = $query->result();\n\treturn $query_result;\n\t}", "public function findStudentsByCourse(CourseInterface $course);", "public function getAllStudent(){\n\n\t\treturn array(\n\t\t\t\"1\"=> new Entity_Student(1,\"pham van thao\",23,\"tlu\"),\n\t\t\t\"2\"=> new Entity_Student(2,\"pham van phen\",24,\"tlu\"),\n\t\t\t\"3\"=> new Entity_Student(3,\"pham van to\",25\"tlu\"),\n\t\t\t\"4\"=> new Entity_Student(4,\"pham van\",26,\"tlu\"),\n\n\t\t);\n\t}", "public function semester($semester)\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria=new CDbCriteria;\n\t\t$sms=Yii::app()->session->get('sms');\n\t\t$sSmt=Yii::app()->session->get('smt');\n\t\t\n\t\t$criteria->compare('id_kls',$this->id_kls,true);\n\t\t$criteria->compare('id_sms',$this->id_sms,true);\n\t\t$criteria->compare('id_smt',$this->id_smt,true);\n\t\t$criteria->compare('id_mk',$this->id_mk,true);\n\t\t$criteria->compare('nm_kls',$this->nm_kls,true);\n\t\t/*\n\t\t$criteria->compare('sks_mk',$this->sks_mk,true);\n\t\t$criteria->compare('sks_tm',$this->sks_tm,true);\n\t\t$criteria->compare('sks_prak',$this->sks_prak,true);\n\t\t$criteria->compare('sks_prak_lap',$this->sks_prak_lap,true);\n\t\t$criteria->compare('sks_sim',$this->sks_sim,true);\n\t\t$criteria->compare('bahasan_case',$this->bahasan_case,true);\n\t\t$criteria->compare('tgl_mulai_koas',$this->tgl_mulai_koas,true);\n\t\t$criteria->compare('tgl_selesai_koas',$this->tgl_selesai_koas,true);\n\t\t$criteria->compare('id_mou',$this->id_mou,true);\n\t\t$criteria->compare('a_selenggara_pditt',$this->a_selenggara_pditt,true);\n\t\t$criteria->compare('kuota_pditt',$this->kuota_pditt,true);\n\t\t$criteria->compare('a_pengguna_pditt',$this->a_pengguna_pditt,true);\n\t\t$criteria->compare('id_kls_pditt',$this->id_kls_pditt,true);\n\t\t*/\n\t\t$criteria->select=\"mk.kode_mk,mk.nm_mk,mk.sks_mk,mk.id_mk,t.id_kls,t.nm_kls\";\n\t\t$criteria->join='JOIN akt_ajar_dosen as dosen ON dosen.id_kls=t.id_kls';\n\t\t$criteria->join = \"JOIN matkul as mk ON mk.id_mk=t.id_mk\";\n\t\t$criteria->condition = \"t.id_sms = :id_sms AND mk.semester= :semester AND t.id_smt= :id_smt\";\n\t\t\n\t\t$criteria->params = array (\t\n\t\t':id_sms' => $sms,\n\t\t':semester' => $semester,\n\t\t':id_smt' => $sSmt,\n\t\t);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>false,\n\t\t));\n\t}", "public function getStudent()\r\n {\r\n $sql=\"SELECT * FROM users WHERE role_id=2\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "function emarking_get_enroled_students_sql()\n{\n $query = 'SELECT u.*\n\t\t\tFROM {user_enrolments} ue\n\t\t\tJOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = ?)\n\t\t\tJOIN {context} c ON (c.contextlevel = 50 AND c.instanceid = e.courseid)\n\t\t\tJOIN {role_assignments} ra ON (ra.contextid = c.id AND ra.roleid = 5 AND ra.userid = ue.userid)\n\t\t\tJOIN {user} u ON (ue.userid = u.id)\n\t\t\tGROUP BY u.id';\n \n return $query;\n}", "public function listOfStudents($skola) {\n\t\t\t$this->db->where('skolaId',$skola);\n\t\t\t $query = $this->db->get(\"predmet\");\n\t\t return $query;\n\t\t}", "function ForEveningGetSelectedStudent($admission_session_id,$shift_id,$session_id,$prog_type_id,$test_id){\n\n $this->legacy_db->select(\"sl.*\");\n $this->legacy_db->from('selection_list AS sl');\n $this->legacy_db->join('program_list AS pl', ' sl.`PROG_LIST_ID` = pl.`PROG_LIST_ID`');\n $this->legacy_db->join('category AS cat', 'sl.`CATEGORY_ID` = cat.`CATEGORY_ID`');\n $this->legacy_db->join('admission_session AS ass', 'sl.`ADMISSION_SESSION_ID` = ass.`ADMISSION_SESSION_ID`');\n $this->legacy_db->join('applications AS app', 'sl.`APPLICATION_ID` = app.`APPLICATION_ID`');\n \n $this->legacy_db->join('admission_list AS al', 'sl.`ADMISSION_LIST_ID` = al.`ADMISSION_LIST_ID`');\n $this->legacy_db->where('ass.ADMISSION_SESSION_ID', $admission_session_id);\n $this->legacy_db->where('sl.SHIFT_ID', $shift_id);\n $this->legacy_db->where('ass.SESSION_ID', $session_id);\n $this->legacy_db->where('pl.PROGRAM_TYPE_ID', $prog_type_id);\n $this->legacy_db->where('sl.TEST_ID', $test_id);\n $this->legacy_db->where('sl.ACTIVE > 0 ');\n $this->legacy_db->where(\"sl.IS_PROVISIONAL = 'N' \");\n $this->legacy_db->where(\"sl.CATEGORY_ID \",SELF_FINANCE_EVENING_CATEGORY_ID );\n\n \n\n $this->legacy_db->order_by(\"al.LIST_NO\",\"DESC\");\n $result = $this->legacy_db->get()->result_array();\n echo $this->legacy_db->last_query();\n $key_array = array();\n foreach ($result as $row){\n\n if(!isset($key_array[$row['APPLICATION_ID']])){\n $key_array[$row['APPLICATION_ID']] = array(\"SELF\"=>null,\"MERIT\"=>null);\n }\n\n if(($row['CATEGORY_ID']==SELF_FINANCE_EVENING_CATEGORY_ID &&$key_array[$row['APPLICATION_ID']]['SELF']==null)){\n $key_array[$row['APPLICATION_ID']]['SELF'] = $row;\n }\n // array_push($key_array[$row['APPLICATION_ID']],$row);\n }\n return $key_array;\n }", "public function students() {\n return $this->_students;\n }", "public function getAllStudentsResults() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) {\n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $results = $student->getAllStudentsResults();\n \n $model = array(\n 'user_data' => $user_data,\n 'results' => $results\n );\n BaseController::display(self::$controller . '/student-results.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "public function getStudentsByClassIdAndSubGen($lastSeasonId,$classe){\n // $this->db->select('students.*,points.subject,points.sc,points.te');\n $this->db->select('students.*');\n $this->db->join('classes','students.classe=classes.id');\n // $this->db->join('points','points.student=students.id');\n // $this->db->where('students.classe',$classeId);\n $filter = array(\n 'students.season'=>$lastSeasonId,\n 'classes.id'=>$classe\n // 'points.subject'=>$sub\n );\n $this->db->where($filter);\n // $this->db->where_in('points.subject',$ids);\n return $this->db->get('students')->result();\n }", "public function getFilteredStudentPicklistAction()\n {\n $params = $this->getAllParams();\n\n // construct the filters array based on the given parameters\n $filters = array();\n if ($params['graduationYear']) {\n $filters['graduationYear'] = $params['graduationYear'];\n }\n if ($params['graduationMonth']) {\n $filters['graduationMonth'] = $params['graduationMonth'];\n }\n if ($params['section']) {\n $filters['section'] = $params['section'];\n }\n if ($params['certificationLevels']) {\n $filters['certificationLevels'] = array();\n foreach ($params['certificationLevels'] as $certLevel) {\n $filters['certificationLevels'][] = $certLevel;\n }\n }\n if ($params['graduationStatus']) {\n $filters['graduationStatus'] = array();\n foreach ($params['graduationStatus'] as $gradStatus) {\n $filters['graduationStatus'][] = $gradStatus;\n }\n }\n\n // save the filters to the session, if applicable\n if (isset($params['sessionNamespace'])) {\n $session = new \\Zend_Session_Namespace($params['sessionNamespace']);\n $session->selectedCertifications = $filters['certificationLevels'];\n $session->selectedStatus = $filters['graduationStatus'];\n $session->selectedGradMonth = $filters['graduationMonth'];\n $session->selectedGradYear = $filters['graduationYear'];\n $session->selectedSection = $filters['section'];\n\n // set the flag so we know this namespace has been written to at least once\n $session->activated = true;\n }\n\n $students = \\Fisdap\\EntityUtils::getRepository('User')->getAllStudentsByProgram(\\Fisdap\\Entity\\User::getLoggedInUser()->getProgramId(), $filters);\n\n $list = array();\n foreach ($students as $student) {\n $label = $student['first_name'] . ' ' . $student['last_name'];\n if ($params['longLabel']) {\n $label .= \", \" . $student['cert_description'] . \": \" . $student['graduation_month'] . \"/\" . $student['graduation_year'];\n }\n $list[$student['id']] = $label;\n }\n\n $this->_helper->json($list);\n }", "public function getAllStudents() {\n try {\n if(BaseController::isLoggedIn() && BaseController::isTeacher()) { \n $user = new UserModel();\n $user->id = BaseController::getUserId();\n $user_data = $user->getUserDataById();\n \n $student = new StudentModel();\n $students = $student->getAllStudents();\n \n $model = array(\n 'user_data' => $user_data,\n 'students' => $students\n );\n BaseController::display(self::$controller . '/students.php', $model);\n } else {\n BaseController::load('user/login.php', array('error_description' => 'Изисква се регистрация.'));\n }\n } catch (Exception $e) {\n BaseController::load('error.php');\n }\n }", "public function getstudent($txtStartDate,$txtEndDate,$txtSubject,$txtYear)\n\t{\n\t\tif($txtYear==\"1st\"){\n\t\t\t$this->db->where('payment_admission', 1);\n\t\t\t// $this->db->where('gen_type', $txtSubject);\n\t\t\t$this->db->where('gen_type', $txtSubject);\n\t\t\t$this->db->where('admission_payment_date >=', $txtStartDate);\n\t\t\t$this->db->where('admission_payment_date <=', $txtEndDate);\n\t\t\t$this->db->where('trsnfer_flag', 0);\n\t\t\t$this->db->where('cancel', 0);\n\t\t\t$this->db->order_by('college_roll', 'asc');\n\t\t\t$query=$this->db->get('admission_erp');\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\t$this->db->where('sub_honours', $txtSubject);\n\t\t\t$this->db->where('pay_status_part2', 1);\n\t\t\t$this->db->where('payment_date_2 >=', $txtStartDate);\n\t\t\t$this->db->where('payment_date_2 <=', $txtEndDate);\n\t\t\t$this->db->where('trsnfer_flag', 0);\n\t\t\t$this->db->where('cancel_flag', 0);\n\t\t\t$query=$this->db->get('student_dtl');\n\t\t\treturn $query->result();\n\t\t}\n\t}", "public function get_students_list_select(){\n\t\t$this->verify();\n\t\t$students=$this->admin_model->getStudentlistSELECT2($_GET['search']);\n\t\tforeach ($students as $key => $value) {\n\t\t\t$data[] = array('id' => $value['ADMISSION_NUMBER'], 'text' => $value['NAME']);\t\t\t \t\n \t\t}\n\t\techo json_encode($data);\n\t}", "public function getStudents(SearchData $data)\n\t{\n\t\t$text = $data->getSearchText(); $field = $data->getSearchField();\n\t\t$sortBy = $data->getSortby(); $order = $data->getOrder();\n\t\t$limit = $data->getLimit(); $offset = $data->getOffset();\n\t\ttry {\n\t\t\t$students = array();\n\t\t\t\n\t\t\t$this->SQLBuilder->select();\n\t\t\tif ($text !== '') {\n\t\t\t\t$this->SQLBuilder->whereLike($field);\n\t\t\t}\n\t\t\t$this->SQLBuilder->orderBy($sortBy, $order);\n\t\t\t$this->SQLBuilder->limit($limit, $offset);\n\t\t\t$sql = $this->SQLBuilder->getSQL();\n\t\t\t\n\t\t\t$stmt = $this->pdo->prepare($sql);\n\t\t\t$values = array();\n\t\t\tif ($text !== '') {\n\t\t\t\t$values[':like'] = \"%$text%\";\n\t\t\t}\n\n\t\t\tif ( ($stmt->execute($values)) && ($stmt->rowCount() > 0) ) {\n\t\t\t\twhile ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n\t\t\t\t\t$students[] = $this->convertToObject($row);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$students = false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->lastCount = $this->foundRows();\n\t\t} catch (\\PDOException $e) {\n\t\t\tthrow new StudentException('Ошибка при получении данных студентов', 0, $e);\n\t\t}\n\t\treturn $students;\n\t}", "public static function getFreeStudents()\r\n\t{\r\n\t\t$discountModel = new self();\r\n\t\t$select = $discountModel->select()->distinct();\t\t\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t$select->from(array('d'=>'discount'), array('discount_code'));\r\n\t\t$select->joinLeft(array('e'=>'enrollment'),'e.discount_id = d.discount_id',array('enrolled'=>'count(e.enrollment_id)'));\t\t\t\t\t\t\r\n\t\t$select->where('d.course_id=4');\r\n\t\t$select->where('e.payment_received=\"Y\"');\r\n\t\t$select->where('d.is_active=\"Y\"');\r\n\t\t$select->group('d.discount_id');\r\n\t\t$select->order('enrolled desc');\t\t\r\n\t\treturn $discountModel->fetchAll($select);\r\n\t\t//return $select->__toString();\r\n\t}", "public function getStudentInfo() {\n try {\n $this->dbh->query('SELECT * FROM student_info');\n $students = $this->dbh->resultSet();\n return $students;\n } catch(PDOException $e) {\n $this->response = [\n \"status\"=> \"error\",\n \"message\" => \"Unable to fetch all student details. Please contact the admin\"\n ];\n return $this->response;\n }\n\n }", "function getStudentBySchoolValidate(){\n\t\t\n\t\tif(@$this->school == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the school and institution are required!\", \"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->getStudentBySchool( $this->sanitize($this->school), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function getStudents($idGroup)\n {\n return $this->db\n ->select('idStudent, surname, name, idGroup, groupName')\n ->from('StudentGroup')\n ->join('Student', 'idStudent')\n ->join('User', 'idUser')\n ->join('Group', 'idGroup')\n ->where('idGroup', $idGroup)\n ->get()\n ->result();\n }", "function getstudent($search)\n {\n $q = \"select * from student where studid like '%$search%' or fname like '%$search%' or midname like '%$search%' or lname like '%$search%' or college like '%$search%' or course like '%$search%' or year like '%$search%' or section like '%$search%' order by section,year,course,college,lname,midname,fname,studid\";\n $r = mysql_query($q);\n\n return $r;\n }", "function get_list($sy_id,$student_id) {\n\t\treturn $this->query(\n\t\t\t\"SELECT * FROM $this->tblname WHERE sy_id=$sy_id AND student_id=$student_id\"\n\t\t);\n\t}", "function getAllStudents($classId) {\r\n $this->db->select('u.*');\r\n $this->db->from('subscription s');\r\n $this->db->from('user u');\r\n $this->db->where('u.id = s.subscriptionUser');\r\n $this->db->where('s.subscriptionClass', $classId);\r\n $this->db->where('s.subscriptionStartDate <= CURRENT_DATE()');\r\n $this->db->where('s.subscriptionEndDate >= CURRENT_DATE()');\r\n $this->db->group_by('u.id');\r\n return $this->db->get()->result();\r\n }", "public function getstudentById ($student_number){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM students \";\n $sqlQuery .= \" WHERE student_number=’ $student_number ’ \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }", "public function show(Semester $semester)\n {\n //\n }", "public function show(Semester $semester)\n {\n //\n }", "public function getAllStudentHasScholarships(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentHasScholarshipDAO->getAllStudentHasScholarships();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentHasScholarshipDAO.getAllStudentHasScholarships()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function getGrdStudents( $grdID, $sessionID ){\r\n\t\t$this->DDB = $this->load->database(\"default\",TRUE);\r\n\t\t\r\n\t\t$where = array(\"grade_id\" => $grdID, \"std_status_category\"=>\"Student\");\r\n\t\t$this->DDB->select(\"`id`,`official_name`,`abridged_name`, `gender`, `gs_id`,`section_dname` AS `section`,`student_status_name` AS `status`\");\r\n\t\t$this->DDB->from(\"`class_list`\");\r\n\t\t$this->DDB->where( $where );\r\n\t\t//$this->DDB->where(\"(std_status_category='Student' OR std_status_category='Fence')\", NULL, FALSE);\r\n\t\t$this->DDB->order_by(\"section_id\", \"ASC\");\r\n\t\t$this->DDB->order_by(\"call_name\", \"ASC\"); \r\n\t\t$query = $this->DDB->get();\r\n\t\tif( $query->num_rows() > 0 ){\r\n\t\t\t$results = $query->result_array();\r\n\t\t\treturn $results;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public function newStudentsInRisk(){\n return Aluriesgo::studentsInRiskQuery()->\n andWhere([\n 'codfac'=>$this->codfac,\n 'codperiodo'=>$this->codperiodo\n ])->\n andWhere(['not in',\n 'codalu', ArrayHelper::getColumn($this->studentsInRiskForThis(),'codalu')\n ])->all();\n \n }", "public function getSemester()\n {\n return $this->belongsTo(Semester::class, 'semester_id')->first();\n }", "public function semesterOnePage() {\n return \\view('admin.students.one-results', [\n 'ones' => SemesterOne::query()->whereIn('user_id', User::query()->where('program_verified', true)->get())->paginate(config('mv-notification.paginate')),\n ]);\n }", "function emarking_get_enroled_students($courseid)\n{\n global $DB;\n \n $query = emarking_get_enroled_students_sql();\n \n // Se toman los resultados del query dentro de una variable.\n $users = $DB->get_records_sql($query, array(\n $courseid\n ));\n \n return $users;\n}", "public function getStudents($univid) { //$univid is formal Argument\r\n\t\t//2. Build The Query\r\n\t\t\r\n $this->db->select('student_name,stu_enroll_no')->from('students');\r\n \r\n $this->db->where('university_id', $univid);\r\n \r\n\t\t//3. Execute the query\r\n $query = $this->db->get();\r\n\t\t\r\n\t\t//4. Return the result\r\n return $query->result_array(); \r\n }", "public function getStudents(int $id)\n {\n try {\n $students = Classroom::findOrFail($id)\n ->students()\n ->when(['student', $this->orderBy], Closure::fromCallable([$this, 'queryOrderBy']))\n ->when($this->limit, Closure::fromCallable([$this, 'queryLimit']));\n\n return StudentResource::collection($students);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n 'code' => 404,\n 'message' => 'Not Found',\n 'description' => 'Department ' . $id . ' not found.'\n ], 404);\n }\n }", "public static function getStudents($vueFormat = true)\n {\n $entities = [];\n $entities = Student::active()->select(['first_name', 'last_name', 'id'])->get();\n if (!$vueFormat) {\n $_entities = [];\n foreach ($entities as $key => $value) {\n $_entities[$value->id] = $value->full_name;\n }\n\n return $_entities;\n }\n\n return self::vueDropdown($entities, 'id', 'full_name');\n }", "function get_smsstudents($inputarray = array()) {\n $college_id = isset($inputarray['college_id']) ? $inputarray['college_id'] : '';\n $course_id = isset($inputarray['course_id']) ? $inputarray['course_id'] : '';\n $branch_id = isset($inputarray['branch_id']) ? $inputarray['branch_id'] : '';\n $semister_id = isset($inputarray['semister_id']) ? $inputarray['semister_id'] : '';\n $section_id = isset($inputarray['section_id']) ? $inputarray['section_id'] : '';\n $religion = isset($inputarray['religion']) ? strtolower($inputarray['religion']) : '';\n\n $sql = \" select sr.*, users.users_type_id, users.username, users.`password` , users.email, users.id as users_id ,users.status\n\t\t\t from users\n\t\t\t inner join student_records as sr on sr.user_id=users.id\n\t\t\t inner join student_semisters as ss on ss.user_id=sr.user_id\n\t\t\t where users.users_type_id='1' and users.status='1' and ss.is_current='1' and sr.college_id = '\" . $college_id . \"' \n\t\t\t and sr.course_id = '\" . $course_id . \"' and sr.branch_id = '\" . $branch_id . \"' and ss.semister_id = '\" . $semister_id . \"'\n\t\t\t and sr.section_id='\" . $section_id . \"' \";\n if (!empty($religion)) {\n $sql .= \" and sr.religion='\" . $religion . \"' \";\n }\n\n $sql .= \" ORDER BY username \";\n\n $res = $this->db->query($sql);\n return $res->result();\n }", "public static function onlineStudent(){\n $students = Roll::join('admissions','admissions.id', '=' , 'rolls.student_id' )\n ->where(['username' => Session::get('studentSession')])->first();\n \n return $students;// we will join the student with admission okay to have all his/her data's\n }", "public function getStudentsForPath($path_id) {\n return $this->get('get_students_for_path', ['path_id' => $path_id]);\n }", "public function fetchStudents()\n {\n //1st method to get all the record\n\n $students = Student::all();\n return $students;\n\n //2nd method to use where class mean to get a specific record\n\n // $students = Student::where('id', 33)->get();\n // return $students;\n\n //3rd method to select a range and get a specific records\n // $students = Student::whereBetween('id', [33, 44])->get();\n // return $students;\n\n //4th method to order by AScending or descending the with id base\n\n // $students = Student::whereBetween('id', [33, 44])->orderBy('id', 'DESC')->get();\n // return $students;\n\n }", "function searchforStudents() {\n $searchId = Input::get('sid');\n\n /* get project title according to the group's id */\n $protitle = DB::table('projects')\n ->where('groupID', $searchId)\n ->Where('status', 'Approved')\n ->pluck('title');\n\n /* get project id according to the group's id */\n $proid = DB::table('projects')\n ->where('title', $protitle)\n ->Where('status', 'Approved')\n ->pluck('id');\n\n /* mail adds. of members in the group */\n $groupmails = DB::table('research_groups')\n ->where('groupID', $searchId)\n ->pluck('mails');\n\n $explodedemails = explode(\"/\", $groupmails);\n $sendids = '';\n $sendnames = '';\n \n foreach ($explodedemails as $mail) {\n $id = (DB::table('students')\n ->where('email', $mail)\n ->pluck('regId'));\n\n $sendids .= $id . '/';\n\n /* get student name according to the student's id */\n $stuname = (DB::table('students')\n ->where('email', $mail)\n ->pluck('name'));\n $sendnames .= $stuname . '/';\n }\n \n $explodedsendids = explode(\"/\", rtrim($sendids, \"/\"));\n $explodedsendnames = explode(\"/\", rtrim($sendnames, \"/\"));\n $los = DB::table('settings')->first();\n \n $data = array(\"title\" => $protitle, \"pid\" => $proid, \"sname\" => $explodedsendnames,\n \"noofstu\" => sizeof($explodedemails), \"ids\" => $explodedsendids,\n \"ledrid\" => $explodedsendids[0], \"los\" => $los);\n return json_encode($data);\n }", "public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }", "public function actionStudents()\n\t{\n\t\t//$this->model = User::loadModel();\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '//drcUser/_list',\n\t\t\t'dataProvider' => $this->model->students(),\n\t\t\t'contentTitle' => 'DRC Students',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t));\n\t}", "public function getSemesterId()\n {\n return $this->semester_id;\n }", "public function getSemesterId()\n {\n return $this->semester_id;\n }", "public function studentList()\n {\n return output($this->UserDetails->where([\"roleId\"=>$this->getUserRoleId()])->read(),'success','SM001');\n }", "public function searchCurrentStudent_testRun() {\n\n $this->db->select('110431 as ein,grp.groupId,grp.groupName,sec.sectionName,se.session,pr.programName,stu.studentId,stu_info.applicationId,stu_info.firstName,\n stu_info.lastName,stu_info.dateOfBirth,stu_info.gender,stu_info.religion,stu_info.fatherName,stu_info.motherName,prg.programId,prg.sectionId,prg.sessionId');\n $this->db->from('student stu');\n $this->db->join('programoffer prg', 'prg.programOfferId=stu.programOfferId');\n $this->db->join('program pr', 'pr.programId=prg.programId', \"left join\");\n $this->db->join('session se', 'se.sessionId=prg.sessionId', \"left join\");\n $this->db->join('section sec', 'sec.sectionId=prg.sectionId', \"left join\");\n $this->db->join('group grp', 'grp.groupId=prg.groupId', \"left join\");\n $this->db->join('studentinfo stu_info', 'stu_info.applicationId=stu.applicationId');\n // $this->db->limit(10); \n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "public function searchRegisteredStudent($data) {\n\n $this->db->select('*');\n\n $this->db->from('student stu');\n $this->db->where('stu.programOfferId', $data['programOfferId']);\n // $this->db->where('stu.programOfferId', $dataa['programOfferId']); \n\n\n $query = $this->db->get();\n $result = $query->result_array();\n if (!empty($result)) {\n return $result;\n }\n }", "public function showStudents($season_id = null)\n {\n if (is_null($season_id)){\n $season_id = \\App\\Season::getLastSeasonID();\n }\n\n $student_registrations = \\App\\Registration::where([\n [\"season\",'=', $season_id]\n ])->get();\n \n $students = array();\n //get student infomations through registration->user_id\n foreach ($student_registrations as $registration) {\n $student = \\App\\User::join('student_infos','student_infos.user_id','=','users.id')\n ->where('user_id','=',$registration->user_id)\n ->select('users.name','student_infos.*')\n ->first();\n array_push($students, $student);\n }\n // dd($student_registrations);\n $all_season_id = \\App\\Season::getAllSeasonIDs();\n\n return view('internship.students-in-season',compact('students','all_season_id'));\n }", "public function getList()\n\t{\n\t\t$queryBuilder = $this\n\t\t\t->createQueryBuilder('student')\n\t\t\t->select('student, professor, tutor, contract_type')\n\t\t\t->leftJoin('student.professor', 'professor')\n\t\t\t->leftJoin('student.tutor', 'tutor')\n\t\t\t->leftJoin('student.contractType', 'contract_type');\n\t\treturn $queryBuilder->getQuery()->getResult();\n\t}", "function getStudent($class_id){\n \t$result = array();\n \t$owner_id = $this->model->selectWhere(array('owner_id'),\"id = \".\"'$class_id'\"); \t \n \tif(isset($class_id)){\n \t\t$UserClassModel = new User_Class_Model(); \t\t\n \t\t$user_id = $UserClassModel->selectWhere(array('user_id'),\"class_id = \".\"'$class_id'\");\n \t\tif(isset($user_id)){\n \t\t\tforeach ($user_id as $key => $value) {\n \t\t\t\t$UserModel = new User_Model(); \t\t\t\t\n \t\t\t\t$user_id = $value['user_id'];\n \t\t\t\tif($owner_id[0]['owner_id']==$user_id)\n \t\t\t\t\tcontinue;\n \t\t\t\t$user = $UserModel->selectWhere('*',\"\tid = \".\"'$user_id'\");\n \t\t\t\tarray_push($result, $user);\n \t\t\t}\n \t\t\techo json_encode($result[0]);\n \t\t}\n \t}else{\n \t\techo json_encode('failed');\n \t} \t\t\n \t\n }", "public function getstudentbymajor($data) {\n $year = $data['year'];\n $major = $data['major'];\n\n if ($major == \"all\") {\n $this->db->where('year', $year);\n } else {\n $this->db->where('year', $year)->where('major', $major);\n }\n $query = $this->db->from('student_establish')->join('student', \"student.id_st= student_establish.id_st\")->get()->result_array();\n return $query;\n }", "public function get_student($id)\n\t\t{\n\t\t\treturn $this->conn->get($id);\n\t\t}", "function getstudentsubject(){ \n $classid = $_GET['classid'];\n $q = \"select * from studentsubject where classid=$classid\";\n $r = mysql_query($q);\n $result = array();\n while($row = mysql_fetch_array($r)){\n $q2 = 'select * from student where id='.$row['studid'].'';\n $r2 = mysql_query($q2);\n $result[] = mysql_fetch_array($r2);\n }\n return $result;\n }", "public function schoolOfHumanitiesAndSocialSciences(){\n $name = 'SCHOOL OF HUMANITIES AND SOCIAL SCIENCES';\n $title = 'SHSS';\n\t\t$students = DB::table('students')\n ->where('students.faculty', '=', 'SHSS')->where('state', '=', 'Activated')\n ->whereNotIn('students.studentNo', function($q){\n $q->select('students_studentNo')->from('charge');\n })->paginate(15);\n\n return view('staff/faculty', compact('name','title','students'));\n\t}", "function woolman_get_semester($id) {\n static $semesters = array();\n if (!$semesters) {\n $semesters = woolman_get_civi_options(80, array('where' => '', 'order' => ''));\n }\n return woolman_aval($semesters, $id, 'unknown');\n}", "public function view_students()\n{\n $school =$this->getSchool(self::Admin,self::Active);\n$students =Student::where('user_id',$this->user_id())->orderBy('id','DES')->paginate(100);\n return view('home.student.index')->withS($school);\n}", "public function index()\n {\n $s_name = isset($_GET['s_name']) ? trim($_GET['s_name']) : \"\";\n $s_city = isset($_GET['s_city']) ? trim($_GET['s_city']) : \"\";\n $s_date = isset($_GET['s_date']) ? trim($_GET['s_date']) : \"\";\n $s_sub = isset($_GET['s_sub']) ? trim($_GET['s_sub']) : \"\";\n $s_status_id = isset($_GET['s_status_id']) ? trim($_GET['s_status_id']) : \"\";\n $field = isset($_GET['field']) ? trim($_GET['field']) : \"\";\n $dir = isset($_GET['dir']) ? trim($_GET['dir']) : \"asc\";\n\n $q = \"1=1 \";\n $url = \"\";\n \n if ($field!=\"\") {\n // $url = \"?field=\".$field.\"&dir=\".$dir;\n }\n\n if ($s_city) {\n $q.= \" and city like '%\".$s_city.\"%'\";\n $url.= \"&s_city=\".$s_city;\n }\n\n if ($s_date) {\n $q.= \" and created_at like '%\".$s_date.\"%'\";\n $url.= \"&s_date=\".$s_date;\n }\n\n $q.= \" and grade_id >= '1'\";\n\n if ($s_status_id) {\n $q.= \" and student_status_id like '%\".$s_status_id.\"%'\";\n $url.= \"&s_status_id=\".$s_status_id;\n }\n\n if ($s_name) {\n $q.= \" and (fname like '%\".$s_name.\"%' or lname like '%\" .$s_name . \"%') \";\n $url.= \"&s_name=\".$s_name;\n }\n \n \n $students = Role::find(config('global.STUDENT_ROLE_ID'))->users()\n ->whereRaw($q);\n\n if ($field!=\"\") {\n // $q.= \" order by \".$field.\" \".$dir;\n $students = $students->orderBy($field, $dir);\n }\n \n if ($s_sub) {\n $url.= \"&s_sub=\".$s_sub;\n $students = $students->whereHas('subjects', function($subject) use ($s_sub) {\n return $subject->where('name', 'like', \"%\" . $s_sub . \"%\");\n });\n }\n \n if ($url !=\"\") {\n $url = substr($url, 1);\n }\n \n $students = $students->get(); \n $student_statuses = StudentStatus::all();\n $subjects = Subject::all();\n $data = [\n 'students' => $students,\n 'student_statuses' => $student_statuses,\n 'subjects' => $subjects,\n 'url' => $url,\n 'order' => [\n 'field' => $field,\n 'dir' => $dir\n ],\n 'old' => [\n 's_name' => $s_name,\n 's_city' => $s_city,\n 's_date' => $s_date,\n 's_sub' => $s_sub,\n 's_status_id' => $s_status_id,\n ]\n ];\n\n // session()->flash('error', null);\n if (count($students) == 0) {\n session()->flash('error', \"No search results!\");\n }\n\n return view('admin.students.index')->with('data', $data);\n }", "public function searchClassByStudent_post()\n {\n /* code goes here */\n }", "public function getSchool();", "public function getSchools(){\r\n $sql=\"SELECT * FROM schools\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "public function getStudentData($user)\r\n\t{\r\n\t\t$sql = \"SELECT s.`id`, s.`index`, s.`fname`, s.`mname`, s.`lname`, \r\n\t\t\t\tf.`bill`, f.`balBF`, f.`bal`, f.`paid`, s.`pid`, p.`program` \r\n\t\t\t\tFROM `students` AS s, `finance` AS f, `program` AS p \r\n\t\t\t\tWHERE s.`id` = f.`sid` AND s.`id` = :u AND s.`pid` = p.`id` \r\n\t\t\t\tAND s.`type` = 2 AND s.`deleted` = 0\";\r\n\t\t$params = array(':u' => $user);\r\n\t\treturn $this->gh->getData($sql, $params);\r\n\t}", "public function searchStudent($search_text)\n {\n $studentModel = new StudentModel();\n return $studentModel->searchStudent($search_text);\n }", "public function get_school_list()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('cms_schools');\n\t\t$this->db->where('schl_status','0');\n\t\t$query = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $query->result();\n\t}", "function getStudentByMajorValidate(){\n\t\t\n\t\tif(@$this->major == \"\" | @$this->institution == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Both the major and institution are required!\", \"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->getStudentByMajor( $this->sanitize($this->major), $this->sanitize($this->institution) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function showstudentsAction() { \r\n $students = $this->getDoctrine()\r\n ->getRepository(Student::class)\r\n ->findAll();\r\n\r\n foreach ($students as $student) {\r\n $student->getClassroom();\r\n }\r\n\r\n return $this->render('admin/admin-student/adminStudentDashboard.html.twig', [\r\n 'students' => $students,\r\n ]);\r\n }", "public function students()\n {\n \treturn $this->belongsToMany(User::class, 'course_user', 'course_id', 'student_id');\n }", "public function get_logged_in_student_details() {\n\t\t$user_id = $this->session->userdata('user_id');\n\t\t$student_data = $this->db->get_where('students', array('user_id' => $user_id))->row_array();\n\t\t$student_details = $this->get_student_details_by_id('student', $student_data['id']);\n\t\treturn $student_details;\n\t}", "public function getCourseStudents ($id) {\n return $this->makeCall($id, $this->base . 'api/public/courses/' . $id . '/students', true);\n }", "public function fetchStudentDetails($lintidreg) {\r\n\t \t$db = Zend_Db_Table::getDefaultAdapter();\r\n $sql = $db->select()\r\n ->from(array('a' => 'tbl_studentregistration'),array('a.FName','a.MName','a.LName','a.registrationId'))\r\n ->joinLeft(array('b'=>'tbl_branchofficevenue'),'a.IdBranch = b.IdBranch',array('b.BranchName'))\r\n ->joinLeft(array('c'=>'tbl_program'),'a.IdProgram = c.IdProgram',array('c.ProgramName','c.IdScheme'))\r\n ->joinLeft(array('d'=>'tbl_intake'),'a.IdIntake = d.IdIntake',array('d.IntakeId'))\r\n ->joinLeft(array('e'=>'tbl_scheme'),'e.IdScheme = c.IdScheme',array('e.EnglishDescription'))\r\n ->joinLeft(array('cm'=>'tbl_collegemaster'),'c.IdCollege = cm.IdCollege',array('cm.CollegeName'))\r\n ->joinLeft(array('deftn'=>'tbl_definationms'),'deftn.idDefinition=a.profileStatus',array('deftn.DefinitionCode'))\r\n ->where('a.IdStudentRegistration = ?',$lintidreg);\r\n $result = $db->fetchRow($sql);\r\n return $result;\r\n }", "public function getStudentsForPeriod($period_id, $spe_id = false, $bypass_security = false) {\n\t\t$q = SQLQuery::create()->bypassSecurity($bypass_security)->select(\"StudentsGroup\")->whereValue(\"StudentsGroup\",\"period\",$period_id);\n\t\tif ($spe_id !== false) $q->whereValue(\"StudentsGroup\",\"specialization\",$spe_id);\n\t\t$q->field(\"id\");\n\t\t$groups_ids = $q->executeSingleField();\n\t\treturn SQLQuery::create()->bypassSecurity($bypass_security)->select(\"StudentGroup\")->whereIn(\"StudentGroup\",\"group\",$groups_ids)->field(\"StudentGroup\",\"people\")->distinct()->executeSingleField();\n\t}", "function sqlStudentAll()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql = \"SELECT student_name,student_roll_number,student_dob,student_grade_id,student_id\"\n\t\t. \" FROM tbl_student INNER JOIN tbl_grade \"\n\t\t. \" ON tbl_grade.grade_id = tbl_student.student_grade_id \"\n\t\t. \"\";\n\n\t\treturn $sql;\n\t}", "function get_subject_scores(\r\n string $subject,\r\n string $stream,\r\n string $exam, \r\n string $grade\r\n ): string{\r\n return \"select \" \r\n .\" student.name as name ,\"\r\n .\" score.value as score \"\r\n .\" from score \"\r\n .\" inner join allocation on score.allocation=allocation.allocation\"\r\n .\" inner join teacher on teacher.teacher= allocation.teacher\"\r\n .\" inner join subject on teacher.subject=subject.subject\"\r\n .\" inner join student on score.student= student.student\"\r\n .\" inner join progress on progress.student= student.student\" \r\n .\" inner join stage on progress.stage= stage.stage\"\r\n .\" inner join stream on stage.stream= stream.stream\"\r\n .\" inner join grade on stream.grade=grade.grade\"\r\n .\" inner join school on school.school=grade.school\"\r\n .\" inner join term on score.term= term.term\"\r\n .\" where subject.name='$subject'\"\r\n .\" AND school.id='{$this->id}'\"\r\n .\" AND term.name= '$exam'\"\r\n .\" AND stream.name='$stream'\"\r\n .\" AND grade.name= '$grade'\";\r\n }", "public function getStudentClassScore(){\n //new sql line\n $sql = 'SELECT student.sno , student.sname , class.cname , score.score FROM student,score,class';\n $sqlQuery = new SqlQuery($sql);\n $scoreList = $this->getStudentClassScoreList($sqlQuery);\n\n return $scoreList;\n }", "public function studentIndex()\n {\n $users = User::whereHas('roles', function($q){\n $q->where('role_user.role_id',4);\n })->where('organisationId',Auth::user()->organisationId)->get();\n\n $page['title'] = \"Students List\";\n return view('user.index',compact('users','students','page'));\n }", "public function getStudentRegistrations()\n {\n return $this->hasMany(StudentRegistration::className(), ['courseId' => 'courseId']);\n }", "public function studentsListing() {\n \t$students = Student::all();\n \tif(count($students) > 0) {\n \t\treturn response() -> json([\"status\" => $this->status, \"success\" => true, \"count\" => count($students), \"data\" => $students]);\n \t}\n \telse {\n \t\treturn response()->json([\"status\" => \"failed\", \"success\" => false, \"message\" => \"Whoops! no record found\"]);\n \t}\n }", "public function getStudent(int $id, string $table);", "public function viewSchool()\n {\n global $mysqli, $_GET;\n\n $school = \"SELECT * FROM `schools` WHERE id=\" . $_GET['sid'];\n if (!$results = $mysqli->query($school))\n {\n echo \"CALL failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n return $results->fetch_array();\n }", "public function actionIndex()\n {\n $session = \\yii::$app->session;\n $user_type = $session->get('type',-1);\n\n $searchModel = new StudentSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public static function get_user_assessments($studentID)\n {\n //first get all of the qualifications they are on\n //then get all of the formal assessments on all of these. \n $projects = array();\n $userQuals = get_users_quals($studentID);\n if($userQuals)\n {\n foreach($userQuals AS $qual)\n {\n $array = Project::get_qual_assessments($qual->id);\n $projects = $projects + $array;\n }\n }\n $retval = new stdClass();\n $retval->quals = $userQuals;\n $retval->projects = $projects;\n return $retval;\n }", "public function viewAllStudents() {\n return view('admin.students.student', [\n 'students' => User::query()->with('program')->paginate(config('mv-notification.paginate')),\n ]);\n }", "public function get_users_on_course_mod($courseModule)\n {\n //courseID and GroupingID\n //find all 'students'\n //if groupingID != -1 then find all of the students in that grouping. \n global $DB;\n $sql = \"SELECT distinct(user.id), user.* FROM {user} user \n JOIN {role_assignments} ra ON ra.userid = user.id \n JOIN {role} r ON r.id = ra.roleid \n JOIN {context} con ON con.id = ra.contextid \n JOIN {course} course ON course.id = con.instanceid \n JOIN {block_bcgt_course_qual} coursequal ON coursequal.courseid = course.id \n JOIN {block_bcgt_user_qual} userqual ON userqual.bcgtqualificationid = coursequal.bcgtqualificationid AND\n userqual.userid = user.id\n JOIN {role} rolequal ON rolequal.id = userqual.roleid\";\n if($courseModule->groupingid)\n {\n $sql .= \" JOIN {groupings} groupings ON groupings.courseid = course.id \n JOIN {groupings_groups} gg ON gg.groupingid = groupings.id \n JOIN {groups_members} members ON members.groupid = gg.groupid AND members.userid = user.id \";\n }\n $sql .= \" WHERE course.id = ? AND rolequal.shortname = ?\";\n $params = array();\n $params[] = $courseModule->course;\n $params[] = 'student';\n if($courseModule->groupingid)\n {\n $sql .= \" AND groupings.id = ?\";\n $params[] = $courseModule->groupingid;\n }\n return $DB->get_records_sql($sql, $params);\n }" ]
[ "0.6541426", "0.6454452", "0.6315013", "0.626638", "0.6251841", "0.6160394", "0.615403", "0.6152344", "0.60128516", "0.59953856", "0.5966813", "0.5947472", "0.59391993", "0.58563966", "0.5846611", "0.58049464", "0.5768089", "0.57642883", "0.5752834", "0.57449186", "0.5744714", "0.5714816", "0.5692843", "0.566966", "0.56469434", "0.56393045", "0.56336665", "0.559206", "0.5561713", "0.5552306", "0.55413955", "0.5540187", "0.5534153", "0.5530203", "0.55216855", "0.55194205", "0.5518778", "0.55063075", "0.5497701", "0.5489122", "0.5486806", "0.54641384", "0.54634273", "0.54634273", "0.5462721", "0.54527026", "0.5444688", "0.54417", "0.5427452", "0.54216826", "0.5419998", "0.54073393", "0.54002136", "0.53838056", "0.5358438", "0.5349695", "0.534683", "0.53343254", "0.5324201", "0.5316338", "0.53162235", "0.53162235", "0.53148437", "0.5303626", "0.5300649", "0.5299255", "0.5299077", "0.5294371", "0.5290866", "0.5272549", "0.5271773", "0.527055", "0.52699417", "0.5268418", "0.5264184", "0.52484375", "0.523413", "0.52334565", "0.5213524", "0.5203566", "0.51970327", "0.51910645", "0.518111", "0.51765496", "0.5173703", "0.51574254", "0.5152501", "0.5144419", "0.5135937", "0.5132057", "0.51319516", "0.51289463", "0.5124976", "0.5116304", "0.511201", "0.5108565", "0.5102776", "0.50985307", "0.50957626", "0.5090827" ]
0.7215253
0
module should throw Exception in case of merge is not possible
protected function merge(User $target, User $source) { $event = new Am_Event(Am_Event::USER_BEFORE_MERGE, array( 'target' => $target, 'source' => $source )); $this->getDi()->hook->call(Am_Event::USER_BEFORE_MERGE, $event); $this->getDi()->db->query('UPDATE ?_access SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_access_log SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_invoice SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_invoice_log SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_invoice_payment SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_invoice_refund SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); // $this->getDi()->db->query('UPDATE ?_admin_log SET record_id=? WHERE record_id=? // AND tablename=?', // $target->pk(), $source->pk(), 'user'); $this->getDi()->db->query('UPDATE ?_coupon_batch SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_file_download SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $this->getDi()->db->query('UPDATE ?_upload SET user_id=? WHERE user_id=?', $target->pk(), $source->pk()); $event = new Am_Event(Am_Event::USER_MERGE, array( 'target' => $target, 'source' => $source )); $this->getDi()->hook->call(Am_Event::USER_MERGE, $event); $source->delete(); $target->save(); $target->checkSubscriptions(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function merge() {}", "public function testMerge() {\n $config1 = new Config(array(\n 'foo' => 123,\n 'bar' => 456,\n 'baz' => array(\n 1,2,3\n )\n ));\n \n $config2 = new Config(array(\n 'foo' => false,\n 'baz' => array(\n 4,5,6\n ),\n 'quz' => true\n ));\n \n $config1->merge($config2);\n \n $this->assertFalse($config1->foo);\n $this->assertEquals(456, $config1->bar);\n $this->assertSame(array(4,5,6), $config1->baz->getArrayCopy());\n $this->assertTrue($config1->quz);\n \n $this->setExpectedException('Nimbles\\App\\Config\\Exception\\InvalidConfig');\n $config1->merge(123);\n }", "public function merge();", "public function testMergeActionsException()\n {\n $testActionMergeUtil = new ActionMergeUtil(null, null);\n\n $actionObject = new ActionObject('fakeAction', 'comment', [\n 'userInput' => '{{someEntity.entity}}'\n ]);\n\n $this->expectExceptionMessage(\"Could not resolve entity reference \\\"{{someEntity.entity}}\\\" \" .\n \"in Action with stepKey \\\"fakeAction\\\".\\n\" .\n \"Exception occurred parsing action at StepKey \\\"fakeAction\\\"\");\n\n $testActionMergeUtil->resolveActionSteps([\"merge123\" => $actionObject]);\n }", "function merge($p_archive_to_add)\n {\n }", "public function throwConflict()\n {\n throw new Exception\\ConflictException('Conflict', 1449131059);\n }", "function privMerge(&$p_archive_to_add)\n {\n }", "public function testMergeGeneration()\n {\n $this->generateAndCompareTest('BasicMergeTest');\n }", "function processMerge(&$interface)\n{\n if ($_POST['source_folder'] == $_POST['dest_folder']) {\n return mergeError($interface, \"Cannot merge -- source and destination are the same.\");\n }\n\n // Load source and destination folders:\n $source = Folder::staticGet('id', $_POST['source_folder']);\n if (!$source) {\n return mergeError($interface, 'Problem loading source folder with ID: ' . $_POST['source_folder']);\n }\n $dest = Folder::staticGet('id', $_POST['dest_folder']);\n if (!$dest) {\n return mergeError($interface, 'Problem loading destination folder with ID: ' . $_POST['dest_folder']);\n }\n\n // Don't allow merge into your own parent or child:\n $destParents = $dest->getParentChain();\n foreach($destParents as $parent) {\n if ($parent->id == $source->id) {\n return mergeError($interface, 'Cannot merge a classification into its own child.');\n }\n }\n $sourceParents = $source->getParentChain();\n foreach($sourceParents as $parent) {\n if ($parent->id == $dest->id) {\n return mergeError($interface, 'Cannot merge a classification into its own parent.');\n }\n }\n\n // Has the merge been confirmed? If not, show confirmation; otherwise, process changes!\n if (!isset($_POST['confirm']) || $_POST['confirm'] != 'yes') {\n $interface->assign('sourceFolder', $source);\n $interface->assign('destFolder', $dest);\n $interface->assign('sourceWorks', count($source->getWorks()));\n $interface->assign('destWorks', count($dest->getWorks()));\n $interface->assign('sourceChildren', count($source->getChildren()));\n $interface->assign('destChildren', count($dest->getChildren()));\n $interface->setTemplate('folder-merge-confirm.tpl');\n\n } else {\n $do = new DB_DataObject();\n\n $safeSource = $do->escape($source->id);\n $safeDest = $do->escape($dest->id);\n\n // Move children\n $sql = \"UPDATE folder SET parent_id = '{$safeDest}' WHERE parent_id = '{$safeSource}'\";\n $do->query($sql);\n\n // Move works (but first delete potential duplicates to avoid key violation).\n // Note nested subquery hack to work around MySQL limitation of being unable\n // to select from updated table in single subquery.\n $sql = \"DELETE FROM work_folder WHERE folder_id='{$safeDest}' AND work_id IN \" .\n \"(SELECT work_id FROM (SELECT * FROM work_folder WHERE folder_id='{$safeSource}') AS x)\";\n $do->query($sql);\n $sql = \"UPDATE work_folder SET folder_id = '{$safeDest}' WHERE folder_id = '{$safeSource}'\";\n $do->query($sql);\n\n // Move references (probably unnecessary -- this feature does not seem to be used):\n $sql = \"UPDATE folder_reference SET folder_id = '{$safeDest}' WHERE folder_id = '{$safeSource}'\";\n $do->query($sql);\n $sql = \"UPDATE folder_reference SET reference_id = '{$safeDest}' WHERE reference_id = '{$safeSource}'\";\n $do->query($sql);\n\n // Track merge history -- update any previous history, then add the current merge:\n $sql = \"UPDATE folder_merge_history SET dest_folder_id='{$safeDest}' \" .\n \"WHERE dest_folder_id='{$safeSource}'\";\n $do->query($sql);\n $sql = \"INSERT INTO folder_merge_history(source_folder_id, dest_folder_id) \" .\n \"VALUES ('{$safeSource}', '{$safeDest}')\";\n $do->query($sql);\n\n // Purge\n $sql = \"DELETE FROM folder WHERE id = '{$safeSource}'\";\n $do->query($sql);\n\n showList($interface);\n // All done -- report success and display the destination folder!\n $_GET['id'] = $_POST['dest_folder'];\n $interface->assign('message', 'Merge successful.');\n showForm($interface);\n }\n}", "public function testMergeSkipGeneration()\n {\n $this->generateAndCompareTest('MergeSkip');\n }", "public function testMergeInvalid()\n {\n\n // initialize the configuration\n $node = new SessionNode();\n $node->initFromFile(__DIR__ . '/_files/dd-statefulsessionbean.xml');\n\n // initialize the descriptor from the nodes data\n $this->descriptor->fromConfiguration($node);\n\n // initialize the descriptor to merge\n $descriptorToMerge = $this->getMockForAbstractClass('AppserverIo\\Description\\MessageDrivenBeanDescriptor');\n\n $cloned = clone $this->descriptor;\n\n // merge the descriptors\n $this->descriptor->merge($descriptorToMerge);\n\n // check if all values have been merged\n $this->assertEquals($this->descriptor, $cloned);\n }", "public function resolveCopy() {\r\n\t\tif($this->status == self::CONFLICT && $this->numFiles == 1) {\r\n\t\t\t$this->status = self::MISSING;\t\t\t\r\n\t\t}\r\n\t}", "public function testOptionMergeWithAdditional()\n {\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'list',\n '--raw'\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(4, $merged);\n $this->assertEquals('--raw', $merged[2]);\n $this->assertEquals('--format=xml', $merged[3]);\n }", "public function merge_with(&$other)\n {\n }", "public function merge($first, $second) {\n throw new UnsupportedOperationException();\n }", "public function consolidate(): int\n {\n $this->logManager->logMessage(lang('Revision.consolidate'));\n\n try {\n $this->consolidator\n ->mergeCreatedFiles()\n ->mergeModifiedFiles()\n ->mergeDeletedFiles()\n ;\n\n return EXIT_SUCCESS;\n } catch (IOExceptionInterface $e) {\n $this->logManager->logMessage($e->getMessage(), 'error');\n\n return EXIT_ERROR;\n }\n }", "public function testOptionMerge()\n {\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'list',\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(3, $merged);\n $this->assertEquals('--format=xml', $merged[2]);\n }", "public function testMergeMassViaInsertBefore()\n {\n $this->generateAndCompareTest('MergeMassViaInsertBefore');\n }", "public function add_new_merge()\n {\n $course_name = $this->input->post(\"course_name\");\n $class_name = $this->input->post(\"class_name\");\n $course_name = $this->security->xss_clean($this->authadmin->sanitize_string($course_name));\n $class_name = $this->security->xss_clean($this->authadmin->sanitize_string($class_name));\n if($course_name==\"\"){\n echo \"please be sure to select a course\";\n }else if($class_name==\"\"){\n echo \"class name cannot be left empty\";\n }else{\n $check_course_name = $this->admin_student_courses_mdl->check_course($course_name);\n if($check_course_name==0){\n echo \"proccess was uncessful because this course doesnt exist in the database\";\n }else{\n $check_class_name = $this->admin_classes_mdl->check_classes($class_name);\n if($check_class_name==0){\n echo \"proccess was uncessful because this class doesnt exist in the database\";\n }else{\n $check_if_pair_exist = $this->admin_student_courses_mdl->check_if_pair_exist($course_name, $class_name);\n if($check_if_pair_exist==TRUE){\n echo \"this course and class have already been merged\";\n }else{\n $this->admin_student_courses_mdl->merge_new_course($course_name, $class_name);\n echo \"merge process was successfull\";\n }\n \n }\n }\n }\n }", "public function isMerging(): bool\n {\n foreach (['MERGE_MSG', 'MERGE_HEAD', 'MERGE_MODE'] as $fileName) {\n if (file_exists($this->dotGitDir . DIRECTORY_SEPARATOR . $fileName)) {\n return true;\n }\n }\n return false;\n }", "public function testMerge()\n {\n $merges = func_get_args();\n $test = array_shift($merges);\n $check = $test;\n\n $data = new ArrayObject($test);\n\n $this->assertFalse($data->isDirty());\n\n foreach ($merges as $merge) {\n $check = array_merge($check, $merge);\n $data->merge($merge);\n $this->assertTrue($data->isDirty());\n $this->assertEquals($data->getArrayCopy(), $check);\n }\n }", "private function fileSizeAndTypesModulesChecks()\n {\n $this->statisticsModule = \\Yii::$app->getModule('statistics');\n if (is_null($this->statisticsModule)) {\n throw new CommunityException(AmosCommunity::t('amoscommunity', 'statistics module not found'));\n }\n \n $this->cwhModule = \\Yii::$app->getModule('cwh');\n if (is_null($this->cwhModule)) {\n throw new CommunityException(AmosCommunity::t('amoscommunity', 'CWH module not found'));\n }\n \n $this->documentsModule = \\Yii::$app->getModule('documenti');\n if (is_null($this->documentsModule)) {\n throw new CommunityException(AmosCommunity::t('amoscommunity', 'documenti module not found'));\n }\n }", "function merge($author, $simauthor_id) {\r\n $CI = &get_instance();\r\n //0) get author and simauthor, to verify synonym information! \r\n //a synonym can ONLY be merged with its primary as TARGET.\r\n $simauthor = $CI->author_db->getByID($simauthor_id);\r\n if ($author->synonym_of != '0')\r\n {\r\n appendErrorMessage(__(\"You cannot merge authors with a synonym author as target\").'.<br/>');\r\n return;\r\n }\r\n if (($simauthor->synonym_of != '0') && ($simauthor->synonym_of != $author->author_id))\r\n {\r\n appendErrorMessage(__(\"An author synonym can only be merged with the corresponding primary author\").'.<br/>');\r\n return;\r\n }\r\n \r\n //1) get all publications of old, similar author, one by one.\r\n $pubs = $CI->publication_db->getForAuthor($simauthor_id);\r\n //2) reassign the publication, if appropriate rights \r\n foreach ($pubs as $pub) {\r\n if ($CI->accesslevels_lib->canEditObject($pub)) { //reasign this publication, directly in database tables\r\n $transfer = true;\r\n //was the new author not already an author for this publications?\r\n foreach($pub->authors as $a) {\r\n if ($a->author_id == $author->author_id) {\r\n $transfer = false;\r\n }\r\n }\r\n if (!$transfer) {\r\n //remove link for similarauthor\r\n $CI->db->delete('publicationauthorlink',array('author_id'=>$simauthor_id,'pub_id'=>$pub->pub_id));\r\n } else {\r\n //transfer link for similarauthor\r\n $CI->db->update('publicationauthorlink',array('author_id'=>$author->author_id),array('author_id'=>$simauthor_id,'pub_id'=>$pub->pub_id));\r\n }\r\n }\r\n }\r\n //3) look if table contains any publication for old author (might have been inaccessible for you!)\r\n // if all publications successfully reassigned, kill old similar author, else give warning\r\n $remainingPubsQ = $CI->db->get_where('publicationauthorlink',array('author_id'=>$simauthor_id));\r\n if ($remainingPubsQ->num_rows() > 0) {\r\n appendErrorMessage(__('There are some publications that could not be reassigned due to access rights'));\r\n } else {\r\n $CI->db->delete('author',array('author_id'=>$simauthor_id));\r\n }\r\n //4) reassign all synonyms of old author to new author\r\n $CI->db->update('author',array('synonym_of'=>$author->author_id),array('synonym_of'=>$simauthor_id));\r\n }", "public function testFetchTwiceForMerge()\n {\n $expect = $this->config->fetch('Ray\\Di\\MockParentClass');\n $actual = $this->config->fetch('Ray\\Di\\MockParentClass');\n $this->assertSame($expect, $actual);\n }", "protected function execute(InputInterface $input, OutputInterface $output)\n {\n try {\n $this->setUpEnvironment($input);\n } catch (Exception $e) {\n throw $e;\n }\n\n if ($this->itemToDelete == null) {\n $output->writeln(\"\\nWARNING: The item \". $this->itemIdToDelete . \" does not exist!!\\n\");\n }\n\n $output->writeln('Executing check...');\n\n if (($message = $this->checkItemsConsistency()) !== true) {\n //$this->logger->info($message);\n throw new Exception($message);\n }\n\n // call DL API -- returns the list of elements to merge\n $uri = ($this->itemToDelete == null) ? $this->getContainer()->getParameter('korbo_base_purl_uri') . $this->itemIdToDelete : $this->itemToDelete->getUri();\n\n $elementListUrl = $this->dlGetApiUrl . '?uri=' . $uri;\n $elementsToMergeRequest = $this->doApiRequest($elementListUrl, true);\n\n // something went wrong (not reachable, api error)\n if ($elementsToMergeRequest === false) {\n throw new Exception('Something went wrong...DL retrieving API not reachable');\n }\n\n $elementsToMerge = json_decode($elementsToMergeRequest, true);\n\n if (count($elementsToMerge ) > 0) $output->writeln(\"\\nThe following elements containing the uri {$uri}: \\n\");\n else $output->writeln(\"\\nThe element {$uri} is not present into the DL \\n\");\n // display the modification to make\n foreach ($elementsToMerge as $element) {\n foreach ($element['fields'] as $field => $values) {\n if ($values['uri'] == $uri) {\n $output->writeln($element['id'] . ' ' . $element['slug']);\n $output->writeln($field . ' : ' . $values['label']);\n }\n }\n $output->writeln(\"\");\n }\n\n // call AS api -- returns the list of annotations to modify\n $annotations = $this->getAnnotations();\n //print_r($annotations);die;\n if (count($annotations) > 0) {\n $output->writeln(\"\\nThe the uri {$uri} is present in the following annotations: \\n\");\n }\n else {\n $output->writeln(\"\\nYou are lucky... no annotations found! \\n\");\n }\n\n foreach ($annotations as $annotation) {\n $output->writeln($annotation['annotationId'] . ' ' . $annotation['s'] . ' -- ' . $annotation['p'] . ' -- ' . $this->itemToDelete->getLabelTranslated() . ' -- ' . $annotation['page-context'] . \"\\n\");\n }\n\n\n\n\n }", "public function testMerge()\n {\n // payload map doesn't know about the type\n $this->assertFalse($this->payloadMap->hasMappingForType(self::OTHER_KNOWN_TYPE));\n $this->payloadMap->merge($this->otherMap);\n // other map does\n $this->assertTrue($this->payloadMap->hasMappingForType(self::OTHER_KNOWN_TYPE));\n $this->assertSame(self::CONCRETE_TYPE, $this->payloadMap->getConcreteType(self::OTHER_KNOWN_TYPE));\n }", "public function testMergedReferences()\n {\n $this->generateAndCompareTest('MergedReferencesTest');\n }", "public function mergeBranch()\n\t{\n\t\t$this->Checklogin();\n\t\n\t\t$branchId=$this->input->post('branchId');\n\t\t$mainbranchId=$this->input->post('selectBranch');\n\t\n\t\tif ($mainbranchId !=0 && $branchId !=0 )\n\t\t{\n\t\t\t$a=$this->branch_model->mergeBranch($branchId,$mainbranchId);\n\t\t\t\n\t\t\t$this->session->set_flashdata('success','Branch has been successfully merged');\n\t\t\techo true;\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$this->session->set_flashdata('success','Something went wrong');\n\t\t\techo true;\n\t\t}\n\t\n\t}", "public function analyzeMergesAndConflicts()\n {\n $this->logManager->logMessage(lang('Revision.analyzeMergesAndConflicts'));\n\n $mc = \\count($this->fileManager->mergedFiles);\n $cc = array_reduce($this->fileManager->conflicts, static function ($carry, $item) {\n $carry += \\count($item);\n\n return $carry;\n }, 0);\n\n $ms = 1 === $mc ? lang('Revision.fileSingular') : lang('Revision.filePlural');\n $cs = 1 === $cc ? lang('Revision.fileSingular') : lang('Revision.filePlural');\n\n $this->logManager->logMessage([\n lang('Revision.mergedFilesAfterConsolidation', [$mc, $ms]),\n lang('Revision.conflictingFilesAfterConsolidation', [$cc, $cs]),\n ]);\n }", "public function mergeUnique() {}", "function merge_get_unassigned($cognitivefactoryid, $userid=null, $groupid=0, $excludemyself=false, $configdata) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, $excludemyself, 'od.');\n $sql = \"\n SELECT\n r.*, \n od.itemsource\n FROM\n {cognitivefactory_responses} as r\n LEFT JOIN\n {cognitivefactory_opdata} as od\n ON\n r.id = od.itemsource AND\n operatorid = 'merge'\n WHERE\n r.cognitivefactoryid = {$cognitivefactoryid} \n {$accessClause}\n AND od.itemsource IS NULL\n \";\n if (!$records = $DB->get_records_sql($sql)) {\n return array();\n }\n return $records;\n}", "abstract function is_org_repo_compliant();", "function updateSourceModule() {\n try {\n $commits_table = TABLE_PREFIX . 'source_commits';\n $paths_table = TABLE_PREFIX . 'source_paths';\n $repositories_table = TABLE_PREFIX . 'source_repositories';\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $source_users_table = TABLE_PREFIX . 'source_users';\n $activity_logs_table = TABLE_PREFIX . 'activity_logs';\n\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n if(DB::executeFirstCell(\"SELECT COUNT(*) AS count FROM \" . TABLE_PREFIX . \"modules WHERE name='source'\")) {\n DB::execute(\"CREATE TABLE $commits_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(255) DEFAULT NULL,\n type varchar(25) DEFAULT NULL,\n revision_number int(11) unsigned DEFAULT '0',\n repository_id int(11) unsigned DEFAULT '0',\n message_title text,\n message_body text,\n authored_on datetime DEFAULT NULL,\n authored_by_name varchar(100) DEFAULT NULL,\n authored_by_email varchar(100) DEFAULT NULL,\n commited_on datetime DEFAULT NULL,\n commited_by_name varchar(100) DEFAULT NULL,\n commited_by_email varchar(100) DEFAULT NULL,\n diff text,\n PRIMARY KEY (id),\n KEY repository_id (repository_id),\n KEY commited_on (commited_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $paths_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n commit_id int(11) unsigned DEFAULT '0',\n is_dir tinyint(1) unsigned NOT NULL DEFAULT '0',\n path varchar(255) DEFAULT NULL,\n action varchar(1) DEFAULT NULL,\n PRIMARY KEY (id),\n KEY commit_id (commit_id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $repositories_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(255) DEFAULT NULL,\n type varchar(25) DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n created_by_id int(10) unsigned DEFAULT '0',\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n updated_on datetime DEFAULT NULL,\n updated_by_id int(10) unsigned DEFAULT '0',\n updated_by_name varchar(100) DEFAULT NULL,\n updated_by_email varchar(150) DEFAULT NULL,\n repository_path_url varchar(255) DEFAULT NULL,\n username varchar(255) DEFAULT NULL,\n password varchar(255) DEFAULT NULL,\n update_type int(3) DEFAULT '0',\n graph text,\n PRIMARY KEY (id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n $repositories_link = array();\n $repositories = DB::execute(\"SELECT * FROM $project_objects_table WHERE type = 'Repository'\");\n if (is_foreachable($repositories)) {\n foreach ($repositories as $repository) {\n //insert new source repository\n DB::execute(\"INSERT INTO $repositories_table (name,type,created_on,created_by_id,created_by_name,created_by_email,updated_on,updated_by_id,updated_by_name,updated_by_email,\n repository_path_url,username,password,update_type,graph) VALUES (?, 'SvnRepository', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",\n $repository['name'],\n $repository['created_on'],\n $repository['created_by_id'],\n $repository['created_by_name'],\n $repository['created_by_email'],\n $repository['updated_on'],\n $repository['updated_by_id'],\n $repository['updated_by_name'],\n $repository['updated_by_email'],\n $repository['text_field_1'],\n $repository['varchar_field_1'],\n $repository['varchar_field_2'],\n $repository['integer_field_2'],\n $repository['text_field_2']\n );\n\n // Update project object repository\n $last_insert_id = DB::lastInsertId();\n DB::execute(\"UPDATE $project_objects_table SET type = 'ProjectSourceRepository', parent_id = ? WHERE id = ?\", $last_insert_id, $repository['id']);\n\n // Update source user links\n DB::execute(\"UPDATE $source_users_table SET repository_id = ? WHERE repository_id = ?\", $last_insert_id, $repository['id']);\n } //foreach\n } //if\n\n\n if (extension_loaded('svn')) {\n $svn_type = 'extension';\n } elseif (extension_loaded('xml') && function_exists('xml_parser_create')) {\n $svn_type = 'exec';\n } else {\n $svn_type = 'none';\n } // if\n\n // Update configuration options\n DB::execute('INSERT INTO ' . TABLE_PREFIX . 'config_options (name, module, value) VALUES (?, ?, ?), (?, ?, ?)',\n 'source_svn_type', 'source', serialize($svn_type),\n 'source_mercurial_path', 'source', serialize('/usr/bin/')\n );\n } //if\n // Delete all commits from project object\n DB::execute(\"DELETE FROM $project_objects_table WHERE type = 'Commit'\");\n\n // Delete all activity logs\n DB::execute(\"DELETE FROM $activity_logs_table WHERE type = 'RepositoryUpdateActivityLog'\");\n\n //delete unnecessary configuration options\n DB::execute(\"DELETE FROM \" . TABLE_PREFIX . \"config_options WHERE name = 'source_svn_trust_server_cert' OR name = 'source_svn_use_output_redirect'\");\n\n } catch (Exception $e) {\n return $e->getMessage();\n } //try\n\n return true;\n }", "public function resultSetMerge($oQueryProfileMgr, $result_set_key, $target_result_set_key, $merge_fields_piped, $merge_fields_distinct_val = true, $sequence_fields_piped = null, $sequence_fields_datatype_piped = null){\n\n try {\n\n $oCRNRSTN_MySQLi = $oQueryProfileMgr->return_MySQLi($result_set_key);\n\n if (is_object($oCRNRSTN_MySQLi)) {\n\n $result_handle = $oQueryProfileMgr->return_resultHandle($result_set_key);\n $batch_key = $oQueryProfileMgr->return_batchKey($result_set_key);\n\n if (isset($result_handle) && isset($batch_key) && isset($result_set_key) && isset($target_result_set_key) && isset($merge_fields_piped)) {\n\n return self::$oDB_CRNRSTN->resultSetMerge($oQueryProfileMgr, $result_handle, $batch_key, $result_set_key, $target_result_set_key, $merge_fields_piped, $merge_fields_distinct_val, $sequence_fields_piped, $sequence_fields_datatype_piped);\n\n } else {\n\n //\n // HOOOSTON...VE HAF PROBLEM!\n throw new Exception('Unable to return the requested MySQL data due to missing param(s)...result handle[' . $result_handle . '], batch key[' . $batch_key . '], result_set_key[' . $result_set_key . '], target_result_set_key[' . $target_result_set_key . '] and/or the desired merge field(s)[' . $merge_fields_piped . '].');\n\n }\n\n } else {\n\n //\n // HOOOSTON...VE HAF PROBLEM!\n throw new Exception('Unable to return the database connection associated with the result set key [' . $result_set_key . '].');\n\n }\n\n } catch (Exception $e) {\n\n $this->catchException($e, LOG_ERR, __METHOD__, __NAMESPACE__);\n\n return false;\n\n }\n\n }", "public function testMergeMassViaInsertAfter()\n {\n $this->generateAndCompareTest('MergeMassViaInsertAfter');\n }", "public function synchronize()\n\t{\n\t\t$this->initProjects();\n\t\t/** @var $dao Link */\n\t\t$dao = Dao::get(API::LINK);\n\t\t$filter1 = API::filter(get_class($this));\n\t\t$filter2 = API::filter(Projects::class);\n\t\t$filter = ($filter1 && $filter2) ? ($filter1 . ') AND (' . $filter2) : ($filter1 . $filter2);\n\t\t$query = $filter\n\t\t\t? str_replace('{filter}', 'AND (' . $filter . ')', static::IMPORT_QUERY)\n\t\t\t: str_replace('{filter}', '', static::IMPORT_QUERY);\n\t\t/** @var $redmine_issues Issue[] */\n\t\t$redmine_issues = $dao->query($query, Issue::class);\n\t\tforeach ($redmine_issues as $redmine_issue) {\n\t\t\t$this->translateIdProject($redmine_issue);\n\t\t\t$this->write($redmine_issue);\n\t\t}\n\t\treturn 'NOPE';\n\t}", "protected function mergeIntoConfig($config) {\n\t\tparent::mergeIntoConfig($config);\n\t\tif ($this->config['deletion_strategy'] == '') {\n\t\t\tthrow new Exception('Can not generate: must specify the deletion_strategy config setting (Delete|Retire|Custom).');\n\t\t}\n\t}", "public function testMerge() {\n $data1 = array(\n 'foo' => 'bar',\n 'boolean' => true,\n 'string' => 'abc',\n 'number' => 123,\n 'one'\n );\n\n $data2 = array(\n 'foo' => 'baz',\n 'boolean' => false,\n 'string' => 'xyz',\n 'number' => 456,\n 'two'\n );\n\n $this->assertEquals(array(\n 'foo' => 'baz',\n 'boolean' => false,\n 'string' => 'xyz',\n 'number' => 456,\n 'two'\n ), Hash::merge($data1, $data2));\n\n $data1['array'] = array(\n 'key' => 'value',\n 123,\n true\n );\n\n $data2['array'] = array();\n\n $this->assertEquals(array(\n 'foo' => 'baz',\n 'boolean' => false,\n 'string' => 'xyz',\n 'number' => 456,\n 'two',\n 'array' => array(\n 'key' => 'value',\n 123,\n true\n )\n ), Hash::merge($data1, $data2));\n\n $data2['array'] = array(\n 'key' => 'base',\n 'foo' => 'bar',\n 123\n );\n\n $this->assertEquals(array(\n 'foo' => 'bar',\n 'boolean' => true,\n 'string' => 'abc',\n 'number' => 123,\n 'one',\n 'array' => array(\n 'key' => 'value',\n 'foo' => 'bar',\n 123,\n true\n )\n ), Hash::merge($data2, $data1));\n\n $this->assertEquals(array(), Hash::merge());\n }", "function MergeFile($original, $edited, $cache)\n{\n /*echo \"<table><tr><td VALIGN='top' width='33%'>\" . htmlspecialchars($original) . \"</td><td VALIGN='top' width='33%'>\" . \n htmlspecialchars($edited) . \" </td><td VALIGN='top' width='33%'>\" . htmlspecialchars($cache) . \"</td></tr></table>\";\n echo \"<br><br>-----------------------------------------------------------------------------\";*/\n /* Run the merge */\n require_once 'classMerge.php';\n $merge = new ThreeWayMerge( $original, $edited, $cache, /*'lite'*/ 'full');\n \n $result = $merge->merge();\n\n if ( $result !== FALSE )\n {\n /* Check for conflicts */\n //$conflicts = ( stristr( $result, '<ips:conflict' ) ) ? 1 : 0;\n \n echo htmlspecialchars($result);\n\n $myfile = fopen(\"doclineSQL1.txt\", \"w+\") or die(\"Unable to open file!\");\n fwrite($myfile, $result);\n fclose($myfile);\n } \n else\n echo \"Fail to merge\";\n}", "public function canMergeTwoCollection()\n {\n $object0 = $this->getMock('ATM_Config_Abstract', array('getName'));\n $object1 = $this->getMock('ATM_Config_Comment', array(), array('comment'));\n $this->object->append($object0);\n $collection = new ATM_Config_Collection(array($object1, $object0));\n $this->object->merge($collection);\n $this->assertEquals($object0, $this->object[0]);\n $this->assertEquals($object1, $this->object[1]);\n $this->assertEquals($object0, $this->object[2]);\n }", "private function checkForModuleOrFunctionException():void\n {\n // check for module and function error\n if ($this->hasError()) {\n //check for bad module\n $this->moduleExceptionChecker();\n\n //check for bad function\n $this->functionExceptionChecker();\n }\n }", "function privMerge(&$p_archive_to_add)\n {\n $v_result=1;\n\n // ----- Look if the archive_to_add exists\n if (!is_file($p_archive_to_add->zipname))\n {\n\n // ----- Nothing to merge, so merge is a success\n $v_result = 1;\n\n // ----- Return\n return $v_result;\n }\n\n // ----- Look if the archive exists\n if (!is_file($this->zipname))\n {\n\n // ----- Do a duplicate\n $v_result = $this->privDuplicate($p_archive_to_add->zipname);\n\n // ----- Return\n return $v_result;\n }\n\n // ----- Open the zip file\n if (($v_result=$this->privOpenFd('rb')) != 1)\n {\n // ----- Return\n return $v_result;\n }\n\n // ----- Read the central directory informations\n $v_central_dir = array();\n if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)\n {\n $this->privCloseFd();\n return $v_result;\n }\n\n // ----- Go to beginning of File\n @rewind($this->zip_fd);\n\n // ----- Open the archive_to_add file\n if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)\n {\n $this->privCloseFd();\n\n // ----- Return\n return $v_result;\n }\n\n // ----- Read the central directory informations\n $v_central_dir_to_add = array();\n if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)\n {\n $this->privCloseFd();\n $p_archive_to_add->privCloseFd();\n\n return $v_result;\n }\n\n // ----- Go to beginning of File\n @rewind($p_archive_to_add->zip_fd);\n\n // ----- Creates a temporay file\n $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';\n\n // ----- Open the temporary file in write mode\n if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)\n {\n $this->privCloseFd();\n $p_archive_to_add->privCloseFd();\n\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \\''.$v_zip_temp_name.'\\' in binary write mode');\n\n // ----- Return\n return PclZip::errorCode();\n }\n\n // ----- Copy the files from the archive to the temporary file\n // TBC : Here I should better append the file and go back to erase the central dir\n $v_size = $v_central_dir['offset'];\n while ($v_size != 0)\n {\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\n $v_buffer = fread($this->zip_fd, $v_read_size);\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\n $v_size -= $v_read_size;\n }\n\n // ----- Copy the files from the archive_to_add into the temporary file\n $v_size = $v_central_dir_to_add['offset'];\n while ($v_size != 0)\n {\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\n $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\n $v_size -= $v_read_size;\n }\n\n // ----- Store the offset of the central dir\n $v_offset = @ftell($v_zip_temp_fd);\n\n // ----- Copy the block of file headers from the old archive\n $v_size = $v_central_dir['size'];\n while ($v_size != 0)\n {\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\n $v_buffer = @fread($this->zip_fd, $v_read_size);\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\n $v_size -= $v_read_size;\n }\n\n // ----- Copy the block of file headers from the archive_to_add\n $v_size = $v_central_dir_to_add['size'];\n while ($v_size != 0)\n {\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\n $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\n $v_size -= $v_read_size;\n }\n\n // ----- Merge the file comments\n $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];\n\n // ----- Calculate the size of the (new) central header\n $v_size = @ftell($v_zip_temp_fd)-$v_offset;\n\n // ----- Swap the file descriptor\n // Here is a trick : I swap the temporary fd with the zip fd, in order to use\n // the following methods on the temporary fil and not the real archive fd\n $v_swap = $this->zip_fd;\n $this->zip_fd = $v_zip_temp_fd;\n $v_zip_temp_fd = $v_swap;\n\n // ----- Create the central dir footer\n if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)\n {\n $this->privCloseFd();\n $p_archive_to_add->privCloseFd();\n @fclose($v_zip_temp_fd);\n $this->zip_fd = null;\n\n // ----- Reset the file list\n unset($v_header_list);\n\n // ----- Return\n return $v_result;\n }\n\n // ----- Swap back the file descriptor\n $v_swap = $this->zip_fd;\n $this->zip_fd = $v_zip_temp_fd;\n $v_zip_temp_fd = $v_swap;\n\n // ----- Close\n $this->privCloseFd();\n $p_archive_to_add->privCloseFd();\n\n // ----- Close the temporary file\n @fclose($v_zip_temp_fd);\n\n // ----- Delete the zip file\n // TBC : I should test the result ...\n @unlink($this->zipname);\n\n // ----- Rename the temporary file\n // TBC : I should test the result ...\n //@rename($v_zip_temp_name, $this->zipname);\n PclZipUtilRename($v_zip_temp_name, $this->zipname);\n\n // ----- Return\n return $v_result;\n }", "public function merge($incoming)\n {\n }", "public function resolveToSource() {\r\n\t\tif($this->status == self::CONFLICT && $this->numFiles == 2) {\r\n\t\t\t$this->status = self::OUTDATED;\r\n\t\t\t$this->from = &$this->target;\r\n\t\t\t$this->to = &$this->source;\r\n\t\t\t$this->direction = 2;\r\n\t\t}\r\n\t}", "abstract public function import(): bool;", "public function merge_group($content_type_id, $old_group_id, $new_group_id)\r\n {\r\n $message = 'Index controller must be use';\r\n vBSphinxSearch_Core::log_errors($message);\r\n return false;\r\n }", "public function hasConflicts() {\n if(!isset($this->hasConflicts)) {\n $repo = Repo::getById($this->repoId);\n $clone = $repo->getCloneRepo();\n $currentBranch = $clone->getActiveBranch();\n $conflicts = false;\n\n // First download the main repository references in the cloned repository\n $clone->fetch();\n\n // First update the two branches on the clone repository\n $clone->checkout($this->to);\n $clone->pull();\n\n $clone->fetch();\n $clone->checkout($this->from);\n $clone->pull();\n\n if($currentBranch !== $this->to) {\n $clone->checkout($this->to);\n }\n\n try {\n $clone->run('merge --no-commit --no-ff ' . $this->from);\n }\n catch(GitException $e) {\n $conflicts = true;\n }\n\n try {\n $clone->run('merge --abort');\n }\n catch(GitException $e) {}\n\n if($currentBranch !== $this->to) {\n $clone->checkout($currentBranch);\n }\n\n\n $this->hasConflicts = $conflicts;\n }\n\n return $this->hasConflicts;\n }", "public function merge($filename, array $serializationFiles) {\n\t\tthrow new Exception(\"merge operation makes no sense for this analyzer\");\n\t}", "protected function _loadState()\n {\n throw new Horde_ActiveSync_Exception('Must be implemented in concrete class.');\n }", "public function merge($result_to_merge){\n \t// If result to merge is valid do nothing - everything is ok with it, there is no messages\n if($result_to_merge->is_valid()) return;\n\n // Set current result is valid flag.\n $this->set_valid($result_to_merge->is_valid());\n\n // Append messages from result to merge\n $this->messages = $this->messages + $result_to_merge->get_messages();\n }", "protected function _havePIMChanges()\n {\n throw new Horde_ActiveSync_Exception('Must be implemented in concrete class.');\n }", "private static function fail2()\n {\n throw new \\Exception('Thrown from fail2()');\n }", "public function doMergeStatus()\n {\n $result = new ezcMvcResult();\n $result->variables += mmApp::doMergeStatus( $this->mergeHash );\n return $result;\n }", "public function testUpdateConflict() {\n\t\tself::$sag->put(\"foo\", self::$temp);\n\t}", "public function merge(...$sources): self;", "public function buildMergeDev($opts = ['no-composer' => false, 'quick' => false, 'super-quick' => false]) {\n $this->stopOnFail(true);\n\n $foundBranch = $this->getCurrentGitBranch();\n if ($foundBranch != 'dirty') {\n throw new \\Robo\\Exception\\TaskException(__CLASS__, \"You must be on the branch 'dirty'. Branch found: ${foundBranch}\");\n }\n\n $coll = $this->collectionBuilder();\n if (!$opts['no-composer']) {\n $coll->taskComposerUpdate()\n ->rawArg('partridge/utils') // makes sure composer.lock has latest proper utils and tests\n // ->rawArg('partridge/testing') // does not matter if out of sync\n ->printOutput(true)\n ;\n }\n if (is_callable([$this, 'doBuildMergeDev'])) {\n $coll->addCode(function () use ($opts) {\n $this->doBuildMergeDev($opts);\n });\n }\n\n if (!$opts['super-quick']) {\n if ($opts['quick']) {\n $coll->addCode(function () {\n $this->testQuick();\n });\n } else {\n $coll->addCode(function () {\n $this->testAll();\n });\n }\n }\n\n // $result = $this->taskUtilsSemVer('.semver')\n // ->increment('patch')\n // ->run()\n // ;\n // if (!$result->wasSuccessful()) {\n // throw new \\Robo\\Exception\\TaskException(__CLASS__ee, \"Bad semver file\");\n // }\n\n return $coll\n ->taskUtilsSemVer('.semver')\n ->increment('patch')\n ->taskGitStack()\n ->stopOnFail(true)\n ->add('.semver')\n ->add('.semver.plain')\n ->add('composer.lock')\n ->commit('Bumps .semver')\n ->push()\n ->checkout('dev')\n ->merge('dirty -m=\"merge branch dirty into dev\"')\n ->push()\n ->checkout('dirty')\n ->run()\n ;\n }", "public function lint(MergeRequest $request): array\n {\n }", "public function lint(MergeRequest $request): array\n {\n }", "public function it_merges_in_combine_mode() {\n self::merge(self::CONFIG_BASIC, self::CONFIG_MERGE, PasswdPolicy::MODE_COMBINE)->shouldReturn(self::CONFIG_MERGED);\n }", "public function testAfterSaveWithNoSuchEntityException()\n {\n $customerGroupId = 1;\n $customerGroup = $this->getMockBuilder(\\Magento\\Customer\\Api\\Data\\GroupInterface::class)\n ->disableOriginalConstructor()\n ->getMockForAbstractClass();\n $customerGroup->expects($this->atLeastOnce())->method('getId')->willReturn($customerGroupId);\n $phrase = new \\Magento\\Framework\\Phrase('exception');\n $exception = new \\Magento\\Framework\\Exception\\NoSuchEntityException($phrase);\n $this->sharedCatalogLocator->expects($this->atLeastOnce())->method('getSharedCatalogByCustomerGroup')\n ->with($customerGroupId)->willThrowException($exception);\n $groupRepository = $this->getMockBuilder(\\Magento\\Customer\\Api\\GroupRepositoryInterface::class)\n ->disableOriginalConstructor()\n ->getMockForAbstractClass();\n\n $this->updateSharedCatalogNamePlugin->afterSave($groupRepository, $customerGroup);\n }", "function test_import_base()\n\t{\n\t\t$testLib = 'joomla._testdata.loader-data';\n\t\t$this -> assertFalse(defined('JUNIT_DATA_JLOADER'), 'Test set up failure.');\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\tif ($this -> assertTrue($r)) {\n\t\t\t$this -> assertTrue(defined('JUNIT_DATA_JLOADER'));\n\t\t}\n\n\t\t// retry\n\t\t$r = JLoader::import($testLib, dirname(__FILE__));\n\t\t$this->assertTrue($r);\n\t}", "protected static function MergeLogs()\n {\n }", "private function mergeAccount($userId, $data)\n {\n $updatedFields = [\n 'display_name' => $data->displayName,\n 'password' => bcrypt($data->password),\n ];\n\n $updatedUser = $this->userRepository->updateUser($updatedFields, $userId);\n\n if ($updatedUser) {\n $updatedUser->providers()->sync([1], false);\n throw new SeException('We have merged your account.', 200);\n } else {\n throw new SeException('Database Problem', 500, 50001);\n }\n }", "private function __clone()\n {\n //this should never be cloned\n throw new Exception('No cloning permitted!');\n }", "public function __clone()\n {\n throw new Exception(\"El archivo solicitado no permite la clonacion, intente nuevamente.\");\n }", "public function testMergeParams()\n {\n $instance = $this->getMockForTrait(DuplicationComponent::class);\n $reflex = new \\ReflectionClass($instance);\n\n $mergeParam = $reflex->getMethod('mergeParam');\n $mergeParam->setAccessible(true);\n\n $result = $mergeParam->invoke(\n $instance,\n ['hello'=>'world', 'hella' => 'warld'],\n ['hello' => 'torvald'],\n false\n );\n $this->getTestCase()->assertEquals(['hello'=>'torvald', 'hella' => 'warld'], $result);\n\n $result = $mergeParam->invoke(\n $instance,\n ['hello'=>'world', 'hella' => 'warld'],\n ['hello' => 'torvald'],\n true\n );\n $this->getTestCase()->assertEquals(['hello' => 'torvald'], $result);\n }", "function edithistory_merge()\n{\n\tglobal $db, $mybb, $source_user, $destination_user;\n\n\t$uid = array(\n\t\t\"uid\" => $destination_user['uid']\n\t);\t\n\t$db->update_query(\"edithistory\", $uid, \"uid='{$source_user['uid']}'\");\n}", "private function __clone() {\n throw new Exception('No se puede clonar');\n }", "function apiErrorResponse(string $message = null, array $data = [], bool $merge_data = false)\n{\n if ($data !== [] && $merge_data) {\n $toMerge = ['details' => $data];\n } else if ($data !== [] && SYSTEM_CONFIG['development_mode']) {\n $toMerge = ['dev_details' => $data];\n }\n $message = (!empty($message)) ? $message : null;\n if (SYSTEM_CONFIG['development_mode']) {\n $toMerge['DEVELOPMENT_MODE'] = true;\n }\n echo json_encode(array_merge([\n 'status' => 'error',\n 'message' => $message ?? __('Something went wrong, please try again later.')\n ], $toMerge));\n}", "public function testOverwriteExistingImport()\n {\n $existinggroup = new Group();\n $existinggroup->Title = 'Old Group Title';\n $existinggroup->Code = 'newgroup1';\n $existinggroup->write();\n\n $loader = new GroupCsvBulkLoader();\n $results = $loader->load(__DIR__ . '/GroupCsvBulkLoaderTest/GroupCsvBulkLoaderTest.csv');\n\n $created = $results->Created()->toArray();\n $this->assertEquals(1, count($created));\n $this->assertEquals('newchildgroup1', $created[0]->Code);\n $this->assertEquals('New Child Group 1', $created[0]->Title);\n\n // This overrides the group because the code matches, which takes precedence over the ID.\n $updated = $results->Updated()->toArray();\n $this->assertEquals(1, count($updated));\n $this->assertEquals('newgroup1', $updated[0]->Code);\n $this->assertEquals('New Group 1', $updated[0]->Title);\n }", "public function modify()\r\n\t{\r\n\t\tthrow new Exception('modify() has been disabled');\r\n\t}", "public function mergeDependencies()\n {\n $this->dependencies = array_merge($this->dependencies, $this->commonDependencies);\n }", "public function testException() {\n $lockedOperation = new LockedOperation(new ExceptionLockHandler());\n $lockable = new MyLockable();\n $op = function() {\n return TRUE;\n };\n\n $result = FALSE;\n\n try {\n $result = $lockedOperation->execute($op, $lockable);\n }\n catch(\\LockMan\\Exception\\LockReleaseException $e) {\n $result = $e->getResult();\n }\n\n $this->assertTrue($result);\n }", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "function module_builder_handle_sanity_exception($e) {\n $failed_sanity_level = $e->getFailedSanityLevel();\n switch ($failed_sanity_level) {\n case 'data_directory_exists':\n $message = \"The component data directory could not be created or is not writable.\";\n break;\n case 'component_data_processed':\n $message = \"No component data was found. Run 'drush mb-download' to process component data from documentation files.\";\n break;\n }\n drush_set_error(DRUSH_APPLICATION_ERROR, $message);\n}", "function updateSourceBranching() {\n if ($this->isModuleInstalled('source')) {\n try {\n $source_commits_table = TABLE_PREFIX . 'source_commits';\n $commit_project_objects_table = TABLE_PREFIX . 'commit_project_objects';\n $source_repositories_table = TABLE_PREFIX . 'source_repositories';\n\n DB::execute(\"ALTER TABLE $source_commits_table ADD branch_name VARCHAR(255) DEFAULT '' AFTER commited_by_email\");\n DB::execute(\"ALTER TABLE $commit_project_objects_table ADD branch_name VARCHAR(255) DEFAULT '' AFTER revision\");\n\n // Add default branch for existing data\n\n DB::execute(\"UPDATE $source_commits_table SET branch_name = 'master' WHERE type = 'GitCommit'\");\n DB::execute(\"UPDATE $source_commits_table SET branch_name = 'default' WHERE type = 'MercurialCommit'\");\n\n $commit_project_objects = DB::execute(\"\n SELECT $commit_project_objects_table.id, $source_repositories_table.type\n FROM $commit_project_objects_table, $source_repositories_table\n WHERE $commit_project_objects_table.repository_id = $source_repositories_table.id\"\n );\n\n if (is_foreachable($commit_project_objects)) {\n foreach ($commit_project_objects as $commit_project_object) {\n if ($commit_project_object['type'] == 'GitRepository') {\n DB::execute(\"UPDATE $commit_project_objects_table SET branch_name = 'master' WHERE id = ?\", $commit_project_object['id']);\n } //if\n if ($commit_project_object['type'] == 'MercurialRepository') {\n DB::execute(\"UPDATE $commit_project_objects_table SET branch_name = 'default' WHERE id = ?\", $commit_project_object['id']);\n } //if\n } //foreach\n } //if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('default_source_branch', 'source', 'N;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n } //if\n return true;\n }", "public function testConfigMergeComplexObjects()\n {\n $this->specify(\n \"Config objects does not merged properly\",\n function () {\n $config1 = new PhConfig([\n 'controllersDir' => '../x/y/z',\n 'modelsDir' => '../x/y/z',\n 'database' => [\n 'adapter' => 'Mysql',\n 'host' => 'localhost',\n 'username' => 'scott',\n 'password' => 'cheetah',\n 'name' => 'test_db',\n 'charset' => [\n 'primary' => 'utf8'\n ],\n 'alternatives' => [\n 'primary' => 'latin1',\n 'second' => 'latin1'\n ]\n ],\n ]);\n\n $config2 = new PhConfig([\n 'modelsDir' => '../x/y/z',\n 'database' => [\n 'adapter' => 'Postgresql',\n 'host' => 'localhost',\n 'username' => 'peter',\n 'options' => [\n 'case' => 'lower',\n \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n ],\n 'alternatives' => [\n 'primary' => 'swedish',\n 'third' => 'american',\n ],\n ],\n ]);\n\n $config1->merge($config2);\n\n $expected = PhConfig::__set_state([\n 'controllersDir' => '../x/y/z',\n 'modelsDir' => '../x/y/z',\n 'database' => PhConfig::__set_state([\n 'adapter' => 'Postgresql',\n 'host' => 'localhost',\n 'username' => 'peter',\n 'password' => 'cheetah',\n 'name' => 'test_db',\n 'charset' => PhConfig::__set_state([\n 'primary' => 'utf8',\n ]),\n 'alternatives' => PhConfig::__set_state([\n 'primary' => 'swedish',\n 'second' => 'latin1',\n 'third' => 'american',\n ]),\n 'options' => PhConfig::__set_state([\n 'case' => 'lower',\n (string) \\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n ]),\n ]),\n ]);\n\n expect($config1)->equals($expected);\n }\n );\n }", "public function checkImportPrerequisites() {}", "function run($argc, $argv)\n{\n\t// Remove the full path of m23cli.php\n\tarray_shift($argv);\n\n\t// Remove the name of this command file\n\tarray_shift($argv);\n\n\t// Merge type\n\t$mergeType = array_shift($argv);\n\n\t// Check, if the merge type is valid\n\tif (('a' != $mergeType) && ('o' != $mergeType))\n\t\tdie('ERROR: Wrong mergy type (\"a\" or \"o\" allowed)');\n\n\t// The left parameters are the files to merge\n\t$filesToMerge = $argv;\n\n\tif ('o' == $mergeType)\n\t{\n\t\tsystem('sort -u '.implode(' ', $filesToMerge));\n\t\texit(0);\n\t}\n\t\n\t$fileAmount = count($filesToMerge);\n\n\t// Generate unique file names for (sorted) temporary input files and the output files\n\t$outTempFile = uniqid ('/tmp/mergeListsTemp');\n\t$outTempFile2 = uniqid ('/tmp/mergeListsTemp2');\n\t$inTempFile = uniqid ('/tmp/mergeListsTempIn');\n\t$inTempFile2 = uniqid ('/tmp/mergeListsTempIn2');\n\n\t// If there is only one input file, give it out directly\n\tif (1 == $fileAmount)\n\t{\n\t\techo(file_get_contents($filesToMerge[0]));\n\t}\n\telseif (2 == $fileAmount)\n\t{\n\t\tsystem(\"sort \\\"$filesToMerge[0]\\\" > $inTempFile; sort \\\"$filesToMerge[1]\\\" > $inTempFile2; comm -1 -2 $inTempFile $inTempFile2\");\n\t}\n\telse\n\t{\n\t\t// Run thru the files to merge\n\t\tfor ($i = 1; $i < $fileAmount; $i++)\n\t\t{\n\t\t\t// The first two files can be sorted and merged with each other\n\t\t\tif (1 == $i)\n\t\t\t{\n\t\t\t\texec(\"sort \\\"$filesToMerge[0]\\\" > $inTempFile; sort \\\"$filesToMerge[1]\\\" > $inTempFile2; comm -1 -2 $inTempFile $inTempFile2 > $outTempFile\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The next files are merged with the already merged file\n\t\t\t\texec(\"sort \\\"\".$filesToMerge[$i].\"\\\" > $inTempFile; comm -1 -2 $outTempFile $inTempFile > $outTempFile2; mv $outTempFile2 $outTempFile\");\n\t\t\t}\n\t\t}\n\n\t\t// Show the merged file\n\t\techo(file_get_contents($outTempFile));\n\t}\n\n\t// Clean up\n\t@unlink($outTempFile);\n\t@unlink($outTempFile2);\n\t@unlink($inTempFile);\n\t@unlink($inTempFile2);\n\n\texit(0);\n}", "private function createNotWritableException()\n {\n throw new RuntimeException(sprintf(\n 'The entities of type \"%s\" cannot be written to its repository.',\n $this->getEntityServiceName()\n ));\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "public function doMergeActiveStatus()\n {\n $result = new ezcMvcResult();\n\n $session = ezcPersistentSessionInstance::get();\n $q = $session->createFindQuery( 'mmMergeOperation' );\n $q->where( $q->expr->in( 'status', mmMergeOperation::STATUS_RUNNING ) )\n ->limit( 1 );\n $operations = $session->find( $q, 'mmMergeOperation' );\n if ( count( $operations ) == 0 )\n {\n $result->variables = array( 'result' => 'ok', 'message' => 'no-operation' );\n }\n else\n {\n $operation = array_pop( $operations );\n $result->variables += mmApp::doMergeStatus( $operation->hash );\n }\n\n return $result;\n }", "public function testMerge()\n {\n $this->assertTrue(array_merge([1]) === [1]);\n // flush numeric keys\n $this->assertTrue(array_merge([1 => 1]) === [1]);\n // stay assoc keys\n $this->assertTrue(array_merge(['k' => 'v']) === ['k' => 'v']);\n $this->assertTrue(array_merge([1], [2]) === [1, 2]);\n $this->assertTrue(array_merge(['x'], ['y'], ['z']) === ['x', 'y', 'z']);\n // flush numeric keys\n $this->assertTrue(\n array_merge([1 => 'a'], [2 => 'b'], [3 => 'c']) === ['a', 'b', 'c']\n );\n\n // on double key - use last pair key-value\n $this->assertTrue(\n array_merge(['a' => 1], ['a' => 3], ['a' => 2]) === ['a' => 2]\n );\n\n // stay first key sequence\n $this->assertTrue(\n array_merge([1, 2, 3, 'a' => 4], [1, 2, 7, 'b' => 8], ['a' => 'x', 'b' => 'y']) === [1, 2, 3, 'a' => 'x', 1, 2, 7, 'b' => 'y']\n );\n }", "protected function preventModification()\n {\n if (isset($this->arrConfig['operator']) || isset($this->arrConfig['value'])) {\n throw new \\BadMethodCallException('Filter is already configured.');\n }\n }", "public function it_merges_in_minimum_mode() {\n self::merge(self::CONFIG_BASIC, self::CONFIG_MERGE, PasswdPolicy::MODE_MINIMIM)->shouldReturn(self::CONFIG_BASIC);\n }", "public function merge($branch) {\n\t\t\treturn $this->run(\"merge $branch --no-ff\");\n\t\t}", "public function testErrorOnBelowMinimum()\n {\n $importer = new Importer(1);\n $result = $importer->startImport();\n\n $this->assertEquals($result->result, false);\n }", "function drush_default_content_deploy_import() {\n $force_update = drush_get_option('force-update');\n $force_override = drush_get_option('force-override');\n $preserve_password = drush_get_option('preserve-password');\n\n $yes_option = drush_get_option('y');\n /** @var \\Drupal\\default_content_deploy\\Importer $importer */\n $importer = \\Drupal::service('default_content_deploy.importer');\n\n // Perform read only update.\n $result_info = $importer->deployContent($force_update, $force_override, $preserve_password, FALSE);\n\n drush_print(dt('@count entities will be processed.', ['@count' => $result_info['processed']]));\n drush_print(dt('- created: @count', ['@count' => $result_info['created']]));\n drush_print(dt('- updated: @count', ['@count' => $result_info['updated']]));\n drush_print(dt('- skipped: @count', ['@count' => $result_info['skipped']]));\n drush_print(dt('Missing files to create: @count', ['@count' => $result_info['file_created']]));\n $entities_todo = $result_info['created'] + $result_info['updated'] + $result_info['file_created'];\n if ($entities_todo == 0) {\n drush_print(dt('Nothing to do.'));\n return FALSE;\n }\n $yes_option = $yes_option ? $yes_option : drush_confirm(dt('Do you really want to continue?'));\n if (!$yes_option) {\n return drush_user_abort();\n }\n // Perform update.\n $result_info = $importer->deployContent($force_update, $force_override, $preserve_password, TRUE);\n\n $import_status = $importer->importUrlAliases();\n\n // Display results.\n drush_log(dt('@count entities have been processed.', ['@count' => $result_info['processed']]), 'success');\n drush_print(dt('- created: @count', ['@count' => $result_info['created']]));\n drush_print(dt('- updated: @count', ['@count' => $result_info['updated']]));\n drush_print(dt('- skipped: @count', ['@count' => $result_info['skipped']]));\n drush_print(dt('Missing files created: @count', ['@count' => $result_info['file_created']]));\n\n drush_log(dt('Imported @count aliases.', ['@count' => $import_status['imported']]), 'success');\n drush_log(dt('Skipped @skipped aliases.', ['@skipped' => $import_status['skipped']]), 'success');\n\n return FALSE;\n}", "function merge($item, $html = true) {\n global $DB;\n\n $ID = $this->getField('id');\n\n if ($html) {\n echo \"<div class='center'>\";\n echo \"<table class='tab_cadrehov'><tr><th>\".__('Merging').\"</th></tr>\";\n echo \"<tr class='tab_bg_2'><td>\";\n Html::createProgressBar(__('Work in progress...'));\n echo \"</td></tr></table></div>\\n\";\n }\n\n $item = array_keys($item);\n\n // Search for software version\n $req = $DB->request(\"glpi_softwareversions\", [\"softwares_id\" => $item]);\n $i = 0;\n\n if ($nb = $req->numrows()) {\n foreach ($req as $from) {\n $found = false;\n\n foreach ($DB->request(\"glpi_softwareversions\",\n [\"softwares_id\" => $ID,\n \"name\" => $from[\"name\"]]) as $dest) {\n // Update version ID on License\n $DB->update(\n 'glpi_softwarelicenses', [\n 'softwareversions_id_buy' => $dest['id']\n ], [\n 'softwareversions_id_buy' => $from['id']\n ]\n );\n\n $DB->update(\n 'glpi_softwarelicenses', [\n 'softwareversions_id_use' => $dest['id']\n ], [\n 'softwareversions_id_use' => $from['id']\n ]\n );\n\n // Move installation to existing version in destination software\n $found = $DB->update(\n 'glpi_items_softwareversions', [\n 'softwareversions_id' => $dest['id']\n ], [\n 'softwareversions_id' => $from['id']\n ]\n );\n }\n\n if ($found) {\n // Installation has be moved, delete the source version\n $DB->delete(\n 'glpi_softwareversions', [\n 'id' => $from['id']\n ]\n );\n } else {\n // Move version to destination software\n $result = $DB->update(\n 'glpi_softwareversions', [\n 'softwares_id' => $ID,\n 'entities_id' => $this->getField('entities_id')\n ], [\n 'id' => $from['id']\n ]\n );\n }\n\n if ($result) {\n $i++;\n }\n if ($html) {\n Html::changeProgressBarPosition($i, $nb+1);\n }\n }\n }\n\n // Move software license\n $result = $DB->update(\n 'glpi_softwarelicenses', [\n 'softwares_id' => $ID\n ], [\n 'softwares_id' => $item\n ]\n );\n\n if ($result) {\n $i++;\n }\n\n if ($i == ($nb+1)) {\n //error_log (\"All merge operations ok.\");\n $soft = new self();\n foreach ($item as $old) {\n $soft->putInTrash($old, __('Software deleted after merging'));\n }\n }\n if ($html) {\n Html::changeProgressBarPosition($i, $nb+1, __('Task completed.'));\n }\n return $i == ($nb+1);\n }", "abstract protected function _merge(Celsus_Model $local, Celsus_Model $facebookData);", "function savePage($pageName, $newPageBody, $originalPageBody)\n{\n $newPageBody = str_replace(\"\\r\", \"\", $newPageBody);\n $originalPageBody = str_replace(\"\\r\", \"\", $originalPageBody);\n\n $sFile = getPagePath($pageName);\n\n if (trim($newPageBody) == \"\") {\n unlink($sFile);\n return;\n }\n\n if (USE_MERGE) {\n $newBodyPath = tempFile($newPageBody);\n $originalBodyPath = tempFile($originalPageBody);\n // Clen up CRLF into LF to allow proper merge\n if (file_exists($sFile)) {\n $tmpFilePath = tempFile(str_replace(\"\\r\", \"\", file_get_contents($sFile)));\n }\n else {\n $tmpFilePath = tempFile(\"\");\n }\n\n system(\"set -x; merge \" . $tmpFilePath . \" \"\n . $originalBodyPath . \" \" . $newBodyPath,\n &$result);\n if ($result > 0) {\n\n # replace conflict markers\n $f = fopen($tmpFilePath, \"rt\");\n $s = fread($f, filesize($tmpFilePath)+1);\n fclose($f);\n\n $s = ereg_replace(\"<<<<<<<[^\\n]*\", '<blink style=\"color: red\">CONFLICT</blink>', $s);\n $s = ereg_replace(\">>>>>>>[^\\n]*\", '<blink style=\"color: red\">END</blink>', $s);\n\n $f = fopen($sFile, \"wt\");\n fwrite($f, $s);\n }\n else {\n copy($tmpFilePath, $sFile);\n }\n\n unlink($originalBodyPath);\n unlink($newBodyPath);\n unlink($tmpFilePath);\n }\n else {\n # just overwrite file, last writer wins\n if($newPageBody != \"\")\n {\n $f = fopen($sFile, \"wt\");\n fwrite($f, $newPageBody);\n fclose($f);\n }\n else\n {\n @unlink($sFile);\n }\n }\n}", "function sortedMergeV2($large, $small) {\n\n}", "public function testLibraryBuildFailWithWrongConfigData(): void\r\n {\r\n $serviceLibrary = new ServiceLibrary(new ArrayParser());\r\n $this->expectExceptionCode(Error::ERROR_JSON_ENCODE_OR_DECODE->getCode());\r\n $serviceLibrary->build(NAN);\r\n }", "public function testCannotCollateUnsavedGroupFamilyIds()\n {\n $this->expectException(\\InvalidArgumentException::class);\n $this->expectExceptionMessage('Cannot call collateFamilyIDs on unsaved Group.');\n $group = new Group;\n $group->collateFamilyIDs();\n }", "public function resolveToTarget() {\r\n\t\tif($this->status == self::CONFLICT && $this->numFiles == 2) {\r\n\t\t\t$this->status = self::OUTDATED;\r\n\t\t\t$this->from = &$this->source;\r\n\t\t\t$this->to = &$this->target;\r\n\t\t\t$this->direction = 1;\r\n\t\t}\r\n\t}", "public function testBuildException()\n {\n $this->ccDataBuilder->build([]);\n }", "function do_clone_or_pull($key, $url, $path, $operation) {\n // Already a git repo there. Do a pull.\n if ((is_dir($path)) && (file_exists($path . \"/.git\"))) {\n\tif($operation==\"TAG\"){\n\t\treturn do_fetch($key,$url,$path);\n\t}\n\telse{\n\t\treturn do_pull($key,$url,$path);\n\t}\n }\n \n // Try a clone\n $out = do_clone($key,$url,$path);\n if (!is_dir($path)) {\n $out .= \"\\nClone appeared to fail.\\n\";\n }\n return $out;\n}", "public function loadExtendedInfo()\n {\n return $this->fm->returnOrThrowException('Related sets do not support extended information.');\n }", "public function testModerationByCompanyException(): void\n {\n static::expectException(UnauthorizedModerationAction::class);\n $this->moderationService->moderateByCompany(1, 'wrong');\n }", "public function testRevertFailPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n }, function(Pointer $pointer){\n throw new Operation\\Exception('Reversion failed');\n });\n $patch->addOperation($op);\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n throw new Operation\\Exception('Forced Reversion');\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n $patch->apply($target);\n }" ]
[ "0.65696573", "0.6101994", "0.6071193", "0.5654358", "0.56248826", "0.558469", "0.5342923", "0.5323836", "0.5303574", "0.5288292", "0.5269426", "0.5192787", "0.5181214", "0.5146717", "0.51464766", "0.5107453", "0.50885653", "0.5087648", "0.505632", "0.50507", "0.50394744", "0.5021528", "0.5013174", "0.50129837", "0.5003584", "0.5001053", "0.49996674", "0.49928725", "0.4969031", "0.49635273", "0.49515107", "0.4943088", "0.49400088", "0.49058047", "0.4897443", "0.4886084", "0.48503885", "0.482353", "0.48187706", "0.4815198", "0.48076072", "0.48032597", "0.47994363", "0.47780386", "0.47402826", "0.47319806", "0.4722151", "0.47127312", "0.46928892", "0.4689864", "0.46847206", "0.4669643", "0.4655985", "0.46500885", "0.46454346", "0.4641974", "0.4613284", "0.4613284", "0.4612155", "0.4608413", "0.46072468", "0.459904", "0.45970154", "0.4595788", "0.4594983", "0.45863506", "0.45801708", "0.45722353", "0.45684764", "0.45629454", "0.4558193", "0.45572504", "0.45563138", "0.45505238", "0.45505238", "0.45483825", "0.45471615", "0.45398927", "0.45229664", "0.45222825", "0.4504079", "0.45040023", "0.45020813", "0.44908983", "0.44842783", "0.44840297", "0.44792122", "0.4475914", "0.44711348", "0.4469722", "0.44638354", "0.44578493", "0.44539496", "0.4453251", "0.44400054", "0.44393513", "0.44383094", "0.4430193", "0.44245178", "0.44204372", "0.44135812" ]
0.0
-1
Renders the container for the pagination. The %pages% placeholder will be replaced by the rendering of pages.
public function container(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n if (!$this->hasPages()) {\n return '';\n }\n\n $data = [\n 'current' => $this->paginator->currentPage(),\n 'previous' => $this->getPrevious(),\n 'links' => $this->getLinks(),\n 'next' => $this->getNext()\n ];\n\n $theme = Config::get('blade-pagination.theme', 'bootstrap');\n\n return $this->renderTheme($theme, $data);\n }", "public function render()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$pagination = $this->template['wrapper_start'];\n\t\t$pagination .= $this->prev_link(Lang::get('pagination.previous'));\n\t\t$pagination .= $this->page_links();\n\t\t$pagination .= $this->next_link(Lang::get('pagination.next'));\n\t\t$pagination .= $this->template['wrapper_end'];\n\n\t\treturn $pagination;\n\t}", "public function render()\n {\n if ($this->hasPages())\n {\n return sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "public function render()\n {\n if ($this->hasPages()) {\n return sprintf(\n '<ul class=\"pagination\">%s %s</ul>',\n $this->getPreviousButton(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "public function render()\n {\n if ($this->hasPages()) {\n return new HtmlString(sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n ));\n }\n\n return '';\n }", "protected function _renderPaginationStart()\n {\n return '<div id=\"ZVHPContainer\"><ul id=\"ZVHPList\">';\n }", "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 }", "public function render() {\r\n\t\t// be able to create a sliding page window. If we have less than that, we\r\n\t\t// will just render a simple range of page links insteadof the sliding.\r\n\t\t/*------------------------------------------------\r\n\t\t| >>beststrelok<<\r\n\t\t------------------------------------------------*/\r\n\t\t// https://gist.github.com/beststrelok/17a6328d75da5492860d/revisions\r\n\t\t// http://laravel.com/docs/4.2/pagination#custom-presenters\r\n\t\t/*----------------------------------------------*/\r\n\t\tif ($this->lastPage < 7)\r\n\t\t{\r\n\t\t\t$content = $this->getPageRange(1, $this->lastPage);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$content = $this->getPageSlider();\r\n\t\t}\r\n\r\n\t\treturn $content;\r\n\t}", "public function show()\n {\n $html = '<div class=\"page_selector\">';\n\n $startPage = $this->currentPage - 5;\n $startPage > 1 ? $html .= '<span><a href=\"' . $this->generateUrl(1) . '\">1</a></span><span class=\"more_page\">...</span>'\n : $startPage = 1;\n for ($i = $startPage; $i < $this->currentPage; $i++) {\n $html .= '<span><a href=\"' . $this->generateUrl($i) . '\">' . $i . '</a></span>';\n }\n\n $html .= '<span><div class=\"current_page\">' . $this->currentPage . '</div></span>';\n\n $endPage = $this->currentPage + 5;\n $endPage < $this->totalPage ? '' : $endPage = $this->totalPage;\n for ($i = $this->currentPage + 1; $i <= $endPage; $i++) {\n $html .= '<span><a href=\"' . $this->generateUrl($i) . '\">' . $i . '</a></span>';\n }\n $endPage != $this->totalPage ? $html .= '<span class=\"more_page\">...</span><span><a href=\"' . $this->generateUrl($this->totalPage)\n . '\">' . $this->totalPage . '</a></span>' : '';\n\n return $html . '<span><div class=\"total_page\">total ' . $this->totalPage . ' page</div></span></div>';\n }", "function pagination(){}", "public function render()\n {\n // The hard-coded thirteen represents the minimum number of pages we need to\n // be able to create a sliding page window. If we have less than that, we\n // will just render a simple range of page links insteadof the sliding.\n if ($this->lastPage < 13) {\n $content = $this->getPageRange(1, $this->lastPage);\n } else {\n $content = $this->getPageSlider();\n }\n\n if (\\Config::get('pagination::show_first_last') === true) {\n return $this->getFirst().$this->getPrevious().$content.$this->getNext().$this->getLast();\n }\n\n return $this->getPrevious().$content.$this->getNext();\n }", "function renderPagination(PageArray $items) {\n\n\tif(!$items->getLimit() || $items->getTotal() <= $items->getLimit()) return '';\n\t$page = page();\n\tif(!$page->template->allowPageNum) {\n\t\treturn \"Pagination is not enabled for this template\";\n\t}\n\n\t// customize the MarkupPagerNav to output in Foundation-style pagination links\n\t$options = array(\n\t\t'numPageLinks' => 5, \n\t\t'nextItemLabel' => '<i class=\"uk-icon-angle-double-right\"></i>',\n\t\t'nextItemClass' => '',\n\t\t'previousItemLabel' => '<span><i class=\"uk-icon-angle-double-left\"></i></span>',\n\t\t'previousItemClass' => '',\n\t\t'lastItemClass' => '',\n\t\t'currentItemClass' => 'uk-active',\n\t\t'separatorItemLabel' => '<span>&hellip;</span>',\n\t\t'separatorItemClass' => 'uk-disabled',\n\t\t'listMarkup' => \"<ul class='uk-pagination uk-text-left'>{out}</ul>\",\n\t\t'itemMarkup' => \"<li class='{class}'>{out}</li>\",\n\t\t'linkMarkup' => \"<a href='{url}'>{out}</a>\",\n\t\t'currentLinkMarkup' => \"<span>{out}</span>\"\n\t);\n\n\t$pager = modules('MarkupPagerNav');\n\t$pager->setBaseUrl($page->url);\n\n\treturn $pager->render($items, $options);\n}", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function render()\n {\n $items = $this->getAllLinksRender($this->list);\n $output = str_replace('{paginationContent}', $items, $this->htmlContainer);\n\n return (string) $output;\n }", "private function print_current_page_display() {\n\n\t\t$total = sprintf(\n\t\t\t'<span class=\"total-pages\">%s</span>',\n\t\t\tnumber_format_i18n( $this->total_pages )\n\t\t);\n\n\t\t$paging = sprintf(\n\t\t\t_x( '%1$s of %2$s', 'paging', 'multilingual-press' ),\n\t\t\tnumber_format_i18n( $this->current_page ),\n\t\t\t$total\n\t\t);\n\n\t\t$tags = array(\n\t\t\t'span' => array(\n\t\t\t\t'class' => true,\n\t\t\t),\n\t\t);\n\t\t?>\n\t\t<span class=\"paging-input\"><?php echo wp_kses( $paging, $tags ); ?></span>\n\t\t<?php\n\t}", "protected function _renderPages(Zym_Paginate_Abstract $paginate)\n {\n $xhtml = '';\n\n $currentPageNumber = $paginate->getCurrentPageNumber();\n $centerOffset = floor($this->_pageLimit / 2);\n $lastPageNumber = $paginate->getPageCount();\n\n if ($currentPageNumber <= $centerOffset) {\n $startNumber = 1;\n $endNumber = $this->_pageLimit;\n } else if ($currentPageNumber >= $lastPageNumber - $centerOffset) {\n $startNumber = $lastPageNumber - $this->_pageLimit + 1;\n $endNumber = $lastPageNumber;\n } else {\n $startNumber = $currentPageNumber - $centerOffset;\n\n if ($this->_pageLimit % 2 == 0) {\n $startNumber++;\n }\n\n $endNumber = $currentPageNumber + $centerOffset;\n }\n\n for ($i = $startNumber; $i <= $endNumber; $i++) {\n $pageLocation = array_merge($this->_targetLocation, array($this->_currentPageAttrib => $i));\n\n if ($i == $currentPageNumber) {\n $xhtml .= $this->_renderActiveListItem($pageLocation, $i);\n } else {\n $xhtml .= $this->_renderListItem($pageLocation, $i);\n }\n }\n\n return $xhtml;\n }", "function _renderPager(& $pages, $curPage) \n {\n $curPage = (int) $curPage;\n $htmlstr = \"\";\n if ($curPage != $pages['firstpage']) {\n $str = str_replace(\n '{url}', $pages['firstpageurl'], $this->_pagerLinkTemplate);\n $str = str_replace('{name}', '<<&nbsp;', $str);\n $htmlstr .= $str;\n } \n if ($pages['prev'] != \"\") {\n $str = str_replace('{url}', $pages['prev'], $this->_pagerLinkTemplate);\n $str = str_replace('{name}', '<&nbsp;', $str);\n $htmlstr .= $str;\n } \n foreach ($pages['pages'] as $pgnum => $link) {\n if ($pgnum == $curPage) {\n $htmlstr .= str_replace('{name}', $pgnum, $this->_pagerNoLinkTemplate);\n } else {\n $str = str_replace('{url}', $link, $this->_pagerLinkTemplate);\n $str = str_replace('{name}', $pgnum, $str);\n $htmlstr .= $str;\n }\n }\n if ($pages['next'] != \"\") {\n $str = str_replace('{url}', $pages['next'], $this->_pagerLinkTemplate);\n $str = str_replace('{name}', '&nbsp;>', $str);\n $htmlstr .= $str;\n } \n if ($curPage != $pages['lastpage']) {\n $str = str_replace('{url}', $pages['lastpageurl'], $this->_pagerLinkTemplate);\n $str = str_replace('{name}', '&nbsp;>>', $str);\n $htmlstr .= $str;\n } \n return $htmlstr;\n }", "public function pager()\n {\n $pager = $this->getPublisher()->getPagination()['pager'];\n $html = \"\\n<nav>\\n <ul class=\\\"pager\\\">\";\n\n $html .= \"\\n <li class=\\\"previous\".\n ($pager['pages']['prev'] !== null ? '' : ' disabled').\n \"\\\"><a href=\\\"\".($pager['pages']['prev'] ? : '#').\n \"\\\"><span aria-hidden=\\\"true\\\">&larr;</span> \".\n $this->getConfig()->ls('ui.nav.previous').\"</a></li>\";\n\n $html .= \"\\n <li class=\\\"next\".\n ($pager['pages']['next'] !== null ? '' : ' disabled').\n \"\\\"><a href=\\\"\".($pager['pages']['next'] ? : '#').\n \"\\\">\".$this->getConfig()->ls('ui.nav.next').\n \" <span aria-hidden=\\\"true\\\">&rarr;</span></a></li>\";\n\n $html .= \"\\n </ul>\\n</nav>\\n\\n\";\n\n return $html;\n }", "function Pagination($total, $perpage, $current, $link) {\n $result = '';\n $numpages = ceil($total / $perpage);\n $pages = AdvancedPagination($total, $current, $numpages);\n if ($numpages > 1) {\n $result .= '<div id=\"pagination\">\n <span class=\"pages\">'.__('Pages').': </span>';\n if ($pages['current'] != $pages['previous'])\n $result .= '<a href=\"'.$link.'&page=1\"> &lt;</a>';\n else $result .= '<span class=\"pages\"> &lt; </span>';\n $count = ($numpages > 5) ? 5 : $numpages;\n for ($i = 0; $i < $count; $i++) {\n if ($pages['pages'][$i] != $pages['current']) {\n $result .= '<a href=\"'.$link.'&page='.$pages['pages'][$i].'\">'.$pages['pages'][$i].'</a>';\n } else {\n $result .= '<span class=\"active\"> '.$pages['current'].'</span>';\n }\n }\n if ($pages['current'] != $pages['next']) {\n $result .= '<a href=\"'.$link.'&page='.$pages['last'].'\"> &gt; </a><span class=\"pages\">['.__('Total').': '.$pages['last'].']</span>';\n } else {\n $result .= '<span class=\"pages\"> &gt; ['.__('Total').': '.$pages['last'].']</span>';\n }\n $result .= '</div>\n <div class=\"clear\"></div>';\n }\n return $result;\n}", "public function getPaginationHtml();", "private function prepareTemplate()\n {\n $template = new TwigFrontendTemplate('pagination');\n\n $template->hasFirst = $this->hasFirst();\n $template->hasPrevious = $this->hasPrevious();\n $template->hasNext = $this->hasNext();\n $template->hasLast = $this->hasLast();\n\n $template->items = $this->getItems();\n $template->page = $this->intPage;\n $template->total = $this->intTotalPages;\n\n $template->first = array\n (\n 'page' => 1,\n 'link' => $this->lblFirst,\n 'href' => $this->linkToPage(1),\n );\n\n $template->previous = array\n (\n 'page' => $this->intPage - 1,\n 'link' => $this->lblPrevious,\n 'href' => $this->linkToPage($this->intPage - 1),\n );\n\n $template->next = array\n (\n 'page' => $this->intPage + 1,\n 'link' => $this->lblNext,\n 'href' => $this->linkToPage($this->intPage + 1),\n );\n\n $template->last = array\n (\n 'page' => $this->intTotalPages,\n 'link' => $this->lblLast,\n 'href' => $this->linkToPage($this->intTotalPages),\n );\n\n return $template;\n }", "private function compilePager() {\n \t\n \t\n \t$this->_tmp_page = '<p '.$this->_config['css_page'].'>';\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].'1\">'.$this->_config['first'].'</a>';\n \t}\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] - 1).'\">'.$this->_config['previous'].'</a>';\n \t}\n \t\n \tif ($this->_all_page <= $this->_config['scr_page']) {\n \tif($this->_config['all_recs'] <= $this->_config['per_page']) {\n \t$this->_start = 1;\n $this->_stop = $this->_all_page;\n } else {\n \t\t$this->_start = 1;\n $this->_stop = $this->_all_page;\n }\n } else {\n \tif($this->_config['cur_page'] < intval($this->_config['scr_page'] / 2) + 1) {\n\t $this->_start = 1; \n\t \t$this->_stop = $this->_config['scr_page'];\n } else {\n \t$this->_start = $this->_config['cur_page'] - intval($this->_config['scr_page'] / 2);\n $this->_stop = $this->_config['cur_page'] + intval($this->_config['scr_page'] / 2);\n if($this->_stop > $this->_all_page) $this->_stop = $this->_all_page;\n }\n }\n if ($this->_all_page > 1) {\n\t for ($i = $this->_start; $i <= $this->_stop; $i++) {\n\t \tif ($i == $this->_config['cur_page']) {\n\t \t$this->_tmp_page .= '<span '.$this->_config['act_page'].'>'.$i.'</span>';\n\t } else {\n\t $this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$i.'\">'.$i.'</a>';\n\t }\n\t }\n }\n \n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] + 1).'\">'.$this->_config['next'].'</a>';\n \t}\n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$this->_all_page.'\">'.$this->_config['last'].'</a>';\n \t}\n \treturn $this->_tmp_page.'</p>';\n }", "function render_page_container_end()\n\t\t{\n\t\t\t$output = '</div>'; \n\t\t\treturn $output;\n\t\t}", "private function print_pagination_links() {\n\n\t\tif ( 1 < $this->total_pages ) {\n\t\t\t?>\n\t\t\t<span class=\"pagination-links\">\n\t\t\t\t<?php\n\t\t\t\t$this->print_first_page_link();\n\t\t\t\t$this->print_previous_page_link();\n\t\t\t\t$this->print_current_page_display();\n\t\t\t\t$this->print_next_page_link();\n\t\t\t\t$this->print_last_page_link();\n\t\t\t\t?>\n\t\t\t</span>\n\t\t\t<?php\n\t\t}\n\t}", "function render_block_core_query_pagination($attributes, $content)\n {\n }", "public function render()\n {\n $user = auth()->user();\n $this->pages = $user->pages;\n return view('livewire.pages');\n }", "public function RenderPaginator() {\n $html = '';\n //Insert all in one div tag\n $html.= '<div>';\n //We need this form for sumbitting limit into URL via GET call\n $html.='<form id= \"paginator\" name=\"paginator\" method=\"get\" action=\"\" >';\n //When limit is changed - just submit form\n $html.= '<select name=\"limit\" onchange=\"javascript:document.forms.paginator.submit()\">';\n $html.= '<option value=\"10\" ';\n if ($this->limit == 10) {\n $html.='selected';\n } $html.='>10</option>';\n $html.= '<option value=\"20\" ';\n if ($this->limit == 20) {\n $html.='selected';\n } $html.='>20</option>';\n $html.= '<option value=\"30\" ';\n if ($this->limit == 30) {\n $html.='selected';\n } $html.='>30</option>';\n $html.= '<option value=\"50\" ';\n if ($this->limit == 50) {\n $html.='selected';\n } $html.='>50</option>';\n $html.= '<option value=\"100\" ';\n if ($this->limit == 100) {\n $html.='selected';\n } $html.='>100</option>';\n $html.= '<option value=\"500\" ';\n if ($this->limit == 500) {\n $html.='selected';\n } $html.='>500</option>';\n $html.= '<option value=\"0\" ';\n if ($this->limit == 0) {\n $html.='selected';\n } $html.='>All</option>';\n $html.='</select>';\n $html.='</form>';\n \n $html.= '</div>';\n return $html;\n }", "function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}", "public function run($collection)\n {\n return view(\"admin.widgets.pagination\", [\n 'config' => $this->config,\n 'collection' => $collection\n ]);\n }", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "private function getPagination(){\n\t\t$pager=new pager();\n\t\t$pager->isAjaxCall($this->iAmAjax);\n\t\t$pager->set(\"type\", \"buttons\");\n\t\t$pager->set(\"gridId\",$this->id);\n\t\t$pager->set(\"pages\", $this->pages);\n\t\t$pager->set(\"currPage\", $this->currPage);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\treturn $pager->render(true);\n\t}", "protected function _renderPaginationEnd()\n {\n return '</ul></div>';\n }", "public function render() {\n\t\t$this->render_page_content();\n\t}", "public function view()\n {\n $pages = explode(' ', $this->list);\n\n if ($this->current_page < 1 || $this->current_page > $this->total_pages) {\n $this->current_page = 1;\n }\n $output = null;\n\n $output .= '<ul class=\"pagination\">';\n $output .= $this->beginning();\n $output .= $this->middle($pages);\n $output .= $this->ending();\n $output .= '</ul>';\n \n return $output;\n }", "function ci_pagination($args=array())\n{ \n\t$defaults = array(\n\t\t'container_id' => 'paging',\n\t\t'container_class' => 'navigation group',\n\t\t'prev_link_class' => 'nav-prev alignleft shadow',\n\t\t'next_link_class' => 'nav-next alignright shadow',\n\t\t'prev_text' => __('Older posts', 'ci_theme'),\n\t\t'next_text' => __('Newer posts', 'ci_theme'),\n\t\t'wp_pagenavi_params' => array()\n\t);\n\t$args = wp_parse_args( $args, $defaults );\n\t\n\tglobal $wp_query;\n\tif ($wp_query->max_num_pages > 1): ?>\n\t\t<div \n\t\t\t<?php echo (empty($args['container_id']) ? '' : 'id=\"'.$args['container_id'].'\"'); ?> \n\t\t\t<?php echo (empty($args['container_class']) ? '' : 'class=\"'.$args['container_class'].'\"'); ?>\n\t\t>\n\t\t\t<?php if (function_exists('wp_pagenavi')): ?>\n\t\t\t\t<?php wp_pagenavi($args['wp_pagenavi_params']); ?>\n\t\t\t<?php else: ?>\n\t\t\t\t<div <?php echo (empty($args['prev_link_class']) ? '' : 'class=\"'.$args['prev_link_class'].'\"'); ?>><?php next_posts_link( '<span class=\"nav-prev-symbol nav-symbol\">&laquo;</span> ' . $args['prev_text'] ); ?></div>\n\t\t\t\t<div <?php echo (empty($args['next_link_class']) ? '' : 'class=\"'.$args['next_link_class'].'\"'); ?>><?php previous_posts_link( $args['next_text'] . ' <span class=\"nav-next-symbol nav-symbol\">&raquo;</span>' ); ?></div>\n\t\t\t<?php endif; ?>\n\t\t</div>\n\t<?php endif;\n}", "function displayPager( $pagerCurrent, $pagesCount ) {\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil( $this->pagerLimit / 2 );\n // first is the first page listed by this pager piece (re quantity)\n $pagerFirst = $pagerCurrent - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pagerLast = $pagerCurrent + $this->pagerLimit - $pager_middle;\n\n // Prepare for generation loop.\n $i = $pagerFirst;\n if ( $pagerLast > $pagesCount ) {\n // Adjust \"center\" if at end of query.\n $i = $i + ( $pagesCount - $pagerLast );\n $pagerLast = $pagesCount;\n }\n if ( $i <= 0 ) {\n // Adjust \"center\" if at start of query.\n $pagerLast = $pagerLast + ( 1 - $i );\n $i = 1;\n }\n\n $output = '';\n if ( $pagesCount > 1 ) {\n $output .= '<ul class=\"c-pager\">';\n $pagerEllipsis = '<li class=\"c-pager-item c-pager-ellipsis\"><span>...</span></li>';\n\n // Whether to display the \"Previous page\" link\n if ( $pagerCurrent > 1 ) {\n $output .= '<li class=\"c-pager-item c-pager-previous\">' .\n Html::rawElement(\n 'a',\n array(\n 'rel' => 'nofollow',\n 'class' => 'c-pager-link',\n 'href' => '#cfirst',\n 'data-' . $this->pageQuery => ( $pagerCurrent - 1 ),\n ),\n '&lt;'\n ) .\n '</li>';\n }\n\n // Whether to display the \"First page\" link\n if ( $i > 1 ) {\n $output .= '<li class=\"c-pager-item c-pager-first\">' .\n Html::rawElement(\n 'a',\n array(\n 'rel' => 'nofollow',\n 'class' => 'c-pager-link',\n 'href' => '#cfirst',\n 'data-' . $this->pageQuery => 1,\n ),\n 1\n ) .\n '</li>';\n }\n\n // When there is more than one page, create the pager list.\n if ( $i != $pagesCount ) {\n if ( $i > 2 ) {\n $output .= $pagerEllipsis;\n }\n\n // Now generate the actual pager piece.\n for ( ; $i <= $pagerLast && $i <= $pagesCount; $i++ ) {\n if ( $i == $pagerCurrent ) {\n $output .= '<li class=\"c-pager-item c-pager-current\"><span>' .\n $i . '</span></li>';\n } else {\n $output .= '<li class=\"c-pager-item\">' .\n Html::rawElement(\n 'a',\n array(\n 'rel' => 'nofollow',\n 'class' => 'c-pager-link',\n 'href' => '#cfirst',\n 'data-' . $this->pageQuery => $i,\n ),\n $i\n ) .\n '</li>';\n }\n }\n\n if ( $i < $pagesCount ) {\n $output .= $pagerEllipsis;\n }\n }\n\n // Whether to display the \"Last page\" link\n if ( $pagesCount > ( $i - 1 ) ) {\n $output .= '<li class=\"c-pager-item c-pager-last\">' .\n Html::rawElement(\n 'a',\n array(\n 'rel' => 'nofollow',\n 'class' => 'c-pager-link',\n 'href' => '#cfirst',\n 'data-' . $this->pageQuery => $pagesCount,\n ),\n $pagesCount\n ) .\n '</li>';\n }\n\n // Whether to display the \"Next page\" link\n if ( $pagerCurrent < $pagesCount ) {\n $output .= '<li class=\"c-pager-item c-pager-next\">' .\n Html::rawElement(\n 'a',\n array(\n 'rel' => 'nofollow',\n 'class' => 'c-pager-link',\n 'href' => '#cfirst',\n 'data-' . $this->pageQuery => ( $pagerCurrent + 1 ),\n ),\n '&gt;'\n ) .\n '</li>';\n }\n\n $output .= '</ul>';\n }\n\n return $output;\n }", "function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }", "function smarty_function_pager($params, &$smarty) {\n $result = '';\n \n if (!isset($params['delta'])) {\n $params['delta'] = 3;\n }\n \n if ($params && $params['pages'] > 1) {\n $result = '<div class=\"dg_pager_container\">';\n \n if ($params['current'] > 1) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"1\">First</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] - 1).'\">Prev</a> ';\n }\n \n $pager_start = $params['current'] <= $params['delta'] ? 1 : $params['current'] - $params['delta'];\n $pager_stop = $params['current'] > $params['pages'] - $params['delta'] ? $params['pages'] : $params['current'] + $params['delta'];\n \n if ($params['current'] > $params['delta'] + 1) {\n /*for ($i = 1; $i <= $params['delta'] + 1; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n $result .= ' ... ';\n }\n \n for ($i = $pager_start; $i <= $pager_stop; ++$i) {\n if ($i == $params['current']) {\n $result .= ' <span>['.$i.']</span> ';\n } else {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }\n }\n \n if ($params['current'] < $params['pages'] - $params['delta']) {\n $result .= ' ... ';\n /*for ($i = $params['pages'] - $params['delta']; $i <= $params['pages']; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n }\n\n if ($params['current'] < $params['pages']) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] + 1).'\">Next</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$params['pages'].'\">Last</a> ';\n }\n \n $result .= '</div>';\n }\n \n return $result;\n}", "function ti_pagination(){\n\tglobal $wp_query;\n\t$total_pages = $wp_query->max_num_pages; \n\tif ( $total_pages > 1 ){\n\t\t$current_page = max( 1, get_query_var('paged') ); \n\t\techo '<div class=\"pagination\">';\n\t\techo paginate_links(array( \n\t\t\t'base' => get_pagenum_link(1) . '%_%', \n\t\t\t'format' => 'page/%#%',\n\t\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t\t'total' => $wp_query->max_num_pages,\n\t\t\t'show_all' => false,\n\t\t\t'end_size' => 1,\n\t\t\t'mid_size' => 3,\n\t\t\t'prev_next' => true,\n\t\t\t'prev_text' => '<i class=\"icon-chevron-left\"></i>',\n\t\t\t'next_text' => '<i class=\"icon-chevron-right\"></i>',\n\t\t\t'type' => 'list'\n\t\t)); \n\t\techo '</div>';\n\t}\t\n}", "public static function renderPaginator ($totalElements, $currentPage, $pageLink, $parameters = null)\n {\n if ($parameters)\n $parameters = '&' . $parameters;\n $totalPages = round($totalElements / Util::ELEMENTS_PER_PAGE);\n\n $startPage = $currentPage - 10;\n $endPage = $currentPage + 10;\n\n if ($startPage < 1)\n $startPage = 1;\n\n if ($endPage > $totalPages)\n $endPage = $totalPages;\n\t\t\t// Enable the first and previous options if current page is greater then 2.\n if ($currentPage >= 2) {\n echo '<a href=\"' . $pageLink . '.php?page=1' . $parameters . '\">First</a> ';\n echo '<a href=\"' . $pageLink . '.php?page=' . ($currentPage - 1) . $parameters . '\">Prev</a> ';\n } else {\n echo 'First Prev ';\n }\n\t\t\t// Build the pagination html.\n for ($i = $startPage; $i <= $endPage; $i++) {\n \t// If this is the current page then apply a style to it.\n\t\t\t\tif ($i == $currentPage) {\n\t\t\t\t\techo '<a href=\"' . $pageLink .\n\t\t\t\t\t'.php?page=' . $i . $parameters . '\"\n\t\t\t\t\tstyle=\"text-decoration: initial !important;color: red;\">' . $i . '</a> ';\n\t\t\t\t}\n\t\t\t\telse {\n \techo '<a href=\"' . $pageLink . '.php?page=' . $i . $parameters . '\">' . $i . '</a> ';\n\t\t\t\t}\n }\n\t\t\t// Enable next and last options if current page is eqal to last - 1 page.\n if ($currentPage <= ($totalPages - 1)) {\n echo '<a href=\"' . $pageLink . '.php?page=' . ($currentPage + 1) . $parameters . '\">Next</a> ';\n echo '<a href=\"' . $pageLink . '.php?page=' . ($totalPages) . $parameters . '\">Last</a> ';\n } else {\n echo 'Next Last';\n }\n }", "function get_pagination(){\n global $wp_query;\n global $max_page;\n if ( !$max_page ) { $max_page = $wp_query->max_num_pages; }\n\n if(function_exists('wp_page_numbers') && $wp_query->max_num_pages > 1 ) { ?><div\nclass=\"pagination\"> <? wp_page_numbers();\n?></div> <? \n\t} else { ?>\n\t\t<div class=\"navigation\">\n\t\t\t<div class=\"alignleft\"><?php next_posts_link('&laquo; Older Entries') ?></div>\n\t\t\t<div class=\"alignright\"><?php previous_posts_link('Newer Entries &raquo;') ?></div>\n\t\t</div> <?\n\t} \n}", "public function render(Container $container);", "public function render($previousLabel = '&lt;', $nextLabel = '&gt;', \n $itemClass = 'page-item', $linkClass = 'page-link', $activeClass = 'active')\n {\n \n $html = $this->previousLink($previousLabel, $itemClass, $linkClass, $activeClass);\n \n $useClipping = false;\n \n if ($this->totalPages > $this->renderedItemsMax) {\n \n $useClipping = true;\n }\n \n if ($useClipping === false) {\n \n for ($i = 1; $i <= $this->totalPages; $i++) {\n \n $html.= $this->renderItem($i, $itemClass, $activeClass, $linkClass);\n }\n }\n else {\n \n $html.= $this->renderWithClipping($itemClass, $activeClass, $linkClass);\n }\n \n $html.= $this->nextLink($nextLabel, $itemClass, $linkClass, $activeClass);\n \n echo $html;\n }", "function base_pagination() {\n\tglobal $wp_query;\n\n\t$big = 999999999; // This needs to be an unlikely integer\n\n\t// For more options and info view the docs for paginate_links()\n\t// http://codex.wordpress.org/Function_Reference/paginate_links\n\t$paginate_links = paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => __('PREVIOUS'),\n\t\t'next_text' => __('NEXT'),\n\t\t'end_size' => 1,\n\t\t'mid_size' => 2,\n 'before_page_number' => '<span class=\"page-number\">',\n 'after_page_number' => '</span>',\n\t) );\n\n\t// Display the pagination if more than one page is found\n\tif ( $paginate_links ) {\n\t\techo '<div class=\"pagination-wrapper\"><div class=\"pagination\">';\n\t\techo $paginate_links;\n\t\techo '</div><!--// end .pagination --></div>';\n\t}\n}", "abstract public function preparePagination();", "public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }", "function base_pagination() {\n\tglobal $wp_query;\n \n\t$big = 999999999; // This needs to be an unlikely integer\n \n\t// For more options and info view the docs for paginate_links()\n\t// http://codex.wordpress.org/Function_Reference/paginate_links\n\t$paginate_links = paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', get_pagenum_link($big) ),\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => __('Previous'),\n\t\t'next_text' => __('Next'),\n\t\t'end_size' => 4,\n\t\t'mid_size' => 2\n\t) );\n \n\t// Display the pagination if more than one page is found\n\tif ( $paginate_links ) {\n\t\techo '<div class=\"pagination\">';\n\t\techo $paginate_links;\n\t\techo '</div><!--// end .pagination -->';\n\t}\n}", "function thoughts_paginate() {\n global $wp_query;\n \n $total_pages = $wp_query->max_num_pages;\n \n if ($total_pages > 1){\n \n $current_page = max(1, get_query_var('paged'));\n \n echo '<div class=\"paginate\">';\n\n echo paginate_links(array(\n 'base' => get_pagenum_link(1) . '%_%',\n 'format' => '/page/%#%',\n 'current' => $current_page,\n 'total' => $total_pages,\n 'prev_text' => 'Prev',\n 'next_text' => 'Next'\n ));\n\n echo '</div>';\n }\n}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function page_list() {\n\n\t\t\t$output = \"\";\n\t\t\t$cur_page = $this->current_page;\n\t\t\t$tot_page = $this->total_pages();\n\n\t\t\tif( $cur_page <= $tot_page ) {\n\t\t\t\t$output .= \"<h3 class=\\\"pagelist\\\">Page {$cur_page} of \" ;\n\t\t\t\t$output .= \"{$tot_page}</h3>\";\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $output;\n\n\t\t}", "function printPagination($p_current_page, $p_total_count, $p_extra_parameters = '')\n\t{\n\t\tglobal $section;\n\n\t\t// If pagination needed print page selection\n\t\tif( BACKEND_RESULTS_PER_PAGE < $p_total_count )\n\t\t{\n\t\t\t$page_count = ceil($p_total_count / BACKEND_RESULTS_PER_PAGE);\n\t\t\techo \"<div class=\\\"page-navigation\\\">\";\n\t\t\tfor( $page_iterator = 1 ; $page_iterator <= $page_count ; $page_iterator++)\n\t\t\t{\n\t\t\t\t$selected = ($page_iterator === $p_current_page) ? ' selected' : '';\n\t\t\t\techo '<a class=\"button' . $selected . '\" href=\"?section=' , $section , '&amp;page=' , $page_iterator, $p_extra_parameters , '\">' , $page_iterator , \"</a>\";\n\t\t\t}\n\t\t\techo \"</div>\\n\";\n\t\t}\n\t}", "function alaya_pagenavi(){\n global $wp_query;\n\n\t$big = 999999999; // need an unlikely integer\n\t$return_html='';\n\t$return_html.='<div class=\"alaya_pagenavi\">';\n\t$return_html.= paginate_links( array(\n\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t'format' => '?paged=%#%',\n\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t'total' => $wp_query->max_num_pages,\n\t\t'prev_text' => '&lt;',\n\t 'next_text' => '&gt;'\n\t) );\n\t$return_html.='</div>';\n\t\n\treturn $return_html;\n}", "public function wrapper() \n {\n \n ee()->load->library('pagination');\n \n $total_items = ee()->TMPL->fetch_param('total_items');\n $per_page = ee()->TMPL->fetch_param('per_page');\n $current_page = ee()->TMPL->fetch_param('current_page',0);\n $prefix = ee()->TMPL->fetch_param('prefix','P');\n $base_path =ee()->TMPL->fetch_param('base_path');\n \n $pagination = ee()->pagination->create();\n $pagination->prefix = $prefix;\n $pagination->basepath = '/' . trim($base_path,'/');\n\n ee()->TMPL->tagdata = $pagination->prepare(ee()->TMPL->tagdata);\n \n $pagination->build($total_items, $per_page);\n $this->return_data = $pagination->render($this->return_data);\n \n return $this->return_data;\n }", "public function pageNav()\n {\n $pager = $this->getPublisher()->getPagination()['pager'];\n $html = \"\\n<nav>\\n <ul class=\\\"pagination\\\">\";\n\n if ($pager['pages']['prev']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['prev'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.previous').\n \"\\\"><span aria-hidden=\\\"true\\\">&laquo;</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">&laquo;</span></span></li>\";\n\n $pages = $this->getPublisher()->getPagination()['page_menu']['pages'];\n foreach($pages as $page_num => $data) {\n if ($data['url']) // not the current page\n $html .= \"\\n <li><a href=\\\"\".$data['url'].\"\\\">\".$page_num.\"</a></li>\";\n else\n $html .= \"\\n <li class=\\\"active\\\"><span>\".$page_num.\"<span class=\\\"sr-only\\\">(current)</span></span></li>\";\n }\n\n if ($pager['pages']['next']) {\n $html .= \"\\n <li><a href=\\\"\".$pager['pages']['next'].\n \"\\\" aria-label=\\\"\".$this->getConfig()->ls('ui.nav.next').\n \"\\\"><span aria-hidden=\\\"true\\\">&raquo;</span></a><li>\";\n } else\n $html .= \"\\n <li class=\\\"disabled\\\"><span><span aria-hidden=\\\"true\\\">&raquo;</span></span></li>\";\n\n $html .= \"\\n </ul>\\n</nav>\\n\\n\";\n\n return $html;\n }", "public function render()\n {\n return view('livewire.pages');\n }", "public function render(Presenter $presenter = null)\n\t{\n\t\tif ($this->hasPages()) {\n\t\t\t$links = \"\";\n\t\t\tforeach ( $this->getUrlRange(1, $this->lastPage()) as $page => $url) {\n\t\t\t\t$links .= $this->getPageWrapper($url,$page);\n\t\t\t}\n\t\t\treturn sprintf(\t'<ul class=\"pagination\">%s</ul>', $links);\n\t\t}\n\t\treturn '';\n\t}", "function render_block_core_query_pagination_numbers($attributes, $content, $block)\n {\n }", "public function testTotalPagesGreaterThanDisplayPages()\n {\n $pagination = new Pagination(2,170,10,10);\n $pages = $pagination->getIterator();\n $this->assertEquals(9, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(9, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //1 2 3 4 5 6 7 8 9 10 11\n $pagination = new Pagination(6,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(11, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //3 4 5 6 7 8 9 10 11 12 13\n $pagination = new Pagination(8,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(13, $pages->current());\n $pages->rewind();\n $this->assertEquals(3, $pages->current());\n\n //7 8 9 10 11 12 13 14 15 16 17\n $pagination = new Pagination(14,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(17, $pages->current());\n $pages->rewind();\n $this->assertEquals(7, $pages->current());\n }", "public function actionList()\n {\n $this->adminOnly();\n\n $pages = $this->findAll();\n return $this->render('@custom_pages/views/common/list', [\n 'pages' => $pages,\n 'label' => Yii::createObject($this->getPageClassName())->getLabel(),\n 'subNav' => \\humhub\\modules\\custom_pages\\widgets\\ContainerPageMenu::widget()\n ]);\n }", "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "public function init() {\n $this->registerScript();\n $this->registerCss();\n $classes = array();\n $validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);\n\n if (in_array($this->alignment, $validAlignments))\n $classes[] = 'pagination-' . $this->alignment;\n\n if (!empty($classes)) {\n $classes = implode(' ', $classes);\n if (isset($this->htmlOptions['class']))\n $this->htmlOptions['class'] = ' ' . $classes;\n else\n $this->htmlOptions['class'] = $classes;\n }\n if($this->nextPageLabel===null)\n $this->nextPageLabel=Yii::t('yii','&gt;');\n if($this->prevPageLabel===null)\n $this->prevPageLabel=Yii::t('yii','&lt;');\n if($this->firstPageLabel===null)\n $this->firstPageLabel=Yii::t('yii','&lt;&lt;');\n if($this->lastPageLabel===null)\n $this->lastPageLabel=Yii::t('yii','&gt;&gt;');\n if($this->header===null)\n $this->header=Yii::t('yii','Go to page: ');\n\n parent::init();\n }", "function render_page_container( $pageinfo , $firstClass )\n\t\t{\t\n\t\t\tif(!isset($pageinfo['sortable'])) $pageinfo['sortable'] = \"\";\n\t\t\t\n\t\t\t$output = '<div class=\"ace_subpage_container '.$firstClass.' '.$pageinfo['sortable'].'\" id=\"ace_'.ace_backend_safe_string($pageinfo['title']).'\">';\t\n\t\t\t$output .= '\t<div class=\"ace_section_header\">';\t\n\t\t\t$output .= '\t\t<strong class=\"ace_page_title\" style=\"background-Image:url('.ACE_IMG_URL.\"icons/\".$pageinfo['icon'].');\">'; \n\t\t\t$output .= \t\t\t$pageinfo['title'];\n\t\t\t$output .= '\t\t</strong>'; \n\t\t\t$output .= '\t</div>'; \n\t\t\treturn $output;\n\t\t}", "public static function pagination_list( $query = null ) {\n\t\tif ( is_null( $query ) ) {\n\t\t\t$query = $GLOBALS['wp_query'];\n\t\t}\n\n\t\t$total_pages = (int)$query->max_num_pages;\n\n\t\tif($total_pages > 1) {\n\t\t\t$big = PHP_INT_MAX;\n\t\t\t$current_page = max(1, get_query_var('paged'));\n\n\t\t\techo '<div class=\"wp-pagenavi\">';\n\n\t\t\techo '<span class=\"pages\">'.sprintf(__('Page %d of %d', 'church-event'), $current_page, $total_pages).'</span>';\n\n\t\t\techo paginate_links(array(\n\t\t\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t\t\t'format' => '?paged=%#%',\n\t\t\t\t'current' => $current_page,\n\t\t\t\t'total' => $total_pages,\n\t\t\t\t'prev_text' => __('Prev', 'church-event'),\n\t\t\t\t'next_text' => __('Next', 'church-event'),\n\t\t\t));\n\n\t\t\techo '</div>';\n\t\t}\n\t}", "function doPages($page_size, $thepage, $query_string, $total=0) {\n \n //per page count\n $index_limit = 10;\n\n //set the query string to blank, then later attach it with $query_string\n $query='';\n \n if(strlen($query_string)>0){\n $query = \"&amp;\".$query_string;\n }\n \n //get the current page number example: 3, 4 etc: see above method description\n $current = get_current_page();\n \n $total_pages=ceil($total/$page_size);\n $start=max($current-intval($index_limit/2), 1);\n $end=$start+$index_limit-1;\n\n echo '<br /><br /><div class=\"paging\">';\n\n if($current==1) {\n echo '<span class=\"prn\">&lt; Previous</span>&nbsp;';\n } else {\n $i = $current-1;\n echo '<a href=\"'.$thepage.'?page='.$i.$query.'\" class=\"prn\" rel=\"nofollow\" title=\"go to page '.$i.'\">&lt; Previous</a>&nbsp;';\n echo '<span class=\"prn\">...</span>&nbsp;';\n }\n\n if($start > 1) {\n $i = 1;\n echo '<a href=\"'.$thepage.'?page='.$i.$query.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n\n for ($i = $start; $i <= $end && $i <= $total_pages; $i++){\n if($i==$current) {\n echo '<span>'.$i.'</span>&nbsp;';\n } else {\n echo '<a href=\"'.$thepage.'?page='.$i.$query.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n }\n\n if($total_pages > $end){\n $i = $total_pages;\n echo '<a href=\"'.$thepage.'?page='.$i.$query.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n\n if($current < $total_pages) {\n $i = $current+1;\n echo '<span class=\"prn\">...</span>&nbsp;';\n echo '<a href=\"'.$thepage.'?page='.$i.$query.'\" class=\"prn\" rel=\"nofollow\" title=\"go to page '.$i.'\">Next &gt;</a>&nbsp;';\n } else {\n echo '<span class=\"prn\">Next &gt;</span>&nbsp;';\n }\n \n //if nothing passed to method or zero, then dont print result, else print the total count below:\n if ($total != 0){\n //prints the total result count just below the paging\n echo '<p id=\"total_count\">(total '.$total.' results)</p></div>';\n }\n \n }", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public final function render($container_context = array())\n {\n }", "function pager($page, $total, $pnumber, $page_link, $parameters)\n {\n $number = (int)($total/$pnumber);\n if((float)($total/$pnumber) - $number != 0) $number++;\n // Check on left links\n if($page - $page_link > 1)\n {\n echo \"<a href=$_SERVER[PHP_SELF]?page=1{$parameters}> <nobr>[1-$pnumber]</nobr></a>&nbsp;<em class=currentpage><nobr>&nbsp;...&nbsp;</nobr> </em>&nbsp;\";\n // Have one\n for($i = $page - $page_link; $i<$page; $i++)\n {\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n else\n {\n // Have no\n for($i = 1; $i<$page; $i++)\n {\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n // Check on right links\n if($page + $page_link < $number)\n {\n // Have one\n for($i = $page; $i<=$page + $page_link; $i++)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]&nbsp;</nobr> </em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n echo \"<em class=currentpage><nobr>&nbsp;...&nbsp;</nobr> </em>&nbsp;<a href=$_SERVER[PHP_SELF]?page=$number{$parameters}> <nobr>[\".(($number - 1)*$pnumber + 1).\"-$total]</nobr></a>&nbsp;\";\n }\n else\n {\n // Have no\n for($i = $page; $i<=$number; $i++)\n {\n if($number == $i)\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-$total]&nbsp;</nobr></em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}>[\".(($i - 1)*$pnumber + 1).\"-$total]</a>&nbsp;\";\n }\n else\n {\n if($page == $i)\n echo \"<em class=currentpage><nobr>&nbsp;[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]&nbsp;</nobr> </em>\";\n else\n echo \"&nbsp;<a href=$_SERVER[PHP_SELF]?page=$i{$parameters}> <nobr>[\".(($i - 1)*$pnumber + 1).\"-\".$i*$pnumber.\"]</nobr></a>&nbsp;\";\n }\n }\n }\n //echo \"<br><br>\";\n }", "function pagination(?string $before = '', ?string $after = ''): void\n{\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ($numposts <= $posts_per_page) {\n\t\treturn;\n\t}\n\tif (empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show - 1;\n\t$half_page_start = floor($pages_to_show_minus_1 / 2);\n\t$half_page_end = ceil($pages_to_show_minus_1 / 2);\n\t$start_page = $paged - $half_page_start;\n\tif ($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif (($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif ($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif ($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\techo $before . '<nav class=\"nav nav--entry\"><ul class=\"pagination\" role=\"navigation\" aria-label=\"Pagination\">' . \"\";\n\tif ($start_page >= 2 && $pages_to_show < $max_page) {\n\t\t$first_page_text = __('First', 'sage');\n\t\techo '<li><a href=\"' . get_pagenum_link() . '\" title=\"' . $first_page_text\n\t\t\t. '\" aria-label=\"First page\">' . $first_page_text . '</a></li>';\n\t}\n\techo '<li class=\"pagination__previous\">';\n\tprevious_posts_link(__('Previous', 'sage'));\n\techo '</li>';\n\tfor ($i = $start_page; $i <= $end_page; $i++) {\n\t\tif ($i == $paged) {\n\t\t\techo '<li class=\"pagination--current\"><span class=\"show-for-sr\">You\\'re on page</span> ' . $i . ' </li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"' . get_pagenum_link($i) . '\" aria-label=\"Page ' . $i . '\">' . $i . '</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"pagination__next\">';\n\tnext_posts_link(__('Next', 'sage'), 0);\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = __('Last', 'sage');\n\t\techo '<li><a href=\"' . get_pagenum_link($max_page) . '\" title=\"'\n\t\t\t. $last_page_text . '\" aria-label=\"Last page\">' . $last_page_text . '</a></li>';\n\t}\n\techo '</ul></nav>' . $after . \"\";\n}", "function display_pages()\n {\n $this->Admin_model->procedure = 'GET_POST_PAGES';\n $rs = $this->Admin_model->get_post();\n $data['rows'] = $rs;\n $this->load->view('display_posts', $data);\n }", "private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }", "function horizon_theme_paging_nav() {\n\t\t$mid = 2; // Total of items that will show along with the current page.\n\t\t$end = 1; // Total of items displayed for the last few pages.\n\t\t$show = false; // Show all items.\n\n\t\techo horizon_theme_pagination( $mid, $end, false );\n\t}", "function horizon_theme_pagination( $mid = 2, $end = 1, $show = false, $query = null ) {\n\n\t// Prevent show pagination number if Infinite Scroll of JetPack is active.\n\tif ( ! isset( $_GET[ 'infinity' ] ) ) {\n\n\t\tglobal $wp_query, $wp_rewrite;\n\n\t\t$total_pages = $wp_query->max_num_pages;\n\n\t\tif ( is_object( $query ) && null != $query ) {\n\t\t\t$total_pages = $query->max_num_pages;\n\t\t}\n\n\t\tif ( $total_pages > 1 ) {\n\t\t\t$url_base = $wp_rewrite->pagination_base;\n\t\t\t$big = 999999999;\n\n\t\t\t// Sets the paginate_links arguments.\n\t\t\t$arguments = apply_filters( 'horizon_theme_pagination_args', array(\n\t\t\t\t\t'base' => esc_url_raw( str_replace( $big, '%#%', get_pagenum_link( $big, false ) ) ),\n\t\t\t\t\t'format' => '',\n\t\t\t\t\t'current' => max( 1, get_query_var( 'paged' ) ),\n\t\t\t\t\t'total' => $total_pages,\n\t\t\t\t\t'show_all' => $show,\n\t\t\t\t\t'end_size' => $end,\n\t\t\t\t\t'mid_size' => $mid,\n\t\t\t\t\t'type' => 'list',\n\t\t\t\t\t'prev_text' => __( '&laquo; Previous', 'horizon-theme' ),\n\t\t\t\t\t'next_text' => __( 'Next &raquo;', 'horizon-theme' ),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$pagination = '<div class=\"pagination-wrap\">' . paginate_links( $arguments ) . '</div>';\n\n\t\t\t// Prevents duplicate bars in the middle of the url.\n\t\t\tif ( $url_base ) {\n\t\t\t\t$pagination = str_replace( '//' . $url_base . '/', '/' . $url_base . '/', $pagination );\n\t\t\t}\n\n\t\t\treturn $pagination;\n\t\t}\n\t}\n}", "function ubc_collab_loop_pagination( $pagination ) {\n\treturn str_replace( \"<li><span class='page-numbers current'\", \"<li class='active'><span class='page-numbers current'\", $pagination );\n\n}", "public function index()\n {\n $perPage = 20;\n $data['pages'] = $this->pageRepo->getPagesPagination($perPage);\n $data['countPages'] = $this->pageRepo->getCountPages();\n\n return view('admin.pages.index', $data);\n }", "public function page_links()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t$pagination = '';\n\t\t\n\t\t// Let's get the starting page number, this is determined using num_links\n\t\t$start = (($this->current_page - $this->num_links) > 0) ? $this->current_page - ($this->num_links - 1) : 1;\n\n\t\t// Let's get the ending page number\n\t\t$end = (($this->current_page + $this->num_links) < $this->total_pages) ? $this->current_page + $this->num_links : $this->total_pages;\n\n\t\tfor ($i = $start; $i <= $end; $i++)\n\t\t{\n\t\t\t$text = $i;\n\t\t\t$url = '#';\n\t\t\t$state = $this->template['state']['current_page'];\n\n\t\t\tif ($this->current_page != $i)\n\t\t\t{\n\t\t\t\t// detect if anchor attribute is presented in the template \n\t\t\t\tif (stripos('<a ', $this->template['page_start']) < 0)\n\t\t\t\t{\n\t\t\t\t\t$text = '<a href=\":url\">'.$i.'</a>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$url = $this->build_url($i);\n\t\t\t\t$state = '';\n\t\t\t}\n\n\t\t\t$pagination .= Str::tr($this->template['page_start'].$text.$this->template['page_end'], array(\n\t\t\t\t'state' => $state,\n\t\t\t\t'url' => $url,\n\t\t\t));\n\t\t}\n\n\t\treturn $pagination;\n\t}", "public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }", "function pd_pagination()\n{\n\n global $wp_query;\n $total_pages = $wp_query->max_num_pages;\n if ($total_pages > 1) {\n\n $current_page = max(1, get_query_var('paged'));\n\n echo '<div class=\"page_nav\">';\n echo paginate_links(array(\n 'base' => get_pagenum_link(1) . '%_%',\n 'format' => '/page/%#%',\n 'current' => $current_page,\n 'total' => $total_pages,\n 'prev_text' => 'Prev',\n 'next_text' => 'Next'\n ));\n echo '</div>';\n }\n}", "public function render_page() {\n\t\t$this->render_template();\n\t}", "function kickpress_pagination( $args = array() ) {\n\t$defaults = array(\n\t\t'widget_wrapper' => false\n\t);\n\t\n\t$pagination_args = array_merge($defaults, $args);\n/*\n\tif ( !empty( $args['post_type'] ) )\n\t\t$pagination_args['post_type'] = $args['post_type'];\n\n\tif ( !empty( $args['pagination_type'] ) )\n\t\t$pagination_args['pagination_type'] = $args['pagination_type'];\n\n\tif ( !empty( $args['posts_per_page'] ) )\n\t\t$pagination_args['posts_per_page'] = $args['posts_per_page'];\n\n\tif ( !empty( $args['target'] ) )\n\t\t$pagination_args['target'] = $args['target'];\n\n\tif ( !empty( $args['class'] ) )\n\t\t$pagination_args['class'] = $args['class'];\n*/\n\t$before_widget = sprintf(\n\t\t'<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'kickpress_pagination_widget-0',\n\t\t'kickpress_pagination_widget'\n\t);\n\n\tthe_widget( 'kickpress_pagination_widget', $pagination_args, array(\n\t\t'before_widget' => apply_filters( 'kickpress_before_widget', $before_widget ),\n\t\t'after_widget' => apply_filters( 'kickpress_after_widget', '</aside>' ),\n\t\t'before_title' => apply_filters( 'kickpress_before_title', '<h3 class=\"widget-title\">' ),\n\t\t'after_title' => apply_filters( 'kickpress_after_title', '</h3>' )\n\t) );\n}", "function displayPaging()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t echo \"Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"<BR>\";\r\n\t echo \"Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"<BR>\";\r\n\t\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t echo \"<a href='?page=1'>&lt;&lt;</a> \";\r\n\t } else {\r\n\t\t echo \"&lt;&lt; \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t echo \"<a href='?page=\" . $InfoArray[\"PREV_PAGE\"] . \"'>Previous</a> | \";\r\n\t } else {\r\n\t\t echo \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t echo $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t echo \"<a href='?page=\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"'>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"NEXT_PAGE\"] . \"'>Next</a>\";\r\n\t } else {\r\n\t\t echo \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"TOTAL_PAGES\"] . \"'>>></a>\";\r\n\t } else {\r\n\t\t echo \" &gt;&gt;\";\r\n\t }\r\n\t}", "abstract function render_page();", "protected function generatePages(): Pages\n\t{\n\t\t$paginator = new Pages();\n\n\t\t// If there is only 1 page\n\t\tif ($this->totalPages <= 1) {\n\t\t\t$paginator->buttons[] = $paginator->current = $this->createElement(1, 1);\n\n\t\t\treturn $paginator;\n\t\t}\n\n\t\t$paginator->current = $this->createElement($this->currentPage, $this->currentPage);\n\n\t\t$range = $this->getRange();\n\t\t// Where the middle part (exclude first and last page) starts\n\t\t$startMiddle = \\max($this->currentPage - $range, 2);\n\t\t$endMiddle = \\min($this->currentPage + $range, $this->totalPages - 1);\n\n\t\t$paginator->buttons[] = $this->createElement(1, $this->currentPage);\n\t\t$this->addBeginningButtons($paginator, $startMiddle);\n\n\t\tfor ($i = $startMiddle; $i <= $endMiddle; $i += 1) {\n\t\t\t$paginator->buttons[] = $this->createElement($i, $this->currentPage);\n\t\t}\n\n\t\t$this->addEndingButtons($paginator, $endMiddle);\n\t\t$paginator->buttons[] = $this->createElement($this->totalPages, $this->currentPage);\n\n\t\treturn $paginator;\n\t}", "public function list_pages() {\n\t\t$this->print_prev();\n\n\t\tif ($this->current_page+2 >= $this->total_pages-1) {\n\t\t\t$this->pages_right();\n\t\t} else {\n\t\t\t$this->pages_left();\n\t\t}\n\n\t\t$this->print_next();\n\t}", "public function make()\n {\n $data = [\n 'items' => $this->items,\n 'current' => $this->currentDate,\n 'format' => $this->format,\n 'urlFormat' => $this->urlFormat,\n 'url' => $this->url,\n ];\n return new HtmlString(view('pagination', $data)->render());\n }", "public function init() {\n $this->registerScript();\n $this->registerCss();\n if ($this->nextPageLabel === null)\n $this->nextPageLabel = '';\n\n if ($this->prevPageLabel === null)\n $this->prevPageLabel = '';\n\n $classes = array();\n\n $validAlignments = array(self::ALIGNMENT_CENTER, self::ALIGNMENT_RIGHT);\n\n if (in_array($this->alignment, $validAlignments))\n $classes[] = 'pagination-' . $this->alignment;\n\n if (!empty($classes)) {\n $classes = implode(' ', $classes);\n if (isset($this->htmlOptions['class']))\n $this->htmlOptions['class'] = ' ' . $classes;\n else\n $this->htmlOptions['class'] = $classes;\n }\n\n parent::init();\n }", "private function pageList() {\n //get pager range\n $this->getPagerRange();\n\n //loop specified ranged pager list\n\t\t//there is no link for current page number\n for ($i = $this->minPager; $i <= $this->maxPager; $i++) {\n if ($i == $this->currentPage) {\n print '<li class=\"current-page\">' . $i . '</li>';\n } else {\n print '<li><a href=\"' . $this->url . '&page=' . $i . '\">' . $i . '</a></li>';\n }\n }\n }", "public function actionPages()\n {\n $searchModel = new PostSearchPages();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n\n return $this->render('pages/index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function pagination( $query ) {\n\n\t# Get the current page.\n\tif ( ! $current_page = get_query_var( 'paged' ) ) {\n\t\t$current_page = 1;\n\t}\n\n\techo paginate_links( array(\n\t\t'base' => get_pagenum_link( 1 ) . '%_%',\n\t\t'format' => 'page/%#%/',\n\t\t'current' => $current_page,\n\t\t'total' => $total,\n\t\t'mid_size' => 4,\n\t\t'type' => 'plain'\n\t) );\n}", "function emm_paginate($args = null) {\n\t$defaults = array(\n\t\t'page' => null, 'pages' => null, \n\t\t'range' => 3, 'gap' => 3, 'anchor' => 1,\n\t\t'before' => '<ul class=\"pagination\">', 'after' => '</ul>',\n\t\t'title' => __('<li class=\"unavailable\"></li>'),\n\t\t'nextpage' => __('&raquo;'), 'previouspage' => __('&laquo'),\n\t\t'echo' => 1\n\t);\n\n\t$r = wp_parse_args($args, $defaults);\n\textract($r, EXTR_SKIP);\n\n\tif (!$page && !$pages) {\n\t\tglobal $wp_query;\n\n\t\t$page = get_query_var('paged');\n\t\t$page = !empty($page) ? intval($page) : 1;\n\n\t\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t\t$pages = intval(ceil($wp_query->found_posts / $posts_per_page));\n\t}\n\t\n\t$output = \"\";\n\tif ($pages > 1) {\t\n\t\t$output .= \"$before<li>$title</li>\";\n\t\t$ellipsis = \"<li class='unavailable'>...</li>\";\n\n\t\tif ($page > 1 && !empty($previouspage)) {\n\t\t\t$output .= \"<li><a href='\" . get_pagenum_link($page - 1) . \"'>$previouspage</a></li>\";\n\t\t}\n\t\t\n\t\t$min_links = $range * 2 + 1;\n\t\t$block_min = min($page - $range, $pages - $min_links);\n\t\t$block_high = max($page + $range, $min_links);\n\t\t$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;\n\t\t$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;\n\n\t\tif ($left_gap && !$right_gap) {\n\t\t\t$output .= sprintf('%s%s%s', \n\t\t\t\temm_paginate_loop(1, $anchor), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop($block_min, $pages, $page)\n\t\t\t);\n\t\t}\n\t\telse if ($left_gap && $right_gap) {\n\t\t\t$output .= sprintf('%s%s%s%s%s', \n\t\t\t\temm_paginate_loop(1, $anchor), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop($block_min, $block_high, $page), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t);\n\t\t}\n\t\telse if ($right_gap && !$left_gap) {\n\t\t\t$output .= sprintf('%s%s%s', \n\t\t\t\temm_paginate_loop(1, $block_high, $page),\n\t\t\t\t$ellipsis,\n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$output .= emm_paginate_loop(1, $pages, $page);\n\t\t}\n\n\t\tif ($page < $pages && !empty($nextpage)) {\n\t\t\t$output .= \"<li><a href='\" . get_pagenum_link($page + 1) . \"'>$nextpage</a></li>\";\n\t\t}\n\n\t\t$output .= $after;\n\t}\n\n\tif ($echo) {\n\t\techo $output;\n\t}\n\n\treturn $output;\n}", "function emm_paginate($args = null) {\n\t$defaults = array(\n\t\t'page' => null, 'pages' => null, \n\t\t'range' => 3, 'gap' => 3, 'anchor' => 1,\n\t\t'before' => '<ul class=\"pagination\">', 'after' => '</ul>',\n\t\t'title' => __('<li class=\"unavailable\"></li>'),\n\t\t'nextpage' => __('&raquo;'), 'previouspage' => __('&laquo'),\n\t\t'echo' => 1\n\t);\n\n\t$r = wp_parse_args($args, $defaults);\n\textract($r, EXTR_SKIP);\n\n\tif (!$page && !$pages) {\n\t\tglobal $wp_query;\n\n\t\t$page = get_query_var('paged');\n\t\t$page = !empty($page) ? intval($page) : 1;\n\n\t\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t\t$pages = intval(ceil($wp_query->found_posts / $posts_per_page));\n\t}\n\t\n\t$output = \"\";\n\tif ($pages > 1) {\t\n\t\t$output .= \"$before<li>$title</li>\";\n\t\t$ellipsis = \"<li class='unavailable'>...</li>\";\n\n\t\tif ($page > 1 && !empty($previouspage)) {\n\t\t\t$output .= \"<li><a href='\" . get_pagenum_link($page - 1) . \"'>$previouspage</a></li>\";\n\t\t}\n\t\t\n\t\t$min_links = $range * 2 + 1;\n\t\t$block_min = min($page - $range, $pages - $min_links);\n\t\t$block_high = max($page + $range, $min_links);\n\t\t$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;\n\t\t$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;\n\n\t\tif ($left_gap && !$right_gap) {\n\t\t\t$output .= sprintf('%s%s%s', \n\t\t\t\temm_paginate_loop(1, $anchor), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop($block_min, $pages, $page)\n\t\t\t);\n\t\t}\n\t\telse if ($left_gap && $right_gap) {\n\t\t\t$output .= sprintf('%s%s%s%s%s', \n\t\t\t\temm_paginate_loop(1, $anchor), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop($block_min, $block_high, $page), \n\t\t\t\t$ellipsis, \n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t);\n\t\t}\n\t\telse if ($right_gap && !$left_gap) {\n\t\t\t$output .= sprintf('%s%s%s', \n\t\t\t\temm_paginate_loop(1, $block_high, $page),\n\t\t\t\t$ellipsis,\n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$output .= emm_paginate_loop(1, $pages, $page);\n\t\t}\n\n\t\tif ($page < $pages && !empty($nextpage)) {\n\t\t\t$output .= \"<li><a href='\" . get_pagenum_link($page + 1) . \"'>$nextpage</a></li>\";\n\t\t}\n\n\t\t$output .= $after;\n\t}\n\n\tif ($echo) {\n\t\techo $output;\n\t}\n\n\treturn $output;\n}", "public static function pagination($pagination_type = null, $query = null) {\n\t\tif ( is_null( $pagination_type ) ) {\n\t\t\t$pagination_type = wpv_get_option( 'pagination-type' );\n\t\t}\n\n\t\tif ( is_null( $query ) ) {\n\t\t\t$query = $GLOBALS['wp_query'];\n\t\t}\n\n\t\tif($pagination_type == 'paged') {\n\t\t\tself::pagination_list( $query );\n\t\t} elseif($pagination_type == 'basic') {\n\t\t\tpaginate_links();\n\t\t} else {\n\t\t\t$max = $query->max_num_pages;\n\t\t\t$paged = ( get_query_var('paged') > 1 ) ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);\n\n\t\t\t$class = apply_filters('wpv_lmbtn_class', 'lm-btn button clearboth');\n\n\t\t\tif((int)$max > (int)$paged) {\n\t\t\t\t$url = remove_query_arg(array('page', 'paged'));\n\t\t\t\t$url .= (strpos($url, '?') === false) ? '?' : '&';\n\t\t\t\t$url .= 'paged='.($paged+1);\n\n\t\t\t\techo '<div class=\"load-more\"><a href=\"'.esc_attr( $url ) .'\" class=\"'.$class.'\"><span>'.__('Load more', 'church-event').'</span></a></div>';\n\t\t\t}\n\t\t}\n\t}", "protected static function handle_pagination($content) { \n\n\t\tpreg_match('/{- BEGIN PAGINATION -}.*?{- END PAGINATION -}/s', $content, $pnation);\n\n\t\t$autolink = BlogPad::has_setting('auto_link');\n\n\t\t$p_processed = '';\n\n\t\tif( !empty($pnation[0]) ) {\n\n\t\t\t$txt = $pnation[0];\n\n\t\t\tif(preg_match('/{- BEGIN COUNTDOWN -}.*?{- END COUNTDOWN -}/s', $pnation[0], $cdown) ) {\n\t\t\t\t$_cdown = str_replace('{- BEGIN COUNTDOWN -}', '<div class=\"bp-countdown\"><?php $i = 1; while($i <= $paginate[\"last_page\"]): ?>', $txt);\n\n\t\t\t\t$_cdown = preg_replace('/(.*?){- number -}(.*)/', ($autolink ? '$1<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $i, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo $i;?></a>$2': '$1<?php echo $i;?>$2'), $_cdown);\n\n\t\t\t\t$_cdown = str_replace('{- END COUNTDOWN -}', '<?php $i++; endwhile; ?></div>', $_cdown);\n\n\t\t\t\t$txt = str_replace($pnation[0], $_cdown, $txt);\n\t\t\t}\n\n\t\t\t// Support the placement of custom text that will be used as a label, else display the relevant page numbers.\n\t\t\t$rplace = preg_replace('/(.*?){- previous:?([A-z0-9\\s]+)? -}(.*)/', '<?php if( !($pagenum - 1 <= 0) ): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum - 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum - 1;?></a>': '<?php echo (trim(\"$2\" !== \"\")) ? \"$2\": $pagenum - 1;?>').'$3<?php endif;?>', $txt);\n\n\n\t\t\t$rplace = preg_replace('/(.*?){- next:?([A-z0-9\\s]+)? -}(.*)/', '<?php if($pagenum + 1 > 1 && $pagenum < $paginate[\"last_page\"]): ?>$1'.($autolink ? '<a href=\"<?php echo Link_Parser::generate_link(BlogPad::$template, array(\"num\" => $pagenum + 1, \"word\" => (isset($word)) ? $word: \"\"));?>\"><?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?></a>': '<?php echo (trim(\"$2\") !== \"\") ? \"$2\": $pagenum + 1;?>').'$3<?php endif;?>', $rplace);\n\n\t\t\t$p_processed .= $rplace;\n\n\t\t\t$p_processed = str_replace('{- BEGIN PAGINATION -}', '<div class=\"bp-pagination\">', $p_processed);\n\t\t\t$p_processed = str_replace('{- END PAGINATION -}', '</div>', $p_processed);\n\n\t\t\t$content = str_replace($pnation[0], $p_processed, $content);\n\t\t}\n\n\t\treturn $content;\n\t}", "protected function renderListNavigation()\n {\n $totalPages = ceil($this->totalItems / $this->iLimit);\n\n $content = '';\n\n // Show page selector if not all records fit into one page\n if ($totalPages > 1) {\n $first = $previous = $next = $last = '';\n $listURL = $this->listURL('', $this->table);\n\n // 1 = first page\n $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;\n\n // Compile first, previous, next, last and refresh buttons\n if ($currentPage > 1) {\n $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:first');\n\n $first = '<a href=\"' . $listURL . '&pointer=0\"><img' . IconFactory::skinImg('control_first.gif')\n . 'alt=\"' . $labelFirst . '\" title=\"' . $labelFirst . '\" /></a>';\n } else {\n $first = '<img' . IconFactory::skinImg('control_first_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage - 1) > 0) {\n $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:previous');\n\n $previous = '<a href=\"' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_previous.gif')\n . 'alt=\"' . $labelPrevious . '\" title=\"' . $labelPrevious . '\" /></a>';\n } else {\n $previous = '<img' . IconFactory::skinImg('control_previous_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage + 1) <= $totalPages) {\n $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:next');\n\n $next = '<a href=\"' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_next.gif')\n . 'alt=\"' . $labelNext . '\" title=\"' . $labelNext . '\" /></a>';\n } else {\n $next = '<img' . IconFactory::skinImg('control_next_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if ($currentPage != $totalPages) {\n $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:last');\n\n $last = '<a href=\"' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_last.gif')\n . 'alt=\"' . $labelLast . '\" title=\"' . $labelLast . '\" /></a>';\n } else {\n $last = '<img' . IconFactory::skinImg('control_last_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n $pageIndicator = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:pageIndicator'),\n $currentPage, $totalPages);\n\n if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {\n $lastElementNumber = $this->firstElementNumber + $this->iLimit;\n } else {\n $lastElementNumber = $this->totalItems;\n }\n $rangeIndicator = '<span class=\"pageIndicator\">'\n . sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:rangeIndicator'),\n $this->firstElementNumber + 1, $lastElementNumber, $this->totalItems)\n . '</span>';\n\n $content .= '<div class=\"ttnewsadmin-pagination\">'\n . $first . $previous\n . '&nbsp;'\n . $rangeIndicator . '&nbsp;('\n . $pageIndicator . ')&nbsp;'\n . $next . $last\n . '</div>';\n } // end of if pages > 1\n\n $data = Array();\n $titleColumn = $this->fieldArray[0];\n $data[$titleColumn] = $content;\n\n return ($this->addElement(1, '', $data));\n }", "function emm_paginate($args = null) {\n\n\t$defaults = array(\n\n\t\t'page' => null, 'pages' => null, \n\n\t\t'range' => 3, 'gap' => 3, 'anchor' => 1,\n\n\t\t'before' => '<div class=\"emm-paginate\">', 'after' => '</div>',\n\n\t\t'title' => __('Pages:'),\n\n\t\t'nextpage' => __('&raquo;'), 'previouspage' => __('&laquo'),\n\n\t\t'echo' => 1\n\n\t);\n\n\n\n\t$r = wp_parse_args($args, $defaults);\n\n\textract($r, EXTR_SKIP);\n\n\n\n\tif (!$page && !$pages) {\n\n\t\tglobal $wp_query;\n\n\n\n\t\t$page = get_query_var('paged');\n\n\t\t$page = !empty($page) ? intval($page) : 1;\n\n\n\n\t\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\n\t\t$pages = intval(ceil($wp_query->found_posts / $posts_per_page));\n\n\t}\n\n\t\n\n\t$output = \"\";\n\n\tif ($pages > 1) {\t\n\n\t\t$output .= \"$before<span class='emm-title'>$title</span>\";\n\n\t\t$ellipsis = \"<span class='emm-gap'>...</span>\";\n\n\n\n\t\tif ($page > 1 && !empty($previouspage)) {\n\n\t\t\t$output .= \"<a href='\" . get_pagenum_link($page - 1) . \"' class='emm-prev'>$previouspage</a>\";\n\n\t\t}\n\n\t\t\n\n\t\t$min_links = $range * 2 + 1;\n\n\t\t$block_min = min($page - $range, $pages - $min_links);\n\n\t\t$block_high = max($page + $range, $min_links);\n\n\t\t$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;\n\n\t\t$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;\n\n\n\n\t\tif ($left_gap && !$right_gap) {\n\n\t\t\t$output .= sprintf('%s%s%s', \n\n\t\t\t\temm_paginate_loop(1, $anchor), \n\n\t\t\t\t$ellipsis, \n\n\t\t\t\temm_paginate_loop($block_min, $pages, $page)\n\n\t\t\t);\n\n\t\t}\n\n\t\telse if ($left_gap && $right_gap) {\n\n\t\t\t$output .= sprintf('%s%s%s%s%s', \n\n\t\t\t\temm_paginate_loop(1, $anchor), \n\n\t\t\t\t$ellipsis, \n\n\t\t\t\temm_paginate_loop($block_min, $block_high, $page), \n\n\t\t\t\t$ellipsis, \n\n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\n\t\t\t);\n\n\t\t}\n\n\t\telse if ($right_gap && !$left_gap) {\n\n\t\t\t$output .= sprintf('%s%s%s', \n\n\t\t\t\temm_paginate_loop(1, $block_high, $page),\n\n\t\t\t\t$ellipsis,\n\n\t\t\t\temm_paginate_loop(($pages - $anchor + 1), $pages)\n\n\t\t\t);\n\n\t\t}\n\n\t\telse {\n\n\t\t\t$output .= emm_paginate_loop(1, $pages, $page);\n\n\t\t}\n\n\n\n\t\tif ($page < $pages && !empty($nextpage)) {\n\n\t\t\t$output .= \"<a href='\" . get_pagenum_link($page + 1) . \"' class='emm-next'>$nextpage</a>\";\n\n\t\t}\n\n\n\n\t\t$output .= $after;\n\n\t}\n\n\n\n\tif ($echo) {\n\n\t\techo $output;\n\n\t}\n\n\n\n\treturn $output;\n\n}", "function ht_dms_paginated_view_container( $view, $args, $content = '' ) {\n\t$handle = false;\n\t$attrs = array(\n\t\t'view' => $view,\n\t\t'page' => pods_v( 'page', $args, 1 ),\n\t\t'limit' => pods_v( 'limit', $args, 5 ),\n\n\t);\n\n\tif ( $view == 'decision' ) {\n\t\t$attrs[ 'status' ] = $args[ 'status' ];\n\t\t$view = 'decision-'.strtolower( $args[ 'status' ] );\n\t\t$attrs[ 'gid' ] = $args[ 'gID' ];\n\t\t$handle = 'decision-preview';\n\n\t}\n\n\tif ( strpos($view, 'group' ) > 0 ) {\n\t\t$handle = 'group-preview';\n\t}\n\n\tif ( strpos( $view, 'organization') ) {\n\t\t$handle = 'organization-preview';\n\t}\n\n\tif ( $view === 'users_notifications' ) {\n\t\t$attrs[ 'unViewedOnly' ] = 1;\n\n\t}\n\n\tif ( isset( $args[ 'oID' ] ) ) {\n\t\t$attrs[ 'oid' ] = $args[ 'oID' ];\n\t}\n\n\t$attributes = '';\n\tforeach( $attrs as $attr => $value ) {\n\t\t$value = strtolower( $value );\n\t\t$attributes .= $attr.'=\"'.esc_attr( $value ) .'\" ';\n\t}\n\n\t$spinner = ht_dms_spinner();\n\t$out = '<div id=\"' .esc_attr( $view ) . '\" '.$attributes . ' >' . html_entity_decode( $content ) . '</div>';\n\tif ( $view == 'users_notifications' ) {\n\t\t$out = ht_dms\\ui\\build\\notification\\elements::notification_view_header() . $out;\n\t\t$out .= ht_dms_ui()->view_loaders()->handlebars_template( 'notification' );\n\t}\n\n\tholotree_enqueue_handlebar( $handle, ht_dms_ui()->view_loaders( )->handlebars_template_file_location( $handle ) );\n\n\t$out .= sprintf( '<div id=\"%1s-spinner\" class=\"pagination-spinner spinner\">%2s</div>', $view, $spinner );\n\n\n\treturn $out;\n\n}", "public function Carregar_Pagina() : void\n {\n $view = $this->Retornar_Pagina();\n \n $view->set_peca_id($this->obj_contato_anunciante->get_obj_peca()->get_id());\n \n $view->Executar();\n }", "protected function render() {\t\t\n\t\t\n\t\t$settings = $this->get_settings();\n\t\t\n\t\t// start printing gallery\n\t\t$current_size = 0;\n\t\t$settings['num-fetch'] = empty($settings['num-fetch'])? 9999: intval($settings['num-fetch']);\n\t\t$paged = (get_query_var('paged'))? get_query_var('paged') : 1;\n\t\t$num_page = ceil(sizeof($settings['slider']) / $settings['num-fetch']);?>\n\t\t<div class=\"wpha-item-holder main-gallery-wrapper main-gallery-<?php echo esc_attr( $this->get_id() ); ?>\">\n\t\t\t<?php \n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 wpha-listing-item gallery-slider kode-style-gal-'.esc_attr($settings['style']).' kode-gallery kode-gutter-gallery bottom-spacer\">';\n\t\t\t\n\t\t\tif($settings['style'] == 'simple-gallery'){\n\t\t\t\t\n\t\t\t\techo '<div class=\"kode-item\">';\t\n\t\t\t\t\n\t\t\t\tforeach($settings['slider'] as $slide_id => $slides){\n\t\t\t\t\tif( ($current_size >= ($paged - 1) * $settings['num-fetch']) &&\n\t\t\t\t\t\t($current_size < ($paged) * $settings['num-fetch']) ){\n\n\t\t\t\t\t\tif( !empty($current_size) && ($current_size % $settings['gallery-columns'] == 0) ){\n\t\t\t\t\t\t\techo '<div class=\"clear\"></div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image_src = '';\n\t\t\t\t\t\tif(!empty($slides['main_gallery_settings_slide']['id'])){\n\t\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\t$image_src = $image_src[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$image_src = $slides['main_gallery_settings_slide']['url'];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"gallery-item columns ' . wpha_get_column_class_updated('1/' . $settings['gallery-columns']) . '\">\n\t\t\t\t\t\t\t<div class=\"kode_gallery_fig\">\n\t\t\t\t\t\t\t\t<figure class=\"them_overlay\">\n\t\t\t\t\t\t\t\t\t<img src=\"'.esc_url($image_src).'\" alt=\"\">\n\t\t\t\t\t\t\t\t\t<a class=\"hvr-ripple-out\" data-rel=\"prettyphoto[]\" href=\"'.esc_url($image_src).'\"><i class=\"fa fa-expand\"></i></a>\n\t\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>'; // gallery column\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$current_size ++;\n\t\t\t\t}\n\t\t\t\techo '<div class=\"clearfix clear\"></div>';\n\t\t\t\techo '</div>'; // kode-gallery-item\n\t\t\t}else if($settings['style'] == 'gallery-slider'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '<div data-margin=\"0\" data-slide=\"'.esc_attr($settings['gallery-columns']).'\" data-small-slide=\"'.esc_attr($settings['gallery-columns']).'\" class=\"owl-carousel-item owl-theme-item kode_video_list\">';\n\t\t\t\t\n\t\t\t\tforeach($settings['slider'] as $slide_id => $slides){\n\t\t\t\t\tif( ($current_size >= ($paged - 1) * $settings['num-fetch']) &&\n\t\t\t\t\t\t($current_size < ($paged) * $settings['num-fetch']) ){\n\n\t\t\t\t\t\tif( !empty($current_size) && ($current_size % $settings['gallery-columns'] == 0) ){\n\t\t\t\t\t\t\techo '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$image_src = '';\n\t\t\t\t\t\tif(!empty($slides['main_gallery_settings_slide']['id'])){\n\t\t\t\t\t\t\t$image_id = $this->wpjb_get_image_id($slides['main_gallery_settings_slide']['url']);\n\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_id, $settings['thumbnail-size']);\n\t\t\t\t\t\t\t$image_src = $image_src[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$image_src = $slides['main_gallery_settings_slide']['url'];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"items columns\">\n\t\t\t\t\t\t\t<img src=\"'.esc_url($image_src).'\" alt=\"\" />\n\t\t\t\t\t\t</div>'; // gallery item\n\t\t\t\t\t}\n\t\t\t\t\t$current_size ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</div>'; // kode-gallery-item\n\n\t\t\t}\n\t\t\t\n\t\t\tif( $settings['pagination'] == true ){\n\t\t\t\techo baldiyaat_get_pagination($num_page, $paged);\n\t\t\t}\n\t\t\t\n\t\techo '</div></div></div>'; // kode-gallery-item\n\t\t\n\t\t\n\t}", "private function getPaginatorType1($current_page = 0, $total_pages = 2, $conditions = \"\", $condition_encode = false){\n \t\t\t\t$cuppa = Cuppa::getInstance();\n $language = $cuppa->language->load();\n if($total_pages <= 1) return \"\";\n \t\t\t\t$field = \"<div class='paginator'>\";\n \t\t\t\t\t$field .= \"<ul>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(0, \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='First page' class='paging_far_left'></div></a></li>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page-1).\", \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Prev page' class='paging_left'></div></a></li>\";\n \t\t\t\t\t\tif($this->pages_info) $field .= \"<li><div title='' class='current_page'>\".$cuppa->language->getValue(\"Page\",$language).\" <b>\".(@$current_page+1).\"</b> / $total_pages</div></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page+1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Next page' class='paging_right'></div></a></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($total_pages-1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Last page' class='paging_far_right'></div></a></li>\";\n \t\t\t\t\t\t$field .= \"<li><div class='select_page_div'>\".$this->getPagesList($current_page, $total_pages).\"</div></li>\";\n \t\t\t\t\t$field .= \"</ul>\"; \n \t\t\t\t\t$field .= \"<input type='hidden' value='\".$current_page.\"' id='page' name='page' />\";\n $field .= \"<input type='hidden' value='' id='page_item_start' name='page_item_start' />\";\n if($condition_encode) $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.base64_encode($conditions).'\"/>';\n else $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.$conditions.'\"/>';\n \t\t\t\t$field .= \"</div>\";\n \t\t\t\treturn $field;\n \t\t\t}", "public function pagingV1($DivID,$count,$perpage,$start,$link)\n\t{\n\t\t$num = $count;\n\t\t$per_page = $perpage; // Number of items to show per page\n\t\t$showeachside = 4; // Number of items to show either side of selected page\n\t\tif(empty($start)){$start = 0;} // Current start position\n\t\telse{$start = $start;}\n\t\t$max_pages = ceil($num / $per_page); // Number of pages\n\t\t$cur = ceil($start / $per_page)+1; // Current page number\n\t\t\n\t\t// ADDED: 8/21/14 by Robotman321\n\t\t// Used to make the pages \"nicer\"\n\t\tif($max_pages == 1)\n\t\t{\n\t\t\t$front = \"<span style=\\\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\\\">$max_pages Page</span>&nbsp;\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$front = \"<span style=\\\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\\\">$max_pages Pages</span>&nbsp;\";\n\t\t}\n\t\t\n\t\tif(($start-$per_page) >= 0)\n\t\t{\n\t\t\t$next = $start-$per_page;\n\t\t\t$startpage = '<a href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.($next>0?(\"&page=\").$next:\"\") . '\\');return false;\" style=\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\">&lt;</a>';\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$startpage = '';\n\t\t}\n\t\tif($start+$per_page<$num){\n\t\t\t$endpage = '<a href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.'&page='.max(0,$start+1) . '\\');return false;\" style=\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\">&gt;</a>';\n\t\t}\n\t\telse {\n\t\t\t$endpage = '';\n\t\t}\n\t\t$eitherside = ($showeachside * $per_page);\n\t\tif($start+1 > $eitherside){\n\t\t\t$frontdots = \" ...\";\n\t\t}\n\t\telse {$frontdots = '';}\n\t\t$pg = 1;\n\t\t$middlepage = '';\n\t\tfor($y=0;$y<$num;$y+=$per_page)\n\t\t{\n\t\t\t$style=($y==$start)?\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;font-weight:bold;\":\"padding:1px 3px 1px 3px;margin:1px;border:1px solid gray;background-color:#99e6ff;\";\n\t\t\tif(($y > ($start - $eitherside)) && ($y < ($start + $eitherside)))\n\t\t\t{\n\t\t\t\t$middlepage .= '<a style=\"'.$style.'\" href=\"#\" onClick=\"$(\\'#' . $DivID . '\\').load(\\'' . $link.($y>0?(\"&page=\").$y:\"\") . '\\');return false;\">'.$pg.'</a>&nbsp;';\n\t\t\t}\n\t\t\t$pg++;\n\t\t}\n\t\tif(($start+$eitherside)<$num){\n\t\t\t$enddots = \"... \";\n\t\t}\n\t\telse {$enddots = '';}\n\t\t\n\t\techo '<div class=\"fontcolor\">'.$front.$startpage.$frontdots.$middlepage.$enddots.$endpage.'</div>';\n\t}" ]
[ "0.6706351", "0.6679102", "0.63688225", "0.632073", "0.6236926", "0.6229082", "0.6060398", "0.6033004", "0.5996919", "0.598814", "0.59765697", "0.596321", "0.5944703", "0.5944703", "0.5928813", "0.59102273", "0.588137", "0.5876781", "0.58454365", "0.5843226", "0.5833557", "0.5814409", "0.5811828", "0.580343", "0.5801139", "0.57896787", "0.5746656", "0.57397443", "0.5733936", "0.57315654", "0.57217073", "0.57077926", "0.57070637", "0.5704911", "0.569431", "0.56938726", "0.56888145", "0.5672932", "0.56635565", "0.5631031", "0.56260204", "0.5623204", "0.56155044", "0.56101406", "0.55910814", "0.55897385", "0.55856335", "0.5566756", "0.5566188", "0.55651146", "0.55651146", "0.5561741", "0.55583745", "0.5548785", "0.55383635", "0.5532051", "0.5517443", "0.55145955", "0.550929", "0.5507769", "0.5492452", "0.54907197", "0.5486761", "0.5464961", "0.5461948", "0.5436099", "0.5435937", "0.5434534", "0.54245806", "0.54196566", "0.5418514", "0.5412944", "0.5402736", "0.53971803", "0.5395516", "0.53911924", "0.53862286", "0.5374613", "0.53686434", "0.5366461", "0.53658247", "0.53626156", "0.53543925", "0.53497654", "0.5339003", "0.53286284", "0.5328197", "0.5322488", "0.5314592", "0.5312247", "0.5296579", "0.5296579", "0.52826405", "0.527871", "0.52734005", "0.5258948", "0.5257734", "0.5256246", "0.5244932", "0.52401567", "0.52322227" ]
0.0
-1
Renders a given page.
public function page(int $page): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function render_page();", "public function render_page() {\n\t\t$this->render_template();\n\t}", "function &renderPage( $page=0 )\r\n {\r\n $generator =& $this->generator();\r\n// print( \"Using renderer: \" . $this->RendererClass . \"<br>\");\r\n \r\n return $generator->renderPage( $page );\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function render() {\n\t\t$this->render_page_content();\n\t}", "abstract protected function render_page_content(): void;", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "function render($page){\n\t\t$url = $this->url;\n\t\tif($page != null) {\n\t\t\t$page->loadLayout();\n\t\t\t$page->calculatePaths();\n\n\t\t\t$toLoad = $page->controlFile;\n\t\t\tfileUtil::trimLeftDir($toLoad);\n\t\t\t$toLoad = fileutil::stripExt($toLoad);\n\n\t\t\t//update the globals to reflect our actual page\n\t\t\t$_SERVER[\"PHP_SELF\"] = $GLOBALS[\"SiteRoot\"].$toLoad;\n\t\t\t$_SERVER[\"PHP_SELF_NOEXT\"] = fileutil::stripExt($GLOBALS[\"SiteRoot\"].$toLoad);\n\t\t\t$_SERVER[\"PHP_SELFDIR\"] = fileutil::stripFile($_SERVER[\"PHP_SELF\"]).\"/\";\n\t\t}\n\t\telse {\n\t\t\t$page = page::loadPage(\"errors/404\");\n\t\t}\n\n\t\t//do a security check\n\t\tif( !security::hasPageAccess($page) ) {\n\t\t\techo(\"Permission Denied for $page->url!\");\n\t\t\tdie();\n\t\t}\n\n\t\t//trigger any page events\n\t\t$page->handleEvents();\n\n\t\t//handle any ajax get requests\n\t\t$page->handleAjax();\n\n\t\t//if this is an ajax post, we don't need to render.\n\t\t//It was just interested in executing events\n\t\tif(util::getData(\"ajaxpost\")!=\"\")\n\t\t\tdie();\n\n\t\t$this->callTemplate($page);\n\t}", "private function _render($page)\r\n\t{\r\n\t\tif ($page->getLoginNeeded() == Model_Page_Front::LOGIN_REQUIRED)\r\n\t\t{\r\n\t\t\tAuthUser::load();\r\n\r\n\t\t\tif (!AuthUser::isLoggedIn())\r\n\t\t\t{\r\n\t\t\t\tFlash::set('redirect', $page->url());\r\n\r\n\t\t\t\t$this->go_backend();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tObserver::notify('frontpage_found', array($page));\r\n\r\n\t\t$html = (string) $page->render_layout();\r\n\t\t\r\n\r\n\t\tif ( AuthUser::isLoggedIn())\r\n\t\t{\r\n\t\t\t$inject_html = (string) View::factory( 'system/blocks/toolbar' );\r\n\t\t\t\r\n\t\t\tif(Setting::get( 'profiling' ) == 'yes')\r\n\t\t\t{\r\n\t\t\t\t$inject_html .= (string) View::factory( 'profiler/stats' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Insert system HTML before closed tag body\r\n\t\t\t$matches = preg_split('/(<\\/body>)/i', $html, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); \r\n\t\t\t/* assemble the HTML output back with the iframe code in it */\r\n\t\t\t$html = $matches[0] . $inject_html . $matches[1] . $matches[2];\r\n\t\t}\r\n\t\t\r\n\t\techo Response::factory()\r\n\t\t\t->body($html);\r\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "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 }", "public static function render($type, $page)\n\t{\n\t\t$page_location = BASE.'views/'.$type.'/'.$page.'.php';\n\t\trequire_once(BASE.'/views/template.php');\n\t}", "public function drawPage()\n\t\t{\n\t\t}", "function render($page){\n if(file_exists(FOLDER_VIEWS.S.$page.\".php\")){\n extract($this->vars);\n require_once FOLDER_VIEWS.S.$page.\".php\";\n }else{\n header(\"location: \".REDIRECT_ERROR003);\n }\n }", "public function render_page() {\n\n\t\t// Early bail if we're not on the right page.\n\t\tif ( Param::get( 'page' ) !== $this->slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ob_get_length() ) {\n\t\t\tob_end_clean();\n\t\t}\n\n\t\t$assets = new Assets();\n\t\t$assets->register();\n\n\t\twp_styles()->done = [];\n\t\twp_scripts()->done = [];\n\n\t\t// Enqueue styles.\n\t\t\\CMB2_Hookup::enqueue_cmb_css();\n\t\t\\CMB2_Hookup::enqueue_cmb_js();\n\n\t\t// Wizard.\n\t\twp_enqueue_style( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/css/setup-wizard.css', [ 'wp-admin', 'buttons', 'cmb2-styles', 'rank-math-common', 'rank-math-cmb2' ], rank_math()->version );\n\n\t\t$logo_url = '<a href=\"' . KB::get( 'logo' ) . '\" target=\"_blank\"><img src=\"' . esc_url( rank_math()->plugin_url() . 'assets/admin/img/logo.svg' ) . '\"></a>';\n\n\t\tob_start();\n\n\t\t/**\n\t\t * Start the actual page content.\n\t\t */\n\t\tinclude_once $this->get_view( 'header' );\n\t\tinclude_once $this->get_view( 'content' );\n\t\tinclude_once $this->get_view( 'footer' );\n\t\texit;\n\t}", "public function view($page)\n {\n $this->validated();\n $Data['Headers'] = get_page_headers();\n $this->load->view('layouts/main', $Data);\n }", "public static function render($page) {\n\t if(isset(self::$state)) {\n\t extract(self::$state,EXTR_SKIP);\n\t }\n\t include(self::getPagePath($page));\n\t}", "public function render($page, $data = []) {\n \n $data['isDashboard'] = TRUE;\n \n $data['breadcrumbs'] = $this->breadcrumbs->get();\n $this->load->view('components/header', $data);\n $page = 'pages/reports/' . $page;\n $this->load->view($page, $data);\n \n $this->load->view('components/footer');\n }", "public function render($page, $data = []) {\n\n\t\t$data['isDashboard'] = TRUE;\n\t\t$data['breadcrumbs'] = $this->breadcrumbs->get();\n\t\t$data['user_type'] = $this->session->userdata('mode');\n\t\t\n\t\t$page = 'pages/members/' . $page;\n\n\t\t$this->load->view('components/header', $data);\n\n\t\t$this->load->view($page, $data);\n\n\t\t$this->load->view('components/footer', $data);\n\t}", "function renderPage() {\n $parameters = explode(\"/\", $this->getCurrentPage());\n $folder = $parameters[1];\n if (!in_array($folder, $this->folders) && $folder !== \"api\") {\n $name = $this->getCurrentPage();\n require_once $this->getBlueprintPath();\n }\n }", "public function render($page,$layout=null,$binding=false){\n\n $this->page = $page;\n $file = \"view/{$page}/index.php\";\n if(!empty($layout)) {\n try\n {\n //render page with a layout\n\n if(file_exists($layout_file = \"view/shared/{$layout}.php\")){\n require $layout_file;\n }else{\n throw new LayoutException;\n }\n }catch(LayoutException $layout_error){\n $this->page_error($layout_error,'LAYOUT_ERROR',$layout_file);\n }\n }else{\n try\n {\n //render page without layout\n if (file_exists($file)){\n require $file;\n }else{\n throw new PageException;\n }\n }catch (PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',$file);\n }\n }\n if($binding){\n\n }\n\n }", "public function actionView()\n {\n $page = ContainerPage::find()->contentContainer($this->contentContainer)->where(['custom_pages_container_page.id' => Yii::$app->request->get('id')])->one();\n\n if ($page === null) {\n throw new HttpException('404', 'Could not find requested page');\n }\n\n if ($page->type == Container::TYPE_IFRAME) {\n return $this->render('iframe', array('page' => $page, 'url' => $page->page_content));\n } elseif ($page->type == Container::TYPE_LINK) {\n return $this->redirect($page->page_content);\n } elseif ($page->type == Container::TYPE_MARKDOWN) {\n return $this->render('markdown', array('page' => $page, 'md' => $page->page_content));\n } elseif ($page->type == Container::TYPE_TEMPLATE) {\n return $this->viewTemplatePage($page);\n } else {\n throw new HttpException('500', 'Invalid page type!');\n }\n }", "public function render($page,$layout=null){\n $file = \"view/{$page}/index.php\";\n $this->page = $page;\n if(!empty($layout)) {\n try\n {\n //render page with a layout\n if(file_exists($layout_file = \"view/shared/{$layout}.php\")){\n require $layout_file;\n }else{\n throw new LayoutException;\n }\n }catch(LayoutException $layout_error){\n $this->page_error($layout_error,'LAYOUT_ERROR',$layout_file);\n }\n }else{\n try\n {\n //render page without layout\n if (file_exists($file)){\n require $file;\n }else{\n throw new PageException;\n }\n }catch (PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',$file);\n }\n }\n\n\n\n }", "protected function render( $page_name , $data )\n\t {\n\t \t//append security headers\n\t \t$this->append_security_headers( $data );\n\t \tif( $this->_app_mode === 'json' )\n\t \t{\n\t \t\t//exits at once !\n\t \t\treturn $this->render_json( $data );\n\t \t}\n\t \t$this->load->view('admin/html/partials/head' , $data );\n\t \t$this->load->view('admin/html/' . $page_name , $data );\n\t \t//$this->load->view\n\t }", "public function _render_page($data = [])\n {\n \t$this->load->view('layouts/main', $data);\n }", "public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }", "public function renderPage(){\n try {\n // show deferred failure from initPage\n if( ! $this->ctrl ){\n throw new Loco_error_Exception( __('Page not found','loco-translate') );\n }\n // display loco admin page\n echo $this->ctrl->render();\n }\n catch( Exception $e ){\n $ctrl = new Loco_admin_ErrorController;\n try {\n $ctrl->_init( array() );\n }\n catch( Exception $_e ){\n // avoid errors during error rendering\n }\n echo $ctrl->renderError($e);\n }\n // ensure session always shutdown cleanly after render\n Loco_data_Session::close();\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "public function page(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/page', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "public function render()\r\n\t{\r\n\t\t$this->site->page = $this;\r\n\t\t// if noone is subscribed, we want to output our own 404\r\n\t\tif(!$this->site->event->subscribers('404'))\r\n\t\t{\r\n\t\t\t$this->site->event->subscribe('404', array($this, '_404'));\r\n\t\t}\r\n\t\tif( $this->controller === null )\r\n\t\t{\r\n\t\t\t$this->site->event->publish('404');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(ob_get_length() > 0)\r\n\t\t\t{\r\n\t\t\t\tob_end_clean();\r\n\t\t\t}\r\n\t\t\theader(\"Connection: close\");\r\n\t\t\theader(\"X-Powered-By: \"); // Remove the header, don't need to advertise how out of date we are...\r\n\t\t\t//TODO: Figure out how to remove \"Server\" header also.. doesn't appear you can do this from inside php?\r\n\t\t\tob_start();\r\n\t\t\t$this->site->event->publish('Page::onRender');\r\n\t\t\tcall_user_func_array(array($this->controller, 'setup'), $this->controllerParams);\r\n\t\t\tcall_user_func_array(array($this->controller, $this->controllerMethod), $this->controllerParams);\r\n // are we doing a json response? if not, we assume html...\r\n if($this->site->response->json === false\r\n && $this->site->webCatalog->isRedirect === false) {\r\n $viewFile = $this->controller->viewFile;\r\n if ($viewFile === null) // if not defined, auto grab em... @todo - this fails miserably when you're using dynamic paths. For now just set it in your controller. But it should be fixed.\r\n {\r\n if ($this->requestedPath === '/' ||\r\n $this->requestedPath === ''\r\n ) {\r\n $path = 'index';\r\n } else {\r\n if (strpos($this->requestedPath, '.')) {\r\n $path = substr($this->requestedPath, 0, strpos($this->requestedPath, '.'));\r\n } else {\r\n $path = $this->requestedPath;\r\n }\r\n $path = trim($path, '/');\r\n }\r\n if ($ext = $this->site->config('template', 'extension')) {\r\n $viewFile = $path . '.' . $ext;\r\n } else {\r\n $viewFile = $path . '.tpl';\r\n }\r\n }\r\n if ($this->controller->autoRender === true) {\r\n // do we have a view file?\r\n if (is_string($this->site->config('site', 'viewPath'))) {\r\n $viewPaths = [$this->site->config('site', 'viewPath')];\r\n } else {\r\n $viewPaths = $this->site->config('site', 'viewPath');\r\n }\r\n $_404 = true; // check if a valid template\r\n foreach ($viewPaths as $i => $p) {\r\n $viewPaths[$i] = $this->site->appFolder . $p;\r\n if (is_file($viewPaths[$i] . DIRECTORY_SEPARATOR . $viewFile) === true) {\r\n $_404 = false;\r\n }\r\n }\r\n if ($_404) {\r\n $this->site->event->publish('404');\r\n } else {\r\n switch ($this->site->config('template', 'engine')) {\r\n case 'smarty':\r\n // Summon Smarty Template Engine\r\n $this->template = new Smarty();\r\n $this->template->muteExpectedErrors(); // something is conflicting with our error class. See smarty docs for this.\r\n // Absolute path to the root template dir\r\n if ($this->site->config('site', 'viewPath')) {\r\n $this->template->setTemplateDir(realpath($this->site->appFolder . $this->site->config('site', 'viewPath')));\r\n } else {\r\n $this->site->error->toss('[site] viewPath must be defined in your config!');\r\n }\r\n if ($this->site->config('smarty', 'configDir')) {\r\n $this->template->setConfigDir(realpath($this->site->appFolder . $this->site->config('smarty', 'configDir')));\r\n }\r\n // These directories need FULL WRITE ACCESS\r\n // and could be stored outside of the web root for security purposes:\r\n if ($this->site->config('smarty', 'compileDir')) {\r\n $this->template->setCompileDir(realpath($this->site->appFolder . $this->site->config('smarty', 'compileDir')));\r\n }\r\n if ($this->site->config('smarty', 'cacheDir')) {\r\n $this->template->setCacheDir(realpath($this->site->appFolder . $this->site->config('smarty', 'cacheDir')));\r\n }\r\n $this->site->event->publish('Page::SmartyPlugins');\r\n // Assign template variables from the controller\r\n if (isset($this->controller->view)) {\r\n foreach ($this->controller->view as $key => $value) {\r\n $this->template->assign($key, $value);\r\n }\r\n }\r\n // Finally, display the template...\r\n try {\r\n $this->template->display($viewFile);\r\n } catch (Exception $e) {\r\n $this->site->error->toss($e->getMessage(), E_USER_WARNING);\r\n }\r\n break;\r\n case 'twig':\r\n\r\n try {\r\n\r\n $env = $this->getTwigEnvironment();\r\n $this->site->event->publish(\"Twig::Twig_Environment\", $env);\r\n\r\n echo $this->renderTemplate($viewFile, $this->controller->view);\r\n } catch (Exception $e) {\r\n $this->site->error->toss($e->getMessage(), E_USER_WARNING);\r\n $this->site->event->publish('404');\r\n }\r\n break;\r\n default:\r\n $fname = $this->site->appFolder . $this->site->config('site', 'viewPath') . '/' . $viewFile;\r\n if ($file = realpath($fname)) {\r\n require($file);\r\n } else {\r\n $this->site->error->toss('Unable to auto render with view file: ' . $fname);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\t\t\theader(\"Content-Length: \".ob_get_length());\r\n\t\t\tob_end_flush();\r\n\t\t\tflush();\r\n\t\t\tcall_user_func_array(array($this->controller, 'shutdown'), $this->controllerParams);\r\n\t\t\t$this->site->event->publish('Page::afterRender');\r\n\t\t}\r\n\t}", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "private function serve(Request $request, $page)\n {\n return $this->render(\n $request->getLocale().'/'.$page.'.html.twig'\n );\n }", "public function page($page_id)\n\t{\n\t\t$check = DB::select(\"SELECT COUNT(*) as count FROM pages WHERE path = '\".$page_id.\"'\")[0];\n\t\tif ($check->count == 0){\n\t\t\tabort(404);\n\t\t}\n\t\t$page = DB::select(\"SELECT * FROM pages WHERE path = '\".$page_id.\"'\")[0];\n\t\t$title = $page->title;\n\t\t$desc = mb_substr($page->content,0,75);\n\t\t$header = $this->header(translate($title),$desc,true);\n\t\t// Get blocs of the page builder\n\t\t$blocs = DB::select(\"SELECT * FROM blocs WHERE area = 'page' ORDER BY o ASC\");\n\t\t$footer = $this->footer();\n\t\treturn view('page')->with(compact('header','page','blocs','footer'));\n\t}", "public function view() {\n\t\t// Find page by url slug\n\t\t$slug = $this->app->getSlug();\n\t\t$page = Page::findBySlug($slug);\n\t\t\n\t\t// If page exists render it, otherwise 404\n\t\tif ($page) {\n\t\t\t$this->title = $page->name;\n\t\t\t$this->pageData['page'] = $page;\n\t\t\t$this->render('view');\n\t\t} else {\n\t\t\t$this->noRoute();\n\t\t}\n\t}", "abstract function render();", "public abstract function render();", "public abstract function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }", "abstract protected function RenderContent();", "protected abstract function renderContent();", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "function render_page($settings) {\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n return render_template(\"templates/page.html\", $settings);\n }", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "public function display($pageName);", "function page($page_name=null, $content_type=\"text/html\")\n{\n\t$page_path = PAGES . \"/\" . $page_name . \".php\";\n\tif(!file_exists($page_path)) throw new FrameworkException(\"$page_path: page doesn't exist\");\n\n\theader(\"content-type: \".$content_type);\n\trequire_once $page_path;\n}", "public function HandlePage()\n\t{\n\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\texit;\n\t\t}\n\n\t\t$this->SetVendorData();\n\n\t\tif($this->displaying == 'products') {\n\t\t\t$this->ShowVendorProducts();\n\t\t}\n\t\telse if($this->displaying == 'page') {\n\t\t\t$this->ShowVendorPage();\n\t\t}\n\t\telse if($this->displaying == 'profile') {\n\t\t\t$this->ShowVendorProfile();\n\t\t}\n\t\telse {\n\t\t\t$this->ShowVendors();\n\t\t}\n\t}", "public function quick_view( $page_name , $page = array('title' => '' , 'description' => '') )\r\n\t {\r\n\t\t $this->render( $page_name , $this->load_shop( $page ) );\r\n\t }", "public function index(Page $page)\n {\n save_resource_url();\n \n $page->load('sections');\n\n return $this->view('titan::pages.components.page_components')->with('page', $page);\n }", "public function display()\n {\n //If the page was cached\n if ($this->isCached)\n {\n //Nothing to do, we already showed the page\n return;\n }\n return $this->route->getView()->output();\n }", "public function viewAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getViewRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html'), ['tiles' => $tiles ]);\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "public function render()\n {\n $page = $this->twig->load($this->template);\n $this->prepareFlashMessages();\n $html = $page->render($this->vars);\n Router::sendResponse($html);\n }", "public function display() {\n\t\t$path = func_get_args();\n\n\t\t$count = count($path);\n\t\tif (!$count) {\n\t\t\t$this -> redirect('/');\n\t\t}\n\t\t$page = $subpage = $title_for_layout = null;\n\n\t\tif (!empty($path[0])) {\n\t\t\t$page = $path[0];\n\t\t}\n\t\tif (!empty($path[1])) {\n\t\t\t$subpage = $path[1];\n\t\t}\n\t\tif (!empty($path[$count - 1])) {\n\t\t\t$title_for_layout = Inflector::humanize($path[$count - 1]);\n\t\t}\n\t\t$this -> set(compact('page', 'subpage', 'title_for_layout'));\n\t\t$this -> render(implode('/', $path));\n\t}", "protected function renderPageWrapper( $args = array() )\n {\n return $this->render($this->findTemplatePath('page.html') , $args);\n }", "protected function getPageRenderer() {}", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function Page($page){\r\n $fullpath=ucwords($page).EXT;\r\n $this->Load($fullpath);\r\n }", "public function render(){\n require_once($_SERVER['DOCUMENT_ROOT'].\"//views/\".self::$page_name.\"/\".self::$page_name.\".php\");\n }", "public function show(Page $page)\n {\n\n }", "abstract public function render() ;", "public static function renderContent() {}", "public function render()\n {\n header(\"Content-Type: application/xhtml+xml;charset=iso-8859-1\");\n\n $renderedPage = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>' . PHP_EOL;\n\n /*--------------------------------------------------------------------\n\t Dump header definition, namespace etc\n ------------------------------------------------------------------*/\n\n // render all of the page content\n $renderedPage .= parent::render();// . PHP_EOL;\n \n\n// error_log(\"XML: \" . $renderedPage);\n\n if ($this->isDirectDisplay() == true)\n {\t \n echo $renderedPage;\n }\n return $renderedPage;\n }", "public function display($page){ \n switch($page){\n case 'cities':\n $this->get_big_four_cities();\n break;\n case 'women':\n $this->get_wfashion();\n break;\n case 'men':\n $this->get_mfashion();\n break;\n case 'lifestyle':\n $this->get_lifestyle();\n break;\n case 'culture':\n $this->get_culture();\n break;\n default:\n $this->get_big_four_cities();\n \n } \n }", "protected function display_page($content_template = null, $page_template = null){\n\t\tif(!is_null($content_template))\n\t\t\t$this->content_template = $content_template;\n\t\tif(!is_null($page_template))\n\t\t\t$this->page_template = $page_template;\n\t\t$this->assign_errors();\n\t\t$this->assign_auth_values();//TODO Move To authcontroller\n\t\t$this->assign_custom_values();\n\t\t$this->view_manager->display_page($this->content_template,$this->page_template);\n\t}", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "private static function render(){\n\t\tif(flexMVC::$view) $viewpath = VIEWS.flexMVC::$view.VIEWPAGE_EXT;\n\t\telse $viewpath = CURRENT_VIEW_FOLDER_LOCATION.CURRENT_VIEW.VIEWPAGE_EXT;\n\t\tif(!is_file($viewpath)){\n\t\t\t$viewpath = VIEWS.flexMVC::$error_page.VIEWPAGE_EXT;\n\t\t\tif(!file_exists($viewpath)){\n\t\t\t\techo(\"Please define your errors page => \" . flexMVC::$error_page);\n\t\t\t\texit;\n\t\t\t}\n\t\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\"); \n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t}else{\n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t\t$_SESSION['flexMVC_lastActive'] = strtotime(\"now\");\n\t\t}\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function __invoke(Page $page)\n {\n return view('page', compact('page'));\n }", "public function page($route) {\n require_once('models/Page.php');\n require_once('views/Page.php');\n require_once('controllers/Page.php');\n\n // Initiate MVC objects\n $model = new Model\\Page\\Model($route);\n $controller = new Controller\\Page\\Controller($model);\n $view = new View\\Page\\View($controller, $model);\n\n // Display page\n $view->render();\n\n }", "public function render()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$item = $this->model->getItem($this->getAlias());\n\t\t}\n\t\tcatch (\\RuntimeException $e)\n\t\t{\n\t\t\tthrow new RoutingException($this->getAlias(), $e);\n\t\t}\n\n\t\t$this->renderer->set('page', $item->getIterator());\n\n\t\treturn parent::render();\n\t}", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "function _display($page_req, $data = array()) {\r\n\t\t\r\n\t\t$data['content'] = $this->load->view($page_req, $data, TRUE);\r\n\t\t\r\n\t\t// Display in Template\r\n\t\t$this->load->view('template', $data);\r\n\t}" ]
[ "0.84006464", "0.792713", "0.7652883", "0.7572479", "0.7572479", "0.7419128", "0.73836356", "0.72348803", "0.72272897", "0.72177523", "0.7041074", "0.69246083", "0.6875075", "0.68660414", "0.67697215", "0.6751687", "0.6666794", "0.6662496", "0.6632922", "0.6549923", "0.6442485", "0.6429971", "0.6429106", "0.63751554", "0.6374552", "0.6371065", "0.6364019", "0.636063", "0.6319526", "0.6305118", "0.6299052", "0.62917626", "0.6268209", "0.6260411", "0.6230004", "0.62025946", "0.6192785", "0.6188939", "0.6188939", "0.6181291", "0.6181291", "0.6181291", "0.6181291", "0.6181291", "0.6181291", "0.61543924", "0.61514515", "0.6151149", "0.61494595", "0.6139305", "0.61201525", "0.6119671", "0.6114579", "0.6111876", "0.6083013", "0.60687804", "0.606129", "0.60607946", "0.6057759", "0.6040597", "0.6027825", "0.60185975", "0.6005109", "0.5989333", "0.5977945", "0.5974561", "0.5974561", "0.5974561", "0.59680665", "0.59617263", "0.59561396", "0.5917642", "0.5916781", "0.59043247", "0.5900448", "0.589538", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58832616", "0.58830225", "0.58745426", "0.5863442", "0.58521104", "0.58515733", "0.5843463", "0.58381665" ]
0.0
-1
Renders a given page with a specified text.
public function pageWithText(int $page, string $text, ?string $rel = null): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pageWithText($page, $text)\n {\n return '';\n }", "abstract function render_page();", "abstract protected function render_page_content(): void;", "function page_text($x, $y, $text, $font, $size, $color = array(0,0,0), $adjust = 0, $angle = 0) {\n $this->_pdf->close_object();\n $this->_pdf->page_text($x, $y, $text, $font, $size, $color, $adjust, $angle);\n $this->_pdf->reopen_object($this->_current_page_id);\n }", "function writePage($text) {\n //TODO: Write the text to the page.\n return 1;\n }", "private function generateHtml($page, $text = null)\n {\n // If no link text is specified\n if (!$text)\n // Specify that the text is the number of the page\n $text = $page;\n\n $currentURI = rtrim($_SERVER['REQUEST_URI'], '/') . '/';\n $currentURI = preg_replace('~/page-[0-9]+~', '', $currentURI);\n // Generate HTML link code and return\n return\n '<li><a href=\"' . $currentURI . $this->index . $page . '\">' . $text . '</a></li>';\n }", "public static function renderText();", "public function render_page() {\n\t\t$this->render_template();\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "function &renderPage( $page=0 )\r\n {\r\n $generator =& $this->generator();\r\n// print( \"Using renderer: \" . $this->RendererClass . \"<br>\");\r\n \r\n return $generator->renderPage( $page );\r\n }", "public function renderText($text = null){\n\t\tif ($text != null){ echo $text; }\n\t\t$this->text_only = true;\n\t}", "public function render() {\n\t\t$this->render_page_content();\n\t}", "function render_text($text = ' ') {\n\n if ($this->performed) {\n throw new Trails_DoubleRenderError();\n }\n\n $this->performed = TRUE;\n\n $this->response->set_body($text);\n }", "function renderText($text, $render_layout = true, $die = true) {\r\n $this->setAutoRender(false); // Turn off auto render because we will render whole thing now...\r\n \r\n if($render_layout) {\r\n $this->renderLayout($this->getLayoutPath(), $text);\r\n } else {\r\n print $text;\r\n } // if\r\n \r\n if($die) {\r\n die();\r\n } // if\r\n }", "public function showText($text) {}", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "protected function _showText($text) {}", "protected abstract function output($text);", "function render_link($page, $text, $menu = null) {\n global $PATH;\n\n if ( file_exists( \"pages/$page.php\" ) && $PATH[0] === $page) { // if the current page is this link\n $ele = \"<span>$text</span>\";\n } else {\n if( !isset($menu) ) {\n $menu = $_GET['menu']; //copy the menu parameter if not specified\n }\n $query = array('menu' => $menu);\n $query_string = http_build_query($query);\n $ele = \"<a href='/{$page}?{$query_string}'>$text</a>\";\n }\n echo \"<li>$ele</li>\";\n}", "public function drawPage()\n\t\t{\n\t\t}", "public function displayAction() {\r\n\r\n //GET THE TEXT STRING\r\n $text = $this->_getParam('text_string');\r\n\r\n //GET PAGE ID\r\n $page_id = $this->_getParam('page_id');\r\n\r\n $writesTable = Engine_Api::_()->getDbtable('writes', 'sitepage')->setWriteContent($page_id, $text);\r\n exit();\r\n }", "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "public static function render($type, $page)\n\t{\n\t\t$page_location = BASE.'views/'.$type.'/'.$page.'.php';\n\t\trequire_once(BASE.'/views/template.php');\n\t}", "protected abstract function renderContent();", "public function display($pageName);", "function page($page_name=null, $content_type=\"text/html\")\n{\n\t$page_path = PAGES . \"/\" . $page_name . \".php\";\n\tif(!file_exists($page_path)) throw new FrameworkException(\"$page_path: page doesn't exist\");\n\n\theader(\"content-type: \".$content_type);\n\trequire_once $page_path;\n}", "public static function printText($text)\n {\n $text = self::removeDivs($text);\n echo '<p class=\"text-content\">' . $text .'<p>';\n }", "public static function render($page) {\n\t if(isset(self::$state)) {\n\t extract(self::$state,EXTR_SKIP);\n\t }\n\t include(self::getPagePath($page));\n\t}", "function render($page){\n\t\t$url = $this->url;\n\t\tif($page != null) {\n\t\t\t$page->loadLayout();\n\t\t\t$page->calculatePaths();\n\n\t\t\t$toLoad = $page->controlFile;\n\t\t\tfileUtil::trimLeftDir($toLoad);\n\t\t\t$toLoad = fileutil::stripExt($toLoad);\n\n\t\t\t//update the globals to reflect our actual page\n\t\t\t$_SERVER[\"PHP_SELF\"] = $GLOBALS[\"SiteRoot\"].$toLoad;\n\t\t\t$_SERVER[\"PHP_SELF_NOEXT\"] = fileutil::stripExt($GLOBALS[\"SiteRoot\"].$toLoad);\n\t\t\t$_SERVER[\"PHP_SELFDIR\"] = fileutil::stripFile($_SERVER[\"PHP_SELF\"]).\"/\";\n\t\t}\n\t\telse {\n\t\t\t$page = page::loadPage(\"errors/404\");\n\t\t}\n\n\t\t//do a security check\n\t\tif( !security::hasPageAccess($page) ) {\n\t\t\techo(\"Permission Denied for $page->url!\");\n\t\t\tdie();\n\t\t}\n\n\t\t//trigger any page events\n\t\t$page->handleEvents();\n\n\t\t//handle any ajax get requests\n\t\t$page->handleAjax();\n\n\t\t//if this is an ajax post, we don't need to render.\n\t\t//It was just interested in executing events\n\t\tif(util::getData(\"ajaxpost\")!=\"\")\n\t\t\tdie();\n\n\t\t$this->callTemplate($page);\n\t}", "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "function CreatePage($text)\n{\n\tglobal\t$FM_VERS;\n\n\techo \"<html>\";\n\techo \"<head>\";\n\techo \"</head>\";\n\techo \"<body>\";\n\techo nl2br($text);\n\techo \"<p><p><small>Your form submission was processed by formmail.php ($FM_VERS), available from <a href=\\\"http://www.tectite.com/\\\">www.tectite.com</a></small>\";\n\techo \"</body>\";\n\techo \"</html>\";\n}", "public function Page($page){\r\n $fullpath=ucwords($page).EXT;\r\n $this->Load($fullpath);\r\n }", "public function textFilter($text, $doc, $page) \n {\n $this->instance = new Filter();\n $this->view($this->instance->textFilter($text, $doc, $page), 'filter', 'Filtro', $page);\n }", "abstract protected function RenderContent();", "protected function render_text ($text, $layout = null, $status = null)\n\t{\n\t\t# Set status:\n\t\tif ($status !== null)\n\t\t\t$this->response->set_status ($status);\n\t\t# Set content:\n\t\t$layout = coalesce ($layout, $this->layout);\n\t\tif ($layout === false || $layout === null)\n\t\t\treturn $this->content_for['layout'] = $this->content_for['action'] = $text;\n\t\telse\n\t\t{\n\t\t\t$this->content_for['action'] = $text;\n\t\t\tif (method_exists ($this, 'before_layout'))\n\t\t\t\t$this->before_layout ($layout);\n\t\t\treturn $this->content_for['layout'] = $this->render_template ('layouts/'.$layout, false, $status);\n\t\t}\n\t}", "function renderText($text, $render_layout = false, $die = true) {\n if($render_layout) {\n $this->setAutoRender(false);\n \n $layout_path = $this->getLayoutPath();\n if(is_error($layout_path)) {\n return $layout_path;\n } // if\n \n $this->renderLayout($layout_path, $text, $die);\n } else {\n print $text;\n } // if\n \n if($die) {\n die();\n } // if\n }", "public function insertDocumentNumber(Zend_Pdf_Page $page, $text)\r\n {\r\n // get first page for number\r\n $page = reset($this->_getPdf()->pages);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $this->_setFontRegular($page, 10);\r\n $docHeader = $this->getDocHeaderCoordinates();\r\n $page->drawText($text, 35, $docHeader[1] - 15, 'UTF-8');\r\n }", "public static function renderContent() {}", "function transform($text, $page = null)\n\t{\n\t\tif (strtolower($page) == 'areamap') {\n\t\t\t$html = $this->_transformAreaMap($text);\n\t\t} else {\n\t\t\t$html = $this->parse->transform($text);\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "public function quick_view( $page_name , $page = array('title' => '' , 'description' => '') )\r\n\t {\r\n\t\t $this->render( $page_name , $this->load_shop( $page ) );\r\n\t }", "public static function renderContent($page_data) {\n\t\techo '<h1>SOFTBAL</h1>'.PHP_EOL;\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'Jak říká <a href=\"http://cs.wikipedia.org/wiki/Softball\" target=\"_blank\" title=\"Softbal na wikipedii\">wikipedie</a>: \"Softbal je kolektivní míčový sport, vyvinutý z baseballu jako jeho rychlejší a&nbsp;na prostor méně náročná verze.\" Rozepisovat tu pravidla podle mého cenu nemá, každý nechť si to v&nbsp;případě zájmu dohledá. Důležitější je, že je pro mě softbal důležitou součástí života, oblíbenou volnočasovou aktivitou, záminkou k&nbsp;cestování a&nbsp;také společenskou záležitostí.'.PHP_EOL;\n\t\techo '</p>'.PHP_EOL;\n\t\techo '<h2>KARIÉRA</h2>'.PHP_EOL;\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'Softbalisti hrají na statistiky. Kdo říká, že ne, tak kecá :) Současný klub <strong>Mistrál&nbsp;Praha</strong> mi mé výkony posledních dvou sezón zatím tají, tak aspoň přehled z&nbsp;předchozích šesti let v&nbsp;<strong>MFF&nbsp;Neratovice</strong>'.PHP_EOL;\n\t\techo '</p>'.PHP_EOL;\n\t\t// stats\n\t\techo '<table>'.PHP_EOL;\n\t\t\techo '<tr>'.PHP_EOL;\n\t\t\t\techo '<th>Sezóna</th>'.PHP_EOL;\n\t\t\t\techo '<th></th>'.PHP_EOL;\n\t\t\t\techo '<th>G</th>'.PHP_EOL;\n\t\t\t\techo '<th>AB</th>'.PHP_EOL;\n\t\t\t\techo '<th>BA</th>'.PHP_EOL;\n\t\t\t\techo '<th>H</th>'.PHP_EOL;\n\t\t\t echo '<th>2B</th>'.PHP_EOL;\n\t\t\t\techo '<th>3B</th>'.PHP_EOL;\n\t\t\t\techo '<th>HR</th>'.PHP_EOL;\n\t\t\t\techo '<th>R</th>'.PHP_EOL;\n\t\t\t\techo '<th>RBI</th>'.PHP_EOL;\n\t\t\t\techo '<th>BB</th>'.PHP_EOL;\n\t\t\t\techo '<th>HB</th>'.PHP_EOL;\n\t\t\t\techo '<th>SH</th>'.PHP_EOL;\n\t\t\t\techo '<th>SB</th>'.PHP_EOL;\n\t\t\t\techo '<th>SO</th>'.PHP_EOL;\n\t\t\t\techo '<th>O</th>'.PHP_EOL;\n\t\t\t\techo '<th></th>'.PHP_EOL;\n\t\t\t\techo '<th>IP</th>'.PHP_EOL;\n\t\t\t\techo '<th>PO</th>'.PHP_EOL;\n\t\t\t\techo '<th>A</th>'.PHP_EOL;\n\t\t\t\techo '<th>E</th>'.PHP_EOL;\n\t\t\t\techo '<th>FA</th>'.PHP_EOL;\n\t\t\techo '</tr>'.PHP_EOL;\n\t\t\tif (!empty($page_data[\"stats\"])) {\n\t\t\t\tforeach ($page_data[\"stats\"] as $row) {\n\t\t\t\t\techo '<tr>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"year\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td></td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"G\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"AB\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"BA\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"H\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"2B\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"3B\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"HR\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"R\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"RBI\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"BB\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"HB\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"SH\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"SB\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"SO\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"O\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td></td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"IP\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"PO\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"A\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"E\"].'</td>'.PHP_EOL;\n\t\t\t\t\t\techo '<td>'.$row[\"FA\"].'</td>'.PHP_EOL;\n\t\t\t\t\techo '</tr>'.PHP_EOL;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// no stats found\n\t\t\t\techo '<tr><td colspan=\"23\">Nenalezeny žádné statistiky</td></tr>'.PHP_EOL;\n\t\t\t}\n\t\techo '</table>'.PHP_EOL;\n\t\t// other soft\n\t\techo '<h2>ČESKÉ AKADEMICKÉ HRY</h2>'.PHP_EOL;\n\t\techo '<img src=\"/web/images/soft_akada.jpg\" title=\"ČAH\" alt=\"ČAH\" />'.PHP_EOL;\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'Od roku 2009 se pravidelně účastním Českých akademických her v&nbsp;softbalu. Nejprve dvakrát v&nbsp;dresu Univerzity Karlovy a&nbsp;od roku 2011 zkoušíme prorazit s&nbsp;týmem VŠE. Jsem tronásobný akademický mistr republiky v&nbsp;tomto sportu: 2009&nbsp;v&nbsp;Plzni s&nbsp;UK, 2010&nbsp;v&nbsp;Praze s&nbsp;UK a&nbsp;2014&nbsp;v&nbsp;Liberci s&nbsp;VŠE.'.PHP_EOL;\n\t\techo '</p>'.PHP_EOL;\n\t\techo '<h2>ROZHODČÍ</h2>'.PHP_EOL;\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'Krom toho, že mě softbal baví hrát, věnuju se také funkci rozhodčího. Rozhodčím není příliš těžké se u&nbsp;nás stát -&nbsp;stačí chtít, začít je možné prakticky hned. I&nbsp;já začal jako samouk v&nbsp;nižších soutěžích, kde si týmy často pískají navzájem, od počátku roku 2012 jsem pak oficiálně vyškolen ČSA. Od podzimu 2012 pak občas vypomáhám i&nbsp;v&nbsp;nižších soutěžích pražského baseballu. Ačkoliv je to občas vypjaté, tak mě baví zodpovědnost, kterou tato pozice přináší. A&nbsp;samozřejmě je tu motivační faktor finanční odměny, která není vůbec špatná.'.PHP_EOL;\t\n\t\techo '</p>'.PHP_EOL;\t\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'V&nbsp;roce&nbsp;2012 jsem odřídil něco přes 40&nbsp;zápasů, v&nbsp;roce&nbsp;2013 celkem&nbsp;110, v&nbsp;roce&nbsp;2014 asi&nbsp;35 a&nbsp;v&nbsp;roce&nbsp;2015 kolem třiceti. Nakoukl jsem už i&nbsp;do nejvyšší mužské a&nbsp;ženské soutěže u&nbsp;nás a&nbsp;letos jsem byl dokonce vyslán na jeden dvojzápas do Rakouska.'.PHP_EOL;\t\n\t\techo '</p>'.PHP_EOL;\t\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'Zde je můj <a href=\"http://softball.cz/modules.php?op=modload&amp;name=infosys&amp;file=index&amp;do=umpires&amp;co=dirview&amp;umid=85&amp;pda=2\">rozhodcovský profil</a> na webu ČSA, kde jsou uvedeny počty nominací v&nbsp;nejvyšších dvou soutěžích a&nbsp;ligových pohárech.'.PHP_EOL;\t\n\t\techo '</p>'.PHP_EOL;\t\n\t\techo '<h2>ZAPISOVATEL</h2>'.PHP_EOL;\t\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo 'O&nbsp;tomto víc <a href=\"/work-scorer\" title=\"Zápis baseball/softbal\">na jiné stránce</a>, ale patří to k&nbsp;softbalu také.'.PHP_EOL;\t\n\t\techo '</p>'.PHP_EOL;\n\t}", "public function render($page,$layout=null,$binding=false){\n\n $this->page = $page;\n $file = \"view/{$page}/index.php\";\n if(!empty($layout)) {\n try\n {\n //render page with a layout\n\n if(file_exists($layout_file = \"view/shared/{$layout}.php\")){\n require $layout_file;\n }else{\n throw new LayoutException;\n }\n }catch(LayoutException $layout_error){\n $this->page_error($layout_error,'LAYOUT_ERROR',$layout_file);\n }\n }else{\n try\n {\n //render page without layout\n if (file_exists($file)){\n require $file;\n }else{\n throw new PageException;\n }\n }catch (PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',$file);\n }\n }\n if($binding){\n\n }\n\n }", "public function render_text($text,$scale=null) \r\n { \r\n $bitmap=$this->text_bitmap($text); \r\n $size=$this->text_size($text); \r\n if ($scale!==null) \r\n $bitmap=$this->scale_bitmap($bitmap,$size[0],$size[1],$scale,$scale); \r\n else \r\n $scale=1; \r\n $this->display_bitmap($size[0]*$scale,$size[1]*$scale,$bitmap); \r\n }", "private function _render($page)\r\n\t{\r\n\t\tif ($page->getLoginNeeded() == Model_Page_Front::LOGIN_REQUIRED)\r\n\t\t{\r\n\t\t\tAuthUser::load();\r\n\r\n\t\t\tif (!AuthUser::isLoggedIn())\r\n\t\t\t{\r\n\t\t\t\tFlash::set('redirect', $page->url());\r\n\r\n\t\t\t\t$this->go_backend();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tObserver::notify('frontpage_found', array($page));\r\n\r\n\t\t$html = (string) $page->render_layout();\r\n\t\t\r\n\r\n\t\tif ( AuthUser::isLoggedIn())\r\n\t\t{\r\n\t\t\t$inject_html = (string) View::factory( 'system/blocks/toolbar' );\r\n\t\t\t\r\n\t\t\tif(Setting::get( 'profiling' ) == 'yes')\r\n\t\t\t{\r\n\t\t\t\t$inject_html .= (string) View::factory( 'profiler/stats' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Insert system HTML before closed tag body\r\n\t\t\t$matches = preg_split('/(<\\/body>)/i', $html, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); \r\n\t\t\t/* assemble the HTML output back with the iframe code in it */\r\n\t\t\t$html = $matches[0] . $inject_html . $matches[1] . $matches[2];\r\n\t\t}\r\n\t\t\r\n\t\techo Response::factory()\r\n\t\t\t->body($html);\r\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "function render($page){\n if(file_exists(FOLDER_VIEWS.S.$page.\".php\")){\n extract($this->vars);\n require_once FOLDER_VIEWS.S.$page.\".php\";\n }else{\n header(\"location: \".REDIRECT_ERROR003);\n }\n }", "private function serve(Request $request, $page)\n {\n return $this->render(\n $request->getLocale().'/'.$page.'.html.twig'\n );\n }", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "function load_page_content($page) {\n //get text as html\n $pretext1 = html_entity_decode($page->text);\n\n //replace non-html tags with proper html tags\n // fix image tags\n $pretext2 = str_replace(array(\"<_image>\", \"</_image>\"), array(\"<img src=\\\"\", \"\\\"/>\"), $pretext1);\n // fix bullet point tags\n $pretext3 = str_replace(array(\"<_bullet>\", \"</_bullet>\"), array(\"<div>• \", \"</div>\"), $pretext2);\n // fix subtitle tags\n $text = str_replace(array(\"<subtitle>\", \"</subtitle>\"), array(\"<br/><br/><b>\", \"</b>\"), $pretext3);\n\n return $text;\n}", "public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }", "abstract function render();", "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 }", "public function render( $text ) {\n\t\tif ( ZC_PARSER == 'Textile' )\n\t\t\treturn $this->textile->TextileThis( $text );\n\t\telseif ( ZC_PARSER == 'TextileAlike' )\n\t\t\treturn $this->textile->render( $text );\n\t\telseif ( ZC_PARSER == 'Markdown' )\n\t\t\treturn Markdown( $text );\n\t\treturn $text;\n\t}", "function pageToPDF($page, $template, $text) {\n $pdf = new concat_pdf('P','mm','Letter');\n $pdf->setFiles($page); //$files is an array with existing PDF files.\n $pdf->setInput($text,$template);\n $pdf->concat();\n $pdf->Output('boo.pdf','I');\n}", "public static function renderContent($page_data) {\n\t\techo '<h1>'.$page_data[\"texts\"][\"links_headline\"].'</h1>'.PHP_EOL;\n\t\techo '<p>'.PHP_EOL;\n\t\t\techo $page_data[\"texts\"][\"links_info\"].PHP_EOL;\n\t\techo '</p>'.PHP_EOL;\n\t\t//\n\t\tif (!empty($page_data[\"link_cats\"])) {\n\t\t\tforeach($page_data[\"link_cats\"] as $cat) {\n\t\t\t\techo '<table class=\"links\">'.PHP_EOL;\n\t\t\t\t\techo '<tr>'.PHP_EOL;\n\t\t\t\t\t\techo '<td colspan=\"2\"><h2>'.$cat[\"name\"].'</h2></td>'.PHP_EOL;\n\t\t\t\t\techo '</tr>'.PHP_EOL;\n\t\t\t\t\tif (!empty($page_data[\"links\"][$cat[\"name\"]])) {\n\t\t\t\t\t\tforeach($page_data[\"links\"][$cat[\"name\"]] as $link) {\n\t\t\t\t\t\t\techo '<tr>'.PHP_EOL;\n\t\t\t\t\t\t\t\techo '<td>'.PHP_EOL;\n\t\t\t\t\t\t\t\t\techo '<a href=\"'.$link[\"link\"].'\" title=\"'.$link[\"name\"].'\"><img src=\"'.$link[\"thumb\"].'\" alt=\"'.$link[\"name\"].'\" width=\"100\" height=\"75\" /></a>'.PHP_EOL;\n\t\t\t\t\t\t\t\techo '</td>'.PHP_EOL;\n\t\t\t\t\t\t\t\techo '<td class=\"justify\">'.PHP_EOL;\n\t\t\t\t\t\t\t\t\techo '<strong><a href=\"'.$link[\"link\"].'\" title=\"'.$link[\"name\"].'\">'.$link[\"name\"]. '</a></strong><br />'.$link[\"dscr\"].PHP_EOL;\n\t\t\t\t\t\t\t\techo '</td>'.PHP_EOL;\n\t\t\t\t\t\t\techo '</tr>'.PHP_EOL;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\techo '</table>'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t}", "public function render($page, $data = []) {\n \n $data['isDashboard'] = TRUE;\n \n $data['breadcrumbs'] = $this->breadcrumbs->get();\n $this->load->view('components/header', $data);\n $page = 'pages/reports/' . $page;\n $this->load->view($page, $data);\n \n $this->load->view('components/footer');\n }", "public function render($string);", "public abstract function render();", "public abstract function render();", "public function render($page,$layout=null){\n $file = \"view/{$page}/index.php\";\n $this->page = $page;\n if(!empty($layout)) {\n try\n {\n //render page with a layout\n if(file_exists($layout_file = \"view/shared/{$layout}.php\")){\n require $layout_file;\n }else{\n throw new LayoutException;\n }\n }catch(LayoutException $layout_error){\n $this->page_error($layout_error,'LAYOUT_ERROR',$layout_file);\n }\n }else{\n try\n {\n //render page without layout\n if (file_exists($file)){\n require $file;\n }else{\n throw new PageException;\n }\n }catch (PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',$file);\n }\n }\n\n\n\n }", "protected function getActivePageWrapper($text)\n {\n return sprintf($this->activePageWrapper, $text);\n }", "public function render($from_text, $to_text)\n {\n // First we need the opcodes\n $opcodes = $this->getOpcodes($from_text, $to_text);\n\n return $this->renderer->process($from_text, $opcodes);\n }", "abstract protected function view_generatePageContent();", "public function page($page_id)\n\t{\n\t\t$check = DB::select(\"SELECT COUNT(*) as count FROM pages WHERE path = '\".$page_id.\"'\")[0];\n\t\tif ($check->count == 0){\n\t\t\tabort(404);\n\t\t}\n\t\t$page = DB::select(\"SELECT * FROM pages WHERE path = '\".$page_id.\"'\")[0];\n\t\t$title = $page->title;\n\t\t$desc = mb_substr($page->content,0,75);\n\t\t$header = $this->header(translate($title),$desc,true);\n\t\t// Get blocs of the page builder\n\t\t$blocs = DB::select(\"SELECT * FROM blocs WHERE area = 'page' ORDER BY o ASC\");\n\t\t$footer = $this->footer();\n\t\treturn view('page')->with(compact('header','page','blocs','footer'));\n\t}", "public function __construct( $text = null ) {\n\t\t$this->page = new StringBuffer('');\n\t\tif( !is_null( $text ) ) {\n\t\t\t$this->add( $text );\n\t\t}\n\t}", "public function page(int $page): string;", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "public function drawText(Zend_Pdf_Page $page, $text, $x1, $y1, $x2 = null, $position = self::TEXT_ALIGN_LEFT, $encoding = null) {\n $bottom = $y1; // could do the same for vertical-centering\n\n switch ($position) {\n case self::TEXT_ALIGN_LEFT:\n $left = $x1;\n break;\n case self::TEXT_ALIGN_RIGHT:\n $text_width = $this->getTextWidth($text, $page->getFont(), $page->getFontSize());\n $left = $x1 - $text_width;\n break;\n case self::TEXT_ALIGN_CENTER:\n if (null === $x2) {\n throw new Exception(\"Cannot center text horizontally, x2 is not provided\");\n }\n $text_width = $this->getTextWidth($text, $page->getFont(), $page->getFontSize());\n $box_width = $x2 - $x1;\n $left = $x1 + ($box_width - $text_width) / 2;\n break;\n default:\n throw new Exception(\"Invalid position value \\\"$position\\\"\");\n }\n\n // display multi-line text\n foreach (explode(PHP_EOL, $text) as $i => $line) {\n $page->drawText($line, $left, $bottom - $i * $page->getFontSize(), $encoding);\n }\n return $this;\n }", "public function output_text( $text = '' ){\n\t\t echo $text;\n\t }", "protected function renderPageWrapper( $args = array() )\n {\n return $this->render($this->findTemplatePath('page.html') , $args);\n }", "function render_link($text, $url) {\n return \"<a href=\\\"$url\\\">$text</a>\";\n }", "public function view($page)\n {\n $this->validated();\n $Data['Headers'] = get_page_headers();\n $this->load->view('layouts/main', $Data);\n }", "function view_page($html){\r\n\t\techo $html;\r\n\t}", "public function display() {\n\t\t$path = func_get_args();\n\n\t\t$count = count($path);\n\t\tif (!$count) {\n\t\t\t$this -> redirect('/');\n\t\t}\n\t\t$page = $subpage = $title_for_layout = null;\n\n\t\tif (!empty($path[0])) {\n\t\t\t$page = $path[0];\n\t\t}\n\t\tif (!empty($path[1])) {\n\t\t\t$subpage = $path[1];\n\t\t}\n\t\tif (!empty($path[$count - 1])) {\n\t\t\t$title_for_layout = Inflector::humanize($path[$count - 1]);\n\t\t}\n\t\t$this -> set(compact('page', 'subpage', 'title_for_layout'));\n\t\t$this -> render(implode('/', $path));\n\t}", "public function renderPage(){\n try {\n // show deferred failure from initPage\n if( ! $this->ctrl ){\n throw new Loco_error_Exception( __('Page not found','loco-translate') );\n }\n // display loco admin page\n echo $this->ctrl->render();\n }\n catch( Exception $e ){\n $ctrl = new Loco_admin_ErrorController;\n try {\n $ctrl->_init( array() );\n }\n catch( Exception $_e ){\n // avoid errors during error rendering\n }\n echo $ctrl->renderError($e);\n }\n // ensure session always shutdown cleanly after render\n Loco_data_Session::close();\n }", "public function search($text)\n {\n $this->instance = new Search();\n $this->view($this->instance->search($text), 'search', 'Busca');\n }", "function build_link($text, $page){\n\t$format = '<a href=\"%2$s\">%1$s</a>';\n\n\tprintf($format, $text, link_to($page, false));\n}", "protected function render( $page_name , $data )\n\t {\n\t \t//append security headers\n\t \t$this->append_security_headers( $data );\n\t \tif( $this->_app_mode === 'json' )\n\t \t{\n\t \t\t//exits at once !\n\t \t\treturn $this->render_json( $data );\n\t \t}\n\t \t$this->load->view('admin/html/partials/head' , $data );\n\t \t$this->load->view('admin/html/' . $page_name , $data );\n\t \t//$this->load->view\n\t }", "public function setBodyText($text);", "function testPageRender() {\n\t\t$folder = DataObject::get_one(\"DynamicTemplate\", \"\\\"Name\\\"='tmp__TemplateWithManifest'\");\n\t\t$page1 = new DynamicTemplatePage();\n\t\t$page1->Title = 'page1';\n\t\t$page1->DynamicTemplateID = $folder->ID;\n\n\t\t$controller = new DynamicTemplatePage_Controller($page1);\n\t\t$controller->init();\n\t\t$html = $controller->defaultAction(\"index\");\n//\t\techo \"html is: \" . $html . \"\\n\";\n\t\t$this->assertTrue(preg_match(\"/^\\s*This is a test\\.\\s*$/mU\", $html) > 0, \"expected test content\");\n\t\t$this->assertTrue(preg_match(\"/^\\s*\\<link rel=.stylesheet.*href=.*assets\\/dynamic_templates\\/tmp__TemplateWithManifest\\/css\\/test.css.*$/mU\", $html) > 0, \"CSS injected\");\n\t\t$this->assertTrue(preg_match(\"/.*\\<script.*src=.*assets\\/dynamic_templates\\/tmp__TemplateWithManifest\\/javascript\\/test.js.*$/mU\", $html) > 0, \"javascript injected\");\n\t}", "function htmlout($text)\n{\n\techo html($text);\n}", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "function renderPage() {\n $parameters = explode(\"/\", $this->getCurrentPage());\n $folder = $parameters[1];\n if (!in_array($folder, $this->folders) && $folder !== \"api\") {\n $name = $this->getCurrentPage();\n require_once $this->getBlueprintPath();\n }\n }", "function callTemplate(&$page){\n\t\tglobal $theme;\n\n\n\n\t\t//get global config values\n\t\t$title = $GLOBALS[\"SiteTitle\"];\n\t\t$description = $GLOBALS[\"SiteDescription\"];\n\t\t$keywords = $GLOBALS[\"SiteKeywords\"];\n\n\t\t//render the page\n\t\t$content = $page->render();\n\n\t\t//append page name to global config site name\n\t\tif($page->title != \"\") {\n\t\t\tif($title != \"\")\n\t\t\t\t$title .= \" - \";\n\t\t\t$title .= $page->title;\n\t\t}\n\n\t\t//check if the page requested extra headers\n\t\t//(CSS or JS includes)\n\t\t$extraHeaders = array_merge($this->getExtraHeaders($page),$page->extraHeaders);\n\n\t\t//send all the data to the main linker template\n\t\t//The location of this file is based on the current theme\n\t\t$template = new template();\n\n\t\t//we will look for this template in two places:\n\t\t//1 - the current themes directory\n\t\t//2 - the common directory.\n\t\t//This allows the current theme to override the linker if needed\n\n\t\t$path = $theme->getDirectory().\"linker.tmpl.php\";\n\t\tif(fileutil::file_exists_incpath($path))\n\t\t\t$template->setDirectory($theme->getDirectory());\n\t\telse\n\t\t\t$template->setDirectory($theme->getCommonDirectory());\n\t\t$template->setFile(\"linker.tmpl.php\");\n\t\t$template->set(\"title\",$title);\n\t\t$template->set(\"keywords\", $keywords);\n\t\t$template->set(\"description\", $description);\n\t\t$template->set(\"content\",$content);\n\t\t$template->set(\"extraHeaders\",implode(\"\\r\\n\\t\",$extraHeaders).\"\\r\\n\");\n\n\t\t//display the page to the user\n\t\techo($template->fetch(\"\",0));\n\t\t\n\t\t//DONE!\n\t}", "public function render($page, $data = []) {\n\n\t\t$data['isDashboard'] = TRUE;\n\t\t$data['breadcrumbs'] = $this->breadcrumbs->get();\n\t\t$data['user_type'] = $this->session->userdata('mode');\n\t\t\n\t\t$page = 'pages/members/' . $page;\n\n\t\t$this->load->view('components/header', $data);\n\n\t\t$this->load->view($page, $data);\n\n\t\t$this->load->view('components/footer', $data);\n\t}", "public function actionPage($id)\n\t{\n\t\t$app = Yii::app();\n\t\t$model = $this->loadModel($id);\n\n\t\tif ($model->content !== null)\n\t\t{\n\t\t\t/** @var CClientScript $cs */\n\t\t\t$cs = $app->clientScript;\n\t\t\t$cs->registerMetaTag($model->content->metaTitle, 'title');\n\t\t\t$cs->registerMetaTag($model->content->metaDescription, 'description');\n\t\t\t$cs->registerMetaTag($model->content->metaKeywords, 'keywords');\n\n\t\t\tif (!empty($model->content->css))\n\t\t\t\t$cs->registerCss($model->name, $model->content->css);\n\n $this->pageTitle = strtr($app->cms->pageTitleTemplate, array(\n\t\t\t\t'{title}'=>$model->pageTitle,\n\t\t\t\t'{appName}'=>Yii::app()->name,\n\t\t\t));\n\n $this->breadcrumbs = $model->getBreadcrumbs();\n\t\t}\n\n\t\t$this->layout = $app->cms->appLayout;\n\n\t\t$this->render('page', array(\n\t\t\t'model'=>$model,\n\t\t\t'content'=>$model->render(),\n\t\t));\n\t}", "public function getActivePageWrapper($text)\n {\n return '<a class=\"active item\">' . $text . '</a>';\n }", "abstract public function render($data);", "abstract public function render($path, array $args = null);", "public abstract function render($data);", "function SimpleText($text, $style=\"\") {\n\t\tif (false) {\n\t\t\t/*\n\t\t\t * FIXME: this is fundamentally broken, because\n\t\t\t * it creates a new CCE connection for every\n\t\t\t * SimpleText object created\n\t\t\t */\n\t\t\tinclude(\"uifc/Stylist.php\");\n\t\t\tinclude(\"ServerScriptHelper.php\");\n\t\t\t$crackaddict = new ServerScriptHelper();\n\t\t\t$stylist = $crackaddict->getStylist();\n\t\t\t$this->style = $stylist->getStyle(\"SimpleText\"); // try this\n\t\t\t\n\t\t\tif($this->style->getPropertyNumber()) { \n\t\t\t\t$this->style = $stylist->getStyle(\"Page\"); // default\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\t$this->style = $style;\n\t\t}\t\t\n\t\t$this->text = $text;\n\t}", "public function _render_page($data = [])\n {\n \t$this->load->view('layouts/main', $data);\n }" ]
[ "0.7520243", "0.7129664", "0.6757251", "0.6721803", "0.6656788", "0.6588872", "0.65599686", "0.6388354", "0.6180271", "0.6180271", "0.6137905", "0.61244273", "0.61080456", "0.6049462", "0.6026787", "0.5999219", "0.5977856", "0.5957646", "0.5874645", "0.5857281", "0.5826485", "0.58255935", "0.5817183", "0.57701504", "0.57617384", "0.5742145", "0.5723559", "0.57171196", "0.5697872", "0.5697295", "0.56947136", "0.56887835", "0.56644154", "0.56628424", "0.56444913", "0.55887085", "0.55832547", "0.55760765", "0.5535589", "0.5487785", "0.5474341", "0.54663455", "0.5442731", "0.54330635", "0.5420239", "0.54129213", "0.5401128", "0.53983665", "0.53952813", "0.5389837", "0.5389837", "0.5389837", "0.5389837", "0.5389837", "0.5389837", "0.53891313", "0.5371558", "0.5349108", "0.5345573", "0.53409636", "0.53345346", "0.53335917", "0.53272367", "0.53243476", "0.53242975", "0.53242975", "0.53203285", "0.5320063", "0.53140247", "0.53021705", "0.5298853", "0.52932525", "0.5291284", "0.52905244", "0.52736515", "0.5252263", "0.52482885", "0.5237742", "0.5236591", "0.52220774", "0.52200145", "0.5217851", "0.52106595", "0.5208645", "0.520771", "0.5202534", "0.51956534", "0.5187586", "0.51874024", "0.5186374", "0.5177464", "0.51756704", "0.5169925", "0.5164185", "0.5159441", "0.5150913", "0.5145366", "0.51403975", "0.51355237", "0.5134501" ]
0.7041282
2
Renders the disabled state of the previous page.
public function previousDisabled(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function previousEnabled(int $page): string;", "protected function renderBackButton() {}", "public function previousPage()\n\t{\n\t\treturn $this->getIsPreviousPageAvailable() ? parent::previousPage() : false;\n\t}", "abstract protected function setPreviousPage();", "public function PrevPage()\n {\n if ($this->m_CurrentPage <= 1)\n $this->m_CurrentPage = 1;\n else \n $this->m_CurrentPage--;\n return $this->ReRender();\n }", "private function prev() {\n if ($this->currentPage > 1) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage - 1) . '\">&lt;</a></li>';\n }\n }", "public function previousPage()\n {\n return$this->currentPage - 1;\n }", "function prevPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n\t\n\t$root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the prev button should be inactive\n\tif( $currentView == 'home' ) {\n\t\treturn false;\n\t}\n\t// If we're on the credits page, the prev button should point to the last article\n\telse if( $currentView == 'credits' ) {\n\t\treturn $root . getArrayLastIndex( $activePages );\n\t}\n\n\tif( empty(nextPrevArticleName('prev')) && $currentArticlePage == '1' ){\n\t\treturn $root;\n\t} elseif( $currentArticlePage == '1' ) {\n\t\treturn $root . nextPrevArticleName('prev') . '/' . $activePages[nextPrevArticleName('prev')]['numberOfPages'];\n\t} elseif($activePages[$currentArticle]['numberOfPages'] >= $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage-1);\n\t} else {\n\t\treturn $root . $currentArticle;\t\t\n\t}\n}", "protected function _processPrevious()\n\t{\n\t\t$step = (int) $this->Session->read('Wizard.step');\n\t\t\n\t\tif( ! empty($step)){\n\t\t\t$step--;\n\t\t\t$this->_write($step);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\t\t\n\t}", "function prevPage($text='prev')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['previousPage']) )\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['previousPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['previousPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['previousPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "protected function getPreviousButton()\n {\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledLink($this->previousButtonText);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPrevNextPageLinkWrapper($url, $this->previousButtonText, 'prev');\n }", "protected function renderPageNextPrev()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n\n $buttons = [];\n $currentPage = $this->pagination->getPage();\n\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttons[] = $this->renderPageButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttons[] = $this->renderPageButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttons[] = $this->renderPageButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttons[] = $this->renderPageButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n return Html::tag('ul', implode(\"\\n\", $buttons), $this->options);\n }", "function previousPage()\n\t\t{\n\t\t\tif(!$this->hasPrevious())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\t\n\t\t\t$this->currentPage--;\n\t\t}", "public function previousPageUrl()\n {\n $this->resetQuery();\n\n if ($this->currentPage() > 2) {\n $this->appends('end', session()->get('accountant.api.end'));\n }\n\n return parent::previousPageUrl();\n }", "public function previousAction()\n {\n $this->pageAction('goToPreviousPage');\n }", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "private function previous()\n {\n $this->m--;\n $this->init();\n }", "public function genPrevLink()\n\t{\n\t\t$this->pagination['prevLink'] = \"\";\t\n\t\tif($this->page > 1)\n\t\t{\n\t\t\t$page = $this->page-1;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_prev',$this->prepend.$page.$this->append, '&lt;'),\n\t\t\t\t\t\t\t\t$item);\n\t\t\t$this->pagination['prevLink'] = $item;\n\t\t}\n\t}", "public function has_previous_page()\n {\n }", "protected function previousStep()\r\n {\r\n $index = array_search($this->_currentStep, array_values($this->_steps)) - 1;\r\n $this->redirect(array_values($this->_steps)[($index > 0 ? $index : 0)]);\r\n }", "function redirect_back_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_redirect_back\" value=\"'.old('_redirect_back', back()->getTargetUrl()).'\">');\n }", "function renderPrev($tag = '&lt;&lt;') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page > 1) {\r\n\t\t\treturn ' <a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page - 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn \" $tag\";\r\n\t\t}\r\n\t}", "public static function previous()\n {\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }", "public function getPreviousPage();", "public function hasPreviousPage();", "public function getPreviousButton($text = '<i class=\"left arrow icon\"></i>')\n {\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledTextWrapper($text);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPageLinkWrapper($url, $text, 'prev');\n }", "protected function renderDisabled()\n {\n return '';\n }", "function link_with_disabled_back_button($url, $linktext){\n print \"<a href=\\\"$url\\\"\";\n print \"ONCLICK=\\\"location.replace(this.href);return false;\\\">\";\n print $linktext . \"</a>\";\n}", "private function print_previous_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( max( 1, $this->current_page - 1 ) ),\n\t\t\t__( 'Go to the previous page', 'multilingual-press' ),\n\t\t\t'prev-page' . $this->disable_first,\n\t\t\t'&lsaquo;'\n\t\t);\n\t}", "public function previous_step() {\r\n\t\t$this->step --;\r\n\t}", "public function hasPrevious() {\n return false;\n }", "protected function renderPageNextPrevInput()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n $currentPage = $this->pagination->getPage();\n\n $buttonLeft = [];\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttonLeft[] = $this->renderButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttonLeft[] = $this->renderButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n $buttonLeft = Html::tag('div', implode('', $buttonLeft), ['class' => 'input-group-btn']);\n \n $content = Html::textInput($this->pagination->pageParam, $currentPage + 1, [\n 'class' => 'form-control',\n 'autocomplete' => 'off'\n ]);\n $content .= Html::submitButton('Submit', $options = ['style' => 'display: none']);\n\n $buttonRight = [];\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttonRight[] = $this->renderButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttonRight[] = $this->renderButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n $buttonRight = Html::tag('div', implode('', $buttonRight), ['class' => 'input-group-btn']);\n\n Html::addCssClass($this->options, 'input-group');\n Html::removeCssClass($this->options, 'pagination');\n Html::addCssClass($this->options, 'margin-t-sm margin-b-sm');\n\n $currentUrl = $this->pagination->getLinks();\n if (isset($currentUrl['self'])) {\n $currentUrl = $currentUrl['self'];\n } else {\n $currentUrl = Yii::$app->request->url;\n }\n\n $html = [];\n $html[] = Html::beginForm($currentUrl, 'get', ['class' => 'pagination-input']);\n $html[] = Html::tag('div', $buttonLeft.$content.$buttonRight, $this->options);\n $html[] = Html::endForm();\n return implode(\"\\n\", $html);\n }", "public function loadPreviousPage()\n {\n $prevPage = $this->results->getPreviousPage();\n $this->search($prevPage);\n }", "public function disable_step($old_state);", "public function disableAction()\n {\n $session = Mage::getSingleton('core/session');\n $session->setInlineTranslationEnabled(false);\n\n $this->_redirectUrl(Mage::getBaseUrl());\n }", "public function Previous()\n {\n return parent::Previous();\n }", "public function prev_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() - 1);\n\t}", "public function ajaxSubmitPagerPrev(array &$form, FormStateInterface $form_state) {\n $page = $form_state->get('page');\n $form_state->set('page', ($page - 1));\n $form_state->setRebuild();\n }", "public function getPreviousState();", "public function getPrevious($text = null)\n {\n $text = \\Config::get('pagination::slider.prev_link_text', $text);\n $class = \\Config::get('pagination::align_simple') ? 'previous' : '';\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->currentPage <= 1) {\n $class = ltrim($class . ' ') . 'disabled';\n return '<li class=\"'.$class.'\"><span>'.$text.'</span></li>';\n } else {\n $url = $this->paginator->getUrl($this->currentPage - 1);\n return '<li class=\"'.$class.'\"><a href=\"'.$url.'\">'.$text.'</a></li>';\n }\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "public function hasPreviousPage() {\n return 1 < $this->page_;\n }", "function hasPrevious()\n\t\t{\n\t\t\tif($this->currentPage > 1)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "function getPreviousState();", "public function prevpage() {\n return $this->current_page - 1;\n }", "public function getPreviousPageUrl()\n {\n return $this->previousPageUrl;\n }", "private function back(){\n \t$params = array(\n \t\t\t'page'=>intval(I('p')) ? intval(I('p')) : 1,\n \t\t\t'pagesize'=>$this->pagesize,\n \t\t\t'type'=>Status::AfterSaleBack,\n \t);\n \tif (session('distributor_id')) {\n \t\t$params['distributor_id'] = session('distributor_id');\n \t}\n \t$result = $this->afterSalesService()->getPagerList($params);\n \t$this->assign('back_list', $result['list']);\n }", "private function setPreviousUrl()\n {\n // Via the global helper...\n session(['previousUrl' => URL::previous()]);\n return true;\n }", "public function getPreviousPageUrl();", "public function getPreviousPageUrl();", "private function createPrevPageLink($activePage)\n {\n # initialise variables\n $prevPage=1;\n $linkText=null;\n $startRecord=0;\n\n $prevPage=--$activePage;\n\n # There is no page 0 so need to disable in that case\n if(0==$prevPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">&laquo;</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&amp;selectCounty='.$this->selectCounty;\n $linkText .= '&amp;startRecord='.$this->startRecordArr[$prevPage];\n $linkText .= '&amp;recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&amp;pageNum='.$prevPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">&laquo;</span>';\n $linkText .= '<span class=\"sr-only\">'.$prevPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }", "public function prev()\n {\n --$this->offset;\n }", "private function generateLeftButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&laquo;</a></li>', $this->url, $page - 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>', $this->url, $page - 1));\n }\n }", "public function hasPrevious()\n {\n return $this->curPage > 1;\n }", "static private function historyback()\n {\n echo '<script>window.history.back();</script>';\n }", "public function previousPage() {\r\n\t\t$intReturn = ($this->getCurrentPage() - 1 > 0) ? ($this->getCurrentPage() - 1) : 1;\r\n\r\n\t\treturn $intReturn;\r\n\t}", "function hasPrevPage() {\n\t\treturn $this->hasPage($this->p - 1);\n\t}", "public function previousPageUrl()\n {\n $previousPage = $this->structure->getPreviousPage($this->currentPage);\n if ($previousPage) {\n return $this->structure->getUrl($this->currentPage, $previousPage);\n }\n\n return;\n }", "public function hasPrevious()\n {\n if ($this->currentPage === 1) {\n return false;\n }\n\n return true;\n }", "public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }", "public function getPrevious() {}", "public function gridSetPagesUrlPrev($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_PREV', $url);\n $this->setVar('PREV_PAGE_TAG', __('Previuos page'));\n }\n }", "function generatePrevNextButtonMarkup($buttonType, $buttonText, $buttonJavascriptAndExtraCode, $usersCanSave, $nextPage, $previousPage, $thanksPage) {\n $buttonMarkup = \"\";\n if($buttonType == \"next\") {\n if(!$usersCanSave AND $nextPage==$thanksPage) {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=next id=next value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n } elseif($buttonType == \"prev\") {\n if($previousPage == \"none\") {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=prev id=prev value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n }\n return $buttonMarkup;\n}", "public function getBackUrl()\n {\n $url = $this->helperWizard()->getPreviousPageUrlAsString();\n return $this->getUrl($url, array('_current' => true));\n }", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "public function prev()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getBefore();\n }\n }", "public static function prevpage(){\n\t\t// Make sure that user is not redirected back to Login, Register, ForgotPassword, etc.\n\t\t// List of Pages that user should never get redirected to when logged in\n\t\t$no_redir_pages = array(\"login\", \"register\", \"logout\", \"forgot-password\", \"resend-activation-email\", \"reset-password\", \"activate\",\n\t\t\t\t\t\t\t\t\"Login\", \"Register\", \"Logout\", \"Forgot-Password\", \"Resend-Activation-Email\", \"Reset-Password\", \"Activate\",\n\t\t\t\t\t\t\t\t\"Templates\", \"assets\");\n\t\t// Get Current Page so we have something to compair to\n\t\t$cur_page = $_SERVER['REQUEST_URI'];\n\t\t//Remove the extra forward slash from link\n\t\t$cur_page_a = ltrim($cur_page, DIR);\n\t\t// Get first part of the url (page name)\n\t\t$cur_page_b = explode('/', $cur_page_a);\n\t\t//Add current page to lang change session for redirect\n\t\t$_SESSION['lang_prev_page'] = $cur_page_a;\n\t\t// Check to see if we should log as a previous page\n\t\tif(strpos ($cur_page,\".\" ) === FALSE){\n\t\t\tif(!in_array($cur_page_b[0], $no_redir_pages)){\n\t\t\t\t$_SESSION['login_prev_page'] = $cur_page_a;\n\t\t\t}\n\t\t}\n\t}", "public function has_previous_page() {\n\t\t\treturn $this->page > 1;\n\t\t}", "public function previous()\n {\n if ($this->__index > 0)\n {\n $this->__index--;\n }\n\n return $this->valid();\n }", "public function onBackForm()\n {\n // Load another page\n AdiantiCoreApplication::loadPage('MultiStepMultiFormView', 'onLoadFromSession');\n }", "public function getPrevText()\n {\n return _t(__CLASS__ . '.PREVIOUS', 'Previous');\n }", "public function previous_page(){\n if($this->current_page > 1){\n return $this->current_page - 1;\n }\n else{\n return NULL;\n }\n }", "public function disable_step($old_state)\n\t{\n\t\treturn false;\n\t}", "public function nextDisabled(): string;", "function adr_previous( $lang_key , $direct , $nav='' )\n{\n\tglobal $lang , $phpEx ;\n\n\t$lang_key = $lang[$lang_key];\n\t$temp = ( !$nav ) ? $direct.'.'.$phpEx : $direct.'.'.$phpEx.'?'.$nav;\n\t$direction = append_sid(\"$temp\");\n\n\t$message = $lang_key .'<br /><br />'.sprintf($lang['Adr_return'],\"<a href=\\\"\" . $direction . \"\\\">\", \"</a>\") ;\n\tmessage_die( GENERAL_MESSAGE,$message);\n}", "function go_back_button()\n{\n\techo'<p style=\"float: left; width:300px; font-size: 10px; line-height: 25px;\"><a class=\"button\" style=\"font-size: 10px; margin-bottom: 10px;\" href=\"http://drnonprofit.com/coaching/\">Continue Shopping</a>\n\t<br />\n\tOnly one subscription needs to be purchased at a time, additional purchases may be made after this one is completed</p>';\n}", "public function getPreviousUrl() {\r\n\t\treturn $this->Session->read('history.current');\r\n\t}", "function fc_pagination_prevpage($paged, $max_page, $prevpage) {\n if( $max_page > 1 && $paged > 1 )\n $pagingString = '<li class=\"prev\"><a href=\"'.get_pagenum_link($paged-1). '\">'.$prevpage.'</a></li>';\n return $pagingString;\n}", "public function disabled();", "public function disabled();", "public function previous(): void\n {\n if ($this->cursor > 0) {\n $this->cursor--;\n }\n }", "public function previousElement();", "function prevPage() {\n\t\treturn $this->hasPrevPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "public function PrevLink()\n {\n if ($this->NotFirstPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() - $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }", "public function has_prevpage() {\n return $this->prevpage() >= 1 ? true : false;\n }", "function prev() { \n\n\t\tif ($this->XBMCCmd(\"PlayPrev\")!=\"OK\") { return false; }\n return true;\n\t\n\t}", "public function hasPrevPage() {\n return $this->getCurPage() > self::FIRST_PAGE;\n }", "public function has_prev()\n\t{\n\t\treturn $this->get_cur_page() > 1;\n\t}", "public static function disablePage(){\n if (isset($_SESSION['name']) and !isset($_SESSION['name']))\n {\n header('location: ../load/index.php');\n }\n }", "public function getPrevious();", "function single_product_back_button() {\n $url_path = $_SERVER['REQUEST_URI'];\n\n if ( strpos($url_path, 'diff-wizard') !== false ) {\n if ( ! session_id() ) {\n session_start();\n }\n $_SESSION['product-back-button-text'] = 'Return to Diff Wizard Results';\n $_SESSION['product-back-button-url'] = $url_path;\n } elseif( strpos($url_path, 'product-category') !== false || is_search() ) {\n if ( ! session_id() ) {\n session_start();\n }\n $_SESSION['product-back-button-text'] = 'Back to Product List';\n $_SESSION['product-back-button-url'] = $url_path;\n } elseif( strpos($url_path, 'product') === false) {\n if ( ! session_id() ) {\n session_start();\n }\n unset(\n $_SESSION['product-back-button-text'],\n $_SESSION['product-back-button-url']\n );\n }\n}", "public function getPrevPage()\n {\n return $this->prevPage;\n }", "private function prevLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('last sunday', strtotime($time . ' +1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . ' -1 week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '-1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 -1month'));\n }\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }", "public function get_disabled_post_state()\n {\n }", "function render_block_core_query_pagination_previous($attributes, $content, $block)\n {\n }", "public function previous()\n {\n $this->cursor--;\n }", "public function setPrevPage($prevPage)\n {\n $this->prevPage = $prevPage;\n }", "public function previousPage()\n\t{\n\t\t$this->_currentPage--;\n\n\t\tif ($this->_currentPage < 0) {\n\t\t\t$this->_currentPage = $this->count()-1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getPreviousPage()\n\t{\n\t\treturn $this->previousPage;\n\t}", "protected function getPreviousButtonText() {\n return $this->previousButtonText;\n }" ]
[ "0.68244255", "0.64455944", "0.63269436", "0.62881595", "0.62689936", "0.6242096", "0.62346256", "0.60750604", "0.6068533", "0.60115576", "0.6002718", "0.5973086", "0.5953988", "0.5897109", "0.58629537", "0.5842836", "0.58339876", "0.58276683", "0.58224434", "0.57360744", "0.5730352", "0.5719249", "0.5705061", "0.57043993", "0.57015723", "0.5695855", "0.567826", "0.5676007", "0.56517214", "0.5644079", "0.5605073", "0.55979", "0.5566542", "0.5564595", "0.556331", "0.5560707", "0.55457026", "0.554257", "0.55421793", "0.5532673", "0.5520859", "0.5502564", "0.5492785", "0.54845244", "0.54623544", "0.54480046", "0.5443828", "0.54235864", "0.54192793", "0.54192793", "0.5406488", "0.54000175", "0.5384916", "0.538344", "0.5358111", "0.5355701", "0.5353841", "0.53433836", "0.5338807", "0.5332782", "0.5327691", "0.53146833", "0.53061384", "0.5304023", "0.53003824", "0.5296115", "0.52951807", "0.52683544", "0.5263009", "0.5262047", "0.52556115", "0.5255012", "0.52484494", "0.52449656", "0.5234638", "0.52342314", "0.5219526", "0.5205301", "0.51958185", "0.51958185", "0.5191725", "0.5188158", "0.5185603", "0.51753247", "0.5170952", "0.51683176", "0.5160382", "0.51576304", "0.51476467", "0.5145568", "0.5142221", "0.5138502", "0.51299006", "0.51279163", "0.5126079", "0.51220846", "0.5121384", "0.5117803", "0.5115241", "0.5112464" ]
0.67590404
1
Renders the enabled state of the previous page.
public function previousEnabled(int $page): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function previousDisabled(): string;", "public function previousPage()\n\t{\n\t\treturn $this->getIsPreviousPageAvailable() ? parent::previousPage() : false;\n\t}", "protected function renderBackButton() {}", "abstract protected function setPreviousPage();", "public function has_previous_page()\n {\n }", "private function prev() {\n if ($this->currentPage > 1) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage - 1) . '\">&lt;</a></li>';\n }\n }", "function prevPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n\t\n\t$root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the prev button should be inactive\n\tif( $currentView == 'home' ) {\n\t\treturn false;\n\t}\n\t// If we're on the credits page, the prev button should point to the last article\n\telse if( $currentView == 'credits' ) {\n\t\treturn $root . getArrayLastIndex( $activePages );\n\t}\n\n\tif( empty(nextPrevArticleName('prev')) && $currentArticlePage == '1' ){\n\t\treturn $root;\n\t} elseif( $currentArticlePage == '1' ) {\n\t\treturn $root . nextPrevArticleName('prev') . '/' . $activePages[nextPrevArticleName('prev')]['numberOfPages'];\n\t} elseif($activePages[$currentArticle]['numberOfPages'] >= $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage-1);\n\t} else {\n\t\treturn $root . $currentArticle;\t\t\n\t}\n}", "public function PrevPage()\n {\n if ($this->m_CurrentPage <= 1)\n $this->m_CurrentPage = 1;\n else \n $this->m_CurrentPage--;\n return $this->ReRender();\n }", "public function hasPreviousPage();", "function hasPrevious()\n\t\t{\n\t\t\tif($this->currentPage > 1)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public function previousPage()\n {\n return$this->currentPage - 1;\n }", "function prevPage($text='prev')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif ( !empty($this->_pageDetails['previousPage']) )\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['previousPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['previousPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['previousPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "public function hasPreviousPage() {\n return 1 < $this->page_;\n }", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "protected function _processPrevious()\n\t{\n\t\t$step = (int) $this->Session->read('Wizard.step');\n\t\t\n\t\tif( ! empty($step)){\n\t\t\t$step--;\n\t\t\t$this->_write($step);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\t\t\n\t}", "public function hasPrevious() {\n return false;\n }", "public function hasPrevious()\n {\n return $this->curPage > 1;\n }", "public function previousAction()\n {\n $this->pageAction('goToPreviousPage');\n }", "private function print_previous_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( max( 1, $this->current_page - 1 ) ),\n\t\t\t__( 'Go to the previous page', 'multilingual-press' ),\n\t\t\t'prev-page' . $this->disable_first,\n\t\t\t'&lsaquo;'\n\t\t);\n\t}", "public function has_previous_page() {\n\t\t\treturn $this->page > 1;\n\t\t}", "private function setPreviousUrl()\n {\n // Via the global helper...\n session(['previousUrl' => URL::previous()]);\n return true;\n }", "public function hasPrevious()\n {\n if ($this->currentPage === 1) {\n return false;\n }\n\n return true;\n }", "protected function getPreviousButton()\n {\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledLink($this->previousButtonText);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPrevNextPageLinkWrapper($url, $this->previousButtonText, 'prev');\n }", "public function has_prevpage() {\n return $this->prevpage() >= 1 ? true : false;\n }", "private function previous()\n {\n $this->m--;\n $this->init();\n }", "public function has_prev()\n\t{\n\t\treturn $this->get_cur_page() > 1;\n\t}", "public function previousPageUrl()\n {\n $this->resetQuery();\n\n if ($this->currentPage() > 2) {\n $this->appends('end', session()->get('accountant.api.end'));\n }\n\n return parent::previousPageUrl();\n }", "function renderPrev($tag = '&lt;&lt;') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page > 1) {\r\n\t\t\treturn ' <a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page - 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn \" $tag\";\r\n\t\t}\r\n\t}", "protected function renderPageNextPrev()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n\n $buttons = [];\n $currentPage = $this->pagination->getPage();\n\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttons[] = $this->renderPageButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttons[] = $this->renderPageButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttons[] = $this->renderPageButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttons[] = $this->renderPageButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n return Html::tag('ul', implode(\"\\n\", $buttons), $this->options);\n }", "function hasPrevPage() {\n\t\treturn $this->hasPage($this->p - 1);\n\t}", "function previousPage()\n\t\t{\n\t\t\tif(!$this->hasPrevious())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\t\n\t\t\t$this->currentPage--;\n\t\t}", "public function genPrevLink()\n\t{\n\t\t$this->pagination['prevLink'] = \"\";\t\n\t\tif($this->page > 1)\n\t\t{\n\t\t\t$page = $this->page-1;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_prev',$this->prepend.$page.$this->append, '&lt;'),\n\t\t\t\t\t\t\t\t$item);\n\t\t\t$this->pagination['prevLink'] = $item;\n\t\t}\n\t}", "public static function previous()\n {\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }", "public function hasPrevPage() {\n return $this->getCurPage() > self::FIRST_PAGE;\n }", "public function getPreviousPage();", "public function getPreviousButton($text = '<i class=\"left arrow icon\"></i>')\n {\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->paginator->currentPage() <= 1) {\n return $this->getDisabledTextWrapper($text);\n }\n\n $url = $this->paginator->url(\n $this->paginator->currentPage() - 1\n );\n\n return $this->getPageLinkWrapper($url, $text, 'prev');\n }", "function link_with_disabled_back_button($url, $linktext){\n print \"<a href=\\\"$url\\\"\";\n print \"ONCLICK=\\\"location.replace(this.href);return false;\\\">\";\n print $linktext . \"</a>\";\n}", "function prev() { \n\n\t\tif ($this->XBMCCmd(\"PlayPrev\")!=\"OK\") { return false; }\n return true;\n\t\n\t}", "public function previous_step() {\r\n\t\t$this->step --;\r\n\t}", "function getPreviousState();", "protected function previousStep()\r\n {\r\n $index = array_search($this->_currentStep, array_values($this->_steps)) - 1;\r\n $this->redirect(array_values($this->_steps)[($index > 0 ? $index : 0)]);\r\n }", "public function loadPreviousPage()\n {\n $prevPage = $this->results->getPreviousPage();\n $this->search($prevPage);\n }", "public function getPreviousState();", "function generatePrevNextButtonMarkup($buttonType, $buttonText, $buttonJavascriptAndExtraCode, $usersCanSave, $nextPage, $previousPage, $thanksPage) {\n $buttonMarkup = \"\";\n if($buttonType == \"next\") {\n if(!$usersCanSave AND $nextPage==$thanksPage) {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=next id=next value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n } elseif($buttonType == \"prev\") {\n if($previousPage == \"none\") {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=prev id=prev value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n }\n return $buttonMarkup;\n}", "function single_product_back_button() {\n $url_path = $_SERVER['REQUEST_URI'];\n\n if ( strpos($url_path, 'diff-wizard') !== false ) {\n if ( ! session_id() ) {\n session_start();\n }\n $_SESSION['product-back-button-text'] = 'Return to Diff Wizard Results';\n $_SESSION['product-back-button-url'] = $url_path;\n } elseif( strpos($url_path, 'product-category') !== false || is_search() ) {\n if ( ! session_id() ) {\n session_start();\n }\n $_SESSION['product-back-button-text'] = 'Back to Product List';\n $_SESSION['product-back-button-url'] = $url_path;\n } elseif( strpos($url_path, 'product') === false) {\n if ( ! session_id() ) {\n session_start();\n }\n unset(\n $_SESSION['product-back-button-text'],\n $_SESSION['product-back-button-url']\n );\n }\n}", "public static function prevpage(){\n\t\t// Make sure that user is not redirected back to Login, Register, ForgotPassword, etc.\n\t\t// List of Pages that user should never get redirected to when logged in\n\t\t$no_redir_pages = array(\"login\", \"register\", \"logout\", \"forgot-password\", \"resend-activation-email\", \"reset-password\", \"activate\",\n\t\t\t\t\t\t\t\t\"Login\", \"Register\", \"Logout\", \"Forgot-Password\", \"Resend-Activation-Email\", \"Reset-Password\", \"Activate\",\n\t\t\t\t\t\t\t\t\"Templates\", \"assets\");\n\t\t// Get Current Page so we have something to compair to\n\t\t$cur_page = $_SERVER['REQUEST_URI'];\n\t\t//Remove the extra forward slash from link\n\t\t$cur_page_a = ltrim($cur_page, DIR);\n\t\t// Get first part of the url (page name)\n\t\t$cur_page_b = explode('/', $cur_page_a);\n\t\t//Add current page to lang change session for redirect\n\t\t$_SESSION['lang_prev_page'] = $cur_page_a;\n\t\t// Check to see if we should log as a previous page\n\t\tif(strpos ($cur_page,\".\" ) === FALSE){\n\t\t\tif(!in_array($cur_page_b[0], $no_redir_pages)){\n\t\t\t\t$_SESSION['login_prev_page'] = $cur_page_a;\n\t\t\t}\n\t\t}\n\t}", "private function createPrevPageLink($activePage)\n {\n # initialise variables\n $prevPage=1;\n $linkText=null;\n $startRecord=0;\n\n $prevPage=--$activePage;\n\n # There is no page 0 so need to disable in that case\n if(0==$prevPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">&laquo;</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&amp;selectCounty='.$this->selectCounty;\n $linkText .= '&amp;startRecord='.$this->startRecordArr[$prevPage];\n $linkText .= '&amp;recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&amp;pageNum='.$prevPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">&laquo;</span>';\n $linkText .= '<span class=\"sr-only\">'.$prevPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }", "function redirect_back_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_redirect_back\" value=\"'.old('_redirect_back', back()->getTargetUrl()).'\">');\n }", "public function Previous()\n {\n return parent::Previous();\n }", "function go_back_button()\n{\n\techo'<p style=\"float: left; width:300px; font-size: 10px; line-height: 25px;\"><a class=\"button\" style=\"font-size: 10px; margin-bottom: 10px;\" href=\"http://drnonprofit.com/coaching/\">Continue Shopping</a>\n\t<br />\n\tOnly one subscription needs to be purchased at a time, additional purchases may be made after this one is completed</p>';\n}", "private function back(){\n \t$params = array(\n \t\t\t'page'=>intval(I('p')) ? intval(I('p')) : 1,\n \t\t\t'pagesize'=>$this->pagesize,\n \t\t\t'type'=>Status::AfterSaleBack,\n \t);\n \tif (session('distributor_id')) {\n \t\t$params['distributor_id'] = session('distributor_id');\n \t}\n \t$result = $this->afterSalesService()->getPagerList($params);\n \t$this->assign('back_list', $result['list']);\n }", "public function enableAction()\n {\n $hash = $this->_request->getParam('hash', '');\n $expected = Mage::helper('livetranslator')->getCurrentHash();\n\n if ($hash == $expected || $hash == $expected - 1) {\n $session = Mage::getSingleton('core/session');\n $session->setInlineTranslationEnabled(true);\n }\n\n $this->_redirectUrl(Mage::getBaseUrl());\n }", "public function has_previous_page() {\n\n\t\t\treturn $this->previous_page() >= 1 ? true : false;\n\n\t\t}", "public function onBackForm()\n {\n // Load another page\n AdiantiCoreApplication::loadPage('MultiStepMultiFormView', 'onLoadFromSession');\n }", "public function ajaxSubmitPagerPrev(array &$form, FormStateInterface $form_state) {\n $page = $form_state->get('page');\n $form_state->set('page', ($page - 1));\n $form_state->setRebuild();\n }", "public function prev() { \n\n\t\tif (is_null($this->_mpd->Previous())) { return false; } \n\t\treturn true;\n\t\n\t}", "public function prevpage() {\n return $this->current_page - 1;\n }", "function adr_previous( $lang_key , $direct , $nav='' )\n{\n\tglobal $lang , $phpEx ;\n\n\t$lang_key = $lang[$lang_key];\n\t$temp = ( !$nav ) ? $direct.'.'.$phpEx : $direct.'.'.$phpEx.'?'.$nav;\n\t$direction = append_sid(\"$temp\");\n\n\t$message = $lang_key .'<br /><br />'.sprintf($lang['Adr_return'],\"<a href=\\\"\" . $direction . \"\\\">\", \"</a>\") ;\n\tmessage_die( GENERAL_MESSAGE,$message);\n}", "public function gridSetPagesUrlPrev($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_PREV', $url);\n $this->setVar('PREV_PAGE_TAG', __('Previuos page'));\n }\n }", "public function enable_step($old_state);", "public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }", "public function prev_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() - 1);\n\t}", "public function previousPage() {\r\n\t\t$intReturn = ($this->getCurrentPage() - 1 > 0) ? ($this->getCurrentPage() - 1) : 1;\r\n\r\n\t\treturn $intReturn;\r\n\t}", "static function page_previous($startpage, $config)\n {\n return static::page_link($startpage, $config, \"previous\");\n }", "public function getPreviousPageUrl();", "public function getPreviousPageUrl();", "public function setPrevPage($prevPage)\n {\n $this->prevPage = $prevPage;\n }", "static private function historyback()\n {\n echo '<script>window.history.back();</script>';\n }", "private function generateLeftButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&laquo;</a></li>', $this->url, $page - 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>', $this->url, $page - 1));\n }\n }", "public function previous()\n {\n if ($this->__index > 0)\n {\n $this->__index--;\n }\n\n return $this->valid();\n }", "public function prev()\n {\n --$this->offset;\n }", "function render_block_core_query_pagination_previous($attributes, $content, $block)\n {\n }", "public function getPrevious($text = null)\n {\n $text = \\Config::get('pagination::slider.prev_link_text', $text);\n $class = \\Config::get('pagination::align_simple') ? 'previous' : '';\n // If the current page is less than or equal to one, it means we can't go any\n // further back in the pages, so we will render a disabled previous button\n // when that is the case. Otherwise, we will give it an active \"status\".\n if ($this->currentPage <= 1) {\n $class = ltrim($class . ' ') . 'disabled';\n return '<li class=\"'.$class.'\"><span>'.$text.'</span></li>';\n } else {\n $url = $this->paginator->getUrl($this->currentPage - 1);\n return '<li class=\"'.$class.'\"><a href=\"'.$url.'\">'.$text.'</a></li>';\n }\n }", "function register_block_core_query_pagination_previous()\n {\n }", "protected function renderPageNextPrevInput()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n $currentPage = $this->pagination->getPage();\n\n $buttonLeft = [];\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttonLeft[] = $this->renderButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttonLeft[] = $this->renderButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n $buttonLeft = Html::tag('div', implode('', $buttonLeft), ['class' => 'input-group-btn']);\n \n $content = Html::textInput($this->pagination->pageParam, $currentPage + 1, [\n 'class' => 'form-control',\n 'autocomplete' => 'off'\n ]);\n $content .= Html::submitButton('Submit', $options = ['style' => 'display: none']);\n\n $buttonRight = [];\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttonRight[] = $this->renderButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttonRight[] = $this->renderButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n $buttonRight = Html::tag('div', implode('', $buttonRight), ['class' => 'input-group-btn']);\n\n Html::addCssClass($this->options, 'input-group');\n Html::removeCssClass($this->options, 'pagination');\n Html::addCssClass($this->options, 'margin-t-sm margin-b-sm');\n\n $currentUrl = $this->pagination->getLinks();\n if (isset($currentUrl['self'])) {\n $currentUrl = $currentUrl['self'];\n } else {\n $currentUrl = Yii::$app->request->url;\n }\n\n $html = [];\n $html[] = Html::beginForm($currentUrl, 'get', ['class' => 'pagination-input']);\n $html[] = Html::tag('div', $buttonLeft.$content.$buttonRight, $this->options);\n $html[] = Html::endForm();\n return implode(\"\\n\", $html);\n }", "function prev() {\n\n\t\tif (is_null($this->_httpq->prev())) { return false; }\n\n\t\treturn true;\n\n\t}", "public function isHasPrev()\r\n {\r\n return ($this->getCurrentRowNum() > 1);\r\n }", "public function getPrevText()\n {\n return _t(__CLASS__ . '.PREVIOUS', 'Previous');\n }", "public function getPrevPage(){\r\n\t\t$page=$this->_vars['current_page'];\r\n\t\tif($page>$this->_vars['total_pages']+1) return false;\r\n\t\treturn $page>1?$page-1:false;\r\n\t}", "public function getPreviousPageUrl()\n {\n return $this->previousPageUrl;\n }", "function thb_single_prev_custom_pagination() {\n\t\t$post = get_previous_post();\n\n\t\tif ( $post == '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo \"<div class='thb-single-previous-nav-wrapper'>\";\n\t\t\techo \"<a href='\" . get_permalink( $post->ID ) . \"'>\";\n\t\t\t\techo \"<span>\" . __( 'Previous post', 'thb_text_domain' ) . \"</span>\";\n\t\t\t\techo \"<p class='thb-single-nav-title'>\" . thb_text_format( esc_html( $post->post_title ) ) . \"</p>\";\n\t\t\techo \"</a>\";\n\t\techo \"</div>\";\n\t}", "public function prev()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getBefore();\n }\n }", "public function getPrevious() {}", "public function disableAction()\n {\n $session = Mage::getSingleton('core/session');\n $session->setInlineTranslationEnabled(false);\n\n $this->_redirectUrl(Mage::getBaseUrl());\n }", "function pb_single_next_prev() {\n\t// Only show on single post pages (not plants)\n\tif( !is_singular('post') ) {\n\t\treturn;\n\t}\n\n\t$previouspost_text = __( 'Older Posts', 'lean-kickstart' );\n\t$nextpost_text = __( 'Newer Posts', 'lean-kickstart' );\n\n\techo '<div class=\"archive-pagination pagination\">';\n\t\tprevious_post_link( '<div class=\"pagination-previous alignleft\">%link</div>', $previouspost_text );\n\t\tnext_post_link( '<div class=\"pagination-next alignright\">%link</div>', $nextpost_text );\n\techo '</div>';\n}", "public function previous(): void\n {\n if ($this->cursor > 0) {\n $this->cursor--;\n }\n }", "function fc_pagination_prevpage($paged, $max_page, $prevpage) {\n if( $max_page > 1 && $paged > 1 )\n $pagingString = '<li class=\"prev\"><a href=\"'.get_pagenum_link($paged-1). '\">'.$prevpage.'</a></li>';\n return $pagingString;\n}", "protected function prepareNextPrevButtons() \n\t{\n\t}", "public function nextEnabled(int $page): string;", "function wp_page_reload_on_back_button_js()\n {\n }", "public function previousElement();", "function SetButtonPrev($a_cmd = 0,$a_lng = 0)\n\t{\n\t\t$this->btn_prev_on = true;\n\t\t$this->btn_prev_cmd = ($a_cmd) ? $a_cmd : \"gateway\";\n\t\t$this->btn_prev_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt(\"prev\");\n\t}", "function OnGoBack(){\n if (strlen($this->host_library_ID))\n $this->library_ID = $this->host_library_ID;\n\n if ($this->is_context_frame)\n\t\t\t$url = \"?package=context&page=contextframe&event=close\";\n\t\telse\n\t\t\t$url =\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }", "public function shouldRenderNextButton() {}", "public function previous_page(){\n if($this->current_page > 1){\n return $this->current_page - 1;\n }\n else{\n return NULL;\n }\n }", "public function displayLinks()\n {\n return (bool)$this->_scopeConfig->getValue(\n 'mfblog/post_view/nextprev/enabled',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "function submitBack($backbutton = FALSE){\n\t\t$backButtonLabel = is_string($backbutton) ? $backbutton : $this->pi_getLL('backButtonLabel');\n\n\t\t$out .= '<div class=\"tx_td_backbutton\"><a href=\"javascript:history.back()\">'.$backButtonLabel.'</a></div>';\n\t\treturn $out;\n\t}", "public abstract function getPrevMenu();", "public function PrevLink()\n {\n if ($this->NotFirstPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() - $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }", "function get_previous_posts_page_link()\n {\n }" ]
[ "0.6558906", "0.6551128", "0.64167285", "0.64136356", "0.6360696", "0.6314765", "0.625042", "0.62221706", "0.62114924", "0.6027289", "0.6026325", "0.60040456", "0.5959689", "0.5958086", "0.593562", "0.5927574", "0.58857656", "0.5863499", "0.58373964", "0.5833628", "0.583297", "0.5824738", "0.5767599", "0.5750725", "0.5748243", "0.57323515", "0.5731764", "0.5712204", "0.5685599", "0.56779224", "0.5660501", "0.5649812", "0.5619261", "0.56175596", "0.5593122", "0.55837923", "0.5579884", "0.55783576", "0.557296", "0.55620676", "0.5546458", "0.5545632", "0.55194753", "0.55034065", "0.5498585", "0.5497508", "0.54899395", "0.5486609", "0.54665697", "0.5464542", "0.5436838", "0.5387103", "0.53492635", "0.5339744", "0.5327834", "0.53228134", "0.5318406", "0.53164625", "0.5312568", "0.5295123", "0.5294572", "0.5293748", "0.5278631", "0.52599514", "0.52583426", "0.52583426", "0.5254948", "0.52536935", "0.52443266", "0.52439445", "0.52422893", "0.5235477", "0.52314514", "0.5224386", "0.52238846", "0.52206045", "0.5188444", "0.5182787", "0.51821464", "0.51779884", "0.51774627", "0.5174115", "0.51219195", "0.51212144", "0.5117735", "0.51156545", "0.51084495", "0.50846285", "0.5077407", "0.5075345", "0.5075111", "0.50680774", "0.5061391", "0.5048091", "0.5043782", "0.5034375", "0.5032598", "0.5032021", "0.502994", "0.50260353" ]
0.72105694
0
Renders the disabled state of the next page.
public function nextDisabled(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function nextEnabled(int $page): string;", "protected function renderDisabled()\n {\n return '';\n }", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "public function override_next_page() {\n return false;\n }", "private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">&gt;</a></li>';\n }\n }", "public function shouldRenderNextButton() {}", "private function generateRightButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&raquo;</a></li>', $this->url, $page + 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&raquo;</a></li>', $this->url, $page + 1));\n }\n }", "public function disable(): void\n {\n $this->disabled = true;\n }", "public function disableRendering($disable = true);", "public function setDisabled($disabled);", "public function setDisabled($disabled = true);", "public function is_disabled()\n {\n }", "public function disabled();", "public function disabled();", "private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">»</a></li>';\n }\n }", "private function generateLeftButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&laquo;</a></li>', $this->url, $page - 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>', $this->url, $page - 1));\n }\n }", "public function nextPage()\n\t{\n\t\treturn $this->getIsNextPageAvailable() ? parent::nextPage() : false;\n\t}", "public static function disable(){\n self::$disabled = true; \n self::$enabled = false;\n }", "function renderNext($tag = '&gt;&gt;') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page < $this->max_pages) {\r\n\t\t\treturn '<a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page + 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn $tag;\r\n\t\t}\r\n\t}", "function wpvideocoach_hide_dashboard_slider_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_dashboard_slider;\r\n\tif($wpvideocoach_dashboard_slider == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "public function disableAction()\n {\n $session = Mage::getSingleton('core/session');\n $session->setInlineTranslationEnabled(false);\n\n $this->_redirectUrl(Mage::getBaseUrl());\n }", "function isDisabled()\n {\n return false;\n }", "public function actionDisable()\n\t{\n\t\t// can be requested over GET, so check for the token manually\n\t\t$this->_checkCsrfFromToken($this->_input->filterSingle('_xfToken', XenForo_Input::STRING));\n\t\n\t\t$fieldId = $this->_input->filterSingle('field_id', XenForo_Input::UINT);\n\t\treturn $this->_switchFormActiveStateAndGetResponse($fieldId, 0);\n\t}", "function nextPage($text='next')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif (!empty($this->_pageDetails['nextPage']))\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['nextPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['nextPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['nextPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "public function disableButtons()\n\t{\n\t}", "function wpvideocoach_hide_introduction_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_introduction;\r\n\tif($wpvideocoach_introduction == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "function wpvideocoach_hide_toolbar_disable_field()\r\n{\r\n\tglobal $wpvideocoach_toolbar_link;\r\n\tif($wpvideocoach_toolbar_link == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "public function disable_step($old_state);", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "function nextPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n $root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the next button should point to the first article\n\tif( $currentView == 'home' ) {\n\t\treturn $root . getArrayFirstIndex( $activePages );\n\t}\n\t// If we're on the credits page, the next button should be inactive\n\telse if( $currentView == 'credits' ) {\n\t\treturn false;\n\t}\n\t// If we're on the last page, send to credits\n\telse if( $currentArticle == 'theend' ) {\n\t\treturn $root . 'credits';\n\t}\n\t// If we're on a regular article page get the next one\n\tif($activePages[$currentArticle]['numberOfPages'] == $currentArticlePage) {\n\t\tif( !$activePages[nextPrevArticleName('next')]['active'] ) return $root . 'theend';\n\t\treturn $root . nextPrevArticleName('next');\n\t} elseif($activePages[$currentArticle]['numberOfPages'] > $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage+1);\n\t}\n}", "protected function getDisabledPageWrapperHTML() {\n return $this->disabledPageWrapper;\n }", "public function skip_link() {\n\t\techo '<a class=\"skip-link screen-reader-text\" href=\"#site-content\">' . __( 'Skip to the content', 'wilbur' ) . '</a>';\n\t}", "protected function toggleDisableAction() {}", "public function genNextLink()\n\t{\n\t\t$this->pagination['nextLink'] = \"\";\t\n\t\tif($this->page < $this->numofpages)\n\t\t{\n\t\t\t$page = $this->page+1;\t\t\t\t\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_next',$this->prepend.$page.$this->append, '&gt;'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\t\n\t\t\t$this->pagination['nextLink'] = $item;\n\t\t}\n\t}", "public static function disablePage(){\n if (isset($_SESSION['name']) and !isset($_SESSION['name']))\n {\n header('location: ../load/index.php');\n }\n }", "protected function printDisabledTextFormField($nameField, $label, $value){ \n ?>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-2\" for=\"<?php echo $nameField ?>\" ><?php echo $label ?></label>\n <div class=\"col-sm-10\"> \n <input class=\"form-control\" type=\"text\" id=\"<?php echo $nameField ?>\" name=\"<?php echo $nameField ?>\" value=\"<?php echo $value ?>\" disabled />\n </div>\n </div>\n <?php \n }", "public function disable()\n {\n $this->enabled = false;\n }", "public function isDisabled()\n {\n return false;\n }", "private function print_next_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( min( $this->total_pages, $this->current_page + 1 ) ),\n\t\t\t__( 'Go to the next page', 'multilingual-press' ),\n\t\t\t'next-page' . $this->disable_last,\n\t\t\t'&rsaquo;'\n\t\t);\n\t}", "protected function getDisabledLink($text)\n {\n return sprintf($this->disabledPageWrapper, $text);\n }", "function disabled( $disabled, $current = true, $echo = true ) {\n\treturn __checked_selected_helper( $disabled, $current, $echo, 'disabled' );\n}", "public function disable() {\n\t\t$this->update(TRUE);\n\t}", "public function SetDisabled($disabled){\n\t\t$this->disabled = (boolean) $disabled;\n\t}", "public function previousDisabled(): string;", "public function setDisabled($disabled)\n {\n return $this->setData(self::DISABLED, $disabled);\n }", "public function isDisabled() {}", "function wp_link_manager_disabled_message()\n {\n }", "protected function _getDisabled()\n {\n return $this->getElement()->getDisabled() ? ' disabled' : '';\n }", "public function add_two_step_next_btn() {\n\n\t\t\t$button_title = astra_get_option( 'two-step-checkout-modern-button-text' );\n\t\t\t$button_sub_title = astra_get_option( 'two-step-checkout-modern-button-sub-text' );\n\n\t\t\t$two_step_next_btn_html = '';\n\n\t\t\t$two_step_next_btn_html .= '<div class=\"ast-embed-checkout-form-nav-btns\">';\n\n\t\t\t\t$two_step_next_btn_html .= '<a href=\"#ast-order-wrap\" class=\"button ast-next-button\" >';\n\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-content\">';\n\n\t\t\tif ( '' != $button_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-icon-wrap\">';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"dashicons dashicons-arrow-right-alt\"></span>';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-text\">' . esc_html( $button_title ) . '</span>';\n\t\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t}\n\n\t\t\tif ( '' != $button_sub_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-sub-text\">' . esc_html( $button_sub_title ) . '</span>';\n\t\t\t}\n\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t\t$two_step_next_btn_html .= '</a>';\n\n\t\t\t$two_step_next_btn_html .= '</div>';\n\n\t\t\techo $two_step_next_btn_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "public function disable_errors( $disable = true ) {\n\t\n\t\t$this->render_errors = true == $disable ? false : true;\n\t\n\t}", "private function _add_disabled(&$data) {\n\t\t$data['disabled'] = 'disabled';\n\t\t$data['title'] = 'You are not allowed to edit this field.';\n\t}", "protected function renderPageNextPrev()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n\n $buttons = [];\n $currentPage = $this->pagination->getPage();\n\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttons[] = $this->renderPageButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttons[] = $this->renderPageButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttons[] = $this->renderPageButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttons[] = $this->renderPageButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n return Html::tag('ul', implode(\"\\n\", $buttons), $this->options);\n }", "public function isDisabled()\n\t{\n\t\treturn false;\n\t}", "public function previousEnabled(int $page): string;", "public function setNextPage($nextPage);", "public function has_next_page()\n {\n }", "public function disableFormKey()\r\n {\r\n Mage::getSingleton('core/session')->setData('_form_key', 'disabled');\r\n }", "private function createNextPageLink($activePage)\n {\n # initialise variables\n $nextPage=1;\n $linkText=null;\n $startRecord=0;\n\n $nextPage=++$activePage;\n\n # There is no page 0 so need to disable in that case\n if($this->totalPages+1==$nextPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">&raquo;</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&amp;selectCounty='.$this->selectCounty;\n $linkText .= '&amp;startRecord='.$this->startRecordArr[$nextPage];\n $linkText .= '&amp;recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&amp;pageNum='.$nextPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">&raquo;</span>';\n $linkText .= '<span class=\"sr-only\">'.$nextPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }", "public function advanceLabelPage ()\r\n {\r\n $return = '';\r\n $this->label_column = 1;\r\n $this->label_row =1;\r\n ++$this->label_page;\r\n $return .= '\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n return $return;\r\n }", "public function get_disabled_post_state()\n {\n }", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function toggleStatus()\n {\n $pageId = Tools::getValue('id_page');\n\n Db::getInstance()->update(\n $this->module->table_name,\n ['active' => !$this->module->getHTMLPageStatus($pageId)],\n 'id_page = ' . $pageId\n );\n }", "function ppmess_shortcode_disabled(){\n\techo '<div class=\"ppmess-information\">';\n\t\techo __('Private messages are disabled', 'ppmess');\n\t\techo '<br/>';\n\t\techo __( 'To see private messages you must enable on the admin settings', 'ppmess');\t\t\n\t\t\n\t\tif( ! is_user_logged_in)\n\t\t\techo sprintf( '<a class=\"post-link-ppmess \" href=\"%s\">' . __('Login in', 'ppmess') . '</a>', wp_login_url(apply_filters('the_permalink', get_permalink())) );\n\techo '</div>';\n}", "public function pageExistDisabled()\n {\n // checks to see if the page is missing, if it is the page is routed to the 404error page\n if (!file_exists($this->page_folderFullPath . $this->page_name . \".php\"))\n {\n header(\"Location: /errors/404error\");\n }\n // checks to see if the page is disabled, if it is the page is routed to the pageDisabled page\n else if ($this->page_disabled === true)\n {\n header(\"Location: errors/pageDisabled\");\n }\n return true;\n }", "public function disable_step($old_state)\n\t{\n\t\treturn false;\n\t}", "public function NextPage()\n {\n if ($this->m_CurrentPage >= $this->m_TotalPages)\n $this->m_CurrentPage = $this->m_TotalPages;\n else\n $this->m_CurrentPage++;\n return $this->ReRender();\n }", "public function enable($enabled = true) {\n return parent::setAttr(\"disabled\", !$enabled);\n }", "protected function getNextButton()\n {\n if ( ! $this->paginator->hasMorePages()) {\n return $this->getDisabledLink($this->nextButtonText);\n }\n\n $url = $this->paginator->url($this->paginator->currentPage() + 1);\n\n return $this->getPrevNextPageLinkWrapper($url, $this->nextButtonText, 'next');\n }", "function wpvideocoach_hide_support_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_help_tabs;\r\n\tif($wpvideocoach_help_tabs == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "public function onDisable() {\n\t}", "public function isDisabled()\n {\n return parent::isDisabled();\n }", "public function isDisabled();", "public function isDisabled();", "public function isDisabled();", "public function disableNavigation() {\n\t\t$this->enableNav = false;\n\t}", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "protected function renderPageNextPrevInput()\n {\n $pageCount = $this->pagination->getPageCount();\n if ($pageCount < 2 && $this->hideOnSinglePage) {\n return '';\n }\n $currentPage = $this->pagination->getPage();\n\n $buttonLeft = [];\n // first page\n $firstPageLabel = $this->firstPageLabel === true ? '1' : $this->firstPageLabel;\n if ($firstPageLabel !== false) {\n $buttonLeft[] = $this->renderButton($firstPageLabel, 0, $this->firstPageCssClass, $currentPage <= 0, false);\n }\n\n // prev page\n if ($this->prevPageLabel !== false) {\n if (($page = $currentPage - 1) < 0) {\n $page = 0;\n }\n $buttonLeft[] = $this->renderButton($this->prevPageLabel, $page, $this->prevPageCssClass, $currentPage <= 0, false);\n }\n $buttonLeft = Html::tag('div', implode('', $buttonLeft), ['class' => 'input-group-btn']);\n \n $content = Html::textInput($this->pagination->pageParam, $currentPage + 1, [\n 'class' => 'form-control',\n 'autocomplete' => 'off'\n ]);\n $content .= Html::submitButton('Submit', $options = ['style' => 'display: none']);\n\n $buttonRight = [];\n // next page\n if ($this->nextPageLabel !== false) {\n if (($page = $currentPage + 1) >= $pageCount - 1) {\n $page = $pageCount - 1;\n }\n $buttonRight[] = $this->renderButton($this->nextPageLabel, $page, $this->nextPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n\n // last page\n $lastPageLabel = $this->lastPageLabel === true ? $pageCount : $this->lastPageLabel;\n if ($lastPageLabel !== false) {\n $buttonRight[] = $this->renderButton($lastPageLabel, $pageCount - 1, $this->lastPageCssClass, $currentPage >= $pageCount - 1, false);\n }\n $buttonRight = Html::tag('div', implode('', $buttonRight), ['class' => 'input-group-btn']);\n\n Html::addCssClass($this->options, 'input-group');\n Html::removeCssClass($this->options, 'pagination');\n Html::addCssClass($this->options, 'margin-t-sm margin-b-sm');\n\n $currentUrl = $this->pagination->getLinks();\n if (isset($currentUrl['self'])) {\n $currentUrl = $currentUrl['self'];\n } else {\n $currentUrl = Yii::$app->request->url;\n }\n\n $html = [];\n $html[] = Html::beginForm($currentUrl, 'get', ['class' => 'pagination-input']);\n $html[] = Html::tag('div', $buttonLeft.$content.$buttonRight, $this->options);\n $html[] = Html::endForm();\n return implode(\"\\n\", $html);\n }", "public function disable();", "private function isNextPage() {\n return isset($this->pages[$this->currentPageNumber + 1]);\n }", "public function isDisabled()\n {\n }", "function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }", "public static function disable()\n {\n // Disable the page theme\n unset(self::$data['theme']);\n\n // Disable the optimizer\n self::$data['optimize'] = false;\n }", "public function disabled(): self\n {\n return $this->state(['enabled' => false]);\n }", "function generatePrevNextButtonMarkup($buttonType, $buttonText, $buttonJavascriptAndExtraCode, $usersCanSave, $nextPage, $previousPage, $thanksPage) {\n $buttonMarkup = \"\";\n if($buttonType == \"next\") {\n if(!$usersCanSave AND $nextPage==$thanksPage) {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=next id=next value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n } elseif($buttonType == \"prev\") {\n if($previousPage == \"none\") {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=prev id=prev value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n }\n return $buttonMarkup;\n}", "private function render_invalid_step() {\n\t\t?>\n\t\t<p><?php\n\t\tprintf(\n\t\t\t/* translators: 1 - an opening link tag, 2 - a closing link tag. */\n\t\t\tesc_html__( 'You have reached an invaild step - %1$sreturn to the start of the wizard%2$s.', 'wp-security-audit-log' ),\n\t\t\t'<a href=\"' . esc_url( $this->get_welcome_step() ) . '\">',\n\t\t\t'</a>'\n\t\t);\n\t\t?></p>\n\t\t<?php\n\t}", "public function next()\n {\n do {\n ++$this->pointer;\n } while ($this->valid() && !$this->current()->isEnabled());\n }", "public function disabled()\n\t{\n\t\t$this->disabled = true;\n\t\treturn $this;\n\t}", "public function disabled_message() {\n echo '<!-- ' . Yfp_Ganalytics_Basic_Common::COMMON_PLUGIN_NAME . ' is disabled in the admin panel. -->' . \"\\n\";\n }", "private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }", "public static function disable(): void\n {\n self::$isEnabled = false;\n }", "public function nextPage()\n {\n return $this->nextPage;\n }", "public function GetDisabled(){\n\t\treturn $this->disabled;\n\t}", "public function disable() {}", "function MyMod_Paging_Page_No_Set()\n {\n //$this->MyMod_Paging_No=$this->PresetPage;\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetPOST($this->ModuleName.\"_Page\");\n if (empty($this->MyMod_Paging_No))\n {\n $this->MyMod_Paging_No=$this->GetGETOrPOST(\"Page\");\n }\n }\n\n if (\n empty($this->MyMod_Paging_No)\n ||\n $this->MyMod_Paging_No>$this->MyMod_Paging_N\n )\n {\n $this->MyMod_Paging_No=1;\n }\n }", "public function getNextPage();", "public function getDisabled() {\n return @$this->attributes['disabled'];\n }", "public function nextAction()\n {\n $this->pageAction('goToNextPage');\n }", "public function skipNext($num = 1)\r\n {\r\n $skip = new DispatchHaltedException(null, DispatchHaltedException::SKIP_NEXT);\r\n $skip->setNumberOfSkips($num);\r\n\r\n throw $skip;\r\n }", "public function statusAction() {\n $status = $this->_getParam('status');\n $infoId = $this->_getParam('id');\n if (empty($status)) {\n $this->view->title = $this->view->translate(\"Disable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to disable this page? After being disabled this will not be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Disable\");\n } else {\n $this->view->title = $this->view->translate(\"Enable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to enable this page? After being enabled this will be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Enable\");\n }\n // Check post\n if ($this->getRequest()->isPost()) {\n $pagesettingsTable = Engine_Api::_()->getDbTable('startuppages', 'sitestoreproduct');\n $pagesettingsTable->update(array('status' => $status), array('startuppages_id =?' => $infoId));\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('Successfully done.')\n ));\n }\n }" ]
[ "0.61242867", "0.6116207", "0.6025298", "0.5923537", "0.5874592", "0.58318937", "0.5762266", "0.57410985", "0.569656", "0.56649756", "0.56623626", "0.56557107", "0.56520367", "0.56520367", "0.5645975", "0.56258917", "0.5554265", "0.552206", "0.5459254", "0.53737366", "0.5359584", "0.5349715", "0.532885", "0.5300636", "0.5285822", "0.5270864", "0.52361494", "0.52244294", "0.5209346", "0.5206046", "0.51977766", "0.51914", "0.51870954", "0.51797885", "0.51764166", "0.5151614", "0.5147306", "0.51383805", "0.5123446", "0.5109536", "0.51062995", "0.5100739", "0.50820714", "0.50721484", "0.507133", "0.50696373", "0.5065757", "0.5061632", "0.50569427", "0.5049965", "0.5046715", "0.50400907", "0.50269234", "0.50247985", "0.5012873", "0.5004048", "0.49979004", "0.499376", "0.49862105", "0.49808878", "0.4968889", "0.4967583", "0.4965794", "0.49632102", "0.49584964", "0.49576643", "0.49445567", "0.49414054", "0.49383134", "0.4937633", "0.49299583", "0.49274448", "0.4922531", "0.4922531", "0.4922531", "0.49124575", "0.4900961", "0.48950854", "0.48879993", "0.4886302", "0.48802397", "0.48772094", "0.4877191", "0.48725826", "0.48517537", "0.48428187", "0.48409668", "0.48385152", "0.48373228", "0.48286197", "0.48254183", "0.48244977", "0.48179713", "0.4806443", "0.4805135", "0.48029202", "0.4798533", "0.4797799", "0.47921196", "0.47898814" ]
0.63642573
0
Renders the enabled state of the next page.
public function nextEnabled(int $page): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shouldRenderNextButton() {}", "private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">&gt;</a></li>';\n }\n }", "public function nextPage()\n\t{\n\t\treturn $this->getIsNextPageAvailable() ? parent::nextPage() : false;\n\t}", "public function nextDisabled(): string;", "public function has_next_page()\n {\n }", "public function override_next_page() {\n return false;\n }", "function renderNext($tag = '&gt;&gt;') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page < $this->max_pages) {\r\n\t\t\treturn '<a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page + 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn $tag;\r\n\t\t}\r\n\t}", "function nextPage() {\n\tglobal $activePages, $currentView, $currentArticle, $currentArticlePage;\n $root = '/' . $_GET['language'] . '/';\n\t\n\t// If we're on the home page, the next button should point to the first article\n\tif( $currentView == 'home' ) {\n\t\treturn $root . getArrayFirstIndex( $activePages );\n\t}\n\t// If we're on the credits page, the next button should be inactive\n\telse if( $currentView == 'credits' ) {\n\t\treturn false;\n\t}\n\t// If we're on the last page, send to credits\n\telse if( $currentArticle == 'theend' ) {\n\t\treturn $root . 'credits';\n\t}\n\t// If we're on a regular article page get the next one\n\tif($activePages[$currentArticle]['numberOfPages'] == $currentArticlePage) {\n\t\tif( !$activePages[nextPrevArticleName('next')]['active'] ) return $root . 'theend';\n\t\treturn $root . nextPrevArticleName('next');\n\t} elseif($activePages[$currentArticle]['numberOfPages'] > $currentArticlePage) {\n\t\treturn $root . $currentArticle . '/' . (string)($currentArticlePage+1);\n\t}\n}", "private function isNextPage() {\n return isset($this->pages[$this->currentPageNumber + 1]);\n }", "private function print_next_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( min( $this->total_pages, $this->current_page + 1 ) ),\n\t\t\t__( 'Go to the next page', 'multilingual-press' ),\n\t\t\t'next-page' . $this->disable_last,\n\t\t\t'&rsaquo;'\n\t\t);\n\t}", "private function pageEnabled() {\r\n\t\t//Check if the plugin is valid and exits \t\r\n\t\tif (isset ( $_POST ['enable_module'] ) || strlen ( $_POST ['enable_module'] ) < 1 || ! ereg ( \"[a-zA-Z]+\", $_POST ['enable_module'] )) {\r\n\t\t\tthrow new Exception ( \"Invalid plugin name {$_POST['enable_module']}\" );\r\n\t\t}\r\n\t\t\r\n\t\t$plugin = $this->data->xpath ( \"plugin[@name='{$_POST ['enable_module']}']\" );\r\n\t\t\r\n\t\t//Check if there where any plugins found with that name\r\n\t\tif (! is_array ( $plugin ) || empty ( $plugin [0] )) {\r\n\t\t\tthrow new Exception ( \"The plugin {$_POST['enable_module']} could not be found.\" );\r\n\t\t}\r\n\t\t\r\n\t\tLogger::getRootLogger ()->info ( \"Changing status of module {$_POST ['enable_module']} to {$_POST ['enable']}\" );\r\n\t\t\r\n\t\t//Enable/disbale the plugin in XML\r\n\t\tif ($_POST ['enable'] == 'true' || $_POST ['enable'] == '1') {\r\n\t\t\t$plugin [0] ['enabled'] = \"true\";\r\n\t\t} elseif ($_POST ['enable'] == 'false' || $_POST ['enable'] == '0') {\r\n\t\t\t\r\n\t\t\t//Try to stop the plugin, when going from enabled to disabled.\r\n\t\t\t$plugin_object = $this->framework->getPlugin ( ( string ) $plugin [0] ['name'] );\r\n\t\t\tif (isset ( $plugin_object ) && $plugin_object->isService () && ( string ) $plugin [0] ['enabled'] == \"true\") {\r\n\t\t\t\t$plugin_object->stop ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$plugin [0] ['enabled'] = \"false\";\r\n\t\t} else {\r\n\t\t\tthrow new Exception ( \"Invalid status option for a plugin. Did not disable/enable {$_POST ['enable_module']}.\" );\r\n\t\t}\r\n\t\t\r\n\t\t//Save config and print the changed plugin\r\n\t\tif ($this->config->saveConfig ()) {\r\n\t\t\techo \"<reply action=\\\"ok\\\"><plugin\";\r\n\t\t\tforeach ( $plugin [0]->attributes () as $name => $value ) {\r\n\t\t\t\techo \" $name = \\\"$value\\\"\";\r\n\t\t\t}\r\n\t\t\techo \"/></reply>\";\r\n\t\t} else {\r\n\t\t\tthrow new Exception ( \"Error, could not save configuration file.\" );\r\n\t\t}\r\n\t}", "public function has_next()\n\t{\n\t\treturn $this->get_cur_page() < $this->get_total_pages();\n\t}", "function cpl_print_button_pages($numArticle, $buttonSelected){\r\n if($numArticle != 0) {\r\n echo '<section>',\r\n '<p>Pages : </p>';\r\n for ($i=0; $i < $numArticle/4; $i++) {\r\n if($i+1 == $buttonSelected) {\r\n echo '<a id=\"linkDown\">',$i+1,'</a>';\r\n } else {\r\n echo '<a href=\"actus.php?buttonPage=',cp_encrypt_url([$i+1]),'\">',$i+1,'</a>';\r\n }\r\n }\r\n echo '</section>';\r\n }\r\n }", "private function generateRightButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&raquo;</a></li>', $this->url, $page + 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&raquo;</a></li>', $this->url, $page + 1));\n }\n }", "public function NextPage()\n {\n if ($this->m_CurrentPage >= $this->m_TotalPages)\n $this->m_CurrentPage = $this->m_TotalPages;\n else\n $this->m_CurrentPage++;\n return $this->ReRender();\n }", "function nextPage($text='next')\n\t{\n\t\tif (empty($this->_pageDetails)) { return false; }\n\t\tif (!empty($this->_pageDetails['nextPage']))\n\t\t{\n\t\t\tif($this->style == 'ajax')\n\t\t\t{\t\n\t\t\t\t//$t = $this->Ajax->linkToRemote($text, array(\"fallback\"=>$this->action.\"#\",\"url\" => $this->link.$this->_pageDetails['nextPage'],\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t$t = $this->Ajax->link($text, $this->link.$this->_pageDetails['nextPage'],array(\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$t = $this->Html->link('<strong>' . $text . '</strong>',$this->link.$this->_pageDetails['nextPage'], false, false, false);\n\t\t\t}\n\t\t\treturn $t;\n\t\t}\t\n\t\t//return '<span><strong>' . $text . '</strong></span>';\n\t\treturn false;\n\t}", "public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }", "public function next()\n {\n do {\n ++$this->pointer;\n } while ($this->valid() && !$this->current()->isEnabled());\n }", "public function displayLinks()\n {\n return (bool)$this->_scopeConfig->getValue(\n 'mfblog/post_view/nextprev/enabled',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function add_two_step_next_btn() {\n\n\t\t\t$button_title = astra_get_option( 'two-step-checkout-modern-button-text' );\n\t\t\t$button_sub_title = astra_get_option( 'two-step-checkout-modern-button-sub-text' );\n\n\t\t\t$two_step_next_btn_html = '';\n\n\t\t\t$two_step_next_btn_html .= '<div class=\"ast-embed-checkout-form-nav-btns\">';\n\n\t\t\t\t$two_step_next_btn_html .= '<a href=\"#ast-order-wrap\" class=\"button ast-next-button\" >';\n\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-content\">';\n\n\t\t\tif ( '' != $button_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-next-button-icon-wrap\">';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"dashicons dashicons-arrow-right-alt\"></span>';\n\t\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-text\">' . esc_html( $button_title ) . '</span>';\n\t\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t}\n\n\t\t\tif ( '' != $button_sub_title ) {\n\t\t\t\t\t\t$two_step_next_btn_html .= '<span class=\"ast-button-sub-text\">' . esc_html( $button_sub_title ) . '</span>';\n\t\t\t}\n\t\t\t\t\t$two_step_next_btn_html .= '</span>';\n\t\t\t\t$two_step_next_btn_html .= '</a>';\n\n\t\t\t$two_step_next_btn_html .= '</div>';\n\n\t\t\techo $two_step_next_btn_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "public function setNextPage($nextPage);", "private function generateLeftButton($page, $isDisabled = false)\n {\n if (!$isDisabled) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">&laquo;</a></li>', $this->url, $page - 1));\n } else {\n $this->appendData(sprintf('<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>', $this->url, $page - 1));\n }\n }", "private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">»</a></li>';\n }\n }", "public function nextAction()\n {\n $this->pageAction('goToNextPage');\n }", "public function toggleStatus()\n {\n $pageId = Tools::getValue('id_page');\n\n Db::getInstance()->update(\n $this->module->table_name,\n ['active' => !$this->module->getHTMLPageStatus($pageId)],\n 'id_page = ' . $pageId\n );\n }", "public function next()\n {\n $pageSize = $this->getDataProvider()->getPagination()->pageSize;\n $this->currentIndex++;\n if ($this->currentIndex >= $pageSize) {\n $this->currentPage++;\n $this->currentIndex = 0;\n $this->loadPage();\n }\n }", "public function enable()\n {\n $this->enabled = true;\n }", "protected function enabled()\n {\n }", "public function genNextLink()\n\t{\n\t\t$this->pagination['nextLink'] = \"\";\t\n\t\tif($this->page < $this->numofpages)\n\t\t{\n\t\t\t$page = $this->page+1;\t\t\t\t\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_next',$this->prepend.$page.$this->append, '&gt;'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\t\n\t\t\t$this->pagination['nextLink'] = $item;\n\t\t}\n\t}", "public function statusAction() {\n $status = $this->_getParam('status');\n $infoId = $this->_getParam('id');\n if (empty($status)) {\n $this->view->title = $this->view->translate(\"Disable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to disable this page? After being disabled this will not be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Disable\");\n } else {\n $this->view->title = $this->view->translate(\"Enable Page?\");\n $this->view->discription = $this->view->translate(\"Are you sure that you want to enable this page? After being enabled this will be shown to users.\");\n $this->view->bouttonLink = $this->view->translate(\"Enable\");\n }\n // Check post\n if ($this->getRequest()->isPost()) {\n $pagesettingsTable = Engine_Api::_()->getDbTable('startuppages', 'sitestoreproduct');\n $pagesettingsTable->update(array('status' => $status), array('startuppages_id =?' => $infoId));\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('Successfully done.')\n ));\n }\n }", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "public function nextPage()\n {\n return $this->nextPage;\n }", "private function createNextPageLink($activePage)\n {\n # initialise variables\n $nextPage=1;\n $linkText=null;\n $startRecord=0;\n\n $nextPage=++$activePage;\n\n # There is no page 0 so need to disable in that case\n if($this->totalPages+1==$nextPage)\n {\n $linkText=' <li class=\"disabled\"><a href=\"#\" aria-label=\"Previous\"><span aria-hidden=\"true\">&raquo;</span></a></li>';\n }\n else\n {\n $linkText = '<li><a href=\"';\n $linkText .= $this->url;\n $linkText .= '?searchParam='.$this->searchParam;\n $linkText .= '&amp;selectCounty='.$this->selectCounty;\n $linkText .= '&amp;startRecord='.$this->startRecordArr[$nextPage];\n $linkText .= '&amp;recordsPerPage='.$this->recordsPerPage;\n $linkText .= '&amp;pageNum='.$nextPage.'\"';\n $linkText .= 'aria-label=\"Previous\">';\n $linkText .= '<span aria-hidden=\"true\">&raquo;</span>';\n $linkText .= '<span class=\"sr-only\">'.$nextPage.'</span>';\n $linkText .= '</a></li> ';\n }\n return $linkText;\n }", "public function enable() {\n\t\t$this->update(FALSE);\n\t}", "public function away_mode_enabled() {\n\n\t\t//disable the option if away mode is in the past\n\t\tif ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] === true && ( $this->settings['type'] == 1 || ( $this->settings['end'] > current_time( 'timestamp' ) || $this->settings['type'] === 2 ) ) ) {\n\t\t\t$enabled = 1;\n\t\t} else {\n\t\t\t$enabled = 0;\n\t\t}\n\n\t\t$content = '<input type=\"checkbox\" id=\"itsec_away_mode_enabled\" name=\"itsec_away_mode[enabled]\" value=\"1\" ' . checked( 1, $enabled, false ) . '/>';\n\t\t$content .= '<label for=\"itsec_away_mode_enabled\"> ' . __( 'Enable away mode', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\n\t\techo $content;\n\n\t}", "public function next() : void\n {\n $this->currentRecordPos++;\n if ($this->currentRecordPos > $this->maxPageRecord) {\n $this->page($this->currentPagePos+1);\n }\n }", "public function advanceLabelPage ()\r\n {\r\n $return = '';\r\n $this->label_column = 1;\r\n $this->label_row =1;\r\n ++$this->label_page;\r\n $return .= '\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"labelpage\">\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n return $return;\r\n }", "private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }", "public function setNextPage($nextPage)\n {\n $this->nextPage = $nextPage;\n }", "public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}", "public function enable_step($old_state);", "public function getNextPage();", "public function has_nextpage() {\n return $this->nextpage() <= $this->totalpages() ? true : false;\n }", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "function posts_next() \n\t{\n\t return 'class=\"red darken-2 btn z-depth-1\"';\n\t}", "public function enableNavigation() {\n\t\t$this->enableNav = true;\n\t}", "public function has_next_page() {\n\t\t\treturn $this->next_page > $this->page;\n\t\t}", "public function render_settings_page()\n {\n }", "public function enabled();", "public function enabled();", "public function enabled();", "public function enabled();", "public function settings_field_enabled() {\n\n\t\tif ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] === true ) {\n\t\t\t$enabled = 1;\n\t\t} else {\n\t\t\t$enabled = 0;\n\t\t}\n\n\t\techo '<input type=\"checkbox\" id=\"itsec_online_files_enabled\" name=\"itsec_online_files[enabled]\" value=\"1\" ' . checked( 1, $enabled, false ) . '/>';\n\t\techo '<label for=\"itsec_online_files_enabled\"> ' . __( 'Enable Online file comparison', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\t\techo '<p class=\"description\"> ' . __( 'When any WordPress core file or file in an iThemes plugin or theme has been changed on your system, this feature will compare it with the version on WordPress.org or iThemes (as appropriate) to determine if the change was malicious. Currently this feature only works with WordPress core files and plugins and themes by iThemes (plugins and themes from other sources will be added as available).', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t}", "function BeforeMoveNextList(&$data, &$row, &$record, &$pageObject)\n{\n\n\t\t\nif ($data['mode'])\n$record[\"MyButton\"]=true;\n\n\n;\t\t\n}", "public function next()\n\t{\n\t\t$pageSize = count($this->_items);\n\t\t$this->_currentIndex++;\n\t\tif ($this->_currentIndex >= $pageSize) {\n\t\t\t$this->_currentPage++;\n\t\t\t$this->_currentIndex = 0;\n\t\t\t$this->loadPage();\n\t\t}\n\t}", "function link_card_in_page()\n\t{\n\t\tlog_message('debug', 'Account/link_card_in_page');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['featuredBanks'] = $this->_api->get('money/banks', array('offset'=>0, 'limit'=>'10', 'isFeatured'=>'Y'));\n\t\t$this->native_session->set('link_in_page','Y');\n\t\t$this->load->view('account/choose_bank', $data);\n\t}", "function next() { \n\n\t\tif ($this->XBMCCmd(\"PlayNext\")!=\"OK\") { return false; }\n return true;\n\n\t}", "function page_manager_node_view_enable($cache, $status) {\n variable_set('page_manager_node_view_disabled', $status);\n\n // Set a global flag so that the menu routine knows it needs\n // to set a message if enabling cannot be done.\n if (!$status) {\n $GLOBALS['page_manager_enabling_node_view'] = TRUE;\n }\n}", "function disabled($disabled, $current = \\true, $display = \\true)\n {\n }", "protected function renderDisabled()\n {\n return '';\n }", "function render_block_core_query_pagination_next($attributes, $content, $block)\n {\n }", "public static function enable(): void\n {\n self::$isEnabled = true;\n }", "protected function getNextButton()\n {\n if ( ! $this->paginator->hasMorePages()) {\n return $this->getDisabledLink($this->nextButtonText);\n }\n\n $url = $this->paginator->url($this->paginator->currentPage() + 1);\n\n return $this->getPrevNextPageLinkWrapper($url, $this->nextButtonText, 'next');\n }", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "public function has_next_page() {\n\n\t\t\treturn $this->next_page() <= $this->total_pages() ? true : false;\n\n\t\t}", "public function nextpage() {\n return $this->current_page + 1;\n }", "public function nextPage()\n {\n return $this->currentPage + 1;\n }", "public static function enable() {\n\t\tself::$enabled = true;\n\t}", "public function enable($enabled = true) {\n return parent::setAttr(\"disabled\", !$enabled);\n }", "public function actionEnable()\n\t{\n\t\t// can be requested over GET, so check for the token manually\n\t\t$this->_checkCsrfFromToken($this->_input->filterSingle('_xfToken', XenForo_Input::STRING));\n\t\n\t\t$fieldId = $this->_input->filterSingle('field_id', XenForo_Input::UINT);\n\t\treturn $this->_switchFormActiveStateAndGetResponse($fieldId, 1);\n\t}", "function wpvideocoach_hide_toolbar_disable_field()\r\n{\r\n\tglobal $wpvideocoach_toolbar_link;\r\n\tif($wpvideocoach_toolbar_link == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}", "public function next()\n {\n return $this->pager->next();\n }", "public function previousEnabled(int $page): string;", "public function enableAction()\n {\n $hash = $this->_request->getParam('hash', '');\n $expected = Mage::helper('livetranslator')->getCurrentHash();\n\n if ($hash == $expected || $hash == $expected - 1) {\n $session = Mage::getSingleton('core/session');\n $session->setInlineTranslationEnabled(true);\n }\n\n $this->_redirectUrl(Mage::getBaseUrl());\n }", "public function setEnabled($enabled);", "public function setEnabled($enabled);", "public function reqEncyclicalPage() {\n $this->instance = new Encyclical();\n $this->view($this->instance->getEncyclical(false, false), 'encyclics', 'Encíclicas papais');\n }", "function nextPage()\n\t\t{\n\t\t\tif(!$this->hasNext())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\n\t\t\t$this->currentPage++;\t\t\t\n\t\t}", "public function header_next() {\n\t\tif (!empty($_SESSION['page_list'])) {\n\t\t\t$_SESSION['next_page'] = $_SESSION['page_list'][0];\n\t\t\t$_SESSION['page_list_done'][] = $_SESSION['page_list'][0];\n\t\t\tarray_splice($_SESSION['page_list'], 0, 1);\n\t\t\tforeach ($_SESSION['page_list_done'] as $value) {\n\t\t\t\techo $value . '<br />';\n\t\t\t}\n\t\t\t$_SESSION['started'] = 1;\n\t\t\t//var_dump($_SESSION['page_list']);\n\t\t\techo '<br />';\n\t\t\techo '<br />';\n\t\t\techo '<br />';\n\t\t\t//var_dump($_SESSION['page_list_done']);\n\t\t\theader( \"refresh:1;url=\" . $_SERVER['PHP_SELF'] ); \n\t\t\t//exit;\n\t\t} else if (empty($_SESSION['page_list']) && $_SESSION['started'] == 0) {\n\t\t\t$_SESSION['started'] = 1;\n\t\t\techo 'oops session[\"started\"] est egal à zero alors que page_list n\\'est aps vide';\n\t\t} else if (empty($_SESSION['page_list']) && $_SESSION['started'] == 1) {\n\t\t\techo \"The domain has been parsed entirely ! <br />The e-mail list is below :\";\n\t\t\texit;\n\t\t\t\n\t\t}\n\t}", "public function hasNextPage() {\n return $this->getCurPage() < $this->getTotalPage();\n }", "public function next(): void\n {\n if (!\\next($this->responseData->_embedded->items) && $this->fetchMore) {\n if ($this->getPage() < $this->getPages()) {\n $this->responseData = $this->client->requestLink($this->getLinks()->next->href);\n $this->rewind();\n }\n }\n }", "public function next() {\n if (JRequest::getString(\"cancontinue\") == \"no\") {\n $this->setRedirect(JURI::base().'index.php?option='.JRequest::getCmd('option').'&view=wizard');\n JError::raiseWarning(413444, \"Fehler: Voraussetzungen werden nicht erfüllt.\");\n \n }\n\n if(JRequest::getString(\"from-step\") == \"2\") {\n $ov = JRequest::getString(\"ov\");\n if ($ov == \"\") { JError::raiseError(56434, \"Kein Organisations-Kürzel\"); }\n switch (JRequest::getString(\"setup\")) {\n case \"hiorgcal\": {\n $this->getModel(\"wizard\")->setHiOrgCalConfig($ov);\n break; \n }\n case \"dp\": {\n $this->getModel(\"wizard\")->installPlugin(); \n $this->getModel(\"wizard\")->setDpCalConfig($ov);\n $this->getModel(\"wizard\")->enablePlugin();\n }\n case \"both\": {\n $this->getModel(\"wizard\")->installPlugin(); \n $this->getModel(\"wizard\")->setDpCalConfig($ov);\n $this->getModel(\"wizard\")->enablePlugin();\n $this->getModel(\"wizard\")->setHiOrgCalConfig($ov);\n break;\n \n }\n default:\n JError::raiseError(453434, \"Daten-Manipulation\"); \n break;\n }\n \n \n }\n if(JRequest::getString(\"from-step\") == \"3\") {\n \n if (JRequest::getString(\"setup\") == \"dp\" ) {\n $this->setRedirect(JURI::base().'index.php');\n $this->getModel(\"wizard\")->removeYourself();\n }\n //$this->setRedirect(JURI::base().'index.php');\n JError::raiseNotice(123, \"HiOrg-Server Integration wurde abgeschlossen. Unbenötigte Pakete und Dateien wurden entfernt.\");\n \n }\n parent::display();\n }", "function hasNextPage() {\n\t\treturn $this->hasPage($this->p + 1);\n\t}", "public function assignment_page(){\n\t\t$page_base = $this->page_url();\n\t\t//switch($tab)\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>Assignments</h1>\n\t\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t\t<a href=\"<?= $page_base;?>&amp;status=active\" class=\"nav-tab\" title=\"Active Courses\">Active Courses</a>\n\t\t\t\t<a href=\"<?= $page_base;?>&amp;status=inactive\" class=\"nav-tab\" title=\"Inactive Courses\">Inactive Courses</a>\n\t\t\t</h2>\n\t\t\t<h3>Course List</h3>\n\t\t\t<?php\n\t\t\t// 'post_type' => 'course',\n\t // 'showposts' => 10,\n\t // 'orderby' => $orderby,\n\t // 'order' => strtoupper($order) \n\t\t\twp_lms_html_gen::form_open(array(\"post_type\" => \"course\", \"showposts\" => \"10\", \"orderby\" => \"title\", \"order\" => \"ASC\"), $page_base ) ?>\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function nextPageUrl()\n {\n $this->resetQuery();\n\n if ($this->items->count() == $this->perPage()) {\n $this->appends('start', session()->get('accountant.api.start'));\n\n return $this->url($this->currentPage() + 1);\n }\n }", "protected function needsNewPage()\n {\n return $this->getY() >= $this->layout['pageMaxY'];\n }", "function generatePrevNextButtonMarkup($buttonType, $buttonText, $buttonJavascriptAndExtraCode, $usersCanSave, $nextPage, $previousPage, $thanksPage) {\n $buttonMarkup = \"\";\n if($buttonType == \"next\") {\n if(!$usersCanSave AND $nextPage==$thanksPage) {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=next id=next value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n } elseif($buttonType == \"prev\") {\n if($previousPage == \"none\") {\n $buttonJavascriptAndExtraCode = \"disabled=true\";\n }\n $buttonMarkup = \"<input type=button name=prev id=prev value='\" . $buttonText . \"' $buttonJavascriptAndExtraCode>\\n\";\n }\n return $buttonMarkup;\n}", "public function setNext($next) {}", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "public function drawPage()\n\t\t{\n\t\t}", "public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }", "function tinymce_nextpage( $mce_buttons ) {\n\t\t $pos = array_search( 'wp_more', $mce_buttons, true );\n\t\t if ( $pos !== false ) {\n\t\t\t $tmp_buttons = array_slice( $mce_buttons, 0, $pos + 1 );\n\t\t\t $tmp_buttons[] = 'wp_page';\n\t\t\t $mce_buttons = array_merge( $tmp_buttons, array_slice( $mce_buttons, $pos + 1 ) );\n\t\t }\n\t\t return $mce_buttons;\n\t }", "public function loadNextPage()\n {\n $nextPage = $this->results->getNextPage();\n $this->search($nextPage);\n }", "public function nextAction()\n {\n // check if request is ajax\n if (Helper::isAjaxRequest()) {\n // get request\n $code = Helper::requestGet('code', null);\n $userName = Helper::requestGet('userName', null);\n\n // get next url string\n $url = $this->getMediaNextUrlByCode($code);\n\n if ($url) {\n // do request for content\n $media = file_get_contents($url);\n\n // decode json\n $media = json_decode($media);\n\n // check for error\n $this->hasError($media);\n\n // check if json valid and response success\n if (!json_last_error() && $media->meta->code == self::SUCCESS_RESPONSE && !empty($media->data)) {\n $hasNextUrl = false;\n\n if (isset($media->pagination->next_url)) {\n $hasNextUrl = true;\n\n // set next pagination url\n $this->setMediaNextUrlByCode($code, $media->pagination->next_url);\n }\n\n // options for view rendering\n $options = [\n 'c' => Config::get('defaultController'),\n 'a_next' => 'next',\n 'code' => $code,\n 'userName' => $userName,\n 'hasNextUrl' => $hasNextUrl,\n ];\n\n // rendering view without layout\n Helper::renderStatic('main/_viewMediaMore', compact('media', 'options'), false);\n exit;\n }\n }\n }\n }", "private function set_context_vars() {\n\n\t\t$this->total_pages = $this->data->get_total_pages();\n\t\t$this->total_items = $this->data->get_total_items();\n\t\t$this->current_page = $this->data->get_current_page();\n\t\t$this->current_url = $this->get_current_url();\n\n\t\tif ( 1 === $this->current_page ) {\n\t\t\t$this->disable_first = ' disabled';\n\t\t}\n\n\t\tif ( $this->current_page === $this->total_pages ) {\n\t\t\t$this->disable_last = ' disabled';\n\t\t}\n\t}", "function getEnabled() {return $this->_enabled;}", "public function active() {\n\n $data = array();\n $data['result'] = $this->property_model->fetchAll(getLoginUserId(), 1); // Approved\n $data['title'] = \"Active Properties\";\n \n $this->render('admin/property/active', $data);\n }", "public function displayInAdmin()\n {\n return self::_enabled();\n }", "function dp_likes_page_button() {\t\n\tif(get_option('dp_header_likes') && $likes_page_id = get_option('dp_post_likes_page')) {\n\t\t$dp_post_likes = get_option('dp_post_likes');\n\t\t$login_required = !empty($dp_post_likes['login_required']) ? true : false;\n\t\tif(!is_user_logged_in() && $login_required)\n\t\t\treturn false;\n\t\t\t\n\t\techo '<a class=\"btn btn-likes btn-red\" href=\"'.get_permalink($likes_page_id).'\">'.get_the_title($likes_page_id).'</a>';\n\t}\n}", "function wpvideocoach_hide_introduction_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_introduction;\r\n\tif($wpvideocoach_introduction == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}" ]
[ "0.6432452", "0.63233167", "0.616049", "0.5757782", "0.5720771", "0.56275195", "0.56198066", "0.5576079", "0.5574223", "0.55279475", "0.5456375", "0.5435921", "0.54349506", "0.5426101", "0.5402528", "0.5389232", "0.53891844", "0.5380763", "0.53385174", "0.533479", "0.5329211", "0.53068495", "0.52991694", "0.52979904", "0.5287873", "0.528505", "0.5274743", "0.524427", "0.5223704", "0.517869", "0.5175267", "0.517298", "0.5162641", "0.5159439", "0.51411796", "0.51351166", "0.51325107", "0.512967", "0.51278126", "0.51024085", "0.5080014", "0.5065062", "0.5053828", "0.5033547", "0.5026394", "0.501118", "0.50074774", "0.49928108", "0.49601966", "0.49601966", "0.49601966", "0.49601966", "0.4946866", "0.4944771", "0.49407002", "0.49382806", "0.49313012", "0.49309865", "0.49197957", "0.4916942", "0.4916569", "0.48986775", "0.4895714", "0.4894782", "0.48840463", "0.48779082", "0.4867183", "0.48669082", "0.4866194", "0.4859979", "0.4859031", "0.4858988", "0.48544484", "0.48244405", "0.4823772", "0.4823772", "0.48147523", "0.48042712", "0.479766", "0.47941992", "0.47938982", "0.47846785", "0.4779233", "0.4778015", "0.47779962", "0.47748402", "0.47714028", "0.47709045", "0.47687533", "0.47608703", "0.475777", "0.4753669", "0.4751266", "0.4751238", "0.47480708", "0.47402045", "0.4740034", "0.47368023", "0.4733144", "0.47298536" ]
0.67516303
0
Renders the first page.
public function first(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstPage()\n\t\t{\n\t\t\t$this->currentPage = 1;\n\t\t}", "abstract protected function renderFirstView();", "private function print_first_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( 1 ),\n\t\t\t__( 'Go to the first page', 'multilingual-press' ),\n\t\t\t'first-page' . $this->disable_first,\n\t\t\t'&laquo;'\n\t\t);\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function render_page() {\n\t\t$this->render_template();\n\t}", "public function frontpage() {\n\t\t\n\t\t$this->set('page_title', 'Welcome'); // this is hardcoded for index page\n\t\t$this->render('index');\n\t}", "abstract function render_page();", "public function render() {\n\t\t$this->render_page_content();\n\t}", "public function isFirstPage()\n {\n return $this->getPage() == 1;\n }", "public function pageOne()\n {\n\n\n View::show(\"pageOne.php\", \"pageOne\");\n }", "public function startNewPage()\n {\n }", "public function getFirstPage();", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "function renderFirst($tag = 'First') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page == 1) {\r\n\t\t\treturn '<b style=\" float:none;\" class=\"page_link\">'.$tag.'</b>';\r\n\t\t} else {\r\n\t\t\treturn '<a style=\" float:none;\" href=\"' . $this->php_self . '?page=1' . $this->append . '\">' . $tag . '</a> ';\r\n\t\t}\r\n\t}", "function FirstPage ( $isRefresh=false )\n{\n if ( $isRefresh || ($this->_CurrentPage <> 1) || $this->_need_refresh_() ) {\n $cSQL = $this->_SQL_FirstPage();\n $this->_ReversedRecord = false;\n $this->_new_page_(1,$cSQL);\n }\n}", "public function index(){\n\t\t$data['mainContent'] = 'landingPage/index';\n\t\t$this->landingPageRenderer('landingPage/index', $data);\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function genFirstLink()\n\t{\n\t\t$this->pagination['firstLink'] = \"\";\n\t\tif($this->page >= 10)\n\t\t{\n\t\t\t$page = 1;\t\t\t\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_first',$this->prepend.$page.$this->append, '&lt;&lt;'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\t\n\t\t\t$this->pagination['firstLink'] = $item;\t\t\t\t\n\t\t}\n\t}", "public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }", "public function run()\n {\n Html::addCssClass($this->wrapperOptions, 'page-header');\n\n echo Html::beginTag(\"div\", $this->wrapperOptions);\n\n if (!empty($this->buttons)) {\n echo ButtonGroup::widget(\n [\n 'options' => $this->buttonGroupOptions,\n 'buttons' => $this->buttons,\n ]\n );\n }\n\n echo Html::tag(\"h1\", $this->title, $this->titleOptions);\n\n echo Html::endTag(\"div\");\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "static public function getFirstPage() {\n\t\treturn self::$first_page;\n\t}", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function displayPageStart()\n {\n if( isset( $_SERVER[\"HTTP_HOST\"] ) && true === $this->display )\n {\n echo '<pre style=\"font-size: 11px; line-height: 7px;\">';\n }\n }", "public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}", "public function isFirstPage(): bool\n {\n return $this->current === 1;\n }", "public function displayPageStart() {\r\n\t\t\r\n\t\t$html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"';\r\n\t\t$html .= '\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\r\n\r\n\t\t$html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\r\n\t\t$html .= \"<head>\";\r\n\t\t$html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\r\n\t\t// get title from the entity?...\r\n\t\t$html .= \"<title>NGOData hosted data management system</title>\";\r\n\t\t\r\n\t\t$html .= '<link href=\"/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.self::getPath('css').'oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"../css/superfish.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= '<link rel=\"stylesheet\" href=\"/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.self::getPath('css').'menu_style.css\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= \"</head>\";\r\n\r\n\t\t$html .= \"<body>\";\r\n\t\t$html .= \"<div class=\\\"container\\\">\";\r\n\t\t$html .= \"<div class=header>\";\r\n\t\t$html .= \"<!-- Logo Goes here -->\";\r\n\t\t//$html .= \"Logo\";\r\n\t\t$html .= '<img src=\"'.self::getPath('images').'NGODataLogo-noBack.png\" alt=\"NGOData logo\" />';\r\n\t\t$html .= \"<!-- End Logo -->\";\r\n\t\t$html .= \"</div>\";\r\n\t\t\r\n\t\t\r\n\t\t// the menu items\r\n\t\t$html .= '<div class=\"menu\">';\r\n\t\t$html .= '<ul>';// class=\"sf-menu\">';\r\n\t\t$html .= \"<!-- Add menu items by adding <li> tags -->\";\r\n \r\n\t\t$html .= '<li><a href=\"'.self::getPath('home').'\">Home</a> ';\r\n\t\t$html .= \"<!-- Start Sub Menu Items -->\";\r\n\t\t//$html .= '<ul>';// class=\\\"subnav\\\">\";\r\n\t\t//$html .= '<li><a href=\"#\">Sub Nav</a></li>';\r\n\t\t//$html .= '<li><a href=\"#\\>Sub Nav</a></li>';\r\n\t\t//$html .= \"</ul>\";\r\n\t\t$html .= \"<!-- End Sub MEnu Item --> \";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// If authorised, can add other options here\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Services</a>\";\r\n\t\t$html .= '<ul>'; //class=\\\"subnav\\\">\";\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t//$html .= '<li><a href=\"'.$_SERVER['DOCUMENT_ROOT'].'/NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=reg\">Register</a></li>';\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"<li><a href=\\\"#\\\">About</a>\";\r\n\t\t$html .= \"<ul class=\\\"subnav\\\">\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\treturn $html;\r\n\t}", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "protected function page_default () {\r\n\t\t$skeleton = new xhtml ('skeleton.basic');\r\n\t\t$skeleton->load();\r\n\t\t$content=\"\";\r\n\t\t/**\r\n\t\t * Fetch the body content template\r\n\t\t */\r\n\t\tif(config::get('locale')!='') {\r\n\t\t\t$body = new xhtml ('body.vidtuts.'.config::get('locale'));\r\n\t\t} else {\r\n\t\t\t$body = new xhtml ('body.vidtuts');\r\n\t\t}\r\n\t\t$body->load();\r\n\r\n\t\t/**\r\n\t\t * Fetch the translated terms\r\n\t\t */\r\n\t\t$query = \"SELECT \";\r\n\t\t$query.= \"`html` \";\r\n\t\t$query.= \"FROM \";\r\n\t\t$query.= \"`page_terms_translations` \";\r\n\t\t$query.= \"WHERE \";\r\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\r\n\t\t$query.= \"LIMIT 1\";\r\n\r\n\t\t$result = database::query($query);\r\n\r\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\r\n\t\t\t$row = mysql_fetch_assoc($result);\r\n\r\n\t\t\t$date = date('d/m/Y');\r\n\r\n\t\t\t$content = str_replace('{{ date }}',$date,stripslashes($row['html']));\r\n\t\t}\r\n\r\n\t\t$body->assign('content',$content);\r\n \r\n\t\t/**\r\n\t\t * Fetch the page details\r\n\t\t */\r\n\t\t$page = new page('terms');\r\n\r\n\t\t/**\r\n\t\t * Build the output\r\n\t\t */\r\n\t\t$skeleton->assign (\r\n\t\t\tarray (\r\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Video Tutorials',\r\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\r\n\t\t\t\t'description'\t=> $page->description(),\r\n\t\t\t\t'body'\t\t\t=> $body\r\n\t\t\t)\r\n\t\t);\r\n \r\n\t\toutput::as_html($skeleton,true);\r\n \r\n\t}", "public function homePage()\n {\n return $this->render(\"homePage.html.twig\");\n }", "public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }", "public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }", "protected function page_default () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget');\n\n\n\t\t/**\n\t\t * Fetch the translated terms\n\t\t */\n\t\t$query = \"SELECT \";\n\t\t$query.= \"`html` \";\n\t\t$query.= \"FROM \";\n\t\t$query.= \"`page_widget_translations` \";\n\t\t$query.= \"WHERE \";\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\n\t\t$query.= \"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\n\t\t\t$row\t\t= mysql_fetch_assoc($result);\n\t\t\t$date\t\t= date('d/m/Y');\n\t\t\t$content\t= str_replace('{{ date }}',$date,stripslashes($row['html']));\n\t\t}\n\n\t\t$body->assign('content',$content);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t /*\n\t\t$page = new page('terms');\n\t\t*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "public function isFirstPage()\n {\n return ($this->currentPage == 1) ? true : false;\n }", "public function index() {\n\t\t$this->CurrentUser = BankAccessor::create()->getCurrentUser();\n\t\t\n\t\tif ($this->CurrentUser == null) {\n\t\t\t\n\t\t\t// If there isn't one, redirect to login\n\t\t\treturn $this->redirect(\"login/\");\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t// Otherwise, render with page\n\t\t\treturn $this->renderWith(\"Page\");\n\t\t}\n\t}", "private function printStartPage() {\n\t\treadfile ( 'html/start.html' );\n\t}", "public function render() {\n\t\t$this->title = \"Pagina niet gevonden\";\n\t\techo \"\\t\\t\\t\\t\\t<h2>404</h2>\\n\\t\\t\\t\\t\\t<p>De opgegeven pagina kon niet gevonden worden</p>\";\n\t}", "function index() {\r\n $this->page();\r\n }", "public function showPageHeader() {\n\n\t\techo $this->getPageHeader();\n\t}", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function default_page_render()\r\n {\r\n // instances page 404\r\n include $this->bootstrap->base_controller_dir . 'Wpf_page_not_found.php';\r\n $pageNotFound = new \\WPFP\\App\\Controllers\\Wpf_page_not_found();\r\n $pageNotFound->index();\r\n }", "public function page(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/page', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "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 }", "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 }", "public function index(){\t\n\t\t// var_dump('vchxhh');\n\n\t\t$page_model = new \\Models\\Page;\n\t\t$page_model->cmsPage();\n\t\t$this->data['page_title'] = \\Models\\Page::$pageName;\n\n\t\t$this->data['pagename'] = \\Models\\Page::$pageName;\n\t\t$this->data['subname'] = \\Models\\Page::$subName;\n\t\t$this->data['pagedetails'] = \\Models\\Page::$pagedetails;\n\n\t\tswitch (\\Models\\Page::$controller) {\n\t\t\tcase 'contact-us':\n\t\t\t\tUrl::redirect('page/contact');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\n\t\tView::renderTemplate('header',$this->data);\n\t\tView::render('page/page.index',$this->data);\n\t\tView::renderTemplate('footer',$this->data);\n\t}", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "function renderPage() {\n $parameters = explode(\"/\", $this->getCurrentPage());\n $folder = $parameters[1];\n if (!in_array($folder, $this->folders) && $folder !== \"api\") {\n $name = $this->getCurrentPage();\n require_once $this->getBlueprintPath();\n }\n }", "public function currentIsFirstPage() {\n return $this->getCurPage() == self::FIRST_PAGE;\n }", "public function singlePage() {\n if(isset($_GET['idNews'])){\n $idNews = $_GET['idNews'];\n $modelNews = new News(Database::instance());\n $modelComments = new Comments(Database::instance());\n\n $singleData = $modelNews->GetPrintSingleData($idNews);\n $allComments = $modelComments->GetAllComments($idNews);\n if($singleData == null) {\n $this->redirect(\"index.php?page=404\");\n }\n\n $this->data['singleData'] = $singleData;\n $this->data['allComments'] = $allComments;\n\n $this->loadView(\"single\", $this->data);\n $this->getLogInfo();\n\n }\n }", "protected function main() {\n $this->ControllerView->mainpage();\n }", "public function drawPage()\n\t\t{\n\t\t}", "abstract protected function RenderHead();", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "public function Index() {\n $this->Render();\n }", "public function createPage()\n {\n echo $this->output;\n }", "public function display() {\n\t\t$path = func_get_args();\n\n\t\t$count = count($path);\n\t\tif (!$count) {\n\t\t\t$this -> redirect('/');\n\t\t}\n\t\t$page = $subpage = $title_for_layout = null;\n\n\t\tif (!empty($path[0])) {\n\t\t\t$page = $path[0];\n\t\t}\n\t\tif (!empty($path[1])) {\n\t\t\t$subpage = $path[1];\n\t\t}\n\t\tif (!empty($path[$count - 1])) {\n\t\t\t$title_for_layout = Inflector::humanize($path[$count - 1]);\n\t\t}\n\t\t$this -> set(compact('page', 'subpage', 'title_for_layout'));\n\t\t$this -> render(implode('/', $path));\n\t}", "private function setFirstPage(){\n global $paged;\n\n if(empty($paged)) {\n\n\t\t$paged = 1;\n\t\t\n\t}\n\t\n\t\treturn $this;\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function render() {\r\n require_once '../template/front.php';\r\n }", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "function get_one_page(){\n\t\t$this->m_n_current_page_number = gf_get_value_n('v_current_page_number');\n\t}", "public function getPage()\n {\n return $this->firstPage;\n }", "function NewPage()\n {\n $ypos = $this->GetY();\n if ($ypos > 230){\n $this->AddPage();\n }\n }", "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 }", "function renderResponse() {\n // le header contient le début de la page jusqu'à la balise <body>\n // on redéclare title pour le header\n $header = new View('global.header', array('title' => $this->title));\n echo $header->getHtml();\n\n\n // le menu est composé de la balise <nav> et de ses items\n $menu = new View('global.menu');\n echo $menu->getHtml();\n\n /* début corps de page */\n\n // on affiche les messages éventuels\n $this->showMessages();\n\n // on affiche le contenu principal de la page\n\n echo $this->content;\n\n /* fin corps de page */\n\n // on affiche le footer et on ferme la page html\n $footer = new View('global.footer');\n echo $footer->getHtml();\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function display(){\n\t\t$this->smarty->assign(\"main_content\",$this->template) ;\n\t\t$this->setTemplate(\"common/page.tpl\") ;\n\t\tparent::display() ;\n\t}", "public function view() {\n\t\t// Find page by url slug\n\t\t$slug = $this->app->getSlug();\n\t\t$page = Page::findBySlug($slug);\n\t\t\n\t\t// If page exists render it, otherwise 404\n\t\tif ($page) {\n\t\t\t$this->title = $page->name;\n\t\t\t$this->pageData['page'] = $page;\n\t\t\t$this->render('view');\n\t\t} else {\n\t\t\t$this->noRoute();\n\t\t}\n\t}", "public function index()\n\t{\n\t\t$this->layout->render();\n\t}", "public function home()\n {\n $listItem = $this->Item->getAll();\n $this->set(['title' => 'Home', 'items' => $listItem]);\n $this->render('home');\n }", "public function onFirstPage(): bool\n {\n if ( ! isset($this->results)) {\n return false;\n }\n\n return $this->results->onFirstPage();\n }", "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 }", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "public function getFirstPage()\n {\n if ($this->getReverseOrder()) {\n return $this->getNumberOfTotalPages();\n }\n return 1;\n }", "public function index()\n {\n// $pageData = $this->_pageService->getPage(PageConstant::HOME_PAGE);\n return $this->renderView($this->getView('home.welcome'), [], 'Home');\n }", "protected function renderBodyBegin() {\n if (empty($this->param)) {\n $books = Books::find()->asArray()->all();\n } else {\n if (is_object($this->param)) {\n \n $bookauthors = AuthorsBooks::find()->where(['author_id' => $this->param->id])->asArray()->all();\n } else {\n $bookauthors = AuthorsBooks::find()->where(['author_id' => $this->param])->asArray()->all();\n }\n $books = [];\n foreach ($bookauthors as $bookauthor) {\n if(!empty(Books::find()->where(['id' => $bookauthor['book_id']])->asArray()->all())){\n $books[] = Books::find()->where(['id' => $bookauthor['book_id']])->asArray()->one();\n }\n \n }\n }\n\n return $this->render('books', [\n 'books' => $books,\n ]);\n }", "public function render_page() {\n\n\t\t// Early bail if we're not on the right page.\n\t\tif ( Param::get( 'page' ) !== $this->slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ob_get_length() ) {\n\t\t\tob_end_clean();\n\t\t}\n\n\t\t$assets = new Assets();\n\t\t$assets->register();\n\n\t\twp_styles()->done = [];\n\t\twp_scripts()->done = [];\n\n\t\t// Enqueue styles.\n\t\t\\CMB2_Hookup::enqueue_cmb_css();\n\t\t\\CMB2_Hookup::enqueue_cmb_js();\n\n\t\t// Wizard.\n\t\twp_enqueue_style( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/css/setup-wizard.css', [ 'wp-admin', 'buttons', 'cmb2-styles', 'rank-math-common', 'rank-math-cmb2' ], rank_math()->version );\n\n\t\t$logo_url = '<a href=\"' . KB::get( 'logo' ) . '\" target=\"_blank\"><img src=\"' . esc_url( rank_math()->plugin_url() . 'assets/admin/img/logo.svg' ) . '\"></a>';\n\n\t\tob_start();\n\n\t\t/**\n\t\t * Start the actual page content.\n\t\t */\n\t\tinclude_once $this->get_view( 'header' );\n\t\tinclude_once $this->get_view( 'content' );\n\t\tinclude_once $this->get_view( 'footer' );\n\t\texit;\n\t}", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "public function StartReport(){\n $this->AliasNbPages();\n $this->AddPage();\n $this->SetAutoPageBreak(true, 11);\n $this->SetTextColor(0);\n }", "abstract protected function render_page_content(): void;", "public function getStartPage();", "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "public function _render_page($data = [])\n {\n \t$this->load->view('layouts/main', $data);\n }", "public function renderContentBegin()\n {\n echo CHtml::openTag('div', $this->htmlContentOptions);\n if (!empty($this->content)) {\n echo $this->content;\n }\n }", "public function renderContentBegin()\n {\n echo CHtml::openTag('div', $this->htmlContentOptions);\n if (!empty($this->content))\n echo $this->content;\n }", "public function render(){\r\n //Current controller is loaded from within the action method.\r\n define(\"RENDER_BEGIN\", microtime());\r\n \r\n\t\t\t$this->controller->render();\r\n \r\n\t\t\t\r\n\t\t}", "public function onFirstPage()\n {\n return is_null($this->cursor) || ($this->cursor->pointsToPreviousItems() && ! $this->hasMore);\n }", "function run() {\n\t\t$view = new View();\n\t\t\n\t\t$students = new Student();\n\t\tif ($view->students_tbl = $students->get_students_as_tbl_arr() ) {\n\t\t\t$view->error = $students->get_error();\n\t\t}\n\n\t\t$view->student_desc = $students->get_student_desc();\n\t\t$view->render('main_page.php');\n\t}", "public function initPage() {}", "public function initPage() {}", "public function getIsFirstPage(): bool\n {\n return $this->pageIndex === 0;\n }", "public function action() {\n // $this->view->page();\n }", "public function render()\n {\n header(\"Content-Type: application/xhtml+xml;charset=iso-8859-1\");\n\n $renderedPage = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>' . PHP_EOL;\n\n /*--------------------------------------------------------------------\n\t Dump header definition, namespace etc\n ------------------------------------------------------------------*/\n\n // render all of the page content\n $renderedPage .= parent::render();// . PHP_EOL;\n \n\n// error_log(\"XML: \" . $renderedPage);\n\n if ($this->isDirectDisplay() == true)\n {\t \n echo $renderedPage;\n }\n return $renderedPage;\n }" ]
[ "0.7268778", "0.7226312", "0.69739914", "0.69664896", "0.69664896", "0.6820278", "0.6717284", "0.6671584", "0.6606608", "0.6518828", "0.650311", "0.64882547", "0.6438076", "0.6400799", "0.6392741", "0.63681453", "0.6338076", "0.6333475", "0.6276505", "0.6247146", "0.6246716", "0.6234603", "0.6230674", "0.62242335", "0.6207516", "0.6163049", "0.6151414", "0.6149334", "0.612865", "0.6123253", "0.6122296", "0.61022073", "0.6083206", "0.6082757", "0.6069907", "0.6064221", "0.60563946", "0.6039818", "0.60390073", "0.60387725", "0.6037263", "0.60268235", "0.6003389", "0.5989392", "0.59799486", "0.5969513", "0.5967577", "0.59594566", "0.59544873", "0.59401894", "0.5936206", "0.59336627", "0.59326214", "0.59262866", "0.59159255", "0.59048545", "0.5904757", "0.59023625", "0.59023154", "0.5900271", "0.5895303", "0.58924186", "0.5888941", "0.58880067", "0.5881046", "0.5877296", "0.58688205", "0.5868612", "0.5865631", "0.5863182", "0.5848382", "0.5844694", "0.584161", "0.58411133", "0.5830999", "0.5817552", "0.58082575", "0.5804336", "0.5801039", "0.57936543", "0.5791173", "0.578989", "0.57803226", "0.57741094", "0.57670724", "0.576322", "0.5760061", "0.57600176", "0.57589823", "0.5757055", "0.57568824", "0.57532626", "0.5751674", "0.5745956", "0.5741167", "0.5738635", "0.573549", "0.573549", "0.57351655", "0.5733656", "0.5730334" ]
0.0
-1
Renders the last page.
public function last(int $page): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function last()\n {\n $last_posts = $this->posts_manager->listLasts(10);\n $this->render('last-posts', ['head'=>['title'=>'Les derniers articles', 'meta_description'=>''], 'page'=>'derniers-articles', 'last_posts'=>$last_posts]);\n }", "function LastPage ( )\n{\n if ( $this->_need_refresh_() || $this->CurrentPage() < $this->PageCount() ) {\n if ( $this->PageCount() > 1 ) {\n $cSQL = $this->_SQL_LastPage();\n $this->_ReversedRecord = true;\n $this->_new_page_($this->PageCount(),$cSQL);\n } else {\n $this->FirstPage();\n }\n }\n}", "private function lastPage() {\n $this->currentPageNumber--;\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->lastPage[\"vOffset\"];\n $this->hOffset = $this->lastPage[\"hOffset\"];\n }", "function lastPage()\n\t\t{\n\t\t\t$this->currentPage = $this->numberOfPages();\n\t\t}", "private function print_last_page_link() {\n\n\t\t$this->print_anchor(\n\t\t\t$this->get_paged_url( $this->total_pages ),\n\t\t\t__( 'Go to the last page', 'multilingual-press' ),\n\t\t\t'last-page' . $this->disable_last,\n\t\t\t'&raquo;'\n\t\t);\n\t}", "public function genLastLink()\n\t{\n\t\t$this->pagination['lastLink'] = \"\";\n\t\tif($this->page <= ($this->numofpages - 10))\n\t\t{\n\t\t\t$page = $this->numofpages;\n\t\t\t$item = $this->itemTpl;\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray('page page_last',$this->prepend.$page.$this->append, '&gt;&gt;'),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\t\n\t\t\t$this->pagination['lastLink'] = $item;\t\n\t\t}\n\t}", "public function getLastPage();", "function renderLast($tag = 'Last') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page == $this->max_pages) {\r\n\t\t\treturn '<b style=\" float:none;\" class=\"page_link\">'.$tag.'</b>';\r\n\t\t} else {\r\n\t\t\treturn ' <a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . $this->max_pages . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t}\r\n\t}", "public function getLastPage() {}", "protected function lastPage()\n {\n return $this->paginator->lastPage();\n }", "protected function lastPage()\n {\n return $this->paginator->lastPage();\n }", "protected function lastPage()\n {\n return $this->paginator->lastPage();\n }", "protected function _renderPaginationEnd()\n {\n return '</ul></div>';\n }", "public function lastPage()\n {\n return $this->lastPage;\n }", "public function lastPage()\n {\n return $this->getCountPage();\n }", "public function lastPage($resetmargins=false) {\n\t\t$this->setPage($this->getNumPages(), $resetmargins);\n $this->isLastPage = true;\n\t}", "public function getLastPage() {\n\t\treturn $this->lastPage;\n\t}", "public function getLastPage()\n {\n return $this->lastPage;\n }", "public function isLastPage(): bool\n {\n return $this->current === $this->number_of_pages;\n }", "public function lastPageUrl(): string\n {\n if ($this->hasOnlyOnePage()) {\n return $this->firstPageUrl();\n }\n\n return $this->url($this->number_of_pages);\n }", "private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">»</a></li>';\n }\n }", "public function render()\n {\n return view('components.last-post');\n }", "public function lastAction($count)\n {\n $news = $this->getDoctrine()->getEntityManager()\n ->getRepository('R3cNewsBundle:News')->getLastNews($count);\n\n return $this->render('R3cNewsBundle:News:last.html.twig', array('news' => $news));\n }", "static public function getLastPage() {\n\t\treturn self::$last_page;\n\t}", "public function getLastPage()\n {\n return $this->request->param('paging.' . $this->pagingType . '.pageCount');\n }", "private function nextPage() {\n $this->lastPage = array(\n \"vOffset\" => $this->vOffset,\n \"hOffset\" => $this->hOffset,\n );\n $footerToAppend = false;\n $this->currentPageNumber++;\n if (isset($this->pages[$this->currentPageNumber])) {\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = 0;\n } else {\n $this->pages[$this->currentPageNumber] = $this->haruDoc->addPage();\n $this->currentPage = $this->pages[$this->currentPageNumber];\n $this->currentPage->setTextRenderingMode(\\HaruPage::FILL);\n $this->vOffset = $this->currentFontSize;\n $this->hOffset = ($this->hOffset ? $this->hOffset : 0);\n $footerToAppend = true;\n }\n if ($this->currentFont && $this->currentFontSize && $this->currentFontColor) {\n $this->currentPage->setFontAndSize($this->currentFont, $this->currentFontSize);\n $this->setColor($this->currentFontColor[0], $this->currentFontColor[1], $this->currentFontColor[2]);\n }\n if ($footerToAppend && $this->currentPageNumber > 1) {\n $this->currentPage->beginText();\n $this->setFont(self::FONT_NORMAL, 12, array(0,0,0));\n $this->currentPage->textOut($this->PAGE_WIDTH - self::HMARGIN - $this->currentPage->getTextWidth($this->currentPageNumber),\n self::VMARGIN - 30, $this->currentPageNumber);\n $this->revertFont();\n $this->setFont(self::FONT_BOLD, 12, array(0,0,0));\n $this->currentPage->textOut(self::HMARGIN,\n self::VMARGIN - 30, $this->currentBookName);\n $this->revertFont();\n $this->currentPage->endText();\n\n }\n\n }", "public function getLastPage() {\n return (int)ceil($this->_itemsCount / $this->_itemsPerPage);\n }", "private function calcLastPageCount()\n\t{\n\t\t$this->lastPageCount=$this->totalRecords%$this->recordsPerPage;\n\t}", "public function endPage() {}", "public function LastLink()\n {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n ($this->TotalPages() - 1) * $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }", "public function currentIsLastPage() {\n return $this->getCurPage() == $this->getTotalPage();\n }", "public function getLast()\n {\n return $this->getNbPages();\n }", "public function getLastPage()\n {\n if ($this->getReverseOrder()) {\n return 1;\n }\n return max(1, $this->getNumberOfTotalPages());\n }", "public function lastMessage()\n\t{\n\t\t$data = $this->getDoctrine()->getRepository(Posting::class)->findBy(array(), ['id' => 'DESC'], 3);\n\t\t//$data = $posting->addOrderBy('id', 'desc')->take(3)->get();\n\t\treturn $this->render('page/main.html.twig', ['data' => $data]);\n\t}", "static function page_last($startpage, $config)\n {\n return static::page_link($startpage, $config, \"last\");\n }", "public function NextPage()\n {\n if ($this->m_CurrentPage >= $this->m_TotalPages)\n $this->m_CurrentPage = $this->m_TotalPages;\n else\n $this->m_CurrentPage++;\n return $this->ReRender();\n }", "public function getLastPage(): int;", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "public function render()\n {\n // The hard-coded thirteen represents the minimum number of pages we need to\n // be able to create a sliding page window. If we have less than that, we\n // will just render a simple range of page links insteadof the sliding.\n if ($this->lastPage < 13) {\n $content = $this->getPageRange(1, $this->lastPage);\n } else {\n $content = $this->getPageSlider();\n }\n\n if (\\Config::get('pagination::show_first_last') === true) {\n return $this->getFirst().$this->getPrevious().$content.$this->getNext().$this->getLast();\n }\n\n return $this->getPrevious().$content.$this->getNext();\n }", "static function getLastPage()\r\n {\r\n return $_SESSION[\"last_page\"];\r\n }", "public function isLastPage()\n {\n return ($this->currentPage == $this->lastPage) ? true : false;\n }", "public function GetLastIndexInPage()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return ($this->GetFirstIndexInPage() + $this->GetNumberOfResultsInThisPage()) - 1;\n }", "function render_page_container_end()\n\t\t{\n\t\t\t$output = '</div>'; \n\t\t\treturn $output;\n\t\t}", "public function getIsLastPage(): bool\n {\n $pageCount = $this->getPageCount();\n\n if ($pageCount === 0 && $this->pageIndex === 0) {\n return true;\n }\n\n return $this->pageIndex === ($pageCount - 1);\n }", "protected function get_lastpage() {\n $pages = $this->load_all_pages();\n if (count($pages) > 0) {\n foreach ($pages as $page) {\n if ((int)$page->nextpageid === 0) {\n return $page;\n }\n }\n }\n return false;\n }", "public function pageEnd() {\r\n\t\t$intReturn = ($this->getCurrentPage() * $this->__pageItems);\r\n\t\tif ($intReturn > count($this->collection)) $intReturn = count($this->collection);\r\n\r\n\t\treturn $intReturn;\r\n\t}", "public function set_last_page() {\n\t\t\t$this->last_page = $_SERVER['PHP_SELF'];\n\t\t\t\n\t\t\t// If the GET array has \"add\" or \"rem\" values, we need to remove\n\t\t\t// those.\n\t\t\tif(isset($_GET)) { \n\t\t\t\tif (array_key_exists('add', $_GET)) \n\t\t\t\t\tunset($_GET['add']);\n\t\t\t\tif (array_key_exists('rem', $_GET))\n\t\t\t\t\tunset($_GET['rem']);\n\t\t\t\t\t\n\t\t\t\t// Set up an iterator and then loop through GET to get key-value\n\t\t\t\t// pairs, then append them to our last page.\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($_GET as $key=>$val) {\n\t\t\t\t\t$count = count($_GET);\n\t\t\t\t\tif ($count > 1) {\n\t\t\t\t\t\tif ($i == 0)\n\t\t\t\t\t\t\t$this->last_page .= '?' . $key . '=' . $val . '&';\n\t\t\t\t\t\telse if ($i == $count-1)\n\t\t\t\t\t\t\t$this->last_page .= $key . '=' . $val;\n\t\t\t\t\t\telse\t\n\t\t\t\t\t\t\t$this->last_page .= $key . '=' . $val . '&';\t\t\n\t\t\t\t\t} else\n\t\t\t\t\t\t$this->last_page .= '?' . $key . '=' . $val;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t$this->last_page = substr($this->last_page, 1);\n\t\t$_SESSION['last_page'] = $this->last_page;\n\t\treturn $this->last_page;\n\t\t}", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "function _renderEnd()\n {\n echo '</div>' . $this->_varRenderer->renderEnd();\n }", "function newPage()\n {\n $this->lastPageNumber ++;\n if ($this->lastPageNumber != 1)\n $this->documentBuffer .= \"<br clear=\\\"all\\\" style=\\\"page-break-before: always;\\\">\";\n return $this->lastPageNumber;\n }", "final public function fetchEnd()\n {\n //element do widoku\n $this->view->_element = $this;\n //render szablonu\n return $this->view->renderTemplate(static::TEMPLATE_END);\n }", "function renderEnd(&$render)\n {\n return '';\n }", "public function printLastResponse() : Page\n {\n $content = $this->client->getResponse()->getContent();\n\n echo \"\\n\\033[36m| \" . strtr($content, [\"\\n\" => \"\\n| \"]) . \"\\033[0m\\n\\n\";\n\n return $this;\n }", "public function onLastPage(): bool\n {\n if ( ! isset($this->results)) {\n return false;\n }\n\n return $this->results->onLastPage();\n }", "public function setLastPage($lastPage)\n {\n $this->lastPage = $lastPage;\n }", "private function autoRedirectToLastPage()\n {\n if($this->urlQueryStringName === NULL)\n {\n self::$registry->error->reportError('The Url Query String for Pagination is not defined yet, You can do it by using initURLQueryStringName() method.', __LINE__, __METHOD__, true);\n return 0;\n }\n \n if($this->currentPageNumber() > $this->totalPages)\n {\n $pageQueryStringNamePosition = array_search($this->urlQueryStringName, $this->URLQueryString);\n $this->URLQueryString[++$pageQueryStringNamePosition] = $this->totalPages;\n $finalQueryString = implode('/', $this->URLQueryString);\n self::$registry->request->go(null, null, $finalQueryString);\n }\n return;\n }", "public function render()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$pagination = $this->template['wrapper_start'];\n\t\t$pagination .= $this->prev_link(Lang::get('pagination.previous'));\n\t\t$pagination .= $this->page_links();\n\t\t$pagination .= $this->next_link(Lang::get('pagination.next'));\n\t\t$pagination .= $this->template['wrapper_end'];\n\n\t\treturn $pagination;\n\t}", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "public function render()\n {\n $latestBlog = Blog::whereState(true)->whereDeleted(false)->orderByDesc('date')->first();\n\n return view('blog::components.scroller-last-blog', [\n 'latestScroller' => $latestBlog\n ]);\n }", "public function renderContentEnd()\n {\n echo CHtml::closeTag('div');\n }", "public function renderContentEnd()\n {\n echo CHtml::closeTag('div');\n }", "abstract function render_page();", "public function render() {\r\n\t\t// be able to create a sliding page window. If we have less than that, we\r\n\t\t// will just render a simple range of page links insteadof the sliding.\r\n\t\t/*------------------------------------------------\r\n\t\t| >>beststrelok<<\r\n\t\t------------------------------------------------*/\r\n\t\t// https://gist.github.com/beststrelok/17a6328d75da5492860d/revisions\r\n\t\t// http://laravel.com/docs/4.2/pagination#custom-presenters\r\n\t\t/*----------------------------------------------*/\r\n\t\tif ($this->lastPage < 7)\r\n\t\t{\r\n\t\t\t$content = $this->getPageRange(1, $this->lastPage);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$content = $this->getPageSlider();\r\n\t\t}\r\n\r\n\t\treturn $content;\r\n\t}", "function lastcomments_page() {\r\n\r\n\tglobal $SYSTEM_FLAGS, $template, $CurrentHandler;\r\n\t// Action if ppage is enabled\r\n\tif (pluginGetVariable('lastcomments', 'ppage') && ($CurrentHandler['handlerParams']['value']['pluginName'] == 'core')) {\r\n\t\t$SYSTEM_FLAGS['info']['title']['group'] = \"lastcomments\";\r\n\t\t$template['vars']['mainblock'] = lastcomments(1);\r\n\t} else {\r\n\t\terror404();\r\n\t}\r\n}", "public function getLastPageUrl();", "protected function renderBodyEnd()\n {\n echo $this->body;\n echo Html::endTag('div') . \"\\n\";\n }", "function page_end() {\n\t\t$this->tag= \"</body></html>\";\n\t\treturn $this -> tag;\n\t}", "public function get_lastpageid() {\n global $DB;\n if ($this->lastpageid == null) {\n if (!$this->loadedallpages) {\n $lastpageid = $DB->get_field('languagelesson_pages', 'id', array('lessonid'=>$this->properties->id, 'nextpageid'=>0));\n if (!$lastpageid) {\n print_error('cannotfindlastpage', 'languagelesson');\n }\n $this->lastpageid = $lastpageid;\n } else {\n $lastpageid = $this->get_lastpage();\n $this->lastpageid = $lastpageid->id;\n }\n }\n\n return $this->lastpageid;\n }", "public function LastItem()\n {\n $pageLength = $this->getPageLength();\n if (!$pageLength) {\n return $this->getTotalItems();\n } elseif ($start = $this->getPageStart()) {\n return min($start + $pageLength, $this->getTotalItems());\n } else {\n return min($pageLength, $this->getTotalItems());\n }\n }", "private function render_last_gen_report(MJKGenToolsPage $page): void {\r\n \r\n $last_ts = $page->last_gen();\r\n $last_success = $page->last_gen_success();\r\n $last_text = MJKGTSchedulerAJAX::format_last($last_ts, $last_success);\r\n printf('<b>Last generated</b> <span id=\"last_gen_%s\">%s</span><br>',\r\n $page->id(), $last_text);\r\n }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function render()\n {\n if ($this->hasPages()) {\n return sprintf(\n '<ul class=\"pagination\">%s %s</ul>',\n $this->getPreviousButton(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "public function doLastAction()\n {\n $repository = $this->getRepository();\n\n if (method_exists($repository, 'getHighestPropertyByOrder')) {\n $lastPosition = $repository->getHighestPropertyByOrder('orderNum', 'DESC');\n\n return $this->objectTransform(function ($object) use ($lastPosition) {\n if ($lastPosition !== $object->getOrderNum()) {\n $object->setOrderNum($lastPosition + 1);\n }\n });\n }\n\n return new RedirectResponse($this->admin->generateUrl($this->getListOrTreeUrlName()));\n }", "function renderNext($tag = '&gt;&gt;') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\tif ($this->page < $this->max_pages) {\r\n\t\t\treturn '<a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . ($this->page + 1) . '' . $this->append . '\">' . $tag . '</a>';\r\n\t\t} else {\r\n\t\t\treturn $tag;\r\n\t\t}\r\n\t}", "protected function renderBackButton() {}", "public function gridSetPagesUrlLast($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_LAST', $url);\n $this->setVar('LAST_PAGE_TAG', __('Last page'));\n }\n }", "public function testLastPageOnEdge() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|2||prev|1||next|2|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t2,\n\t\t\t\t50,\n\t\t\t\t100\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}", "public function getNextPage();", "public function render()\n {\n if ($this->hasPages())\n {\n return sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "function endPage () {\n\tglobal $pageEnd;\n\techo $pageEnd;\n}", "private function back(){\n \t$params = array(\n \t\t\t'page'=>intval(I('p')) ? intval(I('p')) : 1,\n \t\t\t'pagesize'=>$this->pagesize,\n \t\t\t'type'=>Status::AfterSaleBack,\n \t);\n \tif (session('distributor_id')) {\n \t\t$params['distributor_id'] = session('distributor_id');\n \t}\n \t$result = $this->afterSalesService()->getPagerList($params);\n \t$this->assign('back_list', $result['list']);\n }", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">&gt;</a></li>';\n }\n }", "public function render_page() {\n\t\t$this->render_template();\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function render() {\n\t\t$this->render_page_content();\n\t}", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "public function process( $last )\n {\n $this->result = $this->template->process( $this->templateLocation );\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "public function lastItem();", "protected function _renderBodyEnd()\n\t{\n\t\treturn ''\n\t\t\t. \"\\n\" . Html::endTag( 'div' );\n\t}", "public function index(){\r\r\n $news =$this->New->last();\r\r\n $this->render('news.index', compact('news'));\r\r\n }", "public function render()\n {\n if ($this->hasPages()) {\n return new HtmlString(sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n ));\n }\n\n return '';\n }", "function getLastActivePage($active_id)\n\t{\n\t\tglobal $ilDB;\n\t\t$result = $ilDB->queryF(\"SELECT lastpage FROM svy_finished WHERE finished_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($active_id)\n\t\t);\n\t\tif ($result->numRows() == 0)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row = $ilDB->fetchAssoc($result);\n\t\t\treturn ($row[\"lastpage\"]) ? $row[\"lastpage\"] : '';\n\t\t}\n\t}", "protected function generatePageFooter() \n {\n\t\t\n\t\techo \"</body>\\n\";\n\t\techo \"</html>\\n\";\n // to do: output common end of HTML code\n }", "public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function getLast($text = null)\n {\n $text = \\Config::get('pagination::slider.last_link_text', $text);\n // If the current page is greater than or equal to the last page, it means we\n // can't go any further into the pages, as we're already on this last page\n // that is available, so we will make it the \"next\" link style disabled.\n if ($this->currentPage >= $this->lastPage) {\n return '<li class=\"disabled\"><span>'.$text.'</span></li>';\n } else {\n $url = $this->paginator->getUrl($this->lastPage);\n return '<li><a href=\"'.$url.'\">'.$text.'</a></li>';\n }\n }" ]
[ "0.75584716", "0.75425124", "0.7542217", "0.7482701", "0.7415272", "0.70612085", "0.70417297", "0.70242786", "0.69810057", "0.6734272", "0.6734272", "0.6734272", "0.66631603", "0.6594954", "0.65419143", "0.6526879", "0.6512925", "0.6415272", "0.6405151", "0.63311845", "0.6330588", "0.63289547", "0.63130873", "0.62980676", "0.62873286", "0.62841374", "0.6277893", "0.6270598", "0.62255514", "0.621465", "0.618115", "0.61732024", "0.6172133", "0.61600554", "0.6155646", "0.6130091", "0.61294836", "0.61201346", "0.6105296", "0.609621", "0.60896593", "0.6066089", "0.60472876", "0.6018402", "0.60153496", "0.5995511", "0.5951736", "0.5942623", "0.5939242", "0.5933168", "0.5927152", "0.5900847", "0.5866406", "0.58341664", "0.58315855", "0.5820001", "0.5780803", "0.5748385", "0.5727851", "0.56970817", "0.56970817", "0.5691622", "0.5688434", "0.5684971", "0.5675495", "0.5646979", "0.56353134", "0.5614949", "0.5609506", "0.56000465", "0.55990887", "0.55816066", "0.5569645", "0.55682814", "0.55516315", "0.5540449", "0.55304927", "0.55022365", "0.5492535", "0.54915494", "0.54834163", "0.5479441", "0.5458177", "0.5452929", "0.5446422", "0.5446422", "0.54401106", "0.5437874", "0.542788", "0.5420209", "0.54161644", "0.5403991", "0.5403693", "0.5393766", "0.5382267", "0.5368465", "0.53586376", "0.5358171", "0.53518873", "0.5345344" ]
0.6499844
17
Renders the current page.
public function current(int $page): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render() {\n\t\t$this->render_page_content();\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function render_page() {\n\t\t$this->render_template();\n\t}", "abstract function render_page();", "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }", "public function render() {\n\t\treturn $this->template( 'page' );\n\t}", "public function render(){\r\n //Current controller is loaded from within the action method.\r\n define(\"RENDER_BEGIN\", microtime());\r\n \r\n\t\t\t$this->controller->render();\r\n \r\n\t\t\t\r\n\t\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "private function print_current_page_display() {\n\n\t\t$total = sprintf(\n\t\t\t'<span class=\"total-pages\">%s</span>',\n\t\t\tnumber_format_i18n( $this->total_pages )\n\t\t);\n\n\t\t$paging = sprintf(\n\t\t\t_x( '%1$s of %2$s', 'paging', 'multilingual-press' ),\n\t\t\tnumber_format_i18n( $this->current_page ),\n\t\t\t$total\n\t\t);\n\n\t\t$tags = array(\n\t\t\t'span' => array(\n\t\t\t\t'class' => true,\n\t\t\t),\n\t\t);\n\t\t?>\n\t\t<span class=\"paging-input\"><?php echo wp_kses( $paging, $tags ); ?></span>\n\t\t<?php\n\t}", "private function renderContent()\n {\n $this->tabs[$this->currentlyActiveTab()]->view()->render();\n }", "abstract protected function render_page_content(): void;", "public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }", "public function index() {\n\t\t$this->CurrentUser = BankAccessor::create()->getCurrentUser();\n\t\t\n\t\tif ($this->CurrentUser == null) {\n\t\t\t\n\t\t\t// If there isn't one, redirect to login\n\t\t\treturn $this->redirect(\"login/\");\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t// Otherwise, render with page\n\t\t\treturn $this->renderWith(\"Page\");\n\t\t}\n\t}", "public function render()\r\n {\r\n $this->data['menu'] = build_menu(\r\n $this->choices, $this->uri->segment(1));\r\n \r\n $this->data['header'] = $this->parser->parse(\r\n '_header', $this->data, true);\r\n $this->data['content'] = $this->parser->parse(\r\n $this->data['page_body'], $this->data, true);\r\n $this->data['footer'] = $this->parser->parse(\r\n '_footer', $this->data, true);\r\n \r\n $this->data['data'] = &$this->data;\r\n \r\n $this->parser->parse('_template', $this->data);\r\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "public function display()\n {\n //If the page was cached\n if ($this->isCached)\n {\n //Nothing to do, we already showed the page\n return;\n }\n return $this->route->getView()->output();\n }", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function render()\r\n\t{\r\n\t\t$this->site->page = $this;\r\n\t\t// if noone is subscribed, we want to output our own 404\r\n\t\tif(!$this->site->event->subscribers('404'))\r\n\t\t{\r\n\t\t\t$this->site->event->subscribe('404', array($this, '_404'));\r\n\t\t}\r\n\t\tif( $this->controller === null )\r\n\t\t{\r\n\t\t\t$this->site->event->publish('404');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(ob_get_length() > 0)\r\n\t\t\t{\r\n\t\t\t\tob_end_clean();\r\n\t\t\t}\r\n\t\t\theader(\"Connection: close\");\r\n\t\t\theader(\"X-Powered-By: \"); // Remove the header, don't need to advertise how out of date we are...\r\n\t\t\t//TODO: Figure out how to remove \"Server\" header also.. doesn't appear you can do this from inside php?\r\n\t\t\tob_start();\r\n\t\t\t$this->site->event->publish('Page::onRender');\r\n\t\t\tcall_user_func_array(array($this->controller, 'setup'), $this->controllerParams);\r\n\t\t\tcall_user_func_array(array($this->controller, $this->controllerMethod), $this->controllerParams);\r\n // are we doing a json response? if not, we assume html...\r\n if($this->site->response->json === false\r\n && $this->site->webCatalog->isRedirect === false) {\r\n $viewFile = $this->controller->viewFile;\r\n if ($viewFile === null) // if not defined, auto grab em... @todo - this fails miserably when you're using dynamic paths. For now just set it in your controller. But it should be fixed.\r\n {\r\n if ($this->requestedPath === '/' ||\r\n $this->requestedPath === ''\r\n ) {\r\n $path = 'index';\r\n } else {\r\n if (strpos($this->requestedPath, '.')) {\r\n $path = substr($this->requestedPath, 0, strpos($this->requestedPath, '.'));\r\n } else {\r\n $path = $this->requestedPath;\r\n }\r\n $path = trim($path, '/');\r\n }\r\n if ($ext = $this->site->config('template', 'extension')) {\r\n $viewFile = $path . '.' . $ext;\r\n } else {\r\n $viewFile = $path . '.tpl';\r\n }\r\n }\r\n if ($this->controller->autoRender === true) {\r\n // do we have a view file?\r\n if (is_string($this->site->config('site', 'viewPath'))) {\r\n $viewPaths = [$this->site->config('site', 'viewPath')];\r\n } else {\r\n $viewPaths = $this->site->config('site', 'viewPath');\r\n }\r\n $_404 = true; // check if a valid template\r\n foreach ($viewPaths as $i => $p) {\r\n $viewPaths[$i] = $this->site->appFolder . $p;\r\n if (is_file($viewPaths[$i] . DIRECTORY_SEPARATOR . $viewFile) === true) {\r\n $_404 = false;\r\n }\r\n }\r\n if ($_404) {\r\n $this->site->event->publish('404');\r\n } else {\r\n switch ($this->site->config('template', 'engine')) {\r\n case 'smarty':\r\n // Summon Smarty Template Engine\r\n $this->template = new Smarty();\r\n $this->template->muteExpectedErrors(); // something is conflicting with our error class. See smarty docs for this.\r\n // Absolute path to the root template dir\r\n if ($this->site->config('site', 'viewPath')) {\r\n $this->template->setTemplateDir(realpath($this->site->appFolder . $this->site->config('site', 'viewPath')));\r\n } else {\r\n $this->site->error->toss('[site] viewPath must be defined in your config!');\r\n }\r\n if ($this->site->config('smarty', 'configDir')) {\r\n $this->template->setConfigDir(realpath($this->site->appFolder . $this->site->config('smarty', 'configDir')));\r\n }\r\n // These directories need FULL WRITE ACCESS\r\n // and could be stored outside of the web root for security purposes:\r\n if ($this->site->config('smarty', 'compileDir')) {\r\n $this->template->setCompileDir(realpath($this->site->appFolder . $this->site->config('smarty', 'compileDir')));\r\n }\r\n if ($this->site->config('smarty', 'cacheDir')) {\r\n $this->template->setCacheDir(realpath($this->site->appFolder . $this->site->config('smarty', 'cacheDir')));\r\n }\r\n $this->site->event->publish('Page::SmartyPlugins');\r\n // Assign template variables from the controller\r\n if (isset($this->controller->view)) {\r\n foreach ($this->controller->view as $key => $value) {\r\n $this->template->assign($key, $value);\r\n }\r\n }\r\n // Finally, display the template...\r\n try {\r\n $this->template->display($viewFile);\r\n } catch (Exception $e) {\r\n $this->site->error->toss($e->getMessage(), E_USER_WARNING);\r\n }\r\n break;\r\n case 'twig':\r\n\r\n try {\r\n\r\n $env = $this->getTwigEnvironment();\r\n $this->site->event->publish(\"Twig::Twig_Environment\", $env);\r\n\r\n echo $this->renderTemplate($viewFile, $this->controller->view);\r\n } catch (Exception $e) {\r\n $this->site->error->toss($e->getMessage(), E_USER_WARNING);\r\n $this->site->event->publish('404');\r\n }\r\n break;\r\n default:\r\n $fname = $this->site->appFolder . $this->site->config('site', 'viewPath') . '/' . $viewFile;\r\n if ($file = realpath($fname)) {\r\n require($file);\r\n } else {\r\n $this->site->error->toss('Unable to auto render with view file: ' . $fname);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\t\t\theader(\"Content-Length: \".ob_get_length());\r\n\t\t\tob_end_flush();\r\n\t\t\tflush();\r\n\t\t\tcall_user_func_array(array($this->controller, 'shutdown'), $this->controllerParams);\r\n\t\t\t$this->site->event->publish('Page::afterRender');\r\n\t\t}\r\n\t}", "public function index() {\n\t\t\t$this->render();\n\t\t}", "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 }", "public function render()\n {\n include_once __DIR__ . '/templates/back.php';\n }", "public function render_page() {\n\n\t\t// Early bail if we're not on the right page.\n\t\tif ( Param::get( 'page' ) !== $this->slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ob_get_length() ) {\n\t\t\tob_end_clean();\n\t\t}\n\n\t\t$assets = new Assets();\n\t\t$assets->register();\n\n\t\twp_styles()->done = [];\n\t\twp_scripts()->done = [];\n\n\t\t// Enqueue styles.\n\t\t\\CMB2_Hookup::enqueue_cmb_css();\n\t\t\\CMB2_Hookup::enqueue_cmb_js();\n\n\t\t// Wizard.\n\t\twp_enqueue_style( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/css/setup-wizard.css', [ 'wp-admin', 'buttons', 'cmb2-styles', 'rank-math-common', 'rank-math-cmb2' ], rank_math()->version );\n\n\t\t$logo_url = '<a href=\"' . KB::get( 'logo' ) . '\" target=\"_blank\"><img src=\"' . esc_url( rank_math()->plugin_url() . 'assets/admin/img/logo.svg' ) . '\"></a>';\n\n\t\tob_start();\n\n\t\t/**\n\t\t * Start the actual page content.\n\t\t */\n\t\tinclude_once $this->get_view( 'header' );\n\t\tinclude_once $this->get_view( 'content' );\n\t\tinclude_once $this->get_view( 'footer' );\n\t\texit;\n\t}", "protected function renderCurrentUrl() {}", "protected function renderCurrentUrl() {}", "public function render() {\n\t\t\t\n\t\t\t$this->_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\t$this->outputLine($this->_doctype);\n\t\t\t$this->outputLine('<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"' . $this->_lang . '\" lang=\"' . $this->_lang . '\" dir=\"' . $this->_dir . '\">');\n\t\t\t\n\t\t\t$this->renderHead();\n\t\t\t\n\t\t\t$this->renderBody();\n\t\t\t\n\t\t\t$this->outputLine('</html>');\n\t\t\t\n\t\t}", "public function drawPage()\n\t\t{\n\t\t}", "function renderPage() {\n $parameters = explode(\"/\", $this->getCurrentPage());\n $folder = $parameters[1];\n if (!in_array($folder, $this->folders) && $folder !== \"api\") {\n $name = $this->getCurrentPage();\n require_once $this->getBlueprintPath();\n }\n }", "protected function render()\n {\n $this->renderer->exec();\n }", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "protected function render()\n {\n $params = ['title' => $this->title, 'content' => $this->content];\n $html = $this->template('Views/v_main.php', $params);\n echo $html;\n }", "public function page(){\n\t\t$this->load->helper('url');\n\t\t$data['userLogin'] = $this->checkLogin();\n\t\tif($data['userLogin']){\n\t\t\t$data['user'] = $this->getUser();\n\t\t}\n\n\t\t$data['sidebar'] = $this->sidebar();\n\t\t$this->load->view('frontend/templates/header');\n\t\t$this->load->view('frontend/templates/navigation');\n\t\t$this->load->view('frontend/page', $data);\n\t\t$this->load->view('frontend/templates/sidebar');\n\t\t$this->load->view('frontend/templates/footer');\n\t}", "function renderResponse() {\n // le header contient le début de la page jusqu'à la balise <body>\n // on redéclare title pour le header\n $header = new View('global.header', array('title' => $this->title));\n echo $header->getHtml();\n\n\n // le menu est composé de la balise <nav> et de ses items\n $menu = new View('global.menu');\n echo $menu->getHtml();\n\n /* début corps de page */\n\n // on affiche les messages éventuels\n $this->showMessages();\n\n // on affiche le contenu principal de la page\n\n echo $this->content;\n\n /* fin corps de page */\n\n // on affiche le footer et on ferme la page html\n $footer = new View('global.footer');\n echo $footer->getHtml();\n }", "private static function render(){\n\t\tif(flexMVC::$view) $viewpath = VIEWS.flexMVC::$view.VIEWPAGE_EXT;\n\t\telse $viewpath = CURRENT_VIEW_FOLDER_LOCATION.CURRENT_VIEW.VIEWPAGE_EXT;\n\t\tif(!is_file($viewpath)){\n\t\t\t$viewpath = VIEWS.flexMVC::$error_page.VIEWPAGE_EXT;\n\t\t\tif(!file_exists($viewpath)){\n\t\t\t\techo(\"Please define your errors page => \" . flexMVC::$error_page);\n\t\t\t\texit;\n\t\t\t}\n\t\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\"); \n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t}else{\n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t\t$_SESSION['flexMVC_lastActive'] = strtotime(\"now\");\n\t\t}\n\t}", "public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}", "public function render()\n {\n header(\"Content-Type: application/xhtml+xml;charset=iso-8859-1\");\n\n $renderedPage = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>' . PHP_EOL;\n\n /*--------------------------------------------------------------------\n\t Dump header definition, namespace etc\n ------------------------------------------------------------------*/\n\n // render all of the page content\n $renderedPage .= parent::render();// . PHP_EOL;\n \n\n// error_log(\"XML: \" . $renderedPage);\n\n if ($this->isDirectDisplay() == true)\n {\t \n echo $renderedPage;\n }\n return $renderedPage;\n }", "public function display(){\n\t\t$this->smarty->assign(\"main_content\",$this->template) ;\n\t\t$this->setTemplate(\"common/page.tpl\") ;\n\t\tparent::display() ;\n\t}", "public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "public function renderContext() {\n\t}", "public function display() {\n echo $this->render();\n }", "public function Index() {\n $this->Render();\n }", "public function render() {\n echo $this->getHtml();\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }", "public function render()\n {\n if(!isset($_SESSION['connect'])){\n $_SESSION['connect'] = false;\n }\n if($_SESSION['connect']){\n $this->model->statut();\n }else{\n $this->model->home();\n } \n require ROOT.\"/App/View/homeView.php\";\n }", "public function homePage()\n {\n return $this->render(\"homePage.html.twig\");\n }", "public function render() {\n\t\t$this->rendered = false;\n\t\tob_start();\n\t\t\t//RENDERING VIEW HERE\n\t\t\trequire_once(\"pages/View/\" . $this->_view);\n\t\t\t$this->content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->rendered = true;\n\t\treturn ($this->content);\n\t}", "abstract protected function RenderContent();", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "function &renderPage( $page=0 )\r\n {\r\n $generator =& $this->generator();\r\n// print( \"Using renderer: \" . $this->RendererClass . \"<br>\");\r\n \r\n return $generator->renderPage( $page );\r\n }", "public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }", "function index() {\r\n $this->page();\r\n }", "public function index(){\t\n\t\t// var_dump('vchxhh');\n\n\t\t$page_model = new \\Models\\Page;\n\t\t$page_model->cmsPage();\n\t\t$this->data['page_title'] = \\Models\\Page::$pageName;\n\n\t\t$this->data['pagename'] = \\Models\\Page::$pageName;\n\t\t$this->data['subname'] = \\Models\\Page::$subName;\n\t\t$this->data['pagedetails'] = \\Models\\Page::$pagedetails;\n\n\t\tswitch (\\Models\\Page::$controller) {\n\t\t\tcase 'contact-us':\n\t\t\t\tUrl::redirect('page/contact');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\n\t\tView::renderTemplate('header',$this->data);\n\t\tView::render('page/page.index',$this->data);\n\t\tView::renderTemplate('footer',$this->data);\n\t}", "function render($page){\n\t\t$url = $this->url;\n\t\tif($page != null) {\n\t\t\t$page->loadLayout();\n\t\t\t$page->calculatePaths();\n\n\t\t\t$toLoad = $page->controlFile;\n\t\t\tfileUtil::trimLeftDir($toLoad);\n\t\t\t$toLoad = fileutil::stripExt($toLoad);\n\n\t\t\t//update the globals to reflect our actual page\n\t\t\t$_SERVER[\"PHP_SELF\"] = $GLOBALS[\"SiteRoot\"].$toLoad;\n\t\t\t$_SERVER[\"PHP_SELF_NOEXT\"] = fileutil::stripExt($GLOBALS[\"SiteRoot\"].$toLoad);\n\t\t\t$_SERVER[\"PHP_SELFDIR\"] = fileutil::stripFile($_SERVER[\"PHP_SELF\"]).\"/\";\n\t\t}\n\t\telse {\n\t\t\t$page = page::loadPage(\"errors/404\");\n\t\t}\n\n\t\t//do a security check\n\t\tif( !security::hasPageAccess($page) ) {\n\t\t\techo(\"Permission Denied for $page->url!\");\n\t\t\tdie();\n\t\t}\n\n\t\t//trigger any page events\n\t\t$page->handleEvents();\n\n\t\t//handle any ajax get requests\n\t\t$page->handleAjax();\n\n\t\t//if this is an ajax post, we don't need to render.\n\t\t//It was just interested in executing events\n\t\tif(util::getData(\"ajaxpost\")!=\"\")\n\t\t\tdie();\n\n\t\t$this->callTemplate($page);\n\t}", "public function render() {\n $content = $this->preRender($this->lang);\n $content .= $this->renderHeader($this->lang);\n $this->bytes = memory_get_peak_usage();\n $content .= $this->internalRender($this->rootNode, $this->currentPageOnRootNode);\n//echo 'PageTree2(' . get_class($this) . '): ' . formatBytes(memory_get_peak_usage()-$this->bytes) . '<br />';\n $content .= $this->renderFooter($this->lang);\n $content .= $this->postRender($this->lang);\n return $content;\n }", "public function render() {\r\n\t\t\r\n\t}", "function go()\n {\n $this->session->layout == 'gallery' ? \n $this->data['pagebody'] = 'Roster/rosterGal' : \n $this->data['pagebody'] = 'Roster/rosterTab'; \n $this->render();\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function render()\n {\n // The hard-coded thirteen represents the minimum number of pages we need to\n // be able to create a sliding page window. If we have less than that, we\n // will just render a simple range of page links insteadof the sliding.\n if ($this->lastPage < 13) {\n $content = $this->getPageRange(1, $this->lastPage);\n } else {\n $content = $this->getPageSlider();\n }\n\n if (\\Config::get('pagination::show_first_last') === true) {\n return $this->getFirst().$this->getPrevious().$content.$this->getNext().$this->getLast();\n }\n\n return $this->getPrevious().$content.$this->getNext();\n }", "public function renderHomepage() {\n\t\tif ($this->logged)\n\t\t\t$this->template->invites = CourseListModel::getMyInvites();\n\t}", "public function display()\n {\n return $this->page->output();\n }", "public function index() {\n // remaining requests to \"cms/index\".\n \n // Load the required models.\n $this->load->model('pages');\n $this->load->model('users');\n \n // Grab the route the end-user is currently requesting.\n $route = implode('/', $this->router->segments());\n // Does the route exist as a page?\n $page_id = $this->model('pages')->page_exists($route);\n if(!$page_id) {\n show_404();\n }\n \n // Can the current user view the page in question?\n $user = $this->model('users')->get_current();\n if(!$user->can_view($page_id)) {\n show_404();\n }\n \n // Grab the page object containing all its data.\n $page_object = $this->model('pages')->load($page_id);\n \n // Now we want to start templating the final HTML output.\n // Add the page object to a variable called \"page\" which will be available in the final template view.\n $this->template->add('page', $page_object);\n $this->template->load($page_object->layout);\n\t\t}", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "public function _render_page($data = [])\n {\n \t$this->load->view('layouts/main', $data);\n }", "public function render(){\n require_once($_SERVER['DOCUMENT_ROOT'].\"//views/\".self::$page_name.\"/\".self::$page_name.\".php\");\n }", "public function index(){\n\t\t$data['mainContent'] = 'landingPage/index';\n\t\t$this->landingPageRenderer('landingPage/index', $data);\n\t}", "public function home()\n {\n $this->render('home/content');\n }", "protected abstract function renderContent();", "public function viewAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getViewRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html'), ['tiles' => $tiles ]);\n }", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}", "public function index()\n\t{\n $this->view->render();\n\t}", "public function index()\n {\n// $pageData = $this->_pageService->getPage(PageConstant::HOME_PAGE);\n return $this->renderView($this->getView('home.welcome'), [], 'Home');\n }", "function currentAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\t$oView->showCurrentLeaderboard();\n\t}", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "private function _render($page)\r\n\t{\r\n\t\tif ($page->getLoginNeeded() == Model_Page_Front::LOGIN_REQUIRED)\r\n\t\t{\r\n\t\t\tAuthUser::load();\r\n\r\n\t\t\tif (!AuthUser::isLoggedIn())\r\n\t\t\t{\r\n\t\t\t\tFlash::set('redirect', $page->url());\r\n\r\n\t\t\t\t$this->go_backend();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tObserver::notify('frontpage_found', array($page));\r\n\r\n\t\t$html = (string) $page->render_layout();\r\n\t\t\r\n\r\n\t\tif ( AuthUser::isLoggedIn())\r\n\t\t{\r\n\t\t\t$inject_html = (string) View::factory( 'system/blocks/toolbar' );\r\n\t\t\t\r\n\t\t\tif(Setting::get( 'profiling' ) == 'yes')\r\n\t\t\t{\r\n\t\t\t\t$inject_html .= (string) View::factory( 'profiler/stats' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Insert system HTML before closed tag body\r\n\t\t\t$matches = preg_split('/(<\\/body>)/i', $html, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); \r\n\t\t\t/* assemble the HTML output back with the iframe code in it */\r\n\t\t\t$html = $matches[0] . $inject_html . $matches[1] . $matches[2];\r\n\t\t}\r\n\t\t\r\n\t\techo Response::factory()\r\n\t\t\t->body($html);\r\n\t}" ]
[ "0.7722776", "0.75737643", "0.75737643", "0.74861497", "0.7220969", "0.7091906", "0.68397176", "0.6829645", "0.6771551", "0.67283165", "0.66548705", "0.6622094", "0.6620352", "0.6619616", "0.6588726", "0.65656817", "0.6541783", "0.652677", "0.6526582", "0.65129566", "0.65063286", "0.6411864", "0.6379575", "0.6367346", "0.6348775", "0.63400126", "0.6339708", "0.63115823", "0.63115823", "0.6311474", "0.63058317", "0.6262208", "0.6261574", "0.62502414", "0.62249434", "0.6219405", "0.6158259", "0.61578363", "0.6145318", "0.6131907", "0.6109273", "0.61042905", "0.6103766", "0.609574", "0.6093817", "0.6091043", "0.60874563", "0.60869205", "0.60869205", "0.60869205", "0.6085981", "0.6084893", "0.6070044", "0.6055798", "0.60552555", "0.60551494", "0.6045435", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.60291725", "0.6026369", "0.60240835", "0.60203326", "0.6012533", "0.59976876", "0.59855145", "0.59847474", "0.5962676", "0.5961166", "0.59525245", "0.59494174", "0.59455675", "0.5940334", "0.5939173", "0.5938858", "0.5938858", "0.5938424", "0.59371835", "0.59318805", "0.5931497", "0.592968", "0.59281963", "0.5921813", "0.59114176", "0.5911128", "0.59065783", "0.5892706", "0.58906806", "0.5889809", "0.5888541" ]
0.0
-1
Renders the separator between pages.
public function separator(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function horizon_separator() {\n\t\tget_template_part('inc/partials/homepage', 'separator');\n\t}", "function separator() {\n echo \"<br>\\n<hr>\";\n }", "private function ToolButtonSeparator()\r\n\t\t{\r\n\t\t\techo \"<td align = 'center' width = '5px'>\";\r\n\t\t\techo $this->img(\"$this->toolbarSeparatorImageName\", 1, 17);\r\n\t\t\techo \"</td>\";\r\n\t\t}", "function horizon_second_separator() {\n\t\tget_template_part('inc/partials/homepage', 'separator');\n\t}", "public function addSeparator() {\n $this->items[] = self::SEPARATOR;\n }", "function addSeperator() {\n $this->addSeparator();\n }", "function filter_wpseo_breadcrumb_separator($this_options_breadcrumbs_sep) {\n return '<i class=\"fas fa-angle-right fa-sm\"></i>';\n}", "function addSeparator() {\n if (is_array($this->toolbar) && count($this->toolbar) > 0) {\n $last = end($this->toolbar);\n if (isset($last) && is_array($last)) {\n if ($last[0] != '-') {\n $this->toolbar[] = array('-', '<seperator/>');\n }\n }\n }\n }", "function htmlSeparator(){\n\treturn \"\\n\\n<br/><hr/>\\n<!-- ----------------------------------------------->\\n\\n\";\n}", "public function getSeparator();", "private function ToolBarSeparator()\r\n\t\t{\r\n\t\t\techo \"<td align = 'left' width ='5'>\";\r\n\t\t\techo $this->img(\"$this->toolbarBackgroundImageName\", 7, 20);\r\n\t\t\techo \"</td>\";\r\n\t\t}", "public function addSeparator()\n\t{\n\t\t$this->body .= '<hr>';\n\t\treturn $this;\n\t}", "public function render() {\n\t\treturn '<li class=\"uk-nav-divider\"></li>';\n\t}", "protected function separator()\n\t{\n\t\tif ($this->isWindowsEnvironment)\n\t\t{\n\t\t\treturn \"&\";\n\t\t}\n\n\t\treturn \";\";\n\t}", "function _renderSpacer()\n {\n // ... maybe append form-spacer to class of next or previous element\n echo '<div class=\"form-spacer\">&nbsp;</div>';\n }", "protected function _renderPaginationEnd()\n {\n return '</ul></div>';\n }", "public function get_list_item_separator()\n {\n }", "function pageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span>'.$pc.'</span>';\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t{\n\t\t\t\t\t$text = $this->Ajax->link($pc, array(\"fallback\"=>$this->action.\"#\",\"url\" =>$this->link.$pc,\"update\" => \"ajax_update\",\"method\"=>\"get\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$text = $this->Html->link($pc,$this->link.$pc);\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\t $t[] = $text;\n\t\t\t $pc++;\n\t\t } \n\t\t while ($pc<=$this->_pageDetails['pageCount']);\n\t\t \n\t\t $t = implode($separator, $t);\n \n\t\treturn $t;\n\t}", "protected function get_separator_position() { ?>\n\t\t<div class=\"uael-separator-wrapper\">\n\t\t\t<span class=\"uael-separator\"></span>\n\t\t</div>\n\t\t<?php\n\t}", "public function setSeparator($separator);", "public static function breadcrumbs() {\n\t\tif(!self::has_breadcrumbs()) return;\n\t\t?>\n\t\t\t<h6 id=\"header-breadcrumbs\">\n\t\t\t\t<?php dimox_breadcrumbs('&middot;') ?>\n\t\t\t</h6>\n\t\t<?php\n\t}", "public function generate($strSeparator = '')\n {\n $this->determineValues();\n\n // Return if there is only one page\n if ($this->intTotalPages < 2 || $this->intRows < 1) {\n return '';\n }\n\n if ($this->intPage == -1) {\n return '';\n }\n\n $template = new TwigFrontendTemplate('pagination');\n\n $template->hasFirst = $this->hasFirst();\n $template->hasPrevious = $this->hasPrevious();\n $template->hasNext = $this->hasNext();\n $template->hasLast = $this->hasLast();\n\n $template->items = $this->getItems();\n $template->page = $this->intPage;\n $template->total = $this->intTotalPages;\n\n $template->first = array\n (\n 'page' => 1,\n 'link' => $this->lblFirst,\n 'href' => $this->arrLinks[0],\n );\n\n $template->previous = array\n (\n 'page' => $this->intPage - 1,\n 'link' => $this->lblPrevious,\n 'href' => $this->arrLinks[($this->intPage - 2)],\n );\n\n $template->next = array\n (\n 'page' => $this->intPage + 1,\n 'link' => $this->lblNext,\n 'href' => $this->arrLinks[$this->intPage],\n );\n\n $template->last = array\n (\n 'page' => $this->intTotalPages,\n 'link' => $this->lblLast,\n 'href' => $this->arrLinks[(count($this->arrLinks) - 1)],\n );\n\n $this->setHeadTags();\n\n return $template->parse();\n }", "public function setTitleSeparator(string $separator);", "function wploop_change_separator()\n{\nreturn '|';\n}", "function custom_hseparator() {\n\t\tadd_option( 'bcn_options', array( 'hseparator' => '' ) );\n\t}", "function custom_menu_separators( $menu_items, $args ) {\n\t$filtered_menu_items = array();\n\n\t$limit = count( $menu_items );\n\n\t$separator = new WP_Post();\n\n\t// These parameters will be added to our separator object.\n\t$add = array(\n\t\t'type' => 'sep',\n\t\t'type_label' => 'sep',\n\t\t'title' => '|',\n\t\t'classes' => array( 'menu-separator' ),\n\t);\n\tforeach ( $add as $k => $v ) $separator->{$k} = $v;\n\n\t$i = 0;\n\t$last_sep = null;\n\t$last_toplevel_page = null;\n\tforeach ( $menu_items as $k => $item ) {\n\t\t$filtered_menu_items[$i] = $item;\n\t\tif ( $item->menu_item_parent == false ) {\n\t\t\t$last_toplevel_page = $i;\n\t\t}\n\t\t$i++;\n\n\t\t// Add our separator if this item is a top-level item (has no parent)\n\t\tif ( $item->menu_item_parent == false ) {\n\t\t\t// Our separator object is not a menu item, but a wp_post object. Add any missing menu item keys with a value of false (prevents errors)\n\t\t\tforeach ( $item as $menu_k => $menu_v ) if ( !property_exists( $separator, $menu_k ) ) {\n\t\t\t\t$separator->{$menu_k} = false;\n\t\t\t}\n\n\t\t\t// Use the ID of the current item, with append -sep to prevent ID clashing.\n\t\t\t$separator->ID = $item->ID . '-sep';\n\n\t\t\t// Add our separator to the menu\n\t\t\t$filtered_menu_items[$i] = $separator;\n\t\t\t$last_sep = $i;\n\t\t\t$i++;\n\t\t}\n\t}\n\n\t// The last element should never be a separator.\n\tif ( $last_sep && ( $last_toplevel_page < $last_sep ) ) {\n\t\tunset( $filtered_menu_items[$last_sep] );\n\t}\n\n\treturn $filtered_menu_items;\n}", "function myPageNumbers($separator=null)\n\t{\n\t\tif (empty($this->_pageDetails) || $this->_pageDetails['pageCount'] == 1) { return false; }\n\t\t$t = array();\n\t\t$text = '';\n\t\t$pc = 1;\n\t\t do \n\t\t {\n\t\t\t if($pc == $this->_pageDetails['page'])\n\t\t\t {\n\t\t\t\t$text = '<span class=numberlinkon> '.$pc.'</span>';\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tif($this->style == 'ajax')\n\t\t\t\t{\n\t\t\t\t\t$text = \" \".$this->Ajax->link($pc, $this->link.$pc, array(\"update\" => \"ajax_update\",\"method\"=>\"get\",\"class\"=>\"numberlink\"));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$text = \" \".$this->Html->link($pc,$this->link.$pc,array(\"class\"=>\"numberlink\"));\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\t $t[] = $text;\n\t\t\t $pc++;\n\t\t } \n\t\t while ($pc<=$this->_pageDetails['pageCount']);\n\t\t \n\t\t $t = implode($separator, $t);\n \n\t\treturn $t;\n\t}", "private function retrieve_sep() {\n\t\treturn WPSEO_Utils::get_title_separator();\n\t}", "public static function getBreadcrumbs($sep='&#x279D;')\n\t{\n\t\t$path = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH);\n\n\t\t$str = '';\n\t\t$linkURL = '';\n\n\t\t$pagesList = explode('/',ltrim($path, \"/\"));\n\n\t\t$c = count($pagesList);\n\t\tfor ($i=0; $i < $c; $i++) {\n\t\t\tunset($linkText);\n\n\t\t\t$page = array_shift($pagesList);\n\t\t\t\n\t\t\t$linkURL .= \"/$page\";\n\t\t\t\n\t\t\t$fullFilePath = BP.\"/app/views$linkURL.phtml\";\n\t\t\t\n\t\t\t# find the break point for the meta data\n\t\t\tif (file_exists($fullFilePath)) {\n\t\t\t\t$fileParts = explode(\"{endmeta}\", file_get_contents($fullFilePath), 2);\n\t\t\t\t\n\t\t\t\tif (isset($fileParts[0])) # does the template have meta data\n\t\t\t\t\t$metaDataArray = parse_ini_string($fileParts[0]);\n\t\t\t\t\n\t\t\t\tif (isset($metaDataArray['linkText']))\n\t\t\t\t\t$linkText = $metaDataArray['linkText'];\n\t\t\t\telseif (isset($metaDataArray['title']))\n\t\t\t\t\t$linkText = $metaDataArray['title'];\n\t\t\t}\n\n\t\t\tif (!isset($linkText))\n\t\t\t\t$linkText = self::ucwordss(str_replace('-',' ',$page), [\"is\", \"to\", \"the\", \"for\"]);\t\t\t\t\n\n\t\t\tif ($i+1 == $c) # last one\n\t\t\t\t$str .= ' '.$sep.' '.$linkText;\n\t\t\telse\n\t\t\t\t$str .= ' '.$sep.' <a href=\"'.$linkURL.'\">'.$linkText.'</a>';\n\t\t}\n\n\t\t$indexFileParts = explode(\"{endmeta}\", file_get_contents(BP.\"/app/views/index.phtml\"), 2);\n\t\t\t\t\n\t\tif (isset($indexFileParts[0])) # does the template have meta data\n\t\t\t$metaDataArray = parse_ini_string($indexFileParts[0]);\n\t\t\n\t\tif (isset($metaDataArray['linkText']))\n\t\t\t$linkText = $metaDataArray['linkText'];\n\t\telse\n\t\t\t$linkText = 'Home';\n\n\t\treturn '<a href=\"/\">'.$linkText.'</a>'.$str;\n\t}", "function zen_draw_separator($image = 'true', $width = '100%', $height = '1') {\n\n // set default to use from template - zen_image will translate if not found in current template\n if ($image == 'true') {\n $image = DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_BLACK_SEPARATOR;\n } else {\n if (!strstr($image, DIR_WS_TEMPLATE_IMAGES)) {\n $image = DIR_WS_TEMPLATE_IMAGES . $image;\n }\n }\n return zen_image($image, '', $width, $height);\n }", "protected function register_content_separator() {\n\t\t$this->start_controls_section(\n\t\t\t'section_separator',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Separator', 'uael' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_CONTENT,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_settings',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Separator', 'uael' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::SWITCHER,\n\t\t\t\t'label_on' => __( 'Show', 'uael' ),\n\t\t\t\t'label_off' => __( 'Hide', 'uael' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t\t'default' => 'yes',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_position',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Position', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'below_desig',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'below_name' => __( 'Below Name', 'uael' ),\n\t\t\t\t\t'below_desig' => __( 'Below Designation', 'uael' ),\n\t\t\t\t\t'below_desc' => __( 'Below Description', 'uael' ),\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'separator_size',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Width', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px', '%' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t),\n\t\t\t\t\t'%' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => '20',\n\t\t\t\t\t'unit' => '%',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator ' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'separator_thickness',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Thickness', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'size_units' => array( 'px', 'em', 'rem' ),\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 2,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator' => 'border-top-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'separator_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Color', 'uael' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'scheme' => array(\n\t\t\t\t\t'type' => Scheme_Color::get_type(),\n\t\t\t\t\t'value' => Scheme_Color::COLOR_4,\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .uael-separator' => 'border-top-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t\t'condition' => array(\n\t\t\t\t\t'separator_settings' => 'yes',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "function my_document_title_separator($sep) {\n if (is_singular(array('post', 'page'))) {\n $sep = '|';\n }\n\n return $sep;\n}", "public function renderDivisionFooter(): void;", "public function getDividerCssClass()\r\n\t{\r\n\t\treturn 'divider';\r\n\t}", "protected function document_title_separator()\n\t{\n\t\treturn ' ― ';\n\t}", "protected function render_content() {\n\t\t\t?>\n\t\t\t\t<div class=\"customizer-divider\"></div>\n\t\t\t<?php\n\t\t}", "public function getSeparator()\n {\n return $this->separator;\n }", "public function getSeparator()\n {\n return $this->separator;\n }", "function addDivider($label = \"\") {\n $this->dividers[] = $label;\n\n // find the number of HTML components before the divider on the page\n $components = $this->getHtmlComponents();\n\n $this->dividerIndexes[] = count($components);\n }", "function wp_get_list_item_separator()\n {\n }", "public function getSeparator() {\n return $this->_separator;\n }", "public function getSeparator()\n\t{\n\t\treturn $this->_separator;\n\t}", "public function addPageBreak() {\n\t\t$this->_elementCollection[] = new PHPWord_Section_PageBreak();\n\t}", "public function generate($strSeparator = '')\n {\n if ($this->intRowsPerPage < 1) {\n return '';\n }\n\n $this->determineValues();\n\n // Return if there is only one page\n if ($this->intTotalPages < 2 || $this->intRows < 1) {\n return '';\n }\n\n if ($this->intPage > $this->intTotalPages) {\n $this->intPage = $this->intTotalPages;\n }\n\n $template = $this->prepareTemplate();\n\n $this->setHeadTags();\n\n return $template->parse();\n }", "public function getSeparator()\n {\n return $this->_sSeparator;\n }", "private function ending()\n {\n if ($this->current_page + 1 <= $this->total_pages) {\n return '<li><a href=\"' . ($this->current_page + 1) . '\">»</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">»</a></li>';\n }\n }", "function montheme_title_separator()\n{\n\treturn '|';\n}", "public function setSeparator($separator) {\n $this->_separator = $separator;\n }", "function renderNav($prefix = '<b style=\" float:none;\" class=\"page_link\">', $suffix = '</b>') {\r\n\t\tif ($this->total_rows == 0)\r\n\t\t\treturn FALSE;\r\n\t\t\r\n\t\t$batch = ceil($this->page / $this->links_per_page );\r\n\t\t$end = $batch * $this->links_per_page;\r\n\t\tif ($end == $this->page) {\r\n\t\t\t//$end = $end + $this->links_per_page - 1;\r\n\t\t//$end = $end + ceil($this->links_per_page/2);\r\n\t\t}\r\n\t\tif ($end > $this->max_pages) {\r\n\t\t\t$end = $this->max_pages;\r\n\t\t}\r\n\t\t$start = $end - $this->links_per_page + 1;\r\n\t\t$links = '';\r\n\t\t\r\n\t\tfor($i = $start; $i <= $end; $i ++) {\r\n\t\t\tif ($i == $this->page) {\r\n\t\t\t\t$links .= $prefix . \" $i \" . $suffix;\r\n\t\t\t} else {\r\n\t\t\t\t$links .= ' <a style=\" float:none;\" href=\"' . $this->php_self . '?page=' . $i . '' . $this->append . '\">' . $i . '</a> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $links;\r\n\t}", "function modifyDocumentTitleSeparator( $separator ){\n $separator = '•';\n\n return $separator;\n}", "public function drawEndHeaderPanel()\r\n {\r\n echo '</div>';\r\n }", "public function getSeparator()\n {\n return $this->getOption('separator');\n }", "function gallerynavigation($delimiter) {\n\t\tif (defined('IMAGEVIEW')) {\n\t\t\t$folderID = $GLOBALS['folderID'];\n\t\t}\n\t\telseif (!empty($_REQUEST['fID'])) {\n\t\t\t$folderID = $this->parentfolder;\n\t\t}\n\t\telse {\n\t\t\t$folderID = 'root';\n\t\t}\n\n\t\t$path = array();\n\t\tdo {\n\t\t\tif (!$folderRC = $this->all_folders[$folderID]) break;\n\n\t\t\t$foldername = (empty($folderRC[2]))?\t// kh_mod 0.3.0, changed\n\t\t\t\t\t\t\t\t$this->lang['gallery']\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t$this->br2line($folderRC[2]);\n\n\t\t\t$path[$folderID] = sprintf('<a href=\"%s\">%s</a>',\n\t\t\t\t\t\t\t\t\t\t $this->getGalleryLink(array('fID'=>$folderID)),\n\t\t\t\t\t\t\t\t\t\t $foldername\n\t\t\t\t\t\t\t\t\t );\n\t\t\t$folderID\t\t = $folderRC[1];\n\t\t\tif (!empty($path[$folderID])) break;\t// circle link!\n\t\t}\n\t\twhile ((int)$folderID > 0);\n\n\t\t// SET LINK TO MAINPAGE, kh_mod 0.3.1, changed\n\t\tif (!empty($this->websitelink) && !$this->string_empty($this->websitetext))\n\t\t\t$path[] = '<a href=\"'. $this->websitelink .'\" target=\"_top\">'. $this->websitetext .'</a>';\n\t\techo implode($delimiter, array_reverse($path));\n\t}", "public function divider (array $options = []) {\n $options = $this->addClass ($options, 'divider') ;\n $options['role'] = 'separator' ;\n return $this->Html->tag('li', '', $options) ;\n }", "public static function tag_page_break() {\n\t//--\n\treturn '<!-- PAGE BREAK -->';\n\t//--\n}", "public function nextDivider() {}", "public function render()\n {\n // The hard-coded thirteen represents the minimum number of pages we need to\n // be able to create a sliding page window. If we have less than that, we\n // will just render a simple range of page links insteadof the sliding.\n if ($this->lastPage < 13) {\n $content = $this->getPageRange(1, $this->lastPage);\n } else {\n $content = $this->getPageSlider();\n }\n\n if (\\Config::get('pagination::show_first_last') === true) {\n return $this->getFirst().$this->getPrevious().$content.$this->getNext().$this->getLast();\n }\n\n return $this->getPrevious().$content.$this->getNext();\n }", "public function render()\n\t{\n\t\t$class = $this->renderMarginClass($this->hasMargins);\n\n\t\treturn <<<HTML\n<section class=\"block-divider $class\">\n\t<div class=\"container\">\n\t\t<div class=\"container-inner\">\n\t\t</div>\n\t</div>\n</section>\nHTML;\n\t}", "public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}", "public function getFieldsSeparator();", "public function getHeaderSeparator()\n {\n return self::HEADER_SEPARATOR;\n }", "private function getSeparator(): string\n {\n return $this->getModelGeneratorConfig()->getConfig('separator', '');\n }", "function html_breadcrumb($hierarchy = null, $sep = ', ', $end = ' : ') {\n\t\tif(!is_array($hierarchy))\n\t\t\t$hierarchy = $this->hierarchy('page', PAGE_PATH);\n\t\t$nbr = count($hierarchy);\n\n\t\t$html = $plain = '';\n\t\tforeach($hierarchy as $id => $p) {\n\t\t\t// separators\n\t\t\tif($nbr > 1) {\n\t\t\t\tif($id < $nbr - 1) {\n\t\t\t\t\tif($id) {\n\t\t\t\t\t\t$plain.= $sep;\n\t\t\t\t\t\t$html .= $sep;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$plain.= $end;\n\t\t\t\t\t$html .= $end;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// titles\n\t\t\t$ttl = $this->page_title($p);\n\t\t\t$plain.= $ttl;\n\t\t\tif($id < $nbr-1)\n\t\t\t\t$html .= $this->parse_link($p);\n\t\t\telse\n\t\t\t\t$html .= '<strong><a id=\"title\" href=\"#top\">' . $ttl . '</a></strong>';\n\t\t}\n\t\treturn array('plain' => $plain, 'html' => $html);\n\t}", "public function render()\n {\n if ($this->hasPages()) {\n return sprintf(\n '<ul class=\"pagination\">%s %s</ul>',\n $this->getPreviousButton(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "function testSeparator(){\n\t\t#mdx:Separator\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat'])\n\t\t\t->separator(\"&nbsp;&nbsp;\");\n\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?select_days.*?Mon.*?\".preg_quote('&nbsp;&nbsp;').\".*?Tue/s\");\n\t\techo $select;\t\t\n\t}", "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}", "private function setSeparator()\n\t\t{\n\t\t\t$separetor = explode('/', $this->_url);\n\t\t\t$separetor[2] = (isset($separetor[2]) && $separetor[2] != null ? $separetor[2] . 'Action' : 'indexAction');\n\t\t\tunset($separetor[0]);\n\t\t\t$this->_separetor = $separetor;\n\t\t}", "function render_page_container_end()\n\t\t{\n\t\t\t$output = '</div>'; \n\t\t\treturn $output;\n\t\t}", "function render(){\n\t\treturn $this->id.bnf::$separator;\n\t}", "public function addDivider()\n\t{\n\t\t$this->items[] = new MenuItem(array('name' => 'divider'));\n\n\t\treturn $this;\n\t}", "function setSeparator($sep = ', '){\n\t\t\t$this->separator = $sep;\n\t\t}", "public function separator($date)\n {\n echo \"<h3><u> Breaking string $date into an array using separator parameter as / and using space instead of / </h3></u>\"; \n $array=(explode(\"/\",($date)));\n $a=count($array);\n for($i=0;$i<$a;$i++)\n {\n echo $array[$i].\" \";\n }\n echo \"<br><hr>\";\n }", "function getPageSegment($separator = null, $offset = 0) {\n $page = $this->getCurrentPage();\n if (!$separator) {\n if (file_exists($this->getPagePath($page))) {\n require_once $this->getPagePath($page);\n }\n return;\n }\n $path = $this->getPagePath($page);\n $string = file_get_contents($path);\n $segments = explode($separator, $string);\n if(array_key_exists($offset, $segments)){\n $segment = $segments[$offset];\n if (substr($segment, 0, 5) !== \"<?php\") {\n $segment = \"?>\" . $segment;\n }\n eval($segment);\n }\n }", "public function renderAllDivisionsFooter(): void;", "public function renderItems()\n {\n $this->dataProvider->setPagination(false);\n\n $rows=[];\n $this->renderLevel($rows,0,0);\n\n return implode($this->separator, $rows);\n }", "public function render()\n {\n if ($this->hasPages())\n {\n return sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n );\n }\n\n return '';\n }", "protected function _renderPaginationStart()\n {\n return '<div id=\"ZVHPContainer\"><ul id=\"ZVHPList\">';\n }", "function bridge_qode_register_separator_widget( $widgets ) {\n $widgets[] = 'BridgeQodeSeparator';\n\n return $widgets;\n }", "public function setSeparator($sep = ' - ')\n\t{\n\t\t$this->_separator = $sep;\n\t}", "function setNavVarsSeparator($t) {\r\n global $SYS;\r\n\r\n $SYS[\"NAV_SEPARATOR\"]=$t;\r\n $SYS[\"NAV_SEPARATOR_I\"]=\"\";\r\n\r\n}", "protected function _separator()\n {\n if (!empty($this->_js)) {\n $separator = '&';\n } else {\n $separator = '&amp;';\n }\n\n return $separator;\n }", "public function navbar() {\n $items = $this->page->navbar->get_items();\n $breadcrumbs = array();\n foreach ($items as $item) {\n $item->hideicon = true;\n $breadcrumbs[] = $this->render($item);\n }\n $divider = '<span class=\"divider\">/</span>';\n $list_items = '<li>'.join(\" $divider</li><li>\", $breadcrumbs).'</li>';\n $title = '<span class=\"accesshide\">'.get_string('pagepath').'</span>';\n return $title . \"<ul class=\\\"breadcrumb\\\">$list_items</ul>\";\n }", "private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }", "public function render()\n {\n if ($this->hasPages()) {\n return new HtmlString(sprintf(\n '<ul class=\"pagination\">%s %s %s</ul>',\n $this->getPreviousButton(),\n $this->getLinks(),\n $this->getNextButton()\n ));\n }\n\n return '';\n }", "public function getSeparatorCharacter()\n\t{\n\t\treturn '_';\n\t}", "public function drawPage()\n\t\t{\n\t\t}", "function breadcrumbs($separator = ' &raquo; ', $home = 'Home') {\n\t // This gets the REQUEST_URI (/path/to/file.php), splits the string (using '/') into an array, and then filters out any empty values\n\t $path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));\n\t //pre($path);\n\t // This will build our \"base URL\" ... Also accounts for HTTPS :)\n\t $base = base_url();\n\t \n\t // Initialize a temporary array with our breadcrumbs. (starting with our home page, which I'm assuming will be the base URL)\n\t $breadcrumbs = Array(\"<a href=\\\"$base\\\">$home</a>\");\n\t \n\t // Find out the index for the last value in our path array\n\t $last = end(array_keys($path));\n\t \n\t // Build the rest of the breadcrumbs\n\t foreach ($path AS $x => $crumb) {\n\t // Our \"title\" is the text that will be displayed (strip out .php and turn '_' into a space)\n\t $title = ucwords(str_replace(Array('.php', '_'), Array('', ' '), $crumb));\n\t \n\t // If we are not on the last index, then display an <a> tag\n\t if ($x != $last)\n\t $breadcrumbs[] = \"<a href=\\\"$base$crumb\\\">$title</a>\";\n\t // Otherwise, just display the title (minus)\n\t else\n\t $breadcrumbs[] = $title;\n\t }\n\t \n\t // Build our temporary array (pieces of bread) into one big string :)\n\t return implode($separator, $breadcrumbs);\n\t}", "private function beginning()\n {\n if ($this->current_page - 1 >= 1) {\n return '<li><a href=\"' . ($this->current_page - 1) . '\">«</a></li>';\n } else {\n return '<li class=\"disabled\"><a href=\"#\">«</a></li>';\n }\n }", "public function url_separator() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn (isset($class::_object()->url_separator) && !empty($class::_object()->url_separator)) ? $class::_object()->url_separator:'-';\r\n\t}", "public function testSeparator() {\n\t\t\t$builder = new StringBuilder('Hello');\n\n\t\t\t$builder->setSeparator(' ')->append('World');\n\t\t\t$this->assertEquals('Hello World', $builder->__toString());\n\n\t\t\t$builder->prepend('Extra');\n\t\t\t$this->assertEquals('Extra Hello World', $builder->__toString());\n\n\t\t\tunset($builder);\n\t\t}", "public static function urlSeparator($separator=null) {\r\n\t\t$class = __CLASS__;\r\n if(!empty($separator)) {\r\n $class::_object()->url_separator = $separator;\r\n }\r\n\t\treturn (isset($class::_object()->url_separator) && !empty($class::_object()->url_separator)) ? $class::_object()->url_separator:'-';\r\n\t}", "function add_separator($arr = array())\n\t{\n\t\tif (empty($arr[\"parent\"]))\n\t\t{\n\t\t\t$arr[\"parent\"] = $this->menu_id;\n\t\t}\n\n\t\tif (!isset($this->menus[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->menus[$arr[\"parent\"]] = \"\";\n\t\t}\n\t\t\n\t\tif (!isset($this->items[$arr[\"parent\"]]))\n\t\t{\n\t\t\t$this->items[$arr[\"parent\"]] = array();\n\t\t}\n\t\t$this->items[$arr[\"parent\"]][] = array_merge($arr, array(\"separator\" => true));\n\n\t\t$this->menus[$arr[\"parent\"]] .= '<div class=\"menuItemSep\"></div>'.\"\\n\";\n\t}", "function pxlz_edgtf_register_separator_widget($widgets) {\n $widgets[] = 'PxlzEdgefSeparatorWidget';\n\n return $widgets;\n }", "protected function render_action_menu_filler(action_menu_filler $action) {\n return html_writer::tag('li', '', array('class' => 'divider'));\n }", "public function renderImport() { ?>\n <div class=\"mkdf-options-page mkdf-page\">\n <?php $this->getHeader(sienna_mikado_get_theme_info_item('Name'), sienna_mikado_get_theme_info_item('Version'), false); ?>\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n <?php $this->getPageNav('tabimport', true); ?>\n <?php $this->getImportContent(); ?>\n </div>\n </div>\n </div>\n </div>\n <?php }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public static function sep($return = false)\n\t\t{\n\t\t\t$str = '';\n\t\t\tfor ($i = 0; $i <= \\Helper\\Cli::get_width()-1; $i++) {\n\t\t\t\t$str .= '-';\n\t\t\t}\n\t\t\t$str .= NL;\n\n\t\t\tif ($return) return $str; else echo $str;\n\t\t}", "public function render()\n\t{\n\t\tif ($this->total_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$pagination = $this->template['wrapper_start'];\n\t\t$pagination .= $this->prev_link(Lang::get('pagination.previous'));\n\t\t$pagination .= $this->page_links();\n\t\t$pagination .= $this->next_link(Lang::get('pagination.next'));\n\t\t$pagination .= $this->template['wrapper_end'];\n\n\t\treturn $pagination;\n\t}", "function mpcth_display_breadcrumb() {\r\n\tglobal $post;\r\n\t$id = $post->ID;\r\n\t$return = '<a href=\"/\">' . __('Home', 'mpcth') . '</a>';\r\n\r\n\tif(is_front_page()) {\r\n\t\t// do nothing\r\n\t} elseif(is_page()) {\r\n\t\t$page = get_post($id);\r\n\r\n\t\t$parent_pages = array();\r\n\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> ' . $page->post_title . \"\\n\";\r\n\r\n\t\twhile ($page->post_parent) {\r\n\t\t\t$page = get_post($page->post_parent);\r\n\t\t\t$parent_pages[] = ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_permalink($page->ID) . '\">' . $page->post_title . '</a>';\r\n\t\t}\r\n\r\n\t\t$parent_pages = array_reverse($parent_pages);\r\n\r\n\t\tforeach ($parent_pages as $parent) {\r\n\t\t\t$return .= $parent;\r\n\t\t}\r\n\t} elseif(is_single()) {\r\n\t\tif($post->post_type == 'post') {\r\n\t\t\t$category = get_the_category($id);\r\n\r\n\t\t\tif(!empty($category)){\r\n\t\t\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data, 0, -strlen(' <span class=\"mpcth-header-devider\">/</span> '));\r\n\t\t\t}\r\n\t\t} elseif($post->post_type == 'portfolio') {\r\n\t\t\t$terms = get_the_terms($id, 'mpcth_portfolio_category');\r\n\t\t\t\r\n\t\t\tif(!empty($terms)){\r\n\t\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ';\r\n\r\n\t\t\t\tforeach ($terms as $term) {\r\n\t\t\t\t\t$return .= ' <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($term !== end($terms))\r\n\t\t\t\t\t\t$return .= ', ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . $post->post_title . \"\\n\";\r\n\t} elseif(is_category()) {\r\n\t\t$category = get_the_category($id);\r\n\t\t$data = get_category_parents($category[0]->cat_ID, true, ' <span class=\"mpcth-header-devider\">/</span> ');\r\n\r\n\t\tif(!empty($category)){\r\n\t\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> ' . substr($data,0,-8);\r\n\t\t}\r\n\t} elseif(is_tax()) {\r\n\t\t$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));\r\n\t\t$return .= ' <span class=\"mpcth-header-devider\">/</span> <a href=\"' . get_term_link($term) . '\">' . $term->name . '</a>';\r\n\t}\r\n\r\n\treturn $return;\r\n}", "function crumble_divider_1px_dashed($atts, $content = null) {\r\n\treturn '<div class=\"divider-1px-dashed\"></div><div class=\"clear\"></div>';\r\n}" ]
[ "0.7091353", "0.68090755", "0.64235157", "0.63818955", "0.62820655", "0.62691295", "0.6115944", "0.6110446", "0.6082481", "0.6027026", "0.6025172", "0.59120035", "0.59115976", "0.5887957", "0.58818936", "0.58655804", "0.578316", "0.5752331", "0.5742026", "0.5701355", "0.5679923", "0.56091076", "0.5604614", "0.560145", "0.55827355", "0.5571516", "0.5565534", "0.5545069", "0.5507502", "0.54616493", "0.54579693", "0.5447709", "0.543949", "0.5438423", "0.5438152", "0.54270023", "0.54226273", "0.54226273", "0.54207003", "0.5399202", "0.5392132", "0.5386657", "0.53694355", "0.5364192", "0.5319691", "0.5284755", "0.52408564", "0.5235444", "0.52184385", "0.5200383", "0.51927453", "0.5192255", "0.5190536", "0.5189417", "0.5137393", "0.5122582", "0.5114781", "0.5113578", "0.5108698", "0.50877315", "0.5083753", "0.5082073", "0.5075767", "0.50740236", "0.5069885", "0.50361216", "0.50268847", "0.5015351", "0.50082505", "0.5002798", "0.49907187", "0.4988948", "0.49873763", "0.49850687", "0.49834976", "0.49802265", "0.4977736", "0.497557", "0.4969999", "0.49663723", "0.4954202", "0.4953337", "0.49479505", "0.4946536", "0.49313557", "0.49227455", "0.4919048", "0.48967066", "0.48919415", "0.48810062", "0.48806527", "0.4876349", "0.48680225", "0.48108444", "0.47958767", "0.47874185", "0.478384", "0.47831196", "0.47746524", "0.47620353" ]
0.5481712
29
__construct Create a new Powerstack\Plugins\Memcached object Configuration: app/config.yml: plugins: memcached: servers: [Memcached servers (host:port[,host:port])]
function __construct() { $conf = config('plugins'); if (!isset($conf->memcached)) { $this->conf = (object) array( 'servers' => '127.0.0.1:11211', ); } else { $this->conf = $conf->memcached; } $this->memcached = new \Memcached(); if (strpos($this->conf->servers, ',')) { $servers = explode(',', $this->conf->servers); } else { $servers = array($this->conf->servers); } foreach ($servers as $server) { $parts = explode(':', $server); $this->addServer($parts[0], $parts[1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n include Config::create()->load('cache');\n $this->config = $cache;\n $this->mc = new Memcached();\n foreach ($this->config['server'] as $s) {\n $this->mc->addServer($s['host'], $s['port']);\n }\n }", "public function __construct() {\n $memcached = new Memcached();\n $memcached->addServer('localhost', 11211);\n\n $this->engine = new MemcachedCache();\n $this->engine->setMemcached($memcached);\n }", "public function __construct($options)\n\t{\n\t\t$this->memcached = new \\Memcached();\n\n\t\tif (isset($options['servers'])) {\n\t\t\t$servers = array();\n\t\t\tforeach ($options['servers'] as $server) {\n\t\t\t\t$defaults = array(\n\t\t\t\t\t'weight' => 1,\n\t\t\t\t\t'port' => self::DEFAULT_PORT,\n\t\t\t\t);\n\t\t\t\t$server = parse_url($server[0]) + $server + $defaults;\n\t\t\t\tif (!isset($server['host'])) {\n\t\t\t\t\t$server['host'] = $server['path'];\n\t\t\t\t\tunset($server['path']);\n\t\t\t\t}\n\t\t\t\t$servers[] = array(\n\t\t\t\t\t$server['host'],\n\t\t\t\t\t$server['port'],\n\t\t\t\t\t$server['weight']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->memcached->addServers($servers);\n\t\t} else {\n\t\t\t$options['port'] = isset($options['port']) ? $options['port'] : self::DEFAULT_PORT;\n\t\t\t$this->memcached->addServer($options['host'],$options['port']);\n\t\t}\n\n\t\tif (isset($options['options'])) {\n\t\t\tforeach ($options['options'] as $option => $value) {\n\t\t\t\t$this->memcached->setOption($option, $value);\n\t\t\t}\n\t\t}\n\t}", "function __construct() {\n $this->mem = new Memcache();\n //$this->mem->connect('118.178.182.224','18392'); //写入缓存地址,端口\n// $this->mem->addServer('118.178.182.224','18392');\n $this->mem->addServer('localhost','3306');\n }", "public function __construct (Memcached $memcached) {\n $this->memcached = $memcached;\n }", "public function __construct($params = array()) {\n\n $defaults = array(\n 'host' => 'localhost',\n 'port' => 11211, \n 'prefix' => null,\n );\n\n $this->options = array_merge($defaults, (array)$params);\n $this->connection = new \\Memcached();\n $this->connection->addServer($this->options['host'], $this->options['port']);\n\n }", "public function __construct() {\r\n $this->cache = new MemCacheInterface(self::$CACHE_HOST, self::$CACHE_PORT, self::$CACHE_PREFIX, self::$CACHE_GROUP);\r\n }", "public function __construct($options) {\n\t\t$this -> conn = memcache_pconnect($options['host'], $options['port']);\n\t}", "protected function getConfiguredMemcachedServers() {}", "public function __construct(array $APCOptions = null, array $MemcacheOptions = null)\n\t\t{\n\t\t\tif ($APCOptions && !empty($APCOptions['Enabled']) && (!ini_get('apc.enabled') || !function_exists('apc_store')))\n\t\t\t{\n\t\t\t\tthrow new Exception('APC not available');\n\t\t\t}\n\t\t\telseif ($APCOptions)\n\t\t\t{\n\t\t\t\tself::$APCOptions = array_merge(self::$DefaultAPCOptions, $APCOptions);\n\t\t\t\tself::$APCOn = !empty(self::$APCOptions['Enabled']);\n\t\t\t}\n\n\t\t\tif ($MemcacheOptions && !empty($MemcacheOptions['Enabled']) && !class_exists('Memcached'))\n\t\t\t{\n\t\t\t\tthrow new Exception('Memcached not available (Memcached extension, not Memcache)');\n\t\t\t}\n\t\t\telseif ($MemcacheOptions)\n\t\t\t{\n\t\t\t\tself::$MemcacheOptions = array_merge(self::$DefaultMemcacheOptions, $MemcacheOptions);\n\t\t\t\tself::$MemcacheOn = !empty(self::$MemcacheOptions['Enabled']);\n\n\t\t\t\tself::$Memcache = new Memcached;\n\n\t\t\t\tif (!empty(self::$MemcacheOptions['Consistent']))\n\t\t\t\t{\n\t\t\t\t\tself::$Memcache -> setOptions(array(\n \t\t\t\t\t\tMemcached::OPT_CONNECT_TIMEOUT => 20,\n\t\t\t\t\t\tMemcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,\n\t\t\t\t\t\tMemcached::OPT_SERVER_FAILURE_LIMIT => 5,\n\t\t\t\t\t\tMemcached::OPT_REMOVE_FAILED_SERVERS => true,\n\t\t\t\t\t\tMemcached::OPT_RETRY_TIMEOUT => 1,\n\t\t\t\t\t\tMemcached::OPT_LIBKETAMA_COMPATIBLE => true\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\t$MemcacheServers = self::ParseMemcacheServers(self::$MemcacheOptions['Servers']);\n\t\t\t\tself::$Memcache -> addServers($MemcacheServers);\n\t\t\t}\n\t\t}", "public function connect() {\n// $m->addServer('localhost', 11211);\n// $v = $m->get('counter');\n// $m->set('counter', $v + 1);\n//\n// $md = new Memcached();\n// $md->addServer('localhost', 11211);\n// $v = $md->get('counter', null, $token);\n// $v = $md->set('counter', null,1, $token);\n \n \n $_debugMicrotime = microtime(true);\n \n $memcachedClass = 'Memcached';\n if(!auto::autoload($memcachedClass)){\n throw new exception_cache('class not exist for '.$memcachedClass.', check your php extensions~', exception_cache::type_memcache_not_exist);\n }\n \n $this->_memcached = new $memcachedClass();\n $servers = $this->_confs['servers'];\n foreach ($servers as $server) {\n $this->_memcached->addServer($server['host'], $server['port'], $server['weight']);\n }\n ($timeCost = microtime(true) - $_debugMicrotime) && performance::add(__METHOD__, $timeCost, array('alias'=>$this->_alias));\n\n //return $this->_memcached;\n return $this;\n }", "public static function load (array $config) : self {\n if (!extension_loaded('memcached')) {\n if (extension_loaded('memcache')) {\n throw new CacheException(\"Can't initialize Memcached cache engine: PHP extension memcached not loaded. This class uses the Memcached extension AND NOT the Memcache extension (this one is loaded).</strong>\");\n } else {\n throw new CacheException(\"Can't initialize Memcached cache engine: PHP extension memcached not loaded.\");\n }\n }\n\n $memcached = new Memcached;\n $memcached->addServer(\n $config[\"server\"] ?? self::DEFAULT_SERVER,\n $config[\"port\"] ?? self::DEFAULT_PORT,\n );\n\n // SASL authentication\n if (array_key_exists(\"sasl_username\", $config)) {\n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n $memcached->setSaslAuthData(\n $config[\"sasl_username\"],\n $config[\"sasl_password\"] ?? \"\",\n );\n }\n\n return new self($memcached);\n }", "public function __construct($serversString=\"\") {\n if ($serversString != \"\") {\n $this->con = new Memcache;\n $tmp = explode(\";\", $serversString);\n foreach ($tmp as $s) {\n $hostInfo = explode(\":\",$s);\n // Assume default port\n if (count($hostInfo) == 1)\n $hostInfo[] = 11211;\n\n $this->con->addServer($hostInfo[0], $hostInfo[1], true, 1);\n }\n }\n else {\n // Fall back to file cache or whatbnot ?\n }\n }", "public static function instance()\n\t{\n\t\tif (is_null(static::$instance))\n\t\t{\n\t\t\t// -----------------------------------------------------\n\t\t\t// Verify that the Memcache extension is installed.\n\t\t\t// -----------------------------------------------------\n\t\t\tif ( ! class_exists('Memcache'))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Attempting to use Memcached, but the Memcached PHP extension is not installed on this server.');\n\t\t\t}\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Instantiate the Memcache class.\n\t\t\t// -----------------------------------------------------\n\t\t\t$memcache = new \\Memcache;\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Configure the Memcache servers.\n\t\t\t// -----------------------------------------------------\n\t\t\tforeach (Config::get('cache.servers') as $server)\n\t\t\t{\n\t\t\t\t$memcache->addServer($server['host'], $server['port'], true, $server['weight']);\n\t\t\t}\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Verify Memcache was configured successfully.\n\t\t\t// -----------------------------------------------------\n\t\t\tif ($memcache->getVersion() === false)\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Memcached is configured. However, no connections could be made. Please verify your memcached configuration.');\n\t\t\t}\n\n\t\t\tstatic::$instance = $memcache;\n\t\t}\n\n\t\treturn static::$instance;\n\t}", "public function __construct($servers = array())\n {\n if (!empty($servers))\n {\n $this->servers = $servers;\n $this->_connect();\n }\n /**\n * задержка для Memcached\n */\n define('MEMQ_TTL', 0);\n }", "private function __construct() {\n\t\t$this->memcache = new Memcache();\n\t\t$connectResult = $this->memcache->connect('localhost','11211');\n\t\tif ($connectResult === FALSE) {\n\t\t\t$this->memcache = NULL;\n\t\t}\n\t}", "private function instance()\n\t{\n\t\tif (!$this->instance) {\n\t\t\t$this->instance = new \\Memcache();\n\t\t\t\n\t\t\tforeach ($this->servers as $server) {\n\t\t\t\t$this->instance->addServer(\n\t\t\t\t\t$server->host(),\n\t\t\t\t\t$server->port(),\n\t\t\t\t\t$server->isPersistent(),\n\t\t\t\t\t$server->weight(),\n\t\t\t\t\t$server->timeout(),\n\t\t\t\t\t$server->retryInterval()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->instance;\n\t}", "private function memcacheConnect() {\n \n $config = new Cfe_Config_Ini(APPLICATION_CONFIG_PATH . '/application.ini',Cfe_Utils::getPlatform());\n $config = $config->memcache;\n \n $options = $config->frontendOptions->toArray();\n $options['logging'] = $this->logging;\n $options['logger'] = $this->logger;\n $options['lifetime'] = $this->lifetime;\n $this->_memcacheInstance = Zend_Cache::factory($config->frontend,\n $config->backend,\n $options,\n $config->backendOptions->toArray(),\n false,\n false);\n //TODO\n //$this->_memcacheInstance->clean();\n return $this->_memcacheInstance;\n }", "private function _createMemcachedDriver(array $config)\n {\n $defaultServer = array(\n 'host' => 'localhost',\n 'port' => 11211,\n );\n\n $memcached = new \\Memcached();\n\n if (isset($config['servers']) === true) {\n foreach ($config['servers'] as $server) {\n $server = array_replace_recursive($defaultServer, $server);\n $memcached->addServer(\n $server['host'],\n $server['port']\n );\n }\n } else {\n $memcached->addserver(\n $defaultServer['host'],\n $defaultServer['port']\n );\n }\n\n return $memcached;\n }", "static function load () {\n //Checks extension is okay\n if (!extension_loaded('memcached')) {\n if (extension_loaded('memcache')) {\n message_die(GENERAL_ERROR, \"Can't initialize $engine cache engine.<br />PHP extension memcached not loaded.<br /><strong>!!! This class uses the Memcached extension AND NOT the Memcache extension (this one is loaded) !!!</strong>\", 'Cache');\n } else {\n message_die(GENERAL_ERROR, \"Can't initialize $engine cache engine.<br />PHP extension memcached not loaded.\", 'Cache');\n }\n }\n\n //Creates the Memcached object if needed\n if (self::$instance === null) {\n global $Config;\n\n self::$instance = new CacheMemcached();\n self::$instance->memcached = new Memcached();\n self::$instance->memcached->addServer(\n $Config['cache']['server'],\n $Config['cache']['port']\n );\n }\n\n return self::$instance;\n }", "function __construct($dbhost, $dbuser, $dbpassword, $db, $memcachedhost, $memcachedport, $exp = 10){\n\n\t\t# connect to memcached, set cache expiry time\t\n\t\t$this->cache = new Memcached();\n\t\t$this->cache->addServer($memcachedhost, $memcachedport);\n\t\t$this->exp = $exp ;\n\n\t\t# connect to mySQL\n\t\tparent::__construct(\"mysql:host=$dbhost;dbname=$db;charset=utf8\", $dbuser, $dbpassword);\n\n\t}", "protected function init()\n {\n $this->memcache = new MemcacheDB();\n $driverConfig = $this->config->get('cache.memcache');\n $this->memcache->connect(\n $driverConfig['host'],\n $driverConfig['port']\n );\n }", "abstract public function installMemcached();", "function getMemcachedClient(): \\Memcached\n{\n static $client;\n if (!$client) {\n $client = new \\Memcached();\n $client->addServer('memcached', 11211);\n }\n\n return $client;\n}", "function __construct(Memcached $cacher) {\n\t\t$this->cacher = $cacher;\n\t}", "public function init($settings = array()) {\n\t\tif (!class_exists('Memcached')) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!isset($settings['prefix'])) {\n\t\t\t$settings['prefix'] = Inflector::slug(APP_DIR) . '_';\n\t\t}\n\n\t\tif (defined('Memcached::HAVE_MSGPACK') && Memcached::HAVE_MSGPACK) {\n\t\t\t$this->_serializers['msgpack'] = Memcached::SERIALIZER_MSGPACK;\n\t\t}\n\n\t\t$settings += array(\n\t\t\t'engine' => 'Memcached',\n\t\t\t'servers' => array('127.0.0.1'),\n\t\t\t'compress' => false,\n\t\t\t'persistent' => false,\n\t\t\t'login' => null,\n\t\t\t'password' => null,\n\t\t\t'serialize' => 'php',\n\t\t\t'options' => array()\n\t\t);\n\t\tparent::init($settings);\n\n\t\tif (!is_array($this->settings['servers'])) {\n\t\t\t$this->settings['servers'] = array($this->settings['servers']);\n\t\t}\n\n\t\tif (isset($this->_Memcached)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->settings['persistent']) {\n\t\t\t$this->_Memcached = new Memcached();\n\t\t} else {\n\t\t\t$this->_Memcached = new Memcached((string)$this->settings['persistent']);\n\t\t}\n\t\t$this->_setOptions();\n\n\t\tif (count($this->_Memcached->getServerList())) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$servers = array();\n\t\tforeach ($this->settings['servers'] as $server) {\n\t\t\t$servers[] = $this->_parseServerString($server);\n\t\t}\n\n\t\tif (!$this->_Memcached->addServers($servers)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($this->settings['login'] !== null && $this->settings['password'] !== null) {\n\t\t\tif (!method_exists($this->_Memcached, 'setSaslAuthData')) {\n\t\t\t\tthrow new CacheException(\n\t\t\t\t\t__d('cake_dev', 'Memcached extension is not build with SASL support')\n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->_Memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n\t\t\t$this->_Memcached->setSaslAuthData($this->settings['login'], $this->settings['password']);\n\t\t}\n\t\tif (is_array($this->settings['options'])) {\n\t\t\tforeach ($this->settings['options'] as $opt => $value) {\n\t\t\t\t$this->_Memcached->setOption($opt, $value);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function __construct($host = 'localhost', $port = 11211, $timeout = 1)\n\t{\n\t\t//argument test\n\t\t$error = Argument::i()\n\t\t\t//Argument 1 must be a string\n\t\t\t->test(1, 'string')\n\t\t\t//Argument 2 must be an integer\n\t\t\t->test(2, 'int')\n\t\t\t//Argument 3 must be an integer\n\t\t\t->test(3, 'int');\n\t\t\t\n\t\t//if memcache is not a class\n\t\tif(!class_exists('Memcached')) {\n\t\t\t//throw exception\n\t\t\tException::i()->setMessage(Exception::NOT_INSTALLED)->trigger();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$this->memcache = new \\Memcached;\n\t\t} catch(Exception $e) {\n\t\t\t//throw exception\n\t\t\tException::i()->setMessage(Exception::NOT_INSTALLED)->trigger();\n\t\t}\n\t\t\n\t\t$this->memcache->connect($host, $port, $timeout);\n\t\t\n\t\treturn $this;\n\t}", "protected function prepare()\n {\n $this->memcached = new \\Memcached();\n $this->memcached->addServer('127.0.0.1', 11211);\n }", "public function connect()\n {\n $this->connection = new \\Memcached('chopra_sso');\n $serverList = $this->connection->getServerList();\n\n $serverExists = false;\n foreach ($serverList as $server) {\n if ($server['host'] === $this->memcachedHost && $server['port'] === (int)$this->memcachedPort) {\n $serverExists = true;\n }\n }\n\n if (!$serverExists) {\n $this->connection->resetServerList();\n $res = $this->connection->addServer($this->memcachedHost, $this->memcachedPort);\n if (!$res) {\n throw new \\MemcachedException('Can\\'t connect to memcache server.');\n }\n }\n $this->connection->setOption(\\Memcached::OPT_SERIALIZER, \\Memcached::SERIALIZER_PHP);\n }", "public function __construct(){\n parent::__construct();\n\t\t$this->load->library('Memcached_library');\n }", "protected static function connect(): Memcached\n {\n if (empty(self::$conn)\n and isset(self::$params[self::P_SERVERS])\n and self::$conn = new Memcached(__METHOD__ . self::$prefix)\n ) {\n // set options\n $options = self::$params[self::P_OPTIONS] ?? [];\n self::$conn->setOptions($options + [\n Memcached::OPT_PREFIX_KEY => self::$prefix . '.',\n ]);\n // login if needed\n if (isset(self::$params[self::P_LOGIN])) {\n self::$conn->setSaslAuthData(self::$params[self::P_LOGIN], self::$params[self::P_PASS]);\n }\n // connect to servers\n if (empty(self::$conn->getServerList())) {\n self::$conn->addServers(self::$params[self::P_SERVERS]);\n }\n }\n\n return self::$conn;\n }", "public function init()\n {\n parent::init();\n $this->_cache = new \\Memcache;\n $this->_cache->connect();\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public static function load()\n {\n if (!extension_loaded('opencensus')) {\n trigger_error('opencensus extension required to load Memcached integrations.', E_USER_WARNING);\n return;\n }\n\n // bool Memcached::add ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'add', [self::class, 'handleAttributes']);\n\n // bool Memcached::addByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'addByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::append ( string $key , string $value )\n opencensus_trace_method('Memcached', 'append', [self::class, 'handleAttributes']);\n\n // bool Memcached::appendByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'appendByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::cas ( float $cas_token , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'cas', [self::class, 'handleCas']);\n\n // bool Memcached::casByKey ( float $cas_token , string $server_key , string $key , mixed $value\n // [, int $expiration ] )\n opencensus_trace_method('Memcached', 'casByKey', [self::class, 'handleCasByKey']);\n\n // int Memcached::decrement ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrement', [self::class, 'handleAttributes']);\n\n // int Memcached::decrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::delete ( string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'delete', [self::class, 'handleAttributes']);\n\n // bool Memcached::deleteByKey ( string $server_key , string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'deleteByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::flush ([ int $delay = 0 ] )\n opencensus_trace_method('Memcached', 'flush');\n\n // mixed Memcached::get ( string $key [, callable $cache_cb [, int &$flags ]] )\n opencensus_trace_method('Memcached', 'get', [self::class, 'handleAttributes']);\n\n // mixed Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, int $flags ]] )\n opencensus_trace_method('Memcached', 'getByKey', [self::class, 'handleAttributesByKey']);\n\n // mixed Memcached::getMulti ( array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMulti', [self::class, 'handleAttributes']);\n\n // array Memcached::getMultiByKey ( string $server_key , array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMultiByKey', [self::class, 'handleAttributesByKey']);\n\n // int Memcached::increment ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'increment', [self::class, 'handleAttributes']);\n\n // int Memcached::incrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'incrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::prepend ( string $key , string $value )\n opencensus_trace_method('Memcached', 'prepend', [self::class, 'handleAttributes']);\n\n // bool Memcached::prependByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'prependByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::replace ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replace', [self::class, 'handleAttributes']);\n\n // bool Memcached::replaceByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replaceByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::set ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'set', [self::class, 'handleAttributes']);\n\n // bool Memcached::setByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::setMulti ( array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMulti', [self::class, 'handleSetMulti']);\n\n // bool Memcached::setMultiByKey ( string $server_key , array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMultiByKey', [self::class, 'handleSetMultiByKey']);\n }", "public function getInstance()\n {\n if( !isset( $this->memcached ) )\n {\n $this->memcached = new Memcache();\n $this->memcached->connect( Config::read( 'memcached.host' ), Config::read( 'memcached.port' ) );\n }\n\n return $this->memcached;\n }", "public function connect()\n {\n $this->connection = new \\Memcached();\n $result = $this->connection->addServer($this->host, $this->port);\n\n if (!$result) {\n unset($this->connection);\n }\n\n return $result;\n }", "private function _createMemcacheDriver(array $config)\n {\n $defaultServer = array(\n 'host' => 'localhost',\n 'port' => 11211,\n 'persistent' => true,\n 'weight' => 1,\n 'timeout' => 1,\n 'retryInterval' => 15,\n 'status' => true\n );\n\n $memcache = new \\Memcache();\n\n if (isset($config['servers']) === true) {\n foreach ($config['servers'] as $server) {\n $server = array_replace_recursive($defaultServer, $server);\n $memcache->addserver(\n $server['host'],\n $server['port'],\n $server['persistent'],\n $server['weight'],\n $server['timeout'],\n $server['retryInterval'],\n $server['status']\n );\n }\n } else {\n $memcache->addserver(\n $defaultServer['host'],\n $defaultServer['port'],\n $defaultServer['persistent'],\n $defaultServer['weight'],\n $defaultServer['timeout'],\n $defaultServer['retryInterval'],\n $defaultServer['status']\n );\n }\n\n return $memcache;\n }", "public function __construct(array $config)\n {\n // We need the redis extension in order to work further so we check this first\n if (!extension_loaded('redis'))\n {\n throw new Exception('Redis PHP extension not loaded but required to use Redis cache class!');\n }\n\n parent::__construct($config);\n\n // Get Configured Servers\n $servers = Arr::get($this->_config, 'servers', NULL);\n if (empty($servers))\n {\n throw new Exception('No Redis servers defined in configuration. Please define at least one.');\n }\n\n // Now instance the redis server and configure it\n $this->_redis = new \\Redis();\n\n // Global cache prefix so the keys in redis is organized\n $cache_prefix = Arr::get($this->_config, 'cache_prefix', NULL);\n $this->_tag_prefix = Arr::get($this->_config, 'tag_prefix', $this->_tag_prefix). ':';\n\n\n foreach($servers as $server)\n {\n // Determine Connection method and connect\n $method = Arr::get($server, 'persistent', FALSE) ? 'pconnect': 'connect';\n $this->_redis->{$method}($server['host'], $server['port'], 1);\n\n // See if there is a password\n $password = Arr::get($server, 'password', NULL);\n if (!empty($password))\n {\n $this->_redis->auth($password);\n }\n\n // Prefix a name space\n $prefix = Arr::get($server, 'prefix', NULL);\n if (!empty($prefix))\n {\n if (!empty($cache_prefix))\n {\n $prefix .= ':'.$cache_prefix;\n }\n\n $prefix .= ':';\n $this->_redis->setOption(\\Redis::OPT_PREFIX, $prefix);\n }\n }\n\n // Tell redis to serialize using php serializer\n $this->_redis->setOption(\\Redis::OPT_SERIALIZER, \\Redis::SERIALIZER_PHP);\n\n }", "public function mc($key)\n {\n $block = 'mc';\n if (empty(self::$_instance[$block][$key]) || !(self::$_instance[$block][$key] instanceof clsMemcached)) {\n $mc = new clsMemcached();\n $mcInfo = clsConfig::mcInfo($key);\n $mc->addServers($mcInfo);\n self::$_instance[$block][$key] = $mc;\n }\n return self::$_instance[$block][$key];\n }", "function __construct(Cache $cache) {\n// $client = RedisAdapter::createConnection('redis://localhost');\n// $this->cache = new RedisTagAwareAdapter($client);\n $this->cache = $cache->getCache();\n\n }", "public function __construct(Memcache $memcache, $prefix = '')\n {\n $this->memcache = $memcache;\n $this->prefix = strlen($prefix) > 0 ? $prefix.':' : '';\n }", "protected function __construct($server = null, $port = null, $password = null)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Load configuration\n\t\t\t$server = $server ? $server : XLII_Cache_Manager::option('engine.redis.server');\n\t\t\t$port = $port ? $port : XLII_Cache_Manager::option('engine.redis.port');\n\t\t\t$password = $password ? $password : XLII_Cache_Manager::option('engine.redis.password');\n\t\t\t\n\t\t\tif(!$server)\n\t\t\t\tthrow new Exception('No server specified');\n\t\t\t\n\t\t\t// Use C# PHP Redis module\n\t\t\tif(class_exists('Redis'))\n\t\t\t{\n\t\t\t\t$this->_redis = new Redis();\n\t\t\t\t$this->_meta = array(\n\t\t\t\t\t'scope' => null\n\t\t\t\t);\n\t\t\t\n\t\t\t\t// Connect with redis\n\t\t\t\t@$this->_redis->connect($server, $port, self::CONNECTION_TIMEOUT);\n\t\t\t\t$this->_redis->auth($password);\n\t\t\t\t$this->_redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP); \n\t\t\t}\n\t\t\t\n\t\t\t// Fallback on credis library\n\t\t\telse\n\t\t\t{\n\t\t\t\trequire_once CACHE_PLUGIN_DIR . '/lib/credis.php';\n\t\t\t\t\n\t\t\t\t$this->_redis = new Credis_Client($server, $port, self::CONNECTION_TIMEOUT);\n\t\t\t\t\n\t\t\t\tif($password)\n\t\t\t\t\t$this->_redis->auth($password);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Change scope / domain\n\t\t\t$this->setScope('site');\t\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$this->_redis = null;\n\t\t}\n\t}", "protected function createMemcachedDriver(array $config)\n\t{\n\t\t$servers = $this->royalcms['config']['cache.memcached'];\n\n\t\t$memcached = $this->royalcms['memcached.connector']->connect($servers);\n\n\t\treturn $this->repository(new MemcachedStore($memcached, $this->getPrefix()));\n\t}", "protected static function connect(array $servers, $memcache = null)\n {\n if (!$memcache) {\n $memcache = new \\Memcached();\n }\n\n foreach ($servers as $server) {\n $memcache->addServer($server['host'], $server['port'], $server['weight']);\n }\n\n if ($memcache->getVersion() === false) {\n throw new \\RuntimeException('could not establish memcached connection!');\n }\n\n return $memcache;\n }", "public function memcached()\n {\n return $this->memcached;\n }", "public static function autoInit()\n {\n if (self::$instance !== null)\n {\n return;\n }\n // since some servers may have either Memcached or Memcache extension installed, we need to check it\n if(class_exists('Memcache', false)) {\n $extension = 'Memcache';\n } elseif(class_exists('Memcached', false)) {\n $extension = 'Memcached';\n } else {\n throw new Exception('Neither Memcache nor Memcached extensions aren\\'t installed.');\n }\n \n self::$instance = new $extension();\n self::$instance->addServer('127.0.0.1', 11211);\n\n }", "private function getCacheServer()\n {\n /**\n * The configuration options are encapsulated in a class called RedisOptions\n * Here we setup the server configuration using the values from our config file\n */\n $redis_options = new RedisOptions();\n $redis_options->setServer(array(\n 'host' => self::$__endpoint,\n 'port' => self::$__port,\n 'timeout' => self::$__timeout\n ));\n // /**\n // * This is not required, although it will allow to store anything that can be serialized by PHP in Redis\n // */\n // $redis_options->setLibOptions ( array (\n // Redis::OPT_SERIALIZER => Redis::SERIALIZER_PHP\n // ) );\n \n /**\n * We create the cache passing the RedisOptions instance we just created\n */\n $redis_cache = new Redis($redis_options);\n \n return $redis_cache;\n }", "public function __construct($name, Memcached $memcache, $timeout = 3)\n {\n parent::__construct($name, $timeout);\n \n $this->memcache = $memcache;\n }", "public function __construct() {\n\n\t\t// Server config\n\t\t$redis_server = array( 'host' => '127.0.0.1', 'port' => 6379 );\n\n\t\t$this->redis = new Redis();\n\t\t$this->redis->connect( $redis_server['host'], $redis_server['port'], 1, NULL, 100 ); # 1s timeout, 100ms delay between reconnections\n\t\tif ( ! empty( $redis_server['auth'] ) ) {\n\t\t\t$this->redis->auth( $redis_server['auth'] );\n\t\t}\n\n\t\t/**\n\t\t * @todo This should be moved to the PHP4 style constructor, PHP5\n\t\t * already calls __destruct()\n\t\t */\n\t\tregister_shutdown_function( array( $this, '__destruct' ) );\n\t}", "public function __construct ( \\Memcache $cache )\r\n\t{\r\n\t\t$this->_cache = $cache;\r\n\t\t\r\n\t\t// Official memcached suggestion for namespaces\r\n\t\t$this->_ns = intval ( $this->_cache->get ( self::CACHE_PREFIX . '_NAMESPACE' ) );\r\n\t\tif ( !$this->_ns )\r\n\t\t{\r\n\t\t\t$this->_ns = 1;\r\n\t\t\t$this->_cache->set ( self::CACHE_PREFIX . '_NAMESPACE', 1, false, 0 );\r\n\t\t}\r\n\t\t\r\n\t\t$this->_nss = intval ( $this->_cache->get ( self::CACHE_PREFIX . '_NAMESPACE_STICKY' ) );\r\n\t\tif ( !$this->_nss )\r\n\t\t{\r\n\t\t\t$this->_nss = 1;\r\n\t\t\t$this->_cache->set ( self::CACHE_PREFIX . '_NAMESPACE_STICKY', 1, false, 0 );\r\n\t\t}\r\n\t}", "protected function connect()\n {\n $res = $this->memc->connect(MEMCACHE_HOST, 11211);\n $this->namespace = MEMCACHE_NAMESPACE;\n if (MEMCACHE_DEBUG) {\n if ($res) {\n Logger::write('Memcache::connect(): connected');\n } else {\n Logger::write('Memcache::connect(): connect FAILED!');\n }\n }\n }", "protected function createMemcachedInstance($connectionId)\n {\n return empty($connectionId) ? new Memcached : new Memcached($connectionId);\n }", "protected function createMemcachedInstance($connectionId)\n {\n return empty($connectionId) ? new Memcached : new Memcached($connectionId);\n }", "public function __construct()\n {\n $this->init_config();//init cache config set the driver and path/key;\n if($this->driver==\"redis\") {\n $this->redis = new \\Redis();\n $this->redis->connect(\"127.0.0.1\", 6379);\n }\n if($this->driver==\"file\"){\n $this->file=new file();\n $this->path=dirname(dirname(dirname(__FILE__))).\"/$this->path/\";//set file store path\n }\n }", "public function __construct($host='127.0.0.1', $port=6379, $db=0) \n {\n $this->host = $host;\n $this->port = $port;\n $this->db = $db;\n }", "public function __construct(Cache $config)\n {\n $this->prefix = $config->prefix;\n\n if (isset($config->redis)) {\n $this->config = array_merge($this->config, $config->redis);\n }\n }", "public function __construct( $options = array() )\n {\n $this->properties['ttl'] = 86400;\n $this->properties['extension'] = '.cache';\n parent::__construct( $options );\n }", "protected function setUp()\n\t{\n\t\t$Memcached = new \\Memcached;\n\t\t$Memcached->addServer('localhost', 11211);\n\n\t\t$this->key = 'cachewTests_';\n\t\t$this->object = new Memcached($this->key, __DIR__);\n\t}", "public function getDefaultMemcachedDriver()\n {\n $driver = $this->driver->server;\n $this->assertInstanceOf('Memcached', $driver);\n }", "protected function connect($config) {\n\t\t// set the Memcache plugin\n\t\t$this->_memcached = new Memcached;\n\n\t\t$this->_memcached->addServer($config['host'], $config['port'])\n\t\t\tor die('Could not connect to server');\n\n\t\t$this->_isConnected = true;\n\t}", "public function connect(array $servers, $connectionId = null, array $options = [], array $credentials = [])\n {\n $memcached = $this->getMemcached($connectionId, $credentials, $options);\n\n if ( ! $memcached->getServerList()) {\n foreach ($servers as $server) {\n $memcached->addServer(\n $server['host'],\n $server['port'],\n $server['weight']\n );\n }\n }\n\n if (false === $memcached->getVersion()) {\n throw new LenevorException('Could not establish Memcached connection');\n }\n\n return $memcached;\n }", "public function connect(\n array $servers,\n $connectionId = null,\n array $options = [],\n array $credentials = []\n ) {\n $memcached = $this->getMemcached($connectionId, $credentials, []);\n\n foreach ($servers as $server) {\n $memcached->addServer(\n $server['host'], intval($server['port']), $server['weight']\n );\n }\n\n return $memcached;\n }", "function __construct($config = null) \n\t{\n\t\t// No custom configuration passed? Use default.\n\t\tif(empty($config))\n\t\t\tglobal $config;\n\n\t\t$this->apcu = new Cache\\APCu();\n\t\t$this->redis = new Cache\\Redis();\n\t}", "public function __construct()\n\t{\n\t\t$this->cache_ttl = intval(ee()->TMPL->fetch_param('ttl'));\n\t\t// For speed and API purposes, limit the cache to 30sec minimum\n\t\tif ($this->cache_ttl < 30)\n\t\t{\n\t\t\t$this->cache_ttl = 30;\n\t\t}\n\t}", "public function __construct ($options)\r\n {\r\n \t//echo get_class($options);exit;\r\n \tif (get_class($options) == 'Zend_Cache_Core'){\r\n \t\t$this->cache = $options;\r\n \t} else {\r\n\t if ($options instanceof Zend_Config) {\r\n\t $options = $options->toArray();\r\n\t }\r\n\t if (! is_array($options)) {\r\n\t throw new Exception('Invalid cache options; must be array or Zend_Config object');\r\n\t }\r\n\t if (array('frontend' , 'backend' , 'frontendOptions' , 'backendOptions') != array_keys($options)) {\r\n\t throw new Exception('Invalid cache options provided');\r\n\t }\r\n\t $options['frontendOptions']['automatic_serialization'] = true;\r\n\t $this->cache = Zend_Cache::factory($options['frontend'], $options['backend'], $options['frontendOptions'], $options['backendOptions']);\r\n \t}\r\n }", "private function __construct() {\n $this->config = array(\n // These will all need to be changed to point at your mysql server.\n \"Database\" => array(\n \"Host\" => \"localhost\",\n \"Name\" => \"daeman\",\n \"Username\" => \"daeman\",\n \"Password\" => \"<password>\",\n ),\n );\n }", "protected function _initCache() {\n\t\t$options = $this->getOptions();\n\t\tswitch($options['cache']) {\n\t\t\tcase 'apc':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ApcCache();\n\t\t\tbreak;\n\n\t\t\tcase 'memcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\MemcacheCache();\n\t\t\tbreak;\n\n\t\t\tcase 'xcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\XcacheCache();\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\t\t}\n\n// \t\t$this->_config->setMetadataCacheImpl($cache);\n// \t\t$this->_config->setQueryCacheImpl($cache);\n\t}", "public function __construct()\r\n {\r\n //设置中国时区\r\n date_default_timezone_set('PRC');\r\n $this->hostList = ['163.com'];\r\n $this->proxyLog = '/4T/www/huangj/proxyLog';\r\n\r\n $this->redis = new \\Redis();\r\n $this->redis->connect('127.0.0.1', 6379); //连接Redis\r\n $this->redis->auth('dw5w@%wZx'); //密码验证\r\n $this->redis->select(0);//选择数据库2\r\n }", "public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}", "public function __construct()\n {\n\n $_config = array(\n 'host' => 'localhost',\n 'username' => 'root',\n 'password' => '',\n 'db' => '',\n 'memcached' => false,\n 'mc_host' => 'localhost'\n );\n\n /**\n * set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n * \"objects\", which means all results will be objects, like this: $result->user_name !\n * For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n * @see http://www.php.net/manual/en/pdostatement.fetch.php\n */\n\n $this->db_name = $_config['db'];\n\n $options = array(\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING // ERRMODE_EXCEPTION\n );\n\n /**\n * Generate a database connection, using the PDO connector\n * \"Adding the charset to the DSN is very important for security reasons,\n * most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!\"\n */\n try{\n parent::__construct(\n 'mysql:host=' . $_config['host'] . ';dbname=' . $_config['db'] . ';charset=utf8',\n $_config['username'], $_config['password'],\n $options\n );\n\n } catch (Exception $e){\n\n header('HTTP/1.1 503 Service Temporarily Unavailable');\n header('Status: 503 Service Temporarily Unavailable');\n $output = self::fatalErrorPageContent();\n $output = str_ireplace(\n '{DESCRIPTION}',\n '<p>This application is currently experiencing some database difficulties</p>',\n $output\n );\n $output = str_ireplace(\n '{CODE}',\n '<b>Description:</b> '.$e->getMessage().'<br>\n <b>File:</b> '.$e->getFile().'<br>\n <b>Line:</b> '.$e->getLine(),\n $output\n );\n\n echo $output;\n\n exit(1);\n\n }\n if(isset($_config['memcached']) && $_config['memcached']){\n $this->mc = new Memcached();\n $this->mc->addServer('localhost', 11211) or die('Could not connect to server' .$_config['mc_host']);\n }\n }", "public function __construct()\n {\n $this->ci =& get_instance();\n\n $this->redis = new Redis();\n\n $this->redis_ip = $this->ci->config->item('redis_ip');\n $this->redis_port = $this->ci->config->item('redis_port');\n $this->redis_ttl = $this->ci->config->item('redis_ttl');\n\n $this->redis->connect($this->redis_ip, $this->redis_port, $this->redis_ttl);\n }", "public function _connect()\n {\n if (!defined('CLEAR_CACHE'))\n if (defined('CAT_DISABLE_CACHE')\n || !is_array($this->servers)\n || 0 == count($this->servers)\n )\n {\n return false;\n }\n\n $this->_Memcache = new Memcache();\n // several servers - use addServer\n foreach ($this->servers as $server)\n {\n $parts = explode(':', $server);\n\n $host = $parts[0];\n $port = isset($parts[1]) ? $parts[1] : 11211; // default port\n\n if ($this->_Memcache->addServer($host, $port))\n {\n $this->_connected = true;\n }\n }\n\n return $this->_connected;\n }", "public function installMemcached()\n {\n $this->span(\"Option not supported for this Linux distribution and version.\", 'error');\n }", "protected function getMemcached($connectionId, array $credentials, array $options)\n {\n $memcached = $this->createMemcachedInstance($connectionId);\n\n if (count($credentials) === 2) {\n $this->setCredentials($memcached, $credentials);\n }\n\n if (count($options)) {\n $memcached->setOptions($options);\n }\n\n return $memcached;\n }", "protected function getMemcached($connectionId, array $credentials, array $options)\n {\n $memcached = $this->createMemcachedInstance($connectionId);\n\n if (count($credentials) === 2) {\n $this->setCredentials($memcached, $credentials);\n }\n\n if (count($options)) {\n $memcached->setOptions($options);\n }\n\n return $memcached;\n }", "function __construct()\n {\n try \n { \n \n $this->database = new Predis\\Client( [ \n \"scheme\" => \"tcp\", \n \"host\" => \"localhost\", \n \"port\" => 6379] );\n \n }\n catch (Exception $e)\n { \n error_log('error with Redis '. $e->getMessage() ); \n exit; \n \n } \n }", "private function __construct()\n {\n $this->cache = new \\Redis();\n if ($this->cache->connect('redis')) {\n echo 'Connected to Redis' . PHP_EOL;\n $this->cache->delete(self::CLIENTS_KEY);\n }\n }", "public function connect(array $servers, $connectionId = null, array $options = [], array $credentials = [])\n {\n $memcached = $this->getMemcached(\n $connectionId, $credentials, $options\n );\n\n if (! $memcached->getServerList()) {\n // For each server in the array, we'll just extract the configuration and add\n // the server to the Memcached connection. Once we have added all of these\n // servers we'll verify the connection is successful and return it back.\n foreach ($servers as $server) {\n $memcached->addServer(\n $server['host'], $server['port'], $server['weight']\n );\n }\n }\n\n return $memcached;\n }", "public function __construct(Array $options = array())\n {\n $this->setCacheOptions($options);\n }", "protected function createMemcachedDriver(): StoreContract\n {\n return $this->createCacheBased('memcached');\n }", "public function __construct()\n {\n $this->initContrexxCaching();\n $this->initOPCaching();\n $this->initUserCaching();\n $this->getActivatedCacheEngines();\n }", "public function __construct($host, $port);", "public function __construct( $config_instance ){\n \n\t$config_instance->host = (array) $config_instance->host;\n\t\n foreach($config_instance->host as $host)\n\t $this->addServer($host, $this->port);\n\t\n\t/**\n\t * EN: If you need compression Threshold, you can uncomment this\n\t */\n\t//$this->setCompressThreshold(20000, 0.2);\n }", "public function getMemcache()\n {\n return $this->memcache;\n }", "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "public function setOptions($options)\n {\n if (!$options instanceof MemcacheOptions) {\n $options = new MemcacheOptions($options);\n }\n\n return parent::setOptions($options);\n }", "public function __construct(Config $config, CacheInterface $cache)\n {\n $this->config = $config;\n $this->cache = $cache;\n }", "public function __construct()\n {\n $this->_aServersData = (array) oxRegistry::getConfig()->getConfigParam('aServersData');\n }", "public function annotationsAdapterMemcachedConstruct(UnitTester $I)\n {\n $I->wantToTest('Annotations\\Adapter\\Redis - __construct()');\n\n $adapter = new Redis([]);\n\n $I->assertInstanceOf(AdapterInterface::class, $adapter);\n }", "public function __construct()\n {\n include __DIR__ . '/config/config.php';\n if (isset($config['redis_password']) && !$config['redis_password'] == '') {\n Resque::setBackend('redis://redis:' . $config['redis_password'] . '@' . $config['redis_host']);\n }\n if (isset($config['test_url'])) {\n $this->test_url = $config['test_url'];\n }\n }", "public function __construct()\n\t{\n\t\tif( !$this->redis ) $this->redis = Redis::connection();\n\t}", "public function __construct($defaultTimeToLive = CacheInterface::MAX_TTL)\n {\n $this->setDefaultTTL($defaultTimeToLive);\n $this->cache = [];\n }", "private function __construct()\r\r\n\t{\t\t\r\r\n\t\t$class_name = sprintf(CPF_CACHE_STORAGE_CLASS_FORMAT, Cpf_Core_Config::get_instance()->value('CACHE.STORAGE'));\t\t\r\r\n\t\t$this->_storage = new $class_name();\r\r\n\t}", "public function __construct()\n {\n $this->driver = \\App::make(\\App::config('cache.driver')); \n }", "function action_azure_redis_to_memcached ($new_config) {\n // print_r($new_config);\n $saved_config = include W3TC_CONFIG_DIR .'/master.php';\n if($saved_config['dbcache.engine']=='memcached')\n $saved_config['dbcache.memcached.servers'] = array(\"%IP_MEMCACHESHIM_PORT%\");\n if ($saved_config['pgcache.engine']=='memcached')\n $saved_config['pgcache.memcached.servers'] = array(\"%IP_MEMCACHESHIM_PORT%\");\n if ($saved_config['minify.engine']=='memcached')\n $saved_config['minify.memcached.servers'] = array(\"%IP_MEMCACHESHIM_PORT%\");\n if($saved_config['fragmentcache.engine']=='memcached')\n $saved_config['fragmentcache.memcached.servers'] = array(\"%IP_MEMCACHESHIM_PORT%\");\n if ($saved_config['objectcache.engine']=='memcached')\n $saved_config['objectcache.memcached.servers'] = array(\"%IP_MEMCACHESHIM_PORT%\");\n $saved_config = var_export($saved_config, TRUE);\n $saved_config = str_replace(\"'%IP_MEMCACHESHIM_PORT%'\", \"'127.0.0.1:' . getenv(\\\"MEMCACHESHIM_PORT\\\")\", $saved_config);\n $newfile = fopen(W3TC_CONFIG_DIR .\"/master.php\", \"w+\");\n fwrite($newfile,\"<?php\\n\\nreturn \");\n fwrite($newfile,$saved_config);\n fwrite($newfile,';');\n fclose($newfile);\n}", "public function constructor($options) {\n $this->_redis = new Redis($options->databaseConfig->redis);\n }", "public function __construct( $expiration = 3600 , array $servers )\n {\n $this->expiration = $expiration;\n\n foreach ($servers as $server)\n {\n $this->addserver( $server['host'] , $server['port']);\n }\n }", "public function __construct($config){\n parent::__construct(\"http://minicasts.podomatic.com/play\",\"\");\n }", "function getMemcacheObject () : ?Memcache {\n\t$mem = new Memcache();\n\tif($mem->connect('localhost')) return $mem;\n\n\treturn null;\n}", "public function __construct()\n {\n if (file_exists('bm-config.php')) {\n require_once('bm-config.php');\n } else if (file_exists('../bm-config.php')) {\n require_once('../bm-config.php');\n } else {\n $settings = array();\n }\n\n $defaults = array(\n 'cookie_name' => 'bm',\n 'debug' => false,\n 'use_wp_login' => false,\n 'session_duration' => 43200,// 12 hours\n 'log_directory' => '.',\n 'log_level' => 4,\n );\n $this->settings = array_merge($defaults, $settings);\n }" ]
[ "0.76066124", "0.7481707", "0.73881114", "0.72546834", "0.71594465", "0.6974043", "0.68793637", "0.6800693", "0.6755339", "0.6690749", "0.66044253", "0.6602064", "0.65051615", "0.64911413", "0.64596003", "0.6456763", "0.64005554", "0.63803977", "0.6373554", "0.6355627", "0.63500506", "0.63310874", "0.6330051", "0.6270804", "0.6261069", "0.6243652", "0.6196735", "0.6188752", "0.61358273", "0.6125483", "0.609226", "0.6082093", "0.60524684", "0.5991111", "0.59890145", "0.59167033", "0.5914888", "0.5805276", "0.577286", "0.5743818", "0.5742236", "0.5681626", "0.56759346", "0.56753856", "0.56479955", "0.5624012", "0.5618776", "0.55727303", "0.55700445", "0.55425036", "0.55346996", "0.55340886", "0.55340886", "0.55261475", "0.5522433", "0.5516573", "0.55107236", "0.55081964", "0.5506233", "0.54967374", "0.5489112", "0.5439381", "0.54354244", "0.54265267", "0.5423257", "0.5416371", "0.5409034", "0.5398252", "0.53974617", "0.5360562", "0.53599524", "0.535755", "0.532398", "0.53224665", "0.53224665", "0.53146607", "0.5295695", "0.52915883", "0.5280325", "0.52708226", "0.5260186", "0.52488935", "0.5236587", "0.5218944", "0.5208887", "0.520132", "0.51982766", "0.51952046", "0.51882553", "0.5178244", "0.5177209", "0.51741564", "0.51615196", "0.5145719", "0.51454467", "0.5145419", "0.51450616", "0.5141044", "0.5137539", "0.5129288" ]
0.8377457
0
Add Server Add a server to the server pool
function addServer($host, $port, $weight=0) { return $this->memcached->addServer($host, $port, $weight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addServer($host, $port, $weight = 0) {}", "public function add(PriorityServer $server)\n\t{\n\t\t$this->server_list->append($server);\n\t}", "protected function addServer(Server $server)\n\t{\n\t\t// Check if there is a URI clash\n\t\t/* @var $existingServer Server */\n\t\tforeach ($this->servers as $existingServer)\n\t\t{\n\t\t\tif ($server->getServerUri() === $existingServer->getServerUri())\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\"Clashing server URIs detected\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($server->getServerPidPath() === $existingServer->getServerPidPath())\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\"Clashing server PID paths detected\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->servers[] = $server;\n\t}", "function addServerURL($serverURL) {\n\t\tif ($this->m_serverURLs === null) {\n\t\t\t$this->m_serverURLs = array();\n\t\t}\n\n\t\tif (func_num_args() === 2) {\n\t\t\t$timeout = func_get_arg(1);\n\t\t\t$serverURL = new ServerURL($serverURL, $timeout);\n\t\t}\n\n\t\t$this->m_serverURLs[] = $serverURL;\n\t}", "public function addServer () {\n return view ('server/add');\n }", "public function testAddServerEx() {\n\t\t$this->getAdapter()->addServerEx('127.0.0.2');\n\t\t$this->assertTrue(true);\n\t}", "public static function addServer($server, $port = null)\n\t\t{\n\t\t\tif ($port == null)\n\t\t\t\t$port = self::$port;\n\n\t\t\tself::getCache()->addserver($server, $port);\n\t\t}", "function addServers(Array $servers) {\n\t\t\n\t\t/* go through each server */\n\t\tforeach ($servers as $server) {\n\t\t\t\n\t\t\t/* skip if address is missing */\n\t\t\tif (!isset($server[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* add this server */\n\t\t\t$this->addServer($server[0], isset($server[1]) ? $server[1] : self::DEFAULT_PORT_SERVER, isset($server[2]) ? $server[2] : self::DEFAULT_VERSION);\n\t\t}\n\t}", "public function addServer($url) {\n\t\t$url = $this->updateProtocol($url);\n\t\t$result = $this->dbHandler->addServer($url);\n\t\tif ($result) {\n\t\t\t$token = $this->secureRandom->generate(16);\n\t\t\t$this->dbHandler->addToken($url, $token);\n\t\t\t$this->jobList->add(\n\t\t\t\t'OCA\\Federation\\BackgroundJob\\RequestSharedSecret',\n\t\t\t\t[\n\t\t\t\t\t'url' => $url,\n\t\t\t\t\t'token' => $token\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\treturn $result;\n\t}", "function addServers($servers) {\n return $this->memcached->addServers();\n }", "function process_add_server()\n{\n // Verify we have all the required info (based on LDAP or AD)\n $error = \"\";\n $enabled = grab_request_var(\"enabled\", \"\");\n if (!empty($enabled)) { $enabled = 1; }\n\n $conn_method = grab_request_var(\"conn_method\", \"\");\n $base_dn = grab_request_var(\"base_dn\", \"\");\n $security_level = grab_request_var(\"security_level\", \"none\");\n\n // AD Only\n $account_suffix = grab_request_var(\"account_suffix\", \"\");\n $domain_controllers = grab_request_var(\"domain_controllers\", \"\");\n\n // LDAP Only\n $ldap_host = grab_request_var(\"ldap_host\", \"\");\n $ldap_port = grab_request_var(\"ldap_port\", \"\");\n\n if ($conn_method == \"ad\") {\n\n // Verify AD sections required\n if (empty($account_suffix) || empty($base_dn) || empty($domain_controllers) || empty($security_level)) {\n $error = _(\"You must fill out all the Active Directory server information.\");\n }\n\n } else if ($conn_method == \"ldap\") {\n\n // Verify LDAP sections required\n if (empty($ldap_host) || empty($ldap_port) || empty($base_dn) || empty($security_level)) {\n $error = _(\"You must fill out all the LDAP server information.\");\n }\n\n } else {\n // Not a recognized connection method...\n $error = _(\"Unknown connection method specified.\");\n }\n\n // Quit if error exists\n if (!empty($error)) {\n display_page(true, $error);\n exit;\n }\n\n $server = array(\"id\" => uniqid(),\n \"enabled\" => $enabled,\n \"conn_method\" => $conn_method,\n \"ad_account_suffix\" => $account_suffix,\n \"ad_domain_controllers\" => $domain_controllers,\n \"base_dn\" => $base_dn,\n \"security_level\" => $security_level,\n \"ldap_port\" => $ldap_port,\n \"ldap_host\" => $ldap_host);\n\n // Add server\n auth_server_add($server);\n\n // Success... display normal page\n display_page();\n}", "public function addServer($host, $port = 8888, $weight = 0, $type = self::TYPE_SLAVE)\n {\n $new = array(\n 'host' => $host,\n 'port' => $port,\n 'weight' => $weight,\n 'type' => $type,\n );\n\n foreach ($this->servers as $server) {\n $diff = array_diff($new, $server);\n if (empty($diff)) {\n // Done -- server is already present\n return $this;\n }\n }\n\n $this->servers[] = $new;\n return $this;\n }", "private function addServerToListOfRemotes(\n int $serverId,\n string $serverIP,\n string $centreonPath,\n string $httpMethod,\n string $httpPort,\n bool $noCheckCertificate,\n bool $noProxy\n ): void {\n $currentDate = date('Y-m-d H:i:s');\n\n $statement = $this->pearDB->prepare('SELECT 1 FROM `remote_servers` WHERE `server_id` = :server_id');\n $statement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $statement->execute();\n $remoteAlreadyExists = (bool) $statement->rowCount();\n\n if ($remoteAlreadyExists) {\n $updateStatement = $this->pearDB->prepare(\n 'UPDATE `remote_servers` SET\n `is_connected` = 1, `connected_at` = :connected_at, `centreon_path` = :centreon_path,\n `no_check_certificate` = :no_check_certificate, `no_proxy` = :no_proxy, `ip_address` = :ip_address\n WHERE `server_id` = :server_id'\n );\n $updateStatement->bindValue(':connected_at', $currentDate, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':centreon_path', $centreonPath, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':no_check_certificate', $noCheckCertificate ? '1' : '0', \\PDO::PARAM_STR);\n $updateStatement->bindValue(':no_proxy', $noProxy ? '1' : '0', \\PDO::PARAM_STR);\n $updateStatement->bindValue(':ip_address', $serverIP, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $updateStatement->execute();\n } else {\n $insertStatement = $this->pearDB->prepare(\n 'INSERT INTO `remote_servers`\n (`ip`, `version`, `is_connected`, `created_at`, `connected_at`, `centreon_path`,\n `http_method`, `http_port`, `no_check_certificate`, `no_proxy`, `server_id`)\n VALUES\n (:ip_address, \"\", 1, :created_at, :connected_at, :centreon_path, :http_method, :http_port,\n :no_check_certificate, :no_proxy, :server_id)'\n );\n $insertStatement->bindValue(':ip_address', $serverIP, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':created_at', $currentDate, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':connected_at', $currentDate, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':centreon_path', $centreonPath, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':http_method', $httpMethod, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':http_port', $httpPort ?: null, \\PDO::PARAM_INT);\n $insertStatement->bindValue(':no_check_certificate', $noCheckCertificate ? '1' : '0', \\PDO::PARAM_STR);\n $insertStatement->bindValue(':no_proxy', $noProxy ? '1' : '0', \\PDO::PARAM_STR);\n $insertStatement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $insertStatement->execute();\n }\n }", "public function add(ServerObjectInterface $serverObject, string $index): void;", "protected function bindSwooleServer()\n {\n $this->app->singleton('swoole.server', function () {\n return $this->server;\n });\n }", "private function addServer($retry=0) {\n\t\ttry {\n \t$this->gearman->addServer(GEARMAN_HOST, GEARMAN_PORT);\n\t\t} catch(GearmanException $e) {\n\t\t\t$retry++;\n\t\t\tif ($retry > self::MAX_RETRY) {\n\t\t\t\t$log = \"Maximum retry times of '\".self::MAX_RETRY.\"' reached, exit the retry process!\";\n\t\t\t\t$this->do_log('auth_code', $log);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tsleep(6);\n\t\t\t$log = \"Could not add the service server, retry \".$retry;\n\t\t\t$this->do_log('auth_code', $log);\n\t\t\treturn $this->addServer($retry);\n\t\t}\n\t\treturn true;\n\t}", "protected function registerServers()\n {\n $this->container['server.lighttpd'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Lighttpd($c['dispatcher']);\n });\n\n $this->container['server.nginx'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Nginx($c['dispatcher']);\n });\n }", "function addMasterserver($address, $port = self::DEFAULT_PORT_MASTER) {\n\t\t\n\t\t/* cast to right types */\n\t\t$address = (string)$address;\n\t\t$port = (int)$port;\n\t\t\n\t\t/* if address is invalid abort */\n\t\tif (empty($address)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* if port is invalid set to default port */\n\t\tif ($port < 0 || $port > 65535) {\n\t\t\t$port = self::DEFAULT_PORT_MASTER;\n\t\t}\n\t\t\n\t\t/* add if not a duplicate */\n\t\t$server = array($address, $port);\n\t\tif (!in_array($server, $this->masterservers, true)) {\n\t\t\t$this->masterservers[] = $server;\n\t\t}\n\t}", "abstract protected function setupServers();", "public function doAdd() {\r\n\t\t$this->server = \"127.0.0.1\";\r\n\t\t$this->port = 27017;\r\n\t\t$this->name = \"\";\r\n\t\t$this->max_size = \"\";\r\n\t\t$this->replica_name = \"\";\r\n\t\t\r\n\t\tif ($this->isPost()) {\r\n\t\t\t$this->server = x(\"server\");\r\n\t\t\t$this->port = xi(\"port\");\r\n\t\t\t$this->name = x(\"name\");\r\n\t\t\t$this->max_size = doubleval(x(\"max_size\"));\r\n\t\t\t$this->replica_name = trim(xn(\"replica_name\"));\r\n\t\t\t\r\n\t\t\t$server = $this->server;\r\n\t\t\tif ($this->port > 0) {\r\n\t\t\t\t$server .= \":\" . $this->port;\r\n\t\t\t}\r\n\t\t\tif ($this->replica_name != \"\") {\r\n\t\t\t\t$server = $this->replica_name . \"/\" . $server;\r\n\t\t\t}\r\n\t\t\t$command = array(\r\n\t\t\t\t\"addshard\" => $server\r\n\t\t\t);\r\n\t\t\tif ($this->name) {\r\n\t\t\t\t$command[\"name\"] = $this->name;\r\n\t\t\t}\r\n\t\t\tif ($this->max_size > 0) {\r\n\t\t\t\t$command[\"maxSize\"] = $this->max_size;\r\n\t\t\t}\r\n\r\n\t\t\t//run command\r\n\t\t\t$this->ret = $this->_highlight($this->_mongo->selectDB(\"admin\")\r\n\t\t\t\t->command($command), \"json\");\r\n\t\t}\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "function addLatestServer($remote_ip, $service_port, $serverTitle, $connectedClients, $networkSlots )\n\t{\n\t\t$server = \"$remote_ip:$service_port\";\n\t\t$players = \"$connectedClients/$networkSlots\";\n\t\tmysqli_query( Registry::$mysqliLink, \"INSERT INTO recent_servers (name, server, players) VALUES('$serverTitle', '$server', '$players')\");\n\n\t\t// make sure there are not too much servers\n\t\t$count_query = mysqli_fetch_assoc(mysqli_query( Registry::$mysqliLink, \"SELECT COUNT(*) as count FROM recent_servers\"));\n\t\t$count = (int) $count_query['count'];\n\t\t$over = $count - MAX_RECENT_SERVERS;\n\t\tmysqli_query( Registry::$mysqliLink, \"DELETE FROM recent_servers ORDER BY id LIMIT $over\");\n\t}", "public function add($sName, $mServers) {\n if(!is_array($mServers)) {\n $mServers = [$mServers];\n }\n\n $this->m_aNetworkInfo [$sName] = ['Servers' => []];\n\n foreach($mServers as $sServerInfo) {\n if(strpos($sServerInfo, ':') === false) {\n $sServerInfo .= ':6667';\n } // Default port\n\n list ($sAddress, $nPort) = explode(':', $sServerInfo);\n $this->m_aNetworkInfo [$sName] ['Servers'] [] = [\n 'IP' => gethostbyname($sAddress),\n 'Port' => $nPort,\n 'Count' => 0\n ];\n }\n\n $this->m_aNetworkInfo [$sName] ['Count'] = 0;\n }", "public function addServer($target, $alias = null)\n {\n if (is_array($target)) {\n foreach ($target as $key => $server) {\n $this->_addServer($server, $key);\n }\n } else {\n $this->_addServer($target, $alias);\n }\n }", "protected function setupServers()\n\t{\n\t\t$docRoot = realpath(__DIR__ . '/..') . '/web';\n $serverPort = self::choosePort(\n self::URL_SERVER_PORT_MIN,\n self::URL_SERVER_PORT_MAX\n );\n self::$webServerUrl = self::URL_SERVER_BASE . ':' . $serverPort;\n\t\t$server = new Server($docRoot, self::$webServerUrl);\n\n\t\t// Wait for an alive response\n $integrationRoot = realpath(__DIR__ . '/..');\n\t\t$server->setRouterScriptPath($integrationRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "protected function _addServer($target, $alias)\n {\n if ($pos = strpos($target, '://')) {\n $protocol = substr($target, 0, $pos);\n $adress = substr($target, $pos + 3);\n } else {\n $adress = $target;\n $protocol = self::DEFAULT_PROTOCOL;\n }\n\n if ($pos = strrpos($adress, ':')) {\n $posbr = strpos($adress, ']');\n if ($posbr && ($pos > $posbr)) {\n $port = substr($adress, $pos + 1);\n $adress = substr($adress, 0, $pos);\n } else if (!$posbr && $pos) {\n $port = substr($adress, $pos + 1);\n $adress = substr($adress, 0, $pos);\n } else {\n $port = null;\n }\n } else {\n $port = null;\n }\n\n $protocol = ucfirst(strtolower($protocol));\n if (!in_array($protocol, $this->_allowedSchemes)) {\n require_once 'Zend/TimeSync/Exception.php';\n throw new Zend_TimeSync_Exception(\"'$protocol' is not a supported protocol\");\n }\n\n $className = 'Zend_TimeSync_' . $protocol;\n if (!class_exists($className)) {\n require_once 'Zend/Loader.php';\n Zend_Loader::loadClass($className);\n }\n $timeServerObj = new $className($adress, $port);\n\n $this->_timeservers[$alias] = $timeServerObj;\n }", "public function add($host)\n {\n $this->hosts[] = $host;\n }", "private function get_server()\n {\n }", "function addMasterservers(Array $servers) {\n\t\t\n\t\t/* go through each server */\n\t\tforeach ($servers as $server) {\n\t\t\t\n\t\t\t/* skip if address is missing */\n\t\t\tif (!isset($server[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* add this server */\n\t\t\t$this->addMasterserver($server[0], isset($server[1]) ? $server[1] : self::DEFAULT_PORT_MASTER);\n\t\t}\n\t}", "public function addServerPost (Request $request) {\n $validation = Validator::make($request->all(),\n ['server_name' => 'required', 'server_host' => 'required', 'server_key' => 'required']\n );\n\n if ($validation->fails()) {\n return redirect(route('serverAdd'))->withErrors($validation)->withInput();\n }\n\n $name = $request->input('server_name');\n $host = $request->input('server_host');\n $api = $request->input('server_key');\n\n $server = new Server;\n $server->name = $name;\n $server->host = $host;\n $server->api_token = $api;\n $server->save();\n\n return redirect('servers');\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public function __construct()\n {\n Socket::$isServer = true;\n self::$server = new sockbase();\n self::$server->onmsg(__NAMESPACE__ . '\\SqlPool::inmsg');\n self::$server->dismsg(__NAMESPACE__ . '\\SqlPool::dis');\n $poolconf = ng169\\lib\\Option::get('pool');\n self::$pwd = $poolconf['pwd'];\n\n self::$server->start($poolconf['ip'], $poolconf['port']);\n\n // self::$server->start(\"127.0.0.1\", \"4563\");\n }", "protected function setupServers()\n\t{\n\t\t// Create a server definition\n\t\t$testFolder = realpath(__DIR__ . '/../../../test');\n\t\t$port = 8094;\n\t\t$server = new Server($testFolder . '/browser/docroot', 'http://127.0.0.1:' . $port);\n\n\t\t// Device to ensure the two clashing server classes use different PID files\n\t\t$suffix = $this->getSuffix();\n\t\t$server->setServerPidPath(\"/tmp/spiderling-phantom-{$port}-{$suffix}.server.pid\");\n\n\t\t// Delete any existing error notifications\n\t\t@unlink($this->getErrorPathName());\n\n\t\t// Add the server to the list of servers to start\n\t\t$this->addServer($server);\n\t}", "function server_admin_add(){\r\n\textract($_REQUEST);\r\n\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Servers');\r\n\t$lilo_mongo->selectCollection('GameServer');\r\n\r\n\tif($submitted == 1){\r\n\t\t$game_server = array('name' => $server_admin_add_name, 'ip' => $server_admin_add_ip, 'port' => $server_admin_add_port, 'max_ccu' => $server_admin_add_max_ccu);\r\n\t\t$game_server_id = $lilo_mongo->insert($game_server);\r\n\r\n\t\t$lilo_mongo->update($game_server, array_merge($game_server, array('lilo_id' => (string)$game_server_id)), array(\"multiple\" => false) );\r\n\r\n\t}\r\n\r\n\t$_SESSION['pop_status_msg'][] = \"New server added.\";\r\n\r\n\theader(\"Location: \" . $_SESSION['basepath'] . 'server/admin');\r\n\texit;\r\n}", "public function createServer(\n IContext $ctx\n ): IServer;", "public function addservertoMonitor($user_id, $ip, $port, $label, $type, $status, $active, $emailalert, $warning_threshold, $timeout) {\n\n $server = new Server;\n $server->ip = $ip;\n $server->port = $port;\n $server->label = $label;\n $server->type = $type;\n $server->status = $status;\n $server->active = $active;\n $server->email = $emailalert;\n $server->warning_threshold = $warning_threshold;\n $server->timeout = $timeout;\n $server->save();\n \n $user_server = new UserServer;\n $user_server->user_id = $user_id;\n $user_server->server_id = $server->id;\n $user_server->save();\n \n return $user_server;\n \n }", "protected function configureSwooleServer()\n {\n $config = $this->container['config']->get('swoole.server');\n\n $this->server->set($config);\n }", "public function add_script_args_server( $args, $script ) {\n\t\t$this->add_provider_support();\n\t\t$args['action'] = \"wpcd_{$this->get_app_name()}\";\n\t\t$args['refresh_seconds'] = 5;\n\t\t$args['l10n'] = array(\n\t\t\t'add_new' => __( 'Deploy A New WordPress Server', 'wpcd' ),\n\t\t\t'done' => __( 'The command has completed.', 'wpcd' ),\n\t\t);\n\t\t$args['user_can_provision_servers'] = current_user_can( 'wpcd_provision_servers' );\n\t\treturn $args;\n\t}", "public function onStart(\\swoole_server $server)\n {\n }", "public function addServer($host = 'localhost', $port = 11211, $persistent = true, $weight = null, $timeout = 1)\n\t{\n\t\t//argument test\n\t\tArgument::i()\n\t\t\t//Argument 1 must be a string\n\t\t\t->test(1, 'string')\n\t\t\t//Argument 2 must be an integer\n\t\t\t->test(2, 'int')\n\t\t\t//Argument 3 must be a boolean\n\t\t\t->test(3, 'bool')\n\t\t\t//Argument 4 must be a integer or null\n\t\t\t->test(4, 'int', 'null')\n\t\t\t//Argument 5 must be an integer\n\t\t\t->test(5, 'int');\n\t\t\t\n\t\t$this->memcache->addServer($host, $port, $persistent, $weight, $timeout);\n\t\t\n\t\treturn $this;\n\t}", "public function createServer($config = array()) {\n $this->server = new LimelightServer($config);\n }", "public function setServer($name, $value)\n {\n $this->_server[$name] = $value;\n }", "public function __construct( $expiration = 3600 , array $servers )\n {\n $this->expiration = $expiration;\n\n foreach ($servers as $server)\n {\n $this->addserver( $server['host'] , $server['port']);\n }\n }", "protected function _addDiscoveryProcess() {\n if (empty($this->_server)) {\n throw new Exception('init failed');\n }\n\n $process = new SwooleProcess([ $this, 'onDiscoveryProcessAdd' ]);\n $this->setProcess($process);\n $this->_server->addProcess($process);\n }", "public function setupServers()\n\t{\n\t\t$browserTestsRoot = realpath(__DIR__ . '/../../..') . '/browser';\n\t\t$server = new \\halfer\\SpiderlingUtils\\Server($browserTestsRoot . '/docroot');\n\n\t\t// Re-use the Spiderling routing script (it contains the check-alive response)\n\t\t$server->setRouterScriptPath($browserTestsRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "public function registerResourceServer()\n {\n $this->app['oauth2.resource-server'] = $this->app->share(function ($app) {\n\n $server = $app->make('League\\OAuth2\\Server\\ResourceServer');\n\n $server->setRequest($app['request']);\n\n return $server;\n\n });\n }", "function AddServerToOAuth()\n{\n $user_id = 1;\n $store = OAuthStore::instance();\n\n // The server description\n $server = array(\n 'consumer_key' => CONSUMER_KEY,\n 'consumer_secret' => CONSUMER_SECRET,\n 'signature_methods' => array('HMAC-SHA1', 'PLAINTEXT'),\n 'server_uri' => SERVER_BASE . 'services.php?service=rest',\n 'request_token_uri' => SERVER_BASE . 'services.php?service=oauth&method=request_token',\n 'authorize_uri' => SERVER_BASE . 'index.php?p=oauth&q=authorize',\n 'access_token_uri' => SERVER_BASE . 'services.php?service=oauth&method=access_token'\n );\n\n // Save the server in the the OAuthStore\n $consumer_key = $store->updateServer($server, $user_id);\n\n echo('Server Added');\n}", "public function registerClient() {\n // todo generate client key\n $serverKey = $server->registerClient($clientKey);\n // todo save server and client key\n }", "public static function create(Server $server, ?Pool $pool, Host $host) : self\n {\n if (!$pool) {\n $queue = $server->getQueue();\n $pool = Pool::create($queue, static::$name);\n }\n\n $me = new static($pool);\n\n $me\n ->setHost($host)\n ->toPool();\n\n return $me;\n }", "public function setServer(Server $server)\n\t\t{\n\t\t\t$this->server = $server;\n\t\t}", "public function addServers(array $servers)\n {\n $this->memcached->addServers($servers);\n\n return $this;\n }", "protected function setupServer()\n {\n $serverVars = $this->router->getServerVarsForUri();\n $_SERVER = array_merge($_SERVER, $serverVars);\n }", "public function setServer($server)\n {\n $this->server = $server;\n }", "public function getServer(): ServerBag { return $this->server; }", "private function __construct ( $srv ) { $this->server = $srv; }", "function servicemain() {\n $http = new \\Higgs\\HttpServer();\n/*\n $http->addExtension(new \\Higgs\\Extensions\\Misc\\AddHeader([\n \"header\" => \"x-foo\",\n \"value\" => \"Hello World\"\n ]));\n*/\n $cfg = ObjMan::getObject(\"local:/config/higgs\");\n\n $exts = $cfg->query(\"/httpd/server[default]/extension\");\n foreach($exts as $ext) {\n $cn = \\Utils::getClassFromDotted($ext[0]);\n class_exists($cn);\n }\n foreach($exts as $ext) {\n $cn = \\Utils::getClassFromDotted($ext[0]);\n if (class_exists($cn)) {\n $ext = new $cn($ext->getAttributes());\n $http->addExtension($ext);\n } else {\n $this->warn(\"Could not load extension '{$ext[0]}'\");\n }\n }\n\n //$ctrl = new \\Higgs\\HttpControl();\n\n $server = new SocketServer();\n\n $ports = $cfg->query(\"/httpd/server[default]/listen\");\n foreach($ports as $ep) {\n $endpoint = $ep[0];\n if ($ep->hasAttribute(\"certificate\")) {\n $cert = new Certificate(\"server.pem\");\n $this->debug(\"Using certificate %s\", \"server.pem\");\n $info = $cert->getCertificateInfo();\n list($vfrom,$vto) = $cert->getValidity();\n $this->debug(\" Issued to: %s\", $info[\"name\"]);\n $this->debug(\" Issuer: %s (%s)\", $info[\"issuer\"][\"O\"], $info[\"issuer\"][\"OU\"]);\n $this->debug(\" Hash: 0x%s\", $info[\"hash\"]);\n $this->debug(\" Valid from: %s\", $vfrom);\n $this->debug(\" Valid until: %s\", $vto);\n if ($cert->isSelfSigned()) {\n $this->warn(\"Warning! The certificate in use is self-signed. Consider getting a proper certificate for production use.\");\n $this->warn(\"HSTS by design does not allow self-signed certificates. Enabling HSTS will not work.\");\n }\n $server->addListener($endpoint, $http, $cert);\n } else {\n $server->addListener($endpoint, $http);\n }\n }\n /*\n $server->addListener(\"tcp://127.0.0.1:9700\", $http);\n $server->addListener(\"ssl://127.0.0.1:9701\", $http, $cert);\n $server->addListener(\"tcp://127.0.0.1:9799\", $http);\n */\n while($server->process()) {\n usleep(5000);\n if ($this->stop) break;\n }\n }", "public function setServer( $server )\r\n {\r\n $this->_server = $server;\r\n }", "public function getServer();", "public function getServer();", "public static function pushRequest(ServerRequest $request)\n {\n static::$_requests[] = $request;\n static::setRequestContext($request);\n }", "public function addServer($host, $port = 11211, $weight = 1)\n {\n $this->memcached->addServer($host, $port, $weight);\n\n return $this;\n }", "public function __construct(array $server = [])\n {\n $options = (array) Arr::pull($servers, 'options');\n $this->clients = $this->createSingleClients($server, $options);\n }", "public function addNewClient() {\n\t\t$this->Db->query(\"INSERT INTO `yp_sessions` (`hash`, `last_time`) \n\t\t\tVALUES ('{$this->_thisClientHash()}', '{$this->Request->time}');\");\n\n\t\t\n\t}", "public function __construct(Server $server)\n {\n $this->server = $server;\n }", "public function __construct(Server $server)\n {\n $this->server = $server;\n }", "public function add();", "public function add();", "public function registerServer(array $body)\n {\n return $this->_RegisterServer_operation->call(['body' => $body]);\n }", "public function setServer(ResourceServer $server) {\n $this->server = $server;\n }", "public function addServerUser(User $user, ServerAuthKey $key)\n {\n return false;\n }", "public static function mainServerCreate(EventRegister $register)\n {\n }", "public function addNameserverIp(string $ip): bool {}", "function AddMethod($server){\n\n $server->register('expose',\n array('data' => 'xsd:string'),\n array('return' => 'tns:exposeObject'),\n 'urn:idu', // namespace\n '', // soapaction\n '', // style\n '', // use\n 'Copyright by Hector Orlando Crispens');\n return;\n\n }", "private function loadServer() {\n if($result = DB::get()->query(\"SELECT `host`, `ip` FROM `servers` WHERE `serverID` = \" . $this->serverId)) {\n if($result->num_rows > 0) {\n $row = $result->fetch_assoc();\n list($this->ip, $this->port) = explode(':', $row['ip']);\n $this->host = (int)$row['host'];\n }\n $result->close();\n }\n }", "function guildMemberAdd(GuildMember $member);", "private function createPool($keyspace, $servers=NULL) \n {\n try {\n $this->conn = new ConnectionPool($keyspace, $servers);\n } catch (Exception $e) {\n show_error($e->getMessage());\n }\n }", "public function setServer($id, $server) {\r\n\t\tif (! $this->hasResource ( $id )) {\r\n\t\t\treturn $this->setResource ( $id, array (\r\n\t\t\t\t\t'server' => $server \r\n\t\t\t) );\r\n\t\t}\r\n\t\t\r\n\t\t$this->normalizeServer ( $server );\r\n\t\t\r\n\t\t$resource = & $this->resources [$id];\r\n\t\tif ($resource ['resource'] instanceof RedisResource) {\r\n\t\t\t$this->setResource ( $id, array (\r\n\t\t\t\t\t'server' => $server \r\n\t\t\t) );\r\n\t\t} else {\r\n\t\t\t$resource ['server'] = $server;\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "function save_server($server) {\n\ttry {\n\t\t# Get connected\n\t\t$dbh = get_dbh();\n\n\t\t# Create the server if necessary\n\t\t$stmt = $dbh->prepare('SELECT name FROM servers WHERE username = ? AND name = ?');\n\t\t$stmt->execute(array($server['username'], $server['name']));\n\t\tif (! is_array($stmt->fetch())) {\n\t\t\t$stmt = $dbh->prepare('INSERT INTO servers (username, name, id) VALUES (?, ?, ?)');\n\t\t\t$stmt->execute(array($server['username'], $server['name']));\n\t\t}\n\n\t\t# Update the DB from our local array\n\t\t$stmt = $dbh->prepare('UPDATE servers SET address = ?, port = ?, id = ? WHERE username = ? AND name = ?');\n\t\t$stmt->execute(array($server['address'], $server['port'], $server['id'], $server['username'], $server['name']));\n\t} catch (PDOException $e) {\n\t\terror(0, 'DB error in save_server: ' . $e->getMessage());\n\t}\n\n\treturn TRUE;\n}", "public function register(\n ServerRequestInterface $request, ResponseInterface $response\n );", "public function setNameserversForAdding(array $nameservers = [])\n {\n $this->nameserversForAdding = $nameservers;\n\n return $this;\n }", "public function setServer($Server)\r\n {\r\n $this->Server = $Server;\r\n }", "public function run(HttpServer $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "public function connect()\n {\n $this->connection = new \\Memcached();\n $result = $this->connection->addServer($this->host, $this->port);\n\n if (!$result) {\n unset($this->connection);\n }\n\n return $result;\n }", "public function addServerHost(User $user, ServerAuthKey $key)\n {\n return false;\n }", "function setServer( $address, $port ) {\n\t\t$this->address = $address;\n\t\t$this->port = $port;\n\t}", "public function setServer($name, $value)\n {\n if (!isset($this->_originalServerValues[$name])) {\n $originalValue = (isset($_SERVER[$name]) ? $_SERVER[$name] : null);\n $this->_originalServerValues[$name] = $originalValue;\n }\n\n $_SERVER[$name] = $value;\n return $this;\n }", "public static function before_start(\\swoole_server $server)\n {\n $process = new \\swoole_process(function (\\swoole_process $worker) use ($server) {\n\n $worker->name(Config::get('project_name') . ' worker process');\n Cache::getInstance()->setServer($server);\n Cache::getInstance()->refresh();\n \n swoole_timer_tick(Config::getField('worker_process', 'tick_interval'), function () use ($server) {\n Cache::getInstance()->refresh();\n });\n });\n $server->addProcess($process);\n }", "public function addServer($host, $port = 11211, $weight = 0)\n {\n trigger_error(\n 'This method is deprecated and will be removed in the feature'\n . ', please use the resource manager instead',\n E_USER_DEPRECATED\n );\n\n $this->getResourceManager()->addServer($this->getResourceId(), [\n 'host' => $host,\n 'port' => $port,\n 'weight' => $weight\n ]);\n\n return $this;\n }", "public static function mainServerCreate(ServerManager $server,EventRegister $register): void\n {\n $register->set($register::onReceive,function(\\swoole_server $server, int $fd, int $reactor_id, string $data){\n (new RegisterRpc())->registerReceive($server,$fd,$reactor_id,$data);\n });\n ProcessManager::getInstance()->addProcess('autoReload',Inotify::class);\n }", "protected static function createListener($context)\n\t{\n\t\t$type = MHTTPD::$config['SSL']['enabled'] ? 'ssl' : 'tcp';\n\t\t$addr = MHTTPD::$config['Server']['address'];\n\t\t$port = MHTTPD::$config['Server']['port'];\n\n\t\tif (!(MHTTPD::$listener = stream_socket_server(\"{$type}://{$addr}:{$port}\", $errno, $errstr, \n\t\t\tSTREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context))\n\t\t\t) {\n\t\t\ttrigger_error(\"Could not create \".strtoupper($type).\" server socket\", E_USER_ERROR);\n\t\t}\n\n\t\tif (MHTTPD::$debug) {\n\t\t\tcecho(\"\\n\".chrule().\"\\n\");\n\t\t\tcecho(\"Created \".strtoupper($type).\" listener: \".stream_socket_get_name(MHTTPD::$listener, false).\"\\n\\n\");\n\t\t} else {\n\t\t\t$t = ($type == 'ssl') ? ' (SSL)' : '';\n\t\t\tcecho(\"Started MiniHTTPD server on {$addr}, port {$port}{$t} ...\\n\\n\");\n\t\t}\n\t}", "public function setServer(ServerVO $server) {\n\t\t$this->server = $server;\n\t}", "public function run(Server $server = null): void\n {\n $this->startup();\n if ($server) {\n $server->addListener($this);\n $server->start();\n } else {\n $response = $this->handle(ServerRequest::fromGlobals());\n $this->emitter->emit($response);\n if ($response instanceof Response) {\n $response->end();\n }\n }\n\n $this->shutdown();\n }", "function xmlrpc_server_set($xmlrpc_server = NULL) {\n static $server;\n if (!isset($server)) {\n $server = $xmlrpc_server;\n }\n return $server;\n}", "function ts3client_spawnNewServerConnectionHandler($port, &$result) {}", "public function addServerAlias(string $alias): bool {}", "function create_server($flavor, $image, $name)\n {\n $this->server = $this->service->server();\n $this->svrflavor = $this->service->flavor($flavor);\n $this->svrimage = $this->service->image($image);\n try {\n $this->response = $this->server->create(array(\n 'name' => $name,\n 'image' => $this->svrimage,\n 'flavor' => $this->svrflavor,\n 'networks' => array(\n $this->service->network(Network::RAX_PUBLIC),\n $this->service->network(Network::RAX_PRIVATE)\n )\n ));\n } catch (\\Guzzle\\Http\\Exception\\BadResponseException $e) {\n\n // No! Something failed. Let's find out:\n $responseBody = (string) $e->getResponse()->getBody();\n $statusCode = $e->getResponse()->getStatusCode();\n $headers = $e->getResponse()->getHeaderLines();\n echo sprintf('Status: %s\\nBody: %s\\nHeaders: %s', $statusCode, $responseBody, implode(', ', $headers));\n }\n $json_result = json_decode($this->response->getBody(), true);\n $this->serverpw[$json_result['server']['id']] = $json_result['server']['adminPass'];\n $this->lastsvr = $json_result['server']['id'];\n }", "public function setServerId($id)\n {\n return $this->set('serverId', $id);\n }", "public function reqPool()\n {\n }", "private function setupServerTypes()\n {\n $serverTypes = [\n ['name' => 'DB'],\n ['name' => 'API'],\n ['name' => 'WebServer']\n ];\n\n $container = $this->setupData($serverTypes, ServerType::class);\n\n $this->serverTypes = $container;\n }", "public static function setDefaultServer($server)\n\t\t{\n\t\t\tself::$server = $server;\n\t\t}", "public function __construct($serversString=\"\") {\n if ($serversString != \"\") {\n $this->con = new Memcache;\n $tmp = explode(\";\", $serversString);\n foreach ($tmp as $s) {\n $hostInfo = explode(\":\",$s);\n // Assume default port\n if (count($hostInfo) == 1)\n $hostInfo[] = 11211;\n\n $this->con->addServer($hostInfo[0], $hostInfo[1], true, 1);\n }\n }\n else {\n // Fall back to file cache or whatbnot ?\n }\n }" ]
[ "0.6931117", "0.660592", "0.6529971", "0.63796407", "0.6257594", "0.62086254", "0.6118399", "0.61155283", "0.6085547", "0.59958476", "0.59695846", "0.5834615", "0.58077455", "0.5747896", "0.57404834", "0.5707721", "0.56446135", "0.5642727", "0.5565131", "0.5558785", "0.5504579", "0.5478287", "0.53718877", "0.53132516", "0.528874", "0.5288326", "0.52856076", "0.5283807", "0.5207326", "0.52030534", "0.51845527", "0.516702", "0.51416063", "0.5140801", "0.51345116", "0.512524", "0.51221776", "0.51034194", "0.5097378", "0.5092763", "0.5092061", "0.50862336", "0.5084795", "0.5073145", "0.5061217", "0.50510466", "0.504567", "0.50131625", "0.5012864", "0.500606", "0.49889386", "0.49782753", "0.49497184", "0.49407688", "0.49346069", "0.49183506", "0.4897861", "0.4897861", "0.48893994", "0.4881875", "0.48527914", "0.4851442", "0.48446533", "0.48446533", "0.48282865", "0.48282865", "0.48276547", "0.48250937", "0.4822755", "0.4814291", "0.48120943", "0.48027256", "0.47936374", "0.47872213", "0.47855672", "0.47683737", "0.47664288", "0.47548276", "0.47545162", "0.47329697", "0.47205755", "0.47164157", "0.47129008", "0.47070938", "0.46938208", "0.46936637", "0.46889386", "0.46789172", "0.46777675", "0.4677418", "0.46763015", "0.4672917", "0.46712416", "0.46624997", "0.46566677", "0.46473068", "0.4637547", "0.46358106", "0.46355015", "0.46286792" ]
0.6247983
5
Add Servers Add multiple servers to the pool
function addServers($servers) { return $this->memcached->addServers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addServers(Array $servers) {\n\t\t\n\t\t/* go through each server */\n\t\tforeach ($servers as $server) {\n\t\t\t\n\t\t\t/* skip if address is missing */\n\t\t\tif (!isset($server[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* add this server */\n\t\t\t$this->addServer($server[0], isset($server[1]) ? $server[1] : self::DEFAULT_PORT_SERVER, isset($server[2]) ? $server[2] : self::DEFAULT_VERSION);\n\t\t}\n\t}", "function addMasterservers(Array $servers) {\n\t\t\n\t\t/* go through each server */\n\t\tforeach ($servers as $server) {\n\t\t\t\n\t\t\t/* skip if address is missing */\n\t\t\tif (!isset($server[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* add this server */\n\t\t\t$this->addMasterserver($server[0], isset($server[1]) ? $server[1] : self::DEFAULT_PORT_MASTER);\n\t\t}\n\t}", "protected function registerServers()\n {\n $this->container['server.lighttpd'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Lighttpd($c['dispatcher']);\n });\n\n $this->container['server.nginx'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Nginx($c['dispatcher']);\n });\n }", "abstract protected function setupServers();", "public function getServers() {}", "protected function setupServers()\n\t{\n\t\t// Create a server definition\n\t\t$testFolder = realpath(__DIR__ . '/../../../test');\n\t\t$port = 8094;\n\t\t$server = new Server($testFolder . '/browser/docroot', 'http://127.0.0.1:' . $port);\n\n\t\t// Device to ensure the two clashing server classes use different PID files\n\t\t$suffix = $this->getSuffix();\n\t\t$server->setServerPidPath(\"/tmp/spiderling-phantom-{$port}-{$suffix}.server.pid\");\n\n\t\t// Delete any existing error notifications\n\t\t@unlink($this->getErrorPathName());\n\n\t\t// Add the server to the list of servers to start\n\t\t$this->addServer($server);\n\t}", "protected function setupServers()\n\t{\n\t\t$docRoot = realpath(__DIR__ . '/..') . '/web';\n $serverPort = self::choosePort(\n self::URL_SERVER_PORT_MIN,\n self::URL_SERVER_PORT_MAX\n );\n self::$webServerUrl = self::URL_SERVER_BASE . ':' . $serverPort;\n\t\t$server = new Server($docRoot, self::$webServerUrl);\n\n\t\t// Wait for an alive response\n $integrationRoot = realpath(__DIR__ . '/..');\n\t\t$server->setRouterScriptPath($integrationRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "public function addServers(array $servers)\n {\n $this->memcached->addServers($servers);\n\n return $this;\n }", "public function __construct( $expiration = 3600 , array $servers )\n {\n $this->expiration = $expiration;\n\n foreach ($servers as $server)\n {\n $this->addserver( $server['host'] , $server['port']);\n }\n }", "public function setServers($servers)\n {\n if (!is_array($servers)) {\n return $this->setServers(explode(',', $servers));\n }\n\n $this->servers = array();\n foreach ($servers as $server) {\n // default values\n $host = null;\n $port = 8888;\n $weight = 1;\n $type = self::TYPE_SLAVE;\n\n if (!is_array($server) && !is_string($server)) {\n throw new Exception\\InvalidArgumentException('Invalid server specification provided; must be an array or string');\n }\n\n // parse a single server from an array\n if (is_array($server)) {\n if (!isset($server[0]) && !isset($server['host'])) {\n throw new Exception\\InvalidArgumentException(\"Invalid list of servers given\");\n }\n\n // array(array(<host>[, <port>[, <weight>]])[, ...])\n if (isset($server[0])) {\n $host = (string) $server[0];\n $port = isset($server[1]) ? (int) $server[1] : $port;\n $weight = isset($server[2]) ? (int) $server[2] : $weight;\n $type = isset($server[3]) ? $server[3] : $type;\n }\n\n // array(array('host' => <host>[, 'port' => <port>[, 'weight' => <weight>]])[, ...])\n if (!isset($server[0]) && isset($server['host'])) {\n $host = (string)$server['host'];\n $port = isset($server['port']) ? (int) $server['port'] : $port;\n $weight = isset($server['weight']) ? (int) $server['weight'] : $weight;\n $type = isset($server['type']) ? $server['type'] : $type;\n }\n }\n\n // parse a single server from a string\n if (!is_array($server)) {\n $server = trim($server);\n if (strpos($server, '://') === false) {\n $server = 'tcp://' . $server;\n }\n\n $server = parse_url($server);\n if (!$server) {\n throw new Exception\\InvalidArgumentException(\"Invalid list of servers given\");\n }\n\n $host = $server['host'];\n $port = isset($server['port']) ? (int)$server['port'] : $port;\n\n if (isset($server['query'])) {\n $query = null;\n parse_str($server['query'], $query);\n if (isset($query['weight'])) {\n $weight = (int)$query['weight'];\n }\n if (isset($query['type'])) {\n $type = (string)$query['type'];\n }\n }\n }\n\n if (!$host) {\n throw new Exception\\InvalidArgumentException('The list of servers must contain a host value.');\n }\n\n $this->addServer($host, $port, $weight, $type);\n }\n\n if (!count($this->getMasterServers())) {\n throw new Exception\\InvalidArgumentException('No master found in provided definition');\n }\n return $this;\n }", "public function getServers();", "public function setNameserversForAdding(array $nameservers = [])\n {\n $this->nameserversForAdding = $nameservers;\n\n return $this;\n }", "protected function setSwooleServerListeners()\n {\n foreach ($this->events as $event) {\n $listener = 'on' . ucfirst($event);\n\n if (method_exists($this, $listener)) {\n $this->server->on($event, [$this, $listener]);\n } else {\n $this->server->on($event, function () use ($event) {\n $event = sprintf('swoole.%s', $event);\n\n $this->container['events']->fire($event, func_get_args());\n });\n }\n }\n }", "public function setupServers()\n\t{\n\t\t$browserTestsRoot = realpath(__DIR__ . '/../../..') . '/browser';\n\t\t$server = new \\halfer\\SpiderlingUtils\\Server($browserTestsRoot . '/docroot');\n\n\t\t// Re-use the Spiderling routing script (it contains the check-alive response)\n\t\t$server->setRouterScriptPath($browserTestsRoot . '/scripts/router.php');\n\t\t$server->setCheckAliveUri('/server-check');\n\n\t\t$this->addServer($server);\n\t}", "private function setupServers()\n {\n if (!$this->serverTypes || !$this->products) {\n throw new \\LogicException('Products and Server Types must be setup in order to set up the servers.');\n }\n\n $servers = [];\n\n foreach ($this->products as $product) {\n if ($product instanceof Product) {\n foreach ($this->serverTypes as $type) {\n if ($type instanceof ServerType) {\n $serverName = $product->getName() . '-' . $type->getName();\n\n $servers[] = [\n 'name' => $serverName,\n 'ip' => long2ip(rand(0, 42949672)),\n 'product' => $product,\n 'type' => $type\n ];\n }\n }\n }\n }\n\n $container = $this->setupData($servers, Server::class);\n\n $this->servers = $container;\n }", "public function setGearmanServers(array $servers) {\n\t\t$this->servers = $servers;\n\t}", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$data_city \t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t\n\t\t$this->dbConIro \t\t= $db[$data_city]['iro']['master'];\n\t\t$this->dbConDjds \t\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbConDjds_slave\t= $db[$data_city]['d_jds']['master'];\n\t\t$this->dbContme\t\t\t= $db[$data_city]['tme_jds']['master'];\n\t\t//$this->dbConIro_slave\t= $db[$data_city]['iro']['slave'];\n\t\t$this->dbConIdc \t\t= $db[$data_city]['idc']['master'];\t\t\n\t\t$this->dbConbudget \t= $db[$data_city]['db_budgeting']['master'];\n\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t$this->mongo_flag = 1;\n\t\t}\n\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($data_city), json_decode(MONGOCITY))){\t\n\t\t\t$this->mongo_tme = 1;\n\t\t}\n\t}", "function loadServersFromMasterservers($versions = self::DEFAULT_VERSION) {\n\t\t\n\t\t/* if given, select all versions */\n\t\tif ($versions === self::ALL_VERSIONS) {\n\t\t\t$versions = $this->versions;\n\t\t}\n\t\t\n\t\t/* check versions */\n\t\t$versions = (array)$versions;\n\t\tforeach ($versions as $k => $version) {\n\t\t\tif (!in_array($version, $this->versions)) {\n\t\t\t\tunset($versions[$k]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* if none version, set to default */\n\t\tif (!count($versions)) {\n\t\t\t$versions = array(self::DEFAULT_VERSION);\n\t\t}\n\t\t\n\t\t/* plan connections */\n\t\t$connectionStack = array();\n\t\tforeach ($this->masterservers as &$masterserver) {\n\t\t\tforeach ((array)$versions as $version) {\n\t\t\t\t$connectionStack[] = array(&$masterserver, $version);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curConn = 0; // next position in the connection stack to handle\n\t\t\n\t\t/* additionally request the count of servers, to prevent the connection to wait for more servers than necessary */\n\t\t$connectionsSrvCount = array(); // to store the active connections for the server count request\n\t\t$numConnectionsSrvCount = 0; // number of connections for the server count request (number of elements in $this->masterservers)\n\t\t$curConnSrvCount = 0; // next position in the connection stack for the server count request to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($connectionStack[$curConn])) {\n\t\t\t\n\t\t\t/* count request */\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->masterservers[$curConnSrvCount]) && ($numConnections + $numConnectionsSrvCount) < self::MAX_CONNECTIONS_MASTER; $curConnSrvCount++) {\n\t\t\t\t\n\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffcou2\";\n\t\t\t\t\n\t\t\t\t$authority = $this->masterservers[$curConnSrvCount][0].':'.$this->masterservers[$curConnSrvCount][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connectionsSrvCount[$curConnSrvCount] = array($connection, &$this->masterservers[$curConnSrvCount], self::getTimeInMs());\n\t\t\t\t\t$numConnectionsSrvCount++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connectionsSrvCount as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\t$data = fread($connection[0], 16); // size = header_size + 2 = 16\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffsiz2\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\t$connection[1]['num_servers'] = (ord($data[14]) << 8) | ord($data[15]);\n\t\t\t\t\t\t\n\t\t\t\t/* only one packet expected, so drop after one packet */\n\t\t\t\tunset($connectionsSrvCount[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connectionsSrvCount as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_MASTER) {\n\t\t\t\t\tunset($connectionsSrvCount[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnectionsSrvCount = count($connectionsSrvCount);\n\t\t\t\n\t\t\t/* server list request */\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($connectionStack[$curConn]) && ($numConnections + $numConnectionsSrvCount) < self::MAX_CONNECTIONS_MASTER; $curConn++) {\n\t\t\t\t\n\t\t\t\tswitch ($connectionStack[$curConn][1]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffreqt\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffreq2\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $connectionStack[$curConn][0][0].':'.$connectionStack[$curConn][0][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* set loaded server counter */\n\t\t\t\tif (!isset($connectionStack[$curConn][0]['num_servers_loaded'])) {\n\t\t\t\t\t$connectionStack[$curConn][0]['num_servers_loaded'] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curConn] = array($connection, &$connectionStack[$curConn], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][1]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 464); // size = header_size + max_servers_per_packet * server_size = 14 + 75 * 6 = 464\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 1364); // size = header_size + max_servers_per_packet * server_size = 14 + 75 * 18 = 1364\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][1]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xfflist\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xfflis2\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][1]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($i = 14; ($i + 6) <= $datalen; $i += 6) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* IP */\n\t\t\t\t\t\t\t$ip = inet_ntop(substr($data, $i, 4));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* port (actually an array. the port is in $port[1]) */\n\t\t\t\t\t\t\t$port = unpack(\"v\", substr($data, $i + 4, 2));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->addServer($ip, $port[1], self::VERSION_05);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* increment server loaded counter */\n\t\t\t\t\t\t\t$connection[1][0]['num_servers_loaded']++;\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\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($i = 14; ($i + 18) <= $datalen; $i += 18) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* switch between IPv4 and IPv6 */\n\t\t\t\t\t\t\tif (substr($data, $i, 12) === \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\") {\n\t\t\t\t\t\t\t\t$ip = inet_ntop(substr($data, $i + 12, 4)); // IPv4\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$ip = \"[\".inet_ntop(substr($data, $i, 16)).\"]\"; // IPv6\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* port (actually an array. the port is in $port[1]) */\n\t\t\t\t\t\t\t$port = unpack(\"n\", substr($data, $i + 16, 2));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->addServer($ip, $port[1], self::VERSION_06);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* increment server loaded counter */\n\t\t\t\t\t\t\t$connection[1][0]['num_servers_loaded']++;\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\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* if connection is finished drop it */\n\t\t\t\tswitch ($connection[1][1]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($datalen < 494) {\n\t\t\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($datalen < 1364) {\n\t\t\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_MASTER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have gathered enough servers */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif (!empty($connection[1][0]['num_servers']) && !empty($connection[1][0]['num_servers_loaded']) && $connection[1][0]['num_servers_loaded'] >= $connection[1][0]['num_servers']) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}", "protected function setSwooleServerListeners()\n {\n foreach ($this->events as $event) {\n $listener = Str::camel(\"on_$event\");\n $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) {\n $this->triggerEvent($event, func_get_args());\n };\n\n $this->getServer()->on($event, $callback);\n }\n }", "public function addServer($host, $port, $weight = 0) {}", "public function handle()\n {\n $tmp = $this->client->servers();\n\n /** @var \\Illuminate\\Support\\Collection|\\App\\Models\\Game[] $games */\n /** @var \\Illuminate\\Support\\Collection|\\App\\Models\\Server[] $servers_db */\n /** @var \\Illuminate\\Support\\Collection|\\TruckersMP\\Types\\Server[] $servers_actual */\n $games = Game::all();\n $servers_db = Server::all();\n\n// $new = json_decode('{\"id\":16,\"game\":\"ETS2\",\"ip\":\"43.251.158.210\",\"port\":42860,\"name\":\"Convoy\",\"shortname\":\"Convoy\",\"online\":true,\"players\":4,\"queue\":0,\"maxplayers\":500,\"speedlimiter\":false,\"collisions\":true,\"carsforplayers\":true,\"policecarsforplayers\":false,\"afkenabled\":true,\"syncdelay\":100}',\n// true);\n// $tmp->servers[] = new \\TruckersMP\\Types\\Server($new);\n $servers_actual = collect($tmp);\n\n $existed_servers = [];\n foreach ($servers_actual as $actual) {\n /** @var \\Illuminate\\Support\\Collection|\\App\\Models\\Server[] $db */\n /** @var \\TruckersMP\\Types\\Server $actual */\n $db = $servers_db->where('actual_id', $actual->id)\n ->where('name', $actual->name)\n ->where('shortname', $actual->shortName)\n ->sortByDesc('created_at');\n\n if ($db->isEmpty()) {\n /** @var \\App\\Models\\Server $s */\n $s = Server::create([\n 'actual_id' => $actual->id,\n 'game_id' => $games->where('shortname', $actual->game)->first()->id,\n 'name' => $actual->name,\n 'shortname' => $actual->shortName,\n 'online' => $actual->online,\n ]);\n\n $this->info('New server - ' . $actual->name);\n $existed_servers[] = $s->id;\n continue;\n }\n\n /** @var \\App\\Models\\Server $main */\n if ($db->count() > 1) {\n $main = $db->shift();\n $db->each(function ($server) {\n /** @var \\App\\Models\\Server $server */\n $server->online = false;\n $server->update();\n $server->delete();\n });\n } else {\n $main = $db->first();\n }\n\n if ($main->online !== $actual->online) {\n $actual_online = $actual->online ? 'online' : 'offline';\n $main->online = $actual->online;\n\n $this->comment(\"{$main->shortname} went {$actual_online}\");\n }\n\n $existed_servers[] = $main->id;\n };\n\n $servers_db->each->update();\n Server::whereNotIn('id', $existed_servers)->delete();\n }", "function getServers() {\n\t\treturn $this->servers;\n\t}", "public function getMultiHostServers() {\n $publicKey = md5(microtime());\n\n $hosts = array('http://imbo0', 'http://imbo1/prefix', 'http://imbo2:81', 'http://imbo3:81/prefix', 'http://imbo4:80');\n\n return array(\n array($hosts, $publicKey, 'd1afdbe2950dc1e9fa134d8c91cd1a8b', 'http://imbo4'),\n array($hosts, $publicKey, '5fda26a928c9b0b90ef7b2db0031bfcf', 'http://imbo0'),\n array($hosts, $publicKey, '5d028794b32c2b127875a336b1220dab', 'http://imbo3:81/prefix'),\n array($hosts, $publicKey, 'f7dc62518f2967dacbc4c0eead5fabe5', 'http://imbo2:81'),\n array($hosts, $publicKey, '7a4cac9e82c06010293cd6d23708e147', 'http://imbo2:81'),\n array($hosts, $publicKey, '609c8d8350d3b6b294a628835b8e9b59', 'http://imbo1/prefix'),\n array($hosts, $publicKey, '1e68c888fbe0a27276141a1e6fb576f4', 'http://imbo0'),\n array($hosts, $publicKey, '67e45db3a472a90a26bda000c0818bfc', 'http://imbo3:81/prefix'),\n array($hosts, $publicKey, '3ad35117949c5a17b9df82c343b4f763', 'http://imbo3:81/prefix'),\n );\n }", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\n\t\t$conn_city \t\t= ((in_array(strtolower($this->data_city), $this->dataservers)) ? strtolower($this->data_city) : 'remote');\n\t\t\n\t\t$this->conn_iro \t\t= $db[$conn_city]['iro']['master'];\n\t\t$this->conn_local \t\t= $db[$conn_city]['d_jds']['master'];\n\t\t$this->conn_tme \t\t= $db[$conn_city]['tme_jds']['master'];\n\t\t$this->conn_idc \t\t= $db[$conn_city]['idc']['master'];\n\t\t\n\t\tif(($this->module =='DE') || ($this->module =='CS'))\n\t\t{\n\t\t\t$this->conn_temp\t \t= $this->conn_local;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t}\n\t\telseif($this->module =='TME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_tme;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(TME_MONGOUSER)) || TME_ALLUSER_MONGO == 1) && in_array(strtolower($conn_city), json_decode(MONGOCITY))){\n\t\t\t\t$this->mongo_tme = 1;\n\t\t\t}\n\n\t\t}\n\t\telseif($this->module =='ME')\n\t\t{\n\t\t\t$this->conn_temp\t\t= $this->conn_idc;\n\t\t\t$this->conn_catmaster \t= $this->conn_local;\n\t\t\tif((in_array($this->ucode, json_decode(MONGOUSER)) || ALLUSER == 1)){\n\t\t\t\t$this->mongo_flag = 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = \"Invalid Module.\";\n\t\t\techo json_encode($this->send_die_message($message));\n\t\t\tdie();\n\t\t}\t\t\n\t}", "function addMasterserver($address, $port = self::DEFAULT_PORT_MASTER) {\n\t\t\n\t\t/* cast to right types */\n\t\t$address = (string)$address;\n\t\t$port = (int)$port;\n\t\t\n\t\t/* if address is invalid abort */\n\t\tif (empty($address)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/* if port is invalid set to default port */\n\t\tif ($port < 0 || $port > 65535) {\n\t\t\t$port = self::DEFAULT_PORT_MASTER;\n\t\t}\n\t\t\n\t\t/* add if not a duplicate */\n\t\t$server = array($address, $port);\n\t\tif (!in_array($server, $this->masterservers, true)) {\n\t\t\t$this->masterservers[] = $server;\n\t\t}\n\t}", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "function setServers()\n\t{\t\n\t\tglobal $db;\n\t\t\t\t\t\n\t\tif(DEBUG_MODE)\n\t\t{\n\t\t\techo '<pre>db array :: ';\n\t\t\tprint_r($db);\n\t\t}\n\t\t\n\t\t$data_city \t\t\t\t= ((in_array(strtolower($this->params['data_city']), $this->dataservers)) ? strtolower($this->params['data_city']) : 'remote');\n\t\t$this->idc_con\t\t\t= $db[strtolower($data_city)]['idc']['master'];\n\t\t$this->local_tme_conn\t= $db[strtolower($data_city)]['tme_jds']['master'];\n\t\t$this->local_d_jds\t\t= $db[strtolower($data_city)]['d_jds']['master'];\n\t\t$this->local_iro_conn\t= $db[strtolower($data_city)]['db_iro']['master'];\n\t\t$this->fin_con\t\t\t= $db[strtolower($data_city)]['fin']['master'];\n\t\t\n\t}", "static public function getServers() {\n\t\tself::loadSettings();\n\t\treturn self::$servers;\n\t}", "public function add(PriorityServer $server)\n\t{\n\t\t$this->server_list->append($server);\n\t}", "private function createPool($keyspace, $servers=NULL) \n {\n try {\n $this->conn = new ConnectionPool($keyspace, $servers);\n } catch (Exception $e) {\n show_error($e->getMessage());\n }\n }", "public function add($sName, $mServers) {\n if(!is_array($mServers)) {\n $mServers = [$mServers];\n }\n\n $this->m_aNetworkInfo [$sName] = ['Servers' => []];\n\n foreach($mServers as $sServerInfo) {\n if(strpos($sServerInfo, ':') === false) {\n $sServerInfo .= ':6667';\n } // Default port\n\n list ($sAddress, $nPort) = explode(':', $sServerInfo);\n $this->m_aNetworkInfo [$sName] ['Servers'] [] = [\n 'IP' => gethostbyname($sAddress),\n 'Port' => $nPort,\n 'Count' => 0\n ];\n }\n\n $this->m_aNetworkInfo [$sName] ['Count'] = 0;\n }", "public function __construct(array $server = [])\n {\n $options = (array) Arr::pull($servers, 'options');\n $this->clients = $this->createSingleClients($server, $options);\n }", "public function getNameserversForAdding()\n {\n return $this->nameserversForAdding;\n }", "public function run()\n {\n $servers = [\n ['name' => 'アルカディアサーバ(s1)', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],\n ['name' => 'エデンサーバ(s2)', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],\n ['name' => 'ヴァルハラサーバ(s3)', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()],\n ];\n\n DB::table('servers')->insert($servers);\n }", "public function getServers() {\n\t\treturn $this->dbHandler->getAllServer();\n\t}", "function emptyServers() {\n\t\t$this->servers = array();\n\t}", "public function get_servers($request) {\r\n\t\t$this->servers = $request['server'];\r\n\t\treturn $request['server'];\r\n\t}", "public function setServers(array $values)\n {\n foreach ($values as $name => $value) {\n $this->setServer($name, $value);\n }\n return $this;\n }", "public static function getservers() {\n\t\t$product_id = OnAppCDN::getValue( 'id' );\n\n\t\t$sql = \"SELECT\n\t\t\t\t\ttblservers.*,\n\t\t\t\t\ttblservergroupsrel.groupid,\n\t\t\t\t\ttblproducts.servergroup\n\t\t\t\tFROM\n\t\t\t\t\ttblservers\n\t\t\t\t\tLEFT JOIN tblservergroupsrel ON\n\t\t\t\t\t\ttblservers.id = tblservergroupsrel.serverid\n\t\t\t\t\tLEFT JOIN tblproducts ON\n\t\t\t\t\t\ttblproducts.id = $product_id\n\t\t\t\tWHERE\n\t\t\t\t\ttblservers.type = 'onappcdn'\";\n\n\t\t$sql_servers_result = full_query( $sql );\n\n\t\t$servers = array();\n\t\twhile( $server = mysql_fetch_assoc( $sql_servers_result ) ) {\n\t\t\tif( is_null( $server[ 'groupid' ] ) ) {\n\t\t\t\t$server[ 'groupid' ] = 0;\n\t\t\t}\n\t\t\t$server[ 'password' ] = decrypt( $server[ 'password' ] );\n\t\t\t$servers[ $server[ 'id' ] ] = $server;\n\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = $server[ 'ipaddress' ] != '' ? $server[ 'ipaddress' ] : $server[ 'hostname' ];\n\n\t\t\tif( $server[ 'secure' ] == 'on' ) {\n\t\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = 'https://' . $servers[ $server[ 'id' ] ][ 'address' ];\n\t\t\t}\n\t\t}\n\n\t\treturn $servers;\n\t}", "function addLatestServer($remote_ip, $service_port, $serverTitle, $connectedClients, $networkSlots )\n\t{\n\t\t$server = \"$remote_ip:$service_port\";\n\t\t$players = \"$connectedClients/$networkSlots\";\n\t\tmysqli_query( Registry::$mysqliLink, \"INSERT INTO recent_servers (name, server, players) VALUES('$serverTitle', '$server', '$players')\");\n\n\t\t// make sure there are not too much servers\n\t\t$count_query = mysqli_fetch_assoc(mysqli_query( Registry::$mysqliLink, \"SELECT COUNT(*) as count FROM recent_servers\"));\n\t\t$count = (int) $count_query['count'];\n\t\t$over = $count - MAX_RECENT_SERVERS;\n\t\tmysqli_query( Registry::$mysqliLink, \"DELETE FROM recent_servers ORDER BY id LIMIT $over\");\n\t}", "protected function addSiteServices()\n {\n $this->container->JobPosting = function ($container) {\n return new JobPosting();\n };\n\n $this->container->Pagination = $this->container->factory(function ($container) {\n return new Pagination($container);\n });\n\n $this->container->Registration = function ($container) {\n return new Registration($container);\n };\n\n $this->container->Semantic = function ($container) {\n return new Semantic($container);\n };\n\n $this->container->User = function ($container) {\n return new User($container);\n };\n }", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function init()\n\t{\n\t\t$this->serversInit();\n\t}", "public function servers()\n\t{\n\t\treturn $this->hasMany('Dodona\\Server');\n\t}", "private function setupServerTypes()\n {\n $serverTypes = [\n ['name' => 'DB'],\n ['name' => 'API'],\n ['name' => 'WebServer']\n ];\n\n $container = $this->setupData($serverTypes, ServerType::class);\n\n $this->serverTypes = $container;\n }", "public function addServices($provider)\n\t{\n\t\t$services = new $provider;\n\t\t$services = $services->register();\n\t\tforeach($services as $key => $item)\n\t\t\tContainer::registerClass( $key , $item );\n\t}", "public function getServerList() {}", "function wp_smpro_servers() {\r\n\t$server_list = array(\r\n\t\t'https://smush1.wpmudev.com/',\r\n\t\t'https://smush2.wpmudev.com/',\r\n\t\t'https://smush3.wpmudev.com/',\r\n\t\t'https://smush4.wpmudev.com/',\r\n\t\t'https://smush5.wpmudev.com/',\r\n\t\t'https://smush6.wpmudev.com/',\r\n\t\t'https://smush7.wpmudev.com/',\r\n\t\t'https://smush8.wpmudev.com/',\r\n\t\t'https://smush9.wpmudev.com/',\r\n\t\t'https://smush10.wpmudev.com/'\r\n\t);\r\n\r\n\treturn $server_list;\r\n}", "public function setParameters(array $servers)\n {\n $this->servers = $servers;\n }", "protected function getConfiguredMemcachedServers() {}", "public function setServers($servers)\n {\n $this->getResourceManager()->setServers($this->getResourceId(), $servers);\n return $this;\n }", "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "protected function addServer(Server $server)\n\t{\n\t\t// Check if there is a URI clash\n\t\t/* @var $existingServer Server */\n\t\tforeach ($this->servers as $existingServer)\n\t\t{\n\t\t\tif ($server->getServerUri() === $existingServer->getServerUri())\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\"Clashing server URIs detected\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($server->getServerPidPath() === $existingServer->getServerPidPath())\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\"Clashing server PID paths detected\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->servers[] = $server;\n\t}", "public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "private function addServerToListOfRemotes(\n int $serverId,\n string $serverIP,\n string $centreonPath,\n string $httpMethod,\n string $httpPort,\n bool $noCheckCertificate,\n bool $noProxy\n ): void {\n $currentDate = date('Y-m-d H:i:s');\n\n $statement = $this->pearDB->prepare('SELECT 1 FROM `remote_servers` WHERE `server_id` = :server_id');\n $statement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $statement->execute();\n $remoteAlreadyExists = (bool) $statement->rowCount();\n\n if ($remoteAlreadyExists) {\n $updateStatement = $this->pearDB->prepare(\n 'UPDATE `remote_servers` SET\n `is_connected` = 1, `connected_at` = :connected_at, `centreon_path` = :centreon_path,\n `no_check_certificate` = :no_check_certificate, `no_proxy` = :no_proxy, `ip_address` = :ip_address\n WHERE `server_id` = :server_id'\n );\n $updateStatement->bindValue(':connected_at', $currentDate, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':centreon_path', $centreonPath, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':no_check_certificate', $noCheckCertificate ? '1' : '0', \\PDO::PARAM_STR);\n $updateStatement->bindValue(':no_proxy', $noProxy ? '1' : '0', \\PDO::PARAM_STR);\n $updateStatement->bindValue(':ip_address', $serverIP, \\PDO::PARAM_STR);\n $updateStatement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $updateStatement->execute();\n } else {\n $insertStatement = $this->pearDB->prepare(\n 'INSERT INTO `remote_servers`\n (`ip`, `version`, `is_connected`, `created_at`, `connected_at`, `centreon_path`,\n `http_method`, `http_port`, `no_check_certificate`, `no_proxy`, `server_id`)\n VALUES\n (:ip_address, \"\", 1, :created_at, :connected_at, :centreon_path, :http_method, :http_port,\n :no_check_certificate, :no_proxy, :server_id)'\n );\n $insertStatement->bindValue(':ip_address', $serverIP, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':created_at', $currentDate, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':connected_at', $currentDate, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':centreon_path', $centreonPath, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':http_method', $httpMethod, \\PDO::PARAM_STR);\n $insertStatement->bindValue(':http_port', $httpPort ?: null, \\PDO::PARAM_INT);\n $insertStatement->bindValue(':no_check_certificate', $noCheckCertificate ? '1' : '0', \\PDO::PARAM_STR);\n $insertStatement->bindValue(':no_proxy', $noProxy ? '1' : '0', \\PDO::PARAM_STR);\n $insertStatement->bindValue(':server_id', $serverId, \\PDO::PARAM_INT);\n $insertStatement->execute();\n }\n }", "public function create(Request $request)\n {\n // Retrieve nodes array from JSON\n $servers = $request->input('servers');\n $server_num = count($servers);\n\n // Validate the data for each node\n $errors = array();\n $created = array();\n $index = 0;\n DB::beginTransaction();\n foreach ($servers as $server) {\n try {\n // Form validation\n $errors = $this->loadValidationErrors('validation.server_create', $server, $errors, $index);\n if (!empty($errors)) {\n DB::rollBack();\n return response()->json(['errors' => $errors])->setStatusCode(400, 'Server validation failed');\n }\n\n $domain = Domain::findByFullname($server['domain']);\n\n // Access control\n if (!$this->hasPermission('server', $domain->id, 'create', null)) {\n DB::rollBack();\n return response()->json(['errors' => []])->setStatusCode(403, 'You are not allowed to create servers on this domain!');\n }\n\n // Try to store each node\n $newServer = new Server();\n $newServer->hostname = $server['hostname'];\n $newServer->domain = $domain->id;\n $newServer->ip = $server['ip'];\n $newServer->os = $server['os'] ;\n $newServer->save();\n\n $created[] = $newServer;\n } catch (Exception $ex) {\n DB::rollBack();\n $this->logEvent('Server creation failed! Error: '.$ex->getMessage(), 'error');\n return response()->json(['errors' => []])->setStatusCode(500, 'Server creation failed. Check system logs.');\n }\n\n $index++;\n }\n\n DB::commit();\n $responseArray = $this->transformer->transform($created);\n return response()->json($responseArray)->setStatusCode(200, $server_num.' server(s) added.');\n }", "public function getServerList(): array\n {\n $replace = array(\n \"\\xFF\\xFF\\xFF\\xFFgetserversResponse\\n\",\n \"\\\\EOF\",\n \"\\\\EOT\"\n );\n\n $servers = array();\n\n $this->write(\"\\xFF\\xFF\\xFF\\xFFgetservers \".$this->protocol.\" full empty\");\n $data = $this->read_master();\n\n foreach ($data as $row) {\n $row = str_replace($replace, \"\", $row);\n $row = explode(\"\\x5c\", $row);\n foreach ($row as $server) {\n if (strlen($server) == 6) {\n $serverInfo = unpack(\"Nip/nport\", $server);\n $servers[] = new Server(long2ip($serverInfo[\"ip\"]), $serverInfo[\"port\"]);\n }\n }\n }\n\n return $servers;\n }", "public function setArgs(array $servers = array())\n {\n $this->servers = $servers;\n\n $this->configure();\n\n return $this;\n }", "public function start(array $config)\n {\n foreach ($config['irc']['servers'] as $name => $serverConfig) {\n $this->servers[$name] = new Server($name, $serverConfig);\n }\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "function addServerURL($serverURL) {\n\t\tif ($this->m_serverURLs === null) {\n\t\t\t$this->m_serverURLs = array();\n\t\t}\n\n\t\tif (func_num_args() === 2) {\n\t\t\t$timeout = func_get_arg(1);\n\t\t\t$serverURL = new ServerURL($serverURL, $timeout);\n\t\t}\n\n\t\t$this->m_serverURLs[] = $serverURL;\n\t}", "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "function setServerURLs($serverURLs) {\n\t\t$this->m_serverURLs = $serverURLs;\n\t}", "public function run()\n {\n DB::table('service_servers')->insert([\n [\n 'name' => 'Гордунни - Орда',\n 'service_id' => 1,\n ],\n\n [\n 'name' => 'Гордунни - Альянс',\n 'service_id' => 1,\n ],\n\n [\n 'name' => 'Пламегор - Орда',\n 'service_id' => 2,\n ],\n\n [\n 'name' => 'Пламегор - Альянс',\n 'service_id' => 2,\n ],\n\n\n\n [\n 'name' => 'Hatos',\n 'service_id' => 3,\n ],\n\n [\n 'name' => 'Shyeed',\n 'service_id' => 3,\n ],\n\n [\n 'name' => 'Frintezza',\n 'service_id' => 4,\n ],\n\n [\n 'name' => 'Shillien',\n 'service_id' => 4,\n ],\n\n [\n 'name' => 'Ария',\n 'service_id' => 5,\n ],\n\n [\n 'name' => 'Каиль',\n 'service_id' => 5,\n ],\n\n\n ]);\n }", "protected function bindSwooleServer()\n {\n $this->app->singleton('swoole.server', function () {\n return $this->server;\n });\n }", "public function addServer($host, $port = 8888, $weight = 0, $type = self::TYPE_SLAVE)\n {\n $new = array(\n 'host' => $host,\n 'port' => $port,\n 'weight' => $weight,\n 'type' => $type,\n );\n\n foreach ($this->servers as $server) {\n $diff = array_diff($new, $server);\n if (empty($diff)) {\n // Done -- server is already present\n return $this;\n }\n }\n\n $this->servers[] = $new;\n return $this;\n }", "public function testAddServerEx() {\n\t\t$this->getAdapter()->addServerEx('127.0.0.2');\n\t\t$this->assertTrue(true);\n\t}", "function process_add_server()\n{\n // Verify we have all the required info (based on LDAP or AD)\n $error = \"\";\n $enabled = grab_request_var(\"enabled\", \"\");\n if (!empty($enabled)) { $enabled = 1; }\n\n $conn_method = grab_request_var(\"conn_method\", \"\");\n $base_dn = grab_request_var(\"base_dn\", \"\");\n $security_level = grab_request_var(\"security_level\", \"none\");\n\n // AD Only\n $account_suffix = grab_request_var(\"account_suffix\", \"\");\n $domain_controllers = grab_request_var(\"domain_controllers\", \"\");\n\n // LDAP Only\n $ldap_host = grab_request_var(\"ldap_host\", \"\");\n $ldap_port = grab_request_var(\"ldap_port\", \"\");\n\n if ($conn_method == \"ad\") {\n\n // Verify AD sections required\n if (empty($account_suffix) || empty($base_dn) || empty($domain_controllers) || empty($security_level)) {\n $error = _(\"You must fill out all the Active Directory server information.\");\n }\n\n } else if ($conn_method == \"ldap\") {\n\n // Verify LDAP sections required\n if (empty($ldap_host) || empty($ldap_port) || empty($base_dn) || empty($security_level)) {\n $error = _(\"You must fill out all the LDAP server information.\");\n }\n\n } else {\n // Not a recognized connection method...\n $error = _(\"Unknown connection method specified.\");\n }\n\n // Quit if error exists\n if (!empty($error)) {\n display_page(true, $error);\n exit;\n }\n\n $server = array(\"id\" => uniqid(),\n \"enabled\" => $enabled,\n \"conn_method\" => $conn_method,\n \"ad_account_suffix\" => $account_suffix,\n \"ad_domain_controllers\" => $domain_controllers,\n \"base_dn\" => $base_dn,\n \"security_level\" => $security_level,\n \"ldap_port\" => $ldap_port,\n \"ldap_host\" => $ldap_host);\n\n // Add server\n auth_server_add($server);\n\n // Success... display normal page\n display_page();\n}", "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "public function addDomains(array $hosts): void;", "public function serversInit()\n\t{\n\t\t$api_root=$this->getPath();\n\t\t$p=opendir($api_root);\n\t\twhile(false!==($d=readdir($p)))\n\t\t{\n\t\t\tif($d!='.' && $d!='..' && is_dir($api_root.'/'.$d))\n\t\t\t{\n\t\t\t\tif(file_exists($api_root.'/'.$d.'/init.php') && file_exists($api_root.'/'.$d.'/config.xml'))\n\t\t\t\t{\n\t\t\t\t\t$settings=@simplexml_load_file($api_root.'/'.$d.'/config.xml');\n\t\t\t\t\tif(!$settings){\n\t\t\t\t\t\t$this->setError('Not inited: '.$d.'; wrong config file.');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t#die_r($settings->api->name);\n\t\t\t\t\t\t$this->registerEngine((String)$settings->api->name,$settings->api->protocols);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function selectServers() {\n \n $query = $this->conection->query(\"SELECT nameserver FROM Servidor\");\n $result = array();\n while ($rst = $this->conection->result($query)) {\n\n $name = $rst[\"nameserver\"]; \n array_push($result, $name);\n }\n\n $this->conection->free($query);\n //$this->conection->closeConection();\n return $result;\n }", "public function __construct(array $servers)\n {\n foreach ($servers AS $key => $server) {\n if (array_key_exists($server['driver'], array_keys(static::$drivers))) {\n $this->servers[$key] = new static::$drivers[$server['driver']] ($server);\n } else {\n throw new Exception('Cache driver `'.$server['driver'].'` not found');\n }\n }\n }", "public function addContainerServices()\n {\n $this->replaceParamsObject();\n\n $this->addCommonServices();\n\n if ( $this->container->platform->isBackend() )\n {\n $this->addAdminServices();\n }\n else\n {\n $this->addSiteServices();\n }\n }", "function addServer($host, $port, $weight=0) {\n return $this->memcached->addServer($host, $port, $weight);\n }", "public function getCachedServersAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':servers', 10, function () {\n return $this->servers()->latest()->get();\n });\n }", "public function registerServices()\n {\n /**\n * @var $container Container\n */\n $container = $this->getContainer();\n\n $services = $container->settings['services'];\n\n if (is_array($services) && !empty($services)) {\n foreach ($services as $service) {\n /**\n * @var $instance ServiceInterface\n */\n $instance = new $service();\n\n $container[$instance->name()] = $instance->register();\n\n unset($instance);\n }\n }\n\n unset($container, $services, $service);\n }", "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "private function addServer($retry=0) {\n\t\ttry {\n \t$this->gearman->addServer(GEARMAN_HOST, GEARMAN_PORT);\n\t\t} catch(GearmanException $e) {\n\t\t\t$retry++;\n\t\t\tif ($retry > self::MAX_RETRY) {\n\t\t\t\t$log = \"Maximum retry times of '\".self::MAX_RETRY.\"' reached, exit the retry process!\";\n\t\t\t\t$this->do_log('auth_code', $log);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tsleep(6);\n\t\t\t$log = \"Could not add the service server, retry \".$retry;\n\t\t\t$this->do_log('auth_code', $log);\n\t\t\treturn $this->addServer($retry);\n\t\t}\n\t\treturn true;\n\t}", "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "public static function add_providers() {\n\t\t$args = func_get_args();\n\t\tif($args) {\n\t\t\tif(is_array($args[0])) {\n\t\t\t\tself::$providers += $args[0];\n\t\t\t} elseif(count($args) == 2) {\n\t\t\t\tself::$providers[$args[0]] = $args[1];\n\t\t\t} else {\n\t\t\t\tuser_error(__METHOD__ . ' expects either an array of providers or a URL scheme and JSON API endpoint');\n\t\t\t}\n\t\t} else {\n\t\t\tuser_error(__METHOD__ . ' expects either an array of providers or a URL scheme and JSON API endpoint');\n\t\t}\n\t}", "public function add(...$middles): void\n {\n foreach ($middles as $middleware) {\n $this->middle($middleware);\n }\n }", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function initPools()\r\n\t{\r\n\t\tforeach (array_keys($this->getPools()) as $key) {\r\n\t\t\t$this->initPool($key);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "public function __construct($serversString=\"\") {\n if ($serversString != \"\") {\n $this->con = new Memcache;\n $tmp = explode(\";\", $serversString);\n foreach ($tmp as $s) {\n $hostInfo = explode(\":\",$s);\n // Assume default port\n if (count($hostInfo) == 1)\n $hostInfo[] = 11211;\n\n $this->con->addServer($hostInfo[0], $hostInfo[1], true, 1);\n }\n }\n else {\n // Fall back to file cache or whatbnot ?\n }\n }", "protected function createSingleClients(array $servers, array $options = [])\n {\n $clients = [];\n\n foreach ($servers as $key => $server) {\n $clients[$key] = new Client($server, $options);\n }\n\n return $clients;\n }", "protected function registerServiceProviders()\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }", "public static function run()\n {\n // Suppose we have the filtered `$serverCollection` variable\n\n // Validating the servers the tasks should run on.\n // (Auth object, configurations etc)\n foreach ($serverCollection as $Server) {\n $Server->validate();\n }\n\n // running tasks on servers\n }", "protected function registerServiceProviders()\n {\n foreach($this->providers as $provider)\n {\n // check if the provider class exists\n if (class_exists($provider))\n {\n // register this service provider, and Instantiate it.\n $service = new $provider($this);\n\n // check if the service provider has a boot method.\n if (method_exists($service, 'register')) {\n $service->register();\n }\n\n // save the active provider so that we can call it later.\n $this->activeProviders[$provider] = $service;\n }\n }\n }", "public function addServer () {\n return view ('server/add');\n }", "public function getServers($filter=\"\"){\n\t\t$servers = DB::table('servers')\n\t\t\t\t\t\t\t->where('name', 'LIKE', '%' . $filter . '%' )\n\t\t\t\t\t\t\t->orWhere('servers.description', 'LIKE', '%' . $filter . '%' )\n ->orWhere('categories.description', 'LIKE', '%' . $filter . '%' )\n ->join('categories', 'servers.category_id', '=', 'categories.id')\n ->select('servers.*', \n 'categories.description as category_description', \n 'categories.color as category_color')\n ->orderBy('name')\n\t\t\t\t\t\t\t->get();\n\n\t\tforeach($servers as $server){\n\t\t\t$this->getServerLastMetrics( $server );\n\t\t\t$this->getServerThresholdValue($server, 'ip');\n\t\t\t$this->getServerThresholdValue($server, 'connections');\n\t\t}\n return $servers;\n }", "function loadServerInfo() {\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curServer = 0; // next position in the server array to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($this->servers[$curServer])) {\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->servers[$curServer]) && $numConnections < self::MAX_CONNECTIONS_SERVER; $curServer++) {\n\t\t\t\t\n\t\t\t\tswitch ($this->servers[$curServer][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgief\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgie3\\x05\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $this->servers[$curServer][0].':'.$this->servers[$curServer][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curServer] = array($connection, &$this->servers[$curServer], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // TODO: find out how great it really can be\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // by my calc the max size is 850, but trying to read more doesn't harm\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t// var_dump($datalen);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinfo\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 15 || substr($data, 0, 15) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinf35\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = substr((string)$data[0], 14);\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[3];\n\t\t\t\t\t\t$flags = (int)$data[4];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['progression'] = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 8; isset($data[$i+2]); $i += 2) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+1];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[3];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[4];\n\t\t\t\t\t\t$flags = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[8];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[9];\n\t\t\t\t\t\t$connection[1]['num_players_ingame'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players_ingame'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 10; isset($data[$i+4]); $i += 5) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['clan'] = (string)$data[$i+1];\n\t\t\t\t\t\t\t$player['country'] = (int)$data[$i+2];\n\t\t\t\t\t\t\t// $player['countrydata'] = self::getCountry($player['country']);\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+3];\n\t\t\t\t\t\t\t$player['ingame'] = (bool)$data[$i+4];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* drop it, because there comes only one packet to analyse */\n\t\t\t\tunset($connections[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_SERVER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}", "protected function createSingleClients(array $servers) {\n $clients = array();\n\n foreach ($servers as $key => $server) {\n \tif ($key === 'cluster') continue;\n\n $redis = new Redis();\n\n $host = empty($server['host']) ? '127.0.0.1' : $server['host'];\n $port = empty($server['port']) ? '6379' : $server['port'];\n $timeout = empty($server['timeout']) ? 0 : $server['timeout'];\n\n if (isset($server['persistent']) && $server['persistent']) {\n \t$redis->pconnect($host, $port, $timeout);\n } else {\n \t$redis->connect($host, $port, $timeout);\n }\n\n if (!empty($server['prefix'])) {\n \t$redis->setOption(Redis::OPT_PREFIX, $server['prefix']);\n }\n\n if (!empty($server['database'])) {\n \t$redis->select($server['database']);\n }\n\n if (!empty($server['serializer'])) {\n \t$serializer = Redis::SERIALIZER_NONE;\n \tif ($server['serializer'] === 'php') {\n \t\t$serializer = Redis::SERIALIZER_PHP;\n \t} else if ($server['serializer'] === 'igbinary') {\n \t\tif (defined('Redis::SERIALIZER_IGBINARY')) {\n $serializer = Redis::SERIALIZER_IGBINARY;\n } else {\n $serializer = Redis::SERIALIZER_PHP;\n }\n \t}\n \t$redis->setOption(Redis::OPT_SERIALIZER, $serializer);\n }\n\n $clients[$key] = $redis;\n }\n\n return $clients;\n }", "public function addServer($target, $alias = null)\n {\n if (is_array($target)) {\n foreach ($target as $key => $server) {\n $this->_addServer($server, $key);\n }\n } else {\n $this->_addServer($target, $alias);\n }\n }", "public static function provideServerURLs () : iterable {\n yield [[], \"http://localhost\"];\n yield [[\"UNRELATED\" => \"ANYTHING\"], \"http://localhost\"];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"http://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"443\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_X_FORWARDED_PROTO\" => \"https\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_FORWARDED\" => \"for=192.0.2.43, for=\\\"[2001:db8:cafe::17]\\\", proto=https, by=203.0.113.43\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"8443\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTPS\" => \"on\",\n ],\n \"https://acme.tld:8443\"\n ];\n\n\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public function virtualServers()\n {\n return $this->hasMany(VirtualServer::class)->get();\n }", "protected function setupRemoteService()\n {\n $this->remoteServiceAdapter = new DummyRemoteServiceAdapter(array('product'));\n\n for ($i = 0; $i < 20;$i++) {\n $entity = new RemoteEntity();\n $entity->id = $i;\n $this->remoteServiceAdapter->add($entity);\n }\n\n $this->manager->addServiceAdapter($this->remoteServiceAdapter);\n }", "public function add($candidateList)\n {\n foreach (func_get_args() as $candidate) {\n $this->bootstrapCandidates[] = $candidate;\n }\n }" ]
[ "0.70336735", "0.6791217", "0.64767593", "0.6223394", "0.60119027", "0.5996613", "0.5981831", "0.5955893", "0.59548634", "0.59018725", "0.58974683", "0.57888085", "0.57670546", "0.5724056", "0.57238764", "0.5692051", "0.56763506", "0.5642057", "0.5618694", "0.5602624", "0.5570044", "0.5552284", "0.55160636", "0.5469255", "0.546002", "0.54521966", "0.5445308", "0.54063576", "0.5342503", "0.5330814", "0.5322997", "0.5293645", "0.5291214", "0.52884597", "0.52810127", "0.5280016", "0.5259868", "0.525771", "0.52099043", "0.5198384", "0.51918584", "0.51643425", "0.51598185", "0.5157918", "0.51490796", "0.5147772", "0.51360303", "0.5129058", "0.51162994", "0.51016545", "0.50934595", "0.508682", "0.5079197", "0.50660366", "0.505471", "0.504759", "0.5011778", "0.50107586", "0.50104916", "0.50055027", "0.49912325", "0.49831852", "0.49707243", "0.49551892", "0.49520993", "0.49345255", "0.4924821", "0.4909366", "0.48872074", "0.48860574", "0.48769957", "0.48700222", "0.4866281", "0.4848329", "0.48385438", "0.48298395", "0.4810572", "0.48060802", "0.48030713", "0.47981006", "0.47938964", "0.4791375", "0.47893432", "0.4785256", "0.4781161", "0.47795907", "0.47730985", "0.47690126", "0.47669965", "0.4755426", "0.47491157", "0.47413695", "0.47333652", "0.47150257", "0.47076598", "0.47006616", "0.46957564", "0.46938345", "0.46894363", "0.46773952" ]
0.6861925
1
Add Add an item to memcached
function add($key, $value, $expire=0) { return $this->memcached->add($key, $value, $expire); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($item);", "public function add($item);", "function object_cache_add($key, $data, $flag = '', $expire = 0) {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->add($key, $data, $flag, $expire);\n}", "function append($key, $value) {\n return $this->memcached->append($key, $value);\n }", "function add($item);", "public function add(string $key, mixed $item): self;", "function add($name, $key, $data) {\n if (!isset($this->cache[$name])) {\n $this->cache[$name] = array();\n }\n $this->cache[$name][$key] = $data;\n $data = json_encode($data);\n //error_log(\"Added to cache: '$name' key: '$key' data: '$data'\");\n }", "public function addItem($key, $value);", "function wp_cache_add($key, $data, $flag = '', $expire = 0)\n{\n global $wp_object_cache;\n return $wp_object_cache->add($key, $data, $flag, $expire);\n}", "public function add($key, $data, $ttl = 0) {\n\treturn self::$memcache->add($key, $data, self::COMPRES, $ttl);\n }", "public function add($key, $data, $ttl = 0);", "public function add($key, $data, $ttl = 0);", "public function add($item) {\n $this->items[$item->id()] = $item;\n }", "public function addKey( $key, $value )\n {\n /** @var $client \\Memcached */\n $client = $this->getClient();\n $client->add( $key, $value );\n }", "function wp_cache_add($key, $data, $group = '', $expire = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $data, $group, (int) $expire);\n}", "public function add($entity)\r\n {\r\n \t$cacheKey = $this->getCacheKey($entity->getPrimaryKey());\r\n \t$this->_entities[$cacheKey] = $entity;\r\n }", "public function add($item, $id = null);", "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "function wp_cache_add($key, $data, $group = '', $expire = 0)\n {\n }", "public function add();", "public function add();", "public function add($key,$var,$ttl);", "public function add($key, $value, $duration) {\n\t\tif ($duration > 30 * DAY) {\n\t\t\t$duration = 0;\n\t\t}\n\n\t\treturn $this->_Memcached->add($key, $value, $duration);\n\t}", "abstract public function add_item();", "public function add($item)\n {\n $this->queueItems[] = $item;\n }", "public function addKey($key, $data) {\n\t $this->_memcached->add($key, $data);\n\t return $this;\n\t}", "public function add($key,$data,$lifetime=false)\n {\n if (!$this->m_active)\n {\n return false;\n }\n\n if($lifetime === false) $lifetime = $this->m_lifetime;\n return apc_add($this->getRealKey($key), serialize($data), $lifetime);\n }", "public function add($item, $id){\n $storedItem = ['qty' => 0,\n 'price'=>$item->price,\n 'item' => $item]; //servirá para os grupos, para nao tar a adicionar 2 da mesma coisa\n\n if($this->items){ //verificar se ja ha items no array\n if (array_key_exists($id, $this->items)){ //verificar se ja existe o item que eu quero adicionar\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->price;\n\n }", "protected function add() {\n\t}", "public function add ($item) {\n $objData = get_object_vars($item);\n $keys = array_keys($objData);\n // Query time.\n $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', $keys) . ') VALUES (:' . implode(',:', $keys) . ')';\n $this->query($sql, $objData);\n // Update the item primary key if single before returning it.\n/*\n if (count($this->keys) === 1) {\n $pk = current($this->keys);\n $item->$pk = $this->pdo->lastInsertId();\n }\n*/\n return $item;\n }", "public function add($key, $data, $ttl = 0) {\n\treturn self::$r->add($key, $data, $ttl);\n }", "public function add($key, $value, $expiry = 0) {}", "function saveItem(cacheItem $item);", "public function add($key, $var, $ttl = 0)\n {\n $key = \"{$this->prefix}{$key}\";\n $return = false;\n if ($this->useAPC) {\n $return = \\apc_add($key, $var, $ttl);\n } else {\n $this->dbCache->IWillBeCareful();\n $this->dbCache->Query(\n sprintf(\n self::EXPIRE,\n \"{$this->dbCacheTablePrefix}cache\"\n ),\n time()\n );\n try {\n $this->dbCache->Query(\n sprintf(\n self::INSERT,\n \"{$this->dbCacheTablePrefix}cache\"\n ),\n array(\n \"cache_key\" => $key,\n \"cache_var\" => \\serialize($var),\n \"cache_expire_at\" => $ttl != 0 ? time() + $ttl : null\n )\n );\n $return = true;\n } catch (\\PDOException $ignored) {\n }\n }\n return $return;\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function add(...$items);", "public function add($key, $value)\n {\n $this->storage[$key] = $value;\n }", "function wp_cache_add($key, $data, $group = '', $expire = 0)\r\n\t{\r\n\t\tstatic $exists = null;\r\n\t\tif (null === $exists) {\r\n\t\t\t$exists = function_exists('wp_suspend_cache_addition');\r\n\t\t}\r\n\r\n\t\tif (!$exists || !wp_suspend_cache_addition()) {\r\n\t\t\tglobal $wp_object_cache;\r\n\t\t\tif (empty($group)) { $group = 'default'; }\r\n\t\t\treturn $wp_object_cache->add($key, $data, $group, $expire);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function add($item)\n {\n $this->manuallyAddedData[] = $item;\n }", "function addServer($host, $port, $weight=0) {\n return $this->memcached->addServer($host, $port, $weight);\n }", "function addCache( $results ) {\n\t\tif ( !$this->postID )\n\t\t\treturn false;\n\t\t\t\n\t\t$sql = \"INSERT INTO $this->cacheTable (post_id,cached_result) VALUES (\" . $this->db->escape( $this->postID ) . \", '\" . $this->db->escape( $results ). \"')\";\n\t\t\n\t\t$results = $this->db->query( $sql );\n\t\n\t\tif ( !$results )\n\t\t\treturn false;\n\t \n\t\treturn true;\n\t}", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function addItem($item){\n $this->items[] = $item;\n }", "public function add( $item )\n\t\t{\n\t\t\tarray_push( $this->items, $item );\n\t\t}", "public function add($value);", "public function add($value);", "public function add($key, $value, $expire = 0, array $options = array())\r\n {\r\n return apc_add($key, $value, $expire);\r\n }", "function addItemForUpdate($item) {\n $this->_update[$item->getId()] = $item;\n }", "function add($key, $pVal, $exp = 0) {\n\t\t\t$file = CACHE_DIR.md5($key).\".cache\";\n\t\t\tif(!file_exists($file)) {\n\t\t\t\treturn $this->set($key,$pVal,$exp);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "public function addToCart()\n\t{\n\t\t$id \t= $this->request['item_id'];\n\t\t$number = intval($this->request['quantity']);\n\t\t\n\t\t#permission and enabled?\n\t\t$this->registry->ecoclass->canAccess('cart', false);\n\t\t\n\t\t#init\n\t\t$checks \t\t= array();\n\n\t\t#break up the item classification that we're adding to our cart\t\t\t \n\t\t$item_input_name = explode('_' , $id);\n\n\t\t$type \t\t\t= $item_input_name[0];\n\t\t$id \t\t\t= $item_input_name[1];\n\t\t$banktype \t\t= strtolower($item_input_name[2]);\n\n\t\t#loan hotfix\n\t\t$type\t\t\t= ( $banktype != 'loan' ) ? $type : $banktype;\n\t\t\n\t\t#grab this cart types class object\n\t\t$cartItemType = $this->registry->ecoclass->grabCartTypeClass($type);\n\n\t\t#format number a bit..\t\n\t\t$number = $this->registry->ecoclass->makeNumeric($number, true);\n\n\t\t#grab item from cache\n\t\t$theItem\t= $cartItemType->grabItemByID($id);\n\t\t\t\t\n\t\t#check for any illegal activity :shifty:\n\t\t$checks = $this->checkCartAdditions( $id, $type, $banktype, $number, $theItem, false, $cartItemType );\n\t\t\n\t\t#if after all that we have an error...\n\t\tif ( $checks['error'] )\n\t\t{\n\t\t\t$this->registry->output->showError( $checks['error'] );\n\t\t}\n\n\t\t#no error? Lets throw the item and number in our cart!\n\t\tif ( $checks['cartItem'] )\n\t\t{\n\t\t\t$add2Item = array('c_quantity' => $checks['cartItem']['c_quantity'] + $checks['number'] );\n\t\t\t\t\t\t\t\n\t\t\t$this->DB->update( 'eco_cart', $add2Item, 'c_member_id = ' .$this->memberData['member_id'].' AND c_id = '.$checks['cartItem'] ['c_id'] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$newItem = array( 'c_member_id' \t=> $this->memberData['member_id'],\n\t\t\t\t\t\t\t 'c_member_name'\t=> $this->memberData['members_display_name'],\n\t\t\t\t\t\t\t 'c_type' \t\t\t=> ( $type == 'loan' ) ? 'bank' : $type,\n\t\t\t\t\t\t\t 'c_type_id' \t\t=> $id,\n\t\t\t\t\t\t\t 'c_type_class' \t=> ( $type == 'bank' || $type == 'loan' ) ? $banktype : '',\n\t\t\t\t\t\t\t 'c_quantity'\t\t=> $checks['number'],\n\t\t\t\t\t\t\t);\n\t\t\t$this->DB->insert( 'eco_cart', $newItem );\n\t\t}\n\t\t\n\t\t#redirect message and show what we added\n\t\t$redirect_message = $cartItemType->add2CartRedirectMessage($checks, $theItem);\n\t\t\n\t\t$this->registry->output->redirectScreen( $redirect_message, $this->settings['base_url'] . \"app=ibEconomy&amp;tab=buy&amp;area=cart\" );\n\t}", "public function set($key, $value) {\n $this->memcached->set($key, $value);\n }", "public function add($id)\n {\n \tif(empty($this->items))\n \t{\n \t\t$item = new ShoppingItem($id,1);\n\t\t\t$this->session->push(self::SHOPPINGCART, $item);\n\t\t\t$this->items[] = $item;\n \t}else\n \t{\n \n \t\tif($this->getItem($id))\n \t\t{\n \t\t\t$item = $this->getItem($id);\n \t\t\t$item->quantity += 1;\n \t\t}\n else\n {\n \t\t$item = new ShoppingItem($id,1);\n \t\t$this->session->push(self::SHOPPINGCART,$item);\n \t\t$this->items[] = $item;\n }\n \t} \n \t\n }", "private function addItemToCollection()\n {\n $this->collection->items[$this->cart_hash] = $this;\n\n }", "public function addToCache(string $key, $data,string $status, $ttl=10*60){\n if(!(Str::startsWith($status, '5')||Str::startsWith($status, '4'))){\n Cache::add($key,$data,$ttl);\n }\n }", "function set ($key, $value) {\n return $this->memcached->set($key, $value);\n }", "public function add(string $key, mixed $value, int $expire = 0): bool\n {\n // nor in memory)\n if ($this->get($key) !== false) {\n return false;\n }\n\n // store the value in memory, so that when we ask for it again later\n // in this same request, we get the value we just set\n $success = $this->local->set($key, $value, $expire);\n if ($success === false) {\n return false;\n }\n\n $this->defer->add($key, $value, $expire);\n\n return true;\n }", "public function add($obj, $key = NULL) {\n try{\n if ($key == NULL) {\n $this->Items[] = $obj;\n } else {\n $this->Items[$key] = $obj;\n }\n }catch(Exception $e){\n throw $e;\n }\n }", "public function add($data)\n {\n }", "public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }", "public function addItem(Cart $cart, CartItem $item);", "public function setACacheItem()\n {\n $item = new CacheItem(\n [\n 'data' => ['test'],\n 'key' => 'test'\n ]\n );\n $server = $this->getMemcachedMock(['set']);\n $server->expects($this->once())\n ->method('set')\n ->with('cache-bin:test', $item->getData(), 120)\n ->willReturn(true);\n $this->driver->server = $server;\n $this->assertSame($this->driver, $this->driver->set($item));\n }", "abstract public function installMemcached();", "public function add($item, $key = null)\n {\n if(is_null($key))\n {\n $this->list[] = $item;\n }\n else\n {\n if(isset($this->list[$key]))\n {\n throw new CollectionKeyAlreadyExist(\"The key provided has already been used in this collection\");\n }\n else\n {\n $this->list[$key] = $item;\n }\n }\n\n }", "public function add( $data, $shard = NULL );", "public static function load()\n {\n if (!extension_loaded('opencensus')) {\n trigger_error('opencensus extension required to load Memcached integrations.', E_USER_WARNING);\n return;\n }\n\n // bool Memcached::add ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'add', [self::class, 'handleAttributes']);\n\n // bool Memcached::addByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'addByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::append ( string $key , string $value )\n opencensus_trace_method('Memcached', 'append', [self::class, 'handleAttributes']);\n\n // bool Memcached::appendByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'appendByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::cas ( float $cas_token , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'cas', [self::class, 'handleCas']);\n\n // bool Memcached::casByKey ( float $cas_token , string $server_key , string $key , mixed $value\n // [, int $expiration ] )\n opencensus_trace_method('Memcached', 'casByKey', [self::class, 'handleCasByKey']);\n\n // int Memcached::decrement ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrement', [self::class, 'handleAttributes']);\n\n // int Memcached::decrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::delete ( string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'delete', [self::class, 'handleAttributes']);\n\n // bool Memcached::deleteByKey ( string $server_key , string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'deleteByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::flush ([ int $delay = 0 ] )\n opencensus_trace_method('Memcached', 'flush');\n\n // mixed Memcached::get ( string $key [, callable $cache_cb [, int &$flags ]] )\n opencensus_trace_method('Memcached', 'get', [self::class, 'handleAttributes']);\n\n // mixed Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, int $flags ]] )\n opencensus_trace_method('Memcached', 'getByKey', [self::class, 'handleAttributesByKey']);\n\n // mixed Memcached::getMulti ( array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMulti', [self::class, 'handleAttributes']);\n\n // array Memcached::getMultiByKey ( string $server_key , array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMultiByKey', [self::class, 'handleAttributesByKey']);\n\n // int Memcached::increment ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'increment', [self::class, 'handleAttributes']);\n\n // int Memcached::incrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'incrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::prepend ( string $key , string $value )\n opencensus_trace_method('Memcached', 'prepend', [self::class, 'handleAttributes']);\n\n // bool Memcached::prependByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'prependByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::replace ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replace', [self::class, 'handleAttributes']);\n\n // bool Memcached::replaceByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replaceByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::set ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'set', [self::class, 'handleAttributes']);\n\n // bool Memcached::setByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::setMulti ( array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMulti', [self::class, 'handleSetMulti']);\n\n // bool Memcached::setMultiByKey ( string $server_key , array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMultiByKey', [self::class, 'handleSetMultiByKey']);\n }", "public function try_to_add_item( $item ) {\n\t\t_deprecated_function(\n\t\t\t'Jetpack_Sitemap_Buffer::try_to_add_item',\n\t\t\t'5.3.0',\n\t\t\t'Jetpack_Sitemap_Buffer::append'\n\t\t);\n\t\t$this->append( $item );\n\t}", "function add($item) {\n\t\t\tif(!$this->contains($items)) {\n\t\t\t\tarray_push($this->items, $item);\n\t\t\t}\n\t\t}", "function addItem(SitemapItem $item){\r\n $this->items[] = $item;\r\n }", "function cache_Push($newCC){\n \t\t// [1317144348] => Array (\n\t\t // [ID] => 1317144348\n\t\t // [ProviderName] => snappi\n\t\t // [Auditions] => Array()\n\t\t\t\t// ))\n\t\t$this->cache_Age($newCC);\t// saves a write to Session this way\n\t}", "function item_put($key = null)\n {\n $incoming = key($this->put());\n // decode record before anything, as assoc array\n $record = json_decode($incoming,true);\n // item ID specified as segment or query parameter\n if (($key == null) || ($key == 'id'))\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $record);\n }\n $this->crud_put($record);\n }", "public function add() {\n $page = 'basket';\n $id = $_GET['id'];\n\n $product = $this->productManager->findOne($id);\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }", "public function addItem($item)\n\t{\n\t\t$this->_items[] = $item;\n\t}", "protected function trackAdd($item, $key) {\n\t\t/** @var RepeaterPage $item */\n\t\t$item->traversalPages($this);\n\t\tparent::trackAdd($item, $key);\n\t}", "public function add($item, int $index): void;", "public function setex($key, $value)\n\t{\n\t\treturn $this->memcache->add($key, $value);\n\t}", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "static function addCache($query,$rows,$fnId=\"\") {\n if (!$fnId) {\n $fnId=date(\"d-m-y-h-i-s\").rand(10000,99999).\".txt\"; \n } \n $cacheMap[] = [\"query\" => $query, \"fnId\" => $fnId];\n file_put_contents(Caching::getCachePath() . \"cachemap.txt\",$query.\"|\".$fnId.\"^\",FILE_APPEND | LOCK_EX);\n Caching::cacheWrite($fnId,$rows);\n Caching::logWrite(\"$query added to cache\");\n }", "public function add(string $key, $element): void;", "function add($key, $pVal, $exp = 0) {\n\t\t\treturn $this->inst->add($key,$pVal,0,$exp);\n\t\t}", "function addItem($itemKey){\n\t\t\t//if the item already exsists in the cart, add one.\n\t\t\tif(isset($this->items[$itemKey])){\n\t\t\t\t$this->items[$itemKey]['quantity'] = $this->items[$itemKey]['quantity'] + 1; \n\t\t\t}\n\t\t\t\n\t\t\t//if the item is not already set in the cart.\n\t\t\t//Find the correct price off the item from the server side $products\n\t\t\t//note - I am looking up the prices server-side to protect from customers entering in their own prices in the html\n\t\t\telse{\n\t\t\t\t//find the corresponding product based on the product name (keys would be preferable)\n\t\t\t\tforeach($GLOBALS['products'] as $product){\t\t\n\t\t\t\t\tif($itemKey == $product['name']){\n\t\t\t\t\t\t//set the item price server-side\n\t\t\t\t\t\t$itemPrice = $product['price'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//if there is a valid product with that name (key) and therefore has a corresponding price.\n\t\t\t\t//add it to the cart otherwise ignore it\n\t\t\t\t//note - This protects the server from having items in the shopping cart that don't exsist server side. \n\t\t\t\tif(isset($itemPrice)){\n\t\t\t\t\t$this->items[$itemKey] = array( \"name\" => $itemKey, \"price\" => $itemPrice , \"quantity\" => 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\treturn;\n\t\t}", "function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }", "public function addItem($obj, $key)\n {\n if ($this->keyExists($key)) {\n throw new KeyAlreadyInUse(\n \"Key: \" . $key . ' is already in use; unique key required'\n );\n }\n $this->items[$key] = $obj;\n }", "private function _addIpToStorage($ip)\n {\n if(isset($this->_ipStorage[$ip]))\n {\n $this->_ipStorage[$ip]++;\n }\n else\n {\n $this->_ipStorage[$ip] = 1;\n } \n }", "private function addKey($key)\n {\n $keys = $this->getKeys();\n\n // Don't add duplicate keys into our store\n if (!in_array($key, $keys)) {\n $keys[] = $key;\n }\n\n $this->saveKeys($keys);\n }", "public function add(string $key, mixed $value, int $duration = NULL): bool {\n $return = FALSE;\n $duration = $duration !== NULL ? (int)$duration : $this->duration;\n if ($this->driver) {\n $return = $this->driver->add($key, $value, $duration);\n }\n return $return;\n }", "function add( $id, $payload ) {\t\t$this->items[ $id ] = $payload;\n\t}", "protected function doAdd($id, $data, $ttl = Cache::TTL_NO_EXPIRY)\n {\n return parent::doAdd($id, $data, $ttl);\n }", "public function test_add_item(): void\n {\n // Arrange\n $user = UserFactory::createOne()->object();\n $collectionLevel1 = CollectionFactory::createOne(['owner' => $user]);\n $collectionLevel2 = CollectionFactory::createOne(['parent' => $collectionLevel1, 'owner' => $user]);\n $collectionLevel3 = CollectionFactory::createOne(['parent' => $collectionLevel2, 'owner' => $user]);\n ItemFactory::createOne(['collection' => $collectionLevel3, 'owner' => $user]);\n\n // Act\n $this->refreshCachedValuesQueue->process();\n\n // Assert\n $this->assertSame(1, $collectionLevel1->getCachedValues()['counters']['items']);\n $this->assertSame(1, $collectionLevel2->getCachedValues()['counters']['items']);\n $this->assertSame(1, $collectionLevel3->getCachedValues()['counters']['items']);\n }", "public function addItem($item, $key=null)\r\n\t{\r\n\t\tif (isset($item))\r\n\t\t{\r\n\t\t\tif (isset($key)) {\r\n\t\t\t\t$this->_items[$key] = $item;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->_items[] = $item;\r\n\t\t\t}\r\n\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function add(){\n\n\t\t$db = new dbconnection();\n\t\t$conn = $db->startconnection();\t\n\n\t\t$query = $conn->prepare(\"INSERT INTO item(`item_code`,`item_category`,`item_subcategory`,`item_name`,`quantity`,`unit_price`) values (?,?,?,?,?,?)\");\n\n\t\t$query->bind_param(\"ssssss\",$this->itemcode,$this->category,$this->subcategory,$this->itemname,$this->quantity,$this->uprice);\n\t\t\t\n\t\t\tif($query->execute()){\n\n\t\t\treturn 1;\n\n\t\t}else{\n\n\t\t\treturn 0;\n\n\t\t}\n\n\n\t\t}", "public function add_entry($entry);", "public function add(string $key, mixed $value, mixed $type = null): void;", "function store($key, $data, $TTL = 0);", "public function cache($id, $data)\n {\n if (!$this->config['redis_cache']['enabled']) {\n return false;\n }\n\n // Adds tweets with specified scores to the sorted set stored at key.\n $this->cache->zadd('tweet', [$id => $id]);\n\n // Add tweets to specified fields to their respective values in the hash stored at key.\n $this->cache->hmset(sprintf('tweet:%s', $id), $data);\n }", "public function addAt($key, $value);" ]
[ "0.69213194", "0.69213194", "0.6738512", "0.6688961", "0.65744686", "0.6517843", "0.6498053", "0.6496521", "0.64747566", "0.6471837", "0.64649683", "0.64649683", "0.64479023", "0.6439539", "0.6396897", "0.63806367", "0.63104117", "0.63025844", "0.6294284", "0.6280999", "0.6280999", "0.6264335", "0.62481165", "0.6204914", "0.6106242", "0.6093192", "0.6081919", "0.59935564", "0.5982675", "0.59472036", "0.5877509", "0.58660865", "0.58634835", "0.58555794", "0.58511096", "0.58511096", "0.58473855", "0.5840181", "0.583714", "0.5830607", "0.58204997", "0.5817001", "0.57941014", "0.57941014", "0.57941014", "0.57916987", "0.57874054", "0.5768074", "0.57665026", "0.57665026", "0.5755289", "0.5743728", "0.57356584", "0.5719244", "0.5712839", "0.5709565", "0.57032746", "0.56947947", "0.56871855", "0.56600356", "0.5658865", "0.5651251", "0.5649052", "0.5646505", "0.5637466", "0.5629728", "0.5625455", "0.56160927", "0.5594235", "0.55898386", "0.55847615", "0.55750054", "0.555459", "0.55479836", "0.5546295", "0.54842323", "0.5484109", "0.54765016", "0.54739726", "0.5468654", "0.5460614", "0.54594064", "0.5456333", "0.5449152", "0.54475826", "0.544538", "0.5440202", "0.54351026", "0.5432646", "0.54322064", "0.54261124", "0.54205793", "0.54185414", "0.5415399", "0.5409183", "0.5405793", "0.54053235", "0.5404711", "0.5403359", "0.53983957" ]
0.6541563
5
Append Append a string to a item already stored
function append($key, $value) { return $this->memcached->append($key, $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function append($value)\n {\n $this->items[] = $value;\n }", "function addString($string_to_add){\n\t\tsettype($string_to_add,\"string\");\n\t\tif(strlen($string_to_add)>0){\n\t\t\t$this->_Items[] = new StringBufferItem($string_to_add);\n\t\t}\n\t}", "function add($str) {\n\t $this->xml .= $str;\n\t}", "public function append($item)\n {\n array_push($this->activeValue, $item);\n }", "public function append($key, $value) {}", "function append($data) {}", "public function append(mixed $value) {\n $this->items[] = $value;\n return $this;\n }", "function addStringBuffer($stringbuffer_to_add){\n\t\tif(!isset($stringbuffer_to_add)){ return;}\n\t\tfor($i=0;$i<sizeof($stringbuffer_to_add->_Items);$i++){\n\t\t\t$this->_Items[] = $stringbuffer_to_add->_Items[$i];\n\t\t}\n\t}", "public function append($data);", "public function append($key, $value = null);", "public function append($items);", "public function append(...$items): self;", "public function append($string)\n {\n return static::create($this->str . $string, $this->encoding);\n }", "public function appendItem(\\PB_Item $value)\n {\n return $this->append(self::ITEM, $value);\n }", "protected function append($string)\n\t{\n\t\tif (is_array($this->subject)) {\n\n\t\t\t$list = [];\n\n\t\t\tforeach ($this->subject as $item) {\n\t\t\t\t$list[] = $item = $item.$string;\n\t\t\t}\n\n\t\t\t$this->subject = $list;\n\n\t\t} else {\n\t\t\t$this->subject = $this->subject.$string;\n\t\t}\n\n\t\treturn $this;\n\t}", "private function append($value)\n {\n \t$this->values[] = $value;\n }", "protected abstract function addString($string);", "public function addItem($item) {\n\t\t$this->result .= '<li>' . $item . '</li>' . PHP_EOL;\n\t}", "protected abstract function append($token);", "private function append($key, $val)\n {\n $this->_data[$key] = sprintf(\"%s%s%s\", $this->_data[$key], $this->_join, $val);\n }", "private function appendData($string)\n {\n $this->buffer[] = $string;\n }", "public function append($value, $key = null) \n {\n $key ? $this->pushKey($key, $value) : $this->push($value);\n }", "function append(string $data): self {\n $this->buffer .= $data;\n return $this;\n }", "function append($item) {\r\n return Match::on($item)\r\n ->ListM(function($list) {\r\n return new self(array_merge($this->list, $list->value()));\r\n })\r\n ->any(function($item) {\r\n return new self(array_merge($this->list, [$item]));\r\n })\r\n ->value(); \r\n }", "public function append($section, $str) {\n\t\t\treturn \\uri\\actions::modify($this->object, 'append', $section, $str);\n\t\t}", "function appendText($dest, $text)\n{\n $dest .= $text;\n return $dest;\n}", "public function setAppend($append);", "function addItem($value, $text, $bstore=false){\n\t\t\t\tif($bstore){\n\t\t\t\t\t$this->items[] = array($value => $text);\n\t\t\t\t}else{\n\t\t\t\t\t$this->item = array($value => $text);\n\t\t\t\t}\n\n\t\t\t\treturn $this->item;\n\t\t\t}", "public function append($value)\n {\n return $this->add($value);\n }", "public function append($data)\n {\n $this->data .= $data;\n }", "public function add($value) : Str\n {\n $this->string .= $value;\n return $this;\n }", "public function addToHistory(string $item): void {\n\t\t// as before. Also don't store empty values to history.\n\t\tif (trim($item) === '' || $this->lastItem === $item) {\n\t\t\treturn;\n\t\t}\n\n\t\t\\readline_add_history($item);\n\t\t$this->lastItem = $item;\n\n\t}", "function appendText ($text) {\r\n $this->content .= $text;\r\n }", "function setAppend($text) {\n\n $this->field['append'] = $text;\n return $this;\n\n }", "public function add_content_string($item){\n\t\tarray_push($this->content,htmlentities((string)$item));\n\t\treturn $this;\n\t}", "public function addItem($key, $value);", "public function append($table, $item) {\r\n saprfc_table_append($this->fce, $table, array(\"LINE\" => \"\" . $item . \"\"));\r\n $this->arrayDebug['APPEND'][$table][] = $item;\r\n }", "function add($item);", "public function append($stringOrObject)\n {\n array_push($this->content, $stringOrObject);\n\n return $this;\n }", "public function add($item);", "public function add($item);", "public function append($string)\n {\n $this->provider->append($string);\n \n return $this;\n }", "function add()\n{\n\t$args = func_get_args();\n\t$string = array_shift($args);\n\tSystem::InterfaceHandler()->content(vsprintf($string, $args));\n}", "function media_theplatform_mpx_append_string($find, $append, $html) {\n $replace = $find . $append;\n return str_replace($find, $replace, $html);\n}", "public function appendValue($value) {\n $this->current->value($value);\n }", "abstract public function add_item();", "public function add($data)\n {\n // this method can be overloaded\n foreach (func_get_args() as $data) {\n // redefine var\n $data = (string) $data;\n\n // load data\n $value = $this->load($data);\n $key = ($data != $value) ? $data : 0;\n\n // initialize key\n if(!array_key_exists($key, $this->data)) $this->data[$key] = '';\n\n // store data\n $this->data[$key] .= $value;\n }\n }", "public function append($value) {\n $this->_value = $this->_value . $value;\n $this->countLength();\n \n return $this;\n }", "public function try_to_add_item( $item ) {\n\t\t_deprecated_function(\n\t\t\t'Jetpack_Sitemap_Buffer::try_to_add_item',\n\t\t\t'5.3.0',\n\t\t\t'Jetpack_Sitemap_Buffer::append'\n\t\t);\n\t\t$this->append( $item );\n\t}", "public function add($value)\n {\n $value = (string) $value;\n if (!in_array($value, $this->items)) {\n $this->items[] = $value;\n }\n }", "public function addData(string $data);", "public function append(string $name, array $data): void;", "public function append($key=null,$value=null){\n\n //get append\n if($key!==null && $value!==null){\n return $this->client->append($key,$value);\n }\n return null;\n\n }", "function append($content){\n\t\t$this->_String4 .= \"$content\";\n\t\treturn $this;\n\t}", "function rec($log_item)\n\t{\n\t\t$this->items[] = $log_item;\n\t}", "public function append($expression = null);", "function _appendText ($text) {\r\n if (!strlen ($text)) {\r\n return true;\r\n }\r\n switch ($this->_status) {\r\n case 0:\r\n case 7:\r\n return $this->_appendToLastTextChild ($text);\r\n case 1:\r\n return $this->_topNode ('appendToName', $text);\r\n case 2:\r\n case 4:\r\n $this->_savedName .= $text;\r\n return true;\r\n case 3:\r\n return $this->_topNode ('appendToAttribute', 'default', $text);\r\n case 5:\r\n $this->_savedValue .= $text;\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }", "public function testAppend() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->append(\"Hello\")->append(\"World\");\n\n\t\t\t$this->assertEquals(\"HelloWorld\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "public function append($name, $value)\n {\n $this->redis->append($name, $value);\n }", "function addText($key, $text);", "public function append_feed($string) {\n\t\treturn fwrite($this->handle, $string);\n\t}", "public function append(MessageInterface $message): void\n {\n $this->items[$message::class] = $message;\n }", "function append($value = \\null)\n {\n }", "function append($path, $text) {\n $file = fopen($path, 'a+b');\n fwrite($file, $text);\n fclose($file);\n}", "function add( $value ) {\n\t\t$this->source .= $value;\n\t\treturn $this;\n\t}", "function appendQuery($queryToAppend, $cart){\n $counter = 0;\n foreach ($cart as $id => $properties) {\n // First Append\n if($counter == 0){\n $queryToAppend .= 'isbn='.$properties['isbn'].' ';\n }\n // Subsequent Append\n else{\n $queryToAppend .= 'OR isbn='.$properties['isbn'].' ';\n }\n $counter++;\n }\n return $queryToAppend;\n }", "public function addItem($item){\n $this->items[] = $item;\n }", "public function add(string $key, mixed $item): self;", "public function append(string $string) : Manipulator\n {\n return new static($this->string . $string);\n }", "public function add($strKey, $varValue)\n\t{\n\t\t$this->blnIsModified = true;\n\t\t$this->arrData[$strKey] = $varValue;\n\t}", "function addItemAtBeginOf(&$target, $item){\n\t\t\t\t\n\t\t\t\tif($target != \"\" && (is_array($item) || $item !== \"\")){\n\t\t\t\t $target = arrayMerge($item, $target);\n\t\t\t\t}\n\t\t\t}", "public function appendToAttribute($attr, $str) {\n\tforeach ($this->_elArray as $el) {\n\t\t$attrValue = $el->getAttribute($attr);\n\n\t\tif($el->hasAttribute($attr)) {\n\t\t\t$attrValue = $attrValue . $str;\n\t\t}\n\t\telse {\n\t\t\t$attrValue = $str;\n\t\t}\n\n\t\t$el->setAttribute($attr, $attrValue);\n\t}\n}", "public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }", "public function appendChildCopy($item) {}", "public function appendEquipmentingItem($value)\n {\n return $this->append(self::EQUIPMENTING_ITEM, $value);\n }", "public function append ($str) {\n\t\t$this->query .= $str . \" \";\n\t\treturn $this;\n\t}", "public function add($item) {\n $this->items[$item->id()] = $item;\n }", "public static function append($append)\n {\n // Append to the page title\n self::$data['append'] = $append;\n }", "public function addToText($item)\n {\n // validation for constraint: itemType\n if (!is_string($item)) {\n throw new \\InvalidArgumentException(sprintf('The Text property can only contain items of string, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Text[] = $item;\n return $this;\n }", "public function testAppendArray() {\n\t\t\t$arr = [\"Hairy\", \"Bees\"];\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->append($arr, \"Help\");\n\n\t\t\t$this->assertEquals(\"HairyBeesHelp\", $builder->__toString());\n\t\t\tunset($builder, $arr);\n\t\t}", "public function append(self $item, ?\\SetaPDF_Core_Document $document = null, $mode = null) {}", "public function append($content)\n\t{\n\t\t$this->content .= $content;\n\t}", "public function appendItem($item): CollectionInterface;", "public static function append($index, $value)\n {\n self::exist($index);\n self::$registry[$index][] = $value;\n }", "public function append($content)\n {\n $this->content .= $content;\n }", "public static function append($string, $filename)\n {\n $context = stream_context_create();\n $fp = fopen($filename, 'r', 1, $context);\n $tmpname = md5($string);\n file_put_contents($tmpname, $fp);\n file_put_contents($tmpname, $string, FILE_APPEND);\n fclose($fp);\n unlink($filename);\n rename($tmpname, $filename);\n }", "public function writeItem($item)\n {\n $this->data[] = $item;\n }", "public function push($string) {\n\t\tif (!empty($string)) {\n\t\t\tif(!$this->duplicates && $this->objectExists($string)) return false;\n\t\t\tarray_unshift($this->objects, $string . \"\\n\"); \n\t\t\t\n\t\t\tif (count($this->objects) > $this->queueLimit && $this->queueLimit > 0) {\n\t\t\t\t$this->dequeue();\n\t\t\t}\n\t\t\tif($this->autosave) $this->save();\n\t\t}\n\t}", "function append($content) {\r\n\t\tif (is_string($content)) {\r\n\t\t\t$this->append($this->domFragment->createTextNode($content));\r\n\t\t} else {\r\n\t\t\t$this->root->appendChild($content);\r\n\t\t}\r\n\t}", "public function testAppendObject() {\n\t\t\t$obj = new class { public function __toString() { return \"Boots\"; } };\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->append(\"Cats\", $obj);\n\n\t\t\t$this->assertEquals(\"CatsBoots\", $builder->__toString());\n\t\t\tunset($builder, $obj);\n\t\t}", "public function append(Storable $storable, Storable $appends): Storable;", "public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }", "public function appendContent($content);", "public function add_buffer( $str )\n\t{\n\t\t$this->buffer.= $str;\n\t}", "function Append ( $str ) {\n // only if it's enabled to do so.\n if ($this->debug_status == 1) {\n $this->debug_count++;\n $this->debug_out .= $this->debug_count . \" : \" . $str . \"\\n\";\n }\n }", "public function append($key, $value)\n {\n // should failed.\n $sent = $this->_send(array(\n 'opcode' => 0x0e,\n 'key' => $key,\n 'value' => $value,\n ));\n $data = $this->_recv();\n if ($data['status'] == 0) {\n return TRUE;\n }\n\n return FALSE;\n }", "function addText($text);", "public function appendContent ($content) {\r\n\t\t$this->content .= (string)$content;\r\n\t}", "public function append($key, $entity)\n {\n\n $this->multiRef[$key][$entity->getId()] = $entity;\n\n }", "public function isAppend();" ]
[ "0.6764614", "0.66936725", "0.66516346", "0.6606554", "0.6585149", "0.65423286", "0.63849145", "0.63450456", "0.63356197", "0.63048935", "0.62430334", "0.61784333", "0.615957", "0.6152386", "0.6120636", "0.61172867", "0.61170846", "0.61045814", "0.608941", "0.6072969", "0.6071035", "0.6070426", "0.60656023", "0.6038245", "0.6002039", "0.5998809", "0.5989819", "0.5978061", "0.5946834", "0.59380096", "0.59322214", "0.591875", "0.5912623", "0.59114265", "0.5908833", "0.5857618", "0.5854031", "0.5852488", "0.58304816", "0.58262306", "0.58262306", "0.57828355", "0.5749104", "0.5732378", "0.57135975", "0.5712267", "0.569258", "0.56896305", "0.56833345", "0.56827027", "0.5673849", "0.5665754", "0.56547654", "0.565139", "0.5645329", "0.56329805", "0.5630952", "0.5615177", "0.5606988", "0.55891514", "0.5547646", "0.55451035", "0.55395573", "0.5528912", "0.55261415", "0.55182695", "0.54915166", "0.54564816", "0.544779", "0.543548", "0.5431079", "0.5430028", "0.54294187", "0.5425377", "0.54153675", "0.5414404", "0.5412368", "0.5409346", "0.54042614", "0.5402038", "0.5395839", "0.53943", "0.53872854", "0.53849405", "0.5384726", "0.5382852", "0.5381682", "0.53805584", "0.53735894", "0.53694", "0.53597456", "0.5351887", "0.5340587", "0.5333343", "0.5331054", "0.53222513", "0.53199255", "0.5312442", "0.5309753", "0.52998364" ]
0.5798477
41
Delete Delete an item from memcached
function delete($key, $time=0) { return $this->memcached->delete($key, $time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAnItem()\n {\n $keys = [\n 'cache-bin:user_1', 'cache-bin:article_1212'\n ];\n $key = 'article_*';\n $server = $this->getMemcachedMock(['getAllKeys', 'delete']);\n $server->expects($this->once())\n ->method('getAllKeys')\n ->willReturn($keys);\n $server->expects($this->once())\n ->method('delete')\n ->with('cache-bin:article_1212')\n ->willReturn(true);\n $this->driver->server = $server;\n $this->assertSame($this->driver, $this->driver->erase($key));\n }", "abstract public function delete_cached( $key );", "function delete ($key) {\n return $this->memcached->delete($key);\n }", "public function delInCache($key);", "public function cache_delete()\n {\n }", "public function delete($key) {\n\t\treturn $this->_Memcached->delete($key);\n\t}", "public function del($key);", "public function deleteItem($key);", "protected function _delete($var)\n\t{\n\t\treturn $this->memcached->delete($this->key_prefix . $var);\n\t}", "abstract function del ($item);", "public function delete($key);", "public function delete($key);", "public function delete($key);", "function delete($key) {\n\t\tunset($this->_cache[$key]);\n\t}", "public function delete( $key );", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "abstract public function delete($key);", "public function delete()\n {\n $this->invalidateCache();\n parent::delete();\n }", "public function delete()\n {\n $this->invalidateCache();\n parent::delete();\n }", "public function delete()\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->remove_item($this->item['id']);\n }", "abstract public function delete ($key);", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "abstract public function delete($item);", "abstract public function delete( $key );", "public function delete(string $key): CacheInterface;", "public function delete($cache_name);", "public function deleteByKey($key)\n {\n // Direct delete from memcached and local cache\n unset($this->cache[$key]);\n foreach ($this->mc as $mc) {\n $mc->delete($key);\n }\n }", "public function deleteItem($item);", "public function delete($key): void;", "function object_cache_delete($id, $flag = '') {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->delete($id, $flag);\n}", "protected function memcacheDelete($sKey) {\n \n $memcache = $this->memcacheConnect();\n $sKey = hash('sha512',$sKey);\n \n $delete_result = $memcache->remove($sKey);\n if(!$delete_result) {\n $msg = __METHOD__.\" Echec de l'effacement des données sur le serveur : $sKey\";\n $this->log($msg,Zend_Log::ERR);\n //throw new RealtimeException_Server_Temporary($msg);\n }\n \n return $delete_result;\n }", "public function deleteItem($key)\n {\n }", "public function delete($key)\n\t{\n\t\treturn $this->cacheLayer->delete($key);\n\t}", "public function delete($key){\n return $this->connection->del($key);\n }", "public abstract function delete();", "public function delete()\n {\n $sql = \"DELETE FROM \" . TB_USAGE . \" WHERE mix_id = {$this->db->sqltext($this->mix_id)}\";\n $this->db->exec($sql);\n\n //\tremove everything from cache\n $cache = VOCApp::getInstance()->getCache();\n if ($cache) {\n $cache->flush();\n }\n }", "public function delete(string $key): void;", "public function delete(){\r\n\t\t$mysqli = \\Database::Instance()->get();\r\n\r\n\t\t$stmt = $mysqli->prepare(\"DELETE FROM `hotspots` WHERE `id` = ?\");\r\n\t\t$stmt->bind_param(\"i\",$this->id);\r\n\t\t$stmt->execute();\r\n\t\t$stmt->close();\r\n\r\n\t\t\\CacheHandler::deleteFromCache(\"hotspot_\" . $this->id);\r\n\t}", "public function delete($key) {\n return apc_delete($key);\n }", "public function deleteCache()\n\t{\n\t\treturn CacheBot::delete($this->getCacheKey());\n\t}", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "function DEL()\n{\n\tif ($this->isError()) return;\n\n\t$id_memo = $this->id_memo;\n\n\t$sql = \" DELETE FROM \".$GLOBALS['prefix'].\"fiche_memos\n\t\t\t\tWHERE id_memo = $id_memo\";\n\n\tif (!Sql_exec($sql)) $this->setError(ERROR);\n\tif (!$this->isError()) Lib_sqlLog($sql);\n\n\treturn;\n}", "public function delete($key) {\n\t\t// and return the result\n\t\treturn eaccelerator_rm($key);\n\t}", "function delete($key) {\n\t\t\treturn $this->inst->delete($key);\n\t\t}", "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "public function delete ($key)\n {\n return apc_delete($key);\n }", "function remove($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->delete($key);\n }", "function remove($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->delete($key);\n }", "function removeItem($item){\n\t\tif( $item instanceof cacheItem)\n\t\t\t$item = $item->name;\n\t\tcacheItem::dropInstance($item);\n\t\treturn $this->db->delete(self::$tableName,array('WHERE name=?',$item));\n\t}", "public function delete()\n {\n $this->_clearCache();\n\n return parent::delete();\n }", "public function remove(CacheableInterface $item)\n {\n $this->connection->delete($item->getHashKey());\n }", "abstract public function doDelete($item);", "public function deleteItem(string $key): bool;", "public function deleteItem(string $key): bool;", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function delete($name, $type)\n {\n $this->memcached->delete($this->generateKey($name, $type));\n }", "function wp_cache_delete($key, $group = '', $time = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->delete($key, $group, $time);\n}", "public function delete(): void;", "function wp_cache_delete($key, $group = '')\n{\n global $wp_object_cache;\n\n return $wp_object_cache->delete($key, $group);\n}", "function remove($key) {\n return apc_delete($key);\n }", "public function deleteCache($key)\n {\n return $this->memcache->delete($key);\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public static function delete($key)\n\t\t{\n\t\t\tself::getCache()->delete($key);\n\t\t}", "private function destroyCache()\r\n\t{\r\n\t\t$memcache = new \\Memcached();\r\n\t\t$memcache->addServer('localhost', 11211);\r\n\t\t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n\t\t$cache_data = $memcache->delete($key);\r\n\t}", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "public function deleteItem()\n {\n $conds = $this->constructKeyConds();\n $query = $this->constructDeleteQuery($conds, array('start' => 0, 'limit' => 1));\n\n if ($query === false) {\n return false;\n }\n\n $result = $this->query($query);\n if ($result !== false) {\n unset($this->info);\n return true;\n }\n\n return false;\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function del()\n {\n }", "public function delete() {\n\t\tif ($this->exists) {\n\t\t\t$this->fire_event('deleting');\n\n\t\t\t$result = $this->query()->where(static::$key, '=', $this->get_key())->delete();\n\n\t\t\t$this->fire_event('deleted');\n\n\t\t\treturn $result;\n\t\t}\n\t}", "function delete() {\t\t$nop = str_repeat(\" \", $this -> size);\n\t\t//10 caratteri per diecimila\n\t\tshmop_write($this -> id, $nop, 0);\n\n\t}", "public function remove($key) {\n $this->_memcache->delete($key); //This doesn't work. See http://www.php.net/manual/en/memcache.delete.php#98826\n $this->_memcache->set($key, 'deleted', MEMCACHE_COMPRESSED, -1);\n return true;\n }", "function item_delete()\n {\n $key = $this->get('id');\n $this->supplies->delete($key);\n $this->response(array('ok'), 200);\n }", "public function delete($id) \r\n {\r\n $this->load(array('id=?',$id));\r\n $this->erase();\r\n }", "public function delete()\n {\n if($this->enabled === true){\n if (apc_delete($this->key) === true){\n return true; \n }\n else{\n Logger::log(\"Failed to invalidate cache for key: \" . $this->key);\n return false;\n }\n }\n \n return false;\n }", "public static function delete() {\n\n\n\t\t}", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "function rm($key) {\n }", "public final function delete() {\n }", "function delete (string $key) : bool {\n $key = $this->getUnsafePrefix() . $key;\n\n return $this->memcached->delete($key);\n }", "function delete() ;" ]
[ "0.76797426", "0.73623836", "0.7322962", "0.71541", "0.70508146", "0.7002791", "0.69945914", "0.69323003", "0.689129", "0.68489057", "0.6827566", "0.6827566", "0.6827566", "0.6804698", "0.6763596", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.67594", "0.675835", "0.67039996", "0.67039996", "0.66661334", "0.66603494", "0.6632556", "0.6632556", "0.66321796", "0.6631067", "0.6623986", "0.66218764", "0.65996", "0.658621", "0.6584319", "0.6576114", "0.6521078", "0.64796364", "0.6475212", "0.64593303", "0.6443225", "0.64032364", "0.6397634", "0.63707656", "0.63639504", "0.63627374", "0.636233", "0.6361045", "0.63523036", "0.63523036", "0.63523036", "0.63523036", "0.6324737", "0.63194466", "0.63164693", "0.6307975", "0.6304575", "0.6294049", "0.6294049", "0.6292745", "0.62888354", "0.6264118", "0.6240656", "0.62325555", "0.62325555", "0.62304115", "0.62257475", "0.622071", "0.62145126", "0.62125677", "0.6209589", "0.62091184", "0.6202328", "0.61856157", "0.61777514", "0.61658436", "0.6162492", "0.61594635", "0.61593306", "0.6154527", "0.61508304", "0.6150784", "0.615036", "0.6145307", "0.6141688", "0.6139362", "0.6127722", "0.6127011", "0.6123661", "0.6109233", "0.610672" ]
0.6896816
8
Delete Multi Delete multiple items from memcached
function deleteMulti($keys, $time=0) { return $this->memcached->deleteMulti($keys, $time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_cache_delete_multiple(array $keys, $group = '')\n {\n }", "function multi_delete () {\n\t\t$ids_to_delete = array();\n\t\t// Prepare ids to delete\n\t\tforeach ((array)$_POST[\"items\"] as $_cur_id) {\n\t\t\tif (empty($_cur_id)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$ids_to_delete[$_cur_id] = $_cur_id;\n\t\t}\n\t\t// Do delete ids\n\t\tif (!empty($ids_to_delete)) {\n\t\t\tdb()->query(\"DELETE FROM \".db('search_keywords').\" WHERE id IN(\".implode(\",\",$ids_to_delete).\")\");\n\t\t}\n\t\t// Return user back\n\t\treturn js_redirect($_SERVER[\"HTTP_REFERER\"]);\n\t}", "public function deleteMultiple( $keys )\n\t{\n\t\t$this->getObject()->deleteMultiple( $keys );\n\t}", "public function deleteAllForKey()\n\t{\n\t\t$keys = $this->getAllKeys();\n return parent::deleteMulti($keys);\n\t}", "public function testDelete_Multi()\n {\n \t$this->conn->delete('test', array('status'=>'ACTIVE'), DB::MULTIPLE_ROWS);\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertNull($result->fetchOrdered());\n }", "function messageDeleteBulk(Collection $messages);", "protected function entityDeleteMultiple($ids) {\n waywire_video_delete_multiple($ids);\n }", "public function delete_multiple(array $keys, $group = '')\n {\n }", "static public function deleteMulti($subject, $keys) {\n\t\tforeach($keys as $oneKey)\n\t\t\tself::delete($subject, $oneKey);\n\t}", "function seminars_delete_multiple($sids, $delete_categories = FALSE, $delete_masters = FALSE) {\n\n foreach($sids as $sid)\n seminars_delete($sid, $delete_categories, $delete_masters);\n \n}", "public function delMultiple($key)\n {\n return $this->doDelete($key);\n }", "public function multiDelete()\n {\n if(is_array(request()->item)){\n foreach (request()->item as $id) {\n $tradmark = Tradmark::findOrfail($id);\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n }else{\n $tradmark = Tradmark::findOrfail(request('item'));\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n session()->flash('success', trans('admin.deleted_successfully'));\n return redirect(route('admin.tradmarks.index'));\n }", "public function deleteMany($ids)\n {\n $placeholders = array_fill(0, count($ids), \"?\");\n $placeholders = implode(\", \", $placeholders);\n\n $sql = \"DELETE FROM `%s` WHERE `%s` IN (%s)\";\n $this->_sql[] = sprintf($sql, $this->_table, $this->_key, $placeholders);\n $parameters = array();\n foreach ($ids as $id) {\n $parameters[] = array($this->_key => $id);\n }\n $this->_parameters[] = $this->parameterize($parameters);\n return $this->run();\n }", "abstract public function deleteAll();", "public function actionBulkDelete() {\n\n if (Yii::$app->request->post('selection')) {\n $where = ['id' => Yii::$app->request->post('selection', []), 'sender_id' => Yii::$app->user->identity->id, 'status_del' => $this->modelClass::STATUS_DEL_TRASH];\n $this->modelClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_DELETE, 'deleted_at' => time()], $where);\n\n $whereVia = ['mailbox_id' => Yii::$app->request->post('selection', []), 'receiver_id' => Yii::$app->user->identity->id, 'status_del' => $this->modelClass::STATUS_DEL_TRASH];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_DELETE, 'deleted_at' => time()], $whereVia);\n }\n }", "public function multiDeleteAction() {\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n //DELETE OFFERS FROM DATABASE AND SCRIBD\n $offer_id = (int) $value;\n\t\t\t\t\tEngine_Api::_()->sitestoreoffer()->deleteContent($offer_id);\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function deleteMultipleData($tableName,$ids,$fieldName,$flag=SOFT_DELETE){\t\t\r\n\t\tif(!isset($ids) || $ids==''){\r\n\t\t\treturn FALSE;\r\n\t\t}else{\r\n\t\t\tif(isset($tableName)&& trim($tableName)!='' && $fieldName!=''){\r\n\t\t\t\tif($flag==SOFT_DELETE){\r\n\t \t\t\t $query=\"UPDATE \".$tableName.\" SET \".COND_IS_DELETED_TRUE .\" WHERE \". $fieldName .\" IN(\".$ids.\")\";\r\n\t\t\t\t}\r\n\t\t\t\tif($flag==HARD_DELETE){\r\n\t\t\t\t\t$query=\"DELETE FROM \".$tableName.\" WHERE \".$fieldName.\" IN(\".$ids.\")\";\r\n\t\t\t\t}\r\n\t\t\t\treturn mysql_query($query); \r\n\t\t\t}\r\n\t \t}\r\n\t }", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "public static function massdelete($items) {\r\n\t\t$retval = Doctrine_Query::create ()->delete ()->from ( 'Wiki w' )->whereIn ( 'w.wiki_id', $items )->execute ();\r\n\t\treturn $retval;\r\n\t}", "static public function deleteMultiple($ids) {\n return entity_delete_multiple('nuntius_room', $ids);\n }", "public function testDeleteBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function deleteItemBatch($keys)\n {\n $this->batchRequests = [];\n $response = [];\n\n foreach (array_chunk($keys, $this->batchWriteChunkSize) as $keyChunk) {\n $this->batchRequests[] = Write::make()\n ->addMany(\n $this->from,\n array_map(function ($key) {\n return DeleteRequest::make($key);\n }, $keyChunk)\n );\n }\n\n $queries = $this->grammar->compileBatchWriteItem($this);\n\n foreach ($queries as $query) {\n $response[] = $this->connection->getClient()->batchWriteItem($query);\n }\n\n return $this->processor->processBatchWriteItems($response);\n }", "protected function entityDeleteMultiple($ids) {\n farm_asset_delete_multiple($ids);\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function deleteMultiple(Request $request)\n {\n $ids = explode(\",\", $request->ids);\n\n foreach ($ids as $key => $id) {\n $product = Product::with('categories', 'tags', 'attributes')->find($id);\n if (!empty($product)) {\n if (count($product->categories) > 0) {\n foreach ($product->categories as $category) {\n if ($category->total_products > 0) {\n $category->decrement('total_products');\n }\n }\n }\n if (count($product->tags) > 0) {\n foreach ($product->tags as $tag) {\n if ($tag->total_products > 0) {\n $tag->decrement('total_products');\n }\n }\n }\n\n $product->attributes()->detach();\n $product->categories()->detach();\n $this->removeThisCache($product->slug, $product->id);\n\n if ($product->delete() > 0) {\n// return response(1);\n }\n }\n// return response(0);\n }\n return response()->json(['success' => \"Products Multi Deleted successfully.\"]);\n\n }", "public function deleteMultipleById(array $ids) : int\n {\n }", "public function deleteMulti(array $keys) {\n return 0;\n }", "public function delete(array $ids);", "public function deleteMultiple($keys)\n {\n if (!$this->isEnable) {\n return false;\n }\n\n $this->client->del($keys);\n\n return true;\n }", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "public static function bulk_delete($items) {\r\n\t\tif(!empty($items)){\r\n\t\t\treturn self::massdelete($items);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function clients_deleteAttribute($items,$identifier) {\t\n\t## prepare the db-object\n\t$db_connectionStore = new DB_Sql();\n\n\tforeach($items as $current_element) {\t\n\t\t## insert the new value\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_\".$identifier.\" WHERE id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\n\t\t\n\t\t## remove everything from the connector\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"2\".$identifier.\" WHERE item_id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\t\n\t}\n}", "public function multi_destroy()\n {\n\n if (is_array(request('item'))) {\n Admin::destroy(request('item'));\n } else {\n Admin::find(request('item'))->delete();\n }\n session()->flash('success', 'The records have been deleted successfully');\n return redirect(aurl('news'));\n }", "public function deleteItems(array $keys);", "public function deleteAnItem()\n {\n $keys = [\n 'cache-bin:user_1', 'cache-bin:article_1212'\n ];\n $key = 'article_*';\n $server = $this->getMemcachedMock(['getAllKeys', 'delete']);\n $server->expects($this->once())\n ->method('getAllKeys')\n ->willReturn($keys);\n $server->expects($this->once())\n ->method('delete')\n ->with('cache-bin:article_1212')\n ->willReturn(true);\n $this->driver->server = $server;\n $this->assertSame($this->driver, $this->driver->erase($key));\n }", "protected function entityDeleteMultiple($fids) {\n $files = file_load_multiple($fids);\n foreach ($files as $file) {\n file_delete($file);\n }\n }", "function deleteItems($store, $folderentryid, $entryidlist, $action){\n\t\t\t$binEntryIdList = Array();\n\n\t\t\tforeach($entryidlist as $key => $value){\n\t\t\t\t$binEntryIdList[] = hex2bin($entryidlist[$key][\"entryid\"]);\n\t\t\t}\n\t\t\t\n\t\t\t$sfolder = mapi_msgstore_openentry($store, $folderentryid);\n\t\t\tmapi_folder_deletemessages($sfolder, $binEntryIdList, DELETE_HARD_DELETE);\n\t\t\t$result = (mapi_last_hresult()==NOERROR);\n\n\t\t\treturn $result;\n\t\t}", "public function delete(array $ids)\n {\n\n }", "public function remove(...$items);", "public function multidelete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$totaldata = $this->postring->valid($_POST['totaldata'], 'xss');\n\t\t\tif ($totaldata != \"0\") {\n\t\t\t\t$items = $_POST['item'];\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t}\n\t\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error('Error deleted detailfasilitaskesehatan data', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t}\n\t\t}\n\t}", "public function actionDeleteMultiple()\n {\n $request = Yii::$app->request;\n Yii::$app->response->format = Response::FORMAT_JSON;\n $js = $request->post('js');\n $jk = $request->post('jk');\n\n $mata_kuliah_tayang = MataKuliahTayang::find()\n ->joinWith('refCpmks')\n ->where([MataKuliahTayang::tableName() . '.id' => $jk])\n ->all();\n // $count = count($mata_kuliah_tayang[0]['refCpmks']);\n\n foreach ($js as $id_mahasiswa) {\n foreach ($mata_kuliah_tayang as $key => $value) {\n foreach ($value['refCpmks'] as $key => $value) {\n CapaianMahasiswa::deleteAll(['id_ref_mahasiswa' => $id_mahasiswa, 'id_ref_cpmk' => $value->id]);\n }\n }\n }\n }", "public function action_multi(){\n $ids = Arr::get($_POST, 'operate');\n if(isset($_POST['delete_all']) && count($ids)){\n $count = DB::delete( ORM::factory('BoardAbuse')->table_name() )->where('id', 'IN', $ids)->execute();\n Flash::success(__('All abuses (:count) was successfully deleted', array(':count'=>count($count) )));\n }\n $this->redirect('admin/boardAbuses' . URL::query());\n\n }", "public function deleteAll(): void;", "public function delete($ids){\n \n $filter = $this->primaryFilter; \n $ids = ! is_array($ids) ? array($ids) : $ids;\n \n foreach ($ids as $id) {\n $id = $filter($id);\n if ($id) {\n $this->db->where($this->primary_key, $id)->limit(1)->delete($this->table_name);\n }\n }\n }", "public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n \n $pks = explode(',', $request->post('pks')); \n \n foreach ($pks as $key) \n {\n \n $model=$this->findModel($key);\n $model->delete();\n } \n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'true']; \n }\n else\n {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['accion_centralizada_variables/index']);\n }\n \n }", "function softDeletesMulti($params)\n {\n foreach ($params as $value) {\n $this->softDelete($value);\n }\n }", "public function remove($ids);", "public static function batchDelete() {\n $result = array();\n $copied = lC_Products_Admin::batchDelete($_GET['batch']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public function actionBatchDelete() {\n if (($ids = Yii::$app->request->post('ids')) !== null) {\n $models = $this->findModelAll($ids);\n foreach ($models as $model) {\n $model->delete();\n }\n return $this->redirect(['index']);\n } else {\n throw new HttpException(400);\n }\n }", "public function batch_delete($data)\n {\n $required = array(\n 'ids' => 'IDs not passed',\n );\n $this->di['validator']->checkRequiredParamsForArray($required, $data);\n\n foreach ($data['ids'] as $id) {\n $this->delete(array('id' => $id));\n }\n\n return true;\n }", "function batch_delete($datas)\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->db->trans_strict(TRUE);\n\t\t$ci->db->trans_start();\n\n\t\tif (IS_LOCAL) $ci->load->helper('logger');\n\n\t\tforeach($datas as $table => $condition) {\n\t\t\t$ci->db->delete($table, $condition);\n\n\t\t\tif (IS_LOCAL)\tlogme('DELETE_QUERY', 'info', $ci->db->last_query());\n\t\t}\n\n\t\t$ci->db->trans_complete();\n\t\tif ($ci->db->trans_status() === FALSE)\n\t\t{\n\t\t\tif (IS_LOCAL)\tlogme('ERROR_QUERY', 'info', 'Database Error: '.$ci->db->error()['message']);\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_commit_data')]];\n\t\t}\n\n\t\treturn [TRUE, NULL];\n\t}", "public function deleteMultiple($keys)\n {\n $return = false;\n foreach ($keys AS $key) {\n $return = $this->delete($key) || $return;\n }\n return $return;\n }", "function batch_delete_maps ($ids) {\r\n\t\tif (!is_array($ids)) return false;\r\n\t\t$clean = array();\r\n\t\tforeach ($ids as $id) {\r\n\t\t\tif ((int)$id) $clean[] = (int)$id;\r\n\t\t}\r\n\t\tif (empty($clean)) return false;\r\n\t\t$table = $this->get_table_name();\r\n\t\t$res = $this->wpdb->query(\"DELETE FROM {$table} WHERE id IN(\" . join(',', $clean) . \")\", ARRAY_A);\r\n\t\treturn $res ? true : false;\r\n\t}", "public static function batchDelete() {\n $result = lC_Weight_classes_Admin::batchDelete($_GET['batch']);\n if (isset($result['namesString']) && $result['namesString'] != null) {\n } else {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "function deleteIds ($ids) {\r\n $this->delete($this->tableName, $this->_id . ' in (' . implode(',', $ids) . ')');\r\n }", "public function deleteMultiple(array $keys)\n {\n if (is_callable([$this->interface, 'deleteMultiple'])) {\n $handleValue = function ($success) use ($keys) {\n if ($success) {\n foreach ($keys as $key) {\n unset($this->items[$key]);\n }\n }\n\n return $success;\n };\n\n $keys = array_map(fn ($key) => $this->prefix.$key, $keys);\n\n try {\n $result = $this->interface->deleteMultiple($keys);\n } catch (Throwable $throwable) {\n return reject($throwable);\n }\n\n if ($result instanceof PromiseInterface) {\n return $result->then($handleValue);\n }\n\n return resolve($handleValue($result));\n }\n\n $promises = [];\n\n foreach ($keys as $key) {\n $promises[$key] = $this->delete($key);\n }\n\n return all($promises);\n }", "public function deleteItems(array $keys)\n {\n }", "public function deleteMultiple(array $keys): void\n {\n foreach ($keys as $key) {\n $this->delete($key);\n }\n }", "public function deleteMultiple(array $keys): void\n {\n foreach ($keys as $key) {\n $this->delete($key);\n }\n }", "function cache_forget_many($cache)\n{\n foreach ($cache as $item) {\n \\Illuminate\\Support\\Facades\\Cache::forget($item);\n }\n}", "public function undelete(array $ids);", "public static function bulkDelete($list_id) {\n return db_delete(static::$table)\n ->condition('list_id', $list_id)\n ->execute();\n }", "public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n\n }", "public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n\n }", "public function multidelete_data($data)\n\t{\n\t\t$query = \"DELETE FROM tb_users WHERE id IN ($data[0])\";\n\t\tDB::connect()->query($query)->vars($data[1])->exec();\n\t}", "abstract function del ($item);", "public function actionBulkDelete() {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }", "public static function batchDeleteEntries() {\n global $_module;\n\n $result = lC_Product_variants_Admin::batchDeleteEntries($_GET['batch'], $_GET[$_module]);\n if (isset($result['namesString']) && $result['namesString'] != null) {\n } else {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public static function massdelete($items) {\r\n\t\t$retval = Doctrine_Query::create ()->delete ()->from ( 'DomainsTlds d' )->whereIn ( 'd.tld_id', $items )->execute ();\r\n\t\treturn $retval;\r\n\t}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "function delete_list( $ids = array()) {\n \t\t\n \t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $id );\n\n\t\t// delete the record\n\t\treturn $this->db->delete( $this->table_name );\n \t}", "public function deleteMultiActivities(){\n\t $multiCheck = $this->input->post(\"check_checkbox\");\n\t $update['act_deleted'] = 1;\n\t $result = $this->mod_activities->deleteMultipleActivities($update,$multiCheck);\n\t if($result > 0){\n $this->session->set_userdata('msg_success', 'The activities have been deleted successfully.');\n echo \"t\";\n } else {\n $this->session->set_userdata('msg_error', 'Cannot delete record on table name activities.');\n echo \"f\";\n }\n }", "public function actionBulkDelete()\n { \n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n \n }", "public function actionBulkDelete()\n { \n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n \n }", "public function actionBulkDelete()\n { \n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n \n }", "public function actionBulkDelete()\n { \n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n \n }", "public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }", "public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }", "public function actionBulkTrash() {\n\n if (Yii::$app->request->post('selection')) {\n\n $where = ['id' => Yii::$app->request->post('selection', [])];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_TRASH, 'deleted_at' => time()], $where);\n }\n }", "function deleteItems($itemids) {\r\n $event = new mosEventCal_Event();\r\n\tforeach($itemids AS $itemid) {\r\n\t $event->delete($itemid);\t\r\n\t}\r\n}", "public function deleteMultiple($keys)\n {\n if (!\\is_array($keys) && !$keys instanceof \\Traversable) {\n throw new InvalidArgumentException('Cache keys must be an array or Traversable');\n }\n\n $result = true;\n\n foreach ($keys as $key) {\n $result = $this->delete($key) && $result;\n }\n\n return $result;\n }", "public function actionBulkDelete()\n { \n $request = Yii::$app->request;\n $pks = $request->post('pks'); // Array or selected records primary keys\n foreach (AcEspUej::findAll(json_decode($pks)) as $model) {\n $model->delete();\n }\n \n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>true]; \n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n \n }", "public function bulk_delete(Request $request){\n $this->isAuthorize();\n\n // Delete the Data\n $userID = $this->request->session()->get('userID');\n $ids = $request->ids;\n DB::table(\"apt_time_slots\")->where('userID','=',$userID)->whereIn('id',explode(\",\",$ids))->delete();\n return response()->json(['success'=>\"Deleted successfully.\"]);\n }", "public static function batchDelete() {\n $result = lC_Product_variants_Admin::batchDelete($_GET['batch']);\n if (isset($result['namesString']) && $result['namesString'] != null) {\n } else {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "public function deleteItems(array $keys)\n\t{\n\t\tforeach ($keys as $key) {\n\t\t\t$this->checkKeyName($key);\n\t\t}\n\n\t\tforeach ($keys as $key) {\n\t\t\t$this->redisClient->del($key);\n\t\t}\n\t}", "public function deleteMulti(array $keys): array {\n $return = [];\n if ($this->driver) {\n $return = $this->driver->deleteMulti($keys);\n }\n return $return;\n }", "public function deleteMulti(array $keys): array\n {\n // properly return true/false as would be expected from KeyValueStore\n $items = $this->getMulti($keys);\n $success = [];\n foreach ($keys as $key) {\n $success[$key] = array_key_exists($key, $items);\n }\n\n // only attempt to store those that we've deleted successfully to local\n $values = array_intersect_key($success, array_flip($keys));\n if (empty($values)) {\n return [];\n }\n\n // mark all as expired in local cache (see comment in delete())\n $this->local->setMulti($values, -1);\n\n $this->defer->deleteMulti(array_keys($values));\n\n return $success;\n }", "public function delete()\n {\n return $this->query->batchDelete($this->filter);\n }", "public function testDeleteMultipleKeyValuePairsAtOnce(): void\n {\n $arr = array();\n $records = rand(220, 370);\n for ($i=0; $i <= $records; $i++) {\n $key = 'KeyNumber-' . $i;\n $val = 'ValueNumber-' . $i;\n $arr[$key] = $val;\n }\n $start = count($arr);\n $this->testNotStrict->setMultiple($arr);\n\n $del = array();\n $n = rand(75, 167);\n $max = $records - 5;\n for ($i=0; $i<$n; $i++) {\n $key = 'KeyNumber-' . rand(5, $max);\n if (! in_array($key, $del)) {\n $del[] = $key;\n }\n }\n $delcount = count($del);\n $expected = $start - $delcount;\n $this->testNotStrict->deleteMultiple($del);\n $hits = 0;\n for ($i=0; $i<= $records; $i++) {\n $key = 'KeyNumber-' . $i;\n if ($this->testNotStrict->has($key)) {\n $hits++;\n }\n }\n $this->assertEquals($expected, $hits);\n }", "public function deleteAll() {\n if (isset($this::$has)) {\n foreach ($this::$has as $key => $value) {\n if(isset($this->$key)) {\n foreach ($this->$key as $item) {\n $item->deleteAll();\n }\n }\n }\n }\n $this->delete();\n }", "public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}", "public function actionDelete()\n {\n $ids = Yii::$app->request->post('ids');\n if ($ids == null) {\n return new ApiResponse(ApiCode::CODE_ERROR,\"失败\");\n }\n $ids2 = explode(\",\",$ids);\n foreach ( $ids2 as $id) {\n CommodityCategory::deleteAll(['id' => $id]);\n CommodityCategory::deleteAll(['pid' => $id]);\n }\n return new ApiResponse();\n }", "public function destroy($ids);", "public function multiDeleteMemberAction() {\n\n if ($this->getRequest()->isPost()) {\n\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n $sitepageitemofthedays = Engine_Api::_()->getItem('sitepage_itemofthedays', (int) $value);\n if (!empty($sitepageitemofthedays)) {\n $sitepageitemofthedays->delete();\n }\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "public function mass_unremove_group()\n {\n $ids = json_decode($this->input->post('ids'), true); //convert json into array\n foreach ($ids as $id) {\n $resultat = $this->m_feuille_controle->unremove_group($id);\n }\n }", "function del_items($items,$id_remito)\r\n{\r\n\tglobal $db;\r\n\t$items2=get_items($id_remito);\r\n\t$borrar=\"\";\r\n\tfor($i=0;$i < $items2['cantidad'];$i++)\r\n\t{\r\n\t\tfor($j=0;$j < $items['cantidad'];$j++)\r\n\t\t{\r\n\t\t\tif ($items[$j]['id_item']==$items2[$i]['id_item'])\r\n\t\t\t break;\r\n\t\t}\r\n\t\tif ($j==$items['cantidad'])\r\n\t\t $borrar.=$items2[$i]['id_item'].\",\";\r\n\t}\r\n\t$borrar=substr($borrar,0,strlen($borrar)-1);\r\n\t$q= \"delete from items_remito where id_remito=$id_remito AND id_item in ($borrar)\";\r\n\tif ($borrar!=\"\")\r\n\t\t$db->Execute($q) or die($q);\r\n}", "public function bulkDestroy(BulkDestroyTurma $request) : Response\n {\n DB::transaction(static function () use ($request) {\n collect($request->data['ids'])\n ->chunk(1000)\n ->each(static function ($bulkChunk) {\n Turma::whereIn('id', $bulkChunk)->delete();\n\n // TODO your code goes here\n });\n });\n\n return response(['message' => trans('brackets/admin-ui::admin.operation.succeeded')]);\n }", "public function delete($keys=array()){\n\n //get delete\n if(is_array($keys) && count($keys)){\n return $this->client->del($keys);\n }\n }" ]
[ "0.74532646", "0.7011111", "0.6802612", "0.67139", "0.67039067", "0.66248745", "0.6564758", "0.6493527", "0.64826375", "0.647363", "0.6472628", "0.6430388", "0.6361711", "0.6347832", "0.63463926", "0.6343705", "0.63312817", "0.63260835", "0.6324101", "0.63216925", "0.63177854", "0.63079107", "0.6305744", "0.6266559", "0.62648046", "0.6256363", "0.625501", "0.6254654", "0.6220729", "0.62104684", "0.62104684", "0.62104684", "0.6205922", "0.61996835", "0.6192441", "0.61846745", "0.6177922", "0.6164985", "0.61640245", "0.615965", "0.6151149", "0.61473805", "0.6144851", "0.6127385", "0.61236477", "0.61227727", "0.61041355", "0.6102055", "0.6067197", "0.60504985", "0.60347044", "0.6034424", "0.6033508", "0.6009248", "0.6003447", "0.5981708", "0.5976046", "0.59659594", "0.59481525", "0.59477925", "0.59477925", "0.5941977", "0.59344226", "0.58999985", "0.5871404", "0.5871404", "0.5858985", "0.5848494", "0.58466375", "0.58448", "0.5833053", "0.58235264", "0.5818447", "0.5818362", "0.58107275", "0.58107275", "0.58107275", "0.58107275", "0.58024377", "0.58024377", "0.5802057", "0.578771", "0.5777162", "0.57750916", "0.5774317", "0.5772813", "0.576806", "0.5766523", "0.57401556", "0.57328343", "0.5732287", "0.57318395", "0.5725756", "0.5718516", "0.5718273", "0.57163376", "0.57115436", "0.56855774", "0.5683138", "0.56703794" ]
0.72221875
1