query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
sequencelengths 0
30
| negative_scores
sequencelengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
List of remotes as array in name => url format | public function getRemotes()
{
// Query remotes
$result = $this->getRepository()->run('remote', ['-v']);
// Filter output
$remotes = [];
foreach (preg_split('/\R/u', $result) as $line) {
$line = trim($line);
if (preg_match('/^(?<name>\w+)\s+(?<url>\S+)/', $line, $matches)) {
$remotes[$matches['name']] = $matches['url'];
}
}
// Sort so that "origin" is first
uksort($remotes, function ($left, $right) {
if ($left === 'origin') {
return -1;
}
if ($right === 'origin') {
return 1;
}
return 0;
});
return $remotes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRemotes()\n\t{\n\t\tif($this->_remotes === NULL)\n\t\t{\n\t\t\t$this->_remotes = array();\n\t\t\t$command = 'remote -v';\n\t\t\t$response = explode(\"\\n\", $this->run($command));\n\n\t\t\tforeach($response as $line)\n\t\t\t{\n\t\t\t\tif(preg_match('/(\\w+)\\s+(.*) \\((fetch|push)\\)/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\tif(!isset($this->_remotes[$matches[1]]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_remotes[$matches[1]] = new GitRemote($matches[1], $this);\n\t\t\t\t\t}\n\t\t\t\t\t$remote = $this->_remotes[$matches[1]];\n\t\t\t\t\tif($matches[3] == 'fetch')\n\t\t\t\t\t{\n\t\t\t\t\t\t$remote->fetchUrl = $matches[2];\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$remote->pushUrl = $matches[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_remotes;\n\t}",
"private function getRemoteDirectoryList() : array\n {\n return Util\\Path::getDirectoryListFromAbsolutePath($this->remotePath->getPath());\n }",
"function getRemoteList($root, $type)\n{\n global $config;\n global $definition;\n\n $ret = array();\n if (isset($definition[\"MCORE\"]))\n {\n $list = $config->getList($root,$type);\n $core = $definition[\"MCORE\"];\n for ($i=0; $i < count($list); $i++)\n {\n $current_core = $config->getValue(\"/OSEK/$list[$i]\",\"CORE\");\n if ($current_core != $core)\n {\n array_push($ret,$list[$i]);\n }\n }\n }\n return $ret;\n}",
"public function getUrls() : array\n\t{\n\t\t$urls = [];\n\n\t\t$sources = $this->getSources();\n\t\tforeach ($sources as $source) {\n\t\t\t$urls = array_merge($urls, $source->getUrls());\n\t\t\t;\n\t\t}\n\n\t\treturn $urls;\n\t}",
"public function getURLs() {\n $urls = array();\n try {\n if ($mandrill = $this->getAPIObject()) {\n $urls = $mandrill->urls->getList();\n }\n } catch (\\Exception $e) {\n drupal_set_message(t('Mandrill: %message', array('%message' => $e->getMessage())), 'error');\n $this->log->error($e->getMessage());\n }\n return $urls;\n }",
"public static function urls()\n {\n return collect(self::$urls)->map(function ($val) {\n if (strpos($val['url'], '://') === false) {\n $val['url'] = guard_url($val['url']);\n }\n\n return $val;\n })->toArray();\n }",
"public function getUrlsList(){\n return $this->_get(2);\n }",
"private function getUrlsOption(): array\n {\n return $this->options['urls'] ?? [];\n }",
"public function listUrls()\n {\n return $this->request('list');\n }",
"public function getDistUrls(): array;",
"public function setUrls(): array\n\t{\n\t\t$urls = [];\n\t\t$metasData = $this->entityManager->getMetadataFactory()->getAllMetadata();\n\n\t\tforeach ($metasData as $metaData) {\n\n\t\t\t$classname = $metaData->getName();\n\t\t\t$baseEntity = $metaData->getReflectionClass()->getModifiers() === 0 ? new $classname() : NULL;\n\n\t\t\tif ($classname !== Session::class && $baseEntity && method_exists($baseEntity, 'getUrls') && method_exists($baseEntity, 'getWebsite')) {\n\n\t\t\t\t$interface = $this->interfaceHelper->generate($classname);\n\t\t\t\t$entities = $this->getEntities($classname, $baseEntity, true);\n\t\t\t\t$entities = $this->getEntities($classname, $baseEntity, false, $entities);\n\n\t\t\t\tforeach ($entities as $entity) {\n\t\t\t\t\t$entityArray = $entity['array'];\n\t\t\t\t\t$entityObject = $entity['object'];\n\t\t\t\t\tforeach ($entityArray['urls'] as $url) {\n\t\t\t\t\t\tif (($url['isOnline'] || (!empty($entity['infill']) && $entity['infill'])) && !$url['hideInSitemap']) {\n\t\t\t\t\t\t\t$urls[] = (object)['url' => $url, 'entity' => $entityArray, 'entityObject' => $entityObject, 'interface' => $interface];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $urls;\n\t}",
"public function getLocalRepos(): array\n {\n return $this->data['localRepos'] ?? [];\n }",
"public function getUris()\n {\n return $this->uris;\n }",
"public function getSolrUrls(): array\n {\n return $this->getOption('solrurls');\n }",
"public function providerUrl()\n\t{\n\t\treturn array(\n\t\t\tarray('http://google.com', TRUE),\n\t\t\tarray('http://localhost', TRUE),\n\t\t\tarray('ftp://my.server.com', TRUE),\n\t\t\tarray('http://ww£.gooogle.com', FALSE)\n\t\t);\n\t}",
"public function urls()\n {\n return $this->container['config']->get('apps.url', []);\n }",
"private function parse_uri_collections()\r\n {\r\n return explode('/',filter_var(facile_whitespace_slashes(get('url')), FILTER_SANITIZE_URL));\r\n }",
"public function links(): array;",
"public function getPicurlsList(){\n return $this->_get(1);\n }",
"public function getActiveRepositoriesWithRemoteServersForAllProjects() {\n $repositories = array();\n foreach ($this->dao->getActiveRepositoryPathsWithRemoteServersForAllProjects() as $row) {\n $repository = new GitRepository();\n $this->dao->hydrateRepositoryObject($repository, $row);\n $repository->setProject($this->projectManager->getProject($row[GitDao::FK_PROJECT_ID]));\n $repositories[] = $repository;\n }\n return $repositories;\n }",
"public function getBaseURLs()\n {\n return $this->baseURLs;\n }",
"public function getUrlS();",
"public function getServerList(){\r\n\t\t\treturn $this->tera_servers;\r\n\t\t}",
"public function getFeedurls() {\r\n\t $tmp = array(null,null,null,null,null);\r\n\t foreach ($this->feedurls as $index => $url) {\r\n\t $tmp[$index] = $url;\r\n\t }\r\n\t\treturn $tmp;\r\n\t}",
"public function getRemoteManagers() : ?array\n {\n return $this->remoteManagers;\n }",
"static function links()\r\n {\r\n $links = [];\r\n $types = [\r\n 'guest' => Dashboard::$guest\r\n ];\r\n\r\n foreach ($types as $type => $list)\r\n {\r\n foreach ($list as $link)\r\n {\r\n $name = $link[0];\r\n $url = $link[1];\r\n $nameRe = '/^[a-z_]+[a-z0-9_-]+$/i';\r\n if (preg_match($nameRe, $url)) $url = Routes::url($url);\r\n\r\n $links[] =\r\n [\r\n 'name' => $name,\r\n 'url' => $url,\r\n 'type' => $type\r\n ];\r\n }\r\n }\r\n\r\n return $links;\r\n }",
"public function buildLinks(): array;",
"public function urlProvider(): array\n {\n return [\n ['/api/trends'],\n ['/api/posts'],\n ['/api/comments'],\n ['/api/developers'],\n ['/api/likes'],\n ];\n }",
"public function getLinks() {\n return [];\n }",
"public function getLocationList(): array {\n $sResponse = $this -> _request('place', new ConsumerParams());\n\n $aJSON = json_decode($sResponse, true);\n $aLocations = [];\n if(is_array($aJSON)){\n foreach ($aJSON['@graph']['@value'] as $aLocation) {\n \n $aLocations[] = parse_url( $aLocation['@id'], PHP_URL_PATH); // @todo: prefix weghalen zodra die uit de API is\n }\n\t\t}\n return $aLocations;\n }"
] | [
"0.7087897",
"0.67170554",
"0.6458798",
"0.64404607",
"0.64156175",
"0.63177073",
"0.63045055",
"0.6304114",
"0.6150648",
"0.61004853",
"0.60940003",
"0.60175204",
"0.59375745",
"0.59146523",
"0.58871514",
"0.58686155",
"0.58285713",
"0.57694775",
"0.575317",
"0.5750423",
"0.572459",
"0.57085186",
"0.56998914",
"0.56673336",
"0.56671005",
"0.56561697",
"0.56491405",
"0.5634506",
"0.56341827",
"0.5634086"
] | 0.7255844 | 0 |
Push this branch to the given remote | public function pushTo($remote = 'origin', $tags = false)
{
// Validate branch
$branch = $this->getBranch();
if (!$branch) {
throw new Exception("Module " . $this->getName() . " cannot push without a current branch");
}
// Check options
$repo = $this->getRepository();
$args = array($remote, "refs/heads/{$branch}");
if ($tags) {
$args[] = '--follow-tags';
}
// Push
if (Application::isDevMode()) {
echo "Not pushing changes because DEV_MODE is enabled\n";
} else {
$repo->run('push', $args);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function push($remote, $branch = 'master', $force = FALSE)\n\t{\n\t\tif($remote instanceof GitRemote)\n\t\t{\n\t\t\t$remote = $remote->name;\n\t\t}\n\t\tif($branch instanceof GitBranch)\n\t\t{\n\t\t\t$branch = $branch->name;\n\t\t}\n\t\tif($force)\n\t\t{\n\t\t\t$command = 'push -f ' . $remote . ' ' . $branch;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$command = 'push ' . $remote . ' ' . $branch;\n\t\t}\n\t\treturn $this->run($command);\n\t}",
"function push()\n {\n // noop, we're working remotely\n }",
"public function pushTag($tag, $remote = 'origin')\n {\n if (Application::isDevMode()) {\n echo \"Not pushing tag because DEV_MODE is enabled\\n\";\n return;\n }\n $repo = $this->getRepository();\n $args = array($remote, \"refs/tags/{$tag}\");\n $repo->run('push', $args);\n }",
"protected function gitPush($location, $remoteName, $remoteBranch, $force = false)\n {\n $pushCommand = 'push';\n\n if ($force) {\n $pushCommand .= ' --force';\n }\n\n return $this->gitCommandRun(\n $location,\n sprintf('%s %s refs/heads/%2$s:refs/heads/%2$s', $pushCommand, $remoteName, $remoteBranch),\n sprintf('Unable to push to \"%s\" remote', $remoteName)\n );\n }",
"public function gitPush()\n {\n $git = new Git();\n $repo = $git->open(\n $this->directory . '/' . $this->manifest->metadata->siteName\n );\n $repo->add('.');\n $repo->commit($msg);\n return true;\n }",
"private function _doSync()\n {\n $current_branch = Git_Daily_GitUtil::currentBranch();\n\n if (!isset($this->config['remote'])) {\n throw new Git_Daily_Exception('remote not setted, cannot sync');\n }\n $remote = $this->config['remote'];\n $develop_branch = $this->config[$this->base_branch];\n self::info('first, fetch remotes');\n self::cmd(Git_Daily::$git, array('fetch', '--all'));\n self::info('cleanup remote');\n self::cmd(Git_Daily::$git, array('remote', 'prune', $remote));\n\n // if has local branch, try to checkout\n $release_branch = false;\n $release_branches = Git_Daily_GitUtil::releaseBranches($this->branch_prefix);\n if (!empty($release_branches)) {\n if (count($release_branches) == 1) {\n $release_branch = array_shift($release_branches);\n } else {\n throw new Git_Daily_Exception('there are a number of local release branches, please delete local release branch manually');\n }\n }\n\n // remote branch still exists ?\n $remote_closed = false;\n $remote_release_branch = null;\n $remote_release_branches = self::cmd(Git_Daily::$git, array('branch', '-a'),\n array('grep', array(\"remotes/$remote/{$this->branch_prefix}\"),\n array(\n 'sed', array('s/^[^a-zA-Z0-9]*//g'),\n )\n )\n );\n if (!empty($remote_release_branches) && count($remote_release_branches) == 1) {\n $remote_release_branch = array_shift($remote_release_branches);\n $remote_release_branch = str_replace(\"remotes/$remote/\", '', $remote_release_branch);\n } else {\n if (empty($remote_release_branches)) {\n // to clean up\n $remote_closed = true;\n }\n else {\n throw new Git_Daily_Exception('there are a number of remote release branches');\n }\n }\n\n // release branch already checkouted, try push, pull\n if ($release_branch) {\n // checkout\n // remote release branch opened, but local has different (old ?) release branch, then clean up\n if ($remote_release_branch != $release_branch) {\n $remote_closed = true;\n }\n\n // if remote closed, local still have release branch, then cleanup\n if ($remote_closed) {\n self::info('release closed! so cleanup local release branch');\n self::info(\"checkout $develop_branch\");\n Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $develop_branch));\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n self::info(\"delete $release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('branch', '-d', $release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('branch delete failed');\n self::outLn(\"\\n git branch delete failed, please manually\\n\");\n }\n\n if ($remote_release_branch != $release_branch) {\n self::outLn(PHP_EOL, 'Closed old release branch', ' Please retry \"release sync\"', PHP_EOL);\n }\n return \"sync to release close\";\n }\n\n if ($current_branch != $release_branch) {\n self::info(\"checkout $release_branch\");\n self::cmd(Git_Daily::$git, array('checkout', $release_branch));\n $current_branch = Git_Daily_GitUtil::currentBranch();\n }\n\n // first, pull\n self::info(\"git pull\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n if ($retval != 0) {\n throw new Git_Daily_Exception('abort');\n }\n\n // push\n self::info(\"git push\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'push'));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to push to remote');\n throw new Git_Daily_Exception('abort');\n }\n }\n else {\n // first time checkout release branch\n if ($remote_closed) {\n // do nothing\n return 'sync completed (nothing to do)';\n }\n\n self::info(\"checkout and tracking $remote_release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $remote_release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to checkout');\n throw new Git_Daily_Exception('abort');\n }\n return 'start to tracking release branch';\n }\n }",
"abstract public function push(\\Sakwa\\Utils\\Guid $commit_point);",
"function checkout($branch)\n {\n if (is_null($branch)) {\n $this->remote = $this->getTrunkUrl();\n } else {\n $this->remote = $this->getBranchUrl($branch);\n }\n }",
"abstract public function push();",
"public function push(string $imageName, string $server = null) {\n\n\t\t$this->requireProcess();\n\n\t\t$process = ProcessBuilder::create([\n\t\t\t'docker', 'push', $imageName\n\t\t])\n\t\t\t->setTimeout(null)->getProcess();\n\n\t\t$this->processHelper->run($this->output, $process, null, null, OutputInterface::VERBOSITY_NORMAL);\n\t\tif($process->getExitCode() !== 0)\n\t\t\tthrow new PushFailedException($imageName, 20);\n\t}",
"public function putgit($details) {\n\t\t$this->exec(array('git', 'clone', $details['remote'], $this->path));\n\t\t$this->exec(\"cd $this->path && git checkout \" . escapeshellarg($details['branch']));\n\t\treturn true;\n\t}",
"public function push () {}",
"protected function gitAddRemote($location, $name, $remote)\n {\n return $this->gitCommandRun(\n $location,\n sprintf('remote add %s %s', $name, $remote),\n sprintf('Unable to add \"%s\" remote', $name)\n );\n }",
"public function put($local, $remote)\n {\n $this->getGateway()->put($local, $remote);\n }",
"public function deployToRemote()\n {\n $local_path = $this->relativeDumpPath();\n\n $files = $this->localAdapter->listContents($local_path);\n\n foreach ($files as $file) {\n $contents = $this->localAdapter->readStream($local_path.$file['basename']);\n\n $file_size = $this->localAdapter->getSize($local_path.$file['basename']);\n\n $this->out($this->parseString('Uploading %s (%s)', [$file['basename'], $this->formatBytes($file_size)], 'light_green'));\n $this->remoteAdapter->writeStream($local_path.$file['basename'], $contents);\n }\n }",
"public function push()\n\t{\n\t\tif(isset($this->broadcast) && ! is_null($this->broadcast))\n\t\t{\n\t\t\t// Connect to socket server.\n\t\t\t$this->connect();\n\n\t\t\t// Send the message through the socket.\n\t\t $this->socket->send(json_encode($this->broadcast));\n\t\t}\n\t}",
"function pull()\n {\n // noop, we're working remotely\n }",
"public function actionSyncWithRemote() {\n TwitterSync::$plugin->twitterSyncService->sync();\n\n $result = 'Syncing remote Twitter data';\n\n return $result;\n }",
"public function gitSetRemote($gitDetails)\n {\n $git = new Git();\n $repo = $git->open(\n $this->directory . '/' . $this->manifest->metadata->siteName\n );\n $repo->set_remote(\"origin\", $gitDetails->url);\n return true;\n }",
"public function insertBranch($project, string $branch, string $ref): array\n {\n return $this->post($this->projectURL . $project . '/repository/' . $this->branchURL, [\n 'branch' => $branch,\n 'ref' => $ref\n ]);\n }",
"public function remote()\n {\n\t\t// Check for request forgeries.\n\t\tJSession::checkToken() or die(JText::_('JINVALID_TOKEN'));\n\n // Load HWD library.\n hwdMediaShareFactory::load('remote');\n $model = hwdMediaShareRemote::getInstance();\n\n // Process the remote url.\n if ($model->addRemote())\n { \n if ($model->_count > 1)\n {\n $this->setMessage(JText::sprintf('COM_HWDMS_SUCCESSFULLY_ADDED_X_REMOTES', $model->_count));\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));\n }\n else\n {\n $this->setMessage(JText::sprintf('COM_HWDMS_SUCCESSFULLY_ADDED_REMOTE_MEDIA_FROM_X', $model->_host));\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&task=editmedia.edit&id=' . $model->_item->id, false)); \n } \n \n }\n else\n {\n $this->setMessage($model->getError());\n $this->setRedirect($this->getReturnPage());\n } \n }",
"public function push(CommandInterface $command)\n {\n // todo: implement queue push()\n }",
"function push($x) {\n $this->stackPush->push($x);\n }",
"public function remote($remote)\n\t{\n\t\t$this->remote = $remote;\n\t\treturn $this;\n\t}",
"public function put($local_file, $remote_file);",
"public function push(IPushData $data);",
"public function putString($remote, $contents)\n {\n $this->getGateway()->putString($remote, $contents);\n }",
"public function checkout(OutputInterface $output, $branch, $remote = 'origin', $canCreate = false)\n {\n // Check if local branch exists\n $localBranches = $this->getBranches();\n $remoteBranches = $remote ? $this->getBranches($remote) : [];\n $repository = $this->getRepository($output);\n $isLocalBranch = in_array($branch, $localBranches, true);\n $isRemoteBranch = in_array($branch, $remoteBranches, true);\n\n // Make sure branch exists somewhere\n if (!$isLocalBranch && !$isRemoteBranch) {\n if (!$canCreate) {\n throw new InvalidArgumentException(\"Branch {$branch} is not a local or remote branch\");\n }\n\n // Create branch\n $repository->run('checkout', ['-B', $branch]);\n return;\n }\n\n // Check if we need to switch branch\n if ($this->getBranch() !== $branch) {\n // Find source for branch to checkout from (must disambiguate from tags)\n if (!$isLocalBranch) {\n $sourceRef = \"{$remote}/{$branch}\";\n } else {\n $sourceRef = \"refs/heads/{$branch}\";\n }\n\n // Checkout branch\n $repository->run('checkout', [\n '-B',\n $branch,\n $sourceRef,\n ]);\n }\n\n // If branch is on live and local, we need to synchronise changes on local\n // (but don't push!)\n if ($isLocalBranch && $isRemoteBranch) {\n $repository->run('pull', [$remote, $branch]);\n }\n }",
"public function execute(): void\n {\n $this->numbers->push($this->numberToPush);\n }",
"public function pushMessage($postData){\n /** push message start ************************/\n //create an api object\n $currentStoreName = Mage::helper(\"pushmessage\")->getCoreConfig('storename');\n $currentSecret = Mage::helper(\"pushmessage\")->getCoreConfig('secret');\n $api = new ShareRails($currentStoreName, $currentSecret);\n /*** set up the pus data ****/\n //set timestamp\n $api->setTimestamp(time());\n \n $api->setPostData($postData);\n\n //set post data hash\n $postDataHash = $api->getPostDataHash();\n\n //set protocol\n $api->setProtocol('http');\n //set domain\n $api->setDomain(\"www.sharerails.com\");\n\n //set path\n $api->setPath(\"/api/push\");\n //set query\n $currentQuery = array(\n 'app' => $api->getStoreName(),\n \"timestamp\" => $api->getTimestamp(),\n \"datamd5hash\" => $postDataHash\n );\n\n //set Query\n $api->setQuery($currentQuery);\n\n \n //post to api\n $api->post();\n\n }"
] | [
"0.7265961",
"0.64837277",
"0.6346514",
"0.626845",
"0.59494686",
"0.5580499",
"0.5579511",
"0.5517352",
"0.5409424",
"0.53927666",
"0.5224266",
"0.5200106",
"0.5175353",
"0.5119062",
"0.5090791",
"0.50699145",
"0.4941302",
"0.48818958",
"0.4864708",
"0.48294422",
"0.4810075",
"0.47707295",
"0.47554553",
"0.47484028",
"0.47333547",
"0.47117642",
"0.47052002",
"0.46838",
"0.46521348",
"0.4629389"
] | 0.68142235 | 1 |
Do automatic rebase with remote in case it's out of date. Can be useful if things have been merged upstream during the release. | public function rebase(OutputInterface $output = null, $remote = 'origin')
{
// Validate branch
$branch = $this->getBranch();
if (!$branch) {
throw new Exception("Module " . $this->getName() . " cannot rebase without a current branch");
}
// Check if remote branch exists
$remoteBranches = $this->getBranches($remote);
if (!in_array($branch, $remoteBranches, true)) {
// No remote branch to rebase with
return;
}
$repo = $this->getRepository($output);
// Set CWD to work-around git crashing while stashing
$dir = getcwd();
chdir($this->getDirectory());
// Stash changes
$status = $repo->run('status');
$hasChanges = stripos($status, 'Changes to be committed:')
|| stripos($status, 'Changes not staged for commit:');
if ($hasChanges) {
$repo->run('stash', ['-u']);
}
// Pull
try {
$repo->run('pull', ['--rebase', $remote, $branch]);
} finally {
// Restore locale changes
if ($hasChanges) {
$repo->run('stash', ['pop']);
}
chdir($dir);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _doSync()\n {\n $current_branch = Git_Daily_GitUtil::currentBranch();\n\n if (!isset($this->config['remote'])) {\n throw new Git_Daily_Exception('remote not setted, cannot sync');\n }\n $remote = $this->config['remote'];\n $develop_branch = $this->config[$this->base_branch];\n self::info('first, fetch remotes');\n self::cmd(Git_Daily::$git, array('fetch', '--all'));\n self::info('cleanup remote');\n self::cmd(Git_Daily::$git, array('remote', 'prune', $remote));\n\n // if has local branch, try to checkout\n $release_branch = false;\n $release_branches = Git_Daily_GitUtil::releaseBranches($this->branch_prefix);\n if (!empty($release_branches)) {\n if (count($release_branches) == 1) {\n $release_branch = array_shift($release_branches);\n } else {\n throw new Git_Daily_Exception('there are a number of local release branches, please delete local release branch manually');\n }\n }\n\n // remote branch still exists ?\n $remote_closed = false;\n $remote_release_branch = null;\n $remote_release_branches = self::cmd(Git_Daily::$git, array('branch', '-a'),\n array('grep', array(\"remotes/$remote/{$this->branch_prefix}\"),\n array(\n 'sed', array('s/^[^a-zA-Z0-9]*//g'),\n )\n )\n );\n if (!empty($remote_release_branches) && count($remote_release_branches) == 1) {\n $remote_release_branch = array_shift($remote_release_branches);\n $remote_release_branch = str_replace(\"remotes/$remote/\", '', $remote_release_branch);\n } else {\n if (empty($remote_release_branches)) {\n // to clean up\n $remote_closed = true;\n }\n else {\n throw new Git_Daily_Exception('there are a number of remote release branches');\n }\n }\n\n // release branch already checkouted, try push, pull\n if ($release_branch) {\n // checkout\n // remote release branch opened, but local has different (old ?) release branch, then clean up\n if ($remote_release_branch != $release_branch) {\n $remote_closed = true;\n }\n\n // if remote closed, local still have release branch, then cleanup\n if ($remote_closed) {\n self::info('release closed! so cleanup local release branch');\n self::info(\"checkout $develop_branch\");\n Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $develop_branch));\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n self::info(\"delete $release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('branch', '-d', $release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('branch delete failed');\n self::outLn(\"\\n git branch delete failed, please manually\\n\");\n }\n\n if ($remote_release_branch != $release_branch) {\n self::outLn(PHP_EOL, 'Closed old release branch', ' Please retry \"release sync\"', PHP_EOL);\n }\n return \"sync to release close\";\n }\n\n if ($current_branch != $release_branch) {\n self::info(\"checkout $release_branch\");\n self::cmd(Git_Daily::$git, array('checkout', $release_branch));\n $current_branch = Git_Daily_GitUtil::currentBranch();\n }\n\n // first, pull\n self::info(\"git pull\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n if ($retval != 0) {\n throw new Git_Daily_Exception('abort');\n }\n\n // push\n self::info(\"git push\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'push'));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to push to remote');\n throw new Git_Daily_Exception('abort');\n }\n }\n else {\n // first time checkout release branch\n if ($remote_closed) {\n // do nothing\n return 'sync completed (nothing to do)';\n }\n\n self::info(\"checkout and tracking $remote_release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $remote_release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to checkout');\n throw new Git_Daily_Exception('abort');\n }\n return 'start to tracking release branch';\n }\n }",
"public function pull_my_git_real_fast() {\n\t\t@file_put_contents(TMP.'pull_my_git_real_fast', '');\n\t\tdie('OK');\n\t}",
"function pull()\n {\n // noop, we're working remotely\n }",
"function _rebase() {\n\t\t$Cleanup = new Folder($this->working);\n\t\tif ($Cleanup->pwd() == $this->working) {\n\t\t\t$Cleanup->delete();\n\t\t}\n\t\treturn $this->pull();\n\t}",
"protected function fixRemoteSynchronicity($package)\n {\n $commands = array();\n if ($package->behind) {\n $commands[] = 'pull';\n }\n if ($package->ahead) {\n $commands[] = 'push';\n }\n $fixes = array(\n 1 => 'Show incoming/outgoing commits (and ask again)',\n 2 => ucfirst(implode(' and ', $commands)),\n );\n if (count($commands) > 1 && $package->branch !== 'master') {\n $fixes[3] = 'Push with <comment>--force</comment>';\n }\n switch ($this->selectFixes($fixes)) {\n case 1:\n $this->gitRevDiff($package, '@\\{u\\}', 'Remote', 'Local');\n $this->fixRemoteSynchronicity($package);\n break;\n case 3:\n $commands = array('push');\n $options = '--force';\n case 2:\n foreach ($commands as $command) {\n $pck = \"<comment>{$package->name}</comment>\";\n $this->console->output($msg = ucfirst($command) . \"ing $pck...\", false);\n $this->git($command, $package->path, isset($options) ? $options : null);\n $this->console->output(\n str_repeat(chr(8), strlen(strip_tags($msg)))\n . \"<fg=green>Sucessfully {$command}ed $pck</>\"\n );\n }\n break;\n }\n }",
"function gmirror_force_rebuild($mirror, $consumer) {\n\tif (!is_valid_mirror($mirror) || !is_valid_consumer($consumer)) {\n\t\treturn false;\n\t}\n\treturn mwexec(\"/sbin/gmirror rebuild \" . escapeshellarg($mirror) . \" \" . escapeshellarg($consumer));\n}",
"function rsyncToRemote($localDirPath, $remoteDirPath, $mergeFilePath)\n{\n $serverConfig = Context::get()->getServer()->getConfiguration();\n $destination = sprintf('%s@%s:%s', $serverConfig->getUser(), $serverConfig->getHost(), $remoteDirPath);\n runLocallyCustomized(getRsyncCommand($localDirPath, $destination, $mergeFilePath));\n}",
"function migrateRemoteToLocal() {\n\n $this->envVariables->required([\n 'CONTENT_SYNC_HOST', 'CONTENT_SYNC_FOLDERS', 'CONTENT_SYNC_SSH_USER',\n 'CONTENT_SYNC_FILES_HOST_BASE_PATH', 'CONTENT_SYNC_FILES_LOCAL_BASE_PATH_CORRECTION'\n ]);\n\n $this->taskSyncFiles()\n ->host(getenv('CONTENT_SYNC_HOST'))\n ->folders(getenv('CONTENT_SYNC_FOLDERS'))\n ->remoteUser(getenv('CONTENT_SYNC_SSH_USER'))\n ->remoteBasePath(getenv('CONTENT_SYNC_FILES_HOST_BASE_PATH'))\n ->localBasePath(self::BASE_DIR)\n ->localPathCorrection(getenv('CONTENT_SYNC_FILES_LOCAL_BASE_PATH_CORRECTION'))\n ->run();\n\n $this->envVariables->required([\n 'DB_NAME', 'DB_PASS', 'CONTENT_SYNC_HOST', 'CONTENT_SYNC_SSH_USER', 'CONTENT_SYNC_SSH_KEY',\n 'CONTENT_SYNC_DATABASE_REMOTE_HOST', 'CONTENT_SYNC_DATABASE_REMOTE_DB_USER', 'CONTENT_SYNC_DATABASE_REMOTE_DB_NAME',\n 'CONTENT_SYNC_DATABASE_REMOTE_DB_PASS'\n ]);\n\n $this->taskPullDbViaSsh()\n ->sshHost(getenv('CONTENT_SYNC_HOST'))\n ->sshUser(getenv('CONTENT_SYNC_SSH_USER'))\n ->sshKey(getenv('CONTENT_SYNC_SSH_KEY'))\n ->remoteDbHost(getenv('CONTENT_SYNC_DATABASE_REMOTE_HOST'))\n ->remoteDbUser(getenv('CONTENT_SYNC_DATABASE_REMOTE_DB_USER'))\n ->remoteDbName(getenv('CONTENT_SYNC_DATABASE_REMOTE_DB_NAME'))\n ->remoteDbPass(getenv('CONTENT_SYNC_DATABASE_REMOTE_DB_PASS'))\n ->localDbName(getenv('DB_NAME'))\n ->localDbPass(getenv('DB_PASS'))\n ->run();\n }",
"public function cronGit() {\t\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"public function resolveConflicts()\n {\n $this->preventConflicts();\n }",
"function github_plugin_updater_test_init() {\ninclude_once 'updater.php';\ndefine( 'WP_GITHUB_FORCE_UPDATE', true );\n}",
"private function _doOpen()\n {\n // get current branch\n $current_branch = Git_Daily_GitUtil::currentBranch();\n if ($current_branch != $this->config[$this->base_branch]) {\n throw new Git_Daily_Exception(\n \"currently not on {$this->config[$this->base_branch]} but on $current_branch\"\n );\n }\n\n // check if current release process opened\n $release_branches = Git_Daily_GitUtil::releaseBranches($this->branch_prefix);\n if (!empty($release_branches)) {\n $release_branches = implode(',', $release_branches);\n\n throw new Git_Daily_Exception(\n \"release process (on local) is not closed, so cannot open release\\n release branches: $release_branches\",\n Git_Daily::E_RELEASE_CANNOT_OPEN,\n null, true\n );\n }\n\n // check if remote has release process\n if (isset($this->config['remote'])) {\n self::info('first, fetch remotes');\n self::cmd(Git_Daily::$git, array('fetch', '--all'));\n\n $remote = $this->config['remote'];\n $release_branches = self::cmd(Git_Daily::$git, array('branch', '-a'),\n array('grep', array(\"remotes/$remote/\" . $this->branch_prefix))\n );\n\n if (!empty($release_branches)) {\n $release_branches = implode(',', $release_branches);\n\n throw new Git_Daily_Exception(\n \"release process (on remote) is not closed, so cannot open release\\n release branches: $release_branches\",\n Git_Daily::E_RELEASE_CANNOT_OPEN,\n null, true\n );\n }\n }\n\n $y = $this->opt->getOptVar('yes');\n $new_release_branch = $this->branch_prefix . '/' . date('Ymd-Hi');\n // confirmation\n if (!$y\n && !Git_Daily_CommandUtil::yesNo(\n \"Confirm: create branch $new_release_branch from $current_branch ?\", Git_Daily_CommandUtil::YESNO_NO\n )\n ) {\n throw new Git_Daily_Exception('abort');\n }\n\n // merge current branch\n if (isset($this->config['remote'])) {\n //\n // Fetch --all is already done. Just git merge.\n //\n $remote = $this->config['remote'];\n self::info(\"merge $current_branch branch from remote\");\n $res = self::cmd(Git_Daily::$git, array('merge', \"$remote/$current_branch\"));\n if (self::$last_command_retval != 0) {\n self::warn('merge failed');\n self::outLn($res);\n throw new Git_Daily_Exception('abort');\n }\n }\n\n // create release branch\n self::info(\"create release branch: $new_release_branch\");\n $res = self::cmd(Git_Daily::$git, array('branch', $new_release_branch));\n if (isset($this->config['remote'])) {\n $remote = $this->config['remote'];\n self::info(\"push to remote: $remote\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('push', $remote, $new_release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('push failed');\n $res = self::cmd(Git_Daily::$git, array('branch', '-d', $new_release_branch));\n self::outLn($res);\n self::info('rollback (delete branch)');\n\n throw new Git_Daily_Exception('abort');\n }\n }\n\n self::cmd(Git_Daily::$git, array('checkout', $new_release_branch));\n return 'release opened';\n }",
"public static function rebuild($force = false);",
"function postfix_sync_on_changes() {\n\tglobal $config, $g;\n\tif (is_array($config['installedpackages']['postfixsync']['config'])) {\n\t\t$postfix_sync = $config['installedpackages']['postfixsync']['config'][0];\n\t\t$synctimeout = $postfix_sync['synctimeout'] ? : '250';\n\t\t$synconchanges = $postfix_sync['synconchanges'];\n\t\tswitch ($synconchanges) {\n\t\t\tcase \"manual\":\n\t\t\t\tif (is_array($postfix_sync['row'])) {\n\t\t\t\t\t$rs = $postfix_sync['row'];\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[postfix] XMLRPC sync is enabled but there are no hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"auto\":\n\t\t\t\tif (is_array($config['hasync'])) {\n\t\t\t\t\t$system_carp = $config['hasync'];\n\t\t\t\t\t$rs[0]['ipaddress'] = $system_carp['synchronizetoip'];\n\t\t\t\t\t$rs[0]['username'] = $system_carp['username'];\n\t\t\t\t\t$rs[0]['password'] = $system_carp['password'];\n\t\t\t\t\t$rs[0]['sync_type'] = \"xmlrpc\";\n\t\t\t\t\t$rs[0]['enabless'] = FALSE;\n\n\t\t\t\t\t// XMLRPC sync is currently only supported over connections using the same protocol and port as this system\n\t\t\t\t\tif ($config['system']['webgui']['protocol'] == \"http\") {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"http\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ? : '80';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"https\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ? : '443';\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_ipaddr($system_carp['synchronizetoip'])) {\n\t\t\t\t\t\tlog_error(\"[postfix] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['enabless'] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[postfix] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (is_array($rs)) {\n\t\t\tlog_error(\"[postfix] XMLRPC sync is starting.\");\n\t\t\tforeach($rs as $sh) {\n\t\t\t\tif ($sh['enabless'] && $sh['sync_type'] == 'xmlrpc') {\n\t\t\t\t\t$sync_to_ip = $sh['ipaddress'];\n\t\t\t\t\t$port = $sh['syncport'];\n\t\t\t\t\t$username = $sh['username'] ? : 'admin';\n\t\t\t\t\t$password = $sh['password'];\n\t\t\t\t\t$protocol = $sh['syncprotocol'];\n\t\t\t\t\t$sync_type = $sh['sync_type'];\n\n\t\t\t\t\t$error = '';\n\t\t\t\t\t$valid = TRUE;\n\n\t\t\t\t\tif ($password == \"\") {\n\t\t\t\t\t\t$error = \"Password parameter is empty. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_ipaddr($sync_to_ip) && !is_hostname($sync_to_ip) && !is_domain($sync_to_ip)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target IP Address or Hostname. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_port($port)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target Port. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif ($valid) {\n\t\t\t\t\t\tpostfix_do_xmlrpc_sync($sync_to_ip, $port, $protocol, $username, $password, $synctimeout);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog_error(\"[postfix] XMLRPC sync with '{$sync_to_ip}' aborted due to the following error(s): {$error}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog_error(\"[postfix] XMLRPC sync completed.\");\n\t\t}\n \t}\n}",
"public function mergeRemoteAndLocal()\n {\n $this->setMergedEnv([]);\n\n /**\n * Add while loop on $this->getRemoteEnv() > 0 since I will remove those\n * before moving onto appending Merged with Local remaining items\n */\n foreach($this->getRemoteEnv() as $key => $value)\n {\n $remote_key = $this->getValueBeforeEqualSign($value);\n\n if($local = $this->inLocal($remote_key))\n {\n //dd($local);\n //Found it\n //Does local have #@ happening before this to consider\n //Add #@ and update existing #@ if it is there\n //Unset all from local to clean it up including one found and #@ before it\n }\n\n //Local does not have it but now need to add it to target with #@\n //Then unset Remote and Local as needed\n\n //When done take remaining local and merge to the end of merged\n }\n }",
"private function amendNonHeadCommit($child_nodes, $tmp_file) {\n list($current) = $this->execxLocal(\n 'log --template %s --rev . --',\n '{node}');\n\n $this->execxLocalWithExtension(\n 'arc-hg',\n 'arc-amend --logfile %s',\n $tmp_file);\n\n list($new_commit) = $this->execxLocal(\n 'log --rev tip --template %s --',\n '{node}');\n\n try {\n $rebase_args = array(\n '--dest',\n $new_commit,\n );\n foreach ($child_nodes as $child) {\n $rebase_args[] = '--source';\n $rebase_args[] = $child;\n }\n\n $this->execxLocalWithExtension(\n 'rebase',\n 'rebase %Ls --',\n $rebase_args);\n } catch (CommandException $ex) {\n $this->execxLocalWithExtension(\n 'rebase',\n 'rebase --abort --');\n throw $ex;\n }\n\n $this->execxLocalWithExtension(\n 'strip',\n 'strip --rev %s --',\n $current);\n }",
"public function update($reset = true)\n\t{\n\t\t$this->command->info('Pulling changes');\n\t\t$tasks = [$this->scm->update()];\n\n\t\t// Reset if requested\n\t\tif ($reset) {\n\t\t\tarray_unshift($tasks, $this->scm->reset());\n\t\t}\n\n\t\treturn $this->bash->runForCurrentRelease($tasks);\n\t}",
"public function actionSyncWithRemote() {\n TwitterSync::$plugin->twitterSyncService->sync();\n\n $result = 'Syncing remote Twitter data';\n\n return $result;\n }",
"public function cleanupRemote()\n {\n if (isset($this->config->keepfor)) {\n $remotePath = './'.$this->dump_folder;\n\n $directories = $this->remoteAdapter->listContents($remotePath);\n\n $timestamp = date('YmdHi', (time() - (time() - strtotime($this->config->keepfor.' ago'))));\n\n foreach ($directories as $dir) {\n if ($dir['filename'] < $timestamp) {\n $this->remoteAdapter->deleteDir($dir['path']);\n }\n }\n }\n }",
"private function doFetch($branchName, $targetDir)\n {\n $this->ssh->ssh_exec(sprintf(\n 'git fetch origin %1$s'\n , $branchName\n ));\n $this->ssh->ssh_exec('git reset --hard FETCH_HEAD');\n\n $this->ssh->ssh_exec(sprintf(\n 'git submodule update --init --recursive'\n ));\n\n $this->ssh->ssh_exec('git pull --force');\n \n }",
"public function run()\n\t{\n $folders = explode(',', $this->folders);\n\n if(empty($folders) || empty($this->host) || empty($this->remoteUser) || empty($this->remoteBasePath) || empty($this->localBasePath)) {\n return Result::error($this);\n }\n\n $collection = $this->collectionBuilder();\n\n foreach ($folders as $folder) {\n $this->printTaskInfo('Sync folder: ' . $folder);\n\n // add path correction between remote and local\n if($this->localPathCorrection) {\n $this->localPathCorrection = $this->addTrailingSlash($this->localPathCorrection);\n $folderLocal = $this->localPathCorrection . $folder;\n }else {\n $folderLocal = $folder;\n }\n\n $this->remoteBasePath = $this->addTrailingSlash($this->remoteBasePath);\n $this->localBasePath = $this->addTrailingSlash($this->localBasePath);\n\n $collection->taskRsync()\n ->fromHost($this->host)\n ->fromPath($this->remoteBasePath . $folder)\n ->fromUser($this->remoteUser)\n ->toPath($this->localBasePath . $folderLocal)\n ->recursive()\n ->exclude('_processed_')\n ->checksum()\n ->wholeFile()\n ->verbose()\n ->progress()\n ->humanReadable()\n ->stats()\n ->run();\n }\n\n\t\t// If we get to here assume everything worked\n\t\treturn Result::success($this);\n\t}",
"public function refresh_local_projects_wrapper() {\r\n\t\tif ( self::$_refresh_updates_flag || isset( $_GET['force-check'] ) ) {\r\n\t\t\tself::$_refresh_updates_flag = false;\r\n\t\t\tself::$_refresh_shutdown_flag = false;\r\n\t\t\tWPMUDEV_Dashboard::$api->refresh_projects_data();\r\n\t\t\t$this->refresh_local_projects( 'remote' );\r\n\t\t} else {\r\n\t\t\t$this->refresh_local_projects( 'local' );\r\n\t\t}\r\n\t}",
"function push()\n {\n // noop, we're working remotely\n }",
"function reconcile($data) {\n /*\n DATA RECONCILIATION\n Data reconciliation is based on three inputs: lastSync, data provided by the client, and data saved on the server\n - `$recon` is the 'instances' data passed from the client, assumed to all be after `$lastSync`\n - The entire data file is retained in `$file`\n - `$compiled` is where the results are compiled to be returned to the client\n - Each data instance in `$file` is screened against `$lastSync` and earlier instances are ignored\n - Instance ID's are checked against the ID's provided by the client -- instances indicated as new, modified, and deleted are all cross-checked\n - All ID's that do not match one received from the client are added to the `$compiled` list in the appropriate category\n - All matches are checked for most recent modification relative to '$lastSync'\n - If only one has been changed since `$lastSync`, the other is altered to match\n - Else if the serialized data strings are exactly equal, the more recent copy is used\n - Else both have changed since, and both are added to the appropriate 'conflicts' list\n - Server data file is iterated first; cleared instances are removed from `$recon`; then any remaining instances in `$recon` are cleared against the same algorithm\n */\n global $file, $output;\n\n // Retrieve 'lastSync' and 'pushed'\n $lastSync = $data->sync;\n $recon = $data->instances;\n if(LOG) {\n $output .= '### reconcile()' . str_repeat(LN, 2);\n $output .= '> *$lastSync:* `' . gettype($lastSync) . ' ' . $lastSync . '`' . LN_JSON;\n $output .= '> *$recon:*' . LN . '> ' . LN . json_block_quote(json_indent($recon)) . str_repeat(LN, 2);\n $output .= LN;\n }\n\n // Compile all changes since lastSync\n // Compare provided activities with activities on disk\n // - Resolve any id conflicts\n\n // Select all server activity since lastSync\n // Check selected activity vs. transmitted for ID conflict\n // - Place each instance in an indicative container in `$compiled`\n // - Remove transmitted data incrementally as it is matched against existing server instances\n // Check remaining transmitted data vs. all server data (not just selected)\n // - Place each instance in an indicative container in `$compiled`\n\n // `$compiled` is a container of containers for each data type/status combo, e.g. ingredients-new, ingredients-modified, etc.\n LOG && $output .= '#### constructing compiled-data index from local file' . LN;\n $compiled = new stdClass();\n foreach($file as $type => $value) {\n if($type === 'deleted')\n continue;\n\n $compiled->$type = new stdClass();\n $compiled->$type->new = new stdClass();\n $compiled->$type->modified = new stdClass();\n $compiled->$type->deleted = new stdClass();\n $compiled->$type->conflicts = new stdClass();\n }\n LOG && $output .= '`$compiled` template:' . json_code_block($compiled);\n LOG && $output .= LN;\n\n // Check for ID conflicts and resolve\n // The following nested loops iterate over every type/status combination\n // - Server data is compared against the client data first\n // - Conflicts are removed from the client data array and added to the `$compiled` array regardless of conflict rank\n // - Any client data remaining in `$recon` is then checked against the server data\n //\n // After the entire reconciliation algorithm is complete:\n // - `$file` will be encoded and re-written to the server data file\n // - `$compiled` will be returned to the client with changes since its last sync, including unresolved conflicts\n // Therefore every data instance created/modified since the last sync should be sorted into one of these two containers\n\n LOG && $output .= '#### iterating over all data types in `$compiled`' . str_repeat(LN, 2);\n $server = new stdClass();\n foreach($compiled as $type => $typeArr) {\n // Skip `$compiled->hash` which is a `number`\n if(!is_object($typeArr))\n continue;\n\n LOG && $output .= \"##### `$type` records\" . str_repeat(LN, 2);\n\n // Select instances from `$file` that have been created, modified, or deleted since `$lastSync`\n LOG && $output .= '###### screening server records against last-sync' . LN;\n $server->$type = new stdClass();\n foreach($file->$type as $serverInst) {\n // Note that `$type` values are coming from `$compiled` so no need to check for `$type === \"deleted\"`\n $id = $serverInst->_created;\n\n // Check if the instance was created since `$lastSync`\n // If not, check if it was modified since `$lastSync`\n if($id > $lastSync) {\n LOG && $output .= '**server instance `' . $id . '` created after last sync**' . LN_JSON;\n LOG && $output .= str_repeat(IN, 2) . '**> adding to `server->new` container**' . LN;\n if(!isset($server->$type->new))\n $server->$type->new = new stdClass();\n\n $server->$type->new->$id = $serverInst;\n }\n else if((isset($serverInst->_modified) && $serverInst->_modified > $lastSync)) {\n LOG && $output .= '**server instance `' . $id . '` modified after last sync**' . LN_JSON;\n LOG && $output .= str_repeat(IN, 2) . '**> adding to `server->modified` container**' . LN_JSON;\n\n if(!isset($server->$type->modified))\n $server->$type->modified = new stdClass();\n\n $server->$type->modified->$id = $serverInst;\n }\n else {\n LOG && $output .= 'server instance `' . $id . '` unchanged since last sync' . LN_JSON;\n }\n }\n foreach($file->deleted->$type as $serverInst) {\n $id = $serverInst->_created;\n\n // Check if the instance was deleted since `$lastSync`\n if($serverInst->_deleted > $lastSync) {\n if(!isset($server->$type->deleted))\n $server->$type->deleted = new stdClass();\n\n $server->$type->deleted->$id = $serverInst;\n }\n }\n LOG && $output .= LN;\n\n\n // Iterate through screened server data instances\n // - Compare with all instances received from the client\n // - If any matches, mark as indeterminate\n // - Check for matches by `$id`\n // - Check for matches by text\n // - Check for matches by text excluding timestamps\n // - If no matches, add to `$compiled`\n if(LOG) {\n $output .= \"###### checking screened server `$type` instances for conflicts\" . LN;\n if(count(get_object_vars($server->$type)) === 0)\n $output .= 'no screened server instances to be checked for conflicts' . LN_JSON;\n }\n\n foreach($server->$type as $serverStatus => $serverStatusArray) {\n foreach($serverStatusArray as $id => $serverInst) {\n // Assign `$serverInst` to `$compiled` as if no conflict will be found\n $compiled->$type->$serverStatus->$id = $serverInst;\n LOG && $output .= 'tentatively adding instance to `compiled->' . $serverStatus . '` container' . str_repeat(LN, 2);\n LOG && $output .= json_indent($serverInst) . str_repeat(LN, 2);\n\n // Prevent `notice`/`warning` messages from being returned to client\n if(!isset($recon->$type))\n continue;\n\n // Check for conflicts and move `$serverInst` accordingly\n foreach($recon->$type as $clientStatus => $clientStatusArray) {\n // If no conflict exists, move on to the next client status\n if(isset($clientStatusArray->$id)) {\n // Assign local reference to matching instance in `$clientStatusArray`\n $clientInst = $clientStatusArray->$id;\n\n // Assign conflicting instances to the 'conflicts' array based on `$type`\n // `$serverInst` will always be the first instance in this array\n if(isset($compiled->$type->conflicts->$id)) {\n // If the conflicts array has already been defined, just push the new instance\n $compiled->$type->conflicts->$id[] = $clientInst;\n }\n else {\n // If this is the first conflict for this id:\n // - Create a conflict array containing the two instances\n // - Remove `$serverInst` from the non-conflict location in `$compiled`\n $compiled->$type->conflicts->$id = array($serverInst, $clientInst);\n unset($compiled->$type->$serverStatus->$id);\n }\n\n // Remove the matching instance from the client data array\n unset($clientStatusArray->$id);\n }\n else {\n // Check JSON text excluding timestamps\n /*$serverClone = clone $serverInst;\n $clientClone = clone $clientInst;\n\n // If match is found excluding timestamps, evaluate timestamps:\n // - If equal, mark as resolved with server value\n // - If not equal, mark as conflict to confirm duplicate on client\n\n // Remove the matching instance from the client data array\n unset($clientStatusArray->$id);*/\n\n // Temporary override/patch until advanced data matching is implementation\n LOG && $output .= \"confirmed no conflicts for server instance id $id\" . str_repeat(LN, 2);\n }\n }\n }\n LOG && $output .= LN;\n }\n LOG && $output .= LN;\n\n // Iterate through remaining client data instances\n // - Compare with all instances stored on the server\n // - Assign a resolved value of each into `$file` or `$compiled`\n if(isset($recon->$type)) {\n LOG && $output .= \"###### checking client data `$type` instances for conflicts\" . LN_JSON;\n\n if(isset($recon->$type->new)) {\n LOG && $output .= '####### checking `new` instances' . LN_JSON;\n if(LOG && count(get_object_vars($server->$type)) === 0)\n $output .= 'no `new` client instances to be processed' . LN;\n\n foreach($recon->$type->new as $id => $clientInst) {\n $conflicts = array_filter($file->$type, function($val) use ($id) {\n return $val->_created === $id;\n });\n if(count($conflicts) > 0) {\n LOG && $output .= count($conflicts) . \" conflicts found in server data for `new` client id $id\" . LN;\n array_unshift($conflicts, $clientInst);\n $compiled->$type->conflicts->$id = $conflicts;\n }\n else {\n LOG && $output .= \"no conflicts for `new` client id $id\" . LN;\n add($file->$type, $clientInst);\n }\n }\n LOG && $output .= LN;\n }\n if(isset($recon->$type->modified)) {\n LOG && $output .= '####### iterating through `modified` instances' . LN_JSON;\n if(LOG && count(get_object_vars($server->$type)) === 0)\n $output .= 'no `new` client instances to be processed' . LN;\n\n foreach($recon->$type->modified as $id => $clientInst) {\n $matches = array_filter($file->$type, function($val) use ($id) {\n return $val->_created === $id;\n });\n LOG && $output .= count($matches) . \" matches found in server data for `modified` client id $id\" . LN_JSON;\n\n // If there are no matches, then the server has no record to modify\n // - Check the server's `deleted` container\n // - If id match is found, compare modified and deleted timestamps\n // If there are more than 1 matches, then mark all instances as conflicts\n // If there is exactly one match, then:\n // If the server instance's `_modified` property is `undefined` OR less than the client instance's `_modified` property, then resolve the match to the client instance\n // Else mark the two instances as conflicts\n if(count($matches) === 0) {\n // Temporary override/patch\n // Mark the client instance as a solo conflict to draw attention\n // - If another instance has already been deleted, add it to the conflicts list\n LOG && $output .= IN . '**THIS CASE IS NOT FULLY IMPLEMENTED AND MAY HAVE UNPREDICTABLE RESULTS**' . LN;\n\n $compiled->$type->conflicts->$id = array($clientInst);\n $deleted = array_filter($file->deleted->$type, function($val) use ($id) {\n return $val->_created === $id;\n });\n if(count($deleted) > 0)\n array_splice($compiled->$type->conflicts->$id, 0, 0, $deleted);\n }\n else if(count($matches) > 1) {\n // There shouldn't be more than one match for a given id\n LOG && $output .= IN . '**ERROR - DATA FILE HAS BEEN IMPROPERLY MAINTAINED**' . LN;\n\n array_push($matches, $clientInst);\n $compiled->$type->conflicts->$id = $matches;\n }\n else {\n // Replace the server's record with the client's subject to the following data-integrity check\n // Criteria for clean replacement are:\n // 1) The matched server instance has not been `_modified`\n // **OR**\n // 2) All modifications are congruent:\n // a) The matched server instance was `_modified` before `lastSync`\n // **AND**\n // b) The client instance was modified more recently that the server instance\n if(!isset($matches[0]->_modified) || ($matches[0]->_modified < $lastSync && $clientInst->_modified > $matches[0]->_modified)) {\n LOG && $output .= IN . \"clean replacement of client-modified record $id\" . LN;\n\n // Replace the instance and maintain correct sort order\n replace($file->$type, $matches[0], $clientInst);\n }\n else {\n LOG && $output .= IN . \"aborting incongruent replacement of modified record $id\" . LN;\n\n array_push($matches, $clientInst);\n $compiled->$type->conflicts->$id = $matches;\n }\n }\n }\n LOG && $output .= LN;\n }\n if(isset($recon->$type->deleted)) {\n LOG && $output .= '####### iterating through `deleted` instances' . LN;\n foreach($recon->$type->deleted as $id => $clientInst) {\n $matches = array_filter($file->$type, function($val) use ($id) {\n return $val->_created === $id;\n });\n if(count($matches) === 0) {\n $compiled->$type->conflicts->$id = array($clientInst);\n }\n else if(count($matches) > 1) {\n array_push($matches, $clientInst);\n $compiled->$type->conflicts->$id = $matches;\n }\n else {\n // Remove the instance from its container array\n remove($file->$type, $clientInst);\n\n // Add the instance to its respective \"deleted\" container\n add($file->deleted->$type, $clientInst);\n }\n }\n }\n /*foreach($recon->$type as $clientStatus => $clientStatusArray) {\n foreach($clientStatusArray as $id => $clientInst) {\n // Add the new client instance to the beginning of the server array as if no conflicts will be found\n foreach($file->$type as $serverTypeArray) {\n array_shift($serverTypeArray, $clientInst);\n foreach($serverTypeArray as $ind => $serverInst) {\n if($serverInst->_created !== $id) {\n continue;\n }\n\n // If a conflict is found, relocate the client instance from the beginning of the array to the location of the matched server instance\n }\n }\n }\n }*/\n LOG && $output .= LN;\n }\n\n // Clean up `$compiled` to minimize data transfer\n foreach($compiled->$type as $status => $statusArray) {\n if(count(get_object_vars($compiled->$type->$status)) === 0)\n unset($compiled->$type->$status);\n }\n if(count(get_object_vars($compiled->$type)) === 0)\n unset($compiled->$type);\n }\n\n // Write all changes to disk\n LOG && $output .= 'reconciled data to be written to file on server:' . json_code_block($file);\n LOG && $output .= LN;\n $newHash = write_file();\n\n // Define container `data` object\n $result = new stdClass();\n $result->data = $compiled;\n\n // MAKE SURE $file REFLECTS ALL CHANGES BEFORE COMPUTING HASH IN FOLLOWING COMMAND\n // Compute new server hash and add to `$compiled`\n $result->hash = $newHash;\n\n // Return selected activity and new hash\n LOG && $output .= 'compiled data to be returned to client:' . json_code_block($result);\n LOG && $output .= LN;\n return json_encode($result, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);\n}",
"function branch_exists_local($branch_spec) {\n exec(\"git fetch -p -q\", $output = array(), $retval);\n if ($retval != 0) {\n final_result_internal_error(\"Could not update local repository from origin. Bailing out.\");\n }\n\n exec(\"git show-ref --verify --quiet '$branch_spec'\", $output = array(), $retval);\n return $retval == 0;\n}",
"private function _reissue()\n\t{\n\t\t$this->created = time();\n\t}",
"function wpad_sync_on_changes() {\n\tglobal $config;\n\n\tif (is_array($config['installedpackages']['wpadsync']['config'])) {\n\t\t$wpad_sync = $config['installedpackages']['wpadsync']['config'][0];\n\t\t$synconchanges = $wpad_sync['synconchanges'];\n\t\t$synctimeout = $wpad_sync['synctimeout'] ?: '250';\n\t\tswitch ($synconchanges) {\n\t\t\tcase \"manual\":\n\t\t\t\tif (is_array($wpad_sync['row'])) {\n\t\t\t\t\t$rs = $wpad_sync['row'];\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[wpad] XMLRPC sync is enabled but there are no hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"auto\":\n\t\t\t\tif (is_array($config['hasync'])) {\n\t\t\t\t\t$system_carp = $config['hasync'];\n\t\t\t\t\t$rs[0]['ipaddress'] = $system_carp['synchronizetoip'];\n\t\t\t\t\t$rs[0]['username'] = $system_carp['username'];\n\t\t\t\t\t$rs[0]['password'] = $system_carp['password'];\n\t\t\t\t\t$rs[0]['syncdestinenable'] = FALSE;\n\n\t\t\t\t\t// XMLRPC sync is currently only supported over connections using the same protocol and port as this system\n\t\t\t\t\tif ($config['system']['webgui']['protocol'] == \"http\") {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"http\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ?: '80';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['syncprotocol'] = \"https\";\n\t\t\t\t\t\t$rs[0]['syncport'] = $config['system']['webgui']['port'] ?: '443';\n\t\t\t\t\t}\n\t\t\t\t\tif ($system_carp['synchronizetoip'] == \"\") {\n\t\t\t\t\t\tlog_error(\"[wpad] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rs[0]['syncdestinenable'] = TRUE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlog_error(\"[wpad] XMLRPC CARP/HA sync is enabled but there are no system backup hosts configured as replication targets.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (is_array($rs)) {\n\t\t\tlog_error(\"[wpad] XMLRPC sync is starting.\");\n\t\t\tforeach ($rs as $sh) {\n\t\t\t\t// Only sync enabled replication targets\n\t\t\t\tif ($sh['syncdestinenable']) {\n\t\t\t\t\t$sync_to_ip = $sh['ipaddress'];\n\t\t\t\t\t$port = $sh['syncport'];\n\t\t\t\t\t$username = $sh['username'] ?: 'admin';\n\t\t\t\t\t$password = $sh['password'];\n\t\t\t\t\t$protocol = $sh['syncprotocol'];\n\n\t\t\t\t\t$error = '';\n\t\t\t\t\t$valid = TRUE;\n\n\t\t\t\t\tif ($password == \"\") {\n\t\t\t\t\t\t$error = \"Password parameter is empty. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_ipaddr($sync_to_ip) && !is_hostname($sync_to_ip) && !is_domain($sync_to_ip)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target IP Address or Hostname. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif (!is_port($port)) {\n\t\t\t\t\t\t$error .= \"Misconfigured Replication Target Port. \";\n\t\t\t\t\t\t$valid = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\tif ($valid) {\n\t\t\t\t\t\twpad_do_xmlrpc_sync($sync_to_ip, $port, $protocol, $username, $password, $synctimeout);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog_error(\"[wpad] XMLRPC sync with '{$sync_to_ip}' aborted due to the following error(s): {$error}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog_error(\"[wpad] XMLRPC sync completed.\");\n\t\t}\n \t}\n}",
"public function run($options = array())\n {\n Hook::fire('before_db_pull');\n $ssh = new SSH();\n output(\"Pulling remote database\");\n $file_name = 'db_' . time() . '.sql';\n $remote_file = REMOTE_HOME_PATH.$file_name;\n $local_file = C5_DIR.\"{$file_name}\";\n $ssh->runCommand('mysqldump -h ' . REMOTE_DB_HOST . ' -u ' . REMOTE_DB_USER . ' -p'.REMOTE_DB_PASS . ' ' . REMOTE_DB_NAME. \" > \" . $remote_file);\n $ssh->scp($remote_file, $local_file);\n $ssh->rmRemoteFile($remote_file);\n output('Done', 'success');\n $sql = file($local_file);\n $db = new LocalDB();\n $templine = '';\n\n $size = count($sql);\n $current = 0;\n foreach ($sql as $line) {\n $current++;\n // Skip it if it's a comment\n if (substr($line, 0, 2) == '--' || $line == '') {\n continue;\n }\n $templine .= $line;\n if (substr(trim($line), -1, 1) == ';') {\n $db->execute($templine);\n showStatus($current, $size);\n $templine = '';\n }\n }\n unlink($local_file);\n output(\"Done\", 'success');\n Hook::fire('after_db_pull');\n return true;\n }",
"public function shutdown_refresh() {\r\n\t\tif ( self::$_refresh_shutdown_flag && ! defined( 'WPMUDEV_REMOTE_SKIP_SYNC' ) ) {\r\n\t\t\tWPMUDEV_Dashboard::$site->refresh_local_projects( 'remote' );\r\n\t\t}\r\n\t}",
"public function getRemotes()\n\t{\n\t\tif($this->_remotes === NULL)\n\t\t{\n\t\t\t$this->_remotes = array();\n\t\t\t$command = 'remote -v';\n\t\t\t$response = explode(\"\\n\", $this->run($command));\n\n\t\t\tforeach($response as $line)\n\t\t\t{\n\t\t\t\tif(preg_match('/(\\w+)\\s+(.*) \\((fetch|push)\\)/', $line, $matches))\n\t\t\t\t{\n\t\t\t\t\tif(!isset($this->_remotes[$matches[1]]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_remotes[$matches[1]] = new GitRemote($matches[1], $this);\n\t\t\t\t\t}\n\t\t\t\t\t$remote = $this->_remotes[$matches[1]];\n\t\t\t\t\tif($matches[3] == 'fetch')\n\t\t\t\t\t{\n\t\t\t\t\t\t$remote->fetchUrl = $matches[2];\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$remote->pushUrl = $matches[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_remotes;\n\t}"
] | [
"0.671712",
"0.5871257",
"0.580504",
"0.55418545",
"0.5367383",
"0.4944708",
"0.49414575",
"0.48632008",
"0.48258397",
"0.47052354",
"0.46237",
"0.45893288",
"0.45868418",
"0.45551482",
"0.4532935",
"0.44965363",
"0.4480381",
"0.44795918",
"0.44620982",
"0.44531685",
"0.44377384",
"0.4410772",
"0.43651667",
"0.43310413",
"0.4320785",
"0.43105036",
"0.42984316",
"0.42679584",
"0.42660165",
"0.4248974"
] | 0.59998614 | 1 |
Get path to composer.json | public function getComposerPath()
{
return $this->getDirectory() . '/composer.json';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getJsonPath(): string\n {\n $jsonPath = defined('CRAFT_COMPOSER_PATH') ? CRAFT_COMPOSER_PATH : Craft::getAlias('@root/composer.json');\n if (!is_file($jsonPath)) {\n throw new Exception('Could not locate your composer.json file.');\n }\n return $jsonPath;\n }",
"private function getComposerPath()\n {\n // phpcs:disable\n $composerPath = realpath(__DIR__ . '/../../../../composer.json');\n // phpcs:enable\n\n // phpcs:disable\n return dirname($composerPath);\n // phpcs:enable\n }",
"public function getComposerJson()\n {\n $json = $this->getPath('composer.json');\n\n if (!file_exists($json)) {\n return null;\n }\n\n return json_decode(file_get_contents($json));\n }",
"public function getComposerPath() {\n\t\treturn $this->getPathToResource() . '/Private/PHP/composer.phar';\n\t}",
"public function findComposer(): string\n {\n $composerPath = getcwd().'/composer.phar';\n\n return file_exists($composerPath) ? '\"'.PHP_BINARY.'\" '.$composerPath : 'composer';\n }",
"protected function findComposer()\n {\n $composerPath = getcwd().'/composer.phar';\n\n if (file_exists($composerPath)) {\n return '\"'.PHP_BINARY.'\" '.$composerPath;\n }\n\n return 'composer';\n }",
"protected function findComposer()\n {\n $composerPath = getcwd().'/composer.phar';\n\n if (file_exists($composerPath)) {\n return '\"'.PHP_BINARY.'\" '.$composerPath;\n }\n\n return 'composer';\n }",
"private function findComposer()\n {\n if (file_exists(getcwd().'/composer.phar')) {\n return '\"'.PHP_BINARY.'\" '.getcwd().'/composer.phar';\n }\n\n return 'composer';\n }",
"protected function findComposer()\n {\n if (file_exists(getcwd().'/composer.phar')) {\n return '\"'.PHP_BINARY.'\" '.getcwd().'/composer.phar';\n }\n\n return 'composer';\n }",
"protected function findComposer()\n {\n if (file_exists(getcwd().'/composer.phar')) {\n return '\"'.PHP_BINARY.'\" '.getcwd().'/composer.phar';\n }\n\n return 'composer';\n }",
"protected function getComposer()\n {\n if (!empty($this->composer)) {\n return $this->composer;\n }\n\n $path = getcwd() . '/' . $this->getDirectoryInput() . '/composer.json';\n\n if (!file_exists($path)) {\n throw new \\RuntimeException('');\n }\n\n $composer = json_decode(file_get_contents($path), true);\n return $this->composer = is_array($composer) ? $composer : [];\n }",
"private function getComposerJson()\n {\n $composerFile = ($this->composerFileFactory)();\n return new JsonFile($composerFile);\n }",
"public function getComposerFile(): File\n {\n return new File(sprintf('%s/%s', $this->rootDir, self::PATH_COMPOSER_JSON));\n }",
"protected function findComposerBinary()\n {\n if (file_exists(getcwd().'/composer.phar')) {\n return '\"'.PHP_BINARY.'\" composer.phar';\n }\n\n return 'composer';\n }",
"protected function getCustomVendorPathFromComposer($composerConfigurationPath)\n {\n $composerFile = file_get_contents($composerConfigurationPath);\n $composerJson = json_decode($composerFile, true);\n\n return isset($composerJson['config']['vendor-dir']) ? $composerJson['config']['vendor-dir'] : 'vendor';\n }",
"public function getPackagePath();",
"public function getLockPath()\n {\n $jsonPath = $this->getJsonPath();\n // Logic based on \\Composer\\Factory::createComposer()\n $lockPath = pathinfo($jsonPath, PATHINFO_EXTENSION) === 'json'\n ? substr($jsonPath, 0, -4) . 'lock'\n : $jsonPath . '.lock';\n return file_exists($lockPath) ? $lockPath : null;\n }",
"public function getComposerData()\n {\n $path = $this->getComposerPath();\n if (!file_exists($path)) {\n throw new Exception(\"No composer.json found in module \" . $this->getName());\n }\n return Config::loadFromFile($path);\n }",
"protected function updateComposerJson()\n {\n $composerJson = getenv('COMPOSER') ?: 'composer.json';\n\n $path = base_path($composerJson);\n\n //\n $config = json_decode(file_get_contents($path), true);\n\n if (is_array($config) && isset($config['autoload'])) {\n $namespace = $this->data['namespace'] .'\\\\';\n\n $config['autoload']['psr-4'][$namespace] = 'plugins/' . $this->data['name'] . \"/src/\";\n\n $output = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . \"\\n\";\n\n file_put_contents($path, $output);\n }\n }",
"private function versionFromComposer()\n {\n $composerFile = $this->readJsonFile('composer.json');\n\n /*\n * Look for platform override\n *\n * \"config\": {\n * \"platform\": {\n * \"php\": \"5.6.0\"\n * }\n * }\n */\n if (isset($composerFile['config']['platform']['php'])) {\n return $composerFile['config']['platform']['php'];\n }\n\n return null;\n }",
"protected function getPackageConfigFile()\n {\n return __DIR__.'/../config/countries.php';\n }",
"public function testComposerJsonExists() {\n $this->assertFileExists($this->getProjectDirectory() . '/composer.json');\n }",
"private function getJson()\n {\n return json_decode(file_get_contents($this->composerFile->getPathname()));\n }",
"private function getFixtureFilePath(): string\n {\n return __DIR__.'/../fixtures/database/json-settings.json';\n }",
"private function getComposerOption(InputInterface $input): string\n {\n if ($input->getOption('composer') !== false) {\n return (string) $input->getOption('composer');\n }\n\n if ($composerFile = getenv('SEMVER_CLI_COMPOSER_FILE')) {\n return $composerFile;\n }\n\n if (isset($this->config['composer_file'])) {\n return (string) $this->config['composer_file'];\n }\n\n return self::DEFUALT_COMPOSER_FILE;\n }",
"private function composer() {\n $path = app_path() . '\\\\..\\\\composer.lock';\n\n if (!file_exists($path))\n return;\n\n // Parse composer.lock\n $content = @file_get_contents($path);\n $list = @json_decode($content);\n\n if (!$list)\n return;\n\n $list = object_get($list, 'packages', []);\n\n // Determe the parent of the composer modules, most likely this will\n // resolve to laravel/laravel.\n $parent = '';\n $parent_path = realpath(app_path() . '\\\\..\\\\composer.json');\n if (file_exists($parent_path)) {\n $parent_object = @json_decode(@file_get_contents($parent_path));\n\n if ($parent_object)\n $parent = object_get($parent_object, 'name', '');\n }\n\n // Store base package, which is laravel/laravel.\n $packages = [[\n 'n' => $parent,\n 'l' => $parent_path,\n 'v' => ''\n ]];\n\n // Add each composer module to the packages list,\n // but respect the parent relation.\n foreach ($list as $package) {\n $packages[] = [\n 'n' => $package->name,\n 'v' => $package->version,\n 'p' => $parent,\n 'l' => $parent_path\n ];\n }\n\n return $packages;\n }",
"private function readVersion()\n {\n $composer = file_get_contents(self::$dir.'/composer.json');\n $composer_json = json_decode($composer);\n $version = $composer_json->version;\n\n return $version;\n }",
"public function getCurrentThemeJsonPath()\n {\n return $this->getConfiguredBundlePath() . '/css/' . $this->getThemeChoice() . '/theme.json';\n }",
"public function getRelativeVendorDir(Composer $composer)\n {\n if ($this->_relativeVendorDir === null) {\n $this->_relativeVendorDir = rtrim($composer->getConfig()->get('vendor-dir', Config::RELATIVE_PATHS), DIRECTORY_SEPARATOR);\n }\n \n return $this->_relativeVendorDir;\n }",
"private static function getVendorDirectoryPath(): string\n {\n $reflection = new \\ReflectionClass(\\Composer\\Autoload\\ClassLoader::class);\n\n return \\dirname((string) $reflection->getFileName(), 2);\n }"
] | [
"0.8144882",
"0.80481684",
"0.77757204",
"0.75490075",
"0.7478285",
"0.73899746",
"0.73899746",
"0.73194176",
"0.72672904",
"0.72672904",
"0.7027749",
"0.6842211",
"0.6804052",
"0.6686138",
"0.6420978",
"0.6406792",
"0.62926763",
"0.62924725",
"0.62879074",
"0.6209316",
"0.6202616",
"0.61679465",
"0.61658037",
"0.61629343",
"0.6150631",
"0.6124185",
"0.6123713",
"0.61137134",
"0.60854405",
"0.60731417"
] | 0.8629454 | 0 |
Returns the oldest version that matches the given version constraint | public function getOldestVersionMatching(ComposerConstraint $composerConstraint, $stableOnly = false)
{
// Filter known tags by the constraint first
$childVersions = $composerConstraint->filterVersions($this->getTags());
// Check if we want to filter out stable tags only
// E.g. prefer "3.4.0..3.4.1" over "3.4.0-rc1..3.4.1"
if ($stableOnly) {
$stableChildVersions = Version::filter($childVersions, function (Version $nextTag) {
return $nextTag->isStable();
});
// Use stable versions if available, or fall back to unstable
if (!empty($stableChildVersions)) {
$childVersions = $stableChildVersions;
}
}
// Get smallest matching version
$childVersions = Version::sort($childVersions, Version::ASC);
if (!empty($childVersions)) {
return reset($childVersions);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStartingVersion();",
"public function getPriorVersion($fallback = true)\n {\n // If it has been explicitly provided, or we shouldn't fall back to using tags, return the prop\n if ($this->priorVersion || !$fallback) {\n return $this->priorVersion;\n }\n\n // Otherwise, guess it from the constraint and existing tags\n $tags = $this->getLibrary()->getTags();\n return $this->getVersion()->getPriorVersionFromTags($tags);\n }",
"function nextVersion()\n {\n $db = eZDB::instance();\n $versions = $db->arrayQuery(\"SELECT ( MAX( version ) + 1 ) AS next_id FROM ezcontentobject_version\n WHERE contentobject_id='$this->ID'\");\n\n return $versions[0][\"next_id\"];\n\n }",
"public function getMinWpVersion(): VersionInterface;",
"public function getMinimalVersion()\n {\n return $this->minimal_version;\n }",
"private function buildVersionConstraint(string $version)\n {\n $parser = new VersionParser();\n try {\n $v = $parser->normalize($version);\n $stability = VersionParser::parseStability($v);\n if ($v === '9999999-dev') {\n $v = 'dev-trunk';\n } else {\n $v = explode('-', $v);\n $v = array_shift($v);\n $v = explode('.', $v);\n do {\n $count = count($v);\n if ($count <= 2) {\n break;\n }\n if ((int)$v[$count - 1] === 0) {\n array_pop($v);\n } else {\n break;\n }\n } while (true);\n if ($stability === 'stable' && count($v) > 2) {\n array_pop($v);\n }\n $v = '^' . implode('.', $v);\n }\n if ($stability !== 'stable') {\n $v .= '@' . $stability;\n }\n\n return $v;\n } catch (UnexpectedValueException $e) {\n return false;\n }\n }",
"function previousVersion()\n {\n $db = eZDB::instance();\n $versions = $db->arrayQuery(\"SELECT version FROM ezcontentobject_version\n WHERE contentobject_id='$this->ID'\n ORDER BY version DESC\", array('limit' => 2));\n if (count($versions) > 1 and isset($versions[1]['version'])) {\n return $versions[1]['version'];\n } else {\n return false;\n }\n }",
"public function lowerThan(Version $version)\n {\n return $this->compareWith($version, '<');\n }",
"private function wpResolveVersionNo(string $versionContraint)\n {\n // Remove a v at the start if it exists\n $versionContraint = str_replace('v', '', $versionContraint);\n\n // If the constraint it a single wildcard, lets just\n // return the latest stable release of wordpress.\n if ($versionContraint == '*')\n {\n $json = (new Http)->request('GET', self::$WP_VERSION_URL)->getBody();\n return json_decode($json, true)['offers'][0]['version'];\n }\n\n // Download the releases from the wordpress site.\n $html = (new Http)->request('GET', self::$WP_RELEASES_URL)->getBody()->getContents();\n\n // Extract a list of download links, these contain the versions.\n preg_match_all(\"#><a href='https://wordpress\\.org/wordpress-[^>]+#\",\n $html, $matches\n );\n\n // Filter the links to obtain a list of just versions\n $versions = Linq::from($matches[0])\n ->select(function(string $v){ return Str::s($v); })\n ->where(function(Str $v){ return $v->endsWith(\".zip'\"); })\n ->where(function(Str $v){ return !$v->contains('IIS'); })\n ->where(function(Str $v){ return !$v->contains('mu'); })\n ->select(function(Str $v){ return $v->between('wordpress-', '.zip'); })\n ->where(function(Str $v)\n {\n if ($v->contains('-'))\n {\n return preg_match(\"#.*-(dev|beta|alpha|rc).*#i\", (string)$v) === 1;\n }\n\n return true;\n })\n ->toArray();\n\n // Let semver take over and work it's magic\n return (string) Semver::satisfiedBy($versions, $versionContraint)[0];\n }",
"public function previousVersion()\n {\n return $this->versions()->orderBy((new Version())->getKeyName(), 'DESC')->limit(1)->offset(1)->first();\n }",
"public function getMinimumRequiredAppVersion()\n {\n if (array_key_exists(\"minimumRequiredAppVersion\", $this->_propDict)) {\n return $this->_propDict[\"minimumRequiredAppVersion\"];\n } else {\n return null;\n }\n }",
"private function getCurrentVersion()\n {\n $file_iterator = new SplFileObject($this->current_dir . $this->version_file);\n\n foreach ($file_iterator as $line) {\n preg_match('/\\$this->version ?= ?[\\'\"]([0-9]*.[0-9]*.[0-9]*)[\\'\"]/', $line, $result);\n if ($result) {\n $file_iterator = null;\n return $result[1];\n }\n }\n\n $file_iterator = null;\n return '0.0.0';\n }",
"public function getVersion()\n {\n $this->query(\"SELECT VERSION()\");\n $this->nextRecord();\n $array = $this->getRecord();\n return array_pop($array);\n }",
"public function getMinPhpVersion(): VersionInterface;",
"public function getApiVersionMajor()\r\n {\r\n $version = explode('.', $this->getApiVersion(), 4);\r\n\r\n return $version[0];\r\n }",
"public function currentVersion()\n {\n return $this->versions()->orderBy((new Version())->getKeyName(), 'DESC')->first();\n }",
"abstract public function getLocalVersion(): int;",
"public function getMajorApiVersion()\n\t{\n\t\t$version = explode('.', self::API_VERSION);\n\t\treturn $version[0];\n\t}",
"private function checkCurrentVersion() {\n $url = 'https://api.github.com/repos/pantheon-systems/cli/releases?per_page=1';\n $response = Request::send($url, 'GET'); \n $json = $response->getBody(true);\n $data = json_decode($json);\n $release = array_shift($data);\n $this->cache->put_data('latest_release', array('version' => $release->name, 'check_date' => time()));\n return $release->name;\n }",
"public function isMinimumVersion()\n\t{\n\t\treturn version_compare($this->getVersion(), static::$dbMinimum) >= 0;\n\t}",
"function get_named_sem_ver( $new_version, $original_version ) {\n\n\tif ( ! Comparator::greaterThan( $new_version, $original_version ) ) {\n\t\treturn '';\n\t}\n\n\t$parts = explode( '-', $original_version );\n\t$bits = explode( '.', $parts[0] );\n\t$major = $bits[0];\n\tif ( isset( $bits[1] ) ) {\n\t\t$minor = $bits[1];\n\t}\n\tif ( isset( $bits[2] ) ) {\n\t\t$patch = $bits[2];\n\t}\n\n\tif ( isset( $minor ) && Semver::satisfies( $new_version, \"{$major}.{$minor}.x\" ) ) {\n\t\treturn 'patch';\n\t}\n\n\tif ( Semver::satisfies( $new_version, \"{$major}.x.x\" ) ) {\n\t\treturn 'minor';\n\t}\n\n\treturn 'major';\n}",
"function getPreviousMinorVersion( $major ) {\n\t$filter = \"wmf/1.{$major}.0-wmf\";\n\n\t// get the list in a raw output format which would be visible in the\n\t// console for this command, sorted by version numbers\n\t$rawList = shell_exec( \"git branch -a --list */{$filter}* | sort -V\" );\n\t// convert the list (which is one string now) into an array of strings,\n\t// splitted at the end of each line\n\t$list = explode( PHP_EOL, $rawList );\n\t$minor = '';\n\t// there will be at least one (empty) line, check if there are more\n\t// elements, which would be the list of versions.\n\tif ( count( $list ) !== 1 ) {\n\t\t// remove anythign before the correct version semantic (wmf/1.26wmf1\n\t\t// or wmf/1.27.0-wmf.1) using the filter defined above\n\t\t// the array will start counting at 0 and will has one empty \"line\" at\n\t\t// the end, so count all elements and subtract 2\n\t\tlist( $major, $minor ) = getMajorMinor( strstr( $list[ count( $list ) - 2 ], $filter ) );\n\t}\n\n\t// check, if there was a good result, otherwise assume, that there are 22\n\t// previous minor versions and use that\n\treturn ( $minor !== \"\" ) ? $minor : 22;\n}",
"public function getLatestVersionNumber(): string\n {\n return $this->cache->remember(self::CACHE_KEY, now()->addDay(), function (): string {\n try {\n return json_decode($this->client->get('https://api.github.com/repos/koel/koel/tags')->getBody())[0]\n ->name;\n } catch (Throwable $e) {\n $this->logger->error($e);\n\n return koel_version();\n }\n });\n }",
"function version_check($min, $curr) {\r\n\r\n$testVer = intval( str_replace(\".\", \"\", $min) );\r\n$curVer = intval( str_replace(\".\", \"\", $curr ) );\r\nif( $curVer < $testVer ) {\r\n\treturn false;\r\n\t} else {\r\n\t\treturn true;\r\n\t}\r\n}",
"public function findAppLanguageVersion() {\n // get version\n $query = $this->find('all', array(\n 'fields' => ['version'],\n 'conditions' => [\n 'Versions.device' => Configure::read('Version.app_language')\n ],\n 'order' => ['Versions.released' => 'DESC']\n ))->first();\n if (!empty($query)) {\n $data = $query->toArray();\n $version = $data['version'];\n }\n // do not version set first version 1.0\n else {\n $entity = $this->newEntity();\n $entity->version = '1.0';\n $entity->device = Configure::read('Version.app_language');\n $entity->released = date('Y-m-d');\n if ($this->save($entity)) {\n $version = '1.0';\n }\n }\n return $version;\n }",
"public function getOsMinimumVersion()\n {\n if (array_key_exists(\"osMinimumVersion\", $this->_propDict)) {\n return $this->_propDict[\"osMinimumVersion\"];\n } else {\n return null;\n }\n }",
"function version ($v=null)\n{\n return Functional::$instance->version($v);\n}",
"public function get_current_version();",
"public function getCurrentVersion();",
"private static function getLatestVersion() {\n\t\t//--\n\t\tif((string)self::$cache['translations:persistent-cache-version'] != '') {\n\t\t\treturn (string) self::$cache['translations:persistent-cache-version'];\n\t\t} //end if\n\t\t//--\n\t\tif(self::checkSourceParser() === true) {\n\t\t\t$version = (string) SmartAdapterTextTranslations::getTranslationsVersion();\n\t\t\tif((string)$version == '') {\n\t\t\t\t$version = date('Y-m-d');\n\t\t\t\tSmart::log_warning('SmartAdapterTextTranslations::getTranslationsVersion() must return a non-empty string ...');\n\t\t\t} //end if\n\t\t} else {\n\t\t\tSmart::log_warning('SmartAdapterTextTranslations::getTranslationsVersion() must be defined ...');\n\t\t\t$version = date('Y-m-d');\n\t\t} //end if\n\t\t//--\n\t\tself::$cache['translations:persistent-cache-version'] = (string) $version;\n\t\t//--\n\t\treturn (string) self::$cache['translations:persistent-cache-version'];\n\t\t//--\n\t}"
] | [
"0.6094089",
"0.5964549",
"0.5931651",
"0.57782614",
"0.57275087",
"0.56429905",
"0.56407785",
"0.5636527",
"0.5620834",
"0.56119084",
"0.55618954",
"0.555841",
"0.5534299",
"0.55012894",
"0.5467669",
"0.5457752",
"0.54539686",
"0.54449916",
"0.5443635",
"0.5407144",
"0.53862154",
"0.5378441",
"0.5369942",
"0.53696084",
"0.53357065",
"0.533456",
"0.5320858",
"0.5305127",
"0.5276921",
"0.5266842"
] | 0.59912324 | 1 |
Get link for commit format | protected function getCommitLinkFormat()
{
$data = $this->getCowData();
if (isset($data['commit-link'])) {
return $data['commit-link'];
}
// Get from hithub slug
if ($name = $this->getGithubSlug()) {
return "https://github.com/{$name}/commit/{sha}";
}
// Fallback to checking remotes. E.g. gitlab remotes
$remotes = $this->getRemotes();
foreach ($remotes as $name => $remote) {
// Handle https or ssh endpoints
if (preg_match('/^(http(s)?:|git@)/', $remote)) {
// Replace ssh protocol with https
$remote = preg_replace('/git@(.+):/', 'https://$1/', $remote);
// Remove trailing .git
$remote = preg_replace('/\\.git$/', '', $remote);
$remote = rtrim($remote, '/') . '/commit/{sha}';
return $remote;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCommitLink()\n {\n return $this->getCleanedReferenceForLink() . '/commit/' . $this->getCommitId();\n }",
"function simplechart_dev_mode_get_github_commit_link( $hash ) {\n\treturn sprintf(\n\t\t'<a target=\"_blank\" href=\"%s\">%s<a>',\n\t\tesc_url( simplechart_dev_mode_get_github_commit_url( $hash ) ),\n\t\tesc_html( $hash )\n\t);\n}",
"public function getGitUrl();",
"function getViewUrl() {\n return assemble_url('repository_commit', array('project_id'=>$this->getProjectId(), 'repository_id'=>$this->getParentId(), 'r'=>$this->getRevision()));\n }",
"function getCommitUrl($revision) {\n return assemble_url('repository_commit', array('repository_id'=>$this->getId(), 'project_id'=>$this->getProjectId(), 'r'=> $revision));\n }",
"function simplechart_dev_mode_get_github_commit_url( $hash ) {\n\treturn 'https://github.com/alleyinteractive/simplechart/commit/' . esc_attr( $hash );\n}",
"public function getLinkToPatchAttribute()\n {\n $repository = $this->repository;\n\n return 'https://'.$repository->userRepositoryProvider->repositoryProvider->url.'/'.$repository->repository.'/commit/'.$this->sha;\n }",
"public function getGitWebUrl();",
"protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}",
"protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}",
"protected function _link() {\n\n\t\treturn $this->lastChanges( $this->request()::$url );\n\t}",
"public function getLink(){\n return $this->manager()->autoformLink($this->getPack(),$this->getTag());\n }",
"function getHistoryUrl($commit_author = null) {\n $params = array('repository_id'=>$this->getId(),'project_id'=>$this->getProjectId());\n \n if (!is_null($commit_author)) {\n $params['filter_by_author'] = $commit_author;\n } // if\n \n return assemble_url('repository_history', $params);\n }",
"public function getBranchLink()\n {\n return $this->getCleanedReferenceForLink() . '/src/' . $this->getBranch();\n }",
"function getPortalCommitUrl($portal, $revision) {\n \treturn assemble_url('portal_repository_commit', array('portal_name' => $portal->getSlug(), 'repository_id' => $this->getId(), 'r' => $revision));\n }",
"public function getFileLinkTemplate()\n {\n return \\sprintf(\n '%s/src/%s/{FILE}#L{LINE}',\n $this->getCleanedReferenceForLink(),\n $this->getCommitId()\n );\n }",
"function getCommandLink($a_cmd)\n\t{\n\t\tswitch($a_cmd)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$cmd_link = \"ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=\".$this->ref_id;\n\t\t\t\tbreak;\n\n\t\t\tcase \"edit\":\n\t\t\t\t$cmd_link = \"ilias.php?baseClass=ilHTLMEditorGUI&ref_id=\".$this->ref_id;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$cmd_link = \"repository.php?ref_id=\".$this->ref_id.\"&cmd=$a_cmd\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $cmd_link;\n\t}",
"public function getLink();",
"public function getLink() {\n return sprintf(\"@story_show?year=%s&month=%s&day=%s&slug=%s\",\n $this->getCreationYear(),\n $this->getCreationMonth(),\n $this->getCreationDay(),\n $this->internal_url);\n }",
"public function getCommitLink($sha)\n {\n $format = $this->getCommitLinkFormat();\n if ($format) {\n return Format::formatString($format, ['sha' => $sha]);\n }\n return null;\n }",
"public function markdownLink(): string\n {\n return '['. $this->name .']('. $this->getUrl() .')';\n }",
"public function getStatusLink()\r\n {\r\n switch ($this->status) {\r\n case self::STATUS_PENDING:\r\n $statusLink = $this->content->container->createUrl('/task/index/status', ['id' => $this->id, 'status' => self::STATUS_IN_PROGRESS]);\r\n break;\r\n case self::STATUS_IN_PROGRESS:\r\n if ($this->review)\r\n $statusLink = $this->content->container->createUrl('/task/index/status', ['id' => $this->id, 'status' => self::STATUS_PENDING_REVIEW]);\r\n else\r\n $statusLink = $this->content->container->createUrl('/task/index/status', ['id' => $this->id, 'status' => self::STATUS_COMPLETED]);\r\n break;\r\n case self::STATUS_PENDING_REVIEW:\r\n $statusLink = $this->content->container->createUrl('/task/index/status', ['id' => $this->id, 'status' => self::STATUS_COMPLETED]);\r\n break;\r\n default :\r\n $statusLink = '';\r\n }\r\n\r\n return $statusLink;\r\n }",
"private function createRef(): string\n {\n return sprintf(\n '{{Quelle|url=%s|title=Galactapedia %s|date=%s|access_date=%s|ref=true|ref_name=galactapedia}}',\n $this->article->url,\n $this->article->cleanTitle,\n $this->article->created_at->format('d.m.Y'),\n $this->article->updated_at->format('d.m.Y'),\n );\n }",
"public function getEditLink(){\n return $this->manager()->autoformEditLink($this->getPack(),$this->getTag());\n }",
"public function link(): string\n\t{\n\t\treturn get_comment_link($this->comment);\n\t}",
"function getFileCompareUrl($revision, $path, $peg_revision = null) {\n $params = array('repository_id'=>$this->getId(), 'project_id'=>$this->getProjectId());\n \n if($revision !== null) {\n if (instance_of($revision, 'Commit')) {\n $params['r'] = $revision->getRevision();\n } else {\n $params['r'] = $revision;\n } // if\n } // if\n \n if ($peg_revision !== null) {\n $params['peg'] = $peg_revision;\n } // if\n \n if($path !== null) {\n $params['path'] = $path;\n } // if\n \n return assemble_url('repository_compare',$params);\n }",
"public function getChangeLogUrl()\n {\n return $this->_sChangeLogUrl;\n }",
"function github_commit_detail($repo, $commit)\n{\n $ch = curl_init();\n curl_setopt_array($ch, $GLOBALS['curl_base_opts']);\n curl_setopt($ch, CURLOPT_URL, 'https://api.github.com/repos/' . $repo . '/commits/' . $commit);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return json_decode($result, true);\n}",
"function getURL()\n {\n if (!empty($this->url)) {\n return $this->url;\n }\n\n if (!empty($this->canonical)) {\n return $this->canonical;\n }\n\n if (!$this->getSlug() && ($this->getID())) {\n return \\Idno\\Core\\site()->config()->url . 'github/' . $this->getID() . '/' . $this->getPrettyURLTitle();\n } else {\n return parent::getURL();\n }\n\n }",
"function Link() {\n\t\tif(!$this->Hash) $this->write();\n\t\t\n\t\treturn 'newsletterlinks/'. $this->Hash;\n\t}"
] | [
"0.7667028",
"0.7544041",
"0.71457756",
"0.6945439",
"0.69446373",
"0.6880398",
"0.6738659",
"0.6627755",
"0.6454328",
"0.6454328",
"0.6454328",
"0.64402217",
"0.62983716",
"0.6297543",
"0.6280031",
"0.6257978",
"0.6219028",
"0.61804986",
"0.6096063",
"0.6038963",
"0.5904022",
"0.58995545",
"0.58984214",
"0.58877677",
"0.5881224",
"0.5845665",
"0.58293086",
"0.5806953",
"0.5800734",
"0.57877636"
] | 0.80316484 | 0 |
Get list of exclusive children (where this is the first parent) | public function getChildrenExclusive()
{
return array_filter($this->getChildren(), function (Library $child) {
return $child->getParent() === $this;
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function childrenAndSelf()\n {\n return $this->descendantsAndSelf()->whereDepth('<=', 1);\n }",
"public function getChildren()\n\t{\n\t\treturn $this->_fetch(\n\t\t\t$this->_getClass(),\n\t\t\t'nestedset_left > :left AND nestedset_left < :right',\n\t\t\tarray(\n\t\t\t\t'left' => $this->nestedset_left,\n\t\t\t\t'right' => $this->nestedset_right\n\t\t\t)\n\t\t);\n\t}",
"public static function getByMenuChild() {\n return self::find()->where('parent_id not in(0) ')->orderBy('sort DESC')->all();\n }",
"public function getChildren()\n {\n $query = new Query($this->getConnection());\n $query->sql(\n QueryBuilder::select($this->closureTable, ['child_id'])->where(['parent_id' => $this->id, 'depth' => 1])\n );\n list($results) = $query->execute();\n \n $children = [];\n foreach ($results as $row) {\n $children[] = $row['child_id'];\n }\n \n return static::findAll(['id' => $children]);\n }",
"public function childrenOfRoot()\n {\n return $this\n ->filterByTreeLevel(1);\n }",
"public function children()\n {\n return $this->menu->items->filter(function ($item) {\n return $item->hasParent() && $item->parent->name == $this->name;\n });\n }",
"public function children()\n {\n $this->load();\n return array_filter($this->children, function (Menu $m) {\n return $m->isVisible();\n });\n }",
"public function getDescendants()\n {\n $query = new Query($this->getConnection());\n $query->sql(\n QueryBuilder::select($this->closureTable, ['child_id'])->where(['parent_id' => $this->id, 'depth>=' => 1])\n );\n list($results) = $query->execute();\n \n $children = [];\n foreach ($results as $row) {\n $children[] = $row['child_id'];\n }\n \n return static::findAll(['id' => $children]);\n }",
"public function getChildren()\n {\n return $this->owner\n ->hasMany($this->ownerClassName, [ $this->parentIdField => $this->primaryKey ])\n ->orderBy([\n \"$this->tableName.$this->sortField\" => SORT_ASC,\n \"$this->tableName.$this->primaryKey\" => SORT_ASC,\n ]);\n }",
"public function getParentsAndYou()\n {\n return $this->getParentsRecursive($this, []);\n }",
"public function childrens()\n {\n return $this->hasMany(static::class, 'parent_id')\n ->where('parent_id', '<>', 0);\n }",
"function GetChildren()\n\t{\n\t\t$children = array();\n\t\t$p = $this->child;\n\t\tif ($p)\n\t\t{\n\t\t\tarray_push($children, $p);\n\t\t\t$p = $p->sibling;\n\t\t\twhile ($p)\n\t\t\t{\n\t\t\t\tarray_push($children, $p);\n\t\t\t\t$p = $p->sibling;\n\t\t\t}\n\t\t}\n\t\treturn $children;\n\t}",
"public function getChildren() {\n\t\tif ($this->visibleChildren === NULL) {\n\t\t\t$this->visibleChildren = new ArrayObject();\n\n\t\t\t// Note: Use the authentication service instead of performing the\n\t\t\t// access checks on the domain objects themselves, since the authentication\n\t\t\t// service caches its results (which should be safe in this case).\n\t\t\tforeach ($this->children as $child) {\n\t\t\t\tif ($this->authenticationService->checkAuthorization($child, 'read')) {\n\t\t\t\t\t$this->visibleChildren->append($child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->visibleChildren;\n\t}",
"function ra_children_or_siblings( $exclude ) {\n global $post;\n $exclude = [];\n $parent_slug = ra_get_parent_slug();\n\n // Setup initial query args\n $args = [\n \"post_parent\" => $post->ID,\n \"post_type\" => get_post_type( $post->ID ),\n \"post_status\" => \"publish\",\n \"orderby\" => \"menu_order title\",\n \"order\" => \"ASC\",\n \"posts_per_page\" => - 1,\n \"post__not_in\" => $exclude\n ];\n\n $children = get_children( $args, OBJECT );\n\n if ( $children ) :\n return $children;\n elseif ( $post->post_parent != 0 && $parent_slug != \"hospitals\" && (is_single() || is_page()) ) :\n $args[\"post_parent\"] = $post->post_parent;\n $posts = get_posts( $args );\n\n if ( count($posts) > 1 ) {\n return $posts;\n }\n\n endif;\n\n return false;\n}",
"public function get_children()\n {\n // {\n // if (! isset($this->children))\n // {\n //\n // }\n // }\n // else\n // {\n // $this->children = array();\n // }\n return $this->children;\n }",
"public function children() {\n\t\treturn $this->children; \n\t}",
"protected function getParents()\n {\n return array();\n }",
"public function getParentIds();",
"public function getChildrenIds();",
"public function getChildren() {\r\n return $this->getChildrenAL();\r\n }",
"public static function accessibleChildren() {\n return Arr::pluck(Caretaker::where('user_id', Auth::id())->get(), 'child_id');\n }",
"public function getChildren(){\n\t\treturn $this->children;\n\t}",
"public function getChildren(){\n\t\treturn implode(',', $this->getResource()->getChildren($this, false));\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }"
] | [
"0.72727907",
"0.7004477",
"0.6669132",
"0.6600259",
"0.659956",
"0.65511304",
"0.6550059",
"0.6547383",
"0.6528744",
"0.6493479",
"0.6488925",
"0.64578915",
"0.6452137",
"0.6374959",
"0.63744324",
"0.63683534",
"0.633692",
"0.63080436",
"0.6305604",
"0.63032514",
"0.6299357",
"0.6286807",
"0.62736845",
"0.62634695",
"0.62634695",
"0.6263107",
"0.6263107",
"0.6263107",
"0.6263107",
"0.6263107"
] | 0.7703364 | 0 |
Find library in the tree by name. May return self, a direct child, or a nested child. | public function getLibrary($name)
{
if ($this->getName() === $name) {
return $this;
}
foreach ($this->getAllChildren() as $child) {
if ($child->getName() === $name) {
return $child;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function find($name)\n {\n return $this->library->find($name);\n }",
"function libraryGet($name) {\n foreach ($this->libraries as $library) {\n if ($library->name === $name) {\n return $library;\n }\n }\n return FALSE;\n }",
"public function getItem($name)\n {\n // Identity check\n if ($this->getLibrary()->getName() === $name) {\n return $this;\n }\n\n // Check children\n foreach ($this->items as $child) {\n if ($nested = $child->getItem($name)) {\n return $nested;\n }\n }\n\n return null;\n }",
"public function find($name);",
"public function find($name) {\n\t\tif(isset(self::$allFields[$name])) return self::$allFields[$name]; \t\n\n\t\tif(ctype_digit(\"$name\")) {\n\t\t\t// name is ID\n\t\t\tforeach(self::$allFields as $child) {\n\t\t\t\tif($child->id == $name) return $child;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public function find($name)\n {\n try\n {\n return parent::find($name);\n }\n catch(\\Throwable $e)\n {\n $command = $this->_getCommandByString($name, true);\n if($command !== null)\n {\n $this->add($command);\n return $this->get($name);\n }\n throw $e;\n }\n }",
"function findChild($childname){\r\n $retVal=null;\r\n for ($i=0;$i<$this->getNumberOfChilds();$i++){\r\n $tmp=$this->getChild($i);\r\n if (strtolower($tmp->TagName)==strtolower($childname)){\r\n $retVal=$tmp;\r\n break;\r\n }\r\n }\r\n return $retVal;\r\n }",
"public function find($name)\n {\n if (strpos($name, '::') !== false) {\n return $this->findNamedPathView($name);\n }\n return $this->findInPaths($name, $this->paths);\n }",
"public static function find()\n\t{\n\t\t$class = \"\\\\\".get_called_class();\n\t\t$content = new $class();\n\t\t\n\t\tif($content->namespace)\n\t\t{\n\t\t\t$target = \"\\\\\".$content->namespace.\"\\\\Find\";\n\t\t\t\n\t\t\tif(class_exists($target))\n\t\t\t\treturn new $target($content);\n\t\t}\n\t\t\n\t\treturn new Find($content);\n\t}",
"public function getByName($name)\n {\n $everything = $this->all();\n for ($i = 0; $i < sizeof($everything); ++$i)\n {\n if ($everything[$i]->dirname == $name)\n {\n return $everything[$i];\n }\n }\n return null;\n }",
"public function getChild($name);",
"public function find($name)\n {\n return new ContainerReference($name, $this);\n }",
"public function getChildByName($name) {\n\t\tforeach($this->getChildren() as $child) {\n\t\t\tif($child->getName() == $name) return $child;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function child($name) {\n\t\tif(isset($this->children[$name])) return $this->children[$name];\n\t\treturn null;\n\t}",
"function getChild($name);",
"function getChild($name);",
"public function fieldByName($name) {\n\t\tforeach($this->children as $child) {\n\t\t\tif($name == $child->Name) return $child;\n\t\t}\n\t}",
"public function find($name,$id){\n\t\tif(!(int)$id){\n\t\t\tthrow \\InvalidArgumentException('Invalid ID given, must be an integer greater then zero');\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$repo=$this->getRepository((string)$name);\n\t\tif($repo){\n\t\t\treturn $repo->find((int)$id);\n\t\t}\n\t\telse{\n\t\t\tthrow new \\RuntimeException('No such repository: '.((string)$name));\n\t\t\treturn NULL;\n\t\t}\n\t}",
"protected static function _locate($paths, $name) {\n\t\tforeach ((array) $paths as $path) {\n\t\t\tif ($class = Libraries::locate($path, $name)) {\n\t\t\t\treturn $class;\n\t\t\t}\n\t\t}\n\t}",
"public static function findByName(string $name): ?self\n {\n return self::findOne([\n 'module_id' => 'termsbox',\n 'name' => $name,\n ]);\n }",
"public function findByName($name) {\n $orgs = array();\n foreach($this->models as $org_member) {\n $org = $org_member->getName();\n if($org->name == $org) {\n return $org_member;\n }\n }\n return null;\n }",
"public function findByName($name);",
"public function findByName($name);",
"public function findByName($name);",
"public function findByName($name);",
"function findByName($name);",
"public function findByName($name) {\n\t\treturn $this->findSingleByAttribute('name', $name, (new \\GO\\Base\\Db\\FindParams())->ignoreAcl());\n\t}",
"public function findPackage($name, $version)\n {\n if (isset($this->packages[$name])) {\n return $this->packages[$name];\n }\n return null;\n }",
"public function getByName($name)\n {\n return $this->em\n ->getRepository('gries\\MControl\\Builder\\Structure')\n ->findOneBy(array('name' => $name)\n );\n }",
"public function getChild($name)\n {\n $children = $this->getChildren();\n foreach ($children as $child) {\n if ($name === $child->getName()) {\n return $child;\n }\n }\n\n throw new Sabre_DAV_Exception_FileNotFound(\n \"Node with name '$name' cannot be found during browsing\"\n );\n }"
] | [
"0.71442014",
"0.6490191",
"0.6409501",
"0.6022824",
"0.5882099",
"0.57354665",
"0.5620389",
"0.5537803",
"0.552861",
"0.549577",
"0.5475737",
"0.54678607",
"0.5461414",
"0.54168767",
"0.53741306",
"0.53741306",
"0.53574336",
"0.53490895",
"0.53351575",
"0.5332037",
"0.5260081",
"0.52469313",
"0.52469313",
"0.52469313",
"0.52469313",
"0.5246912",
"0.52403945",
"0.5205593",
"0.51909006",
"0.51902324"
] | 0.75722104 | 0 |
Determine if the module of a given name is a child library. This module must have a vendor of a denoted vendor | public function isChildLibrary($name)
{
// Ensure name is valid
if (strstr($name, '/') === false) {
return false;
}
// Upgrade-only is considered a child library
if ($this->isChildUpgradeOnly($name)) {
return true;
}
// Validate vs vendors. There must be at least one matching vendor.
$cowData = $this->getCowData();
if (empty($cowData['vendors'])) {
return false;
}
$vendors = $cowData['vendors'];
$vendor = strtok($name, '/');
if (!in_array($vendor, $vendors)) {
return false;
}
// validate exclusions
if (empty($cowData['exclude'])) {
return true;
}
return !in_array($name, $cowData['exclude']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasModuleName() {}",
"function _mymcshop_filter_dependencies($dependency) {\n return !module_exists($dependency);\n}",
"function libraryGet($name) {\n foreach ($this->libraries as $library) {\n if ($library->name === $name) {\n return $library;\n }\n }\n return FALSE;\n }",
"public function isLibrary() {\n\t\treturn $this->libraryType == self::TYPE_LIBRARY;\n\t}",
"public function isChild();",
"public function isChild();",
"public function isChild();",
"function isDependant() {\n return false;\n }",
"public static function embedded()\n {\n return strpos( self::mainFile(), DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR ) > 0;\n }",
"private function check_module( $name )\n {\n foreach($this->viewVar['modules'] as $module)\n {\n if(($module['name'] == $name) && ($module['type'] == 3))\n {\n return true;\n } \n }\n return false;\n }",
"public function isStabilityInherited(Library $childLibrary)\n {\n $cowData = $this->getCowData();\n if (empty($cowData['child-stability-inherit'])) {\n return false;\n }\n\n // Check if only some modules inherit stability\n if (is_array($cowData['child-stability-inherit'])) {\n return in_array($childLibrary->getName(), $cowData['child-stability-inherit']);\n }\n\n return true;\n }",
"public function isChildUpgradeOnly($name)\n {\n $cowData = $this->getCowData();\n return isset($cowData['upgrade-only']) && in_array($name, $cowData['upgrade-only']);\n }",
"public function isCore()\n {\n return str_contains($this->getPath(), 'core/' . $this->getVendor());\n }",
"public function hasBrand() : bool;",
"public function isFullyEnabled()\n {\n return class_exists('\\PiotrPolak\\CodeIgniterSymfonyBridge\\Bridge');\n }",
"public function isInsideVendor($basename, $pathname, $depth)\n {\n $base = basename($this->upLevels($pathname, $depth - 1) ?? '');\n return $base === self::VENDOR_DIR;\n }",
"public function hasChild($name);",
"public function childTypeIsAllowed($module)\n\t{\n\t\tforeach($this->Objects as $Object)\n\t\t{\n\t\t\tif($Object->childTypeIsAllowed($module)) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function isLibraryIncluded()\n {\n return $this->analyticsConfig->isLibraryIncluded();\n }",
"public function isAvailable(){\n\t\t\n\t\tif(!$this->enabled)\n\t\t\treturn false;\n\t\t\n\t\tif(!empty($this->package)) {\n\t\t\treturn $this->isAvailableJmap();\n\t\t}\n\t\t\n\t\t$ucfirst = ucfirst($this->name);\n//\t\t$moduleClassPath = $this->path.'/'.$ucfirst.'Module.php';\n//\t\t\n//\t\tif(!file_exists($moduleClassPath)){\n//\t\t\treturn false;\n//\t\t}\n\n\t\t$moduleClass = 'GO\\\\'.$ucfirst.'\\\\'.$ucfirst.'Module';\n\n\t\tif(!class_exists($moduleClass)){\n\t\t\treturn false;\n\t\t}\n\n\t\t$mod = new $moduleClass;\n\t\treturn $mod->isAvailable();\t\n\t\t\n\t\t\n\t}",
"public static function hasModule(string $name): bool\n {\n return array_key_exists(\"modules\", self::$_options) ? in_array($name, self::$_options[\"modules\"]) : false;\n }",
"private function meets_requirements() {\n\n if ( ! class_exists( 'GamiPress' ) ) {\n return false;\n }\n\n return true;\n\n }",
"public function has(string $name): bool\n {\n if ($this->modules->has($name)) return true;\n\n return false;\n }",
"public function hasSubClass($name);",
"public function isDependantPackage(PackageInterface $package, $includeDevDependencies = null);",
"private function detected_sentry_sdk() {\n\t\treturn class_exists('\\Sentry\\SentrySdk');\n\t}",
"function is_widget( $name ){\n\tif( class_exists( $name ) && in_array( $name, $GLOBALS[ 'WIDGETS' ] ) ) {\n\t\t$parents = class_parents( $name );\n\t\t\n\t\tif( is_array( $parents ) && in_array( 'WP_Widget' , $parents ) )\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}",
"public function hasActiveSubClass();",
"public function check_biz_module(){\n\t\t$controller = $this->params['controller'];\n\t\t$modules = array('home','bdhome','roles','bdspoc','bdadmin','bdbusiness');\n\t\tif(in_array($controller, $modules)){\n\t\t\treturn true;\n\t\t}else{\t\n\t\t\treturn false;\n\t\t}\n\t}",
"public function isBrand()\n {\n return $this->_type === self::TYPE_BRAND;\n }"
] | [
"0.62460965",
"0.5936829",
"0.57864296",
"0.5653744",
"0.55719316",
"0.55719316",
"0.55719316",
"0.5501477",
"0.54278034",
"0.5407069",
"0.53742677",
"0.53155375",
"0.52696556",
"0.52383184",
"0.5222879",
"0.51783097",
"0.5155718",
"0.51133823",
"0.51034105",
"0.5081172",
"0.5038903",
"0.50301147",
"0.5024764",
"0.50224435",
"0.50100684",
"0.5002563",
"0.49906328",
"0.49831066",
"0.49784935",
"0.49652508"
] | 0.7639429 | 0 |
Do child releases inherit stability for the given library? | public function isStabilityInherited(Library $childLibrary)
{
$cowData = $this->getCowData();
if (empty($cowData['child-stability-inherit'])) {
return false;
}
// Check if only some modules inherit stability
if (is_array($cowData['child-stability-inherit'])) {
return in_array($childLibrary->getName(), $cowData['child-stability-inherit']);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function supportsVersions();",
"function isVersionable() {\n\t\treturn false;\n\t}",
"public function mayUpdateLibraries()\n {\n // TODO: Proper implementation\n return true;\n }",
"public function isVersioningEnabled();",
"public function testIsCompatible()\n\t{\n\t\t$this->assertTrue($this->object->isCompatible('2.5'));\n\t}",
"public function isChildLibrary($name)\n {\n // Ensure name is valid\n if (strstr($name, '/') === false) {\n return false;\n }\n\n // Upgrade-only is considered a child library\n if ($this->isChildUpgradeOnly($name)) {\n return true;\n }\n\n // Validate vs vendors. There must be at least one matching vendor.\n $cowData = $this->getCowData();\n if (empty($cowData['vendors'])) {\n return false;\n }\n $vendors = $cowData['vendors'];\n $vendor = strtok($name, '/');\n if (!in_array($vendor, $vendors)) {\n return false;\n }\n\n // validate exclusions\n if (empty($cowData['exclude'])) {\n return true;\n }\n return !in_array($name, $cowData['exclude']);\n }",
"public function getCompatibility();",
"public function hasStability(){\n return $this->_has(3);\n }",
"abstract protected function registerAvailableVersions();",
"private function meets_requirements() {\n\n if ( ! class_exists( 'GamiPress' ) ) {\n return false;\n }\n\n return true;\n\n }",
"public function testBackboneDeprecation() {\n $this->libraryDiscovery->getLibraryByName('core', 'backbone');\n $this->expectDeprecation(\"The core/backbone asset library is deprecated in Drupal 9.4.0 and will be removed in Drupal 10.0.0.\");\n }",
"public function canUseInternal()\n {\n }",
"function test_library() {\n ut_autoloader::library(helper_fs::prefix_root('tmp'));\n\n $this->assertTrue(class_exists('d1_util_A') === true, 'depth1 file not loaded');\n $this->assertTrue(class_exists('d1_util_B') === true, 'depth1 file not loaded');\n $this->assertTrue(class_exists('d1_d2_file') === true, 'depth2 file not loaded');\n $this->assertTrue(class_exists('d1_d2_d3_final') === false, 'loaded more classes than settings allow!');\n $this->assertTrue(class_exists('d1_invalid') === false, 'convention is not respected!');\n }",
"public function isCompatible()\n\t{\n\t\treturn $this->isCraftRequiredVersion() && $this->isPHPRequiredVersion();\n\t}",
"public function isFullyEnabled()\n {\n return class_exists('\\PiotrPolak\\CodeIgniterSymfonyBridge\\Bridge');\n }",
"abstract public function getVersion();",
"private function initializeLegacy()\n {\n $this->container->make(Licensing::class);\n $this->container->make(Version::class);\n }",
"public function testLibraryThirdPartyWithMissingLicense() {\n echo 'hello world';\n $hello->world();\n }",
"public function usesMultiStockLicenceBehaviour(): bool\n {\n return $this->isMultiStock() || $this->isEcmtRemoval() || $this->isCertificateOfRoadworthiness();\n }",
"abstract public function isSupported();",
"abstract public function isSupported();",
"abstract public function isSupported();",
"function usableForPrecondition()\n\t{\n\t\t// overwrite in inherited classes\n\t\treturn FALSE;\n\t}",
"public function isLibrary() {\n\t\treturn $this->libraryType == self::TYPE_LIBRARY;\n\t}",
"public function __construct()\n\t{\n\t\t$this->_details = \\IPS\\Application::load('core')->availableUpgrade( TRUE );\n\t\treturn parent::__construct();\n\t}",
"static function clean_for_output($lib) {\n //if (!isset($lib['update-version']) && !isset($lib['boost-version'])) {\n // throw new RuntimeException(\"No version data for {$lib['name']}.\");\n //}\n\n if (isset($lib['update-version'])) {\n $lib['update-version'] = (string) $lib['update-version'];\n }\n\n if (isset($lib['boost-version'])) {\n $lib['boost-version'] = (string) $lib['boost-version'];\n }\n\n if (isset($lib['boost-version']) && isset($lib['update-version']) &&\n $lib['update-version'] == $lib['boost-version']) {\n unset($lib['update-version']);\n }\n\n return $lib;\n }",
"private function detected_sentry_sdk() {\n\t\treturn class_exists('\\Sentry\\SentrySdk');\n\t}",
"function isValidVersion() : bool\n {\n $coreVersion = explode('.', self::CORE_VERSION);\n $pluginVersion = explode('.', $this->pluginInfo['core_version']);\n if (count($coreVersion) >= 2 && count($pluginVersion) >= 2) {\n if ($coreVersion[0] == $pluginVersion[0] && $coreVersion[1] >= $pluginVersion[1]) {\n return true;\n }\n }\n return false;\n }",
"public function testCanGetExistingUpgrade() {\n\t\t$this->markTestIncomplete();\n\t}",
"function _mymcshop_filter_dependencies($dependency) {\n return !module_exists($dependency);\n}"
] | [
"0.60262144",
"0.5925753",
"0.58052486",
"0.5643405",
"0.54437137",
"0.53632325",
"0.53365225",
"0.5264387",
"0.5186678",
"0.5153257",
"0.51376194",
"0.5117513",
"0.51027286",
"0.50993365",
"0.5098832",
"0.5070026",
"0.50599104",
"0.50484174",
"0.5003104",
"0.49881276",
"0.49881276",
"0.49881276",
"0.49694726",
"0.49240926",
"0.49117404",
"0.49036622",
"0.48934862",
"0.48734552",
"0.48530835",
"0.4849198"
] | 0.6559102 | 0 |
Get the top level project | public function getProject()
{
return $this->getParent()->getProject();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProject() {\n $projectRepository = new \\EJC\\Repository\\ProjectRepository();\n return $projectRepository->findById($this->parent_id);\n }",
"protected static function getProjectRoot() {\n $path = new Path();\n return $path->resolve(__FILE__, '../../../../../');\n }",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"protected function getProject()\n {\n return $this->project;\n }",
"public function getProject() {\n return $this->project;\n }",
"public function getProject()\n\t{\n\t\t$option = $this->input->getCmd('option');\n\n\t\t$app\t= JFactory::getApplication();\n\t\t$project_id = $app->getUserState($option . 'project');\n\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select('p.*');\n\t\t$query->from('#__joomleague_project AS p');\n\t\t$query->where('p.id = '.$project_id);\n\t\t$db->setQuery($query);\n\t\t$res = $db->loadObject();\n\t\treturn $res;\n\t}",
"public final function getParentProject() {\n if (\\is_null($this->__parent__project)) {\n $result = ProjectUtil::searchRelativeProject($this);\n if (\\count($result) < 1) {\n throw new ProjectMemberNotFoundException(\"SOURCE ROAD NOT FOUND\");\n }\n $this->__parent__project = $result[0];\n }\n return $this->__parent__project;\n }",
"public function project() { return $this->project; }",
"static public function cur()\n {\n return $_SESSION['project']['name'] ?? DEFAULT_PROJECT;\n\n }",
"public function getProject() {\n return $this->cachable( __function__, $this, function ( $job ) {\n return Projects_ProjectDao::findById( $job->id_project );\n } );\n }",
"public function getMain()\n {\n return $this->get(self::MAIN);\n }",
"function helper_get_current_project() {\n\t\t$t_cookie_name = config_get( 'project_cookie' );\n\n\t\t$t_project_id = gpc_get_cookie( $t_cookie_name, null );\n\n\t\tif ( null === $t_project_id ) {\n\t\t\t$t_project_id = current_user_get_pref( 'default_project' );\n\t\t}\n\n\t\tif ( ! project_exists( $t_project_id ) ||\n\t\t\t 0 == project_get_field( $t_project_id, 'enabled' ) ||\n\t\t\t ! access_has_project_level( VIEWER, $t_project_id ) ) {\n\t\t\t$t_project_id = ALL_PROJECTS;\n\n\t\t}\t\t\n\t\treturn (int)$t_project_id;\n\t}",
"public function getProjectName();",
"public function getProjectPage()\n {\n return $this->project_page;\n }",
"public function getProject()\n {\n $key = $this->getProjectId();\n\n if (empty($key)) {\n return null;\n }\n\n $cacheKey = 'Cache.Project.' . $key;\n $rtn = $this->cache->get($cacheKey, null);\n\n if (empty($rtn)) {\n $rtn = Factory::getStore('Project', 'PHPCensor')->getById($key);\n $this->cache->set($cacheKey, $rtn);\n }\n\n return $rtn;\n }",
"public function get_project(): GP_Project {\n\t\treturn $this->project;\n\t}",
"public function getProjectFolder(): string;",
"function getProject() {\n\t\t// Pokud byl predtim promo naassignovanej projekt\n\t\tif(is_object($this->data->project) || $this->data->project === null) return $this->data->project;\n\t\t\n\t\tif(($cached = $this->fieldCache(\"project\")) !== null) return $cached;\n\t\t\n\t\t$value = $this->context->repository->findAll('vManager\\Modules\\Tickets\\Project')\n\t\t\t->where('[revision] > 0 AND [projectId] = %i', $this->data->project)->fetch();\n\t\t\n\t\tif(!$value) return null;\t\t\n\t\treturn $this->fieldCache(\"project\", $value);\n\t}",
"public function getProjectDir(): string;",
"function projectPath() {\n\t\treturn getProjectSettingsPath(debug_backtrace(false));\n\t}",
"function project_name() {\n\treturn Project_Name::get_instance();\n}",
"public function getTopLevelParent();",
"public function getProject(): ?Project\n\t{\n\t\treturn $this->client()->getProject($this->projectId);\n\t}",
"public function getProjecto()\n {\n return $this->projecto;\n }",
"public function getProjectName(): string\n {\n return $this->projectName;\n }",
"public function getProjectDir();"
] | [
"0.7157875",
"0.70131934",
"0.67802614",
"0.67802614",
"0.67802614",
"0.67802614",
"0.67802614",
"0.676074",
"0.6751127",
"0.663282",
"0.6609629",
"0.65240645",
"0.64808303",
"0.6477353",
"0.64142275",
"0.6405204",
"0.6397314",
"0.6390572",
"0.636945",
"0.6328987",
"0.6314764",
"0.62703514",
"0.62580633",
"0.6235585",
"0.61887556",
"0.6161778",
"0.61576664",
"0.6150869",
"0.61410594",
"0.60860497"
] | 0.7371523 | 0 |
Write the release plan to the standard cache location | public function saveCachedPlan(LibraryRelease $plan)
{
$path = $this->getDirectory() . '/.cow.pat.json';
$data = $this->serialisePlan($plan);
Config::saveToFile($path, $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write_release() { $this->request_release(self::WRITE_ACCESS); }",
"private function _putCache($out)\n {\n $cache_path = Config::getInstance()->get('cache_path');\n $url = Config::getInstance()->get('currentUrl');\n $urlbase = Config::getInstance()->get('currentBaseUrl');\n $url = $urlbase . $url;\n $cache_path .= md5($url);\n if ( ! $fp = @fopen($cache_path, 'w')) {\n return;\n }\n\n $expire = time() + ($this->cache_expiration * 60);\n\n if (flock($fp, LOCK_EX))\n {\n fwrite($fp, $out);\n flock($fp, LOCK_UN);\n } else {\n return;\n }\n fclose($fp);\n @chmod($cache_path, FILE_WRITE_MODE);\n \n }",
"public function writeCache()\n {\n $this->endResultCache();\n }",
"public function writeCache()\n {\n if (!$this->getFileName()) {\n return;\n }\n\n if (file_exists($this->getFileName())) {\n unlink($this->getFileName());\n }\n\n if (0 === count($this->lines)) {\n return;\n }\n\n file_put_contents($this->getFileName(), json_encode($this->lines));\n }",
"public static function writeCache() {\n\t\t// Get data from API\n\t\t$data = json_decode(file_get_contents('http://media.plusp.lu/' . site()->subdomain() . '/all'), true);\n\t\t\n\t\t// Put the episode data into cache\n\t\tstatic::$episodes = $data['episodes'];\n\t\t\n\t\t// Parse newest and next episodes\n\t\tstatic::newest();\n\t\tstatic::next();\n\t\t\n\t\t// Shall it write the file?\n\t\tif(!c::get('cache.episodes', false)) return;\n\t\t\n\t\t// Write the cache file\n\t\tfile_put_contents(KIRBY_PROJECT_ROOT_CACHE . '/episodes.ser', serialize(array(\n\t\t\tstatic::$newest,\n\t\t\tstatic::$next,\n\t\t\tstatic::$episodes\n\t\t)));\n\t}",
"function write_cache() {\n\t\tif(!$this->cache['cache_enable'] or !$this->cache['do_cache']) {\n\t\t\treturn false;\n\t\t}\n\t\t$file = $this->cache['file'];\n\t\tif ($this->gzip_config['gzip'] || $this->cache['cache_force_gzip']) {\n\t\t\t$handle = @gzopen($file, 'wb');\n\t\t\t@flock($handle, LOCK_EX);\n\t\t\t@gzwrite($handle, $this->outputs['data']);\n\t\t\t@flock($handle, LOCK_UN);\n\t\t\t@gzclose ($handle);\n\t\t} else {\n\t\t\t$handle = @fopen($file, 'wb');\n\t\t\t@flock($handle, LOCK_EX);\n\t\t\t@fwrite($handle, $this->outputs['data']);\n\t\t\t@flock($handle, LOCK_UN);\n\t\t\t@fclose ($handle);\n\t\t}\n\t\t$this->update_lastmod();\n\t\t@umask(0000);\n\t\t@chmod($file, 0666);\n\t\treturn true;\n\t}",
"public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }",
"public function writeCache()\n {\n $cacheFile = $this->getCacheFile();\n if (!$cacheFile) {\n return;\n }\n \n if (is_writeable(dirname($cacheFile))) {\n file_put_contents(\n $cacheFile,\n sprintf(\n '<?php return %s;',\n var_export($this->mergedConfig, true)\n )\n );\n }\n }",
"protected function write() {\n\t\t$xml = new \\SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\"?><cache></cache>');\n\n\t\t$xml->addChild('hit', $this->hit);\n\t\t$xml->addChild('miss', $this->miss);\n\n\t\t$nodes = $xml->addChild('nodes');\n\t\tforeach($this->cache as $item) {\n\t\t\t$node = $nodes->addChild('node');\n\t\t\t$node->addAttribute('index', $item['index']);\n\t\t\t$node->addAttribute('file', $item['file']);\n\t\t\t$node->addAttribute('ttl', $item['ttl']);\n\t\t}\n\n\t\t$dom = new \\DOMDocument('1.0');\n\t\t$dom->preserveWhiteSpace = false;\n\t\t$dom->loadXML($xml->asXML());\n\t\t$dom->formatOutput = true;\n\t\t$data = $dom->saveXML();\n\n\t\tfile_put_contents($this->registry, $data);\n\n\t\treturn $this;\n\t}",
"public function saveCache() {\n\t file_put_contents($this->getDataFolder() . \"cache.data\", gzencode(json_encode($this->cache)));\n }",
"function _write_cache($output)\n {\n //-------------------------------\n // Kiem tra co version hien tai ko\n if (empty($this->_cache_version)){\n $this->_cache_version = $this->__create_cache_version(APPPATH);\n }\n\n //-------------------------------\n // Kiem tra co version ko\n if (empty($this->_cache_version)){\n return;\n }\n \n //-------------------------------\n // Xu ly duong dan toi file cache\n $pathfile = APPPATH.'cache/page';\n\n if ( ! is_dir($pathfile) OR ! is_really_writable($pathfile))\n {\n log_message('error', \"Unable to write cache file: \".$cache_path);\n return;\n }\n\n //-------------------------------\n // Tao Folder Chua File Cache\n if ($this->_cache_folder)\n {\n foreach (explode('/', $this->_cache_folder) as $folder)\n {\n $pathfile .= '/'.$folder;\n if (!is_dir($pathfile))\n {\n mkdir($pathfile);\n }\n }\n }\n\n //-------------------------------\n // Duong dan full toi file cache\n $pathfile .= '/'.$this->_cache_file_name;\n\n if ( ! $fp = @fopen($pathfile, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n {\n log_message('error', \"Unable to write cache file: \".$cache_path);\n return;\n }\n\n if (flock($fp, LOCK_EX))\n {\n fwrite($fp, $this->_cache_version.'TS--->'.($output));\n flock($fp, LOCK_UN);\n }\n else\n {\n log_message('error', \"Unable to secure a file lock for file at: \".$cache_path);\n return;\n }\n\n fclose($fp);\n @chmod($pathfile, FILE_WRITE_MODE);\n\n log_message('debug', \"Cache file written: \".$pathfile);\n }",
"function write_cache($cacheFile,$cacheData)\n\t{\n\tprint \"caching file\";\n\t$fp = fopen($cacheFile, 'w');\n\tfwrite($fp, $cacheData);\n\tfclose($fp);\n\t}",
"protected function writeCache($data) {\n $cache = $this->getCache();\n $cache->write($data, $this->cacheFilename(), $this->cacheTimestamp($data));\n }",
"function SavePlan(){\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $data = \"---\" . PHP_EOL .\n \"process:\". PHP_EOL .\n \" twig: true\" . PHP_EOL .\n \" markdown: false\" . PHP_EOL .\n \"access:\" . PHP_EOL .\n \" site:\" . PHP_EOL .\n \" plan: true\" . PHP_EOL .\n \"planTemplate: \" . $_POST[\"template\"] . PHP_EOL .\n \"plan:\" . PHP_EOL;\n if(isset($_POST['data'])){\n $data = $this->add_season_to_string(\"data\",$data);\n }\n $data .= \"---\" . PHP_EOL;\n $data .= $this->parse_file_content_only($_POST[\"filePath\"]);\n\n $this->file_force_contents($_POST[\"filePath\"], $data);\n Cache::clearCache('all');\n }\n }",
"private function _writeMap() {\n $this->Connection->set($this->_encode($this->_mapNamespace), $this->_map, MEMCACHE_COMPRESSED, $this->_mapExpirationTime);\n }",
"public function cache() {\n\t\t$this->out('Writing configurations in ' . TMP . 'config.php');\n\t\tClassRegistry::init('Config.Config')->writeFile('config.php');\n\t\t$this->out('Done.');\n\t}",
"public function saveCacheFile()\n {\n\n $cacheFile = fopen($this->cacheFile,'w') or die('Unable to open file!');\n fwrite($cacheFile, json_encode($this->requestContent));\n fclose($cacheFile);\n }",
"private function writeCache()\n {\n if (! $this->cache) {\n return true;\n }\n\n $cacheFile = $this->getCacheFileName();\n $lockFile = $this->getCacheLockFileName();\n\n $cacheContent = \"<?php\\n\";\n $cacheContent .= '$version = \"' . self::version . \"\\\";\\n\";\n $cacheContent .= '$index = ' . var_export($this->index, true) . \";\\n\";\n\n if (! file_put_contents($cacheFile, $cacheContent)) {\n $this->debug(\"could not write cache to $cacheFile\");\n\n return false;\n }\n\n chmod($cacheFile, 0777);\n\n $this->debug(\"wrote cache to $cacheFile\");\n\n if (file_exists($lockFile)) {\n\n unlink($lockFile);\n\n $this->debug(\"removed lock file\");\n\n }\n\n\n return true;\n }",
"function salesord_release() {\n\tglobal $basedir;\n\t$filename = $basedir.\"admin/exported_csvs/pending_salesord.csv\";\n\t$filename_new = $basedir.\"admin/exported_csvs/\".date('Y-m-d').\"_salesord.csv\";\n\tif (!file_exists($filename)) {\n\t\tsetcookie('BoL_msg', \"No rows queued currently.\", 0);\n\t\theader(\"Location: csvexport.php\");\n\t}\n\trename($filename, $filename_new); // Rename pending to date\n\treturn \"../admin/exported_csvs/\".date('Y-m-d').\"_salesord.csv\"; // Return to allow front end to redirect properly\n}",
"static function export_cache()\n\t{\n $portal_id = Url::get('portal_id');\n //get dept trong bang portal_department, khong lay trong product price list vi neu\n // delete het san pham trong 1 dept thi khong con ma dept => ko export dc cache cua dept do\n $department = DB::fetch_all('Select department_code as id from portal_department where portal_id = \\''.$portal_id.'\\'');\n //System::debug($department);\n \n\t\trequire_once 'packages/hotel/includes/php/product.php';\n foreach($department as $key => $value)\n {\n $product_price_list = Product::get_product_price($portal_id,$key);\n //System::debug($product_price_list);\n $str = \"product_array={'':''\";\n\t\t\tforeach($product_price_list as $id=>$product)\n\t\t\t{\n $str.= \",'\".$id.\"':{\n'id':\".\"'\".$id.\"',\n'product_id':\".\"'\".$product['product_id'].\"',\n'name':'\".addslashes($product['name']).\"',\n'price':'\".$product['price'].\"',\n'start_date':'\".($product['start_date']?Date_Time::convert_orc_date_to_date($product['start_date'],'/'):0).\"',\n'end_date':'\".($product['end_date']?Date_Time::convert_orc_date_to_date($product['end_date'],'/'):0).\"',\n'category_id':\".\"'\".$product['category_id'].\"',\n'unit':'\".$product['unit_name'].\"',\n'unit_id':'\".$product['unit_id'].\"',\n'type':'\".$product['type'].\"'}\n\";\n\t\t\t}\n\t\t\t$str.= '}';\n\t\t\t$f = fopen('cache/data/'.str_replace('#','',$portal_id).'/'.$key.'_'.str_replace('#','',$portal_id).'.js','w+');\n\t\t\tfwrite($f,$str);\n\t\t\tfclose($f); \n }\n\t}",
"public static function saveCache(){\n if(self::$cacheUpdated) {\n Cache::getInstance()->save(self::CACHE_FILE, '<?php return '. var_export(self::$cache, true) . ';');\n }\n }",
"public function _page_cache_resave()\n {\n if ($GLOBALS['PERSISTENT_CACHE'] !== null) {\n persistent_cache_set(array('SELF_LEARNING_CACHE', $this->bucket_name), $this->data);\n return;\n }\n\n if (!is_null($this->path)) {\n $contents = serialize($this->data);\n\n require_code('files');\n $flags = FILE_WRITE_FIX_PERMISSIONS;\n if (!headers_sent()) {\n $flags |= FILE_WRITE_FAILURE_SOFT;\n }\n cms_file_put_contents_safe($this->path, $contents, $flags);\n } else {\n fatal_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n }",
"public function setCache()\n {\n $path = $this->getCachePath($this->getRemoteUrl());\n $fh = fopen($path, \"w\");\n fwrite($fh, serialize($this->response));\n fclose($fh);\n }",
"static function set ($cache_entry, $cache_data) {\n\t\t# temporarily turn off all caching.\n\t\treturn(NULL);\n\n\t\t$cache_file = MVC_CACHEDIR . DS . sha1 ($cache_entry);\n\n\t\tif (File::ready (MVC_CACHEDIR, \"w\")) {\n\t\t\tif (file_put_contents ($cache_file, base64_encode (serialize ($cache_data))) === FALSE) {\n\t\t\t\tErr::fatal (sprintf (\"unable to write cache file '%s'\", $cache_file));\n\t\t\t}\n\t\t} else {\n\t\t\tErr::fatal (sprintf (\"cache directory '%s' is not writable\", MVC_CACHEDIR));\n\t\t}\n\t}",
"public function cache() {\n phpthumb_functions::EnsureDirectoryExists(dirname($this->cache_filename));\n if ((file_exists($this->cache_filename) && is_writable($this->cache_filename)) || is_writable(dirname($this->cache_filename))) {\n $this->CleanUpCacheDirectory();\n if ($this->RenderToFile($this->cache_filename) && is_readable($this->cache_filename)) {\n chmod($this->cache_filename, 0644);\n $this->RedirectToCachedFile();\n }\n }\n }",
"protected function writeVersion()\n {\n file_put_contents($this->getVersionFile(), self::VERSION, LOCK_EX);\n }",
"function soi_release() {\n\tglobal $basedir;\n\t$filename = $basedir.\"admin/exported_csvs/pending_soi.csv\";\n\t$filename_new = $basedir.\"admin/exported_csvs/\".date('Y-m-d').\"_soi.csv\";\n\tif (!file_exists($filename)) {\n\t\tsetcookie('BoL_msg', \"No rows queued currently.\", 0);\n\t\theader(\"Location: csvexport.php\");\n\t}\n\trename($filename, $filename_new); // Rename pending to date\n\treturn \"../admin/exported_csvs/\".date('Y-m-d').\"_soi.csv\"; // Return to allow front end to redirect properly\n}",
"function _write_cache($output) {\n $CI = & get_instance();\n $path = $CI->config->item('cache_path');\n $cache_path = ($path === '') ? DEFAULT_CACHE_PATH : $path;\n \n if (!is_dir($cache_path) or !is_really_writable($cache_path)) {\n $this->log->log_error('无法写入缓存文件 Unable to write cache file: ' . $cache_path);\n return;\n }\n \n $uri = $CI->config->item('base_url') . $CI->config->item('index_page') . $CI->uri->uri_string();\n if ($CI->config->item('cache_query_string') && !empty($_SERVER['QUERY_STRING'])) {\n $uri .= '?' . $_SERVER['QUERY_STRING'];\n }\n \n $cache_path .= md5($uri);\n \n if (!$fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) {\n $this->log->log_error('无法写入缓存文件 Unable to write cache file: ' . $cache_path);\n return;\n }\n \n $expire = time() + ($this->cache_expiration * 60);\n $cache_info = serialize(array(\n 'expire' => $expire,\n 'headers' => $this->headers \n ));\n $output = $cache_info . 'ENDCI--->' . $output;\n \n if (flock($fp, LOCK_EX)) {\n $result = fwrite($fp, $output);\n flock($fp, LOCK_UN);\n } else {\n $this->log->log_error('无法获得文件的安全的文件锁 Unable to secure a file lock for file at: ' . $cache_path);\n return;\n }\n fclose($fp);\n \n if (is_int($result)) {\n chmod($cache_path, 0640);\n $this->log->log_trace('缓存写入 Cache file written: ' . $cache_path);\n \n // Send HTTP cache-control headers to browser to match file cache settings.\n $this->set_cache_header($_SERVER['REQUEST_TIME'], $expire);\n } else {\n @unlink($cache_path);\n $this->log->log_error('不能写入完成的缓存内容是 Unable to write the complete cache content at: ' . $cache_path);\n }\n }",
"public function saveCache(){\r\n\t\t//usa-se json_encode para tranformar arquivo cache em texto\r\nfile_put_contents('cache.cache', json_encode($this->cache));\r\n\t}",
"function ShiftPlan($plan_path, $plan_next_path){\n /******************/\n // update this week\n /******************/\n $frontmatter = $this->parse_file_frontmatter_only($plan_next_path);\n $content = $this->parse_file_content_only($plan_path);\n $page = $this->combine_frontmatter_with_content($frontmatter, $content);\n\n $this->file_force_contents($plan_path, $page);\n\n /******************************/\n // load template for next week \n /******************************/\n $template = $this->get_plan_template($plan_next_path);\n // alternate frontmatter\n $frontmatter = $this->get_frontmatter_as_array($plan_next_path); \n $frontmatter['planTemplate'] = $template; // set last used template to the chosen one\n $frontmatter['plan'] = $this->get_plan_from_template($template); // get chosen plan from page plan-templates\n $frontmatter = Yaml::dump($frontmatter, 10); // make string from array \n // get page content\n $content = $this->parse_file_content_only($page_path);\n // build page\n $page = $this->combine_frontmatter_with_content($frontmatter, $content); \n // save page\n $this->file_force_contents($page_path, $page);\n\n Cache::clearCache('all'); \n }"
] | [
"0.63275415",
"0.5980972",
"0.59299165",
"0.5704453",
"0.56131166",
"0.5607412",
"0.5595935",
"0.5552146",
"0.55203456",
"0.55091715",
"0.5441368",
"0.54365796",
"0.54032534",
"0.5395519",
"0.53307956",
"0.52601403",
"0.5205456",
"0.5202515",
"0.5180312",
"0.51726824",
"0.5171515",
"0.5158423",
"0.51512897",
"0.5112295",
"0.51039696",
"0.50790685",
"0.50739884",
"0.5052527",
"0.50449336",
"0.5030954"
] | 0.71168333 | 0 |
Check if this module should have a changelog | public function hasChangelog()
{
$cowData = $this->getCowData();
// Has changelog if generating via markdown committed to source control
return !empty($cowData['changelog-path']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function changelogCheck()\n {\n if (!$this->app['config']->get('general/changelog/enabled', false)) {\n return;\n }\n\n // Get the number of items in the changelog\n $count = $this->app['storage']->getRepository(LogChange::class)->count();\n\n if ($count > $this->logThreshold) {\n $message = sprintf(\n \"Bolt's <strong>changelog</strong> is enabled, and there are more than %s rows in the table.\",\n $this->logThreshold\n );\n $info = sprintf(\n \"Be sure to clean it up periodically, using a Cron job or on the <a href='%s'>Changelog page</a>.\",\n $this->app['url_generator']->generate('changelog')\n );\n $notice = json_encode([\n 'severity' => 1,\n 'notice' => $message,\n 'info' => $info,\n ]);\n $this->app['logger.flash']->configuration($notice);\n }\n }",
"protected function validateChangelog()\n {\n if ($this->changelogExists()) {\n return true;\n }\n \n $this->getWriter()\n ->line(\"no changelog database found, try to create one\");\n \n if (!$this->createChangelog()) {\n $this->getWriter()\n ->line(\"couldn't create a changelog table\");\n return false;\n }\n return true;\n }",
"function checkUpdate()\n\t{\n\t\t$oModuleModel = &getModel('module');\n\t\t// 2007. 10. 17 posts deleted, even when the comments will be deleted trigger property\n\t\tif(!$oModuleModel->getTrigger('document.deleteDocument', 'trackback', 'controller', 'triggerDeleteDocumentTrackbacks', 'after')) return true;\n\t\t// 2007. 10. 17 modules are deleted when you delete all registered triggers that add Trackbacks\n\t\tif(!$oModuleModel->getTrigger('module.deleteModule', 'trackback', 'controller', 'triggerDeleteModuleTrackbacks', 'after')) return true;\n\t\t// 2007. 10. Yeokingeul sent from the popup menu features 18 additional posts\n\t\tif(!$oModuleModel->getTrigger('document.getDocumentMenu', 'trackback', 'controller', 'triggerSendTrackback', 'after')) return true;\n\t\t// 2007. 10. The ability to receive 19 additional modular yeokingeul\n\t\tif(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'trackback', 'view', 'triggerDispTrackbackAdditionSetup', 'before')) return true;\n\n\t\t// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied \n\t\tif(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'trackback', 'controller', 'triggerCopyModule', 'after')) return true;\n\n\t\treturn false;\n\t}",
"protected function changelogExists()\n {\n $db = $this->getDb();\n $result = $db->fetchOne(\n $db->quoteInto('SHOW TABLES LIKE ?', self::TABLE)\n );\n \n return (bool) ($result == self::TABLE);\n }",
"protected function createChangelog()\n {\n if ($this->changelogExists()) {\n return true;\n }\n\n $db = $this->getDb();\n \n $db->query(\n sprintf(\"\n CREATE TABLE %s (\n `patch_number` int(11) NOT NULL,\n `branch` varchar(50) NOT NULL,\n `completed` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,\n `filename` varchar(100) NOT NULL,\n `hash` varchar(32) NOT NULL,\n `description` varchar(200) default NULL,\n PRIMARY KEY (`patch_number`, `branch`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\",\n $db->quoteIdentifier(self::TABLE)\n ));\n $db->commit();\n\n if (! $this->changelogExists()) {\n return false;\n }\n \n $this->getWriter()->line(sprintf(\"changelog table '%s' created\", self::TABLE));\n $this->getWriter()->line(\"use 'dbpatch sync' to sync your patches\");\n \n return true;\n }",
"function hasChanges(){\n\t\t\treturn $this->hasSectionChanges() || $this->hasCourseChanges();\n\t\t}",
"public function writeChangeLog() {\n // Do Nothing!\n }",
"public function hasChanges() {\n return (count($this->changes) > 0);\n }",
"public function isRevisioned();",
"public function hasRevisions();",
"function getChangelog()\n {\n if (!empty($this->data->changelog))\n {\n return new JiraChangelog($this->data->changelog);\n }\n\n return FALSE;\n }",
"public function isNew() {\r\n\t\t$logs = ProjectDatabaseLogCache::getInstance()->getLoggedLog($this->sqlLogID);\r\n\t\t$versionID = Project::getProject($this->packageID)->getCurrentVersion()->getVersionID() - 1;\r\n\t\t\r\n\t\treturn !isset($logs[$versionID]);\r\n\t}",
"public function canTrackChanges()\n {\n $can = false;\n if (empty($this->subject->trackableDisableChangeTracking)) {\n $can = Config::get('luketowers.easyaudit.changeTracking', true);\n } else {\n $can = $this->subject->trackableDisableChangeTracking;\n }\n\n return (bool) $can;\n }",
"public function isChange(): bool\n {\n return $this->change;\n }",
"public function needsUpdate()\n {\n return $this->getOldVersion() !== config('app.version');\n }",
"public function hasChange()\n {\n return $this->getChangeType() !== ChangeSetItem::CHANGE_NONE;\n }",
"public function getChangelogIncludeOtherChanges()\n {\n $data = $this->getCowData();\n if (!isset($data['changelog-include-other-changes'])) {\n return null;\n }\n return (bool) $data['changelog-include-other-changes'];\n }",
"public function isChanged(): bool\n {\n $this->pushErrorsToMain();\n if(count($this->mainErrors) || count($this->affected) || count($this->delta)) return true;\n return false;\n }",
"public function isLatestRevision();",
"public function hasChanged() : bool;",
"protected function systemlogCheck()\n {\n // Get the number of items in the changelog\n $count = $this->app['storage']->getRepository(LogSystem::class)->count();\n\n if ($count > $this->logThreshold) {\n $message = sprintf(\n \"Bolt's <strong>systemlog</strong> is enabled, and there are more than %s rows in the table.\",\n $this->logThreshold\n );\n $info = sprintf(\n \"Be sure to clean it up periodically, using a Cron job or on the <a href='%s'>Systemlog page</a>.\",\n $this->app['url_generator']->generate('systemlog')\n );\n $notice = json_encode([\n 'severity' => 1,\n 'notice' => $message,\n 'info' => $info,\n ]);\n $this->app['logger.flash']->configuration($notice);\n }\n }",
"public function hasLocalModifications();",
"function check_config_changed()\n {\n global $emu_config_modified_timestamp;\n\n $script_last_ran = sql_value('SELECT `value` FROM sysvars WHERE name = \"last_emu_import\"', '');\n\n if('' == $script_last_ran)\n {\n return true;\n }\n\n $emu_script_last_ran = strtotime($script_last_ran);\n\n if($emu_config_modified_timestamp > $emu_script_last_ran)\n {\n return true;\n }\n\n return false;\n }",
"public function check_version() {\n\t\tif ( get_option( self::OPTION_NAME_VERSION ) !== TennisEvents::VERSION ) {\n\t\t\t//TODO: Do Something???\n\t\t}\n\t}",
"public function is_changed()\n {\n return count( $this->changes_for_update() ) > 0 ? true : false;\n }",
"public function needsUpdate()\n {\n return !$this->hasScript(ScriptEvents::POST_UPDATE_CMD, ScriptHandler::class . '::updateProject');\n }",
"public function should_run()\n\t{\n\t\treturn time() >= (int) $this->config['titania_next_repo_rebuild'];\n\t}",
"protected function isLogFileChanged(): bool\n {\n if (!$this->logFile) {\n return false;\n }\n\n // log file isn't opened yet\n if (!is_resource($this->logHandle)) {\n return true;\n }\n\n // advanced checks are slower since it has to stat the filesystem on every call.\n // todo maybe use a frequency to only do this once in X calls\n if ($this->advancedLogChecks) {\n clearstatcache(true, $this->logFile);\n\n // if it doesn't exist it was deleted/renamed since our last call but wasn't rotated yet.\n if (!file_exists($this->logFile)) {\n return true;\n }\n\n $stat = @stat($this->logFile);\n if ($stat) {\n if ($this->logNode !== 0) {\n // iNode was changed so the filename was most likely renamed/rotated\n if ($stat['ino'] != $this->logNode) {\n return true;\n }\n }\n\n // checking file size (mainly for windows); If the current log file size when it was opened is now\n // todo; this only seems to work once on the same file ... need more testing\n if ($stat['size'] < $this->logSize) {\n return true;\n }\n }\n }\n\n return false;\n }",
"private function _check_module_exist()\n\t{\n\t\t$this->db->from($this->_migration_table);\n\t\t$this->db->where('module', $this->_module_name);\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\t\treturn $query->num_rows() >= 1;\n\t}",
"public function isChanged($what = '');"
] | [
"0.73961395",
"0.68762696",
"0.6521551",
"0.65115607",
"0.63672155",
"0.6243508",
"0.62045676",
"0.6077514",
"0.604719",
"0.60413104",
"0.6026887",
"0.59923476",
"0.5987966",
"0.59642905",
"0.5853787",
"0.583112",
"0.57950324",
"0.5768031",
"0.57171804",
"0.5704569",
"0.5686081",
"0.5672066",
"0.5652321",
"0.5625714",
"0.5616002",
"0.5607528",
"0.56038576",
"0.55896187",
"0.55681926",
"0.55636835"
] | 0.75235575 | 0 |
Get Changelog format type | public function getChangelogFormat()
{
$data = $this->getCowData();
// Default tagging
if (empty($data['changelog-type'])) {
return Changelog::FORMAT_GROUPED;
}
// Validate tagging type
switch ($data['changelog-type']) {
case Changelog::FORMAT_GROUPED:
case Changelog::FORMAT_FLAT:
return $data['changelog-type'];
default:
throw new Exception("Invalid changelog format type " . $data['changelog-type']);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFormat($type);",
"function getFormat(Type $formatType);",
"public function getFormat() {\n\n foreach ($this->priority as $type) {\n $format = $this->{'getFormatFrom'.ucwords($type)}();\n if ($format !== false) {\n return $format;\n }\n }\n\n return $this->getDefaultFormat();\n }",
"public function getFormat();",
"public function getFormat();",
"public function getFormat () {}",
"public function getFormat() {\n\t}",
"function getFormat();",
"public function get_data_type()\n {\n return $this->get_argument( 'format' );\n }",
"public function getFormat(): string;",
"public function getFormatType(): string;",
"public function getFormat()\n {\n return $this->getHeaderParameter('Content-Type', 'format');\n }",
"public function getFormat()\r\n {\r\n return $this->format;\r\n }",
"protected function getFormat()\n\t{\n\t\t$input = $this->getInput();\n\n\t\t$defaultFormat = Config::get('epi::epi.format');\n\t\t$formatKey = Config::get('epi::epi.keys.format');\n\n\t\treturn array_key_exists($formatKey, $input) ? $input[$formatKey] : $defaultFormat;\n\t}",
"public function getFormat() {\n return $this->format;\n }",
"function getFormat()\n\t{\n\t\treturn $this->_format;\n\t}",
"public function getFormat()\r\n {\r\n return $this->_format;\r\n }",
"public function getFormat()\n\t{\n\t\treturn $this->format;\n\t}",
"public function getFormat()\n\t{\n\t\treturn $this->format;\n\t}",
"public function get_message_format() {\n\t\treturn $this->format;\n\t}",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat()\n {\n return $this->format;\n }",
"public function getFormat() : int;",
"public function getFormat()\n {\n return $this->_format;\n }"
] | [
"0.71682817",
"0.7153817",
"0.6737881",
"0.6669848",
"0.6669848",
"0.66635144",
"0.64847696",
"0.64847267",
"0.644814",
"0.64318836",
"0.6309109",
"0.6305761",
"0.62469655",
"0.62416774",
"0.623249",
"0.62255836",
"0.62219054",
"0.62004024",
"0.62004024",
"0.61992604",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6188653",
"0.6168441",
"0.6168271"
] | 0.8023815 | 0 |
Find library to hold the changelog for this library. Defaults to self. | public function getChangelogHolder()
{
$data = $this->getCowData();
if (empty($data['changelog-holder'])) {
return $this;
}
$library = $this->getLibrary($data['changelog-holder']);
if (empty($library)) {
throw new LogicException(
"changelog-holder library " . $data['changelog-holder'] . " is not a valid library"
);
}
return $library;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function &getLog()\r\n\t{\r\n\t\t$logger =& Logger::getLogger('phase.compiler.TagLibraries');\r\n\t\treturn $logger;\r\n\t}",
"function getChangelog()\n {\n if (!empty($this->data->changelog))\n {\n return new JiraChangelog($this->data->changelog);\n }\n\n return FALSE;\n }",
"function getChangeLog(){\n\tglobal $file, $path;\n\t$chLogPath = getcwd() . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . $file . \".changelog\";\n\treturn (is_file($chLogPath)) ? file_get_contents($chLogPath) : null;\n}",
"function clearChangeLog()\n {\n unset($this->_packageInfo['changelog']);\n }",
"public function publicGetLibraryHook(): SoapHook\n {\n return $this->getLibraryHook();\n }",
"public function getChangeLogUrl()\n {\n return $this->_sChangeLogUrl;\n }",
"protected function getLogger()\n {\n return new DbPatch_Core_Log();\n }",
"public function &GetLogger() {\n\t\t\treturn $this->_Logger;\n\t\t}",
"function plugin_changelog() {\n\t\t$this->response['sections']['changelog'] = $this->plugins[$this->slug]['sections']['changelog'];\n\t}",
"public static function find(){\n\t\tif(!self::$instance){\n\t\t\tself::$instance = new self();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('JobChangelog');\n }",
"public function getChangelog() {\r\n\r\n $query = \"SELECT u.username, u.user_id, u.user_avatar, s.time AS timestamp, 'Article created' AS title, '' AS args\r\n FROM nuke_stories AS s\r\n LEFT JOIN nuke_users AS u ON u.user_id = s.user_id\r\n WHERE s.sid = ?\r\n UNION \r\n SELECT u.username, l.user_id, u.user_avatar, l.timestamp, l.title, l.args \r\n FROM log_staff AS l \r\n LEFT JOIN nuke_users AS u ON u.user_id = l.user_id\r\n WHERE `key` = 'article_id' \r\n AND key_val = ? \r\n UNION \r\n SELECT u.username, l.user_id, u.user_avatar, l.timestamp, l.title, l.args \r\n FROM log_general AS l \r\n LEFT JOIN nuke_users AS u ON u.user_id = l.user_id\r\n WHERE `key` = 'article_id' \r\n AND value = ? \r\n ORDER BY UNIX_TIMESTAMP(`timestamp`) DESC\";\r\n\r\n $params = [\r\n $this->id,\r\n $this->id,\r\n $this->id\r\n ];\r\n\r\n $return = $this->db->fetchAll($query, $params);\r\n\r\n foreach ($return as $key => $val) {\r\n\r\n $return[$key]['user'] = array(\r\n \"user_id\" => $val['user_id'],\r\n \"username\" => $val['username'],\r\n \"avatar\" => array(\r\n \"small\" => AvatarUtility::Format($val['user_avatar'], 50, 50),\r\n \"medium\" => AvatarUtility::Format($val['user_avatar'], 80, 80),\r\n \"large\" => AvatarUtility::Format($val['user_avatar'], 128, 128),\r\n ),\r\n \"url\" => UrlUtility::MakeURLs($val)->getURLs()\r\n );\r\n\r\n $return[$key]['args'] = json_decode($val['args'], true);\r\n }\r\n\r\n return $return;\r\n\r\n }",
"public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), 'epoqinterface_version_lastcheck');\n return $this;\n }",
"protected function _getChangeTrackingService()\n {\n return $this\n ->getContainer()\n ->get('jeboehm_lampcp_core.changetrackingservice');\n }",
"public function getChangelogPath();",
"public function get_logger(): Logger {\n return $this->logger;\n }",
"public function snapshot()\n {\n $locked = $this->listLockedPackages();\n $downloaded = $this->listDownloadedPackages();\n\n // Detect ambiguous packages.\n $lockedPackagesNames = array_keys($locked);\n $this->ambiguous = array_merge(\n //array_diff($lockedPackagesNames, $downloaded), // Locked, but not exists in dir structure.\n array_diff($downloaded, $lockedPackagesNames) // Installed, but not contains information about version.\n );\n\n // Mark other packages as installed.\n $installed = array_filter($locked, function ($key) use ($downloaded) {\n return array_search($key, $downloaded) !== false;\n }, ARRAY_FILTER_USE_KEY);\n\n $this->installed = new DependenciesCollection();\n foreach ($installed as $name => $version) {\n $local = $this->packageFactory->makeFromDir(\"deplinks/$name\");\n $this->installed->add($name, $version, $local);\n }\n\n $this->snapshotAt = new \\DateTime();\n return $this;\n }",
"public function setChangelogPath($changelog_path);",
"public function getRevisionLog();",
"private function parse_changelog() {\n WP_Filesystem();\n global $wp_filesystem;\n $changelog = $wp_filesystem->get_contents(get_template_directory() . '/changelog.txt');\n echo \"<pre>\";\n print_r($changelog);\n echo \"</pre>\";\n if (is_wp_error($changelog)) {\n $changelog = '';\n }\n }",
"public function setLatestEntryUpdateDb()\n\t{\t\n\t\t$commit = PropelcommitQuery::create()\n\t\t\t\t->orderByUpdateDate('desc')\n\t\t\t\t->findOne();\n\t\t\n\t\tif(!empty($commit)){\n\t\t\t//log\n\t\t\t$msg = 'Latest update - ' . $commit->getUpdateDate();\n\t\t\t$this->_propelLmlog->logMessage($msg);\n\t\t\t\n\t\t\t$this->_latest_db_update_date = $commit->getUpdateDate();\n\t\t} else {\n\t\t\t//log this and set the latest entry update date to one year back in time\n\t\t\t$dt = new \\DateTime();\n\t\t\t$dt = $dt->modify('-1 year');\n\t\t\t$this->_latest_db_update_date = $dt->format('Y-m-d h:i:s');\n\t\t}\n\t}",
"public function &getLog() {\n return $this->log;\n }",
"public function &getLog() {\n return $this->log;\n }",
"public function getLibrary()\n {\n return $this->library;\n }",
"private function _find()\n {\n /** Initilize symfony2 finder component */\n $finder = new Finder();\n\n /** Loop setting files */\n foreach($finder->name($this->file_name)->in(dirname(dirname(dirname(__DIR__)))) as $file) {\n\n /** Parse bundle setting file */\n $file_data = $this->decode_setting(file_get_contents($file->getRealpath()));\n\n /** Verify if file data is correct */\n $this->_verifyFile($file, $file_data);\n\n /** Save to setting array */\n $this->bundle_default_built[$file_data['name']] = $file_data;\n }\n\n return $this;\n }",
"public function changelogs()\n {\n return $this->hasMany(Changelog::class);\n }",
"public function find() {\n return parent::find();\n }",
"public function find() {\n return parent::find();\n }",
"public function find() {\n return parent::find();\n }",
"public function find() {\n return parent::find();\n }"
] | [
"0.53434783",
"0.51553637",
"0.48285607",
"0.4807144",
"0.47732404",
"0.4745486",
"0.47212878",
"0.46979663",
"0.46898788",
"0.4684969",
"0.4680332",
"0.46328673",
"0.46308422",
"0.46282798",
"0.4584783",
"0.4579423",
"0.45686403",
"0.4528785",
"0.45067117",
"0.45065376",
"0.44927678",
"0.44895557",
"0.44895557",
"0.44873983",
"0.4459542",
"0.4458484",
"0.44469947",
"0.44469947",
"0.44469947",
"0.44469947"
] | 0.64016634 | 0 |
Whether to include "other changes" (commits that are not tagged with a Cow friendly prefix) in changelogs or not. Can return null if no project configuration is found. | public function getChangelogIncludeOtherChanges()
{
$data = $this->getCowData();
if (!isset($data['changelog-include-other-changes'])) {
return null;
}
return (bool) $data['changelog-include-other-changes'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasChangelog()\n {\n $cowData = $this->getCowData();\n\n // Has changelog if generating via markdown committed to source control\n return !empty($cowData['changelog-path']);\n }",
"function getChangelog()\n {\n if (!empty($this->data->changelog))\n {\n return new JiraChangelog($this->data->changelog);\n }\n\n return FALSE;\n }",
"public function getChangelogPath();",
"public function getOtherProject () {\n return $this->whereRaw('is_deleted = ? and type = ? and object_type = ?', array(0, Config::get('config.media_type.image'), 'other_project'))->get(); \n }",
"function diffLogAgainst(Ticket $t2 = null) {\n\t\t$t1 = $this;\n\t\tif($t1->revision < 2) return array();\n\t\t\n\t\tif($t2 === null) {\n\t\t\t$t2 = $this->context->repository->get('vManager\\Modules\\Tickets\\Ticket', array('ticketId' => $t1->id, 'revision' => 0 - ($t1->revision - 1)));\n\t\t\t\n\t\t\tif(!$t2 || !$t2->exists()) return array();\n\t\t}\n\t\t\n\t\t\n\t\t$log = array();\n\t\t\n\t\tforeach($t2->getMetadata()->getFields() as $field) {\n\t\t\tif(in_array($field, array('timestamp', 'author', 'revision', 'comment', 'attachment')))\n\t\t\t\tcontinue;\n\n\t\t\t$change = null;\n\n\t\t\tif($field == 'assignedTo') {\n\t\t\t\tif($t1->$field === null) {\n\t\t\t\t\tif($t2->$field !== $t1->$field)\n\t\t\t\t\t\t$change = __('Reassigned to <strong class=\"value\">nobody</strong>');\n\t\t\t\t} elseif($t2->$field === null || $t2->$field->id != $t1->$field->id) {\n\t\t\t\t\t$change = _x('Reassigned to <strong class=\"value\">%s</strong>', array($t1->$field->exists()\n\t\t\t\t\t\t\t\t\t\t? $t1->$field->username : _x('User n. %d', array($t1->$field->id))));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} elseif($field == 'project') {\n\t\t\t\tif($t1->$field === null) {\n\t\t\t\t\tif($t2->$field !== $t1->$field)\n\t\t\t\t\t\t$change = _x('Removed task from project <strong class=\"value\">%s</strong>', array($t2->$field->name));\n\t\t\t\t} elseif($t2->$field === null || $t2->$field->id != $t1->$field->id) {\n\t\t\t\t\t$change = _x('Moved task under project <strong class=\"value\">%s</strong>', array($t1->$field->exists()\n\t\t\t\t\t\t\t\t\t\t? $t1->$field->name : _x('Project n. %d', array($t1->$field->id))));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} elseif($field == 'priority' && $t1->$field !== null) {\n\t\t\t\tif($t2->$field === null || $t2->$field->id != $t1->$field->id) {\n\t\t\t\t\t$change = _x('Changed priority to <strong class=\"value\">%s</strong>', array($t1->$field->exists()\n\t\t\t\t\t\t\t\t\t\t? $t1->$field->label : __('unknown priority') ));\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t} elseif($t2->data->$field != $t1->data->$field) {\n\t\t\t\n\t\t\t\tif(is_object($t1->$field) && $t1->$field instanceof vBuilder\\Orm\\DataTypes\\DateTime)\n\t\t\t\t\t$change = _x('Changed field <strong class=\"field\">%s</strong> to <strong class=\"value\">%s</strong>', array($field, $t1->$field->format(\"d. m. Y\")));\n\t\t\t\telseif($field == 'state') {\n\t\t\t\t\t$module = vManager\\Modules\\Tickets::getInstance();\n\t\t\t\t\t\n\t\t\t\t\tif(!$t1->getState()->isFinal() && $t2->getState()->isFinal() && count($module->initialTicketStates) < 2)\n\t\t\t\t\t\t\t$change = __('Reopened this ticket');\n\t\t\t\t\telseif($t1->getState()->isFinal())\n\t\t\t\t\t\t\t$change = _x('Resolved this ticket as <strong class=\"field\">%s</strong>', array($t1->getState()->name));\n\t\t\t\t\telse\n\t\t\t\t\t\t\t$change = _x('Changed ticket state to <strong class=\"field\">%s</strong>', array($t1->getState()->name));\n\n\t\t\t\t} elseif($t1->$field == \"\") \n\t\t\t\t\t$change = _x('Unset field <strong class=\"field\">%s</strong>', array($field));\n\t\t\t\telseif(strlen($t1->$field) < 40)\n\t\t\t\t\t$change = _x('Changed field <strong class=\"field\">%s</strong> to <strong class=\"value\">%s</strong>', array($field, $t1->$field));\n\t\t\t\telse\n\t\t\t\t\t$change = _x('Changed field <strong class=\"field\">%s</strong>', array($field));\n\t\t\t}\n\n\t\t\tif($change !== null)\n\t\t\t\t$log[] = \"<div class=\\\"change\\\">$change</div>\";\n\t\t}\n\t\t\n\t\treturn $log;\n\t}",
"function ciniki_projects_projectHistory($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'project_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Project'), \n 'field'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Field'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n //\n // Check access to tnid as owner, or sys admin\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'projects', 'private', 'checkAccess');\n $rc = ciniki_projects_checkAccess($ciniki, $args['tnid'], 'ciniki.projects.projectHistory');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n if( $args['field'] == 'appointment_date' ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbGetModuleHistoryReformat');\n return ciniki_core_dbGetModuleHistoryReformat($ciniki, 'ciniki.projects', 'ciniki_project_history', $args['tnid'], 'ciniki_projects', $args['project_id'], $args['field'], 'datetime');\n }\n if( $args['field'] == 'due_date' ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbGetModuleHistoryReformat');\n return ciniki_core_dbGetModuleHistoryReformat($ciniki, 'ciniki.projects', 'ciniki_project_history', $args['tnid'], 'ciniki_projects', $args['project_id'], $args['field'], 'datetime');\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbGetModuleHistory');\n return ciniki_core_dbGetModuleHistory($ciniki, 'ciniki.projects', 'ciniki_project_history', $args['tnid'], 'ciniki_projects', $args['project_id'], $args['field']);\n}",
"function get_undocumented_changes () {\n\t\t$changes = array();\n\t\t$config = file( $this->config_path );\n\t\tforeach ( $this->undocumented_entries as $entry ) {\n\t\t\tif ( $entry->has_changed() )\n\t\t\t\t$changes[] = $entry;\n\t\t}\n\t\treturn $changes;\n\t}",
"public function getHasAccessToAllFutureProjects() : ?bool\n {\n return $this->hasAccessToAllFutureProjects;\n }",
"abstract protected function getChangelogFilename();",
"public function getChanges() :string {\n\t\treturn $this->cmdOutNoTrim( 'git', 'status', '--porcelain' );\n\t}",
"public function getMaintainedProjects()\n {\n return array();\n }",
"public function isNewProject()\n {\n return $this->newProject;\n }",
"function hasChanges(){\n\t\t\treturn $this->hasSectionChanges() || $this->hasCourseChanges();\n\t\t}",
"public function getInvolvedProjects()\n {\n return array();\n }",
"public function getCanCreateProjects() : ?bool\n {\n return $this->canCreateProjects;\n }",
"function _get_projects() {\r\n\t\tstatic $projects = null;\r\n\t\tif(is_null($projects)) {\r\n\t\t\t$projects = $this->pdb()->assoc(\"SELECT pp.nid, pp.uri FROM project_projects pp, term_node tn, term_data td where tn.nid = pp.nid and tn.tid = td.tid and td.vid = 4 and td.name = 'Open';\");\r\n\t\t}\r\n\t\treturn $projects;\r\n\t}",
"public function project() { return $this->project; }",
"public static function getProjectConfig() {\n $yaml = new Yaml();\n $fs = new Filesystem();\n $path = new Path();\n $projectConfig = [];\n $projectRoot = self::getProjectRoot();\n\n // Parse project.yml.\n try {\n $projectConfig = $yaml->parse(file_get_contents($path->resolve($projectRoot, './project.yml')));\n }\n catch (Exception $e) {}\n\n // Check if a local.project.yml file exists.\n if ($fs->exists($path->resolve($projectRoot, './local.project.yml'))) {\n // Parse local.project.yml project config from local.project.yml and merge.\n try {\n $local_config = $yaml->parse(file_get_contents($path->resolve($projectRoot, './local.project.yml')));\n $projectConfig = array_replace_recursive($projectConfig, $local_config);\n }\n catch (Exception $e) {\n }\n }\n\n return $projectConfig;\n }",
"public function getChangelogFormat()\n {\n $data = $this->getCowData();\n // Default tagging\n if (empty($data['changelog-type'])) {\n return Changelog::FORMAT_GROUPED;\n }\n // Validate tagging type\n switch ($data['changelog-type']) {\n case Changelog::FORMAT_GROUPED:\n case Changelog::FORMAT_FLAT:\n return $data['changelog-type'];\n default:\n throw new Exception(\"Invalid changelog format type \" . $data['changelog-type']);\n }\n }",
"function getProject() {\n\t\t// Pokud byl predtim promo naassignovanej projekt\n\t\tif(is_object($this->data->project) || $this->data->project === null) return $this->data->project;\n\t\t\n\t\tif(($cached = $this->fieldCache(\"project\")) !== null) return $cached;\n\t\t\n\t\t$value = $this->context->repository->findAll('vManager\\Modules\\Tickets\\Project')\n\t\t\t->where('[revision] > 0 AND [projectId] = %i', $this->data->project)->fetch();\n\t\t\n\t\tif(!$value) return null;\t\t\n\t\treturn $this->fieldCache(\"project\", $value);\n\t}",
"function getWorklog()\n {\n if (!empty($this->data->issue->fields->worklog))\n {\n return new JiraWorklog($this->data->issue->fields->worklog);\n }\n\n return FALSE;\n }",
"function getChangeLog(){\n\tglobal $file, $path;\n\t$chLogPath = getcwd() . DIRECTORY_SEPARATOR . $path . DIRECTORY_SEPARATOR . $file . \".changelog\";\n\treturn (is_file($chLogPath)) ? file_get_contents($chLogPath) : null;\n}",
"public function allWithProjects();",
"public function getChangelog(): string\n {\n return $this->client->getModFileChangelog($this->file->getModId(), $this->file->getId());\n }",
"public static function getTestProjects(){\n\t\t$environment = self::getXClient();\n\t\t\n\t\t//could probably combine the first three into one long condition\n\t\tif(strcmp($_SERVER['SERVER_PORT'],Constants::WEB_WITH_DEV_API_PORT) === 0) {\n\t\t\treturn Constants::DEV_TEST_PROJECTS;\n\t\t} else if(strcmp($_SERVER['SERVER_PORT'], Constants::WEB_WITH_LOCAL_API_PORT) === 0) {\n\t\t\treturn Constants::DEV_TEST_PROJECTS;\n\t\t} else if(strpos($environment, Constants::SERVER_DEV) !== false || strpos($environment, 'demo') !== false) {\n return Constants::DEV_TEST_PROJECTS;\n } else if(strpos($environment, Constants::SERVER_STAGE) !== false){\n return Constants::STAGE_TEST_PROJECTS;\n } else {\n\t\t\t//if no distinguishing characters are present defaults to production\n\t\t\treturn Constants::PROD_TEST_PROJECTS;\n }\n\t}",
"private function isOwnProject(): bool\n {\n return $this->getComposer()->getPackage()->getPrettyName() === 'flying/wordpress-composer';\n }",
"public function getProjectName();",
"public function isChange(): bool\n {\n return $this->change;\n }",
"function plugin_chkVersion_nexproject() {\r\n global $_PRJCONF;\r\n return $_PRJCONF['version'];\r\n}",
"public function canTrackChanges()\n {\n $can = false;\n if (empty($this->subject->trackableDisableChangeTracking)) {\n $can = Config::get('luketowers.easyaudit.changeTracking', true);\n } else {\n $can = $this->subject->trackableDisableChangeTracking;\n }\n\n return (bool) $can;\n }"
] | [
"0.5424438",
"0.5382837",
"0.515729",
"0.51368505",
"0.5038784",
"0.49561393",
"0.49049562",
"0.48035926",
"0.47646224",
"0.47063553",
"0.46534038",
"0.4617932",
"0.46002918",
"0.45580307",
"0.45556632",
"0.45511648",
"0.45500326",
"0.4523407",
"0.45008063",
"0.44722146",
"0.44711772",
"0.44513002",
"0.44110647",
"0.43989447",
"0.4381115",
"0.43801236",
"0.4371614",
"0.4359464",
"0.43585014",
"0.43416625"
] | 0.75835377 | 0 |
Check if there is a difference between the current branch and some other branch | public function hasDiff(OutputInterface $output, string $branch)
{
return !empty($this->getRepository($output)->getDiff($branch)->getRawDiff());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function branch_exists_local($branch_spec) {\n exec(\"git fetch -p -q\", $output = array(), $retval);\n if ($retval != 0) {\n final_result_internal_error(\"Could not update local repository from origin. Bailing out.\");\n }\n\n exec(\"git show-ref --verify --quiet '$branch_spec'\", $output = array(), $retval);\n return $retval == 0;\n}",
"public function testBranchHistory()\n {\n // test commits for specified branch\n foreach ($this->variables['branchHistory'] as $branch => $commitId) {\n $commitsInOtherBranches = [];\n foreach ($this->variables['branchHistory'] as $otherBranch => $otherCommitId) {\n if ($otherBranch != $branch) {\n $commitsInOtherBranches[] = $otherCommitId;\n }\n }\n $this->assertNotEmpty($commitsInOtherBranches);\n $history = $this->repository->getHistory(1000, 0, null, $branch);\n $this->assertNotEmpty($history);\n $this->assertContainsOnlyInstancesOf(Commit::class, $history);\n\n $hasCommit = false;\n foreach ($history as $commit) {\n if ($commit->getId() == $commitId) {\n $hasCommit = true;\n }\n $this->assertNotContains($commit->getId(), $commitsInOtherBranches);\n }\n $this->assertTrue($hasCommit, \"Branch $branch has no commit with: $commitId\\n\");\n }\n\n // test commits for all branches\n $commitsForAllBranches = array_flip($this->variables['branchHistory']);\n $history = $this->repository->getHistory(1000, 0, null, null);\n $this->assertNotEmpty($history);\n $this->assertContainsOnlyInstancesOf(Commit::class, $history);\n foreach ($history as $commit) {\n if (isset($commitsForAllBranches[$commit->getId()])) {\n unset ($commitsForAllBranches[$commit->getId()]);\n } elseif (empty($commitsForAllBranches)) {\n break;\n }\n }\n $this->assertEmpty($commitsForAllBranches, \"Not all branches in all branches history: \" . print_r($commitsForAllBranches, true));\n }",
"public function getCurrentBranch();",
"public function getCurrentBranch();",
"public function isBranch() {\n return $this->getRefType() == self::GITHUB_REF_BRANCH_TYPE;\n }",
"public function hasDiff()\n {\n return $this->adapter->hasDiff();\n }",
"#[@test]\n public function changedInbetween() {\n $this->assertEquals(\n array(\n new Copy('Hello'),\n new Change('World', 'Master'),\n new Copy('how are you?')\n ), \n $this->differenceBetween(\n array('Hello', 'World', 'how are you?'),\n array('Hello', 'Master', 'how are you?')\n )\n );\n }",
"function check($cmd_runner, $repo_path, $upstream) {\n $cmd = 'git diff --name-only ' . $upstream;\n\n if ($this->staged) {\n $cmd .= ' --staged';\n }\n\n if (!empty($this->safelist)) {\n $cmd .= ' ' . implode(' ', $this->safelist);\n }\n\n $cmd_runner->run($cmd);\n\n $changed_files = $cmd_runner->getOutput();\n\n $blocklisted_changed_files = array();\n\n foreach (explode(PHP_EOL, $changed_files) as $file) {\n if (in_array($file, $this->blocklist)) {\n $blocklisted_changed_files[] = $file;\n }\n }\n\n if (!empty($blocklisted_changed_files)) {\n $msg = 'The diff you are trying to submit contains the following blocklisted file(s) : ';\n $msg .= implode(',', $blocklisted_changed_files);\n $cmd_runner->warn($msg);\n }\n }",
"public function testHistoryNotInSync()\n {\n $expectedMessage = 'Your migrations history is not in sync with your migrations files. ' .\n 'Make sure all your migrations have been migrated before baking a diff.';\n\n $this->exec('bake migration_diff NotInSync --connection test');\n $this->assertErrorContains($expectedMessage);\n $this->assertExitCode(BaseCommand::CODE_ERROR);\n }",
"function check_differences($old, $new) {\n $factory = new Robo47_DirectoryHasher_Result_Factory_Xml();\n\n $comparator = new Robo47_DirectoryHasher_Comparator();\n\n return $comparator->compare(\n $factory->buildResultFromFile($old)\n ,\n $factory->buildResultFromFile($new)\n )->getDifferences();\n}",
"public function diff() \n\t{\n\t\treturn ($this->data === $this->data_original) ? TRUE : FALSE;\n\t}",
"function canDiff()\n {\n if (!isset($this->Permissions[\"can_diff\"])) {\n $this->Permissions[\"can_diff\"] = $this->checkAccess('diff');\n }\n\n return ($this->Permissions[\"can_diff\"] == 1);\n }",
"function compareCommits ($repoName, $username = null, $base, $head) {\n $response = $this->getRequest(\"repositories/$username/$repoName/diff/$base..$head\");\n }",
"private function makeDiff()\n {\n // Checks parameters and repository status\n $since = !empty($this->userInput['params'][0]) ? $this->userInput['params'][0] : '';\n $until = !empty($this->userInput['params'][1]) ? $this->userInput['params'][1] : '';\n if (!$this->isRepository())\n {\n $this->output('No git repository found. See \"--help\".');\n return false;\n }\n if (empty($since) || empty($until))\n {\n $this->output('Missing ' . (empty($since) ? '<since>' : '<until>') . ' parameter. See \"--help\".');\n return false;\n }\n\n // Gets the commits list\n $commits = $this->executeCommand('git log ' . $since . '..' . $until . ' -m --pretty=format:%H');\n if ($commits['error'] !== false)\n {\n $this->output('An error occurred when getting the diff.');\n $this->output('(Error: ' . $commits['error'] . ')');\n return false;\n }\n\n // Gets the modified and deleted files lists for each commit found\n $this->output('Generating diff from \"' . substr($since, 0, 6) . '\" to \"' . substr($until, 0, 6) . '\"...');\n $modified_files = array();\n $deleted_files = array();\n foreach ($commits['result'] as $commit)\n {\n $files = $this->executeCommand('git show ' . $commit . ' --name-status --pretty=format:');\n foreach ($files['result'] as $file)\n {\n $file_data = explode(\"\\t\", $file);\n $type = !empty($file_data[0]) && preg_match('/^[AMD]{1}$/', $file_data[0]) ? $file_data[0] : false;\n $path = !empty($file_data[1]) ? $file_data[1] : false;\n if (!empty($type) && !empty($path) && $type == 'D' && (!in_array($path, $deleted_files) && !in_array($path, $modified_files)))\n {\n $deleted_files[] = $path;\n }\n if (!empty($type) && !empty($path) && ($type == 'M' || $type == 'A') && (!in_array($path, $deleted_files) && !in_array($path, $modified_files)))\n {\n $modified_files[] = $path;\n }\n }\n }\n $modified_files_count = count($modified_files);\n $deleted_files_count = count($deleted_files);\n $this->output();\n\n // If the export directory exists, asks for deletion\n if (!$this->checkExportDirectory())\n {\n return false;\n }\n\n // Generates the files\n mkdir($this->exportPath);\n $line_length = 0;\n foreach ($modified_files as $index => $file)\n {\n $this->makeDirTreeForFile($file);\n $this->executeCommand('git show ' . $until . ':' . $file . ' > ' . $this->exportPath . DIRECTORY_SEPARATOR . $file);\n $line = 'Exporting file ' . ($index + 1) . ' of ' . $modified_files_count . ' (' . intval(($index + 1) * (100 / $modified_files_count)) . '%): ' . $file;\n $this->output($line . ($line_length - strlen($line) > 0 ? str_repeat(' ', $line_length - strlen($line)) : ''), false);\n $line_length = strlen($line);\n }\n $this->output(str_repeat(' ', $line_length), false);\n\n // Generates the changelog\n $changelog = array(\n 'Diff from \"' . $since . '\" to \"' . $until . '\"',\n $this->separator,\n count($commits['result']) . ' commits',\n $modified_files_count . ' modified file(s)',\n $deleted_files_count . ' deleted file(s)',\n $this->separator,\n 'Modified files:',\n implode(\"\\r\\n\", $modified_files),\n $this->separator,\n 'Deleted files:',\n implode(\"\\r\\n\", $deleted_files)\n );\n file_put_contents($this->exportPath . DIRECTORY_SEPARATOR . '_changelog.txt', implode(\"\\r\\n\", $changelog));\n\n $this->output('Export done. ' . count($commits['result']) . ' commits found, ' . $modified_files_count . ' modified file(s) and ' . $deleted_files_count . ' deleted file(s).');\n return true;\n }",
"function getDiff($a, $b) {\n\t$diff = array();\n\n\t// Run the diff command, pass in -w, because change in whitespace doesn't\n\t// _really_ change the validity of our output\n\texec(\"diff -w $a $b\", $diff);\n\n\tif ( empty($diff) )\n\t\treturn false;\n\telse\n\t\treturn implode( \"\\n\", $diff);\n}",
"public function branchExists($branchName);",
"public function test_transfer_wrong()\n {\n $amount = 5000.00;\n\n // As far as the transfer should haven't been made, the balance\n // should be the same both customers had originally\n $customer_from_new_balance = $this->customer_from->balance;\n $customer_to_new_balance = $this->customer_to->balance;\n\n $initial_transfers_amount = count(Transfer::all());\n\n $request = new Request();\n $request->setMethod('POST');\n $request->request->add(['amount' => $amount]);\n $request->request->add(['customer_from_id' => $this->customer_from->id]);\n $request->request->add(['customer_to_id' => $this->customer_to->id]);\n\n $response = $this->transferController->transfersStore($request);\n\n $final_transfers_amount = count(Transfer::all());\n\n $ok = true;\n\n if ($initial_transfers_amount != $final_transfers_amount) {\n $ok = false;\n }\n\n $customer_from_model = Customer::find($this->customer_from->id);\n $customer_to_model = Customer::find($this->customer_to->id);\n\n if ($customer_from_model->balance != $customer_from_new_balance) {\n $ok = false;\n }\n\n if ($customer_to_model->balance != $customer_to_new_balance) {\n $ok = false;\n }\n\n // This should be in the TearDown method but it was giving me some config issues\n // As far as Branch have \"onDelete -> Cascade\" we don't need to delete customers and transfers\n $this->branch->delete();\n\n $this->assertFalse($ok);\n }",
"public function isUnderGitVersionControl(): bool\n {\n return File::exists(base_path('.git'));\n }",
"abstract public function diffRevisions($new, $old);",
"public function testDiffWrongSecondParamException()\n {\n $this->repository->getDiff(Repository::DIFF_COMMIT, null);\n }",
"public function testDiffEmptySecondParamException()\n {\n $this->repository->getDiff(Repository::DIFF_COMMIT);\n }",
"public function is_dirty() {\n $command = \"{$this->_git_command} {$this->_flags} ls-files -m -o -d --exclude-standard\";\n $output = trim(shell_exec($command));\n return $output !== '';\n }",
"protected function _diff($file, $rev1, $rev2, $opts)\n {\n return false;\n }",
"function xdiff_string_bdiff($old_data, $new_data)\n{\n}",
"public function test_transfer_customer_cant_transfer_itself()\n {\n $amount = 5000.00;\n\n // As far as the transfer should haven't been made, the balance\n // should be the same both customers had originally\n $customer_from_new_balance = $this->customer_from->balance;\n $customer_from_new_balance = $this->customer_from->balance;\n\n $initial_transfers_amount = count(Transfer::all());\n\n $request = new Request();\n $request->setMethod('POST');\n $request->request->add(['amount' => $amount]);\n $request->request->add(['customer_from_id' => $this->customer_from->id]);\n $request->request->add(['customer_to_id' => $this->customer_from->id]);\n\n $response = $this->transferController->transfersStore($request);\n\n $final_transfers_amount = count(Transfer::all());\n\n $ok = true;\n\n if ($initial_transfers_amount != $final_transfers_amount) {\n $ok = false;\n }\n\n $customer_from_model = Customer::find($this->customer_from->id);\n\n if ($customer_from_model->balance != $customer_from_new_balance) {\n $ok = false;\n }\n\n // This should be in the TearDown method but it was giving me some config issues\n // As far as Branch have \"onDelete -> Cascade\" we don't need to delete customers and transfers\n $this->branch->delete();\n\n $this->assertFalse($ok);\n }",
"private function _doSync()\n {\n $current_branch = Git_Daily_GitUtil::currentBranch();\n\n if (!isset($this->config['remote'])) {\n throw new Git_Daily_Exception('remote not setted, cannot sync');\n }\n $remote = $this->config['remote'];\n $develop_branch = $this->config[$this->base_branch];\n self::info('first, fetch remotes');\n self::cmd(Git_Daily::$git, array('fetch', '--all'));\n self::info('cleanup remote');\n self::cmd(Git_Daily::$git, array('remote', 'prune', $remote));\n\n // if has local branch, try to checkout\n $release_branch = false;\n $release_branches = Git_Daily_GitUtil::releaseBranches($this->branch_prefix);\n if (!empty($release_branches)) {\n if (count($release_branches) == 1) {\n $release_branch = array_shift($release_branches);\n } else {\n throw new Git_Daily_Exception('there are a number of local release branches, please delete local release branch manually');\n }\n }\n\n // remote branch still exists ?\n $remote_closed = false;\n $remote_release_branch = null;\n $remote_release_branches = self::cmd(Git_Daily::$git, array('branch', '-a'),\n array('grep', array(\"remotes/$remote/{$this->branch_prefix}\"),\n array(\n 'sed', array('s/^[^a-zA-Z0-9]*//g'),\n )\n )\n );\n if (!empty($remote_release_branches) && count($remote_release_branches) == 1) {\n $remote_release_branch = array_shift($remote_release_branches);\n $remote_release_branch = str_replace(\"remotes/$remote/\", '', $remote_release_branch);\n } else {\n if (empty($remote_release_branches)) {\n // to clean up\n $remote_closed = true;\n }\n else {\n throw new Git_Daily_Exception('there are a number of remote release branches');\n }\n }\n\n // release branch already checkouted, try push, pull\n if ($release_branch) {\n // checkout\n // remote release branch opened, but local has different (old ?) release branch, then clean up\n if ($remote_release_branch != $release_branch) {\n $remote_closed = true;\n }\n\n // if remote closed, local still have release branch, then cleanup\n if ($remote_closed) {\n self::info('release closed! so cleanup local release branch');\n self::info(\"checkout $develop_branch\");\n Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $develop_branch));\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n self::info(\"delete $release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('branch', '-d', $release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('branch delete failed');\n self::outLn(\"\\n git branch delete failed, please manually\\n\");\n }\n\n if ($remote_release_branch != $release_branch) {\n self::outLn(PHP_EOL, 'Closed old release branch', ' Please retry \"release sync\"', PHP_EOL);\n }\n return \"sync to release close\";\n }\n\n if ($current_branch != $release_branch) {\n self::info(\"checkout $release_branch\");\n self::cmd(Git_Daily::$git, array('checkout', $release_branch));\n $current_branch = Git_Daily_GitUtil::currentBranch();\n }\n\n // first, pull\n self::info(\"git pull\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'pull'));\n self::outLn($res);\n if ($retval != 0) {\n throw new Git_Daily_Exception('abort');\n }\n\n // push\n self::info(\"git push\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('daily', 'push'));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to push to remote');\n throw new Git_Daily_Exception('abort');\n }\n }\n else {\n // first time checkout release branch\n if ($remote_closed) {\n // do nothing\n return 'sync completed (nothing to do)';\n }\n\n self::info(\"checkout and tracking $remote_release_branch\");\n list($res, $retval) = Git_Daily_CommandUtil::cmd(Git_Daily::$git, array('checkout', $remote_release_branch));\n self::outLn($res);\n if ($retval != 0) {\n self::warn('failed to checkout');\n throw new Git_Daily_Exception('abort');\n }\n return 'start to tracking release branch';\n }\n }",
"function get_current_git_commit( $branch='master' ) {\n if ( $hash = file_get_contents( sprintf( '.git/refs/heads/%s', $branch ) ) ) {\n return $hash;\n } else {\n return false;\n }\n}",
"public function get_current_git_commit( $branch='master' ) \n {\n\t\tif ( $hash = file_get_contents( sprintf( FCPATH.'.git/refs/heads/%s', $branch ) ) ) \n\t\t{\n\t\t return $hash;\n\t\t} \n\t\telse \n\t\t{\n\t\t return false;\n\t\t}\n\t}",
"protected static function gitIsValidBranch($branch)\n {\n return (bool) preg_match('/^(?!\\/|.*(?:[\\/\\.]\\.|\\/\\/|\\\\|@\\{))[^\\040\\177\\s\\~\\^\\:\\?\\*\\[]+(?<!\\.lock)(?<![\\/\\.])$/', $branch) && strlen($branch) < 255;\n }",
"function GitCheckoutBranch( $branch, $gitFolder ) {\n\t\twfShellExec( 'git --git-dir=' . $gitFolder . '/.git --work-tree=' . $gitFolder . ' checkout ' . $branch );\n\t\twfDebug( 'GitRepository: Changed to branch ' . $branch );\n\t}"
] | [
"0.63604003",
"0.5960465",
"0.5665043",
"0.5665043",
"0.56486833",
"0.55682594",
"0.55664164",
"0.55465406",
"0.55454093",
"0.546916",
"0.5463544",
"0.53730386",
"0.5366039",
"0.53617245",
"0.53112054",
"0.52803797",
"0.52442455",
"0.5243534",
"0.52380824",
"0.5195129",
"0.51464194",
"0.5145247",
"0.5136988",
"0.5119647",
"0.50940657",
"0.50515807",
"0.5037614",
"0.5016726",
"0.50148296",
"0.50078404"
] | 0.6035599 | 1 |
Modify groups query. Filter keywords, Group types and orderby. | function gmw_ps_filter_bp_groups_query( $query_args, $gmw ) {
/****** keywords ******/
if ( ! empty( $gmw['form_values']['keywords'] ) ) {
$query_args['search_terms'] = $gmw['form_values']['keywords'];
}
/****** Orderby ******/
$orderby = gmw_ps_get_orderby_value( $gmw );
// abort if no value found
if ( '' != $orderby ) {
$query_args['type'] = $orderby;
}
/****** Group Types *****/
$output = gmw_ps_bp_get_object_types_query( $gmw, 'group', 'bpgt' );
if ( false != $output['usage'] ) {
$query_args[ $output['usage'] ] = $output['types'];
}
return $query_args;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addGroupQuery($value) {}",
"public function group($group = []) {\n\t\t$this->_queryOptions['group'] = array_merge($this->_queryOptions['group'], $group);\n\t}",
"public function setGroupBy(array $group_by): QueryModifier;",
"public function groupClause($type, &$tables, &$whereTables) {\n if (!isset($this->_viewPermissionedGroups)) {\n $this->group();\n }\n\n // we basically get all the groups here\n $groupKey = 'all';\n if ($type == CRM_Core_Permission::EDIT) {\n if ($this->_editAdminUser) {\n $clause = ' ( 1 ) ';\n }\n elseif (empty($this->_editPermissionedGroups[$groupKey])) {\n $clause = ' ( 0 ) ';\n }\n else {\n $clauses = [];\n $groups = implode(', ', $this->_editPermissionedGroups[$groupKey]);\n $clauses[] = ' ( civicrm_group_contact.group_id IN ( ' . implode(', ', array_keys($this->_editPermissionedGroups[$groupKey])) . \" ) AND civicrm_group_contact.status = 'Added' ) \";\n $tables['civicrm_group_contact'] = 1;\n $whereTables['civicrm_group_contact'] = 1;\n\n // foreach group that is potentially a saved search, add the saved search clause\n foreach (array_keys($this->_editPermissionedGroups[$groupKey]) as $id) {\n $group = new CRM_Contact_DAO_Group();\n $group->id = $id;\n if ($group->find(TRUE) && $group->saved_search_id) {\n $clause = CRM_Contact_BAO_SavedSearch::whereClause($group->saved_search_id,\n $tables,\n $whereTables\n );\n if (trim($clause)) {\n $clauses[] = $clause;\n }\n }\n }\n $clause = ' ( ' . implode(' OR ', $clauses) . ' ) ';\n }\n }\n else {\n if ($this->_viewAdminUser) {\n $clause = ' ( 1 ) ';\n }\n elseif (empty($this->_viewPermissionedGroups[$groupKey])) {\n $clause = ' ( 0 ) ';\n }\n else {\n $clauses = [];\n $groups = implode(', ', $this->_viewPermissionedGroups[$groupKey]);\n $clauses[] = ' civicrm_group.id IN (' . implode(', ', array_keys($this->_viewPermissionedGroups[$groupKey])) . \" ) \";\n $tables['civicrm_group'] = 1;\n $whereTables['civicrm_group'] = 1;\n $clause = ' ( ' . implode(' OR ', $clauses) . ' ) ';\n }\n }\n\n return $clause;\n }",
"protected function _buildGroupBy()\n {\n if (empty($this->_groupBy)) {\n return;\n }\n\n $this->_query .= \" GROUP BY \";\n\n foreach ($this->_groupBy as $key => $value) {\n $this->_query .= $value . \", \";\n }\n\n $this->_query = rtrim($this->_query, ', ') . \" \";\n }",
"abstract protected function _buildGroupBy( $group );",
"function cacsp_filter_query_for_bp_group( $query ) {\n\t// Only modify 'event' queries.\n\t$post_types = $query->get( 'post_type' );\n\tif ( ! in_array( 'cacsp_paper', (array) $post_types ) ) {\n\t\treturn;\n\t}\n\n\t$bp_group = $query->get( 'bp_group', null );\n\tif ( null === $bp_group ) {\n\t\treturn;\n\t}\n\n\tif ( ! is_array( $bp_group ) ) {\n\t\t$group_ids = array( $bp_group );\n\t} else {\n\t\t$group_ids = $bp_group;\n\t}\n\n\t// Empty array will always return no results.\n\tif ( empty( $group_ids ) ) {\n\t\t$query->set( 'post__in', array( 0 ) );\n\t\treturn;\n\t}\n\n\t// Convert group IDs to a tax query.\n\t$tq = $query->get( 'tax_query' );\n\t$group_terms = array();\n\tforeach ( $group_ids as $group_id ) {\n\t\t$group_terms[] = 'group_' . $group_id;\n\t}\n\n\t$tq[] = array(\n\t\t'taxonomy' => 'cacsp_paper_group',\n\t\t'terms' => $group_terms,\n\t\t'field' => 'name',\n\t\t'operator' => 'IN',\n\t);\n\n\t$query->set( 'tax_query', $tq );\n}",
"public function execute($request)\n {\n $params = $this->getRequest()->getParameterHolder()->getAll();\n unset($params['module']);\n unset($params['sf_culture']);\n $this->redirect(\"@camp.groups-action?\".http_build_query($params), 301);\n\n $this->keyword = $this->getRequestParameter('keyword', '');\n $this->page = is_numeric($this->getRequestParameter('page')) ? $this->getRequestParameter('page') : 1;\n $this->type = is_numeric($this->getRequestParameter('type')) ? GroupTypePeer::retrieveByPK($this->getRequestParameter('type')) : null;\n $this->country = preg_match(\"/^[A-Za-z]{2}$/\", $this->getRequestParameter('country')) ? strtoupper($this->getRequestParameter('country')) : '';\n\n $c = new Criteria();\n \n if ($this->keyword)\n {\n $c1 = $c->getNewCriterion(GroupPeer::NAME, \"UPPER(\".GroupPeer::NAME.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c->addJoin(GroupPeer::CONTACT_ID, ContactPeer::ID, Criteria::LEFT_JOIN);\n $c->addJoin(ContactPeer::ID, ContactAddressPeer::CONTACT_ID, Criteria::LEFT_JOIN);\n $c->addJoin(ContactAddressPeer::COUNTRY, GeonameCountryPeer::CURRENCY_CODE, Criteria::LEFT_JOIN);\n $c2 = $c->getNewCriterion(GroupI18nPeer::ABBREVIATION, \"UPPER(\".GroupI18nPeer::ABBREVIATION.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c3 = $c->getNewCriterion(GroupI18nPeer::DISPLAY_NAME, \"UPPER(\".GroupI18nPeer::DISPLAY_NAME.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c4 = $c->getNewCriterion(GroupI18nPeer::INTRODUCTION, \"UPPER(\".GroupI18nPeer::INTRODUCTION.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c5 = $c->getNewCriterion(GroupI18nPeer::EVENTS_INTRODUCTION, \"UPPER(\".GroupI18nPeer::EVENTS_INTRODUCTION.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c6 = $c->getNewCriterion(GroupI18nPeer::MEMBER_PROFILE, \"UPPER(\".GroupI18nPeer::MEMBER_PROFILE.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c7 = $c->getNewCriterion(GeonameCountryPeer::COUNTRY, \"UPPER(\".GeonameCountryPeer::COUNTRY.\") LIKE UPPER('%{$this->keyword}%')\", Criteria::CUSTOM);\n $c1->addOr($c2);\n $c1->addOr($c3);\n $c1->addOr($c4);\n $c1->addOr($c5);\n $c1->addOr($c6);\n $c1->addOr($c7);\n $c->add($c1);\n }\n\n if ($this->type)\n {\n $c->add(GroupPeer::TYPE_ID, $this->type->getId());\n }\n\n if ($this->country)\n {\n $c->addJoin(GroupPeer::CONTACT_ID, ContactPeer::ID, Criteria::LEFT_JOIN);\n $c->addJoin(ContactPeer::ID, ContactAddressPeer::CONTACT_ID, Criteria::LEFT_JOIN);\n $c->add(ContactAddressPeer::COUNTRY, \"UPPER(\".ContactAddressPeer::COUNTRY.\") = '{$this->country}'\", Criteria::CUSTOM);\n }\n\n $c->add(GroupPeer::IS_FEATURED, 1);\n $c->setDistinct();\n \n $pager = new sfPropelPager('Group', 20);\n $pager->setPage($this->page);\n $pager->setCriteria($c);\n $pager->init();\n $this->pager = $pager;\n }",
"public function applyGroup($sql,$group)\n\t{\n\t\tif($group!='')\n\t\t\treturn $sql.' GROUP BY '.$group;\n\t\telse\n\t\t\treturn $sql;\n\t}",
"public function addGroupFilter($groupName)\n\t{\n\t\t$gid = GRP_getIdByName($groupName);\n\n\t\tif (is_numeric($gid))\n\t\t{\n\t\t\t$this->groupWHERE = \"clients.id=clientgroups.clientid AND clientgroups.groupid=$gid\";\n\t\t\t$this->groupFROM = ', clientgroups';\n\t\t}\n\t}",
"public function scopeInGroup($query, $group)\n {\n $groupColumn = (array) $this->getGroupColumn();\n $group = is_null($group) ? [ null ] : array_values((array) $group);\n foreach ($group as $i => $value) {\n $query->where($groupColumn[$i], $value);\n }\n }",
"function set_custom_wp_query_groupby($groupby, $wp_query)\n {\n $retval = $groupby;\n $group_by_columns = $wp_query->get('group_by_columns');\n if ($group_by_columns) {\n $retval = str_replace('GROUP BY', '', $retval);\n $columns = explode(',', $retval);\n foreach (array_reverse($columns) as $column) {\n array_unshift($group_by_columns, trim($column));\n }\n $retval = \"GROUP BY \".implode(', ', $group_by_columns);\n }\n // Not all mysql servers allow access to create temporary tables which are used when doing GROUP BY\n // statements; this can potentially ruin basic queries. If no group_by_columns is set AND the query originates\n // within the datamapper we strip the \"GROUP BY\" clause entirely in this filter.\n else if ($wp_query->get('datamapper')) {\n $retval = '';\n }\n return $retval;\n }",
"public function processGroupby(){\n\t \tif($this->groupbyQuery!=false){\n\t \t\t$groupby_ini = \"GROUP BY \";\n\t \t\t$count_cont = 0;\n\t \t\tforeach ($this->groupbyQuery as $value) {\n\t \t\t\tif($count_cont>0){\n\t \t\t\t\t$groupby_ini .= ', ';\n\t \t\t\t}\n\t \t\t\t$groupby_ini .= $value[0].' ';\n\t \t\t\t$count_cont++;\n\t \t\t}\n\t \t\t$this->groupbyProcess = $groupby_ini;\n\t \t}else{\n\t \t\t$this->groupbyProcess = false;\n\t \t}\n\t }",
"protected function handleGroup($groups) {\n $query = '';\n if (is_string($groups)) {\n $query .= \"GROUP BY `{$groups}`\";\n } else if (is_array($groups)) {\n $query .= 'GROUP BY `'. implode('`, `', $groups) . '`';\n }\n return $query;\n }",
"protected function setGrouping(Query $solarium_query, QueryInterface $query, $grouping_options = array(), $index_fields = array(), $field_names = array()) {\n $group_params['group'] = 'true';\n // We always want the number of groups returned so that we get pagers done\n // right.\n $group_params['group.ngroups'] = 'true';\n if (!empty($grouping_options['truncate'])) {\n $group_params['group.truncate'] = 'true';\n }\n if (!empty($grouping_options['group_facet'])) {\n $group_params['group.facet'] = 'true';\n }\n foreach ($grouping_options['fields'] as $collapse_field) {\n $type = $index_fields[$collapse_field]['type'];\n // Only single-valued fields are supported.\n if ($this->dataTypeHelper->isTextType($type)) {\n $warnings[] = $this->t('Grouping is not supported for field @field. Only single-valued fields not indexed as \"Fulltext\" are supported.',\n array('@field' => $index_fields[$collapse_field]['name']));\n continue;\n }\n $group_params['group.field'][] = $field_names[$collapse_field];\n }\n if (empty($group_params['group.field'])) {\n unset($group_params);\n }\n else {\n if (!empty($grouping_options['group_sort'])) {\n foreach ($grouping_options['group_sort'] as $group_sort_field => $order) {\n if (isset($fields[$group_sort_field])) {\n $f = $fields[$group_sort_field];\n if (substr($f, 0, 3) == 'ss_') {\n $f = 'sort_' . substr($f, 3);\n }\n $order = strtolower($order);\n $group_params['group.sort'][] = $f . ' ' . $order;\n }\n }\n if (!empty($group_params['group.sort'])) {\n $group_params['group.sort'] = implode(', ', $group_params['group.sort']);\n }\n }\n if (!empty($grouping_options['group_limit']) && ($grouping_options['group_limit'] != 1)) {\n $group_params['group.limit'] = $grouping_options['group_limit'];\n }\n }\n foreach ($group_params as $param_id => $param_value) {\n $solarium_query->addParam($param_id, $param_value);\n }\n }",
"public function group($query) {\r\n\t\t$args = func_get_args();\r\n\t\t$this->queryData['group'][] = call_user_func_array(array($this->db, 'formatQuery'), $args);\r\n\t\treturn $this;\r\n\t}",
"private function addGroupBy(&$queryArr) {\n if (!empty($this->clauses['group_by'])) {\n $queryArr[] = 'GROUP BY ' . implode(', ', $this->clauses['group_by']);\n }\n }",
"public function searchgroupsAction() {\n if ($this->getRequest()->isPost()) {\n $groupName = $_POST['searchTerm'];\n\n $groups = $this->_helper->db->getTable('InciteGroup')->findGroupByPartialName($groupName);\n $groups_arr = array();\n foreach ((array) $groups as $group) {\n $groups_arr[] = array('id' => $group->id, 'name' => $group->name);\n }\n\n echo json_encode($groups_arr);\n }\n }",
"public function groupBy($group) {\n if ($this->type != QUERY_SELECT)\n throw new InvalidQueryType();\n\n $this->groups[] = $group;\n\n return $this;\n }",
"public function _add_simple_group_filter()\n\t{\n\t\t//check for the \"sgid\" get parameter\n\t\tif (isset($_GET['sgid']) AND !is_array($_GET['sgid']) AND intval($_GET['sgid']) >= 0)\n\t\t{\n\t\t\t//get the table prefix\n\t\t\t$table_prefix = Kohana::config('database.default.table_prefix');\n\t\t\t\n\t\t\t//get the params\n\t\t\t$sg_id = intval($_GET['sgid']);\n\t\t\t$params = Event::$data;\n\t\t\tarray_push($params,\t'i.id IN (SELECT DISTINCT incident_id FROM '.$table_prefix.'simplegroups_groups_incident WHERE simplegroups_groups_id = '. $sg_id. ')');\n\t\t\t\n\t\t\t//figure out if we're on the backend or not, and if we're not hide private categories\n\t\t\t$only_public = (strpos(url::current(), \"admin/\") === 0) ? \"\" : \" AND sgc.category_visible = 1 \"; \n\t\t\t\n\t\t\t$category_ids = $this->_get_group_categories();\t\t\t\n\t\t\t// Check if there are any category ids\n\t\t\tif (count($category_ids) > 0)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//what's the logical operator:\n\t\t\t\tif($this->_get_logical_operator() == \"or\")\n\t\t\t\t{\n\t\t\t\t\t//first we need to find out what the original SQL for categories looked like:\n\t\t\t\t\t$category_sql = $this->_create_default_category_sql();\n\t\t\t\t\t$i = 0;\n\t\t\t\t\t$found_it = false;\n\t\t\t\t\tforeach($params as $key=>$value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(strcmp($value, $category_sql) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$i = $key;\n\t\t\t\t\t\t\t$found_it = true;\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\t//if we found it, lets remove it.\n\t\t\t\t\tif($found_it)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($params[$i]);\n\t\t\t\t\t}\n\t\t\t\t\tif(strlen($category_sql) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$category_sql = ' OR ('.$category_sql.')' ;\n\t\t\t\t\t}\n\t\t\t\t\t$category_ids = implode(\",\", $category_ids);\n\t\t\t\t\tarray_push($params,\n\t\t\t\t\t\t'(i.id IN (SELECT DISTINCT incident_id FROM '.$table_prefix.'simplegroups_incident_category sgic '.\n\t\t\t\t\t\t\t'INNER JOIN '.$table_prefix.'simplegroups_category sgc ON (sgc.id = sgic.simplegroups_category_id) '.\n\t\t\t\t\t\t\t'WHERE (sgc.id IN ('. $category_ids . ') OR sgc.parent_id IN ('.$category_ids.'))'.$only_public.' ) '.$category_sql. ')');\n\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\tforeach($category_ids as $c)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($params,\n\t\t\t\t\t\t'i.id IN (SELECT DISTINCT incident_id FROM '.$table_prefix.'simplegroups_incident_category sgic '.\n\t\t\t\t\t\t\t'INNER JOIN '.$table_prefix.'simplegroups_category sgc ON (sgc.id = sgic.simplegroups_category_id) '.\n\t\t\t\t\t\t\t'WHERE ((sgc.id = '. $c . ') OR sgc.parent_id = (' . $c . '))'.$only_public.' ) ');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tEvent::$data = $params;\n\t\t}\n\t}",
"public function posts_groupby( $groupby, $query ) {\r\n\t\t// is it sorted by post views or views_query is used?\r\n\t\tif ( ( isset( $query->pvc_orderby ) && $query->pvc_orderby ) || ( isset( $query->pvc_query ) && $query->pvc_query ) || apply_filters( 'pvc_extend_post_object', false, $query ) === true ) {\r\n\t\t\tglobal $pagenow;\r\n\r\n\t\t\t// needed only for sorting\r\n\t\t\tif ( $pagenow === 'upload.php' || $pagenow === 'edit.php' )\r\n\t\t\t\t$query->query['views_query']['hide_empty'] = false;\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t$groupby = trim( $groupby );\r\n\r\n\t\t\tif ( strpos( $groupby, $wpdb->prefix . 'posts.ID' ) === false )\r\n\t\t\t\t$groupby = ( $groupby !== '' ? $groupby . ', ' : '') . $wpdb->prefix . 'posts.ID';\r\n\r\n\t\t\tif ( ! isset( $query->query['views_query']['hide_empty'] ) || $query->query['views_query']['hide_empty'] === true )\r\n\t\t\t\t$groupby .= ' HAVING post_views > 0';\r\n\t\t}\r\n\r\n\t\treturn $groupby;\r\n\t}",
"function addQueryWhere ($qry) {\n global $aa_qry, $synTable, $db, $aa_group_services, $contenitore, $treeFrame;\n\n //remove session to see the entire list\n if (isset($_GET[\"aa_search_clean\"]))\n unset($_SESSION['aa_qry']);\n\n if (!isset($_SESSION[\"aa_joinStack\"])) {\n $res=$db->Execute(\"SELECT gs.filter FROM aa_group_services gs INNER JOIN aa_groups g ON gs.group=g.id, aa_users u where u.id_group=g.id and u.id=\".getSynUser().\" and gs.id='\".$_SESSION[\"aa_group_services\"].\"'\");\n list($filter)=$res->FetchRow();\n if ($filter!=\"\") $qry.=\" WHERE $filter\";\n }\n\n //add tree permission\n $treeQry=$contenitore->getTreePermission();\n if ($treeQry!=\"\" and $filter==\"\") {\n if (strpos($qry,\"WHERE\")==false) $qry.=\" WHERE \";\n else $qry.=\" AND \";\n $qry.=$treeQry;\n }\n\n if (isset($_POST[\"aa_search\"])) {\n $type = $_POST[\"type\"];\n $keyword= $_POST[\"keyword\"];\n $field = $_POST[\"field\"];\n\n $fieldObj=$contenitore->getElement($field);\n if ($fieldObj->isMultilang()) {\n $qry.=\" LEFT JOIN aa_translation ON \".$synTable.\".\".$field.\" = aa_translation.id\";\n $field = \"aa_translation`.`\".$_SESSION['aa_CurrentLangInitial'];\n }\n\n if (strpos($qry,\"WHERE\")===false) $qry.=\" WHERE \";\n else $qry.=\" AND \";\n\n if ($type==\"=\") $qry.=\"`\".$field.\"` = '\".$keyword.\"' \";\n if ($type==\"like\") $qry.=\"`\".$field.\"` LIKE '%\".$keyword.\"%' \";\n if ($type==\">\") $qry.=\"`\".$field.\"` > '\".$keyword.\"' \";\n if ($type==\"<\") $qry.=\"`\".$field.\"` < '\".$keyword.\"' \";\n if ($type==\"acceso\") $qry.=\" `\".$field.\"` <> \\\"\\\" \";\n if ($type==\"spento\") $qry.=\" `\".$field.\"`=\\\"\\\" \";\n\n //session_register(\"aa_qry\");\n $_SESSION['aa_qry'] = $qry;\n }\n\n //check owner field...\n $owner = (isset($contenitore->ownerField)) ? $contenitore->ownerField : '';\n if ($owner!=\"\" && $treeFrame!=\"true\") { // ...unless it's a tree\n if (strpos($qry, \"WHERE\")==false) $qry.=\" WHERE \";\n else $qry.=\" AND \";\n $qry.=\"($owner IN (\".implode(',', $_SESSION[\"synGroupChild\"]).\") OR $owner IS NULL OR $owner='') \";\n }\n\n if (isset($_SESSION[\"aa_joinStack\"])) {\n if (strpos($qry,\"WHERE\")==false) $qry.=\" WHERE \";\n else $qry.=\" AND \";\n $stackKeys=array_keys($_SESSION[\"aa_joinStack\"]);\n $stackLastKey=$stackKeys[count($stackKeys)-1];\n $join=new synJoin($_SESSION[\"aa_joinStack\"][$stackLastKey][\"idjoin\"]);\n $toElmName=$join->toElmName;\n $value=$_SESSION[\"aa_joinStack\"][$stackLastKey][\"value\"];\n $qry.=\"`\".$toElmName.\"` = '\".$value.\"' \";\n }\n\n if (isset($_SESSION[\"aa_qry\"])) $qry=$_SESSION[\"aa_qry\"];\n\n if (isset($_GET[\"aa_order\"])) {\n if ( $_SESSION[\"aa_order\"] == $_GET[\"aa_order\"])\n if ($_SESSION[\"aa_order_direction\"] == \" DESC\")\n $_SESSION[\"aa_order_direction\"] = \" ASC\";\n else\n $_SESSION[\"aa_order_direction\"] = \" DESC\";\n\n $_SESSION[\"aa_order\"] = $_GET[\"aa_order\"];\n\n } elseif (!isset($_SESSION[\"aa_order\"])) {\n global $synTable;\n $res = $db->Execute(\"SELECT s.initOrder FROM aa_services s where s.syntable='\".$synTable.\"'\");\n list($initOrderElement)=$res->FetchRow();\n if ($initOrderElement!=0) {\n $sign=abs($initOrderElement)/$initOrderElement;\n $res=$db->Execute(\"SELECT se.name FROM aa_services_element se where se.id=\".abs($initOrderElement));\n list($initOrderElement)=$res->FetchRow();\n $sign>0?$_SESSION[\"aa_order_direction\"]=\" ASC\":$_SESSION[\"aa_order_direction\"]=\" DESC\";\n $_SESSION[\"aa_order\"]=str_replace(\" \", \"_\", $initOrderElement);\n }\n }\n\n if (isset($_SESSION[\"aa_order\"])) {\n $qry.=\" ORDER BY `\".$_SESSION[\"aa_order\"].\"` \".$_SESSION[\"aa_order_direction\"];\n }\n\n #echo 'Query: <code>',$qry,'</code>';\n return $qry;\n }",
"public function getgroupsAction()\n {\n $this->checkAjaxToken();\n $result = array();\n // FIXME SECURITY check this\n if (SecurityUtil::checkPermission('Groups::', 'ANY', ACCESS_OVERVIEW)) {\n $args = array('keyword' => $this->request->getPost()->get('keyword'), 'op' => $this->request->getPost()->get('op', 'likefirst'));\n $args['op'] = in_array($args['op'], array('search', 'likefirst')) ? $args['op'] : 'likefirst';\n $tables = DBUtil::getTables();\n $grpColumn = $tables['groups_column'];\n $value = DataUtil::formatForStore($args['keyword']);\n // check matches in the database\n switch ($args['op']) {\n case 'search':\n $value = '%' . $value;\n case 'likefirst':\n $value .= '%';\n $value = \"'{$value}'\";\n break;\n }\n $where = 'WHERE ' . $grpColumn['name'] . ' LIKE ' . $value;\n $results = DBUtil::selectFieldArray('groups', 'name', $where, $grpColumn['name'], false, 'gid');\n foreach ($results as $gid => $gname) {\n $result[] = array('value' => $gid, 'caption' => DataUtil::formatForDisplay($gname));\n }\n }\n return new Zikula_Response_Ajax_Json(array('data' => $result));\n }",
"function group_picker_callback($query, $options = array()) {\n\t// we don't actually need it for this\n\t$id = sanitize_int(get_input('id'));\n\t\n\t// replace mysql vars with escaped strings\n $q = str_replace(array('_', '%'), array('\\_', '\\%'), sanitize_string($query));\n\t\n\t$dbprefix = elgg_get_config('dbprefix');\n\treturn elgg_get_entities(array(\n\t\t'type' => 'group',\n\t\t'joins' => array(\n\t\t\t\"JOIN {$dbprefix}groups_entity ge ON ge.guid = e.guid\",\n\t\t),\n\t\t'wheres' => array(\n\t\t\t\"ge.name LIKE '%{$q}%' OR ge.description LIKE '%{$q}%'\",\n\t\t),\n\t\t'order_by' => 'ge.name ASC'\n\t));\n}",
"function groups_get_groups( $args = '' ) {\r\n\tglobal $bp;\r\n\r\n\t$defaults = array(\r\n\t\t'type' => 'active', // active, newest, alphabetical, random, popular, most-forum-topics or most-forum-posts\r\n\t\t'user_id' => false, // Pass a user_id to limit to only groups that this user is a member of\r\n\t\t'search_terms' => false, // Limit to groups that match these search terms\r\n\r\n\t\t'per_page' => 20, // The number of results to return per page\r\n\t\t'page' => 1, // The page to return if limiting per page\r\n\t\t'populate_extras' => true, // Fetch meta such as is_banned and is_member\r\n\t);\r\n\r\n\t$params = wp_parse_args( $args, $defaults );\r\n\textract( $params, EXTR_SKIP );\r\n\r\n\tswitch ( $type ) {\r\n\t\tcase 'active': default:\r\n\t\t\t$groups = BP_Groups_Group::get_active( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'newest':\r\n\t\t\t$groups = BP_Groups_Group::get_newest( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'popular':\r\n\t\t\t$groups = BP_Groups_Group::get_popular( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'alphabetical':\r\n\t\t\t$groups = BP_Groups_Group::get_alphabetically( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'random':\r\n\t\t\t$groups = BP_Groups_Group::get_random( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'most-forum-topics':\r\n\t\t\t$groups = BP_Groups_Group::get_by_most_forum_topics( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t\tcase 'most-forum-posts':\r\n\t\t\t$groups = BP_Groups_Group::get_by_most_forum_posts( $per_page, $page, $user_id, $search_terms, $populate_extras );\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn apply_filters( 'groups_get_groups', $groups, &$params );\r\n}",
"public function hook_group()\n {\n add_filter(RP_WCDPD::get_items_filter_prefix($this->context) . $this->item_key . '_groups', array($this, 'register_group'), $this->group_position);\n }",
"private function defineSearchGroups(){\n foreach($this->_search_groups as $key => $val){\n $this->_search_terms_grouped[$key] = array();\n $this->_search_terms_found[$key] = 0;\n }\n \n return $this;\n }",
"public function group($group);",
"public function hook_query_index(&$query) {\n $query->where('user_group_id', '1');\n\t }",
"public function groups();"
] | [
"0.64945817",
"0.6485827",
"0.6437281",
"0.61930877",
"0.6140315",
"0.6109579",
"0.59258604",
"0.59170866",
"0.5899721",
"0.5889034",
"0.58811647",
"0.5851758",
"0.584821",
"0.58388513",
"0.5727734",
"0.570854",
"0.5708282",
"0.5705881",
"0.56915355",
"0.5682651",
"0.5615148",
"0.5609979",
"0.55990225",
"0.55907446",
"0.5565858",
"0.5535834",
"0.5514862",
"0.55045795",
"0.5473543",
"0.54725677"
] | 0.75376314 | 0 |
Modify groups map icon | function gmw_ps_modify_group_map_icon( $args, $group, $gmw ) {
$map_icon = '_default.png';
//set default map icon usage if not exist
if ( ! isset( $gmw['map_markers']['usage'] ) ) {
$usage = $gmw['map_markers']['usage'] = 'global';
} else {
$usage = $gmw['map_markers']['usage'];
}
$global_icon = isset( $gmw['map_markers']['default_marker'] ) ? $gmw['map_markers']['default_marker'] : '_default.png';
//if same global map icon
if ( $usage == 'global' ) {
$map_icon = $gmw['map_markers']['default_marker'];
//per group map icon
} elseif ( $usage == 'per_group' && isset( $group->map_icon ) ) {
$map_icon = $group->map_icon;
//avatar map icon
} elseif ( $usage == 'avatar' ) {
$avatar = bp_core_fetch_avatar( array(
'item_id' => $group->id,
'object' => 'group',
'type' => 'thumb',
'width' => 30,
'height' => 30,
'html' => false
) );
$map_icon = array(
'url' => ( $avatar ) ? $avatar : GMW_PS_URL . '/friends/assets/ map-icons/_no_avatar.png',
'scaledSize' => array(
'height' => 30,
'width' => 30
)
);
//oterwise, default map icon
} else {
$map_icon = '_default.png';
}
//generate the map icon
if ( $usage != 'avatar' ) {
if ( $map_icon == '_default.png' ) {
$map_icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld='. $group->location_count.'|FF776B|000000';
} else {
$icons = gmw_get_icons();
$map_icon = $icons['gl_map_icons']['url'].$map_icon;
}
}
$args['map_icon'] = $map_icon;
return $args;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ca_elements_icon_map( $icon_map ) {\n\t\t$icon_map['si_custom_elements'] = CA_EXTENSION_URL . '/assets/svg/icons.svg';\n\t\treturn $icon_map;\n\t}",
"private function augment_settings_map_markers() {\n\n\t\t$related_to = 'map_end_icon,default_icons';\n\t\t$new_options[ 'default_icons' ] = array( 'related_to' => $related_to , 'type' => 'checkbox' );\n\n\t\t$this->attach_to_slp( $new_options , array( 'page'=> 'slp_experience','section' => 'map', 'group' => 'markers' ) );\n\t}",
"function gmw_ps_gl_get_map_icon_via_loop( $map_icon, $group, $gmw ) {\n\n\t$usage = $gmw['map_markers']['usage'];\n\n\t// abort if not set to featured image or categories\n\tif ( 'avatar' == $gmw['map_markers']['usage'] ) {\n\n\t\t$group_id = isset( $group->id ) ? $group->id : $group->object_id;\n\n\t\t$map_icon = bp_core_fetch_avatar(\n\t\t\tarray(\n\t\t\t\t'item_id' => $group_id,\n\t\t\t\t'object' => 'group',\n\t 'type' => 'thumb',\n\t 'width' => 80,\n\t 'height' => 80,\n\t 'html' => false,\n\t 'no_grav' => true\n\t )\n\t\t);\n\n\t\tif ( empty( $map_icon ) ) {\n\t\t\t$map_icon = GMW_PS_URL. '/assets/map-icons/_no_image.png';\n\t\t}\n\t}\n\n\treturn $map_icon;\n}",
"abstract protected function form_icon();",
"function js_icons() {\n\t\t/* If we're in the backend, get an absolute path. Frontend can use a relative path. */\n\t\tif (TYPO3_MODE=='BE')\t{\n\t\t\t$path = t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelPath('wec_map');\n\t\t} else {\n\t\t\t$path = t3lib_extMgm::siteRelPath('wec_map');\n\t\t}\n\n\t\t// add default icon set\n\t\t$this->icons[] = '\nWecMap.addIcon(\"' . $this->mapName .'\", \"default\", \"'.$path.'images/mm_20_red.png\", \"'.$path.'images/mm_20_shadow.png\", new GSize(12, 20), new GSize(22, 20), new GPoint(6, 20), new GPoint(5, 1));\n\t\t\t';\n\t\treturn implode(\"\\n\", $this->icons);\n\t}",
"function addMarkerIcon($dataArray) {\n\t\tif (empty($dataArray)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t \t$this->icons[] = 'WecMap.addIcon(\"' . $this->mapName . '\", \"' . $dataArray['iconID'] . '\", \"' . $dataArray['imagepath'] . '\", \"' . $dataArray['shadowpath'] . '\", new GSize(' . $dataArray['width'] . ', ' . $dataArray['height'] . '), new GSize(' . $dataArray['shadowWidth'] . ', ' . $dataArray['shadowHeight'] . '), new GPoint(' . $dataArray['anchorX'] . ', ' . $dataArray['anchorY'] . '), new GPoint(' . $dataArray['infoAnchorX'] . ', ' . $dataArray['infoAnchorY'] . '));\n\t\t\t';\n\t\t\treturn true;\n\t\t}\n\n\t}",
"public function enableIcon()\n {\n $this->iconEnabled = true;\n }",
"function gmw_ps_location_form_map_icons_tab( $tabs ) {\n\n\t$tabs['map_icons'] = array(\n\t\t'label' => __( 'Map Marker ', 'gmw-premium-settings' ),\n\t\t'icon' => 'gmw-icon-map-pin',\n\t\t'priority' => 30,\n\t);\n\n\treturn $tabs;\n}",
"public function slcr_add_new_icon_set_to_iconbox() { \n\t\t\t$icons_name = \"flaticon\";\n\t\t $param = WPBMap::getParam( 'vc_icon', 'type' );\n\t $param['value'][__( 'Custom Pack', 'moppers' )] = $icons_name;\n\t vc_update_shortcode_param( 'vc_icon', $param ); \n\t // list of icons that add \n\t add_filter( 'vc_iconpicker-type-flaticon', array( $this, 'slcr_add_icon_array' ), 15 ); \n\t add_action( 'vc_base_register_front_css', array( $this, 'slcr_vc_iconpicker_base_register_css' ), 15 );\n \t\tadd_action( 'vc_base_register_admin_css', array( $this, 'slcr_vc_iconpicker_base_register_css' ), 15 );\n\n \t\tadd_action( 'vc_backend_editor_enqueue_js_css', array( $this, 'slcr_vc_iconpicker_editor_css' ), 15 );\n \t\tadd_action( 'vc_frontend_editor_enqueue_js_css', array( $this, 'slcr_vc_iconpicker_editor_css' ), 15 );\n }",
"public function modify_admin_icon() {\n\t\tglobal $post_type;\n\n\t\tif ( $this->post_type == $post_type )\n\t\t\techo '<style>#icon-edit { background: url(\"' . plugins_url( 'images/instapaper-48.png', __FILE__ ) . '\") no-repeat; background-size: 32px 32px; }</style>';\n\t}",
"function gmw_ps_location_form_map_icons_panel( $form ) {\n\n\t$addon_data = gmw_get_addon_data( $form->slug );\n\t$prefix = $addon_data['prefix'];\n\n\t// get saved icon\n\t$saved_icon = ! empty( $form->saved_location->map_icon ) ? $form->saved_location->map_icon : '_default.png';\n\t?>\n\t<div id=\"map_icons-tab-panel\" class=\"section-wrapper map-icons\">\n\n\t\t<?php do_action( 'gmw_lf_' . $prefix . '_map_icons_section_start', $form ); ?>\n\n\t\t<div class=\"icons-wrapper\">\n\t\t\t<?php\n\t\t\t$icons_data = gmw_get_icons();\n\n\t\t\tif ( ! empty( $icons_data[ $prefix . '_map_icons' ] ) ) {\n\n\t\t\t\t$map_icons = $icons_data[ $prefix . '_map_icons' ]['all_icons'];\n\t\t\t\t$icons_url = $icons_data[ $prefix . '_map_icons' ]['url'];\n\t\t\t\t$cic = 1;\n\n\t\t\t\tforeach ( $map_icons as $map_icon ) {\n\n\t\t\t\t\t$checked = ( ( $saved_icon == $map_icon ) || 1 === $cic ) ? 'checked=\"checked\"' : '';\n\n\t\t\t\t\techo '<label>';\n\t\t\t\t\techo '<input type=\"radio\" name=\"gmw_location_form[map_icon]\" value=\"' . esc_attr( $map_icon ) . '\" ' . $checked . ' />';\n\t\t\t\t\techo '<img src=\"' . esc_url( $icons_url . $map_icon ) . '\" />';\n\t\t\t\t\techo '</label>';\n\n\t\t\t\t\t$cic++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t\t<?php do_action( 'gmw_lf_' . $prefix . '_map_icons_section_end', $form ); ?>\n\t</div>\n\t<?php\n}",
"public function icons() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/icons.php';\n\t}",
"function template_preprocess_micon(array &$variables) {\n $variables['MiconIcon'] = $variables['icon'];\n $variables['icon'] = $variables['MiconIcon']->toRenderable();\n}",
"public function populateMapIconDirectory() {\n\t\t$iconPath = 'fileadmin/ext/mymap/Resources/Public/Icons/';\n \t\tif (!is_dir(Environment::getPublicPath() . '/' . $iconPath)) {\n $fileSystem = new FileSystem();\n if (Environment::getPublicPath() != Environment::getProjectPath()) {\n // we are in composerMode\n \t\t\t$sourceDir = Environment::getProjectPath() . '/vendor/wsr/mymap/Resources/Public/';\n } else {\n $sourceDir = Environment::getPublicPath() .'/typo3conf/ext/mymap/Resources/Public/';\n }\n $fileSystem->mirror($sourceDir, 'fileadmin/ext/mymap/Resources/Public/');\n\t\t\t$this->addFlashMessage('Directory ' . $iconPath . ' created for use with own mapIcons!', '', \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::INFO);\n }\n\t}",
"public function get_icon() {\r\n return 'eicon-google-maps';\r\n }",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"public function get_icon()\n {\n return parent::get_icon();\n }",
"public function add_menu_icon() {\r\n \r\n echo '<style type=\"text/css\">#adminmenu .menu-icon-ut-content-block div.wp-menu-image:before { content: \"\\f489\"; } </style>';\r\n \r\n }",
"public function add_menu_icon() {\r\n \r\n echo '<style type=\"text/css\">#adminmenu .menu-icon-ut-content-block div.wp-menu-image:before { content: \"\\f489\"; } </style>';\r\n \r\n }",
"public function icon($value) {\n return $this->setProperty('icon', $value);\n }",
"function template_preprocess_micon_icon(array &$variables) {\n $icon = $variables['element']['#icon'];\n $variables['tag'] = 'span';\n $variables['attributes']['class'][] = 'micon';\n // Allow icon_id to be used as #icon.\n if (is_string($icon)) {\n $icon = \\Drupal::service('micon.icon.manager')->getIconMatch($icon);\n }\n if ($icon instanceof MiconIconInterface) {\n $variables['icon'] = $icon;\n $variables['type'] = $icon->getType();\n $variables['tag'] = $icon->getWrappingElement();\n $variables['attributes']['class'][] = $icon->getSelector();\n $variables['attributes']['aria-hidden'] = 'true';\n $variables['children'] = $icon->getChildren();\n }\n}",
"function process_icon()\n\t{\n\t\tglobal $show;\n\n\t\t$show['messageicon'] = false;\n\t}",
"function change_my_icons( $icons ) {\n $icons['visa'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/visa.svg\" style=\"width: 25px;\"/>';\n $icons['mastercard'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/mastercard.svg\" style=\"width: 25px;\"/>';\n $icons['amex'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/amex.svg\" style=\"width: 25px;\" />';\n return $icons;\n}",
"function _template_preprocess_micon_package__image(array &$variables) {\n $micon = $variables['micon'];\n $info = $micon->getInfo();\n\n $variables['content']['icons'] = [\n '#theme' => 'fieldset',\n '#title' => t('Available SVGs'),\n ];\n $variables['content']['icons']['#children']['icons'] = [\n '#theme' => 'micon_icon_list',\n '#micon' => $micon,\n ];\n}",
"public function get_icon() {\n return 'astha far fa-images';\n }",
"public function icon() {\n\t\t$icon_url = MACHETE_BASE_URL . 'inc/' . $this->params['slug'] . '/icon.svg';\n\t\techo '<img src=\"' . esc_attr( $icon_url ) . '\" style=\"width: 96px; height: 96px;\">';\n\t}",
"function PMicon($row,$a,$c,$nextCount,$exp)\t{\n\n\t\t$renderElement = $nextCount ? ($exp?'treeMinusIcon':'treePlusIcon') : 'treeJoinIcon';\n\n\t\t$BTM = ($a==$c)?'Bottom':'';\n\t\t$icon=$this->cObj->IMAGE($this->conf['categoryTree.'][$renderElement.$BTM.'.']);\n\n\t\tif ($nextCount)\t{\n\t\t\t$cmd=$this->bank.'_'.($exp?'0_':'1_').$row['uid'].'_'.$this->treeName;\n\t\t\t$bMark=($this->bank.'_'.$row['uid']);\n\t\t\t$icon = $this->PM_ATagWrap($icon,$cmd,$bMark);\n\t\t}\n\n\t\treturn $icon;\n\t}",
"public function setIconId($value) {\n return $this->set(self::ICON_ID, $value);\n }"
] | [
"0.6376868",
"0.629475",
"0.6265712",
"0.6113134",
"0.5971523",
"0.5966411",
"0.596",
"0.5938102",
"0.59188974",
"0.5880098",
"0.58710665",
"0.58046186",
"0.5783355",
"0.57289284",
"0.5728904",
"0.56722695",
"0.56722695",
"0.56722695",
"0.5656979",
"0.5656763",
"0.5656763",
"0.56552446",
"0.565022",
"0.5647287",
"0.563866",
"0.56366277",
"0.5625308",
"0.56083333",
"0.560048",
"0.55760175"
] | 0.80077463 | 0 |
Set custom group map icons via sarch query. This function set custom icons for "global" and "per group". everything is done during WP_Query. | function gmw_ps_gl_get_map_icons_via_query( $gmw ) {
if ( false == ( $usage = $gmw['map_markers']['usage'] ) ) {
$usage = 'global';
}
// abort if not the right usage
if ( ! in_array( $usage, array( 'global', 'per_group' ) ) ) {
return false;
}
global $wpdb;
// get icons url
$icons = gmw_get_icons();
$icons_url = $icons['gl_map_icons']['url'];
// get default marker. If no icon provided or using the _default.png,
// we than pass blank value, to use Google's default red marker.
if ( ! empty( $gmw['map_markers']['default_marker'] ) && '_default.png' != $gmw['map_markers']['default_marker'] ) {
$default_icon = $icons_url.$gmw['map_markers']['default_marker'];
} else {
$default_icon = GMW()->default_icons['location_icon_url'];
}
// if global icon.
if ( 'global' === $usage ) {
return $wpdb->prepare( "%s as map_icon", $default_icon );
}
// if per group, get the icon from locations table
if ( 'per_group' === $usage ) {
return $wpdb->prepare( "IF ( gmw_locations.map_icon IS NOT NULL AND gmw_locations.map_icon != '_default.png', CONCAT( %s, gmw_locations.map_icon ), %s ) as map_icon", $icons_url, $default_icon );
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gmw_ps_modify_group_map_icon( $args, $group, $gmw ) {\n\n $map_icon = '_default.png';\n\n //set default map icon usage if not exist\n if ( ! isset( $gmw['map_markers']['usage'] ) ) {\n $usage = $gmw['map_markers']['usage'] = 'global';\n } else {\n $usage = $gmw['map_markers']['usage'];\n }\n\n $global_icon = isset( $gmw['map_markers']['default_marker'] ) ? $gmw['map_markers']['default_marker'] : '_default.png';\n \n //if same global map icon\n if ( $usage == 'global' ) {\n $map_icon = $gmw['map_markers']['default_marker'];\n //per group map icon \n } elseif ( $usage == 'per_group' && isset( $group->map_icon ) ) {\n $map_icon = $group->map_icon;\n //avatar map icon\n } elseif ( $usage == 'avatar' ) {\n $avatar = bp_core_fetch_avatar( array( \n 'item_id' => $group->id,\n 'object' => 'group', \n 'type' => 'thumb', \n 'width' => 30, \n 'height' => 30, \n 'html' => false \n ) );\n\n $map_icon = array(\n 'url' => ( $avatar ) ? $avatar : GMW_PS_URL . '/friends/assets/ map-icons/_no_avatar.png',\n 'scaledSize' => array(\n 'height' => 30,\n 'width' => 30\n )\n );\n\n //oterwise, default map icon \n } else {\n $map_icon = '_default.png';\n }\n \n //generate the map icon\n if ( $usage != 'avatar' ) {\n\n if ( $map_icon == '_default.png' ) {\n $map_icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld='. $group->location_count.'|FF776B|000000';\n } else {\n $icons = gmw_get_icons();\n $map_icon = $icons['gl_map_icons']['url'].$map_icon;\n }\n }\n\n $args['map_icon'] = $map_icon;\n\n return $args;\n}",
"private function augment_settings_map_markers() {\n\n\t\t$related_to = 'map_end_icon,default_icons';\n\t\t$new_options[ 'default_icons' ] = array( 'related_to' => $related_to , 'type' => 'checkbox' );\n\n\t\t$this->attach_to_slp( $new_options , array( 'page'=> 'slp_experience','section' => 'map', 'group' => 'markers' ) );\n\t}",
"function gmw_ps_gl_get_map_icon_via_loop( $map_icon, $group, $gmw ) {\n\n\t$usage = $gmw['map_markers']['usage'];\n\n\t// abort if not set to featured image or categories\n\tif ( 'avatar' == $gmw['map_markers']['usage'] ) {\n\n\t\t$group_id = isset( $group->id ) ? $group->id : $group->object_id;\n\n\t\t$map_icon = bp_core_fetch_avatar(\n\t\t\tarray(\n\t\t\t\t'item_id' => $group_id,\n\t\t\t\t'object' => 'group',\n\t 'type' => 'thumb',\n\t 'width' => 80,\n\t 'height' => 80,\n\t 'html' => false,\n\t 'no_grav' => true\n\t )\n\t\t);\n\n\t\tif ( empty( $map_icon ) ) {\n\t\t\t$map_icon = GMW_PS_URL. '/assets/map-icons/_no_image.png';\n\t\t}\n\t}\n\n\treturn $map_icon;\n}",
"function mantra_smenur_socials_override() {//fonction enfante override\n // mantra_set_social_icons('smenur');\n}",
"public function slcr_add_new_icon_set_to_iconbox() { \n\t\t\t$icons_name = \"flaticon\";\n\t\t $param = WPBMap::getParam( 'vc_icon', 'type' );\n\t $param['value'][__( 'Custom Pack', 'moppers' )] = $icons_name;\n\t vc_update_shortcode_param( 'vc_icon', $param ); \n\t // list of icons that add \n\t add_filter( 'vc_iconpicker-type-flaticon', array( $this, 'slcr_add_icon_array' ), 15 ); \n\t add_action( 'vc_base_register_front_css', array( $this, 'slcr_vc_iconpicker_base_register_css' ), 15 );\n \t\tadd_action( 'vc_base_register_admin_css', array( $this, 'slcr_vc_iconpicker_base_register_css' ), 15 );\n\n \t\tadd_action( 'vc_backend_editor_enqueue_js_css', array( $this, 'slcr_vc_iconpicker_editor_css' ), 15 );\n \t\tadd_action( 'vc_frontend_editor_enqueue_js_css', array( $this, 'slcr_vc_iconpicker_editor_css' ), 15 );\n }",
"function ca_elements_icon_map( $icon_map ) {\n\t\t$icon_map['si_custom_elements'] = CA_EXTENSION_URL . '/assets/svg/icons.svg';\n\t\treturn $icon_map;\n\t}",
"function jobstar_core_pe_icon_option() {\r\n return apply_filters( 'jobstar_get_pe_icon_sets', array(\r\n \r\n 'pe-7s-album' => 'Album',\r\n 'pe-7s-arc' => 'Arc',\r\n 'pe-7s-back-2' => 'Back 2',\r\n 'pe-7s-bandaid' => 'Bandaid',\r\n 'pe-7s-car' => 'Car',\r\n 'pe-7s-diamond' => 'Diamond',\r\n 'pe-7s-door-lock' => 'Door Lock',\r\n 'pe-7s-eyedropper' => 'Eyedropper',\r\n 'pe-7s-female' => 'Female',\r\n 'pe-7s-gym' => 'Gym',\r\n 'pe-7s-hammer' => 'Hammer',\r\n 'pe-7s-headphones' => 'Headphones',\r\n 'pe-7s-helm' => 'Helm',\r\n 'pe-7s-hourglass' => 'Hourglass',\r\n 'pe-7s-leaf' => 'Leaf',\r\n 'pe-7s-magic-wand' => 'Magic Wand',\r\n 'pe-7s-male' => 'Male',\r\n 'pe-7s-map-2' => 'Map 2',\r\n 'pe-7s-next-2' => 'Next 2',\r\n 'pe-7s-paint-bucket' => 'Paint Bucket',\r\n 'pe-7s-pendrive' => 'Pendrive',\r\n 'pe-7s-photo' => 'Photo',\r\n 'pe-7s-piggy' => 'Piggy',\r\n 'pe-7s-plugin' => 'Plugin',\r\n 'pe-7s-refresh-2' => 'Refresh 2',\r\n 'pe-7s-rocket' => 'Rocket',\r\n 'pe-7s-settings' => 'Settings',\r\n 'pe-7s-shield' => 'Shield',\r\n 'pe-7s-smile' => 'Smile',\r\n 'pe-7s-usb' => 'Usb',\r\n 'pe-7s-vector' => 'Vector',\r\n 'pe-7s-wine' => 'Wine',\r\n 'pe-7s-cloud-upload' => 'Cloud Upload',\r\n 'pe-7s-cash' => 'Cash',\r\n 'pe-7s-close' => 'Close',\r\n 'pe-7s-bluetooth' => 'Bluetooth',\r\n 'pe-7s-cloud-download' => 'Cloud Download',\r\n 'pe-7s-way' => 'Way',\r\n 'pe-7s-close-circle' => 'Close Circle',\r\n 'pe-7s-id' => 'Id',\r\n 'pe-7s-angle-up' => 'Angle Up',\r\n 'pe-7s-wristwatch' => 'Wristwatch',\r\n 'pe-7s-angle-up-circle' => 'Angle Up Circle',\r\n 'pe-7s-world' => 'World',\r\n 'pe-7s-angle-right' => 'Angle Right',\r\n 'pe-7s-volume' => 'Volume',\r\n 'pe-7s-angle-right-circle' => 'Angle Right Circle',\r\n 'pe-7s-users' => 'Users',\r\n 'pe-7s-angle-left' => 'Angle Left',\r\n 'pe-7s-user-female' => 'User Female',\r\n 'pe-7s-angle-left-circle' => 'Angle Left Circle',\r\n 'pe-7s-up-arrow' => 'Up Arrow',\r\n 'pe-7s-angle-down' => 'Angle Down',\r\n 'pe-7s-switch' => 'Switch',\r\n 'pe-7s-angle-down-circle' => 'Angle Down Circle',\r\n 'pe-7s-scissors' => 'Scissors',\r\n 'pe-7s-wallet' => 'Wallet',\r\n 'pe-7s-safe' => 'Safe',\r\n 'pe-7s-volume2' => 'Volume2',\r\n 'pe-7s-volume1' => 'Volume1',\r\n 'pe-7s-voicemail' => 'Voicemail',\r\n 'pe-7s-video' => 'Video',\r\n 'pe-7s-user' => 'User',\r\n 'pe-7s-upload' => 'Upload',\r\n 'pe-7s-unlock' => 'Unlock',\r\n 'pe-7s-umbrella' => 'Umbrella',\r\n 'pe-7s-trash' => 'Trash',\r\n 'pe-7s-tools' => 'Tools',\r\n 'pe-7s-timer' => 'Timer',\r\n 'pe-7s-ticket' => 'Ticket',\r\n 'pe-7s-target' => 'Target',\r\n 'pe-7s-sun' => 'Sun',\r\n 'pe-7s-study' => 'Study',\r\n 'pe-7s-stopwatch' => 'Stopwatch',\r\n 'pe-7s-star' => 'Star',\r\n 'pe-7s-speaker' => 'Speaker',\r\n 'pe-7s-signal' => 'Signal',\r\n 'pe-7s-shuffle' => 'Shuffle',\r\n 'pe-7s-shopbag' => 'Shopbag',\r\n 'pe-7s-share' => 'Share',\r\n 'pe-7s-server' => 'Server',\r\n 'pe-7s-search' => 'Search',\r\n 'pe-7s-film' => 'Film',\r\n 'pe-7s-science' => 'Science',\r\n 'pe-7s-disk' => 'Disk',\r\n 'pe-7s-ribbon' => 'Ribbon',\r\n 'pe-7s-repeat' => 'Repeat',\r\n 'pe-7s-refresh' => 'Refresh',\r\n 'pe-7s-add-user' => 'Add User',\r\n 'pe-7s-refresh-cloud' => 'Refresh Cloud',\r\n 'pe-7s-paperclip' => 'Paperclip',\r\n 'pe-7s-radio' => 'Radio',\r\n 'pe-7s-note2' => 'Note2',\r\n 'pe-7s-print' => 'Print',\r\n 'pe-7s-network' => 'Network',\r\n 'pe-7s-prev' => 'Prev',\r\n 'pe-7s-mute' => 'Mute',\r\n 'pe-7s-power' => 'Power',\r\n 'pe-7s-medal' => 'Medal',\r\n 'pe-7s-portfolio' => 'Portfolio',\r\n 'pe-7s-like2' => 'Like2',\r\n 'pe-7s-plus' => 'Plus',\r\n 'pe-7s-left-arrow' => 'Left Arrow',\r\n 'pe-7s-play' => 'Play',\r\n 'pe-7s-key' => 'Key',\r\n 'pe-7s-plane' => 'Plane',\r\n 'pe-7s-joy' => 'Joy',\r\n 'pe-7s-photo-gallery' => 'Photo Gallery',\r\n 'pe-7s-pin' => 'Pin',\r\n 'pe-7s-phone' => 'Phone',\r\n 'pe-7s-plug' => 'Plug',\r\n 'pe-7s-pen' => 'Pen',\r\n 'pe-7s-right-arrow' => 'Right Arrow',\r\n 'pe-7s-paper-plane' => 'Paper Plane',\r\n 'pe-7s-delete-user' => 'Delete User',\r\n 'pe-7s-paint' => 'Paint',\r\n 'pe-7s-bottom-arrow' => 'Bottom Arrow',\r\n 'pe-7s-notebook' => 'Notebook',\r\n 'pe-7s-note' => 'Note',\r\n 'pe-7s-next' => 'Next',\r\n 'pe-7s-news-paper' => 'News Paper',\r\n 'pe-7s-musiclist' => 'Musiclist',\r\n 'pe-7s-music' => 'Music',\r\n 'pe-7s-mouse' => 'Mouse',\r\n 'pe-7s-more' => 'More',\r\n 'pe-7s-moon' => 'Moon',\r\n 'pe-7s-monitor' => 'Monitor',\r\n 'pe-7s-micro' => 'Micro',\r\n 'pe-7s-menu' => 'Menu',\r\n 'pe-7s-map' => 'Map',\r\n 'pe-7s-map-marker' => 'Map Marker',\r\n 'pe-7s-mail' => 'Mail',\r\n 'pe-7s-mail-open' => 'Mail Open',\r\n 'pe-7s-mail-open-file' => 'Mail Open File',\r\n 'pe-7s-magnet' => 'Magnet',\r\n 'pe-7s-loop' => 'Loop',\r\n 'pe-7s-look' => 'Look',\r\n 'pe-7s-lock' => 'Lock',\r\n 'pe-7s-lintern' => 'Lintern',\r\n 'pe-7s-link' => 'Link',\r\n 'pe-7s-like' => 'Like',\r\n 'pe-7s-light' => 'Light',\r\n 'pe-7s-less' => 'Less',\r\n 'pe-7s-keypad' => 'Keypad',\r\n 'pe-7s-junk' => 'Junk',\r\n 'pe-7s-info' => 'Info',\r\n 'pe-7s-home' => 'Home',\r\n 'pe-7s-help2' => 'Help2',\r\n 'pe-7s-help1' => 'Help1',\r\n 'pe-7s-graph3' => 'Graph3',\r\n 'pe-7s-graph2' => 'Graph2',\r\n 'pe-7s-graph1' => 'Graph1',\r\n 'pe-7s-graph' => 'Graph',\r\n 'pe-7s-global' => 'Global',\r\n 'pe-7s-gleam' => 'Gleam',\r\n 'pe-7s-glasses' => 'Glasses',\r\n 'pe-7s-gift' => 'Gift',\r\n 'pe-7s-folder' => 'Folder',\r\n 'pe-7s-flag' => 'Flag',\r\n 'pe-7s-filter' => 'Filter',\r\n 'pe-7s-file' => 'File',\r\n 'pe-7s-expand1' => 'Expand1',\r\n 'pe-7s-exapnd2' => 'Exapnd2',\r\n 'pe-7s-edit' => 'Edit',\r\n 'pe-7s-drop' => 'Drop',\r\n 'pe-7s-drawer' => 'Drawer',\r\n 'pe-7s-download' => 'Download',\r\n 'pe-7s-display2' => 'Display2',\r\n 'pe-7s-display1' => 'Display1',\r\n 'pe-7s-diskette' => 'Diskette',\r\n 'pe-7s-date' => 'Date',\r\n 'pe-7s-cup' => 'Cup',\r\n 'pe-7s-culture' => 'Culture',\r\n 'pe-7s-crop' => 'Crop',\r\n 'pe-7s-credit' => 'Credit',\r\n 'pe-7s-copy-file' => 'Copy File',\r\n 'pe-7s-config' => 'Config',\r\n 'pe-7s-compass' => 'Compass',\r\n 'pe-7s-comment' => 'Comment',\r\n 'pe-7s-coffee' => 'Coffee',\r\n 'pe-7s-cloud' => 'Cloud',\r\n 'pe-7s-clock' => 'Clock',\r\n 'pe-7s-check' => 'Check',\r\n 'pe-7s-chat' => 'Chat',\r\n 'pe-7s-cart' => 'Cart',\r\n 'pe-7s-camera' => 'Camera',\r\n 'pe-7s-call' => 'Call',\r\n 'pe-7s-calculator' => 'Calculator',\r\n 'pe-7s-browser' => 'Browser',\r\n 'pe-7s-box2' => 'Box2',\r\n 'pe-7s-box1' => 'Box1',\r\n 'pe-7s-bookmarks' => 'Bookmarks',\r\n 'pe-7s-bicycle' => 'Bicycle',\r\n 'pe-7s-bell' => 'Bell',\r\n 'pe-7s-battery' => 'Battery',\r\n 'pe-7s-ball' => 'Ball',\r\n 'pe-7s-back' => 'Back',\r\n 'pe-7s-attention' => 'Attention',\r\n 'pe-7s-anchor' => 'Anchor',\r\n 'pe-7s-albums' => 'Albums',\r\n 'pe-7s-alarm' => 'Alarm',\r\n 'pe-7s-airplay' => 'Airplay',\r\n ) );\r\n}",
"function qode_listing_set_ls_regions_icon_class_name_for_vc_shortcodes($shortcodes_icon_class_array) {\n\t\t$shortcodes_icon_class_array[] = '.icon-wpb-ls-regions';\n\n\t\treturn $shortcodes_icon_class_array;\n\t}",
"function gmw_ps_gl_set_gmw_args( $query_args, $gmw ) {\n\n\t/**\n\t * Set map icons settings in gmw query cache.\n\t *\n\t * The icons are being generated in the WP_Query,\n\t *\n\t * we need to make sure the query cache udpates when icons changes.\n\t *\n\t * @param [type] $gmw [description]\n\t * @return [type] [description]\n\t */\n\t$query_args['gmw_args']['map_icons']['usage'] = $gmw['map_markers']['usage'];\n\t$query_args['gmw_args']['map_icons']['default_marker'] = $gmw['map_markers']['default_marker'];\n\n\treturn $query_args;\n}",
"function change_my_icons( $icons ) {\n $icons['visa'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/visa.svg\" style=\"width: 25px;\"/>';\n $icons['mastercard'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/mastercard.svg\" style=\"width: 25px;\"/>';\n $icons['amex'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/amex.svg\" style=\"width: 25px;\" />';\n return $icons;\n}",
"protected function do_apply() {\n\t\tif ( ! $this->option_exists( 'header-elements-soc_icons' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$icons = (array) $this->get_option( 'header-elements-soc_icons' );\n\t\t$new_icons = array();\n\t\tforeach ( $icons as $icon ) {\n\t\t\tif ( $icon['icon'] === 'google' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$new_icons[] = $icon;\n\t\t}\n\t\t$this->set_option( 'header-elements-soc_icons', $new_icons );\n\t}",
"public function populateMapIconDirectory() {\n\t\t$iconPath = 'fileadmin/ext/mymap/Resources/Public/Icons/';\n \t\tif (!is_dir(Environment::getPublicPath() . '/' . $iconPath)) {\n $fileSystem = new FileSystem();\n if (Environment::getPublicPath() != Environment::getProjectPath()) {\n // we are in composerMode\n \t\t\t$sourceDir = Environment::getProjectPath() . '/vendor/wsr/mymap/Resources/Public/';\n } else {\n $sourceDir = Environment::getPublicPath() .'/typo3conf/ext/mymap/Resources/Public/';\n }\n $fileSystem->mirror($sourceDir, 'fileadmin/ext/mymap/Resources/Public/');\n\t\t\t$this->addFlashMessage('Directory ' . $iconPath . ' created for use with own mapIcons!', '', \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::INFO);\n }\n\t}",
"function qed_filter_theme_fonts_icon_sets( $icons ) {\r\n\t\t$di = qed_di();\r\n\t\tif ( isset( $di['icons_manager'] ) ) {\r\n\t\t\t$qed_icons_list = qed_di( 'icons_manager' )->get_list();\r\n\t\t\tif ( $qed_icons_list ) {\r\n\t\t\t\t$set = array();\r\n\t\t\t\tforeach ( $qed_icons_list as $icon ) {\r\n\t\t\t\t\t$set[ $icon['value'] ] = $icon['label'];\r\n\t\t\t\t}\r\n\t\t\t\t$icons['Swish Design'] = $set;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$icons_manager = new SD_Font_Icons_Manager( array(\r\n\t\t\t'font_file_url' => PARENT_URL . '/assets/csslib/font-awesome.min.css',\r\n\t\t\t'pattern' => '/\\.(fa-(?:\\w+(?:-)?)+):before\\s*{\\s*content/',\r\n\t\t\t'cache_key' => 'qed-font-awesome-icons-list',\r\n\t\t) );\r\n\t\t$font_awesome_icons_list = $icons_manager->get_list();\r\n\t\tif ( $font_awesome_icons_list ) {\r\n\t\t\t$set = array();\r\n\t\t\tforeach ( $font_awesome_icons_list as $icon ) {\r\n\t\t\t\t$icon_class = 'fa ' . $icon['value'];\r\n\t\t\t\t$set[ $icon_class ] = $icon['label'];\r\n\t\t\t}\r\n\t\t\t$icons['Font Awesome'] = $set;\r\n\t\t}\r\n\r\n\t\treturn $icons;\r\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function vc_iconpicker_type_iconsmind( $icons ) {\n\t$iconsmind_icons = array(\n\t\tarray(\"iconsmind-Aquarius\" => \"iconsmind-Aquarius\"), \n\t\tarray(\"iconsmind-Aquarius-2\" => \"iconsmind-Aquarius-2\"), \n\t\tarray(\"iconsmind-Aries\" => \"iconsmind-Aries\"), \n\t\tarray(\"iconsmind-Aries-2\" => \"iconsmind-Aries-2\"), \n\t\tarray(\"iconsmind-Cancer\" => \"iconsmind-Cancer\"), \n\t\tarray(\"iconsmind-Cancer-2\" => \"iconsmind-Cancer-2\"), \n\t\tarray(\"iconsmind-Capricorn\" => \"iconsmind-Capricorn\"), \n\t\tarray(\"iconsmind-Capricorn-2\" => \"iconsmind-Capricorn-2\"), \n\t\tarray(\"iconsmind-Gemini\" => \"iconsmind-Gemini\"), \n\t\tarray(\"iconsmind-Gemini-2\" => \"iconsmind-Gemini-2\"), \n\t\tarray(\"iconsmind-Leo\" => \"iconsmind-Leo\"), \n\t\tarray(\"iconsmind-Leo-2\" => \"iconsmind-Leo-2\"), \n\t\tarray(\"iconsmind-Libra\" => \"iconsmind-Libra\"), \n\t\tarray(\"iconsmind-Libra-2\" => \"iconsmind-Libra-2\"), \n\t\tarray(\"iconsmind-Pisces\" => \"iconsmind-Pisces\"), \n\t\tarray(\"iconsmind-Pisces-2\" => \"iconsmind-Pisces-2\"), \n\t\tarray(\"iconsmind-Sagittarus\" => \"iconsmind-Sagittarus\"), \n\t\tarray(\"iconsmind-Sagittarus-2\" => \"iconsmind-Sagittarus-2\"), \n\t\tarray(\"iconsmind-Scorpio\" => \"iconsmind-Scorpio\"), \n\t\tarray(\"iconsmind-Scorpio-2\" => \"iconsmind-Scorpio-2\"), \n\t\tarray(\"iconsmind-Taurus\" => \"iconsmind-Taurus\"), \n\t\tarray(\"iconsmind-Taurus-2\" => \"iconsmind-Taurus-2\"), \n\t\tarray(\"iconsmind-Virgo\" => \"iconsmind-Virgo\"), \n\t\tarray(\"iconsmind-Virgo-2\" => \"iconsmind-Virgo-2\"), \n\t\tarray(\"iconsmind-Add-Window\" => \"iconsmind-Add-Window\"), \n\t\tarray(\"iconsmind-Approved-Window\" => \"iconsmind-Approved-Window\"), \n\t\tarray(\"iconsmind-Block-Window\" => \"iconsmind-Block-Window\"), \n\t\tarray(\"iconsmind-Close-Window\" => \"iconsmind-Close-Window\"), \n\t\tarray(\"iconsmind-Code-Window\" => \"iconsmind-Code-Window\"), \n\t\tarray(\"iconsmind-Delete-Window\" => \"iconsmind-Delete-Window\"), \n\t\tarray(\"iconsmind-Download-Window\" => \"iconsmind-Download-Window\"), \n\t\tarray(\"iconsmind-Duplicate-Window\" => \"iconsmind-Duplicate-Window\"), \n\t\tarray(\"iconsmind-Error-404Window\" => \"iconsmind-Error-404Window\"), \n\t\tarray(\"iconsmind-Favorite-Window\" => \"iconsmind-Favorite-Window\"), \n\t\tarray(\"iconsmind-Font-Window\" => \"iconsmind-Font-Window\"), \n\t\tarray(\"iconsmind-Full-ViewWindow\" => \"iconsmind-Full-ViewWindow\"), \n\t\tarray(\"iconsmind-Height-Window\" => \"iconsmind-Height-Window\"), \n\t\tarray(\"iconsmind-Home-Window\" => \"iconsmind-Home-Window\"), \n\t\tarray(\"iconsmind-Info-Window\" => \"iconsmind-Info-Window\"), \n\t\tarray(\"iconsmind-Loading-Window\" => \"iconsmind-Loading-Window\"), \n\t\tarray(\"iconsmind-Lock-Window\" => \"iconsmind-Lock-Window\"), \n\t\tarray(\"iconsmind-Love-Window\" => \"iconsmind-Love-Window\"), \n\t\tarray(\"iconsmind-Maximize-Window\" => \"iconsmind-Maximize-Window\"), \n\t\tarray(\"iconsmind-Minimize-Maximize-Close-Window\" => \"iconsmind-Minimize-Maximize-Close-Window\"), \n\t\tarray(\"iconsmind-Minimize-Window\" => \"iconsmind-Minimize-Window\"), \n\t\tarray(\"iconsmind-Navigation-LeftWindow\" => \"iconsmind-Navigation-LeftWindow\"), \n\t\tarray(\"iconsmind-Navigation-RightWindow\" => \"iconsmind-Navigation-RightWindow\"), \n\t\tarray(\"iconsmind-Network-Window\" => \"iconsmind-Network-Window\"), \n\t\tarray(\"iconsmind-New-Tab\" => \"iconsmind-New-Tab\"), \n\t\tarray(\"iconsmind-One-Window\" => \"iconsmind-One-Window\"), \n\t\tarray(\"iconsmind-Refresh-Window\" => \"iconsmind-Refresh-Window\"), \n\t\tarray(\"iconsmind-Remove-Window\" => \"iconsmind-Remove-Window\"), \n\t\tarray(\"iconsmind-Restore-Window\" => \"iconsmind-Restore-Window\"), \n\t\tarray(\"iconsmind-Save-Window\" => \"iconsmind-Save-Window\"), \n\t\tarray(\"iconsmind-Settings-Window\" => \"iconsmind-Settings-Window\"), \n\t\tarray(\"iconsmind-Share-Window\" => \"iconsmind-Share-Window\"), \n\t\tarray(\"iconsmind-Sidebar-Window\" => \"iconsmind-Sidebar-Window\"), \n\t\tarray(\"iconsmind-Split-FourSquareWindow\" => \"iconsmind-Split-FourSquareWindow\"), \n\t\tarray(\"iconsmind-Split-Horizontal\" => \"iconsmind-Split-Horizontal\"), \n\t\tarray(\"iconsmind-Split-Horizontal2Window\" => \"iconsmind-Split-Horizontal2Window\"), \n\t\tarray(\"iconsmind-Split-Vertical\" => \"iconsmind-Split-Vertical\"), \n\t\tarray(\"iconsmind-Split-Vertical2\" => \"iconsmind-Split-Vertical2\"), \n\t\tarray(\"iconsmind-Split-Window\" => \"iconsmind-Split-Window\"), \n\t\tarray(\"iconsmind-Time-Window\" => \"iconsmind-Time-Window\"), \n\t\tarray(\"iconsmind-Touch-Window\" => \"iconsmind-Touch-Window\"), \n\t\tarray(\"iconsmind-Two-Windows\" => \"iconsmind-Two-Windows\"), \n\t\tarray(\"iconsmind-Upload-Window\" => \"iconsmind-Upload-Window\"), \n\t\tarray(\"iconsmind-URL-Window\" => \"iconsmind-URL-Window\"), \n\t\tarray(\"iconsmind-Warning-Window\" => \"iconsmind-Warning-Window\"), \n\t\tarray(\"iconsmind-Width-Window\" => \"iconsmind-Width-Window\"), \n\t\tarray(\"iconsmind-Window-2\" => \"iconsmind-Window-2\"), \n\t\tarray(\"iconsmind-Windows-2\" => \"iconsmind-Windows-2\"), \n\t\tarray(\"iconsmind-Autumn\" => \"iconsmind-Autumn\"), \n\t\tarray(\"iconsmind-Celsius\" => \"iconsmind-Celsius\"), \n\t\tarray(\"iconsmind-Cloud-Hail\" => \"iconsmind-Cloud-Hail\"), \n\t\tarray(\"iconsmind-Cloud-Moon\" => \"iconsmind-Cloud-Moon\"), \n\t\tarray(\"iconsmind-Cloud-Rain\" => \"iconsmind-Cloud-Rain\"), \n\t\tarray(\"iconsmind-Cloud-Snow\" => \"iconsmind-Cloud-Snow\"), \n\t\tarray(\"iconsmind-Cloud-Sun\" => \"iconsmind-Cloud-Sun\"), \n\t\tarray(\"iconsmind-Clouds-Weather\" => \"iconsmind-Clouds-Weather\"), \n\t\tarray(\"iconsmind-Cloud-Weather\" => \"iconsmind-Cloud-Weather\"), \n\t\tarray(\"iconsmind-Drop\" => \"iconsmind-Drop\"), \n\t\tarray(\"iconsmind-Dry\" => \"iconsmind-Dry\"), \n\t\tarray(\"iconsmind-Fahrenheit\" => \"iconsmind-Fahrenheit\"), \n\t\tarray(\"iconsmind-Fog-Day\" => \"iconsmind-Fog-Day\"), \n\t\tarray(\"iconsmind-Fog-Night\" => \"iconsmind-Fog-Night\"), \n\t\tarray(\"iconsmind-Full-Moon\" => \"iconsmind-Full-Moon\"), \n\t\tarray(\"iconsmind-Half-Moon\" => \"iconsmind-Half-Moon\"), \n\t\tarray(\"iconsmind-No-Drop\" => \"iconsmind-No-Drop\"), \n\t\tarray(\"iconsmind-Rainbow\" => \"iconsmind-Rainbow\"), \n\t\tarray(\"iconsmind-Rainbow-2\" => \"iconsmind-Rainbow-2\"), \n\t\tarray(\"iconsmind-Rain-Drop\" => \"iconsmind-Rain-Drop\"), \n\t\tarray(\"iconsmind-Sleet\" => \"iconsmind-Sleet\"), \n\t\tarray(\"iconsmind-Snow\" => \"iconsmind-Snow\"), \n\t\tarray(\"iconsmind-Snowflake\" => \"iconsmind-Snowflake\"), \n\t\tarray(\"iconsmind-Snowflake-2\" => \"iconsmind-Snowflake-2\"), \n\t\tarray(\"iconsmind-Snowflake-3\" => \"iconsmind-Snowflake-3\"), \n\t\tarray(\"iconsmind-Snow-Storm\" => \"iconsmind-Snow-Storm\"), \n\t\tarray(\"iconsmind-Spring\" => \"iconsmind-Spring\"), \n\t\tarray(\"iconsmind-Storm\" => \"iconsmind-Storm\"), \n\t\tarray(\"iconsmind-Summer\" => \"iconsmind-Summer\"), \n\t\tarray(\"iconsmind-Sun\" => \"iconsmind-Sun\"), \n\t\tarray(\"iconsmind-Sun-CloudyRain\" => \"iconsmind-Sun-CloudyRain\"), \n\t\tarray(\"iconsmind-Sunrise\" => \"iconsmind-Sunrise\"), \n\t\tarray(\"iconsmind-Sunset\" => \"iconsmind-Sunset\"), \n\t\tarray(\"iconsmind-Temperature\" => \"iconsmind-Temperature\"), \n\t\tarray(\"iconsmind-Temperature-2\" => \"iconsmind-Temperature-2\"), \n\t\tarray(\"iconsmind-Thunder\" => \"iconsmind-Thunder\"), \n\t\tarray(\"iconsmind-Thunderstorm\" => \"iconsmind-Thunderstorm\"), \n\t\tarray(\"iconsmind-Twister\" => \"iconsmind-Twister\"), \n\t\tarray(\"iconsmind-Umbrella-2\" => \"iconsmind-Umbrella-2\"), \n\t\tarray(\"iconsmind-Umbrella-3\" => \"iconsmind-Umbrella-3\"), \n\t\tarray(\"iconsmind-Wave\" => \"iconsmind-Wave\"), \n\t\tarray(\"iconsmind-Wave-2\" => \"iconsmind-Wave-2\"), \n\t\tarray(\"iconsmind-Windsock\" => \"iconsmind-Windsock\"), \n\t\tarray(\"iconsmind-Wind-Turbine\" => \"iconsmind-Wind-Turbine\"), \n\t\tarray(\"iconsmind-Windy\" => \"iconsmind-Windy\"), \n\t\tarray(\"iconsmind-Winter\" => \"iconsmind-Winter\"), \n\t\tarray(\"iconsmind-Winter-2\" => \"iconsmind-Winter-2\"), \n\t\tarray(\"iconsmind-Cinema\" => \"iconsmind-Cinema\"), \n\t\tarray(\"iconsmind-Clapperboard-Close\" => \"iconsmind-Clapperboard-Close\"), \n\t\tarray(\"iconsmind-Clapperboard-Open\" => \"iconsmind-Clapperboard-Open\"), \n\t\tarray(\"iconsmind-D-Eyeglasses\" => \"iconsmind-D-Eyeglasses\"), \n\t\tarray(\"iconsmind-D-Eyeglasses2\" => \"iconsmind-D-Eyeglasses2\"), \n\t\tarray(\"iconsmind-Director\" => \"iconsmind-Director\"), \n\t\tarray(\"iconsmind-Film\" => \"iconsmind-Film\"), \n\t\tarray(\"iconsmind-Film-Strip\" => \"iconsmind-Film-Strip\"), \n\t\tarray(\"iconsmind-Film-Video\" => \"iconsmind-Film-Video\"), \n\t\tarray(\"iconsmind-Flash-Video\" => \"iconsmind-Flash-Video\"), \n\t\tarray(\"iconsmind-HD-Video\" => \"iconsmind-HD-Video\"), \n\t\tarray(\"iconsmind-Movie\" => \"iconsmind-Movie\"), \n\t\tarray(\"iconsmind-Old-TV\" => \"iconsmind-Old-TV\"), \n\t\tarray(\"iconsmind-Reel\" => \"iconsmind-Reel\"), \n\t\tarray(\"iconsmind-Tripod-andVideo\" => \"iconsmind-Tripod-andVideo\"), \n\t\tarray(\"iconsmind-TV\" => \"iconsmind-TV\"), \n\t\tarray(\"iconsmind-Video\" => \"iconsmind-Video\"), \n\t\tarray(\"iconsmind-Video-2\" => \"iconsmind-Video-2\"), \n\t\tarray(\"iconsmind-Video-3\" => \"iconsmind-Video-3\"), \n\t\tarray(\"iconsmind-Video-4\" => \"iconsmind-Video-4\"), \n\t\tarray(\"iconsmind-Video-5\" => \"iconsmind-Video-5\"), \n\t\tarray(\"iconsmind-Video-6\" => \"iconsmind-Video-6\"), \n\t\tarray(\"iconsmind-Video-Len\" => \"iconsmind-Video-Len\"), \n\t\tarray(\"iconsmind-Video-Len2\" => \"iconsmind-Video-Len2\"), \n\t\tarray(\"iconsmind-Video-Photographer\" => \"iconsmind-Video-Photographer\"), \n\t\tarray(\"iconsmind-Video-Tripod\" => \"iconsmind-Video-Tripod\"), \n\t\tarray(\"iconsmind-Affiliate\" => \"iconsmind-Affiliate\"), \n\t\tarray(\"iconsmind-Background\" => \"iconsmind-Background\"), \n\t\tarray(\"iconsmind-Billing\" => \"iconsmind-Billing\"), \n\t\tarray(\"iconsmind-Control\" => \"iconsmind-Control\"), \n\t\tarray(\"iconsmind-Control-2\" => \"iconsmind-Control-2\"), \n\t\tarray(\"iconsmind-Crop-2\" => \"iconsmind-Crop-2\"), \n\t\tarray(\"iconsmind-Dashboard\" => \"iconsmind-Dashboard\"), \n\t\tarray(\"iconsmind-Duplicate-Layer\" => \"iconsmind-Duplicate-Layer\"), \n\t\tarray(\"iconsmind-Filter-2\" => \"iconsmind-Filter-2\"), \n\t\tarray(\"iconsmind-Gear\" => \"iconsmind-Gear\"), \n\t\tarray(\"iconsmind-Gear-2\" => \"iconsmind-Gear-2\"), \n\t\tarray(\"iconsmind-Gears\" => \"iconsmind-Gears\"), \n\t\tarray(\"iconsmind-Gears-2\" => \"iconsmind-Gears-2\"), \n\t\tarray(\"iconsmind-Information\" => \"iconsmind-Information\"), \n\t\tarray(\"iconsmind-Layer-Backward\" => \"iconsmind-Layer-Backward\"), \n\t\tarray(\"iconsmind-Layer-Forward\" => \"iconsmind-Layer-Forward\"), \n\t\tarray(\"iconsmind-Library\" => \"iconsmind-Library\"), \n\t\tarray(\"iconsmind-Loading\" => \"iconsmind-Loading\"), \n\t\tarray(\"iconsmind-Loading-2\" => \"iconsmind-Loading-2\"), \n\t\tarray(\"iconsmind-Loading-3\" => \"iconsmind-Loading-3\"), \n\t\tarray(\"iconsmind-Magnifi-Glass\" => \"iconsmind-Magnifi-Glass\"), \n\t\tarray(\"iconsmind-Magnifi-Glass2\" => \"iconsmind-Magnifi-Glass2\"), \n\t\tarray(\"iconsmind-Magnifi-Glass22\" => \"iconsmind-Magnifi-Glass22\"), \n\t\tarray(\"iconsmind-Mouse-Pointer\" => \"iconsmind-Mouse-Pointer\"), \n\t\tarray(\"iconsmind-On-off\" => \"iconsmind-On-off\"), \n\t\tarray(\"iconsmind-On-Off-2\" => \"iconsmind-On-Off-2\"), \n\t\tarray(\"iconsmind-On-Off-3\" => \"iconsmind-On-Off-3\"), \n\t\tarray(\"iconsmind-Preview\" => \"iconsmind-Preview\"), \n\t\tarray(\"iconsmind-Pricing\" => \"iconsmind-Pricing\"), \n\t\tarray(\"iconsmind-Profile\" => \"iconsmind-Profile\"), \n\t\tarray(\"iconsmind-Project\" => \"iconsmind-Project\"), \n\t\tarray(\"iconsmind-Rename\" => \"iconsmind-Rename\"), \n\t\tarray(\"iconsmind-Repair\" => \"iconsmind-Repair\"), \n\t\tarray(\"iconsmind-Save\" => \"iconsmind-Save\"), \n\t\tarray(\"iconsmind-Scroller\" => \"iconsmind-Scroller\"), \n\t\tarray(\"iconsmind-Scroller-2\" => \"iconsmind-Scroller-2\"), \n\t\tarray(\"iconsmind-Share\" => \"iconsmind-Share\"), \n\t\tarray(\"iconsmind-Statistic\" => \"iconsmind-Statistic\"), \n\t\tarray(\"iconsmind-Support\" => \"iconsmind-Support\"), \n\t\tarray(\"iconsmind-Switch\" => \"iconsmind-Switch\"), \n\t\tarray(\"iconsmind-Upgrade\" => \"iconsmind-Upgrade\"), \n\t\tarray(\"iconsmind-User\" => \"iconsmind-User\"), \n\t\tarray(\"iconsmind-Wrench\" => \"iconsmind-Wrench\"), \n\t\tarray(\"iconsmind-Air-Balloon\" => \"iconsmind-Air-Balloon\"), \n\t\tarray(\"iconsmind-Airship\" => \"iconsmind-Airship\"), \n\t\tarray(\"iconsmind-Bicycle\" => \"iconsmind-Bicycle\"), \n\t\tarray(\"iconsmind-Bicycle-2\" => \"iconsmind-Bicycle-2\"), \n\t\tarray(\"iconsmind-Bike-Helmet\" => \"iconsmind-Bike-Helmet\"), \n\t\tarray(\"iconsmind-Bus\" => \"iconsmind-Bus\"), \n\t\tarray(\"iconsmind-Bus-2\" => \"iconsmind-Bus-2\"), \n\t\tarray(\"iconsmind-Cable-Car\" => \"iconsmind-Cable-Car\"), \n\t\tarray(\"iconsmind-Car\" => \"iconsmind-Car\"), \n\t\tarray(\"iconsmind-Car-2\" => \"iconsmind-Car-2\"), \n\t\tarray(\"iconsmind-Car-3\" => \"iconsmind-Car-3\"), \n\t\tarray(\"iconsmind-Car-Wheel\" => \"iconsmind-Car-Wheel\"), \n\t\tarray(\"iconsmind-Gaugage\" => \"iconsmind-Gaugage\"), \n\t\tarray(\"iconsmind-Gaugage-2\" => \"iconsmind-Gaugage-2\"), \n\t\tarray(\"iconsmind-Helicopter\" => \"iconsmind-Helicopter\"), \n\t\tarray(\"iconsmind-Helicopter-2\" => \"iconsmind-Helicopter-2\"), \n\t\tarray(\"iconsmind-Helmet\" => \"iconsmind-Helmet\"), \n\t\tarray(\"iconsmind-Jeep\" => \"iconsmind-Jeep\"), \n\t\tarray(\"iconsmind-Jeep-2\" => \"iconsmind-Jeep-2\"), \n\t\tarray(\"iconsmind-Jet\" => \"iconsmind-Jet\"), \n\t\tarray(\"iconsmind-Motorcycle\" => \"iconsmind-Motorcycle\"), \n\t\tarray(\"iconsmind-Plane\" => \"iconsmind-Plane\"), \n\t\tarray(\"iconsmind-Plane-2\" => \"iconsmind-Plane-2\"), \n\t\tarray(\"iconsmind-Road\" => \"iconsmind-Road\"), \n\t\tarray(\"iconsmind-Road-2\" => \"iconsmind-Road-2\"), \n\t\tarray(\"iconsmind-Rocket\" => \"iconsmind-Rocket\"), \n\t\tarray(\"iconsmind-Sailing-Ship\" => \"iconsmind-Sailing-Ship\"), \n\t\tarray(\"iconsmind-Scooter\" => \"iconsmind-Scooter\"), \n\t\tarray(\"iconsmind-Scooter-Front\" => \"iconsmind-Scooter-Front\"), \n\t\tarray(\"iconsmind-Ship\" => \"iconsmind-Ship\"), \n\t\tarray(\"iconsmind-Ship-2\" => \"iconsmind-Ship-2\"), \n\t\tarray(\"iconsmind-Skateboard\" => \"iconsmind-Skateboard\"), \n\t\tarray(\"iconsmind-Skateboard-2\" => \"iconsmind-Skateboard-2\"), \n\t\tarray(\"iconsmind-Taxi\" => \"iconsmind-Taxi\"), \n\t\tarray(\"iconsmind-Taxi-2\" => \"iconsmind-Taxi-2\"), \n\t\tarray(\"iconsmind-Taxi-Sign\" => \"iconsmind-Taxi-Sign\"), \n\t\tarray(\"iconsmind-Tractor\" => \"iconsmind-Tractor\"), \n\t\tarray(\"iconsmind-traffic-Light\" => \"iconsmind-traffic-Light\"), \n\t\tarray(\"iconsmind-Traffic-Light2\" => \"iconsmind-Traffic-Light2\"), \n\t\tarray(\"iconsmind-Train\" => \"iconsmind-Train\"), \n\t\tarray(\"iconsmind-Train-2\" => \"iconsmind-Train-2\"), \n\t\tarray(\"iconsmind-Tram\" => \"iconsmind-Tram\"), \n\t\tarray(\"iconsmind-Truck\" => \"iconsmind-Truck\"), \n\t\tarray(\"iconsmind-Yacht\" => \"iconsmind-Yacht\"), \n\t\tarray(\"iconsmind-Double-Tap\" => \"iconsmind-Double-Tap\"), \n\t\tarray(\"iconsmind-Drag\" => \"iconsmind-Drag\"), \n\t\tarray(\"iconsmind-Drag-Down\" => \"iconsmind-Drag-Down\"), \n\t\tarray(\"iconsmind-Drag-Left\" => \"iconsmind-Drag-Left\"), \n\t\tarray(\"iconsmind-Drag-Right\" => \"iconsmind-Drag-Right\"), \n\t\tarray(\"iconsmind-Drag-Up\" => \"iconsmind-Drag-Up\"), \n\t\tarray(\"iconsmind-Finger-DragFourSides\" => \"iconsmind-Finger-DragFourSides\"), \n\t\tarray(\"iconsmind-Finger-DragTwoSides\" => \"iconsmind-Finger-DragTwoSides\"), \n\t\tarray(\"iconsmind-Five-Fingers\" => \"iconsmind-Five-Fingers\"), \n\t\tarray(\"iconsmind-Five-FingersDrag\" => \"iconsmind-Five-FingersDrag\"), \n\t\tarray(\"iconsmind-Five-FingersDrag2\" => \"iconsmind-Five-FingersDrag2\"), \n\t\tarray(\"iconsmind-Five-FingersTouch\" => \"iconsmind-Five-FingersTouch\"), \n\t\tarray(\"iconsmind-Flick\" => \"iconsmind-Flick\"), \n\t\tarray(\"iconsmind-Four-Fingers\" => \"iconsmind-Four-Fingers\"), \n\t\tarray(\"iconsmind-Four-FingersDrag\" => \"iconsmind-Four-FingersDrag\"), \n\t\tarray(\"iconsmind-Four-FingersDrag2\" => \"iconsmind-Four-FingersDrag2\"), \n\t\tarray(\"iconsmind-Four-FingersTouch\" => \"iconsmind-Four-FingersTouch\"), \n\t\tarray(\"iconsmind-Hand-Touch\" => \"iconsmind-Hand-Touch\"), \n\t\tarray(\"iconsmind-Hand-Touch2\" => \"iconsmind-Hand-Touch2\"), \n\t\tarray(\"iconsmind-Hand-TouchSmartphone\" => \"iconsmind-Hand-TouchSmartphone\"), \n\t\tarray(\"iconsmind-One-Finger\" => \"iconsmind-One-Finger\"), \n\t\tarray(\"iconsmind-One-FingerTouch\" => \"iconsmind-One-FingerTouch\"), \n\t\tarray(\"iconsmind-Pinch\" => \"iconsmind-Pinch\"), \n\t\tarray(\"iconsmind-Press\" => \"iconsmind-Press\"), \n\t\tarray(\"iconsmind-Rotate-Gesture\" => \"iconsmind-Rotate-Gesture\"), \n\t\tarray(\"iconsmind-Rotate-Gesture2\" => \"iconsmind-Rotate-Gesture2\"), \n\t\tarray(\"iconsmind-Rotate-Gesture3\" => \"iconsmind-Rotate-Gesture3\"), \n\t\tarray(\"iconsmind-Scroll\" => \"iconsmind-Scroll\"), \n\t\tarray(\"iconsmind-Scroll-Fast\" => \"iconsmind-Scroll-Fast\"), \n\t\tarray(\"iconsmind-Spread\" => \"iconsmind-Spread\"), \n\t\tarray(\"iconsmind-Star-Track\" => \"iconsmind-Star-Track\"), \n\t\tarray(\"iconsmind-Tap\" => \"iconsmind-Tap\"), \n\t\tarray(\"iconsmind-Three-Fingers\" => \"iconsmind-Three-Fingers\"), \n\t\tarray(\"iconsmind-Three-FingersDrag\" => \"iconsmind-Three-FingersDrag\"), \n\t\tarray(\"iconsmind-Three-FingersDrag2\" => \"iconsmind-Three-FingersDrag2\"), \n\t\tarray(\"iconsmind-Three-FingersTouch\" => \"iconsmind-Three-FingersTouch\"), \n\t\tarray(\"iconsmind-Thumb\" => \"iconsmind-Thumb\"), \n\t\tarray(\"iconsmind-Two-Fingers\" => \"iconsmind-Two-Fingers\"), \n\t\tarray(\"iconsmind-Two-FingersDrag\" => \"iconsmind-Two-FingersDrag\"), \n\t\tarray(\"iconsmind-Two-FingersDrag2\" => \"iconsmind-Two-FingersDrag2\"), \n\t\tarray(\"iconsmind-Two-FingersScroll\" => \"iconsmind-Two-FingersScroll\"), \n\t\tarray(\"iconsmind-Two-FingersTouch\" => \"iconsmind-Two-FingersTouch\"), \n\t\tarray(\"iconsmind-Zoom-Gesture\" => \"iconsmind-Zoom-Gesture\"), \n\t\tarray(\"iconsmind-Alarm-Clock\" => \"iconsmind-Alarm-Clock\"), \n\t\tarray(\"iconsmind-Alarm-Clock2\" => \"iconsmind-Alarm-Clock2\"), \n\t\tarray(\"iconsmind-Calendar-Clock\" => \"iconsmind-Calendar-Clock\"), \n\t\tarray(\"iconsmind-Clock\" => \"iconsmind-Clock\"), \n\t\tarray(\"iconsmind-Clock-2\" => \"iconsmind-Clock-2\"), \n\t\tarray(\"iconsmind-Clock-3\" => \"iconsmind-Clock-3\"), \n\t\tarray(\"iconsmind-Clock-4\" => \"iconsmind-Clock-4\"), \n\t\tarray(\"iconsmind-Clock-Back\" => \"iconsmind-Clock-Back\"), \n\t\tarray(\"iconsmind-Clock-Forward\" => \"iconsmind-Clock-Forward\"), \n\t\tarray(\"iconsmind-Hour\" => \"iconsmind-Hour\"), \n\t\tarray(\"iconsmind-Old-Clock\" => \"iconsmind-Old-Clock\"), \n\t\tarray(\"iconsmind-Over-Time\" => \"iconsmind-Over-Time\"), \n\t\tarray(\"iconsmind-Over-Time2\" => \"iconsmind-Over-Time2\"), \n\t\tarray(\"iconsmind-Sand-watch\" => \"iconsmind-Sand-watch\"), \n\t\tarray(\"iconsmind-Sand-watch2\" => \"iconsmind-Sand-watch2\"), \n\t\tarray(\"iconsmind-Stopwatch\" => \"iconsmind-Stopwatch\"), \n\t\tarray(\"iconsmind-Stopwatch-2\" => \"iconsmind-Stopwatch-2\"), \n\t\tarray(\"iconsmind-Time-Backup\" => \"iconsmind-Time-Backup\"), \n\t\tarray(\"iconsmind-Time-Fire\" => \"iconsmind-Time-Fire\"), \n\t\tarray(\"iconsmind-Time-Machine\" => \"iconsmind-Time-Machine\"), \n\t\tarray(\"iconsmind-Timer\" => \"iconsmind-Timer\"), \n\t\tarray(\"iconsmind-Watch\" => \"iconsmind-Watch\"), \n\t\tarray(\"iconsmind-Watch-2\" => \"iconsmind-Watch-2\"), \n\t\tarray(\"iconsmind-Watch-3\" => \"iconsmind-Watch-3\"), \n\t\tarray(\"iconsmind-A-Z\" => \"iconsmind-A-Z\"), \n\t\tarray(\"iconsmind-Bold-Text\" => \"iconsmind-Bold-Text\"), \n\t\tarray(\"iconsmind-Bulleted-List\" => \"iconsmind-Bulleted-List\"), \n\t\tarray(\"iconsmind-Font-Color\" => \"iconsmind-Font-Color\"), \n\t\tarray(\"iconsmind-Font-Name\" => \"iconsmind-Font-Name\"), \n\t\tarray(\"iconsmind-Font-Size\" => \"iconsmind-Font-Size\"), \n\t\tarray(\"iconsmind-Font-Style\" => \"iconsmind-Font-Style\"), \n\t\tarray(\"iconsmind-Font-StyleSubscript\" => \"iconsmind-Font-StyleSubscript\"), \n\t\tarray(\"iconsmind-Font-StyleSuperscript\" => \"iconsmind-Font-StyleSuperscript\"), \n\t\tarray(\"iconsmind-Function\" => \"iconsmind-Function\"), \n\t\tarray(\"iconsmind-Italic-Text\" => \"iconsmind-Italic-Text\"), \n\t\tarray(\"iconsmind-Line-SpacingText\" => \"iconsmind-Line-SpacingText\"), \n\t\tarray(\"iconsmind-Lowercase-Text\" => \"iconsmind-Lowercase-Text\"), \n\t\tarray(\"iconsmind-Normal-Text\" => \"iconsmind-Normal-Text\"), \n\t\tarray(\"iconsmind-Numbering-List\" => \"iconsmind-Numbering-List\"), \n\t\tarray(\"iconsmind-Strikethrough-Text\" => \"iconsmind-Strikethrough-Text\"), \n\t\tarray(\"iconsmind-Sum\" => \"iconsmind-Sum\"), \n\t\tarray(\"iconsmind-Text-Box\" => \"iconsmind-Text-Box\"), \n\t\tarray(\"iconsmind-Text-Effect\" => \"iconsmind-Text-Effect\"), \n\t\tarray(\"iconsmind-Text-HighlightColor\" => \"iconsmind-Text-HighlightColor\"), \n\t\tarray(\"iconsmind-Text-Paragraph\" => \"iconsmind-Text-Paragraph\"), \n\t\tarray(\"iconsmind-Under-LineText\" => \"iconsmind-Under-LineText\"), \n\t\tarray(\"iconsmind-Uppercase-Text\" => \"iconsmind-Uppercase-Text\"), \n\t\tarray(\"iconsmind-Wrap-Text\" => \"iconsmind-Wrap-Text\"), \n\t\tarray(\"iconsmind-Z-A\" => \"iconsmind-Z-A\"), \n\t\tarray(\"iconsmind-Aerobics\" => \"iconsmind-Aerobics\"), \n\t\tarray(\"iconsmind-Aerobics-2\" => \"iconsmind-Aerobics-2\"), \n\t\tarray(\"iconsmind-Aerobics-3\" => \"iconsmind-Aerobics-3\"), \n\t\tarray(\"iconsmind-Archery\" => \"iconsmind-Archery\"), \n\t\tarray(\"iconsmind-Archery-2\" => \"iconsmind-Archery-2\"), \n\t\tarray(\"iconsmind-Ballet-Shoes\" => \"iconsmind-Ballet-Shoes\"), \n\t\tarray(\"iconsmind-Baseball\" => \"iconsmind-Baseball\"), \n\t\tarray(\"iconsmind-Basket-Ball\" => \"iconsmind-Basket-Ball\"), \n\t\tarray(\"iconsmind-Bodybuilding\" => \"iconsmind-Bodybuilding\"), \n\t\tarray(\"iconsmind-Bowling\" => \"iconsmind-Bowling\"), \n\t\tarray(\"iconsmind-Bowling-2\" => \"iconsmind-Bowling-2\"), \n\t\tarray(\"iconsmind-Box\" => \"iconsmind-Box\"), \n\t\tarray(\"iconsmind-Chess\" => \"iconsmind-Chess\"), \n\t\tarray(\"iconsmind-Cricket\" => \"iconsmind-Cricket\"), \n\t\tarray(\"iconsmind-Dumbbell\" => \"iconsmind-Dumbbell\"), \n\t\tarray(\"iconsmind-Football\" => \"iconsmind-Football\"), \n\t\tarray(\"iconsmind-Football-2\" => \"iconsmind-Football-2\"), \n\t\tarray(\"iconsmind-Footprint\" => \"iconsmind-Footprint\"), \n\t\tarray(\"iconsmind-Footprint-2\" => \"iconsmind-Footprint-2\"), \n\t\tarray(\"iconsmind-Goggles\" => \"iconsmind-Goggles\"), \n\t\tarray(\"iconsmind-Golf\" => \"iconsmind-Golf\"), \n\t\tarray(\"iconsmind-Golf-2\" => \"iconsmind-Golf-2\"), \n\t\tarray(\"iconsmind-Gymnastics\" => \"iconsmind-Gymnastics\"), \n\t\tarray(\"iconsmind-Hokey\" => \"iconsmind-Hokey\"), \n\t\tarray(\"iconsmind-Jump-Rope\" => \"iconsmind-Jump-Rope\"), \n\t\tarray(\"iconsmind-Life-Jacket\" => \"iconsmind-Life-Jacket\"), \n\t\tarray(\"iconsmind-Medal\" => \"iconsmind-Medal\"), \n\t\tarray(\"iconsmind-Medal-2\" => \"iconsmind-Medal-2\"), \n\t\tarray(\"iconsmind-Medal-3\" => \"iconsmind-Medal-3\"), \n\t\tarray(\"iconsmind-Parasailing\" => \"iconsmind-Parasailing\"), \n\t\tarray(\"iconsmind-Pilates\" => \"iconsmind-Pilates\"), \n\t\tarray(\"iconsmind-Pilates-2\" => \"iconsmind-Pilates-2\"), \n\t\tarray(\"iconsmind-Pilates-3\" => \"iconsmind-Pilates-3\"), \n\t\tarray(\"iconsmind-Ping-Pong\" => \"iconsmind-Ping-Pong\"), \n\t\tarray(\"iconsmind-Rafting\" => \"iconsmind-Rafting\"), \n\t\tarray(\"iconsmind-Running\" => \"iconsmind-Running\"), \n\t\tarray(\"iconsmind-Running-Shoes\" => \"iconsmind-Running-Shoes\"), \n\t\tarray(\"iconsmind-Skate-Shoes\" => \"iconsmind-Skate-Shoes\"), \n\t\tarray(\"iconsmind-Ski\" => \"iconsmind-Ski\"), \n\t\tarray(\"iconsmind-Skydiving\" => \"iconsmind-Skydiving\"), \n\t\tarray(\"iconsmind-Snorkel\" => \"iconsmind-Snorkel\"), \n\t\tarray(\"iconsmind-Soccer-Ball\" => \"iconsmind-Soccer-Ball\"), \n\t\tarray(\"iconsmind-Soccer-Shoes\" => \"iconsmind-Soccer-Shoes\"), \n\t\tarray(\"iconsmind-Swimming\" => \"iconsmind-Swimming\"), \n\t\tarray(\"iconsmind-Tennis\" => \"iconsmind-Tennis\"), \n\t\tarray(\"iconsmind-Tennis-Ball\" => \"iconsmind-Tennis-Ball\"), \n\t\tarray(\"iconsmind-Trekking\" => \"iconsmind-Trekking\"), \n\t\tarray(\"iconsmind-Trophy\" => \"iconsmind-Trophy\"), \n\t\tarray(\"iconsmind-Trophy-2\" => \"iconsmind-Trophy-2\"), \n\t\tarray(\"iconsmind-Volleyball\" => \"iconsmind-Volleyball\"), \n\t\tarray(\"iconsmind-weight-Lift\" => \"iconsmind-weight-Lift\"), \n\t\tarray(\"iconsmind-Speach-Bubble\" => \"iconsmind-Speach-Bubble\"), \n\t\tarray(\"iconsmind-Speach-Bubble2\" => \"iconsmind-Speach-Bubble2\"), \n\t\tarray(\"iconsmind-Speach-Bubble3\" => \"iconsmind-Speach-Bubble3\"), \n\t\tarray(\"iconsmind-Speach-Bubble4\" => \"iconsmind-Speach-Bubble4\"), \n\t\tarray(\"iconsmind-Speach-Bubble5\" => \"iconsmind-Speach-Bubble5\"), \n\t\tarray(\"iconsmind-Speach-Bubble6\" => \"iconsmind-Speach-Bubble6\"), \n\t\tarray(\"iconsmind-Speach-Bubble7\" => \"iconsmind-Speach-Bubble7\"), \n\t\tarray(\"iconsmind-Speach-Bubble8\" => \"iconsmind-Speach-Bubble8\"), \n\t\tarray(\"iconsmind-Speach-Bubble9\" => \"iconsmind-Speach-Bubble9\"), \n\t\tarray(\"iconsmind-Speach-Bubble10\" => \"iconsmind-Speach-Bubble10\"), \n\t\tarray(\"iconsmind-Speach-Bubble11\" => \"iconsmind-Speach-Bubble11\"), \n\t\tarray(\"iconsmind-Speach-Bubble12\" => \"iconsmind-Speach-Bubble12\"), \n\t\tarray(\"iconsmind-Speach-Bubble13\" => \"iconsmind-Speach-Bubble13\"), \n\t\tarray(\"iconsmind-Speach-BubbleAsking\" => \"iconsmind-Speach-BubbleAsking\"), \n\t\tarray(\"iconsmind-Speach-BubbleComic\" => \"iconsmind-Speach-BubbleComic\"), \n\t\tarray(\"iconsmind-Speach-BubbleComic2\" => \"iconsmind-Speach-BubbleComic2\"), \n\t\tarray(\"iconsmind-Speach-BubbleComic3\" => \"iconsmind-Speach-BubbleComic3\"), \n\t\tarray(\"iconsmind-Speach-BubbleComic4\" => \"iconsmind-Speach-BubbleComic4\"), \n\t\tarray(\"iconsmind-Speach-BubbleDialog\" => \"iconsmind-Speach-BubbleDialog\"), \n\t\tarray(\"iconsmind-Speach-Bubbles\" => \"iconsmind-Speach-Bubbles\"), \n\t\tarray(\"iconsmind-Aim\" => \"iconsmind-Aim\"), \n\t\tarray(\"iconsmind-Ask\" => \"iconsmind-Ask\"), \n\t\tarray(\"iconsmind-Bebo\" => \"iconsmind-Bebo\"), \n\t\tarray(\"iconsmind-Behance\" => \"iconsmind-Behance\"), \n\t\tarray(\"iconsmind-Betvibes\" => \"iconsmind-Betvibes\"), \n\t\tarray(\"iconsmind-Bing\" => \"iconsmind-Bing\"), \n\t\tarray(\"iconsmind-Blinklist\" => \"iconsmind-Blinklist\"), \n\t\tarray(\"iconsmind-Blogger\" => \"iconsmind-Blogger\"), \n\t\tarray(\"iconsmind-Brightkite\" => \"iconsmind-Brightkite\"), \n\t\tarray(\"iconsmind-Delicious\" => \"iconsmind-Delicious\"), \n\t\tarray(\"iconsmind-Deviantart\" => \"iconsmind-Deviantart\"), \n\t\tarray(\"iconsmind-Digg\" => \"iconsmind-Digg\"), \n\t\tarray(\"iconsmind-Diigo\" => \"iconsmind-Diigo\"), \n\t\tarray(\"iconsmind-Doplr\" => \"iconsmind-Doplr\"), \n\t\tarray(\"iconsmind-Dribble\" => \"iconsmind-Dribble\"), \n\t\tarray(\"iconsmind-Email\" => \"iconsmind-Email\"), \n\t\tarray(\"iconsmind-Evernote\" => \"iconsmind-Evernote\"), \n\t\tarray(\"iconsmind-Facebook\" => \"iconsmind-Facebook\"), \n\t\tarray(\"iconsmind-Facebook-2\" => \"iconsmind-Facebook-2\"), \n\t\tarray(\"iconsmind-Feedburner\" => \"iconsmind-Feedburner\"), \n\t\tarray(\"iconsmind-Flickr\" => \"iconsmind-Flickr\"), \n\t\tarray(\"iconsmind-Formspring\" => \"iconsmind-Formspring\"), \n\t\tarray(\"iconsmind-Forsquare\" => \"iconsmind-Forsquare\"), \n\t\tarray(\"iconsmind-Friendfeed\" => \"iconsmind-Friendfeed\"), \n\t\tarray(\"iconsmind-Friendster\" => \"iconsmind-Friendster\"), \n\t\tarray(\"iconsmind-Furl\" => \"iconsmind-Furl\"), \n\t\tarray(\"iconsmind-Google\" => \"iconsmind-Google\"), \n\t\tarray(\"iconsmind-Google-Buzz\" => \"iconsmind-Google-Buzz\"), \n\t\tarray(\"iconsmind-Google-Plus\" => \"iconsmind-Google-Plus\"), \n\t\tarray(\"iconsmind-Gowalla\" => \"iconsmind-Gowalla\"), \n\t\tarray(\"iconsmind-ICQ\" => \"iconsmind-ICQ\"), \n\t\tarray(\"iconsmind-ImDB\" => \"iconsmind-ImDB\"), \n\t\tarray(\"iconsmind-Instagram\" => \"iconsmind-Instagram\"), \n\t\tarray(\"iconsmind-Last-FM\" => \"iconsmind-Last-FM\"), \n\t\tarray(\"iconsmind-Like\" => \"iconsmind-Like\"), \n\t\tarray(\"iconsmind-Like-2\" => \"iconsmind-Like-2\"), \n\t\tarray(\"iconsmind-Linkedin\" => \"iconsmind-Linkedin\"), \n\t\tarray(\"iconsmind-Linkedin-2\" => \"iconsmind-Linkedin-2\"), \n\t\tarray(\"iconsmind-Livejournal\" => \"iconsmind-Livejournal\"), \n\t\tarray(\"iconsmind-Metacafe\" => \"iconsmind-Metacafe\"), \n\t\tarray(\"iconsmind-Mixx\" => \"iconsmind-Mixx\"), \n\t\tarray(\"iconsmind-Myspace\" => \"iconsmind-Myspace\"), \n\t\tarray(\"iconsmind-Newsvine\" => \"iconsmind-Newsvine\"), \n\t\tarray(\"iconsmind-Orkut\" => \"iconsmind-Orkut\"), \n\t\tarray(\"iconsmind-Picasa\" => \"iconsmind-Picasa\"), \n\t\tarray(\"iconsmind-Pinterest\" => \"iconsmind-Pinterest\"), \n\t\tarray(\"iconsmind-Plaxo\" => \"iconsmind-Plaxo\"), \n\t\tarray(\"iconsmind-Plurk\" => \"iconsmind-Plurk\"), \n\t\tarray(\"iconsmind-Posterous\" => \"iconsmind-Posterous\"), \n\t\tarray(\"iconsmind-QIK\" => \"iconsmind-QIK\"), \n\t\tarray(\"iconsmind-Reddit\" => \"iconsmind-Reddit\"), \n\t\tarray(\"iconsmind-Reverbnation\" => \"iconsmind-Reverbnation\"), \n\t\tarray(\"iconsmind-RSS\" => \"iconsmind-RSS\"), \n\t\tarray(\"iconsmind-Sharethis\" => \"iconsmind-Sharethis\"), \n\t\tarray(\"iconsmind-Shoutwire\" => \"iconsmind-Shoutwire\"), \n\t\tarray(\"iconsmind-Skype\" => \"iconsmind-Skype\"), \n\t\tarray(\"iconsmind-Soundcloud\" => \"iconsmind-Soundcloud\"), \n\t\tarray(\"iconsmind-Spurl\" => \"iconsmind-Spurl\"), \n\t\tarray(\"iconsmind-Stumbleupon\" => \"iconsmind-Stumbleupon\"), \n\t\tarray(\"iconsmind-Technorati\" => \"iconsmind-Technorati\"), \n\t\tarray(\"iconsmind-Tumblr\" => \"iconsmind-Tumblr\"), \n\t\tarray(\"iconsmind-Twitter\" => \"iconsmind-Twitter\"), \n\t\tarray(\"iconsmind-Twitter-2\" => \"iconsmind-Twitter-2\"), \n\t\tarray(\"iconsmind-Unlike\" => \"iconsmind-Unlike\"), \n\t\tarray(\"iconsmind-Unlike-2\" => \"iconsmind-Unlike-2\"), \n\t\tarray(\"iconsmind-Ustream\" => \"iconsmind-Ustream\"), \n\t\tarray(\"iconsmind-Viddler\" => \"iconsmind-Viddler\"), \n\t\tarray(\"iconsmind-Vimeo\" => \"iconsmind-Vimeo\"), \n\t\tarray(\"iconsmind-Wordpress\" => \"iconsmind-Wordpress\"), \n\t\tarray(\"iconsmind-Xanga\" => \"iconsmind-Xanga\"), \n\t\tarray(\"iconsmind-Xing\" => \"iconsmind-Xing\"), \n\t\tarray(\"iconsmind-Yahoo\" => \"iconsmind-Yahoo\"), \n\t\tarray(\"iconsmind-Yahoo-Buzz\" => \"iconsmind-Yahoo-Buzz\"), \n\t\tarray(\"iconsmind-Yelp\" => \"iconsmind-Yelp\"), \n\t\tarray(\"iconsmind-Youtube\" => \"iconsmind-Youtube\"), \n\t\tarray(\"iconsmind-Zootool\" => \"iconsmind-Zootool\"), \n\t\tarray(\"iconsmind-Bisexual\" => \"iconsmind-Bisexual\"), \n\t\tarray(\"iconsmind-Cancer2\" => \"iconsmind-Cancer2\"), \n\t\tarray(\"iconsmind-Couple-Sign\" => \"iconsmind-Couple-Sign\"), \n\t\tarray(\"iconsmind-David-Star\" => \"iconsmind-David-Star\"), \n\t\tarray(\"iconsmind-Family-Sign\" => \"iconsmind-Family-Sign\"), \n\t\tarray(\"iconsmind-Female-2\" => \"iconsmind-Female-2\"), \n\t\tarray(\"iconsmind-Gey\" => \"iconsmind-Gey\"), \n\t\tarray(\"iconsmind-Heart\" => \"iconsmind-Heart\"), \n\t\tarray(\"iconsmind-Homosexual\" => \"iconsmind-Homosexual\"), \n\t\tarray(\"iconsmind-Inifity\" => \"iconsmind-Inifity\"), \n\t\tarray(\"iconsmind-Lesbian\" => \"iconsmind-Lesbian\"), \n\t\tarray(\"iconsmind-Lesbians\" => \"iconsmind-Lesbians\"), \n\t\tarray(\"iconsmind-Love\" => \"iconsmind-Love\"), \n\t\tarray(\"iconsmind-Male-2\" => \"iconsmind-Male-2\"), \n\t\tarray(\"iconsmind-Men\" => \"iconsmind-Men\"), \n\t\tarray(\"iconsmind-No-Smoking\" => \"iconsmind-No-Smoking\"), \n\t\tarray(\"iconsmind-Paw\" => \"iconsmind-Paw\"), \n\t\tarray(\"iconsmind-Quotes\" => \"iconsmind-Quotes\"), \n\t\tarray(\"iconsmind-Quotes-2\" => \"iconsmind-Quotes-2\"), \n\t\tarray(\"iconsmind-Redirect\" => \"iconsmind-Redirect\"), \n\t\tarray(\"iconsmind-Retweet\" => \"iconsmind-Retweet\"), \n\t\tarray(\"iconsmind-Ribbon\" => \"iconsmind-Ribbon\"), \n\t\tarray(\"iconsmind-Ribbon-2\" => \"iconsmind-Ribbon-2\"), \n\t\tarray(\"iconsmind-Ribbon-3\" => \"iconsmind-Ribbon-3\"), \n\t\tarray(\"iconsmind-Sexual\" => \"iconsmind-Sexual\"), \n\t\tarray(\"iconsmind-Smoking-Area\" => \"iconsmind-Smoking-Area\"), \n\t\tarray(\"iconsmind-Trace\" => \"iconsmind-Trace\"), \n\t\tarray(\"iconsmind-Venn-Diagram\" => \"iconsmind-Venn-Diagram\"), \n\t\tarray(\"iconsmind-Wheelchair\" => \"iconsmind-Wheelchair\"), \n\t\tarray(\"iconsmind-Women\" => \"iconsmind-Women\"), \n\t\tarray(\"iconsmind-Ying-Yang\" => \"iconsmind-Ying-Yang\"), \n\t\tarray(\"iconsmind-Add-Bag\" => \"iconsmind-Add-Bag\"), \n\t\tarray(\"iconsmind-Add-Basket\" => \"iconsmind-Add-Basket\"), \n\t\tarray(\"iconsmind-Add-Cart\" => \"iconsmind-Add-Cart\"), \n\t\tarray(\"iconsmind-Bag-Coins\" => \"iconsmind-Bag-Coins\"), \n\t\tarray(\"iconsmind-Bag-Items\" => \"iconsmind-Bag-Items\"), \n\t\tarray(\"iconsmind-Bag-Quantity\" => \"iconsmind-Bag-Quantity\"), \n\t\tarray(\"iconsmind-Bar-Code\" => \"iconsmind-Bar-Code\"), \n\t\tarray(\"iconsmind-Basket-Coins\" => \"iconsmind-Basket-Coins\"), \n\t\tarray(\"iconsmind-Basket-Items\" => \"iconsmind-Basket-Items\"), \n\t\tarray(\"iconsmind-Basket-Quantity\" => \"iconsmind-Basket-Quantity\"), \n\t\tarray(\"iconsmind-Bitcoin\" => \"iconsmind-Bitcoin\"), \n\t\tarray(\"iconsmind-Car-Coins\" => \"iconsmind-Car-Coins\"), \n\t\tarray(\"iconsmind-Car-Items\" => \"iconsmind-Car-Items\"), \n\t\tarray(\"iconsmind-CartQuantity\" => \"iconsmind-CartQuantity\"), \n\t\tarray(\"iconsmind-Cash-Register\" => \"iconsmind-Cash-Register\"), \n\t\tarray(\"iconsmind-Cash-register2\" => \"iconsmind-Cash-register2\"), \n\t\tarray(\"iconsmind-Checkout\" => \"iconsmind-Checkout\"), \n\t\tarray(\"iconsmind-Checkout-Bag\" => \"iconsmind-Checkout-Bag\"), \n\t\tarray(\"iconsmind-Checkout-Basket\" => \"iconsmind-Checkout-Basket\"), \n\t\tarray(\"iconsmind-Full-Basket\" => \"iconsmind-Full-Basket\"), \n\t\tarray(\"iconsmind-Full-Cart\" => \"iconsmind-Full-Cart\"), \n\t\tarray(\"iconsmind-Fyll-Bag\" => \"iconsmind-Fyll-Bag\"), \n\t\tarray(\"iconsmind-Home\" => \"iconsmind-Home\"), \n\t\tarray(\"iconsmind-Password-2shopping\" => \"iconsmind-Password-2shopping\"), \n\t\tarray(\"iconsmind-Password-shopping\" => \"iconsmind-Password-shopping\"), \n\t\tarray(\"iconsmind-QR-Code\" => \"iconsmind-QR-Code\"), \n\t\tarray(\"iconsmind-Receipt\" => \"iconsmind-Receipt\"), \n\t\tarray(\"iconsmind-Receipt-2\" => \"iconsmind-Receipt-2\"), \n\t\tarray(\"iconsmind-Receipt-3\" => \"iconsmind-Receipt-3\"), \n\t\tarray(\"iconsmind-Receipt-4\" => \"iconsmind-Receipt-4\"), \n\t\tarray(\"iconsmind-Remove-Bag\" => \"iconsmind-Remove-Bag\"), \n\t\tarray(\"iconsmind-Remove-Basket\" => \"iconsmind-Remove-Basket\"), \n\t\tarray(\"iconsmind-Remove-Cart\" => \"iconsmind-Remove-Cart\"), \n\t\tarray(\"iconsmind-Shop\" => \"iconsmind-Shop\"), \n\t\tarray(\"iconsmind-Shop-2\" => \"iconsmind-Shop-2\"), \n\t\tarray(\"iconsmind-Shop-3\" => \"iconsmind-Shop-3\"), \n\t\tarray(\"iconsmind-Shop-4\" => \"iconsmind-Shop-4\"), \n\t\tarray(\"iconsmind-Shopping-Bag\" => \"iconsmind-Shopping-Bag\"), \n\t\tarray(\"iconsmind-Shopping-Basket\" => \"iconsmind-Shopping-Basket\"), \n\t\tarray(\"iconsmind-Shopping-Cart\" => \"iconsmind-Shopping-Cart\"), \n\t\tarray(\"iconsmind-Tag-2\" => \"iconsmind-Tag-2\"), \n\t\tarray(\"iconsmind-Tag-3\" => \"iconsmind-Tag-3\"), \n\t\tarray(\"iconsmind-Tag-4\" => \"iconsmind-Tag-4\"), \n\t\tarray(\"iconsmind-Tag-5\" => \"iconsmind-Tag-5\"), \n\t\tarray(\"iconsmind-This-SideUp\" => \"iconsmind-This-SideUp\"), \n\t\tarray(\"iconsmind-Broke-Link2\" => \"iconsmind-Broke-Link2\"), \n\t\tarray(\"iconsmind-Coding\" => \"iconsmind-Coding\"), \n\t\tarray(\"iconsmind-Consulting\" => \"iconsmind-Consulting\"), \n\t\tarray(\"iconsmind-Copyright\" => \"iconsmind-Copyright\"), \n\t\tarray(\"iconsmind-Idea-2\" => \"iconsmind-Idea-2\"), \n\t\tarray(\"iconsmind-Idea-3\" => \"iconsmind-Idea-3\"), \n\t\tarray(\"iconsmind-Idea-4\" => \"iconsmind-Idea-4\"), \n\t\tarray(\"iconsmind-Idea-5\" => \"iconsmind-Idea-5\"), \n\t\tarray(\"iconsmind-Internet\" => \"iconsmind-Internet\"), \n\t\tarray(\"iconsmind-Internet-2\" => \"iconsmind-Internet-2\"), \n\t\tarray(\"iconsmind-Link-2\" => \"iconsmind-Link-2\"), \n\t\tarray(\"iconsmind-Management\" => \"iconsmind-Management\"), \n\t\tarray(\"iconsmind-Monitor-Analytics\" => \"iconsmind-Monitor-Analytics\"), \n\t\tarray(\"iconsmind-Monitoring\" => \"iconsmind-Monitoring\"), \n\t\tarray(\"iconsmind-Optimization\" => \"iconsmind-Optimization\"), \n\t\tarray(\"iconsmind-Search-People\" => \"iconsmind-Search-People\"), \n\t\tarray(\"iconsmind-Tag\" => \"iconsmind-Tag\"), \n\t\tarray(\"iconsmind-Target\" => \"iconsmind-Target\"), \n\t\tarray(\"iconsmind-Target-Market\" => \"iconsmind-Target-Market\"), \n\t\tarray(\"iconsmind-Testimonal\" => \"iconsmind-Testimonal\"), \n\t\tarray(\"iconsmind-Computer-Secure\" => \"iconsmind-Computer-Secure\"), \n\t\tarray(\"iconsmind-Eye-Scan\" => \"iconsmind-Eye-Scan\"), \n\t\tarray(\"iconsmind-Finger-Print\" => \"iconsmind-Finger-Print\"), \n\t\tarray(\"iconsmind-Firewall\" => \"iconsmind-Firewall\"), \n\t\tarray(\"iconsmind-Key-Lock\" => \"iconsmind-Key-Lock\"), \n\t\tarray(\"iconsmind-Laptop-Secure\" => \"iconsmind-Laptop-Secure\"), \n\t\tarray(\"iconsmind-Layer-1532\" => \"iconsmind-Layer-1532\"), \n\t\tarray(\"iconsmind-Lock\" => \"iconsmind-Lock\"), \n\t\tarray(\"iconsmind-Lock-2\" => \"iconsmind-Lock-2\"), \n\t\tarray(\"iconsmind-Lock-3\" => \"iconsmind-Lock-3\"), \n\t\tarray(\"iconsmind-Password\" => \"iconsmind-Password\"), \n\t\tarray(\"iconsmind-Password-Field\" => \"iconsmind-Password-Field\"), \n\t\tarray(\"iconsmind-Police\" => \"iconsmind-Police\"), \n\t\tarray(\"iconsmind-Safe-Box\" => \"iconsmind-Safe-Box\"), \n\t\tarray(\"iconsmind-Security-Block\" => \"iconsmind-Security-Block\"), \n\t\tarray(\"iconsmind-Security-Bug\" => \"iconsmind-Security-Bug\"), \n\t\tarray(\"iconsmind-Security-Camera\" => \"iconsmind-Security-Camera\"), \n\t\tarray(\"iconsmind-Security-Check\" => \"iconsmind-Security-Check\"), \n\t\tarray(\"iconsmind-Security-Settings\" => \"iconsmind-Security-Settings\"), \n\t\tarray(\"iconsmind-Securiy-Remove\" => \"iconsmind-Securiy-Remove\"), \n\t\tarray(\"iconsmind-Shield\" => \"iconsmind-Shield\"), \n\t\tarray(\"iconsmind-Smartphone-Secure\" => \"iconsmind-Smartphone-Secure\"), \n\t\tarray(\"iconsmind-SSL\" => \"iconsmind-SSL\"), \n\t\tarray(\"iconsmind-Tablet-Secure\" => \"iconsmind-Tablet-Secure\"), \n\t\tarray(\"iconsmind-Type-Pass\" => \"iconsmind-Type-Pass\"), \n\t\tarray(\"iconsmind-Unlock\" => \"iconsmind-Unlock\"), \n\t\tarray(\"iconsmind-Unlock-2\" => \"iconsmind-Unlock-2\"), \n\t\tarray(\"iconsmind-Unlock-3\" => \"iconsmind-Unlock-3\"), \n\t\tarray(\"iconsmind-Ambulance\" => \"iconsmind-Ambulance\"), \n\t\tarray(\"iconsmind-Astronaut\" => \"iconsmind-Astronaut\"), \n\t\tarray(\"iconsmind-Atom\" => \"iconsmind-Atom\"), \n\t\tarray(\"iconsmind-Bacteria\" => \"iconsmind-Bacteria\"), \n\t\tarray(\"iconsmind-Band-Aid\" => \"iconsmind-Band-Aid\"), \n\t\tarray(\"iconsmind-Bio-Hazard\" => \"iconsmind-Bio-Hazard\"), \n\t\tarray(\"iconsmind-Biotech\" => \"iconsmind-Biotech\"), \n\t\tarray(\"iconsmind-Brain\" => \"iconsmind-Brain\"), \n\t\tarray(\"iconsmind-Chemical\" => \"iconsmind-Chemical\"), \n\t\tarray(\"iconsmind-Chemical-2\" => \"iconsmind-Chemical-2\"), \n\t\tarray(\"iconsmind-Chemical-3\" => \"iconsmind-Chemical-3\"), \n\t\tarray(\"iconsmind-Chemical-4\" => \"iconsmind-Chemical-4\"), \n\t\tarray(\"iconsmind-Chemical-5\" => \"iconsmind-Chemical-5\"), \n\t\tarray(\"iconsmind-Clinic\" => \"iconsmind-Clinic\"), \n\t\tarray(\"iconsmind-Cube-Molecule\" => \"iconsmind-Cube-Molecule\"), \n\t\tarray(\"iconsmind-Cube-Molecule2\" => \"iconsmind-Cube-Molecule2\"), \n\t\tarray(\"iconsmind-Danger\" => \"iconsmind-Danger\"), \n\t\tarray(\"iconsmind-Danger-2\" => \"iconsmind-Danger-2\"), \n\t\tarray(\"iconsmind-DNA\" => \"iconsmind-DNA\"), \n\t\tarray(\"iconsmind-DNA-2\" => \"iconsmind-DNA-2\"), \n\t\tarray(\"iconsmind-DNA-Helix\" => \"iconsmind-DNA-Helix\"), \n\t\tarray(\"iconsmind-First-Aid\" => \"iconsmind-First-Aid\"), \n\t\tarray(\"iconsmind-Flask\" => \"iconsmind-Flask\"), \n\t\tarray(\"iconsmind-Flask-2\" => \"iconsmind-Flask-2\"), \n\t\tarray(\"iconsmind-Helix-2\" => \"iconsmind-Helix-2\"), \n\t\tarray(\"iconsmind-Hospital\" => \"iconsmind-Hospital\"), \n\t\tarray(\"iconsmind-Hurt\" => \"iconsmind-Hurt\"), \n\t\tarray(\"iconsmind-Medical-Sign\" => \"iconsmind-Medical-Sign\"), \n\t\tarray(\"iconsmind-Medicine\" => \"iconsmind-Medicine\"), \n\t\tarray(\"iconsmind-Medicine-2\" => \"iconsmind-Medicine-2\"), \n\t\tarray(\"iconsmind-Medicine-3\" => \"iconsmind-Medicine-3\"), \n\t\tarray(\"iconsmind-Microscope\" => \"iconsmind-Microscope\"), \n\t\tarray(\"iconsmind-Neutron\" => \"iconsmind-Neutron\"), \n\t\tarray(\"iconsmind-Nuclear\" => \"iconsmind-Nuclear\"), \n\t\tarray(\"iconsmind-Physics\" => \"iconsmind-Physics\"), \n\t\tarray(\"iconsmind-Plasmid\" => \"iconsmind-Plasmid\"), \n\t\tarray(\"iconsmind-Plaster\" => \"iconsmind-Plaster\"), \n\t\tarray(\"iconsmind-Pulse\" => \"iconsmind-Pulse\"), \n\t\tarray(\"iconsmind-Radioactive\" => \"iconsmind-Radioactive\"), \n\t\tarray(\"iconsmind-Safety-PinClose\" => \"iconsmind-Safety-PinClose\"), \n\t\tarray(\"iconsmind-Safety-PinOpen\" => \"iconsmind-Safety-PinOpen\"), \n\t\tarray(\"iconsmind-Spermium\" => \"iconsmind-Spermium\"), \n\t\tarray(\"iconsmind-Stethoscope\" => \"iconsmind-Stethoscope\"), \n\t\tarray(\"iconsmind-Temperature2\" => \"iconsmind-Temperature2\"), \n\t\tarray(\"iconsmind-Test-Tube\" => \"iconsmind-Test-Tube\"), \n\t\tarray(\"iconsmind-Test-Tube2\" => \"iconsmind-Test-Tube2\"), \n\t\tarray(\"iconsmind-Virus\" => \"iconsmind-Virus\"), \n\t\tarray(\"iconsmind-Virus-2\" => \"iconsmind-Virus-2\"), \n\t\tarray(\"iconsmind-Virus-3\" => \"iconsmind-Virus-3\"), \n\t\tarray(\"iconsmind-X-ray\" => \"iconsmind-X-ray\"), \n\t\tarray(\"iconsmind-Auto-Flash\" => \"iconsmind-Auto-Flash\"), \n\t\tarray(\"iconsmind-Camera\" => \"iconsmind-Camera\"), \n\t\tarray(\"iconsmind-Camera-2\" => \"iconsmind-Camera-2\"), \n\t\tarray(\"iconsmind-Camera-3\" => \"iconsmind-Camera-3\"), \n\t\tarray(\"iconsmind-Camera-4\" => \"iconsmind-Camera-4\"), \n\t\tarray(\"iconsmind-Camera-5\" => \"iconsmind-Camera-5\"), \n\t\tarray(\"iconsmind-Camera-Back\" => \"iconsmind-Camera-Back\"), \n\t\tarray(\"iconsmind-Crop\" => \"iconsmind-Crop\"), \n\t\tarray(\"iconsmind-Daylight\" => \"iconsmind-Daylight\"), \n\t\tarray(\"iconsmind-Edit\" => \"iconsmind-Edit\"), \n\t\tarray(\"iconsmind-Eye\" => \"iconsmind-Eye\"), \n\t\tarray(\"iconsmind-Film2\" => \"iconsmind-Film2\"), \n\t\tarray(\"iconsmind-Film-Cartridge\" => \"iconsmind-Film-Cartridge\"), \n\t\tarray(\"iconsmind-Filter\" => \"iconsmind-Filter\"), \n\t\tarray(\"iconsmind-Flash\" => \"iconsmind-Flash\"), \n\t\tarray(\"iconsmind-Flash-2\" => \"iconsmind-Flash-2\"), \n\t\tarray(\"iconsmind-Fluorescent\" => \"iconsmind-Fluorescent\"), \n\t\tarray(\"iconsmind-Gopro\" => \"iconsmind-Gopro\"), \n\t\tarray(\"iconsmind-Landscape\" => \"iconsmind-Landscape\"), \n\t\tarray(\"iconsmind-Len\" => \"iconsmind-Len\"), \n\t\tarray(\"iconsmind-Len-2\" => \"iconsmind-Len-2\"), \n\t\tarray(\"iconsmind-Len-3\" => \"iconsmind-Len-3\"), \n\t\tarray(\"iconsmind-Macro\" => \"iconsmind-Macro\"), \n\t\tarray(\"iconsmind-Memory-Card\" => \"iconsmind-Memory-Card\"), \n\t\tarray(\"iconsmind-Memory-Card2\" => \"iconsmind-Memory-Card2\"), \n\t\tarray(\"iconsmind-Memory-Card3\" => \"iconsmind-Memory-Card3\"), \n\t\tarray(\"iconsmind-No-Flash\" => \"iconsmind-No-Flash\"), \n\t\tarray(\"iconsmind-Panorama\" => \"iconsmind-Panorama\"), \n\t\tarray(\"iconsmind-Photo\" => \"iconsmind-Photo\"), \n\t\tarray(\"iconsmind-Photo-2\" => \"iconsmind-Photo-2\"), \n\t\tarray(\"iconsmind-Photo-3\" => \"iconsmind-Photo-3\"), \n\t\tarray(\"iconsmind-Photo-Album\" => \"iconsmind-Photo-Album\"), \n\t\tarray(\"iconsmind-Photo-Album2\" => \"iconsmind-Photo-Album2\"), \n\t\tarray(\"iconsmind-Photo-Album3\" => \"iconsmind-Photo-Album3\"), \n\t\tarray(\"iconsmind-Photos\" => \"iconsmind-Photos\"), \n\t\tarray(\"iconsmind-Portrait\" => \"iconsmind-Portrait\"), \n\t\tarray(\"iconsmind-Retouching\" => \"iconsmind-Retouching\"), \n\t\tarray(\"iconsmind-Retro-Camera\" => \"iconsmind-Retro-Camera\"), \n\t\tarray(\"iconsmind-secound\" => \"iconsmind-secound\"), \n\t\tarray(\"iconsmind-secound2\" => \"iconsmind-secound2\"), \n\t\tarray(\"iconsmind-Selfie\" => \"iconsmind-Selfie\"), \n\t\tarray(\"iconsmind-Shutter\" => \"iconsmind-Shutter\"), \n\t\tarray(\"iconsmind-Signal\" => \"iconsmind-Signal\"), \n\t\tarray(\"iconsmind-Snow2\" => \"iconsmind-Snow2\"), \n\t\tarray(\"iconsmind-Sport-Mode\" => \"iconsmind-Sport-Mode\"), \n\t\tarray(\"iconsmind-Studio-Flash\" => \"iconsmind-Studio-Flash\"), \n\t\tarray(\"iconsmind-Studio-Lightbox\" => \"iconsmind-Studio-Lightbox\"), \n\t\tarray(\"iconsmind-Timer2\" => \"iconsmind-Timer2\"), \n\t\tarray(\"iconsmind-Tripod-2\" => \"iconsmind-Tripod-2\"), \n\t\tarray(\"iconsmind-Tripod-withCamera\" => \"iconsmind-Tripod-withCamera\"), \n\t\tarray(\"iconsmind-Tripod-withGopro\" => \"iconsmind-Tripod-withGopro\"), \n\t\tarray(\"iconsmind-Add-User\" => \"iconsmind-Add-User\"), \n\t\tarray(\"iconsmind-Add-UserStar\" => \"iconsmind-Add-UserStar\"), \n\t\tarray(\"iconsmind-Administrator\" => \"iconsmind-Administrator\"), \n\t\tarray(\"iconsmind-Alien\" => \"iconsmind-Alien\"), \n\t\tarray(\"iconsmind-Alien-2\" => \"iconsmind-Alien-2\"), \n\t\tarray(\"iconsmind-Assistant\" => \"iconsmind-Assistant\"), \n\t\tarray(\"iconsmind-Baby\" => \"iconsmind-Baby\"), \n\t\tarray(\"iconsmind-Baby-Cry\" => \"iconsmind-Baby-Cry\"), \n\t\tarray(\"iconsmind-Boy\" => \"iconsmind-Boy\"), \n\t\tarray(\"iconsmind-Business-Man\" => \"iconsmind-Business-Man\"), \n\t\tarray(\"iconsmind-Business-ManWoman\" => \"iconsmind-Business-ManWoman\"), \n\t\tarray(\"iconsmind-Business-Mens\" => \"iconsmind-Business-Mens\"), \n\t\tarray(\"iconsmind-Business-Woman\" => \"iconsmind-Business-Woman\"), \n\t\tarray(\"iconsmind-Checked-User\" => \"iconsmind-Checked-User\"), \n\t\tarray(\"iconsmind-Chef\" => \"iconsmind-Chef\"), \n\t\tarray(\"iconsmind-Conference\" => \"iconsmind-Conference\"), \n\t\tarray(\"iconsmind-Cool-Guy\" => \"iconsmind-Cool-Guy\"), \n\t\tarray(\"iconsmind-Criminal\" => \"iconsmind-Criminal\"), \n\t\tarray(\"iconsmind-Dj\" => \"iconsmind-Dj\"), \n\t\tarray(\"iconsmind-Doctor\" => \"iconsmind-Doctor\"), \n\t\tarray(\"iconsmind-Engineering\" => \"iconsmind-Engineering\"), \n\t\tarray(\"iconsmind-Farmer\" => \"iconsmind-Farmer\"), \n\t\tarray(\"iconsmind-Female\" => \"iconsmind-Female\"), \n\t\tarray(\"iconsmind-Female-22\" => \"iconsmind-Female-22\"), \n\t\tarray(\"iconsmind-Find-User\" => \"iconsmind-Find-User\"), \n\t\tarray(\"iconsmind-Geek\" => \"iconsmind-Geek\"), \n\t\tarray(\"iconsmind-Genius\" => \"iconsmind-Genius\"), \n\t\tarray(\"iconsmind-Girl\" => \"iconsmind-Girl\"), \n\t\tarray(\"iconsmind-Headphone\" => \"iconsmind-Headphone\"), \n\t\tarray(\"iconsmind-Headset\" => \"iconsmind-Headset\"), \n\t\tarray(\"iconsmind-ID-2\" => \"iconsmind-ID-2\"), \n\t\tarray(\"iconsmind-ID-3\" => \"iconsmind-ID-3\"), \n\t\tarray(\"iconsmind-ID-Card\" => \"iconsmind-ID-Card\"), \n\t\tarray(\"iconsmind-King-2\" => \"iconsmind-King-2\"), \n\t\tarray(\"iconsmind-Lock-User\" => \"iconsmind-Lock-User\"), \n\t\tarray(\"iconsmind-Love-User\" => \"iconsmind-Love-User\"), \n\t\tarray(\"iconsmind-Male\" => \"iconsmind-Male\"), \n\t\tarray(\"iconsmind-Male-22\" => \"iconsmind-Male-22\"), \n\t\tarray(\"iconsmind-MaleFemale\" => \"iconsmind-MaleFemale\"), \n\t\tarray(\"iconsmind-Man-Sign\" => \"iconsmind-Man-Sign\"), \n\t\tarray(\"iconsmind-Mens\" => \"iconsmind-Mens\"), \n\t\tarray(\"iconsmind-Network\" => \"iconsmind-Network\"), \n\t\tarray(\"iconsmind-Nurse\" => \"iconsmind-Nurse\"), \n\t\tarray(\"iconsmind-Pac-Man\" => \"iconsmind-Pac-Man\"), \n\t\tarray(\"iconsmind-Pilot\" => \"iconsmind-Pilot\"), \n\t\tarray(\"iconsmind-Police-Man\" => \"iconsmind-Police-Man\"), \n\t\tarray(\"iconsmind-Police-Woman\" => \"iconsmind-Police-Woman\"), \n\t\tarray(\"iconsmind-Professor\" => \"iconsmind-Professor\"), \n\t\tarray(\"iconsmind-Punker\" => \"iconsmind-Punker\"), \n\t\tarray(\"iconsmind-Queen-2\" => \"iconsmind-Queen-2\"), \n\t\tarray(\"iconsmind-Remove-User\" => \"iconsmind-Remove-User\"), \n\t\tarray(\"iconsmind-Robot\" => \"iconsmind-Robot\"), \n\t\tarray(\"iconsmind-Speak\" => \"iconsmind-Speak\"), \n\t\tarray(\"iconsmind-Speak-2\" => \"iconsmind-Speak-2\"), \n\t\tarray(\"iconsmind-Spy\" => \"iconsmind-Spy\"), \n\t\tarray(\"iconsmind-Student-Female\" => \"iconsmind-Student-Female\"), \n\t\tarray(\"iconsmind-Student-Male\" => \"iconsmind-Student-Male\"), \n\t\tarray(\"iconsmind-Student-MaleFemale\" => \"iconsmind-Student-MaleFemale\"), \n\t\tarray(\"iconsmind-Students\" => \"iconsmind-Students\"), \n\t\tarray(\"iconsmind-Superman\" => \"iconsmind-Superman\"), \n\t\tarray(\"iconsmind-Talk-Man\" => \"iconsmind-Talk-Man\"), \n\t\tarray(\"iconsmind-Teacher\" => \"iconsmind-Teacher\"), \n\t\tarray(\"iconsmind-Waiter\" => \"iconsmind-Waiter\"), \n\t\tarray(\"iconsmind-WomanMan\" => \"iconsmind-WomanMan\"), \n\t\tarray(\"iconsmind-Woman-Sign\" => \"iconsmind-Woman-Sign\"), \n\t\tarray(\"iconsmind-Wonder-Woman\" => \"iconsmind-Wonder-Woman\"), \n\t\tarray(\"iconsmind-Worker\" => \"iconsmind-Worker\"), \n\t\tarray(\"iconsmind-Anchor\" => \"iconsmind-Anchor\"), \n\t\tarray(\"iconsmind-Army-Key\" => \"iconsmind-Army-Key\"), \n\t\tarray(\"iconsmind-Balloon\" => \"iconsmind-Balloon\"), \n\t\tarray(\"iconsmind-Barricade\" => \"iconsmind-Barricade\"), \n\t\tarray(\"iconsmind-Batman-Mask\" => \"iconsmind-Batman-Mask\"), \n\t\tarray(\"iconsmind-Binocular\" => \"iconsmind-Binocular\"), \n\t\tarray(\"iconsmind-Boom\" => \"iconsmind-Boom\"), \n\t\tarray(\"iconsmind-Bucket\" => \"iconsmind-Bucket\"), \n\t\tarray(\"iconsmind-Button\" => \"iconsmind-Button\"), \n\t\tarray(\"iconsmind-Cannon\" => \"iconsmind-Cannon\"), \n\t\tarray(\"iconsmind-Chacked-Flag\" => \"iconsmind-Chacked-Flag\"), \n\t\tarray(\"iconsmind-Chair\" => \"iconsmind-Chair\"), \n\t\tarray(\"iconsmind-Coffee-Machine\" => \"iconsmind-Coffee-Machine\"), \n\t\tarray(\"iconsmind-Crown\" => \"iconsmind-Crown\"), \n\t\tarray(\"iconsmind-Crown-2\" => \"iconsmind-Crown-2\"), \n\t\tarray(\"iconsmind-Dice\" => \"iconsmind-Dice\"), \n\t\tarray(\"iconsmind-Dice-2\" => \"iconsmind-Dice-2\"), \n\t\tarray(\"iconsmind-Domino\" => \"iconsmind-Domino\"), \n\t\tarray(\"iconsmind-Door-Hanger\" => \"iconsmind-Door-Hanger\"), \n\t\tarray(\"iconsmind-Drill\" => \"iconsmind-Drill\"), \n\t\tarray(\"iconsmind-Feather\" => \"iconsmind-Feather\"), \n\t\tarray(\"iconsmind-Fire-Hydrant\" => \"iconsmind-Fire-Hydrant\"), \n\t\tarray(\"iconsmind-Flag\" => \"iconsmind-Flag\"), \n\t\tarray(\"iconsmind-Flag-2\" => \"iconsmind-Flag-2\"), \n\t\tarray(\"iconsmind-Flashlight\" => \"iconsmind-Flashlight\"), \n\t\tarray(\"iconsmind-Footprint2\" => \"iconsmind-Footprint2\"), \n\t\tarray(\"iconsmind-Gas-Pump\" => \"iconsmind-Gas-Pump\"), \n\t\tarray(\"iconsmind-Gift-Box\" => \"iconsmind-Gift-Box\"), \n\t\tarray(\"iconsmind-Gun\" => \"iconsmind-Gun\"), \n\t\tarray(\"iconsmind-Gun-2\" => \"iconsmind-Gun-2\"), \n\t\tarray(\"iconsmind-Gun-3\" => \"iconsmind-Gun-3\"), \n\t\tarray(\"iconsmind-Hammer\" => \"iconsmind-Hammer\"), \n\t\tarray(\"iconsmind-Identification-Badge\" => \"iconsmind-Identification-Badge\"), \n\t\tarray(\"iconsmind-Key\" => \"iconsmind-Key\"), \n\t\tarray(\"iconsmind-Key-2\" => \"iconsmind-Key-2\"), \n\t\tarray(\"iconsmind-Key-3\" => \"iconsmind-Key-3\"), \n\t\tarray(\"iconsmind-Lamp\" => \"iconsmind-Lamp\"), \n\t\tarray(\"iconsmind-Lego\" => \"iconsmind-Lego\"), \n\t\tarray(\"iconsmind-Life-Safer\" => \"iconsmind-Life-Safer\"), \n\t\tarray(\"iconsmind-Light-Bulb\" => \"iconsmind-Light-Bulb\"), \n\t\tarray(\"iconsmind-Light-Bulb2\" => \"iconsmind-Light-Bulb2\"), \n\t\tarray(\"iconsmind-Luggafe-Front\" => \"iconsmind-Luggafe-Front\"), \n\t\tarray(\"iconsmind-Luggage-2\" => \"iconsmind-Luggage-2\"), \n\t\tarray(\"iconsmind-Magic-Wand\" => \"iconsmind-Magic-Wand\"), \n\t\tarray(\"iconsmind-Magnet\" => \"iconsmind-Magnet\"), \n\t\tarray(\"iconsmind-Mask\" => \"iconsmind-Mask\"), \n\t\tarray(\"iconsmind-Menorah\" => \"iconsmind-Menorah\"), \n\t\tarray(\"iconsmind-Mirror\" => \"iconsmind-Mirror\"), \n\t\tarray(\"iconsmind-Movie-Ticket\" => \"iconsmind-Movie-Ticket\"), \n\t\tarray(\"iconsmind-Office-Lamp\" => \"iconsmind-Office-Lamp\"), \n\t\tarray(\"iconsmind-Paint-Brush\" => \"iconsmind-Paint-Brush\"), \n\t\tarray(\"iconsmind-Paint-Bucket\" => \"iconsmind-Paint-Bucket\"), \n\t\tarray(\"iconsmind-Paper-Plane\" => \"iconsmind-Paper-Plane\"), \n\t\tarray(\"iconsmind-Post-Sign\" => \"iconsmind-Post-Sign\"), \n\t\tarray(\"iconsmind-Post-Sign2ways\" => \"iconsmind-Post-Sign2ways\"), \n\t\tarray(\"iconsmind-Puzzle\" => \"iconsmind-Puzzle\"), \n\t\tarray(\"iconsmind-Razzor-Blade\" => \"iconsmind-Razzor-Blade\"), \n\t\tarray(\"iconsmind-Scale\" => \"iconsmind-Scale\"), \n\t\tarray(\"iconsmind-Screwdriver\" => \"iconsmind-Screwdriver\"), \n\t\tarray(\"iconsmind-Sewing-Machine\" => \"iconsmind-Sewing-Machine\"), \n\t\tarray(\"iconsmind-Sheriff-Badge\" => \"iconsmind-Sheriff-Badge\"), \n\t\tarray(\"iconsmind-Stroller\" => \"iconsmind-Stroller\"), \n\t\tarray(\"iconsmind-Suitcase\" => \"iconsmind-Suitcase\"), \n\t\tarray(\"iconsmind-Teddy-Bear\" => \"iconsmind-Teddy-Bear\"), \n\t\tarray(\"iconsmind-Telescope\" => \"iconsmind-Telescope\"), \n\t\tarray(\"iconsmind-Tent\" => \"iconsmind-Tent\"), \n\t\tarray(\"iconsmind-Thread\" => \"iconsmind-Thread\"), \n\t\tarray(\"iconsmind-Ticket\" => \"iconsmind-Ticket\"), \n\t\tarray(\"iconsmind-Time-Bomb\" => \"iconsmind-Time-Bomb\"), \n\t\tarray(\"iconsmind-Tourch\" => \"iconsmind-Tourch\"), \n\t\tarray(\"iconsmind-Vase\" => \"iconsmind-Vase\"), \n\t\tarray(\"iconsmind-Video-GameController\" => \"iconsmind-Video-GameController\"), \n\t\tarray(\"iconsmind-Conservation\" => \"iconsmind-Conservation\"), \n\t\tarray(\"iconsmind-Eci-Icon\" => \"iconsmind-Eci-Icon\"), \n\t\tarray(\"iconsmind-Environmental\" => \"iconsmind-Environmental\"), \n\t\tarray(\"iconsmind-Environmental-2\" => \"iconsmind-Environmental-2\"), \n\t\tarray(\"iconsmind-Environmental-3\" => \"iconsmind-Environmental-3\"), \n\t\tarray(\"iconsmind-Fire-Flame\" => \"iconsmind-Fire-Flame\"), \n\t\tarray(\"iconsmind-Fire-Flame2\" => \"iconsmind-Fire-Flame2\"), \n\t\tarray(\"iconsmind-Flowerpot\" => \"iconsmind-Flowerpot\"), \n\t\tarray(\"iconsmind-Forest\" => \"iconsmind-Forest\"), \n\t\tarray(\"iconsmind-Green-Energy\" => \"iconsmind-Green-Energy\"), \n\t\tarray(\"iconsmind-Green-House\" => \"iconsmind-Green-House\"), \n\t\tarray(\"iconsmind-Landscape2\" => \"iconsmind-Landscape2\"), \n\t\tarray(\"iconsmind-Leafs\" => \"iconsmind-Leafs\"), \n\t\tarray(\"iconsmind-Leafs-2\" => \"iconsmind-Leafs-2\"), \n\t\tarray(\"iconsmind-Light-BulbLeaf\" => \"iconsmind-Light-BulbLeaf\"), \n\t\tarray(\"iconsmind-Palm-Tree\" => \"iconsmind-Palm-Tree\"), \n\t\tarray(\"iconsmind-Plant\" => \"iconsmind-Plant\"), \n\t\tarray(\"iconsmind-Recycling\" => \"iconsmind-Recycling\"), \n\t\tarray(\"iconsmind-Recycling-2\" => \"iconsmind-Recycling-2\"), \n\t\tarray(\"iconsmind-Seed\" => \"iconsmind-Seed\"), \n\t\tarray(\"iconsmind-Trash-withMen\" => \"iconsmind-Trash-withMen\"), \n\t\tarray(\"iconsmind-Tree\" => \"iconsmind-Tree\"), \n\t\tarray(\"iconsmind-Tree-2\" => \"iconsmind-Tree-2\"), \n\t\tarray(\"iconsmind-Tree-3\" => \"iconsmind-Tree-3\"), \n\t\tarray(\"iconsmind-Audio\" => \"iconsmind-Audio\"), \n\t\tarray(\"iconsmind-Back-Music\" => \"iconsmind-Back-Music\"), \n\t\tarray(\"iconsmind-Bell\" => \"iconsmind-Bell\"), \n\t\tarray(\"iconsmind-Casette-Tape\" => \"iconsmind-Casette-Tape\"), \n\t\tarray(\"iconsmind-CD-2\" => \"iconsmind-CD-2\"), \n\t\tarray(\"iconsmind-CD-Cover\" => \"iconsmind-CD-Cover\"), \n\t\tarray(\"iconsmind-Cello\" => \"iconsmind-Cello\"), \n\t\tarray(\"iconsmind-Clef\" => \"iconsmind-Clef\"), \n\t\tarray(\"iconsmind-Drum\" => \"iconsmind-Drum\"), \n\t\tarray(\"iconsmind-Earphones\" => \"iconsmind-Earphones\"), \n\t\tarray(\"iconsmind-Earphones-2\" => \"iconsmind-Earphones-2\"), \n\t\tarray(\"iconsmind-Electric-Guitar\" => \"iconsmind-Electric-Guitar\"), \n\t\tarray(\"iconsmind-Equalizer\" => \"iconsmind-Equalizer\"), \n\t\tarray(\"iconsmind-First\" => \"iconsmind-First\"), \n\t\tarray(\"iconsmind-Guitar\" => \"iconsmind-Guitar\"), \n\t\tarray(\"iconsmind-Headphones\" => \"iconsmind-Headphones\"), \n\t\tarray(\"iconsmind-Keyboard3\" => \"iconsmind-Keyboard3\"), \n\t\tarray(\"iconsmind-Last\" => \"iconsmind-Last\"), \n\t\tarray(\"iconsmind-Loud\" => \"iconsmind-Loud\"), \n\t\tarray(\"iconsmind-Loudspeaker\" => \"iconsmind-Loudspeaker\"), \n\t\tarray(\"iconsmind-Mic\" => \"iconsmind-Mic\"), \n\t\tarray(\"iconsmind-Microphone\" => \"iconsmind-Microphone\"), \n\t\tarray(\"iconsmind-Microphone-2\" => \"iconsmind-Microphone-2\"), \n\t\tarray(\"iconsmind-Microphone-3\" => \"iconsmind-Microphone-3\"), \n\t\tarray(\"iconsmind-Microphone-4\" => \"iconsmind-Microphone-4\"), \n\t\tarray(\"iconsmind-Microphone-5\" => \"iconsmind-Microphone-5\"), \n\t\tarray(\"iconsmind-Microphone-6\" => \"iconsmind-Microphone-6\"), \n\t\tarray(\"iconsmind-Microphone-7\" => \"iconsmind-Microphone-7\"), \n\t\tarray(\"iconsmind-Mixer\" => \"iconsmind-Mixer\"), \n\t\tarray(\"iconsmind-Mp3-File\" => \"iconsmind-Mp3-File\"), \n\t\tarray(\"iconsmind-Music-Note\" => \"iconsmind-Music-Note\"), \n\t\tarray(\"iconsmind-Music-Note2\" => \"iconsmind-Music-Note2\"), \n\t\tarray(\"iconsmind-Music-Note3\" => \"iconsmind-Music-Note3\"), \n\t\tarray(\"iconsmind-Music-Note4\" => \"iconsmind-Music-Note4\"), \n\t\tarray(\"iconsmind-Music-Player\" => \"iconsmind-Music-Player\"), \n\t\tarray(\"iconsmind-Mute\" => \"iconsmind-Mute\"), \n\t\tarray(\"iconsmind-Next-Music\" => \"iconsmind-Next-Music\"), \n\t\tarray(\"iconsmind-Old-Radio\" => \"iconsmind-Old-Radio\"), \n\t\tarray(\"iconsmind-On-Air\" => \"iconsmind-On-Air\"), \n\t\tarray(\"iconsmind-Piano\" => \"iconsmind-Piano\"), \n\t\tarray(\"iconsmind-Play-Music\" => \"iconsmind-Play-Music\"), \n\t\tarray(\"iconsmind-Radio\" => \"iconsmind-Radio\"), \n\t\tarray(\"iconsmind-Record\" => \"iconsmind-Record\"), \n\t\tarray(\"iconsmind-Record-Music\" => \"iconsmind-Record-Music\"), \n\t\tarray(\"iconsmind-Rock-andRoll\" => \"iconsmind-Rock-andRoll\"), \n\t\tarray(\"iconsmind-Saxophone\" => \"iconsmind-Saxophone\"), \n\t\tarray(\"iconsmind-Sound\" => \"iconsmind-Sound\"), \n\t\tarray(\"iconsmind-Sound-Wave\" => \"iconsmind-Sound-Wave\"), \n\t\tarray(\"iconsmind-Speaker\" => \"iconsmind-Speaker\"), \n\t\tarray(\"iconsmind-Stop-Music\" => \"iconsmind-Stop-Music\"), \n\t\tarray(\"iconsmind-Trumpet\" => \"iconsmind-Trumpet\"), \n\t\tarray(\"iconsmind-Voice\" => \"iconsmind-Voice\"), \n\t\tarray(\"iconsmind-Volume-Down\" => \"iconsmind-Volume-Down\"), \n\t\tarray(\"iconsmind-Volume-Up\" => \"iconsmind-Volume-Up\"), \n\t\tarray(\"iconsmind-Back\" => \"iconsmind-Back\"), \n\t\tarray(\"iconsmind-Back-2\" => \"iconsmind-Back-2\"), \n\t\tarray(\"iconsmind-Eject\" => \"iconsmind-Eject\"), \n\t\tarray(\"iconsmind-Eject-2\" => \"iconsmind-Eject-2\"), \n\t\tarray(\"iconsmind-End\" => \"iconsmind-End\"), \n\t\tarray(\"iconsmind-End-2\" => \"iconsmind-End-2\"), \n\t\tarray(\"iconsmind-Next\" => \"iconsmind-Next\"), \n\t\tarray(\"iconsmind-Next-2\" => \"iconsmind-Next-2\"), \n\t\tarray(\"iconsmind-Pause\" => \"iconsmind-Pause\"), \n\t\tarray(\"iconsmind-Pause-2\" => \"iconsmind-Pause-2\"), \n\t\tarray(\"iconsmind-Power-2\" => \"iconsmind-Power-2\"), \n\t\tarray(\"iconsmind-Power-3\" => \"iconsmind-Power-3\"), \n\t\tarray(\"iconsmind-Record2\" => \"iconsmind-Record2\"), \n\t\tarray(\"iconsmind-Record-2\" => \"iconsmind-Record-2\"), \n\t\tarray(\"iconsmind-Repeat\" => \"iconsmind-Repeat\"), \n\t\tarray(\"iconsmind-Repeat-2\" => \"iconsmind-Repeat-2\"), \n\t\tarray(\"iconsmind-Shuffle\" => \"iconsmind-Shuffle\"), \n\t\tarray(\"iconsmind-Shuffle-2\" => \"iconsmind-Shuffle-2\"), \n\t\tarray(\"iconsmind-Start\" => \"iconsmind-Start\"), \n\t\tarray(\"iconsmind-Start-2\" => \"iconsmind-Start-2\"), \n\t\tarray(\"iconsmind-Stop\" => \"iconsmind-Stop\"), \n\t\tarray(\"iconsmind-Stop-2\" => \"iconsmind-Stop-2\"), \n\t\tarray(\"iconsmind-Compass\" => \"iconsmind-Compass\"), \n\t\tarray(\"iconsmind-Compass-2\" => \"iconsmind-Compass-2\"), \n\t\tarray(\"iconsmind-Compass-Rose\" => \"iconsmind-Compass-Rose\"), \n\t\tarray(\"iconsmind-Direction-East\" => \"iconsmind-Direction-East\"), \n\t\tarray(\"iconsmind-Direction-North\" => \"iconsmind-Direction-North\"), \n\t\tarray(\"iconsmind-Direction-South\" => \"iconsmind-Direction-South\"), \n\t\tarray(\"iconsmind-Direction-West\" => \"iconsmind-Direction-West\"), \n\t\tarray(\"iconsmind-Edit-Map\" => \"iconsmind-Edit-Map\"), \n\t\tarray(\"iconsmind-Geo\" => \"iconsmind-Geo\"), \n\t\tarray(\"iconsmind-Geo2\" => \"iconsmind-Geo2\"), \n\t\tarray(\"iconsmind-Geo3\" => \"iconsmind-Geo3\"), \n\t\tarray(\"iconsmind-Geo22\" => \"iconsmind-Geo22\"), \n\t\tarray(\"iconsmind-Geo23\" => \"iconsmind-Geo23\"), \n\t\tarray(\"iconsmind-Geo24\" => \"iconsmind-Geo24\"), \n\t\tarray(\"iconsmind-Geo2-Close\" => \"iconsmind-Geo2-Close\"), \n\t\tarray(\"iconsmind-Geo2-Love\" => \"iconsmind-Geo2-Love\"), \n\t\tarray(\"iconsmind-Geo2-Number\" => \"iconsmind-Geo2-Number\"), \n\t\tarray(\"iconsmind-Geo2-Star\" => \"iconsmind-Geo2-Star\"), \n\t\tarray(\"iconsmind-Geo32\" => \"iconsmind-Geo32\"), \n\t\tarray(\"iconsmind-Geo33\" => \"iconsmind-Geo33\"), \n\t\tarray(\"iconsmind-Geo34\" => \"iconsmind-Geo34\"), \n\t\tarray(\"iconsmind-Geo3-Close\" => \"iconsmind-Geo3-Close\"), \n\t\tarray(\"iconsmind-Geo3-Love\" => \"iconsmind-Geo3-Love\"), \n\t\tarray(\"iconsmind-Geo3-Number\" => \"iconsmind-Geo3-Number\"), \n\t\tarray(\"iconsmind-Geo3-Star\" => \"iconsmind-Geo3-Star\"), \n\t\tarray(\"iconsmind-Geo-Close\" => \"iconsmind-Geo-Close\"), \n\t\tarray(\"iconsmind-Geo-Love\" => \"iconsmind-Geo-Love\"), \n\t\tarray(\"iconsmind-Geo-Number\" => \"iconsmind-Geo-Number\"), \n\t\tarray(\"iconsmind-Geo-Star\" => \"iconsmind-Geo-Star\"), \n\t\tarray(\"iconsmind-Global-Position\" => \"iconsmind-Global-Position\"), \n\t\tarray(\"iconsmind-Globe\" => \"iconsmind-Globe\"), \n\t\tarray(\"iconsmind-Globe-2\" => \"iconsmind-Globe-2\"), \n\t\tarray(\"iconsmind-Location\" => \"iconsmind-Location\"), \n\t\tarray(\"iconsmind-Location-2\" => \"iconsmind-Location-2\"), \n\t\tarray(\"iconsmind-Map\" => \"iconsmind-Map\"), \n\t\tarray(\"iconsmind-Map2\" => \"iconsmind-Map2\"), \n\t\tarray(\"iconsmind-Map-Marker\" => \"iconsmind-Map-Marker\"), \n\t\tarray(\"iconsmind-Map-Marker2\" => \"iconsmind-Map-Marker2\"), \n\t\tarray(\"iconsmind-Map-Marker3\" => \"iconsmind-Map-Marker3\"), \n\t\tarray(\"iconsmind-Road2\" => \"iconsmind-Road2\"), \n\t\tarray(\"iconsmind-Satelite\" => \"iconsmind-Satelite\"), \n\t\tarray(\"iconsmind-Satelite-2\" => \"iconsmind-Satelite-2\"), \n\t\tarray(\"iconsmind-Street-View\" => \"iconsmind-Street-View\"), \n\t\tarray(\"iconsmind-Street-View2\" => \"iconsmind-Street-View2\"), \n\t\tarray(\"iconsmind-Android-Store\" => \"iconsmind-Android-Store\"), \n\t\tarray(\"iconsmind-Apple-Store\" => \"iconsmind-Apple-Store\"), \n\t\tarray(\"iconsmind-Box2\" => \"iconsmind-Box2\"), \n\t\tarray(\"iconsmind-Dropbox\" => \"iconsmind-Dropbox\"), \n\t\tarray(\"iconsmind-Google-Drive\" => \"iconsmind-Google-Drive\"), \n\t\tarray(\"iconsmind-Google-Play\" => \"iconsmind-Google-Play\"), \n\t\tarray(\"iconsmind-Paypal\" => \"iconsmind-Paypal\"), \n\t\tarray(\"iconsmind-Skrill\" => \"iconsmind-Skrill\"), \n\t\tarray(\"iconsmind-X-Box\" => \"iconsmind-X-Box\"), \n\t\tarray(\"iconsmind-Add\" => \"iconsmind-Add\"), \n\t\tarray(\"iconsmind-Back2\" => \"iconsmind-Back2\"), \n\t\tarray(\"iconsmind-Broken-Link\" => \"iconsmind-Broken-Link\"), \n\t\tarray(\"iconsmind-Check\" => \"iconsmind-Check\"), \n\t\tarray(\"iconsmind-Check-2\" => \"iconsmind-Check-2\"), \n\t\tarray(\"iconsmind-Circular-Point\" => \"iconsmind-Circular-Point\"), \n\t\tarray(\"iconsmind-Close\" => \"iconsmind-Close\"), \n\t\tarray(\"iconsmind-Cursor\" => \"iconsmind-Cursor\"), \n\t\tarray(\"iconsmind-Cursor-Click\" => \"iconsmind-Cursor-Click\"), \n\t\tarray(\"iconsmind-Cursor-Click2\" => \"iconsmind-Cursor-Click2\"), \n\t\tarray(\"iconsmind-Cursor-Move\" => \"iconsmind-Cursor-Move\"), \n\t\tarray(\"iconsmind-Cursor-Move2\" => \"iconsmind-Cursor-Move2\"), \n\t\tarray(\"iconsmind-Cursor-Select\" => \"iconsmind-Cursor-Select\"), \n\t\tarray(\"iconsmind-Down\" => \"iconsmind-Down\"), \n\t\tarray(\"iconsmind-Download\" => \"iconsmind-Download\"), \n\t\tarray(\"iconsmind-Downward\" => \"iconsmind-Downward\"), \n\t\tarray(\"iconsmind-Endways\" => \"iconsmind-Endways\"), \n\t\tarray(\"iconsmind-Forward\" => \"iconsmind-Forward\"), \n\t\tarray(\"iconsmind-Left\" => \"iconsmind-Left\"), \n\t\tarray(\"iconsmind-Link\" => \"iconsmind-Link\"), \n\t\tarray(\"iconsmind-Next2\" => \"iconsmind-Next2\"), \n\t\tarray(\"iconsmind-Orientation\" => \"iconsmind-Orientation\"), \n\t\tarray(\"iconsmind-Pointer\" => \"iconsmind-Pointer\"), \n\t\tarray(\"iconsmind-Previous\" => \"iconsmind-Previous\"), \n\t\tarray(\"iconsmind-Redo\" => \"iconsmind-Redo\"), \n\t\tarray(\"iconsmind-Refresh\" => \"iconsmind-Refresh\"), \n\t\tarray(\"iconsmind-Reload\" => \"iconsmind-Reload\"), \n\t\tarray(\"iconsmind-Remove\" => \"iconsmind-Remove\"), \n\t\tarray(\"iconsmind-Repeat2\" => \"iconsmind-Repeat2\"), \n\t\tarray(\"iconsmind-Reset\" => \"iconsmind-Reset\"), \n\t\tarray(\"iconsmind-Rewind\" => \"iconsmind-Rewind\"), \n\t\tarray(\"iconsmind-Right\" => \"iconsmind-Right\"), \n\t\tarray(\"iconsmind-Rotation\" => \"iconsmind-Rotation\"), \n\t\tarray(\"iconsmind-Rotation-390\" => \"iconsmind-Rotation-390\"), \n\t\tarray(\"iconsmind-Spot\" => \"iconsmind-Spot\"), \n\t\tarray(\"iconsmind-Start-ways\" => \"iconsmind-Start-ways\"), \n\t\tarray(\"iconsmind-Synchronize\" => \"iconsmind-Synchronize\"), \n\t\tarray(\"iconsmind-Synchronize-2\" => \"iconsmind-Synchronize-2\"), \n\t\tarray(\"iconsmind-Undo\" => \"iconsmind-Undo\"), \n\t\tarray(\"iconsmind-Up\" => \"iconsmind-Up\"), \n\t\tarray(\"iconsmind-Upload\" => \"iconsmind-Upload\"), \n\t\tarray(\"iconsmind-Upward\" => \"iconsmind-Upward\"), \n\t\tarray(\"iconsmind-Yes\" => \"iconsmind-Yes\"), \n\t\tarray(\"iconsmind-Barricade2\" => \"iconsmind-Barricade2\"), \n\t\tarray(\"iconsmind-Crane\" => \"iconsmind-Crane\"), \n\t\tarray(\"iconsmind-Dam\" => \"iconsmind-Dam\"), \n\t\tarray(\"iconsmind-Drill2\" => \"iconsmind-Drill2\"), \n\t\tarray(\"iconsmind-Electricity\" => \"iconsmind-Electricity\"), \n\t\tarray(\"iconsmind-Explode\" => \"iconsmind-Explode\"), \n\t\tarray(\"iconsmind-Factory\" => \"iconsmind-Factory\"), \n\t\tarray(\"iconsmind-Fuel\" => \"iconsmind-Fuel\"), \n\t\tarray(\"iconsmind-Helmet2\" => \"iconsmind-Helmet2\"), \n\t\tarray(\"iconsmind-Helmet-2\" => \"iconsmind-Helmet-2\"), \n\t\tarray(\"iconsmind-Laser\" => \"iconsmind-Laser\"), \n\t\tarray(\"iconsmind-Mine\" => \"iconsmind-Mine\"), \n\t\tarray(\"iconsmind-Oil\" => \"iconsmind-Oil\"), \n\t\tarray(\"iconsmind-Petrol\" => \"iconsmind-Petrol\"), \n\t\tarray(\"iconsmind-Pipe\" => \"iconsmind-Pipe\"), \n\t\tarray(\"iconsmind-Power-Station\" => \"iconsmind-Power-Station\"), \n\t\tarray(\"iconsmind-Refinery\" => \"iconsmind-Refinery\"), \n\t\tarray(\"iconsmind-Saw\" => \"iconsmind-Saw\"), \n\t\tarray(\"iconsmind-Shovel\" => \"iconsmind-Shovel\"), \n\t\tarray(\"iconsmind-Solar\" => \"iconsmind-Solar\"), \n\t\tarray(\"iconsmind-Wheelbarrow\" => \"iconsmind-Wheelbarrow\"), \n\t\tarray(\"iconsmind-Windmill\" => \"iconsmind-Windmill\"), \n\t\tarray(\"iconsmind-Aa\" => \"iconsmind-Aa\"), \n\t\tarray(\"iconsmind-Add-File\" => \"iconsmind-Add-File\"), \n\t\tarray(\"iconsmind-Address-Book\" => \"iconsmind-Address-Book\"), \n\t\tarray(\"iconsmind-Address-Book2\" => \"iconsmind-Address-Book2\"), \n\t\tarray(\"iconsmind-Add-SpaceAfterParagraph\" => \"iconsmind-Add-SpaceAfterParagraph\"), \n\t\tarray(\"iconsmind-Add-SpaceBeforeParagraph\" => \"iconsmind-Add-SpaceBeforeParagraph\"), \n\t\tarray(\"iconsmind-Airbrush\" => \"iconsmind-Airbrush\"), \n\t\tarray(\"iconsmind-Aligator\" => \"iconsmind-Aligator\"), \n\t\tarray(\"iconsmind-Align-Center\" => \"iconsmind-Align-Center\"), \n\t\tarray(\"iconsmind-Align-JustifyAll\" => \"iconsmind-Align-JustifyAll\"), \n\t\tarray(\"iconsmind-Align-JustifyCenter\" => \"iconsmind-Align-JustifyCenter\"), \n\t\tarray(\"iconsmind-Align-JustifyLeft\" => \"iconsmind-Align-JustifyLeft\"), \n\t\tarray(\"iconsmind-Align-JustifyRight\" => \"iconsmind-Align-JustifyRight\"), \n\t\tarray(\"iconsmind-Align-Left\" => \"iconsmind-Align-Left\"), \n\t\tarray(\"iconsmind-Align-Right\" => \"iconsmind-Align-Right\"), \n\t\tarray(\"iconsmind-Alpha\" => \"iconsmind-Alpha\"), \n\t\tarray(\"iconsmind-AMX\" => \"iconsmind-AMX\"), \n\t\tarray(\"iconsmind-Anchor2\" => \"iconsmind-Anchor2\"), \n\t\tarray(\"iconsmind-Android\" => \"iconsmind-Android\"), \n\t\tarray(\"iconsmind-Angel\" => \"iconsmind-Angel\"), \n\t\tarray(\"iconsmind-Angel-Smiley\" => \"iconsmind-Angel-Smiley\"), \n\t\tarray(\"iconsmind-Angry\" => \"iconsmind-Angry\"), \n\t\tarray(\"iconsmind-Apple\" => \"iconsmind-Apple\"), \n\t\tarray(\"iconsmind-Apple-Bite\" => \"iconsmind-Apple-Bite\"), \n\t\tarray(\"iconsmind-Argentina\" => \"iconsmind-Argentina\"), \n\t\tarray(\"iconsmind-Arrow-Around\" => \"iconsmind-Arrow-Around\"), \n\t\tarray(\"iconsmind-Arrow-Back\" => \"iconsmind-Arrow-Back\"), \n\t\tarray(\"iconsmind-Arrow-Back2\" => \"iconsmind-Arrow-Back2\"), \n\t\tarray(\"iconsmind-Arrow-Back3\" => \"iconsmind-Arrow-Back3\"), \n\t\tarray(\"iconsmind-Arrow-Barrier\" => \"iconsmind-Arrow-Barrier\"), \n\t\tarray(\"iconsmind-Arrow-Circle\" => \"iconsmind-Arrow-Circle\"), \n\t\tarray(\"iconsmind-Arrow-Cross\" => \"iconsmind-Arrow-Cross\"), \n\t\tarray(\"iconsmind-Arrow-Down\" => \"iconsmind-Arrow-Down\"), \n\t\tarray(\"iconsmind-Arrow-Down2\" => \"iconsmind-Arrow-Down2\"), \n\t\tarray(\"iconsmind-Arrow-Down3\" => \"iconsmind-Arrow-Down3\"), \n\t\tarray(\"iconsmind-Arrow-DowninCircle\" => \"iconsmind-Arrow-DowninCircle\"), \n\t\tarray(\"iconsmind-Arrow-Fork\" => \"iconsmind-Arrow-Fork\"), \n\t\tarray(\"iconsmind-Arrow-Forward\" => \"iconsmind-Arrow-Forward\"), \n\t\tarray(\"iconsmind-Arrow-Forward2\" => \"iconsmind-Arrow-Forward2\"), \n\t\tarray(\"iconsmind-Arrow-From\" => \"iconsmind-Arrow-From\"), \n\t\tarray(\"iconsmind-Arrow-Inside\" => \"iconsmind-Arrow-Inside\"), \n\t\tarray(\"iconsmind-Arrow-Inside45\" => \"iconsmind-Arrow-Inside45\"), \n\t\tarray(\"iconsmind-Arrow-InsideGap\" => \"iconsmind-Arrow-InsideGap\"), \n\t\tarray(\"iconsmind-Arrow-InsideGap45\" => \"iconsmind-Arrow-InsideGap45\"), \n\t\tarray(\"iconsmind-Arrow-Into\" => \"iconsmind-Arrow-Into\"), \n\t\tarray(\"iconsmind-Arrow-Join\" => \"iconsmind-Arrow-Join\"), \n\t\tarray(\"iconsmind-Arrow-Junction\" => \"iconsmind-Arrow-Junction\"), \n\t\tarray(\"iconsmind-Arrow-Left\" => \"iconsmind-Arrow-Left\"), \n\t\tarray(\"iconsmind-Arrow-Left2\" => \"iconsmind-Arrow-Left2\"), \n\t\tarray(\"iconsmind-Arrow-LeftinCircle\" => \"iconsmind-Arrow-LeftinCircle\"), \n\t\tarray(\"iconsmind-Arrow-Loop\" => \"iconsmind-Arrow-Loop\"), \n\t\tarray(\"iconsmind-Arrow-Merge\" => \"iconsmind-Arrow-Merge\"), \n\t\tarray(\"iconsmind-Arrow-Mix\" => \"iconsmind-Arrow-Mix\"), \n\t\tarray(\"iconsmind-Arrow-Next\" => \"iconsmind-Arrow-Next\"), \n\t\tarray(\"iconsmind-Arrow-OutLeft\" => \"iconsmind-Arrow-OutLeft\"), \n\t\tarray(\"iconsmind-Arrow-OutRight\" => \"iconsmind-Arrow-OutRight\"), \n\t\tarray(\"iconsmind-Arrow-Outside\" => \"iconsmind-Arrow-Outside\"), \n\t\tarray(\"iconsmind-Arrow-Outside45\" => \"iconsmind-Arrow-Outside45\"), \n\t\tarray(\"iconsmind-Arrow-OutsideGap\" => \"iconsmind-Arrow-OutsideGap\"), \n\t\tarray(\"iconsmind-Arrow-OutsideGap45\" => \"iconsmind-Arrow-OutsideGap45\"), \n\t\tarray(\"iconsmind-Arrow-Over\" => \"iconsmind-Arrow-Over\"), \n\t\tarray(\"iconsmind-Arrow-Refresh\" => \"iconsmind-Arrow-Refresh\"), \n\t\tarray(\"iconsmind-Arrow-Refresh2\" => \"iconsmind-Arrow-Refresh2\"), \n\t\tarray(\"iconsmind-Arrow-Right\" => \"iconsmind-Arrow-Right\"), \n\t\tarray(\"iconsmind-Arrow-Right2\" => \"iconsmind-Arrow-Right2\"), \n\t\tarray(\"iconsmind-Arrow-RightinCircle\" => \"iconsmind-Arrow-RightinCircle\"), \n\t\tarray(\"iconsmind-Arrow-Shuffle\" => \"iconsmind-Arrow-Shuffle\"), \n\t\tarray(\"iconsmind-Arrow-Squiggly\" => \"iconsmind-Arrow-Squiggly\"), \n\t\tarray(\"iconsmind-Arrow-Through\" => \"iconsmind-Arrow-Through\"), \n\t\tarray(\"iconsmind-Arrow-To\" => \"iconsmind-Arrow-To\"), \n\t\tarray(\"iconsmind-Arrow-TurnLeft\" => \"iconsmind-Arrow-TurnLeft\"), \n\t\tarray(\"iconsmind-Arrow-TurnRight\" => \"iconsmind-Arrow-TurnRight\"), \n\t\tarray(\"iconsmind-Arrow-Up\" => \"iconsmind-Arrow-Up\"), \n\t\tarray(\"iconsmind-Arrow-Up2\" => \"iconsmind-Arrow-Up2\"), \n\t\tarray(\"iconsmind-Arrow-Up3\" => \"iconsmind-Arrow-Up3\"), \n\t\tarray(\"iconsmind-Arrow-UpinCircle\" => \"iconsmind-Arrow-UpinCircle\"), \n\t\tarray(\"iconsmind-Arrow-XLeft\" => \"iconsmind-Arrow-XLeft\"), \n\t\tarray(\"iconsmind-Arrow-XRight\" => \"iconsmind-Arrow-XRight\"), \n\t\tarray(\"iconsmind-ATM\" => \"iconsmind-ATM\"), \n\t\tarray(\"iconsmind-At-Sign\" => \"iconsmind-At-Sign\"), \n\t\tarray(\"iconsmind-Baby-Clothes\" => \"iconsmind-Baby-Clothes\"), \n\t\tarray(\"iconsmind-Baby-Clothes2\" => \"iconsmind-Baby-Clothes2\"), \n\t\tarray(\"iconsmind-Bag\" => \"iconsmind-Bag\"), \n\t\tarray(\"iconsmind-Bakelite\" => \"iconsmind-Bakelite\"), \n\t\tarray(\"iconsmind-Banana\" => \"iconsmind-Banana\"), \n\t\tarray(\"iconsmind-Bank\" => \"iconsmind-Bank\"), \n\t\tarray(\"iconsmind-Bar-Chart\" => \"iconsmind-Bar-Chart\"), \n\t\tarray(\"iconsmind-Bar-Chart2\" => \"iconsmind-Bar-Chart2\"), \n\t\tarray(\"iconsmind-Bar-Chart3\" => \"iconsmind-Bar-Chart3\"), \n\t\tarray(\"iconsmind-Bar-Chart4\" => \"iconsmind-Bar-Chart4\"), \n\t\tarray(\"iconsmind-Bar-Chart5\" => \"iconsmind-Bar-Chart5\"), \n\t\tarray(\"iconsmind-Bat\" => \"iconsmind-Bat\"), \n\t\tarray(\"iconsmind-Bathrobe\" => \"iconsmind-Bathrobe\"), \n\t\tarray(\"iconsmind-Battery-0\" => \"iconsmind-Battery-0\"), \n\t\tarray(\"iconsmind-Battery-25\" => \"iconsmind-Battery-25\"), \n\t\tarray(\"iconsmind-Battery-50\" => \"iconsmind-Battery-50\"), \n\t\tarray(\"iconsmind-Battery-75\" => \"iconsmind-Battery-75\"), \n\t\tarray(\"iconsmind-Battery-100\" => \"iconsmind-Battery-100\"), \n\t\tarray(\"iconsmind-Battery-Charge\" => \"iconsmind-Battery-Charge\"), \n\t\tarray(\"iconsmind-Bear\" => \"iconsmind-Bear\"), \n\t\tarray(\"iconsmind-Beard\" => \"iconsmind-Beard\"), \n\t\tarray(\"iconsmind-Beard-2\" => \"iconsmind-Beard-2\"), \n\t\tarray(\"iconsmind-Beard-3\" => \"iconsmind-Beard-3\"), \n\t\tarray(\"iconsmind-Bee\" => \"iconsmind-Bee\"), \n\t\tarray(\"iconsmind-Beer\" => \"iconsmind-Beer\"), \n\t\tarray(\"iconsmind-Beer-Glass\" => \"iconsmind-Beer-Glass\"), \n\t\tarray(\"iconsmind-Bell2\" => \"iconsmind-Bell2\"), \n\t\tarray(\"iconsmind-Belt\" => \"iconsmind-Belt\"), \n\t\tarray(\"iconsmind-Belt-2\" => \"iconsmind-Belt-2\"), \n\t\tarray(\"iconsmind-Belt-3\" => \"iconsmind-Belt-3\"), \n\t\tarray(\"iconsmind-Berlin-Tower\" => \"iconsmind-Berlin-Tower\"), \n\t\tarray(\"iconsmind-Beta\" => \"iconsmind-Beta\"), \n\t\tarray(\"iconsmind-Big-Bang\" => \"iconsmind-Big-Bang\"), \n\t\tarray(\"iconsmind-Big-Data\" => \"iconsmind-Big-Data\"), \n\t\tarray(\"iconsmind-Bikini\" => \"iconsmind-Bikini\"), \n\t\tarray(\"iconsmind-Bilk-Bottle2\" => \"iconsmind-Bilk-Bottle2\"), \n\t\tarray(\"iconsmind-Bird\" => \"iconsmind-Bird\"), \n\t\tarray(\"iconsmind-Bird-DeliveringLetter\" => \"iconsmind-Bird-DeliveringLetter\"), \n\t\tarray(\"iconsmind-Birthday-Cake\" => \"iconsmind-Birthday-Cake\"), \n\t\tarray(\"iconsmind-Bishop\" => \"iconsmind-Bishop\"), \n\t\tarray(\"iconsmind-Blackboard\" => \"iconsmind-Blackboard\"), \n\t\tarray(\"iconsmind-Black-Cat\" => \"iconsmind-Black-Cat\"), \n\t\tarray(\"iconsmind-Block-Cloud\" => \"iconsmind-Block-Cloud\"), \n\t\tarray(\"iconsmind-Blood\" => \"iconsmind-Blood\"), \n\t\tarray(\"iconsmind-Blouse\" => \"iconsmind-Blouse\"), \n\t\tarray(\"iconsmind-Blueprint\" => \"iconsmind-Blueprint\"), \n\t\tarray(\"iconsmind-Board\" => \"iconsmind-Board\"), \n\t\tarray(\"iconsmind-Bone\" => \"iconsmind-Bone\"), \n\t\tarray(\"iconsmind-Bones\" => \"iconsmind-Bones\"), \n\t\tarray(\"iconsmind-Book\" => \"iconsmind-Book\"), \n\t\tarray(\"iconsmind-Bookmark\" => \"iconsmind-Bookmark\"), \n\t\tarray(\"iconsmind-Books\" => \"iconsmind-Books\"), \n\t\tarray(\"iconsmind-Books-2\" => \"iconsmind-Books-2\"), \n\t\tarray(\"iconsmind-Boot\" => \"iconsmind-Boot\"), \n\t\tarray(\"iconsmind-Boot-2\" => \"iconsmind-Boot-2\"), \n\t\tarray(\"iconsmind-Bottom-ToTop\" => \"iconsmind-Bottom-ToTop\"), \n\t\tarray(\"iconsmind-Bow\" => \"iconsmind-Bow\"), \n\t\tarray(\"iconsmind-Bow-2\" => \"iconsmind-Bow-2\"), \n\t\tarray(\"iconsmind-Bow-3\" => \"iconsmind-Bow-3\"), \n\t\tarray(\"iconsmind-Box-Close\" => \"iconsmind-Box-Close\"), \n\t\tarray(\"iconsmind-Box-Full\" => \"iconsmind-Box-Full\"), \n\t\tarray(\"iconsmind-Box-Open\" => \"iconsmind-Box-Open\"), \n\t\tarray(\"iconsmind-Box-withFolders\" => \"iconsmind-Box-withFolders\"), \n\t\tarray(\"iconsmind-Bra\" => \"iconsmind-Bra\"), \n\t\tarray(\"iconsmind-Brain2\" => \"iconsmind-Brain2\"), \n\t\tarray(\"iconsmind-Brain-2\" => \"iconsmind-Brain-2\"), \n\t\tarray(\"iconsmind-Brazil\" => \"iconsmind-Brazil\"), \n\t\tarray(\"iconsmind-Bread\" => \"iconsmind-Bread\"), \n\t\tarray(\"iconsmind-Bread-2\" => \"iconsmind-Bread-2\"), \n\t\tarray(\"iconsmind-Bridge\" => \"iconsmind-Bridge\"), \n\t\tarray(\"iconsmind-Broom\" => \"iconsmind-Broom\"), \n\t\tarray(\"iconsmind-Brush\" => \"iconsmind-Brush\"), \n\t\tarray(\"iconsmind-Bug\" => \"iconsmind-Bug\"), \n\t\tarray(\"iconsmind-Building\" => \"iconsmind-Building\"), \n\t\tarray(\"iconsmind-Butterfly\" => \"iconsmind-Butterfly\"), \n\t\tarray(\"iconsmind-Cake\" => \"iconsmind-Cake\"), \n\t\tarray(\"iconsmind-Calculator\" => \"iconsmind-Calculator\"), \n\t\tarray(\"iconsmind-Calculator-2\" => \"iconsmind-Calculator-2\"), \n\t\tarray(\"iconsmind-Calculator-3\" => \"iconsmind-Calculator-3\"), \n\t\tarray(\"iconsmind-Calendar\" => \"iconsmind-Calendar\"), \n\t\tarray(\"iconsmind-Calendar-2\" => \"iconsmind-Calendar-2\"), \n\t\tarray(\"iconsmind-Calendar-3\" => \"iconsmind-Calendar-3\"), \n\t\tarray(\"iconsmind-Calendar-4\" => \"iconsmind-Calendar-4\"), \n\t\tarray(\"iconsmind-Camel\" => \"iconsmind-Camel\"), \n\t\tarray(\"iconsmind-Can\" => \"iconsmind-Can\"), \n\t\tarray(\"iconsmind-Can-2\" => \"iconsmind-Can-2\"), \n\t\tarray(\"iconsmind-Canada\" => \"iconsmind-Canada\"), \n\t\tarray(\"iconsmind-Candle\" => \"iconsmind-Candle\"), \n\t\tarray(\"iconsmind-Candy\" => \"iconsmind-Candy\"), \n\t\tarray(\"iconsmind-Candy-Cane\" => \"iconsmind-Candy-Cane\"), \n\t\tarray(\"iconsmind-Cap\" => \"iconsmind-Cap\"), \n\t\tarray(\"iconsmind-Cap-2\" => \"iconsmind-Cap-2\"), \n\t\tarray(\"iconsmind-Cap-3\" => \"iconsmind-Cap-3\"), \n\t\tarray(\"iconsmind-Cardigan\" => \"iconsmind-Cardigan\"), \n\t\tarray(\"iconsmind-Cardiovascular\" => \"iconsmind-Cardiovascular\"), \n\t\tarray(\"iconsmind-Castle\" => \"iconsmind-Castle\"), \n\t\tarray(\"iconsmind-Cat\" => \"iconsmind-Cat\"), \n\t\tarray(\"iconsmind-Cathedral\" => \"iconsmind-Cathedral\"), \n\t\tarray(\"iconsmind-Cauldron\" => \"iconsmind-Cauldron\"), \n\t\tarray(\"iconsmind-CD\" => \"iconsmind-CD\"), \n\t\tarray(\"iconsmind-Charger\" => \"iconsmind-Charger\"), \n\t\tarray(\"iconsmind-Checkmate\" => \"iconsmind-Checkmate\"), \n\t\tarray(\"iconsmind-Cheese\" => \"iconsmind-Cheese\"), \n\t\tarray(\"iconsmind-Cheetah\" => \"iconsmind-Cheetah\"), \n\t\tarray(\"iconsmind-Chef-Hat\" => \"iconsmind-Chef-Hat\"), \n\t\tarray(\"iconsmind-Chef-Hat2\" => \"iconsmind-Chef-Hat2\"), \n\t\tarray(\"iconsmind-Chess-Board\" => \"iconsmind-Chess-Board\"), \n\t\tarray(\"iconsmind-Chicken\" => \"iconsmind-Chicken\"), \n\t\tarray(\"iconsmind-Chile\" => \"iconsmind-Chile\"), \n\t\tarray(\"iconsmind-Chimney\" => \"iconsmind-Chimney\"), \n\t\tarray(\"iconsmind-China\" => \"iconsmind-China\"), \n\t\tarray(\"iconsmind-Chinese-Temple\" => \"iconsmind-Chinese-Temple\"), \n\t\tarray(\"iconsmind-Chip\" => \"iconsmind-Chip\"), \n\t\tarray(\"iconsmind-Chopsticks\" => \"iconsmind-Chopsticks\"), \n\t\tarray(\"iconsmind-Chopsticks-2\" => \"iconsmind-Chopsticks-2\"), \n\t\tarray(\"iconsmind-Christmas\" => \"iconsmind-Christmas\"), \n\t\tarray(\"iconsmind-Christmas-Ball\" => \"iconsmind-Christmas-Ball\"), \n\t\tarray(\"iconsmind-Christmas-Bell\" => \"iconsmind-Christmas-Bell\"), \n\t\tarray(\"iconsmind-Christmas-Candle\" => \"iconsmind-Christmas-Candle\"), \n\t\tarray(\"iconsmind-Christmas-Hat\" => \"iconsmind-Christmas-Hat\"), \n\t\tarray(\"iconsmind-Christmas-Sleigh\" => \"iconsmind-Christmas-Sleigh\"), \n\t\tarray(\"iconsmind-Christmas-Snowman\" => \"iconsmind-Christmas-Snowman\"), \n\t\tarray(\"iconsmind-Christmas-Sock\" => \"iconsmind-Christmas-Sock\"), \n\t\tarray(\"iconsmind-Christmas-Tree\" => \"iconsmind-Christmas-Tree\"), \n\t\tarray(\"iconsmind-Chrome\" => \"iconsmind-Chrome\"), \n\t\tarray(\"iconsmind-Chrysler-Building\" => \"iconsmind-Chrysler-Building\"), \n\t\tarray(\"iconsmind-City-Hall\" => \"iconsmind-City-Hall\"), \n\t\tarray(\"iconsmind-Clamp\" => \"iconsmind-Clamp\"), \n\t\tarray(\"iconsmind-Claps\" => \"iconsmind-Claps\"), \n\t\tarray(\"iconsmind-Clothing-Store\" => \"iconsmind-Clothing-Store\"), \n\t\tarray(\"iconsmind-Cloud\" => \"iconsmind-Cloud\"), \n\t\tarray(\"iconsmind-Cloud2\" => \"iconsmind-Cloud2\"), \n\t\tarray(\"iconsmind-Cloud3\" => \"iconsmind-Cloud3\"), \n\t\tarray(\"iconsmind-Cloud-Camera\" => \"iconsmind-Cloud-Camera\"), \n\t\tarray(\"iconsmind-Cloud-Computer\" => \"iconsmind-Cloud-Computer\"), \n\t\tarray(\"iconsmind-Cloud-Email\" => \"iconsmind-Cloud-Email\"), \n\t\tarray(\"iconsmind-Cloud-Laptop\" => \"iconsmind-Cloud-Laptop\"), \n\t\tarray(\"iconsmind-Cloud-Lock\" => \"iconsmind-Cloud-Lock\"), \n\t\tarray(\"iconsmind-Cloud-Music\" => \"iconsmind-Cloud-Music\"), \n\t\tarray(\"iconsmind-Cloud-Picture\" => \"iconsmind-Cloud-Picture\"), \n\t\tarray(\"iconsmind-Cloud-Remove\" => \"iconsmind-Cloud-Remove\"), \n\t\tarray(\"iconsmind-Clouds\" => \"iconsmind-Clouds\"), \n\t\tarray(\"iconsmind-Cloud-Secure\" => \"iconsmind-Cloud-Secure\"), \n\t\tarray(\"iconsmind-Cloud-Settings\" => \"iconsmind-Cloud-Settings\"), \n\t\tarray(\"iconsmind-Cloud-Smartphone\" => \"iconsmind-Cloud-Smartphone\"), \n\t\tarray(\"iconsmind-Cloud-Tablet\" => \"iconsmind-Cloud-Tablet\"), \n\t\tarray(\"iconsmind-Cloud-Video\" => \"iconsmind-Cloud-Video\"), \n\t\tarray(\"iconsmind-Clown\" => \"iconsmind-Clown\"), \n\t\tarray(\"iconsmind-CMYK\" => \"iconsmind-CMYK\"), \n\t\tarray(\"iconsmind-Coat\" => \"iconsmind-Coat\"), \n\t\tarray(\"iconsmind-Cocktail\" => \"iconsmind-Cocktail\"), \n\t\tarray(\"iconsmind-Coconut\" => \"iconsmind-Coconut\"), \n\t\tarray(\"iconsmind-Coffee\" => \"iconsmind-Coffee\"), \n\t\tarray(\"iconsmind-Coffee-2\" => \"iconsmind-Coffee-2\"), \n\t\tarray(\"iconsmind-Coffee-Bean\" => \"iconsmind-Coffee-Bean\"), \n\t\tarray(\"iconsmind-Coffee-toGo\" => \"iconsmind-Coffee-toGo\"), \n\t\tarray(\"iconsmind-Coffin\" => \"iconsmind-Coffin\"), \n\t\tarray(\"iconsmind-Coin\" => \"iconsmind-Coin\"), \n\t\tarray(\"iconsmind-Coins\" => \"iconsmind-Coins\"), \n\t\tarray(\"iconsmind-Coins-2\" => \"iconsmind-Coins-2\"), \n\t\tarray(\"iconsmind-Coins-3\" => \"iconsmind-Coins-3\"), \n\t\tarray(\"iconsmind-Colombia\" => \"iconsmind-Colombia\"), \n\t\tarray(\"iconsmind-Colosseum\" => \"iconsmind-Colosseum\"), \n\t\tarray(\"iconsmind-Column\" => \"iconsmind-Column\"), \n\t\tarray(\"iconsmind-Column-2\" => \"iconsmind-Column-2\"), \n\t\tarray(\"iconsmind-Column-3\" => \"iconsmind-Column-3\"), \n\t\tarray(\"iconsmind-Comb\" => \"iconsmind-Comb\"), \n\t\tarray(\"iconsmind-Comb-2\" => \"iconsmind-Comb-2\"), \n\t\tarray(\"iconsmind-Communication-Tower\" => \"iconsmind-Communication-Tower\"), \n\t\tarray(\"iconsmind-Communication-Tower2\" => \"iconsmind-Communication-Tower2\"), \n\t\tarray(\"iconsmind-Compass2\" => \"iconsmind-Compass2\"), \n\t\tarray(\"iconsmind-Compass-22\" => \"iconsmind-Compass-22\"), \n\t\tarray(\"iconsmind-Computer\" => \"iconsmind-Computer\"), \n\t\tarray(\"iconsmind-Computer-2\" => \"iconsmind-Computer-2\"), \n\t\tarray(\"iconsmind-Computer-3\" => \"iconsmind-Computer-3\"), \n\t\tarray(\"iconsmind-Confused\" => \"iconsmind-Confused\"), \n\t\tarray(\"iconsmind-Contrast\" => \"iconsmind-Contrast\"), \n\t\tarray(\"iconsmind-Cookie-Man\" => \"iconsmind-Cookie-Man\"), \n\t\tarray(\"iconsmind-Cookies\" => \"iconsmind-Cookies\"), \n\t\tarray(\"iconsmind-Cool\" => \"iconsmind-Cool\"), \n\t\tarray(\"iconsmind-Costume\" => \"iconsmind-Costume\"), \n\t\tarray(\"iconsmind-Cow\" => \"iconsmind-Cow\"), \n\t\tarray(\"iconsmind-CPU\" => \"iconsmind-CPU\"), \n\t\tarray(\"iconsmind-Cranium\" => \"iconsmind-Cranium\"), \n\t\tarray(\"iconsmind-Credit-Card\" => \"iconsmind-Credit-Card\"), \n\t\tarray(\"iconsmind-Credit-Card2\" => \"iconsmind-Credit-Card2\"), \n\t\tarray(\"iconsmind-Credit-Card3\" => \"iconsmind-Credit-Card3\"), \n\t\tarray(\"iconsmind-Croissant\" => \"iconsmind-Croissant\"), \n\t\tarray(\"iconsmind-Crying\" => \"iconsmind-Crying\"), \n\t\tarray(\"iconsmind-Cupcake\" => \"iconsmind-Cupcake\"), \n\t\tarray(\"iconsmind-Danemark\" => \"iconsmind-Danemark\"), \n\t\tarray(\"iconsmind-Data\" => \"iconsmind-Data\"), \n\t\tarray(\"iconsmind-Data-Backup\" => \"iconsmind-Data-Backup\"), \n\t\tarray(\"iconsmind-Data-Block\" => \"iconsmind-Data-Block\"), \n\t\tarray(\"iconsmind-Data-Center\" => \"iconsmind-Data-Center\"), \n\t\tarray(\"iconsmind-Data-Clock\" => \"iconsmind-Data-Clock\"), \n\t\tarray(\"iconsmind-Data-Cloud\" => \"iconsmind-Data-Cloud\"), \n\t\tarray(\"iconsmind-Data-Compress\" => \"iconsmind-Data-Compress\"), \n\t\tarray(\"iconsmind-Data-Copy\" => \"iconsmind-Data-Copy\"), \n\t\tarray(\"iconsmind-Data-Download\" => \"iconsmind-Data-Download\"), \n\t\tarray(\"iconsmind-Data-Financial\" => \"iconsmind-Data-Financial\"), \n\t\tarray(\"iconsmind-Data-Key\" => \"iconsmind-Data-Key\"), \n\t\tarray(\"iconsmind-Data-Lock\" => \"iconsmind-Data-Lock\"), \n\t\tarray(\"iconsmind-Data-Network\" => \"iconsmind-Data-Network\"), \n\t\tarray(\"iconsmind-Data-Password\" => \"iconsmind-Data-Password\"), \n\t\tarray(\"iconsmind-Data-Power\" => \"iconsmind-Data-Power\"), \n\t\tarray(\"iconsmind-Data-Refresh\" => \"iconsmind-Data-Refresh\"), \n\t\tarray(\"iconsmind-Data-Save\" => \"iconsmind-Data-Save\"), \n\t\tarray(\"iconsmind-Data-Search\" => \"iconsmind-Data-Search\"), \n\t\tarray(\"iconsmind-Data-Security\" => \"iconsmind-Data-Security\"), \n\t\tarray(\"iconsmind-Data-Settings\" => \"iconsmind-Data-Settings\"), \n\t\tarray(\"iconsmind-Data-Sharing\" => \"iconsmind-Data-Sharing\"), \n\t\tarray(\"iconsmind-Data-Shield\" => \"iconsmind-Data-Shield\"), \n\t\tarray(\"iconsmind-Data-Signal\" => \"iconsmind-Data-Signal\"), \n\t\tarray(\"iconsmind-Data-Storage\" => \"iconsmind-Data-Storage\"), \n\t\tarray(\"iconsmind-Data-Stream\" => \"iconsmind-Data-Stream\"), \n\t\tarray(\"iconsmind-Data-Transfer\" => \"iconsmind-Data-Transfer\"), \n\t\tarray(\"iconsmind-Data-Unlock\" => \"iconsmind-Data-Unlock\"), \n\t\tarray(\"iconsmind-Data-Upload\" => \"iconsmind-Data-Upload\"), \n\t\tarray(\"iconsmind-Data-Yes\" => \"iconsmind-Data-Yes\"), \n\t\tarray(\"iconsmind-Death\" => \"iconsmind-Death\"), \n\t\tarray(\"iconsmind-Debian\" => \"iconsmind-Debian\"), \n\t\tarray(\"iconsmind-Dec\" => \"iconsmind-Dec\"), \n\t\tarray(\"iconsmind-Decrase-Inedit\" => \"iconsmind-Decrase-Inedit\"), \n\t\tarray(\"iconsmind-Deer\" => \"iconsmind-Deer\"), \n\t\tarray(\"iconsmind-Deer-2\" => \"iconsmind-Deer-2\"), \n\t\tarray(\"iconsmind-Delete-File\" => \"iconsmind-Delete-File\"), \n\t\tarray(\"iconsmind-Depression\" => \"iconsmind-Depression\"), \n\t\tarray(\"iconsmind-Device-SyncwithCloud\" => \"iconsmind-Device-SyncwithCloud\"), \n\t\tarray(\"iconsmind-Diamond\" => \"iconsmind-Diamond\"), \n\t\tarray(\"iconsmind-Digital-Drawing\" => \"iconsmind-Digital-Drawing\"), \n\t\tarray(\"iconsmind-Dinosaur\" => \"iconsmind-Dinosaur\"), \n\t\tarray(\"iconsmind-Diploma\" => \"iconsmind-Diploma\"), \n\t\tarray(\"iconsmind-Diploma-2\" => \"iconsmind-Diploma-2\"), \n\t\tarray(\"iconsmind-Disk\" => \"iconsmind-Disk\"), \n\t\tarray(\"iconsmind-Dog\" => \"iconsmind-Dog\"), \n\t\tarray(\"iconsmind-Dollar\" => \"iconsmind-Dollar\"), \n\t\tarray(\"iconsmind-Dollar-Sign\" => \"iconsmind-Dollar-Sign\"), \n\t\tarray(\"iconsmind-Dollar-Sign2\" => \"iconsmind-Dollar-Sign2\"), \n\t\tarray(\"iconsmind-Dolphin\" => \"iconsmind-Dolphin\"), \n\t\tarray(\"iconsmind-Door\" => \"iconsmind-Door\"), \n\t\tarray(\"iconsmind-Double-Circle\" => \"iconsmind-Double-Circle\"), \n\t\tarray(\"iconsmind-Doughnut\" => \"iconsmind-Doughnut\"), \n\t\tarray(\"iconsmind-Dove\" => \"iconsmind-Dove\"), \n\t\tarray(\"iconsmind-Down2\" => \"iconsmind-Down2\"), \n\t\tarray(\"iconsmind-Down-2\" => \"iconsmind-Down-2\"), \n\t\tarray(\"iconsmind-Down-3\" => \"iconsmind-Down-3\"), \n\t\tarray(\"iconsmind-Download2\" => \"iconsmind-Download2\"), \n\t\tarray(\"iconsmind-Download-fromCloud\" => \"iconsmind-Download-fromCloud\"), \n\t\tarray(\"iconsmind-Dress\" => \"iconsmind-Dress\"), \n\t\tarray(\"iconsmind-Duck\" => \"iconsmind-Duck\"), \n\t\tarray(\"iconsmind-DVD\" => \"iconsmind-DVD\"), \n\t\tarray(\"iconsmind-Eagle\" => \"iconsmind-Eagle\"), \n\t\tarray(\"iconsmind-Ear\" => \"iconsmind-Ear\"), \n\t\tarray(\"iconsmind-Eggs\" => \"iconsmind-Eggs\"), \n\t\tarray(\"iconsmind-Egypt\" => \"iconsmind-Egypt\"), \n\t\tarray(\"iconsmind-Eifel-Tower\" => \"iconsmind-Eifel-Tower\"), \n\t\tarray(\"iconsmind-Elbow\" => \"iconsmind-Elbow\"), \n\t\tarray(\"iconsmind-El-Castillo\" => \"iconsmind-El-Castillo\"), \n\t\tarray(\"iconsmind-Elephant\" => \"iconsmind-Elephant\"), \n\t\tarray(\"iconsmind-Embassy\" => \"iconsmind-Embassy\"), \n\t\tarray(\"iconsmind-Empire-StateBuilding\" => \"iconsmind-Empire-StateBuilding\"), \n\t\tarray(\"iconsmind-Empty-Box\" => \"iconsmind-Empty-Box\"), \n\t\tarray(\"iconsmind-End2\" => \"iconsmind-End2\"), \n\t\tarray(\"iconsmind-Envelope\" => \"iconsmind-Envelope\"), \n\t\tarray(\"iconsmind-Envelope-2\" => \"iconsmind-Envelope-2\"), \n\t\tarray(\"iconsmind-Eraser\" => \"iconsmind-Eraser\"), \n\t\tarray(\"iconsmind-Eraser-2\" => \"iconsmind-Eraser-2\"), \n\t\tarray(\"iconsmind-Eraser-3\" => \"iconsmind-Eraser-3\"), \n\t\tarray(\"iconsmind-Euro\" => \"iconsmind-Euro\"), \n\t\tarray(\"iconsmind-Euro-Sign\" => \"iconsmind-Euro-Sign\"), \n\t\tarray(\"iconsmind-Euro-Sign2\" => \"iconsmind-Euro-Sign2\"), \n\t\tarray(\"iconsmind-Evil\" => \"iconsmind-Evil\"), \n\t\tarray(\"iconsmind-Eye2\" => \"iconsmind-Eye2\"), \n\t\tarray(\"iconsmind-Eye-Blind\" => \"iconsmind-Eye-Blind\"), \n\t\tarray(\"iconsmind-Eyebrow\" => \"iconsmind-Eyebrow\"), \n\t\tarray(\"iconsmind-Eyebrow-2\" => \"iconsmind-Eyebrow-2\"), \n\t\tarray(\"iconsmind-Eyebrow-3\" => \"iconsmind-Eyebrow-3\"), \n\t\tarray(\"iconsmind-Eyeglasses-Smiley\" => \"iconsmind-Eyeglasses-Smiley\"), \n\t\tarray(\"iconsmind-Eyeglasses-Smiley2\" => \"iconsmind-Eyeglasses-Smiley2\"), \n\t\tarray(\"iconsmind-Eye-Invisible\" => \"iconsmind-Eye-Invisible\"), \n\t\tarray(\"iconsmind-Eye-Visible\" => \"iconsmind-Eye-Visible\"), \n\t\tarray(\"iconsmind-Face-Style\" => \"iconsmind-Face-Style\"), \n\t\tarray(\"iconsmind-Face-Style2\" => \"iconsmind-Face-Style2\"), \n\t\tarray(\"iconsmind-Face-Style3\" => \"iconsmind-Face-Style3\"), \n\t\tarray(\"iconsmind-Face-Style4\" => \"iconsmind-Face-Style4\"), \n\t\tarray(\"iconsmind-Face-Style5\" => \"iconsmind-Face-Style5\"), \n\t\tarray(\"iconsmind-Face-Style6\" => \"iconsmind-Face-Style6\"), \n\t\tarray(\"iconsmind-Factory2\" => \"iconsmind-Factory2\"), \n\t\tarray(\"iconsmind-Fan\" => \"iconsmind-Fan\"), \n\t\tarray(\"iconsmind-Fashion\" => \"iconsmind-Fashion\"), \n\t\tarray(\"iconsmind-Fax\" => \"iconsmind-Fax\"), \n\t\tarray(\"iconsmind-File\" => \"iconsmind-File\"), \n\t\tarray(\"iconsmind-File-Block\" => \"iconsmind-File-Block\"), \n\t\tarray(\"iconsmind-File-Bookmark\" => \"iconsmind-File-Bookmark\"), \n\t\tarray(\"iconsmind-File-Chart\" => \"iconsmind-File-Chart\"), \n\t\tarray(\"iconsmind-File-Clipboard\" => \"iconsmind-File-Clipboard\"), \n\t\tarray(\"iconsmind-File-ClipboardFileText\" => \"iconsmind-File-ClipboardFileText\"), \n\t\tarray(\"iconsmind-File-ClipboardTextImage\" => \"iconsmind-File-ClipboardTextImage\"), \n\t\tarray(\"iconsmind-File-Cloud\" => \"iconsmind-File-Cloud\"), \n\t\tarray(\"iconsmind-File-Copy\" => \"iconsmind-File-Copy\"), \n\t\tarray(\"iconsmind-File-Copy2\" => \"iconsmind-File-Copy2\"), \n\t\tarray(\"iconsmind-File-CSV\" => \"iconsmind-File-CSV\"), \n\t\tarray(\"iconsmind-File-Download\" => \"iconsmind-File-Download\"), \n\t\tarray(\"iconsmind-File-Edit\" => \"iconsmind-File-Edit\"), \n\t\tarray(\"iconsmind-File-Excel\" => \"iconsmind-File-Excel\"), \n\t\tarray(\"iconsmind-File-Favorite\" => \"iconsmind-File-Favorite\"), \n\t\tarray(\"iconsmind-File-Fire\" => \"iconsmind-File-Fire\"), \n\t\tarray(\"iconsmind-File-Graph\" => \"iconsmind-File-Graph\"), \n\t\tarray(\"iconsmind-File-Hide\" => \"iconsmind-File-Hide\"), \n\t\tarray(\"iconsmind-File-Horizontal\" => \"iconsmind-File-Horizontal\"), \n\t\tarray(\"iconsmind-File-HorizontalText\" => \"iconsmind-File-HorizontalText\"), \n\t\tarray(\"iconsmind-File-HTML\" => \"iconsmind-File-HTML\"), \n\t\tarray(\"iconsmind-File-JPG\" => \"iconsmind-File-JPG\"), \n\t\tarray(\"iconsmind-File-Link\" => \"iconsmind-File-Link\"), \n\t\tarray(\"iconsmind-File-Loading\" => \"iconsmind-File-Loading\"), \n\t\tarray(\"iconsmind-File-Lock\" => \"iconsmind-File-Lock\"), \n\t\tarray(\"iconsmind-File-Love\" => \"iconsmind-File-Love\"), \n\t\tarray(\"iconsmind-File-Music\" => \"iconsmind-File-Music\"), \n\t\tarray(\"iconsmind-File-Network\" => \"iconsmind-File-Network\"), \n\t\tarray(\"iconsmind-File-Pictures\" => \"iconsmind-File-Pictures\"), \n\t\tarray(\"iconsmind-File-Pie\" => \"iconsmind-File-Pie\"), \n\t\tarray(\"iconsmind-File-Presentation\" => \"iconsmind-File-Presentation\"), \n\t\tarray(\"iconsmind-File-Refresh\" => \"iconsmind-File-Refresh\"), \n\t\tarray(\"iconsmind-Files\" => \"iconsmind-Files\"), \n\t\tarray(\"iconsmind-File-Search\" => \"iconsmind-File-Search\"), \n\t\tarray(\"iconsmind-File-Settings\" => \"iconsmind-File-Settings\"), \n\t\tarray(\"iconsmind-File-Share\" => \"iconsmind-File-Share\"), \n\t\tarray(\"iconsmind-File-TextImage\" => \"iconsmind-File-TextImage\"), \n\t\tarray(\"iconsmind-File-Trash\" => \"iconsmind-File-Trash\"), \n\t\tarray(\"iconsmind-File-TXT\" => \"iconsmind-File-TXT\"), \n\t\tarray(\"iconsmind-File-Upload\" => \"iconsmind-File-Upload\"), \n\t\tarray(\"iconsmind-File-Video\" => \"iconsmind-File-Video\"), \n\t\tarray(\"iconsmind-File-Word\" => \"iconsmind-File-Word\"), \n\t\tarray(\"iconsmind-File-Zip\" => \"iconsmind-File-Zip\"), \n\t\tarray(\"iconsmind-Financial\" => \"iconsmind-Financial\"), \n\t\tarray(\"iconsmind-Finger\" => \"iconsmind-Finger\"), \n\t\tarray(\"iconsmind-Fingerprint\" => \"iconsmind-Fingerprint\"), \n\t\tarray(\"iconsmind-Fingerprint-2\" => \"iconsmind-Fingerprint-2\"), \n\t\tarray(\"iconsmind-Firefox\" => \"iconsmind-Firefox\"), \n\t\tarray(\"iconsmind-Fire-Staion\" => \"iconsmind-Fire-Staion\"), \n\t\tarray(\"iconsmind-Fish\" => \"iconsmind-Fish\"), \n\t\tarray(\"iconsmind-Fit-To\" => \"iconsmind-Fit-To\"), \n\t\tarray(\"iconsmind-Fit-To2\" => \"iconsmind-Fit-To2\"), \n\t\tarray(\"iconsmind-Flag2\" => \"iconsmind-Flag2\"), \n\t\tarray(\"iconsmind-Flag-22\" => \"iconsmind-Flag-22\"), \n\t\tarray(\"iconsmind-Flag-3\" => \"iconsmind-Flag-3\"), \n\t\tarray(\"iconsmind-Flag-4\" => \"iconsmind-Flag-4\"), \n\t\tarray(\"iconsmind-Flamingo\" => \"iconsmind-Flamingo\"), \n\t\tarray(\"iconsmind-Folder\" => \"iconsmind-Folder\"), \n\t\tarray(\"iconsmind-Folder-Add\" => \"iconsmind-Folder-Add\"), \n\t\tarray(\"iconsmind-Folder-Archive\" => \"iconsmind-Folder-Archive\"), \n\t\tarray(\"iconsmind-Folder-Binder\" => \"iconsmind-Folder-Binder\"), \n\t\tarray(\"iconsmind-Folder-Binder2\" => \"iconsmind-Folder-Binder2\"), \n\t\tarray(\"iconsmind-Folder-Block\" => \"iconsmind-Folder-Block\"), \n\t\tarray(\"iconsmind-Folder-Bookmark\" => \"iconsmind-Folder-Bookmark\"), \n\t\tarray(\"iconsmind-Folder-Close\" => \"iconsmind-Folder-Close\"), \n\t\tarray(\"iconsmind-Folder-Cloud\" => \"iconsmind-Folder-Cloud\"), \n\t\tarray(\"iconsmind-Folder-Delete\" => \"iconsmind-Folder-Delete\"), \n\t\tarray(\"iconsmind-Folder-Download\" => \"iconsmind-Folder-Download\"), \n\t\tarray(\"iconsmind-Folder-Edit\" => \"iconsmind-Folder-Edit\"), \n\t\tarray(\"iconsmind-Folder-Favorite\" => \"iconsmind-Folder-Favorite\"), \n\t\tarray(\"iconsmind-Folder-Fire\" => \"iconsmind-Folder-Fire\"), \n\t\tarray(\"iconsmind-Folder-Hide\" => \"iconsmind-Folder-Hide\"), \n\t\tarray(\"iconsmind-Folder-Link\" => \"iconsmind-Folder-Link\"), \n\t\tarray(\"iconsmind-Folder-Loading\" => \"iconsmind-Folder-Loading\"), \n\t\tarray(\"iconsmind-Folder-Lock\" => \"iconsmind-Folder-Lock\"), \n\t\tarray(\"iconsmind-Folder-Love\" => \"iconsmind-Folder-Love\"), \n\t\tarray(\"iconsmind-Folder-Music\" => \"iconsmind-Folder-Music\"), \n\t\tarray(\"iconsmind-Folder-Network\" => \"iconsmind-Folder-Network\"), \n\t\tarray(\"iconsmind-Folder-Open\" => \"iconsmind-Folder-Open\"), \n\t\tarray(\"iconsmind-Folder-Open2\" => \"iconsmind-Folder-Open2\"), \n\t\tarray(\"iconsmind-Folder-Organizing\" => \"iconsmind-Folder-Organizing\"), \n\t\tarray(\"iconsmind-Folder-Pictures\" => \"iconsmind-Folder-Pictures\"), \n\t\tarray(\"iconsmind-Folder-Refresh\" => \"iconsmind-Folder-Refresh\"), \n\t\tarray(\"iconsmind-Folder-Remove\" => \"iconsmind-Folder-Remove\"), \n\t\tarray(\"iconsmind-Folders\" => \"iconsmind-Folders\"), \n\t\tarray(\"iconsmind-Folder-Search\" => \"iconsmind-Folder-Search\"), \n\t\tarray(\"iconsmind-Folder-Settings\" => \"iconsmind-Folder-Settings\"), \n\t\tarray(\"iconsmind-Folder-Share\" => \"iconsmind-Folder-Share\"), \n\t\tarray(\"iconsmind-Folder-Trash\" => \"iconsmind-Folder-Trash\"), \n\t\tarray(\"iconsmind-Folder-Upload\" => \"iconsmind-Folder-Upload\"), \n\t\tarray(\"iconsmind-Folder-Video\" => \"iconsmind-Folder-Video\"), \n\t\tarray(\"iconsmind-Folder-WithDocument\" => \"iconsmind-Folder-WithDocument\"), \n\t\tarray(\"iconsmind-Folder-Zip\" => \"iconsmind-Folder-Zip\"), \n\t\tarray(\"iconsmind-Foot\" => \"iconsmind-Foot\"), \n\t\tarray(\"iconsmind-Foot-2\" => \"iconsmind-Foot-2\"), \n\t\tarray(\"iconsmind-Fork\" => \"iconsmind-Fork\"), \n\t\tarray(\"iconsmind-Formula\" => \"iconsmind-Formula\"), \n\t\tarray(\"iconsmind-Fountain-Pen\" => \"iconsmind-Fountain-Pen\"), \n\t\tarray(\"iconsmind-Fox\" => \"iconsmind-Fox\"), \n\t\tarray(\"iconsmind-Frankenstein\" => \"iconsmind-Frankenstein\"), \n\t\tarray(\"iconsmind-French-Fries\" => \"iconsmind-French-Fries\"), \n\t\tarray(\"iconsmind-Frog\" => \"iconsmind-Frog\"), \n\t\tarray(\"iconsmind-Fruits\" => \"iconsmind-Fruits\"), \n\t\tarray(\"iconsmind-Full-Screen\" => \"iconsmind-Full-Screen\"), \n\t\tarray(\"iconsmind-Full-Screen2\" => \"iconsmind-Full-Screen2\"), \n\t\tarray(\"iconsmind-Full-View\" => \"iconsmind-Full-View\"), \n\t\tarray(\"iconsmind-Full-View2\" => \"iconsmind-Full-View2\"), \n\t\tarray(\"iconsmind-Funky\" => \"iconsmind-Funky\"), \n\t\tarray(\"iconsmind-Funny-Bicycle\" => \"iconsmind-Funny-Bicycle\"), \n\t\tarray(\"iconsmind-Gamepad\" => \"iconsmind-Gamepad\"), \n\t\tarray(\"iconsmind-Gamepad-2\" => \"iconsmind-Gamepad-2\"), \n\t\tarray(\"iconsmind-Gay\" => \"iconsmind-Gay\"), \n\t\tarray(\"iconsmind-Geek2\" => \"iconsmind-Geek2\"), \n\t\tarray(\"iconsmind-Gentleman\" => \"iconsmind-Gentleman\"), \n\t\tarray(\"iconsmind-Giraffe\" => \"iconsmind-Giraffe\"), \n\t\tarray(\"iconsmind-Glasses\" => \"iconsmind-Glasses\"), \n\t\tarray(\"iconsmind-Glasses-2\" => \"iconsmind-Glasses-2\"), \n\t\tarray(\"iconsmind-Glasses-3\" => \"iconsmind-Glasses-3\"), \n\t\tarray(\"iconsmind-Glass-Water\" => \"iconsmind-Glass-Water\"), \n\t\tarray(\"iconsmind-Gloves\" => \"iconsmind-Gloves\"), \n\t\tarray(\"iconsmind-Go-Bottom\" => \"iconsmind-Go-Bottom\"), \n\t\tarray(\"iconsmind-Gorilla\" => \"iconsmind-Gorilla\"), \n\t\tarray(\"iconsmind-Go-Top\" => \"iconsmind-Go-Top\"), \n\t\tarray(\"iconsmind-Grave\" => \"iconsmind-Grave\"), \n\t\tarray(\"iconsmind-Graveyard\" => \"iconsmind-Graveyard\"), \n\t\tarray(\"iconsmind-Greece\" => \"iconsmind-Greece\"), \n\t\tarray(\"iconsmind-Hair\" => \"iconsmind-Hair\"), \n\t\tarray(\"iconsmind-Hair-2\" => \"iconsmind-Hair-2\"), \n\t\tarray(\"iconsmind-Hair-3\" => \"iconsmind-Hair-3\"), \n\t\tarray(\"iconsmind-Halloween-HalfMoon\" => \"iconsmind-Halloween-HalfMoon\"), \n\t\tarray(\"iconsmind-Halloween-Moon\" => \"iconsmind-Halloween-Moon\"), \n\t\tarray(\"iconsmind-Hamburger\" => \"iconsmind-Hamburger\"), \n\t\tarray(\"iconsmind-Hand\" => \"iconsmind-Hand\"), \n\t\tarray(\"iconsmind-Hands\" => \"iconsmind-Hands\"), \n\t\tarray(\"iconsmind-Handshake\" => \"iconsmind-Handshake\"), \n\t\tarray(\"iconsmind-Hanger\" => \"iconsmind-Hanger\"), \n\t\tarray(\"iconsmind-Happy\" => \"iconsmind-Happy\"), \n\t\tarray(\"iconsmind-Hat\" => \"iconsmind-Hat\"), \n\t\tarray(\"iconsmind-Hat-2\" => \"iconsmind-Hat-2\"), \n\t\tarray(\"iconsmind-Haunted-House\" => \"iconsmind-Haunted-House\"), \n\t\tarray(\"iconsmind-HD\" => \"iconsmind-HD\"), \n\t\tarray(\"iconsmind-HDD\" => \"iconsmind-HDD\"), \n\t\tarray(\"iconsmind-Heart2\" => \"iconsmind-Heart2\"), \n\t\tarray(\"iconsmind-Heels\" => \"iconsmind-Heels\"), \n\t\tarray(\"iconsmind-Heels-2\" => \"iconsmind-Heels-2\"), \n\t\tarray(\"iconsmind-Hello\" => \"iconsmind-Hello\"), \n\t\tarray(\"iconsmind-Hipo\" => \"iconsmind-Hipo\"), \n\t\tarray(\"iconsmind-Hipster-Glasses\" => \"iconsmind-Hipster-Glasses\"), \n\t\tarray(\"iconsmind-Hipster-Glasses2\" => \"iconsmind-Hipster-Glasses2\"), \n\t\tarray(\"iconsmind-Hipster-Glasses3\" => \"iconsmind-Hipster-Glasses3\"), \n\t\tarray(\"iconsmind-Hipster-Headphones\" => \"iconsmind-Hipster-Headphones\"), \n\t\tarray(\"iconsmind-Hipster-Men\" => \"iconsmind-Hipster-Men\"), \n\t\tarray(\"iconsmind-Hipster-Men2\" => \"iconsmind-Hipster-Men2\"), \n\t\tarray(\"iconsmind-Hipster-Men3\" => \"iconsmind-Hipster-Men3\"), \n\t\tarray(\"iconsmind-Hipster-Sunglasses\" => \"iconsmind-Hipster-Sunglasses\"), \n\t\tarray(\"iconsmind-Hipster-Sunglasses2\" => \"iconsmind-Hipster-Sunglasses2\"), \n\t\tarray(\"iconsmind-Hipster-Sunglasses3\" => \"iconsmind-Hipster-Sunglasses3\"), \n\t\tarray(\"iconsmind-Holly\" => \"iconsmind-Holly\"), \n\t\tarray(\"iconsmind-Home2\" => \"iconsmind-Home2\"), \n\t\tarray(\"iconsmind-Home-2\" => \"iconsmind-Home-2\"), \n\t\tarray(\"iconsmind-Home-3\" => \"iconsmind-Home-3\"), \n\t\tarray(\"iconsmind-Home-4\" => \"iconsmind-Home-4\"), \n\t\tarray(\"iconsmind-Honey\" => \"iconsmind-Honey\"), \n\t\tarray(\"iconsmind-Hong-Kong\" => \"iconsmind-Hong-Kong\"), \n\t\tarray(\"iconsmind-Hoodie\" => \"iconsmind-Hoodie\"), \n\t\tarray(\"iconsmind-Horror\" => \"iconsmind-Horror\"), \n\t\tarray(\"iconsmind-Horse\" => \"iconsmind-Horse\"), \n\t\tarray(\"iconsmind-Hospital2\" => \"iconsmind-Hospital2\"), \n\t\tarray(\"iconsmind-Host\" => \"iconsmind-Host\"), \n\t\tarray(\"iconsmind-Hot-Dog\" => \"iconsmind-Hot-Dog\"), \n\t\tarray(\"iconsmind-Hotel\" => \"iconsmind-Hotel\"), \n\t\tarray(\"iconsmind-Hub\" => \"iconsmind-Hub\"), \n\t\tarray(\"iconsmind-Humor\" => \"iconsmind-Humor\"), \n\t\tarray(\"iconsmind-Ice-Cream\" => \"iconsmind-Ice-Cream\"), \n\t\tarray(\"iconsmind-Idea\" => \"iconsmind-Idea\"), \n\t\tarray(\"iconsmind-Inbox\" => \"iconsmind-Inbox\"), \n\t\tarray(\"iconsmind-Inbox-Empty\" => \"iconsmind-Inbox-Empty\"), \n\t\tarray(\"iconsmind-Inbox-Forward\" => \"iconsmind-Inbox-Forward\"), \n\t\tarray(\"iconsmind-Inbox-Full\" => \"iconsmind-Inbox-Full\"), \n\t\tarray(\"iconsmind-Inbox-Into\" => \"iconsmind-Inbox-Into\"), \n\t\tarray(\"iconsmind-Inbox-Out\" => \"iconsmind-Inbox-Out\"), \n\t\tarray(\"iconsmind-Inbox-Reply\" => \"iconsmind-Inbox-Reply\"), \n\t\tarray(\"iconsmind-Increase-Inedit\" => \"iconsmind-Increase-Inedit\"), \n\t\tarray(\"iconsmind-Indent-FirstLine\" => \"iconsmind-Indent-FirstLine\"), \n\t\tarray(\"iconsmind-Indent-LeftMargin\" => \"iconsmind-Indent-LeftMargin\"), \n\t\tarray(\"iconsmind-Indent-RightMargin\" => \"iconsmind-Indent-RightMargin\"), \n\t\tarray(\"iconsmind-India\" => \"iconsmind-India\"), \n\t\tarray(\"iconsmind-Internet-Explorer\" => \"iconsmind-Internet-Explorer\"), \n\t\tarray(\"iconsmind-Internet-Smiley\" => \"iconsmind-Internet-Smiley\"), \n\t\tarray(\"iconsmind-iOS-Apple\" => \"iconsmind-iOS-Apple\"), \n\t\tarray(\"iconsmind-Israel\" => \"iconsmind-Israel\"), \n\t\tarray(\"iconsmind-Jacket\" => \"iconsmind-Jacket\"), \n\t\tarray(\"iconsmind-Jamaica\" => \"iconsmind-Jamaica\"), \n\t\tarray(\"iconsmind-Japan\" => \"iconsmind-Japan\"), \n\t\tarray(\"iconsmind-Japanese-Gate\" => \"iconsmind-Japanese-Gate\"), \n\t\tarray(\"iconsmind-Jeans\" => \"iconsmind-Jeans\"), \n\t\tarray(\"iconsmind-Joystick\" => \"iconsmind-Joystick\"), \n\t\tarray(\"iconsmind-Juice\" => \"iconsmind-Juice\"), \n\t\tarray(\"iconsmind-Kangoroo\" => \"iconsmind-Kangoroo\"), \n\t\tarray(\"iconsmind-Kenya\" => \"iconsmind-Kenya\"), \n\t\tarray(\"iconsmind-Keyboard\" => \"iconsmind-Keyboard\"), \n\t\tarray(\"iconsmind-Keypad\" => \"iconsmind-Keypad\"), \n\t\tarray(\"iconsmind-King\" => \"iconsmind-King\"), \n\t\tarray(\"iconsmind-Kiss\" => \"iconsmind-Kiss\"), \n\t\tarray(\"iconsmind-Knee\" => \"iconsmind-Knee\"), \n\t\tarray(\"iconsmind-Knife\" => \"iconsmind-Knife\"), \n\t\tarray(\"iconsmind-Knight\" => \"iconsmind-Knight\"), \n\t\tarray(\"iconsmind-Koala\" => \"iconsmind-Koala\"), \n\t\tarray(\"iconsmind-Korea\" => \"iconsmind-Korea\"), \n\t\tarray(\"iconsmind-Lantern\" => \"iconsmind-Lantern\"), \n\t\tarray(\"iconsmind-Laptop\" => \"iconsmind-Laptop\"), \n\t\tarray(\"iconsmind-Laptop-2\" => \"iconsmind-Laptop-2\"), \n\t\tarray(\"iconsmind-Laptop-3\" => \"iconsmind-Laptop-3\"), \n\t\tarray(\"iconsmind-Laptop-Phone\" => \"iconsmind-Laptop-Phone\"), \n\t\tarray(\"iconsmind-Laptop-Tablet\" => \"iconsmind-Laptop-Tablet\"), \n\t\tarray(\"iconsmind-Laughing\" => \"iconsmind-Laughing\"), \n\t\tarray(\"iconsmind-Leaning-Tower\" => \"iconsmind-Leaning-Tower\"), \n\t\tarray(\"iconsmind-Left2\" => \"iconsmind-Left2\"), \n\t\tarray(\"iconsmind-Left-2\" => \"iconsmind-Left-2\"), \n\t\tarray(\"iconsmind-Left-3\" => \"iconsmind-Left-3\"), \n\t\tarray(\"iconsmind-Left-ToRight\" => \"iconsmind-Left-ToRight\"), \n\t\tarray(\"iconsmind-Leg\" => \"iconsmind-Leg\"), \n\t\tarray(\"iconsmind-Leg-2\" => \"iconsmind-Leg-2\"), \n\t\tarray(\"iconsmind-Lemon\" => \"iconsmind-Lemon\"), \n\t\tarray(\"iconsmind-Leopard\" => \"iconsmind-Leopard\"), \n\t\tarray(\"iconsmind-Letter-Close\" => \"iconsmind-Letter-Close\"), \n\t\tarray(\"iconsmind-Letter-Open\" => \"iconsmind-Letter-Open\"), \n\t\tarray(\"iconsmind-Letter-Sent\" => \"iconsmind-Letter-Sent\"), \n\t\tarray(\"iconsmind-Library2\" => \"iconsmind-Library2\"), \n\t\tarray(\"iconsmind-Lighthouse\" => \"iconsmind-Lighthouse\"), \n\t\tarray(\"iconsmind-Line-Chart\" => \"iconsmind-Line-Chart\"), \n\t\tarray(\"iconsmind-Line-Chart2\" => \"iconsmind-Line-Chart2\"), \n\t\tarray(\"iconsmind-Line-Chart3\" => \"iconsmind-Line-Chart3\"), \n\t\tarray(\"iconsmind-Line-Chart4\" => \"iconsmind-Line-Chart4\"), \n\t\tarray(\"iconsmind-Line-Spacing\" => \"iconsmind-Line-Spacing\"), \n\t\tarray(\"iconsmind-Linux\" => \"iconsmind-Linux\"), \n\t\tarray(\"iconsmind-Lion\" => \"iconsmind-Lion\"), \n\t\tarray(\"iconsmind-Lollipop\" => \"iconsmind-Lollipop\"), \n\t\tarray(\"iconsmind-Lollipop-2\" => \"iconsmind-Lollipop-2\"), \n\t\tarray(\"iconsmind-Loop\" => \"iconsmind-Loop\"), \n\t\tarray(\"iconsmind-Love2\" => \"iconsmind-Love2\"), \n\t\tarray(\"iconsmind-Mail\" => \"iconsmind-Mail\"), \n\t\tarray(\"iconsmind-Mail-2\" => \"iconsmind-Mail-2\"), \n\t\tarray(\"iconsmind-Mail-3\" => \"iconsmind-Mail-3\"), \n\t\tarray(\"iconsmind-Mail-Add\" => \"iconsmind-Mail-Add\"), \n\t\tarray(\"iconsmind-Mail-Attachement\" => \"iconsmind-Mail-Attachement\"), \n\t\tarray(\"iconsmind-Mail-Block\" => \"iconsmind-Mail-Block\"), \n\t\tarray(\"iconsmind-Mailbox-Empty\" => \"iconsmind-Mailbox-Empty\"), \n\t\tarray(\"iconsmind-Mailbox-Full\" => \"iconsmind-Mailbox-Full\"), \n\t\tarray(\"iconsmind-Mail-Delete\" => \"iconsmind-Mail-Delete\"), \n\t\tarray(\"iconsmind-Mail-Favorite\" => \"iconsmind-Mail-Favorite\"), \n\t\tarray(\"iconsmind-Mail-Forward\" => \"iconsmind-Mail-Forward\"), \n\t\tarray(\"iconsmind-Mail-Gallery\" => \"iconsmind-Mail-Gallery\"), \n\t\tarray(\"iconsmind-Mail-Inbox\" => \"iconsmind-Mail-Inbox\"), \n\t\tarray(\"iconsmind-Mail-Link\" => \"iconsmind-Mail-Link\"), \n\t\tarray(\"iconsmind-Mail-Lock\" => \"iconsmind-Mail-Lock\"), \n\t\tarray(\"iconsmind-Mail-Love\" => \"iconsmind-Mail-Love\"), \n\t\tarray(\"iconsmind-Mail-Money\" => \"iconsmind-Mail-Money\"), \n\t\tarray(\"iconsmind-Mail-Open\" => \"iconsmind-Mail-Open\"), \n\t\tarray(\"iconsmind-Mail-Outbox\" => \"iconsmind-Mail-Outbox\"), \n\t\tarray(\"iconsmind-Mail-Password\" => \"iconsmind-Mail-Password\"), \n\t\tarray(\"iconsmind-Mail-Photo\" => \"iconsmind-Mail-Photo\"), \n\t\tarray(\"iconsmind-Mail-Read\" => \"iconsmind-Mail-Read\"), \n\t\tarray(\"iconsmind-Mail-Removex\" => \"iconsmind-Mail-Removex\"), \n\t\tarray(\"iconsmind-Mail-Reply\" => \"iconsmind-Mail-Reply\"), \n\t\tarray(\"iconsmind-Mail-ReplyAll\" => \"iconsmind-Mail-ReplyAll\"), \n\t\tarray(\"iconsmind-Mail-Search\" => \"iconsmind-Mail-Search\"), \n\t\tarray(\"iconsmind-Mail-Send\" => \"iconsmind-Mail-Send\"), \n\t\tarray(\"iconsmind-Mail-Settings\" => \"iconsmind-Mail-Settings\"), \n\t\tarray(\"iconsmind-Mail-Unread\" => \"iconsmind-Mail-Unread\"), \n\t\tarray(\"iconsmind-Mail-Video\" => \"iconsmind-Mail-Video\"), \n\t\tarray(\"iconsmind-Mail-withAtSign\" => \"iconsmind-Mail-withAtSign\"), \n\t\tarray(\"iconsmind-Mail-WithCursors\" => \"iconsmind-Mail-WithCursors\"), \n\t\tarray(\"iconsmind-Mans-Underwear\" => \"iconsmind-Mans-Underwear\"), \n\t\tarray(\"iconsmind-Mans-Underwear2\" => \"iconsmind-Mans-Underwear2\"), \n\t\tarray(\"iconsmind-Marker\" => \"iconsmind-Marker\"), \n\t\tarray(\"iconsmind-Marker-2\" => \"iconsmind-Marker-2\"), \n\t\tarray(\"iconsmind-Marker-3\" => \"iconsmind-Marker-3\"), \n\t\tarray(\"iconsmind-Martini-Glass\" => \"iconsmind-Martini-Glass\"), \n\t\tarray(\"iconsmind-Master-Card\" => \"iconsmind-Master-Card\"), \n\t\tarray(\"iconsmind-Maximize\" => \"iconsmind-Maximize\"), \n\t\tarray(\"iconsmind-Megaphone\" => \"iconsmind-Megaphone\"), \n\t\tarray(\"iconsmind-Mexico\" => \"iconsmind-Mexico\"), \n\t\tarray(\"iconsmind-Milk-Bottle\" => \"iconsmind-Milk-Bottle\"), \n\t\tarray(\"iconsmind-Minimize\" => \"iconsmind-Minimize\"), \n\t\tarray(\"iconsmind-Money\" => \"iconsmind-Money\"), \n\t\tarray(\"iconsmind-Money-2\" => \"iconsmind-Money-2\"), \n\t\tarray(\"iconsmind-Money-Bag\" => \"iconsmind-Money-Bag\"), \n\t\tarray(\"iconsmind-Monitor\" => \"iconsmind-Monitor\"), \n\t\tarray(\"iconsmind-Monitor-2\" => \"iconsmind-Monitor-2\"), \n\t\tarray(\"iconsmind-Monitor-3\" => \"iconsmind-Monitor-3\"), \n\t\tarray(\"iconsmind-Monitor-4\" => \"iconsmind-Monitor-4\"), \n\t\tarray(\"iconsmind-Monitor-5\" => \"iconsmind-Monitor-5\"), \n\t\tarray(\"iconsmind-Monitor-Laptop\" => \"iconsmind-Monitor-Laptop\"), \n\t\tarray(\"iconsmind-Monitor-phone\" => \"iconsmind-Monitor-phone\"), \n\t\tarray(\"iconsmind-Monitor-Tablet\" => \"iconsmind-Monitor-Tablet\"), \n\t\tarray(\"iconsmind-Monitor-Vertical\" => \"iconsmind-Monitor-Vertical\"), \n\t\tarray(\"iconsmind-Monkey\" => \"iconsmind-Monkey\"), \n\t\tarray(\"iconsmind-Monster\" => \"iconsmind-Monster\"), \n\t\tarray(\"iconsmind-Morocco\" => \"iconsmind-Morocco\"), \n\t\tarray(\"iconsmind-Mouse\" => \"iconsmind-Mouse\"), \n\t\tarray(\"iconsmind-Mouse-2\" => \"iconsmind-Mouse-2\"), \n\t\tarray(\"iconsmind-Mouse-3\" => \"iconsmind-Mouse-3\"), \n\t\tarray(\"iconsmind-Moustache-Smiley\" => \"iconsmind-Moustache-Smiley\"), \n\t\tarray(\"iconsmind-Museum\" => \"iconsmind-Museum\"), \n\t\tarray(\"iconsmind-Mushroom\" => \"iconsmind-Mushroom\"), \n\t\tarray(\"iconsmind-Mustache\" => \"iconsmind-Mustache\"), \n\t\tarray(\"iconsmind-Mustache-2\" => \"iconsmind-Mustache-2\"), \n\t\tarray(\"iconsmind-Mustache-3\" => \"iconsmind-Mustache-3\"), \n\t\tarray(\"iconsmind-Mustache-4\" => \"iconsmind-Mustache-4\"), \n\t\tarray(\"iconsmind-Mustache-5\" => \"iconsmind-Mustache-5\"), \n\t\tarray(\"iconsmind-Navigate-End\" => \"iconsmind-Navigate-End\"), \n\t\tarray(\"iconsmind-Navigat-Start\" => \"iconsmind-Navigat-Start\"), \n\t\tarray(\"iconsmind-Nepal\" => \"iconsmind-Nepal\"), \n\t\tarray(\"iconsmind-Netscape\" => \"iconsmind-Netscape\"), \n\t\tarray(\"iconsmind-New-Mail\" => \"iconsmind-New-Mail\"), \n\t\tarray(\"iconsmind-Newspaper\" => \"iconsmind-Newspaper\"), \n\t\tarray(\"iconsmind-Newspaper-2\" => \"iconsmind-Newspaper-2\"), \n\t\tarray(\"iconsmind-No-Battery\" => \"iconsmind-No-Battery\"), \n\t\tarray(\"iconsmind-Noose\" => \"iconsmind-Noose\"), \n\t\tarray(\"iconsmind-Note\" => \"iconsmind-Note\"), \n\t\tarray(\"iconsmind-Notepad\" => \"iconsmind-Notepad\"), \n\t\tarray(\"iconsmind-Notepad-2\" => \"iconsmind-Notepad-2\"), \n\t\tarray(\"iconsmind-Office\" => \"iconsmind-Office\"), \n\t\tarray(\"iconsmind-Old-Camera\" => \"iconsmind-Old-Camera\"), \n\t\tarray(\"iconsmind-Old-Cassette\" => \"iconsmind-Old-Cassette\"), \n\t\tarray(\"iconsmind-Old-Sticky\" => \"iconsmind-Old-Sticky\"), \n\t\tarray(\"iconsmind-Old-Sticky2\" => \"iconsmind-Old-Sticky2\"), \n\t\tarray(\"iconsmind-Old-Telephone\" => \"iconsmind-Old-Telephone\"), \n\t\tarray(\"iconsmind-Open-Banana\" => \"iconsmind-Open-Banana\"), \n\t\tarray(\"iconsmind-Open-Book\" => \"iconsmind-Open-Book\"), \n\t\tarray(\"iconsmind-Opera\" => \"iconsmind-Opera\"), \n\t\tarray(\"iconsmind-Opera-House\" => \"iconsmind-Opera-House\"), \n\t\tarray(\"iconsmind-Orientation2\" => \"iconsmind-Orientation2\"), \n\t\tarray(\"iconsmind-Orientation-2\" => \"iconsmind-Orientation-2\"), \n\t\tarray(\"iconsmind-Ornament\" => \"iconsmind-Ornament\"), \n\t\tarray(\"iconsmind-Owl\" => \"iconsmind-Owl\"), \n\t\tarray(\"iconsmind-Paintbrush\" => \"iconsmind-Paintbrush\"), \n\t\tarray(\"iconsmind-Palette\" => \"iconsmind-Palette\"), \n\t\tarray(\"iconsmind-Panda\" => \"iconsmind-Panda\"), \n\t\tarray(\"iconsmind-Pantheon\" => \"iconsmind-Pantheon\"), \n\t\tarray(\"iconsmind-Pantone\" => \"iconsmind-Pantone\"), \n\t\tarray(\"iconsmind-Pants\" => \"iconsmind-Pants\"), \n\t\tarray(\"iconsmind-Paper\" => \"iconsmind-Paper\"), \n\t\tarray(\"iconsmind-Parrot\" => \"iconsmind-Parrot\"), \n\t\tarray(\"iconsmind-Pawn\" => \"iconsmind-Pawn\"), \n\t\tarray(\"iconsmind-Pen\" => \"iconsmind-Pen\"), \n\t\tarray(\"iconsmind-Pen-2\" => \"iconsmind-Pen-2\"), \n\t\tarray(\"iconsmind-Pen-3\" => \"iconsmind-Pen-3\"), \n\t\tarray(\"iconsmind-Pen-4\" => \"iconsmind-Pen-4\"), \n\t\tarray(\"iconsmind-Pen-5\" => \"iconsmind-Pen-5\"), \n\t\tarray(\"iconsmind-Pen-6\" => \"iconsmind-Pen-6\"), \n\t\tarray(\"iconsmind-Pencil\" => \"iconsmind-Pencil\"), \n\t\tarray(\"iconsmind-Pencil-Ruler\" => \"iconsmind-Pencil-Ruler\"), \n\t\tarray(\"iconsmind-Penguin\" => \"iconsmind-Penguin\"), \n\t\tarray(\"iconsmind-Pentagon\" => \"iconsmind-Pentagon\"), \n\t\tarray(\"iconsmind-People-onCloud\" => \"iconsmind-People-onCloud\"), \n\t\tarray(\"iconsmind-Pepper\" => \"iconsmind-Pepper\"), \n\t\tarray(\"iconsmind-Pepper-withFire\" => \"iconsmind-Pepper-withFire\"), \n\t\tarray(\"iconsmind-Petronas-Tower\" => \"iconsmind-Petronas-Tower\"), \n\t\tarray(\"iconsmind-Philipines\" => \"iconsmind-Philipines\"), \n\t\tarray(\"iconsmind-Phone\" => \"iconsmind-Phone\"), \n\t\tarray(\"iconsmind-Phone-2\" => \"iconsmind-Phone-2\"), \n\t\tarray(\"iconsmind-Phone-3\" => \"iconsmind-Phone-3\"), \n\t\tarray(\"iconsmind-Phone-3G\" => \"iconsmind-Phone-3G\"), \n\t\tarray(\"iconsmind-Phone-4G\" => \"iconsmind-Phone-4G\"), \n\t\tarray(\"iconsmind-Phone-Simcard\" => \"iconsmind-Phone-Simcard\"), \n\t\tarray(\"iconsmind-Phone-SMS\" => \"iconsmind-Phone-SMS\"), \n\t\tarray(\"iconsmind-Phone-Wifi\" => \"iconsmind-Phone-Wifi\"), \n\t\tarray(\"iconsmind-Pi\" => \"iconsmind-Pi\"), \n\t\tarray(\"iconsmind-Pie-Chart\" => \"iconsmind-Pie-Chart\"), \n\t\tarray(\"iconsmind-Pie-Chart2\" => \"iconsmind-Pie-Chart2\"), \n\t\tarray(\"iconsmind-Pie-Chart3\" => \"iconsmind-Pie-Chart3\"), \n\t\tarray(\"iconsmind-Pipette\" => \"iconsmind-Pipette\"), \n\t\tarray(\"iconsmind-Piramids\" => \"iconsmind-Piramids\"), \n\t\tarray(\"iconsmind-Pizza\" => \"iconsmind-Pizza\"), \n\t\tarray(\"iconsmind-Pizza-Slice\" => \"iconsmind-Pizza-Slice\"), \n\t\tarray(\"iconsmind-Plastic-CupPhone\" => \"iconsmind-Plastic-CupPhone\"), \n\t\tarray(\"iconsmind-Plastic-CupPhone2\" => \"iconsmind-Plastic-CupPhone2\"), \n\t\tarray(\"iconsmind-Plate\" => \"iconsmind-Plate\"), \n\t\tarray(\"iconsmind-Plates\" => \"iconsmind-Plates\"), \n\t\tarray(\"iconsmind-Plug-In\" => \"iconsmind-Plug-In\"), \n\t\tarray(\"iconsmind-Plug-In2\" => \"iconsmind-Plug-In2\"), \n\t\tarray(\"iconsmind-Poland\" => \"iconsmind-Poland\"), \n\t\tarray(\"iconsmind-Police-Station\" => \"iconsmind-Police-Station\"), \n\t\tarray(\"iconsmind-Polo-Shirt\" => \"iconsmind-Polo-Shirt\"), \n\t\tarray(\"iconsmind-Portugal\" => \"iconsmind-Portugal\"), \n\t\tarray(\"iconsmind-Post-Mail\" => \"iconsmind-Post-Mail\"), \n\t\tarray(\"iconsmind-Post-Mail2\" => \"iconsmind-Post-Mail2\"), \n\t\tarray(\"iconsmind-Post-Office\" => \"iconsmind-Post-Office\"), \n\t\tarray(\"iconsmind-Pound\" => \"iconsmind-Pound\"), \n\t\tarray(\"iconsmind-Pound-Sign\" => \"iconsmind-Pound-Sign\"), \n\t\tarray(\"iconsmind-Pound-Sign2\" => \"iconsmind-Pound-Sign2\"), \n\t\tarray(\"iconsmind-Power\" => \"iconsmind-Power\"), \n\t\tarray(\"iconsmind-Power-Cable\" => \"iconsmind-Power-Cable\"), \n\t\tarray(\"iconsmind-Prater\" => \"iconsmind-Prater\"), \n\t\tarray(\"iconsmind-Present\" => \"iconsmind-Present\"), \n\t\tarray(\"iconsmind-Presents\" => \"iconsmind-Presents\"), \n\t\tarray(\"iconsmind-Printer\" => \"iconsmind-Printer\"), \n\t\tarray(\"iconsmind-Projector\" => \"iconsmind-Projector\"), \n\t\tarray(\"iconsmind-Projector-2\" => \"iconsmind-Projector-2\"), \n\t\tarray(\"iconsmind-Pumpkin\" => \"iconsmind-Pumpkin\"), \n\t\tarray(\"iconsmind-Punk\" => \"iconsmind-Punk\"), \n\t\tarray(\"iconsmind-Queen\" => \"iconsmind-Queen\"), \n\t\tarray(\"iconsmind-Quill\" => \"iconsmind-Quill\"), \n\t\tarray(\"iconsmind-Quill-2\" => \"iconsmind-Quill-2\"), \n\t\tarray(\"iconsmind-Quill-3\" => \"iconsmind-Quill-3\"), \n\t\tarray(\"iconsmind-Ram\" => \"iconsmind-Ram\"), \n\t\tarray(\"iconsmind-Redhat\" => \"iconsmind-Redhat\"), \n\t\tarray(\"iconsmind-Reload2\" => \"iconsmind-Reload2\"), \n\t\tarray(\"iconsmind-Reload-2\" => \"iconsmind-Reload-2\"), \n\t\tarray(\"iconsmind-Remote-Controll\" => \"iconsmind-Remote-Controll\"), \n\t\tarray(\"iconsmind-Remote-Controll2\" => \"iconsmind-Remote-Controll2\"), \n\t\tarray(\"iconsmind-Remove-File\" => \"iconsmind-Remove-File\"), \n\t\tarray(\"iconsmind-Repeat3\" => \"iconsmind-Repeat3\"), \n\t\tarray(\"iconsmind-Repeat-22\" => \"iconsmind-Repeat-22\"), \n\t\tarray(\"iconsmind-Repeat-3\" => \"iconsmind-Repeat-3\"), \n\t\tarray(\"iconsmind-Repeat-4\" => \"iconsmind-Repeat-4\"), \n\t\tarray(\"iconsmind-Resize\" => \"iconsmind-Resize\"), \n\t\tarray(\"iconsmind-Retro\" => \"iconsmind-Retro\"), \n\t\tarray(\"iconsmind-RGB\" => \"iconsmind-RGB\"), \n\t\tarray(\"iconsmind-Right2\" => \"iconsmind-Right2\"), \n\t\tarray(\"iconsmind-Right-2\" => \"iconsmind-Right-2\"), \n\t\tarray(\"iconsmind-Right-3\" => \"iconsmind-Right-3\"), \n\t\tarray(\"iconsmind-Right-ToLeft\" => \"iconsmind-Right-ToLeft\"), \n\t\tarray(\"iconsmind-Robot2\" => \"iconsmind-Robot2\"), \n\t\tarray(\"iconsmind-Roller\" => \"iconsmind-Roller\"), \n\t\tarray(\"iconsmind-Roof\" => \"iconsmind-Roof\"), \n\t\tarray(\"iconsmind-Rook\" => \"iconsmind-Rook\"), \n\t\tarray(\"iconsmind-Router\" => \"iconsmind-Router\"), \n\t\tarray(\"iconsmind-Router-2\" => \"iconsmind-Router-2\"), \n\t\tarray(\"iconsmind-Ruler\" => \"iconsmind-Ruler\"), \n\t\tarray(\"iconsmind-Ruler-2\" => \"iconsmind-Ruler-2\"), \n\t\tarray(\"iconsmind-Safari\" => \"iconsmind-Safari\"), \n\t\tarray(\"iconsmind-Safe-Box2\" => \"iconsmind-Safe-Box2\"), \n\t\tarray(\"iconsmind-Santa-Claus\" => \"iconsmind-Santa-Claus\"), \n\t\tarray(\"iconsmind-Santa-Claus2\" => \"iconsmind-Santa-Claus2\"), \n\t\tarray(\"iconsmind-Santa-onSled\" => \"iconsmind-Santa-onSled\"), \n\t\tarray(\"iconsmind-Scarf\" => \"iconsmind-Scarf\"), \n\t\tarray(\"iconsmind-Scissor\" => \"iconsmind-Scissor\"), \n\t\tarray(\"iconsmind-Scotland\" => \"iconsmind-Scotland\"), \n\t\tarray(\"iconsmind-Sea-Dog\" => \"iconsmind-Sea-Dog\"), \n\t\tarray(\"iconsmind-Search-onCloud\" => \"iconsmind-Search-onCloud\"), \n\t\tarray(\"iconsmind-Security-Smiley\" => \"iconsmind-Security-Smiley\"), \n\t\tarray(\"iconsmind-Serbia\" => \"iconsmind-Serbia\"), \n\t\tarray(\"iconsmind-Server\" => \"iconsmind-Server\"), \n\t\tarray(\"iconsmind-Server-2\" => \"iconsmind-Server-2\"), \n\t\tarray(\"iconsmind-Servers\" => \"iconsmind-Servers\"), \n\t\tarray(\"iconsmind-Share-onCloud\" => \"iconsmind-Share-onCloud\"), \n\t\tarray(\"iconsmind-Shark\" => \"iconsmind-Shark\"), \n\t\tarray(\"iconsmind-Sheep\" => \"iconsmind-Sheep\"), \n\t\tarray(\"iconsmind-Shirt\" => \"iconsmind-Shirt\"), \n\t\tarray(\"iconsmind-Shoes\" => \"iconsmind-Shoes\"), \n\t\tarray(\"iconsmind-Shoes-2\" => \"iconsmind-Shoes-2\"), \n\t\tarray(\"iconsmind-Short-Pants\" => \"iconsmind-Short-Pants\"), \n\t\tarray(\"iconsmind-Shuffle2\" => \"iconsmind-Shuffle2\"), \n\t\tarray(\"iconsmind-Shuffle-22\" => \"iconsmind-Shuffle-22\"), \n\t\tarray(\"iconsmind-Singapore\" => \"iconsmind-Singapore\"), \n\t\tarray(\"iconsmind-Skeleton\" => \"iconsmind-Skeleton\"), \n\t\tarray(\"iconsmind-Skirt\" => \"iconsmind-Skirt\"), \n\t\tarray(\"iconsmind-Skull\" => \"iconsmind-Skull\"), \n\t\tarray(\"iconsmind-Sled\" => \"iconsmind-Sled\"), \n\t\tarray(\"iconsmind-Sled-withGifts\" => \"iconsmind-Sled-withGifts\"), \n\t\tarray(\"iconsmind-Sleeping\" => \"iconsmind-Sleeping\"), \n\t\tarray(\"iconsmind-Slippers\" => \"iconsmind-Slippers\"), \n\t\tarray(\"iconsmind-Smart\" => \"iconsmind-Smart\"), \n\t\tarray(\"iconsmind-Smartphone\" => \"iconsmind-Smartphone\"), \n\t\tarray(\"iconsmind-Smartphone-2\" => \"iconsmind-Smartphone-2\"), \n\t\tarray(\"iconsmind-Smartphone-3\" => \"iconsmind-Smartphone-3\"), \n\t\tarray(\"iconsmind-Smartphone-4\" => \"iconsmind-Smartphone-4\"), \n\t\tarray(\"iconsmind-Smile\" => \"iconsmind-Smile\"), \n\t\tarray(\"iconsmind-Smoking-Pipe\" => \"iconsmind-Smoking-Pipe\"), \n\t\tarray(\"iconsmind-Snake\" => \"iconsmind-Snake\"), \n\t\tarray(\"iconsmind-Snow-Dome\" => \"iconsmind-Snow-Dome\"), \n\t\tarray(\"iconsmind-Snowflake2\" => \"iconsmind-Snowflake2\"), \n\t\tarray(\"iconsmind-Snowman\" => \"iconsmind-Snowman\"), \n\t\tarray(\"iconsmind-Socks\" => \"iconsmind-Socks\"), \n\t\tarray(\"iconsmind-Soup\" => \"iconsmind-Soup\"), \n\t\tarray(\"iconsmind-South-Africa\" => \"iconsmind-South-Africa\"), \n\t\tarray(\"iconsmind-Space-Needle\" => \"iconsmind-Space-Needle\"), \n\t\tarray(\"iconsmind-Spain\" => \"iconsmind-Spain\"), \n\t\tarray(\"iconsmind-Spam-Mail\" => \"iconsmind-Spam-Mail\"), \n\t\tarray(\"iconsmind-Speaker2\" => \"iconsmind-Speaker2\"), \n\t\tarray(\"iconsmind-Spell-Check\" => \"iconsmind-Spell-Check\"), \n\t\tarray(\"iconsmind-Spell-CheckABC\" => \"iconsmind-Spell-CheckABC\"), \n\t\tarray(\"iconsmind-Spider\" => \"iconsmind-Spider\"), \n\t\tarray(\"iconsmind-Spiderweb\" => \"iconsmind-Spiderweb\"), \n\t\tarray(\"iconsmind-Spoder\" => \"iconsmind-Spoder\"), \n\t\tarray(\"iconsmind-Spoon\" => \"iconsmind-Spoon\"), \n\t\tarray(\"iconsmind-Sports-Clothings1\" => \"iconsmind-Sports-Clothings1\"), \n\t\tarray(\"iconsmind-Sports-Clothings2\" => \"iconsmind-Sports-Clothings2\"), \n\t\tarray(\"iconsmind-Sports-Shirt\" => \"iconsmind-Sports-Shirt\"), \n\t\tarray(\"iconsmind-Spray\" => \"iconsmind-Spray\"), \n\t\tarray(\"iconsmind-Squirrel\" => \"iconsmind-Squirrel\"), \n\t\tarray(\"iconsmind-Stamp\" => \"iconsmind-Stamp\"), \n\t\tarray(\"iconsmind-Stamp-2\" => \"iconsmind-Stamp-2\"), \n\t\tarray(\"iconsmind-Stapler\" => \"iconsmind-Stapler\"), \n\t\tarray(\"iconsmind-Star\" => \"iconsmind-Star\"), \n\t\tarray(\"iconsmind-Starfish\" => \"iconsmind-Starfish\"), \n\t\tarray(\"iconsmind-Start2\" => \"iconsmind-Start2\"), \n\t\tarray(\"iconsmind-St-BasilsCathedral\" => \"iconsmind-St-BasilsCathedral\"), \n\t\tarray(\"iconsmind-St-PaulsCathedral\" => \"iconsmind-St-PaulsCathedral\"), \n\t\tarray(\"iconsmind-Structure\" => \"iconsmind-Structure\"), \n\t\tarray(\"iconsmind-Student-Hat\" => \"iconsmind-Student-Hat\"), \n\t\tarray(\"iconsmind-Student-Hat2\" => \"iconsmind-Student-Hat2\"), \n\t\tarray(\"iconsmind-Suit\" => \"iconsmind-Suit\"), \n\t\tarray(\"iconsmind-Sum2\" => \"iconsmind-Sum2\"), \n\t\tarray(\"iconsmind-Sunglasses\" => \"iconsmind-Sunglasses\"), \n\t\tarray(\"iconsmind-Sunglasses-2\" => \"iconsmind-Sunglasses-2\"), \n\t\tarray(\"iconsmind-Sunglasses-3\" => \"iconsmind-Sunglasses-3\"), \n\t\tarray(\"iconsmind-Sunglasses-Smiley\" => \"iconsmind-Sunglasses-Smiley\"), \n\t\tarray(\"iconsmind-Sunglasses-Smiley2\" => \"iconsmind-Sunglasses-Smiley2\"), \n\t\tarray(\"iconsmind-Sunglasses-W\" => \"iconsmind-Sunglasses-W\"), \n\t\tarray(\"iconsmind-Sunglasses-W2\" => \"iconsmind-Sunglasses-W2\"), \n\t\tarray(\"iconsmind-Sunglasses-W3\" => \"iconsmind-Sunglasses-W3\"), \n\t\tarray(\"iconsmind-Surprise\" => \"iconsmind-Surprise\"), \n\t\tarray(\"iconsmind-Sushi\" => \"iconsmind-Sushi\"), \n\t\tarray(\"iconsmind-Sweden\" => \"iconsmind-Sweden\"), \n\t\tarray(\"iconsmind-Swimming-Short\" => \"iconsmind-Swimming-Short\"), \n\t\tarray(\"iconsmind-Swimmwear\" => \"iconsmind-Swimmwear\"), \n\t\tarray(\"iconsmind-Switzerland\" => \"iconsmind-Switzerland\"), \n\t\tarray(\"iconsmind-Sync\" => \"iconsmind-Sync\"), \n\t\tarray(\"iconsmind-Sync-Cloud\" => \"iconsmind-Sync-Cloud\"), \n\t\tarray(\"iconsmind-Tablet\" => \"iconsmind-Tablet\"), \n\t\tarray(\"iconsmind-Tablet-2\" => \"iconsmind-Tablet-2\"), \n\t\tarray(\"iconsmind-Tablet-3\" => \"iconsmind-Tablet-3\"), \n\t\tarray(\"iconsmind-Tablet-Orientation\" => \"iconsmind-Tablet-Orientation\"), \n\t\tarray(\"iconsmind-Tablet-Phone\" => \"iconsmind-Tablet-Phone\"), \n\t\tarray(\"iconsmind-Tablet-Vertical\" => \"iconsmind-Tablet-Vertical\"), \n\t\tarray(\"iconsmind-Tactic\" => \"iconsmind-Tactic\"), \n\t\tarray(\"iconsmind-Taj-Mahal\" => \"iconsmind-Taj-Mahal\"), \n\t\tarray(\"iconsmind-Teapot\" => \"iconsmind-Teapot\"), \n\t\tarray(\"iconsmind-Tee-Mug\" => \"iconsmind-Tee-Mug\"), \n\t\tarray(\"iconsmind-Telephone\" => \"iconsmind-Telephone\"), \n\t\tarray(\"iconsmind-Telephone-2\" => \"iconsmind-Telephone-2\"), \n\t\tarray(\"iconsmind-Temple\" => \"iconsmind-Temple\"), \n\t\tarray(\"iconsmind-Thailand\" => \"iconsmind-Thailand\"), \n\t\tarray(\"iconsmind-The-WhiteHouse\" => \"iconsmind-The-WhiteHouse\"), \n\t\tarray(\"iconsmind-Three-ArrowFork\" => \"iconsmind-Three-ArrowFork\"), \n\t\tarray(\"iconsmind-Thumbs-DownSmiley\" => \"iconsmind-Thumbs-DownSmiley\"), \n\t\tarray(\"iconsmind-Thumbs-UpSmiley\" => \"iconsmind-Thumbs-UpSmiley\"), \n\t\tarray(\"iconsmind-Tie\" => \"iconsmind-Tie\"), \n\t\tarray(\"iconsmind-Tie-2\" => \"iconsmind-Tie-2\"), \n\t\tarray(\"iconsmind-Tie-3\" => \"iconsmind-Tie-3\"), \n\t\tarray(\"iconsmind-Tiger\" => \"iconsmind-Tiger\"), \n\t\tarray(\"iconsmind-Time-Clock\" => \"iconsmind-Time-Clock\"), \n\t\tarray(\"iconsmind-To-Bottom\" => \"iconsmind-To-Bottom\"), \n\t\tarray(\"iconsmind-To-Bottom2\" => \"iconsmind-To-Bottom2\"), \n\t\tarray(\"iconsmind-Token\" => \"iconsmind-Token\"), \n\t\tarray(\"iconsmind-To-Left\" => \"iconsmind-To-Left\"), \n\t\tarray(\"iconsmind-Tomato\" => \"iconsmind-Tomato\"), \n\t\tarray(\"iconsmind-Tongue\" => \"iconsmind-Tongue\"), \n\t\tarray(\"iconsmind-Tooth\" => \"iconsmind-Tooth\"), \n\t\tarray(\"iconsmind-Tooth-2\" => \"iconsmind-Tooth-2\"), \n\t\tarray(\"iconsmind-Top-ToBottom\" => \"iconsmind-Top-ToBottom\"), \n\t\tarray(\"iconsmind-To-Right\" => \"iconsmind-To-Right\"), \n\t\tarray(\"iconsmind-To-Top\" => \"iconsmind-To-Top\"), \n\t\tarray(\"iconsmind-To-Top2\" => \"iconsmind-To-Top2\"), \n\t\tarray(\"iconsmind-Tower\" => \"iconsmind-Tower\"), \n\t\tarray(\"iconsmind-Tower-2\" => \"iconsmind-Tower-2\"), \n\t\tarray(\"iconsmind-Tower-Bridge\" => \"iconsmind-Tower-Bridge\"), \n\t\tarray(\"iconsmind-Transform\" => \"iconsmind-Transform\"), \n\t\tarray(\"iconsmind-Transform-2\" => \"iconsmind-Transform-2\"), \n\t\tarray(\"iconsmind-Transform-3\" => \"iconsmind-Transform-3\"), \n\t\tarray(\"iconsmind-Transform-4\" => \"iconsmind-Transform-4\"), \n\t\tarray(\"iconsmind-Tree2\" => \"iconsmind-Tree2\"), \n\t\tarray(\"iconsmind-Tree-22\" => \"iconsmind-Tree-22\"), \n\t\tarray(\"iconsmind-Triangle-ArrowDown\" => \"iconsmind-Triangle-ArrowDown\"), \n\t\tarray(\"iconsmind-Triangle-ArrowLeft\" => \"iconsmind-Triangle-ArrowLeft\"), \n\t\tarray(\"iconsmind-Triangle-ArrowRight\" => \"iconsmind-Triangle-ArrowRight\"), \n\t\tarray(\"iconsmind-Triangle-ArrowUp\" => \"iconsmind-Triangle-ArrowUp\"), \n\t\tarray(\"iconsmind-T-Shirt\" => \"iconsmind-T-Shirt\"), \n\t\tarray(\"iconsmind-Turkey\" => \"iconsmind-Turkey\"), \n\t\tarray(\"iconsmind-Turn-Down\" => \"iconsmind-Turn-Down\"), \n\t\tarray(\"iconsmind-Turn-Down2\" => \"iconsmind-Turn-Down2\"), \n\t\tarray(\"iconsmind-Turn-DownFromLeft\" => \"iconsmind-Turn-DownFromLeft\"), \n\t\tarray(\"iconsmind-Turn-DownFromRight\" => \"iconsmind-Turn-DownFromRight\"), \n\t\tarray(\"iconsmind-Turn-Left\" => \"iconsmind-Turn-Left\"), \n\t\tarray(\"iconsmind-Turn-Left3\" => \"iconsmind-Turn-Left3\"), \n\t\tarray(\"iconsmind-Turn-Right\" => \"iconsmind-Turn-Right\"), \n\t\tarray(\"iconsmind-Turn-Right3\" => \"iconsmind-Turn-Right3\"), \n\t\tarray(\"iconsmind-Turn-Up\" => \"iconsmind-Turn-Up\"), \n\t\tarray(\"iconsmind-Turn-Up2\" => \"iconsmind-Turn-Up2\"), \n\t\tarray(\"iconsmind-Turtle\" => \"iconsmind-Turtle\"), \n\t\tarray(\"iconsmind-Tuxedo\" => \"iconsmind-Tuxedo\"), \n\t\tarray(\"iconsmind-Ukraine\" => \"iconsmind-Ukraine\"), \n\t\tarray(\"iconsmind-Umbrela\" => \"iconsmind-Umbrela\"), \n\t\tarray(\"iconsmind-United-Kingdom\" => \"iconsmind-United-Kingdom\"), \n\t\tarray(\"iconsmind-United-States\" => \"iconsmind-United-States\"), \n\t\tarray(\"iconsmind-University\" => \"iconsmind-University\"), \n\t\tarray(\"iconsmind-Up2\" => \"iconsmind-Up2\"), \n\t\tarray(\"iconsmind-Up-2\" => \"iconsmind-Up-2\"), \n\t\tarray(\"iconsmind-Up-3\" => \"iconsmind-Up-3\"), \n\t\tarray(\"iconsmind-Upload2\" => \"iconsmind-Upload2\"), \n\t\tarray(\"iconsmind-Upload-toCloud\" => \"iconsmind-Upload-toCloud\"), \n\t\tarray(\"iconsmind-Usb\" => \"iconsmind-Usb\"), \n\t\tarray(\"iconsmind-Usb-2\" => \"iconsmind-Usb-2\"), \n\t\tarray(\"iconsmind-Usb-Cable\" => \"iconsmind-Usb-Cable\"), \n\t\tarray(\"iconsmind-Vector\" => \"iconsmind-Vector\"), \n\t\tarray(\"iconsmind-Vector-2\" => \"iconsmind-Vector-2\"), \n\t\tarray(\"iconsmind-Vector-3\" => \"iconsmind-Vector-3\"), \n\t\tarray(\"iconsmind-Vector-4\" => \"iconsmind-Vector-4\"), \n\t\tarray(\"iconsmind-Vector-5\" => \"iconsmind-Vector-5\"), \n\t\tarray(\"iconsmind-Vest\" => \"iconsmind-Vest\"), \n\t\tarray(\"iconsmind-Vietnam\" => \"iconsmind-Vietnam\"), \n\t\tarray(\"iconsmind-View-Height\" => \"iconsmind-View-Height\"), \n\t\tarray(\"iconsmind-View-Width\" => \"iconsmind-View-Width\"), \n\t\tarray(\"iconsmind-Visa\" => \"iconsmind-Visa\"), \n\t\tarray(\"iconsmind-Voicemail\" => \"iconsmind-Voicemail\"), \n\t\tarray(\"iconsmind-VPN\" => \"iconsmind-VPN\"), \n\t\tarray(\"iconsmind-Wacom-Tablet\" => \"iconsmind-Wacom-Tablet\"), \n\t\tarray(\"iconsmind-Walkie-Talkie\" => \"iconsmind-Walkie-Talkie\"), \n\t\tarray(\"iconsmind-Wallet\" => \"iconsmind-Wallet\"), \n\t\tarray(\"iconsmind-Wallet-2\" => \"iconsmind-Wallet-2\"), \n\t\tarray(\"iconsmind-Warehouse\" => \"iconsmind-Warehouse\"), \n\t\tarray(\"iconsmind-Webcam\" => \"iconsmind-Webcam\"), \n\t\tarray(\"iconsmind-Wifi\" => \"iconsmind-Wifi\"), \n\t\tarray(\"iconsmind-Wifi-2\" => \"iconsmind-Wifi-2\"), \n\t\tarray(\"iconsmind-Wifi-Keyboard\" => \"iconsmind-Wifi-Keyboard\"), \n\t\tarray(\"iconsmind-Window\" => \"iconsmind-Window\"), \n\t\tarray(\"iconsmind-Windows\" => \"iconsmind-Windows\"), \n\t\tarray(\"iconsmind-Windows-Microsoft\" => \"iconsmind-Windows-Microsoft\"), \n\t\tarray(\"iconsmind-Wine-Bottle\" => \"iconsmind-Wine-Bottle\"), \n\t\tarray(\"iconsmind-Wine-Glass\" => \"iconsmind-Wine-Glass\"), \n\t\tarray(\"iconsmind-Wink\" => \"iconsmind-Wink\"), \n\t\tarray(\"iconsmind-Wireless\" => \"iconsmind-Wireless\"), \n\t\tarray(\"iconsmind-Witch\" => \"iconsmind-Witch\"), \n\t\tarray(\"iconsmind-Witch-Hat\" => \"iconsmind-Witch-Hat\"), \n\t\tarray(\"iconsmind-Wizard\" => \"iconsmind-Wizard\"), \n\t\tarray(\"iconsmind-Wolf\" => \"iconsmind-Wolf\"), \n\t\tarray(\"iconsmind-Womans-Underwear\" => \"iconsmind-Womans-Underwear\"), \n\t\tarray(\"iconsmind-Womans-Underwear2\" => \"iconsmind-Womans-Underwear2\"), \n\t\tarray(\"iconsmind-Worker-Clothes\" => \"iconsmind-Worker-Clothes\"), \n\t\tarray(\"iconsmind-Wreath\" => \"iconsmind-Wreath\"), \n\t\tarray(\"iconsmind-Zebra\" => \"iconsmind-Zebra\"), \n\t\tarray(\"iconsmind-Zombie\" => \"iconsmind-Zombie\")\n\t);\n\treturn array_merge( $icons, $iconsmind_icons );\n}",
"function _template_preprocess_micon_package__image(array &$variables) {\n $micon = $variables['micon'];\n $info = $micon->getInfo();\n\n $variables['content']['icons'] = [\n '#theme' => 'fieldset',\n '#title' => t('Available SVGs'),\n ];\n $variables['content']['icons']['#children']['icons'] = [\n '#theme' => 'micon_icon_list',\n '#micon' => $micon,\n ];\n}",
"function group_global_features_handler($hook, $entity_type, $returnvalue, $params){\n if(array_key_exists(\"plugin\",$params) && $params[\"plugin\"]==\"groupextended\"){\n $groups = get_entities(\"group\",\"\",0,\"\",null);\n if(!empty($groups)){\n $squareicon = get_plugin_setting(\"squareicon\",\"groupextended\");\n foreach($groups as $group){\n $group = group_features_update($group,true);\n group_iconprocess_overwrite($group,$squareicon);\n }\n }\n }\n}",
"function ucsc_research_group_location()\n{\n\t$labels = array(\n\t\t'name' => 'Research Facility Locations',\n\t\t'singular_name' => 'Research Facility Location',\n\t\t'search_items' => 'Search Research Facility Locations',\n\t\t'all_items' => 'All Research Facility Locations',\n\t\t'parent_item' => 'Parent Research Facility Location',\n\t\t'parent_item_colon' => 'Parent Research Facility Location:',\n\t\t'edit_item' => 'Edit Research Facility Location',\n\t\t'update_item' => 'Update Research Facility Location',\n\t\t'add_new_item' => 'Add Research Facility Location',\n\t\t'new_item_name' => 'New Research Facility Location',\n\t\t'menu_name' => 'Research Facility Locations'\n\t);\n\n\tregister_taxonomy(\n\t\t'resesarch-group-location-tax',\n\t\t'institutes-centers',\n\t\tarray(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array('slug' => 'resesarch-group-location-tax'),\n\t\t\t'show_in_rest' => true, //Required for Gutenberg editor\n\t\t\t'rest_base' => 'resesarch-group-location-tax-api',\n\t\t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n\t\t)\n\t);\n}",
"function process_intractive_map_options(){\n\tregister_setting('map_settings_group','map_settings');\n}",
"function _crum_vc_icon_settings() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'type' => 'dropdown',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Icon to display:', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_type',\n\t\t\t\t'value' => array(\n\t\t\t\t\tesc_html__( 'Font Icon Manager', 'dfd' ) => 'selector',\n\t\t\t\t\tesc_html__( 'Custom Image Icon', 'dfd' ) => 'custom',\n\t\t\t\t),\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'heading' => esc_html__( 'Opacity', 'dfd' ) .' (0-100) %',\n\t\t\t\t'param_name' => 'opacity',\n\t\t\t\t'min' => '0',\n\t\t\t\t'max' => '100',\n\t\t\t\t'value' => '100',\n\t\t\t\t'edit_field_class' => 'vc_col-sm-6 vc_column crum_vc',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'heading' => esc_html__( 'Size of Icon', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_size',\n\t\t\t\t'edit_field_class' => 'vc_column vc_col-sm-6 crum-number-wrap crum_vc',\n\t\t\t\t'min' => 12,\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t'class' => 'crum_vc',\n\t\t\t\t'heading' => esc_html__( 'Color', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_color',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'icon_manager',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Select Icon ', 'dfd' ),\n\t\t\t\t'param_name' => 'icon',\n\t\t\t\t'value' => '',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'dependency' => array( 'element' => 'icon_type', 'value' => array( 'selector' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'attach_image',\n\t\t\t\t'class' => '',\n\t\t\t\t'heading' => esc_html__( 'Upload Image:', 'dfd' ),\n\t\t\t\t'param_name' => 'icon_image_id',\n\t\t\t\t'admin_label' => true,\n\t\t\t\t'value' => '',\n\t\t\t\t'group' => esc_html__( 'Icon', 'dfd' ),\n\t\t\t\t'description' => esc_html__( 'Upload the custom image icon.', 'dfd' ),\n\t\t\t\t'dependency' => Array( 'element' => 'icon_type', 'value' => array( 'custom' ) ),\n\t\t\t),\n\n\t\t);\n\n\t}",
"function axiom_staff_admin_icons() \n{\n?>\n <style type=\"text/css\" media=\"screen\">\n #menu-posts-staff div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px -30px !important;\n }\n #menu-posts-staff.menu-icon-post:hover div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px 0px !important;\n }\n #menu-posts-staff.menu-icon-post.wp-menu-open div.wp-menu-image {\n background: url(<?php echo ADMIN_URL; ?>images/icons/staff.png) no-repeat 4px -60px !important;\n }\n #icon-edit.icon32.icon32-posts-staff{\n background: url(<?php echo ADMIN_URL; ?>images/icons/icons-34.png) no-repeat scroll -160px 0px !important;\n }\n </style>\n<?php \n}",
"function js_icons() {\n\t\t/* If we're in the backend, get an absolute path. Frontend can use a relative path. */\n\t\tif (TYPO3_MODE=='BE')\t{\n\t\t\t$path = t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelPath('wec_map');\n\t\t} else {\n\t\t\t$path = t3lib_extMgm::siteRelPath('wec_map');\n\t\t}\n\n\t\t// add default icon set\n\t\t$this->icons[] = '\nWecMap.addIcon(\"' . $this->mapName .'\", \"default\", \"'.$path.'images/mm_20_red.png\", \"'.$path.'images/mm_20_shadow.png\", new GSize(12, 20), new GSize(22, 20), new GPoint(6, 20), new GPoint(5, 1));\n\t\t\t';\n\t\treturn implode(\"\\n\", $this->icons);\n\t}",
"private function augment_settings_results_appearance() {\n\n\t\t$related_to = 'show_icon_array';\n\t\t$new_options[ 'show_icon_array' ] = array( 'related_to' => $related_to , 'type' => 'checkbox' );\n\n\t\t$this->attach_to_slp( $new_options , array( 'page'=> 'slp_experience','section' => 'results', 'group' => 'appearance' ) );\n\t}",
"public function icons() {\n\t\trequire_once FUSION_BUILDER_PLUGIN_DIR . 'inc/admin-screens/icons.php';\n\t}",
"function add_menu_icons_styles(){\r\n?><style>\r\n#adminmenu .menu-icon-socials div.wp-menu-image:before {\r\n content: \"\\f319\";\r\n}\r\n\r\n</style>\r\n <?php\r\n}",
"private function autoSetIcon(): void\n {\n switch (static::class) {\n case Human::class:\n $this->icon = IconEnum::HUMAN;\n break;\n case Ai::class:\n $this->icon = IconEnum::AI;\n break;\n }\n }",
"function fashion_nav_menu_social_icons( $item_output, $item, $depth, $args ) {\n\t\t// Get supported social icons.\n\t\t$social_icons = fashion_social_links_icons();\n\n\t\t// Change SVG icon inside social links menu if there is supported URL.\n\t\tif ( 'social' === $args->theme_location ) {\n\t\t\tforeach ( $social_icons as $attr => $value ) {\n\t\t\t\tif ( false !== strpos( $item_output, $attr ) ) {\n\t\t\t\t\t$item_output = str_replace( $args->link_after, '</span><i class=\"' . esc_attr( $value ) . '\" aria-hidden=\"true\"></i>', $item_output );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $item_output;\n\t}",
"function drawStaticMap() {\n\t\tif(!$this->static) return null;\n\n\n\t\t$index = 0;\n\t\tif($this->staticExtent == 'all') {\n\t\t\t$markerString = '';\n\t\t\tif($this->staticLimit > 50) $this->staticLimit = 50;\n\t\t\tforeach( $this->groups as $key => $group ) {\n\t\t\t\tforeach( $group->markers as $marker ) {\n\t\t\t\t\tif($index >= $this->staticLimit) break 2;\n\t\t\t\t\t$index++;\n\t\t\t\t\t$markerString .= $marker->latitude.','.$marker->longitude.',small%7C';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$img = $this->generateStaticMap($markerString);\n\t\t\treturn $img;\n\t\t} elseif($this->staticExtent == 'each') {\n\t\t\tforeach( $this->groups as $key => $group ) {\n\t\t\t\tforeach( $group->markers as $marker ) {\n\t\t\t\t\tif($index >= $this->staticLimit) break 2;\n\t\t\t\t\t$markerString = $marker->latitude.','.$marker->longitude.',small';\n\t\t\t\t\t$img .= $this->generateStaticMap($markerString, false);\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $img;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}"
] | [
"0.707827",
"0.61511844",
"0.60644174",
"0.5513853",
"0.5464103",
"0.54213715",
"0.5403784",
"0.5352931",
"0.5339069",
"0.53302824",
"0.53218275",
"0.529239",
"0.528693",
"0.52503693",
"0.52503693",
"0.52503693",
"0.5240125",
"0.51953167",
"0.5188236",
"0.51571816",
"0.5153242",
"0.51518846",
"0.51401305",
"0.51374286",
"0.5127521",
"0.51103365",
"0.51027906",
"0.5047466",
"0.50334203",
"0.49991158"
] | 0.62825084 | 1 |
Generate custom map icons via groups loop. For group avatar map icons. | function gmw_ps_gl_get_map_icon_via_loop( $map_icon, $group, $gmw ) {
$usage = $gmw['map_markers']['usage'];
// abort if not set to featured image or categories
if ( 'avatar' == $gmw['map_markers']['usage'] ) {
$group_id = isset( $group->id ) ? $group->id : $group->object_id;
$map_icon = bp_core_fetch_avatar(
array(
'item_id' => $group_id,
'object' => 'group',
'type' => 'thumb',
'width' => 80,
'height' => 80,
'html' => false,
'no_grav' => true
)
);
if ( empty( $map_icon ) ) {
$map_icon = GMW_PS_URL. '/assets/map-icons/_no_image.png';
}
}
return $map_icon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function gmw_ps_modify_group_map_icon( $args, $group, $gmw ) {\n\n $map_icon = '_default.png';\n\n //set default map icon usage if not exist\n if ( ! isset( $gmw['map_markers']['usage'] ) ) {\n $usage = $gmw['map_markers']['usage'] = 'global';\n } else {\n $usage = $gmw['map_markers']['usage'];\n }\n\n $global_icon = isset( $gmw['map_markers']['default_marker'] ) ? $gmw['map_markers']['default_marker'] : '_default.png';\n \n //if same global map icon\n if ( $usage == 'global' ) {\n $map_icon = $gmw['map_markers']['default_marker'];\n //per group map icon \n } elseif ( $usage == 'per_group' && isset( $group->map_icon ) ) {\n $map_icon = $group->map_icon;\n //avatar map icon\n } elseif ( $usage == 'avatar' ) {\n $avatar = bp_core_fetch_avatar( array( \n 'item_id' => $group->id,\n 'object' => 'group', \n 'type' => 'thumb', \n 'width' => 30, \n 'height' => 30, \n 'html' => false \n ) );\n\n $map_icon = array(\n 'url' => ( $avatar ) ? $avatar : GMW_PS_URL . '/friends/assets/ map-icons/_no_avatar.png',\n 'scaledSize' => array(\n 'height' => 30,\n 'width' => 30\n )\n );\n\n //oterwise, default map icon \n } else {\n $map_icon = '_default.png';\n }\n \n //generate the map icon\n if ( $usage != 'avatar' ) {\n\n if ( $map_icon == '_default.png' ) {\n $map_icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld='. $group->location_count.'|FF776B|000000';\n } else {\n $icons = gmw_get_icons();\n $map_icon = $icons['gl_map_icons']['url'].$map_icon;\n }\n }\n\n $args['map_icon'] = $map_icon;\n\n return $args;\n}",
"public function populateMapIconDirectory() {\n\t\t$iconPath = 'fileadmin/ext/mymap/Resources/Public/Icons/';\n \t\tif (!is_dir(Environment::getPublicPath() . '/' . $iconPath)) {\n $fileSystem = new FileSystem();\n if (Environment::getPublicPath() != Environment::getProjectPath()) {\n // we are in composerMode\n \t\t\t$sourceDir = Environment::getProjectPath() . '/vendor/wsr/mymap/Resources/Public/';\n } else {\n $sourceDir = Environment::getPublicPath() .'/typo3conf/ext/mymap/Resources/Public/';\n }\n $fileSystem->mirror($sourceDir, 'fileadmin/ext/mymap/Resources/Public/');\n\t\t\t$this->addFlashMessage('Directory ' . $iconPath . ' created for use with own mapIcons!', '', \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::INFO);\n }\n\t}",
"function jsonImageMapImgGroups() {\n\t$compgrpid = processInputVar('compgrpid', ARG_NUMERIC);\n\t$resources = getUserResources(array(\"computerAdmin\"), array(\"manageGroup\"), 1);\n\tif(! array_key_exists($compgrpid, $resources['computer'])) {\n\t\t$arr = array('ingroups' => array(), 'outgroups' => array(), 'all' => array());\n\t\theader('Content-Type: text/json-comment-filtered; charset=utf-8');\n\t\tprint '/*{\"items\":' . json_encode($arr) . '}*/';\n\t\treturn;\n\t}\n\t$imagegroups = getUserResources(array('imageAdmin'), array('manageGroup'), 1);\n\t$mapping = getResourceMapping('computer', 'image');\n\t$in = array();\n\t$out = array();\n\t$all = array();\n\tforeach($imagegroups['image'] as $id => $group) {\n\t\tif(array_key_exists($compgrpid, $mapping) && \n\t\t\tin_array($id, $mapping[$compgrpid])) {\n\t\t\t$all[] = array('inout' => 1, 'id' => $id, 'name' => $group);\n\t\t\t$in[] = array('name' => $group, 'id' => $id);\n\t\t}\n\t\telse {\n\t\t\t$all[] = array('inout' => 0, 'id' => $id, 'name' => $group);\n\t\t\t$out[] = array('name' => $group, 'id' => $id);\n\t\t}\n\t}\n\t$arr = array('ingroups' => $in, 'outgroups' => $out, 'all' => $all);\n\tprint '/*{\"items\":' . json_encode($arr) . '}*/';\n}",
"function drawStaticMap() {\n\t\tif(!$this->static) return null;\n\n\n\t\t$index = 0;\n\t\tif($this->staticExtent == 'all') {\n\t\t\t$markerString = '';\n\t\t\tif($this->staticLimit > 50) $this->staticLimit = 50;\n\t\t\tforeach( $this->groups as $key => $group ) {\n\t\t\t\tforeach( $group->markers as $marker ) {\n\t\t\t\t\tif($index >= $this->staticLimit) break 2;\n\t\t\t\t\t$index++;\n\t\t\t\t\t$markerString .= $marker->latitude.','.$marker->longitude.',small%7C';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$img = $this->generateStaticMap($markerString);\n\t\t\treturn $img;\n\t\t} elseif($this->staticExtent == 'each') {\n\t\t\tforeach( $this->groups as $key => $group ) {\n\t\t\t\tforeach( $group->markers as $marker ) {\n\t\t\t\t\tif($index >= $this->staticLimit) break 2;\n\t\t\t\t\t$markerString = $marker->latitude.','.$marker->longitude.',small';\n\t\t\t\t\t$img .= $this->generateStaticMap($markerString, false);\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $img;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"function press_icon(){\n?>\n<div class=\"icon-list\"><p>\n\t<?php $resevi_icon = press_get_icon(); \n\t\t$i=1; foreach($resevi_icon as $name=>$path ):\n\t?>\n\t\t<img id=\"icon-<?php echo $name; ?>\" style=\"width:30px;height:30px;\" src=\"<?php echo $path ;?>\" alt=\"<?php echo $name; ?>\"/>\n\t\t<?php if($i%7==0) echo \"</p><p>\"; ?>\n\t<?php \t$i++; endforeach;\t?>\n</p></div>\n<?php \n}",
"function ca_elements_icon_map( $icon_map ) {\n\t\t$icon_map['si_custom_elements'] = CA_EXTENSION_URL . '/assets/svg/icons.svg';\n\t\treturn $icon_map;\n\t}",
"function js_icons() {\n\t\t/* If we're in the backend, get an absolute path. Frontend can use a relative path. */\n\t\tif (TYPO3_MODE=='BE')\t{\n\t\t\t$path = t3lib_div::getIndpEnv('TYPO3_SITE_URL').t3lib_extMgm::siteRelPath('wec_map');\n\t\t} else {\n\t\t\t$path = t3lib_extMgm::siteRelPath('wec_map');\n\t\t}\n\n\t\t// add default icon set\n\t\t$this->icons[] = '\nWecMap.addIcon(\"' . $this->mapName .'\", \"default\", \"'.$path.'images/mm_20_red.png\", \"'.$path.'images/mm_20_shadow.png\", new GSize(12, 20), new GSize(22, 20), new GPoint(6, 20), new GPoint(5, 1));\n\t\t\t';\n\t\treturn implode(\"\\n\", $this->icons);\n\t}",
"function getIcons($generos) {\r\n\t\t$todos = explode(\" | \", $generos);\r\n\t\t$principales = explode(\". \", $todos[0]);\r\n\r\n\t\tforeach ($principales as $p) {\r\n\t\t\techo \"<img src=\\\"img/\" . ico($p) . \".png\\\" title=\\\"\".$p.\" \\\" alt=\\\"\".$p.\" \\\" /> \";\r\n\t\t}\r\n\t}",
"function jsonImageMapCompGroups() {\n\t$imagegrpid = processInputVar('imagegrpid', ARG_NUMERIC);\n\t$resources = getUserResources(array(\"imageAdmin\"), array(\"manageGroup\"), 1);\n\tif(! array_key_exists($imagegrpid, $resources['image'])) {\n\t\t$arr = array('ingroups' => array(), 'outgroups' => array(), 'all' => array());\n\t\theader('Content-Type: text/json-comment-filtered; charset=utf-8');\n\t\tprint '/*{\"items\":' . json_encode($arr) . '}*/';\n\t\treturn;\n\t}\n\t$compgroups = getUserResources(array('computerAdmin'), array('manageGroup'), 1);\n\t$mapping = getResourceMapping('image', 'computer');\n\t$in = array();\n\t$out = array();\n\t$all = array();\n\tforeach($compgroups['computer'] as $id => $group) {\n\t\tif(array_key_exists($imagegrpid, $mapping) && \n\t\t\tin_array($id, $mapping[$imagegrpid])) {\n\t\t\t$all[] = array('inout' => 1, 'id' => $id, 'name' => $group);\n\t\t\t$in[] = array('name' => $group, 'id' => $id);\n\t\t}\n\t\telse {\n\t\t\t$all[] = array('inout' => 0, 'id' => $id, 'name' => $group);\n\t\t\t$out[] = array('name' => $group, 'id' => $id);\n\t\t}\n\t}\n\t$arr = array('ingroups' => $in, 'outgroups' => $out, 'all' => $all);\n\tprint '/*{\"items\":' . json_encode($arr) . '}*/';\n}",
"function gmw_ps_gl_get_map_icons_via_query( $gmw ) {\n\n\tif ( false == ( $usage = $gmw['map_markers']['usage'] ) ) {\n\t\t$usage = 'global';\n\t}\n\n\t// abort if not the right usage\n\tif ( ! in_array( $usage, array( 'global', 'per_group' ) ) ) {\n\t\treturn false;\n\t}\n\n\tglobal $wpdb;\n\n\t// get icons url\n\t$icons = gmw_get_icons();\n\t$icons_url = $icons['gl_map_icons']['url'];\n\n\t// get default marker. If no icon provided or using the _default.png,\n\t// we than pass blank value, to use Google's default red marker.\n\tif ( ! empty( $gmw['map_markers']['default_marker'] ) && '_default.png' != $gmw['map_markers']['default_marker'] ) {\n\t\t$default_icon = $icons_url.$gmw['map_markers']['default_marker'];\n\t} else {\n\t\t$default_icon = GMW()->default_icons['location_icon_url'];\n\t}\n\n\t// if global icon.\n\tif ( 'global' === $usage ) {\n\t\treturn $wpdb->prepare( \"%s as map_icon\", $default_icon );\n\t}\n\n\t// if per group, get the icon from locations table\n\tif ( 'per_group' === $usage ) {\n\n\t\treturn $wpdb->prepare( \"IF ( gmw_locations.map_icon IS NOT NULL AND gmw_locations.map_icon != '_default.png', CONCAT( %s, gmw_locations.map_icon ), %s ) as map_icon\", $icons_url, $default_icon );\n\t}\n\n\treturn false;\n}",
"function getIconsHtml($abbr)\n {\n $localHtml = \"\";\n\n if ($this->speciesArr[$abbr]['atlas']['paritKaJarjestys'] > 180)\n {\n $localHtml .= \" <img src='images/star-green.png' alt='harvalukuinen' title='harvalukuinen' class='icon greenstar'>\\n\";\n }\n if ($this->speciesArr[$abbr]['atlas']['ruudutYhtJarjestys'] > 180)\n {\n $localHtml .= \" <img src='images/star-blue.png' alt='harvinainen' title='harvinainen' class='icon bluestar'>\\n\";\n }\n\n if (@$this->speciesArr[$abbr]['uhex']['luokka2015'] == \"CR\")\n {\n $localHtml .= \" <img src='images/cr.png' alt='äärimmäisen uhanalainen' title='äärimmäisen uhanalainen' class='icon cr'>\\n\";\n }\n elseif (@$this->speciesArr[$abbr]['uhex']['luokka2015'] == \"EN\")\n {\n $localHtml .= \" <img src='images/en.png' alt='erittäin uhanalainen' title='erittäin uhanalainen' class='icon en'>\\n\";\n }\n elseif (@$this->speciesArr[$abbr]['uhex']['luokka2015'] == \"VU\")\n {\n $localHtml .= \" <img src='images/vu.png' alt='vaarantunut' title='vaarantunut' class='icon vu'>\\n\";\n }\n\n return $localHtml;\n }",
"public function vc_hover_image_mapping() {\n if ( !defined( 'WPB_VC_VERSION' ) ) {\n return;\n }\n\n // Map the block with vc_map()\n vc_map(\n\n array(\n 'name' => __('Hover Image', 'text-domain'),\n 'base' => 'vc_hover_image',\n 'category' => __('Inlife Addons' , 'inlife'),\n 'icon' => plugin_dir_url(__FILE__).'../assets/logo-black-small.png',\n 'params' => array(\n\n array(\n 'type' => 'attach_image',\n 'heading' => __('Image'),\n 'param_name' => '_general_image',\n 'admin_label' => true,\n 'group' => 'General',\n ),\n\n array(\n 'type' => 'vc_link',\n 'heading' => __('Link'),\n 'param_name' => '_general_link',\n 'admin_label' => false,\n 'group' => 'General',\n ),\n\n array(\n 'type' => 'attach_image',\n 'heading' => __('Image'),\n 'param_name' => '_hover_image',\n 'admin_label' => true,\n 'group' => 'Hover',\n ),\n\n )\n )\n );\n\n }",
"private function augment_settings_map_markers() {\n\n\t\t$related_to = 'map_end_icon,default_icons';\n\t\t$new_options[ 'default_icons' ] = array( 'related_to' => $related_to , 'type' => 'checkbox' );\n\n\t\t$this->attach_to_slp( $new_options , array( 'page'=> 'slp_experience','section' => 'map', 'group' => 'markers' ) );\n\t}",
"function map_api_tags( &$repeater ) {\n $bound = [];\n if ( is_array( $repeater ) ) {\n foreach ($repeater as $tags) {\n foreach ($tags as $group) {\n if ( is_array( $group ) ) {\n $bound[$group[0]['group_key']]['key'] = isset( $group[0]['group_key'] ) ? $group[0]['group_key'] : null;\n $bound[$group[0]['group_key']]['icon'] = isset( $group[0]['group_icon'] ) ? $group[0]['group_icon'] : null;\n foreach ($group as $tag) {\n $bound[$tag['group_key']]['values'][] = $tag;\n }\n }\n }\n }\n $repeater = $bound;\n }\n}",
"function medigroup_mikado_generate_icon_pack_options() {\n\t\tglobal $medigroup_IconCollections;\n\n\t\t$html = '';\n\t\t$icon_pack = isset($_POST['icon_pack']) ? $_POST['icon_pack'] : '';\n\t\t$collections_object = $medigroup_IconCollections->getIconCollection($icon_pack);\n\n\t\tif($collections_object) {\n\t\t\t$icons = $collections_object->getIconsArray();\n\t\t\tif(is_array($icons) && count($icons)) {\n\t\t\t\tforeach($icons as $key => $icon) {\n\t\t\t\t\t$html .= '<option value=\"'.esc_attr($key).'\">'.esc_html($key).'</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprint $html;\n\t}",
"function addMarkerIcon($dataArray) {\n\t\tif (empty($dataArray)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t \t$this->icons[] = 'WecMap.addIcon(\"' . $this->mapName . '\", \"' . $dataArray['iconID'] . '\", \"' . $dataArray['imagepath'] . '\", \"' . $dataArray['shadowpath'] . '\", new GSize(' . $dataArray['width'] . ', ' . $dataArray['height'] . '), new GSize(' . $dataArray['shadowWidth'] . ', ' . $dataArray['shadowHeight'] . '), new GPoint(' . $dataArray['anchorX'] . ', ' . $dataArray['anchorY'] . '), new GPoint(' . $dataArray['infoAnchorX'] . ', ' . $dataArray['infoAnchorY'] . '));\n\t\t\t';\n\t\t\treturn true;\n\t\t}\n\n\t}",
"function _template_preprocess_micon_package__image(array &$variables) {\n $micon = $variables['micon'];\n $info = $micon->getInfo();\n\n $variables['content']['icons'] = [\n '#theme' => 'fieldset',\n '#title' => t('Available SVGs'),\n ];\n $variables['content']['icons']['#children']['icons'] = [\n '#theme' => 'micon_icon_list',\n '#micon' => $micon,\n ];\n}",
"function wp_emoji2_default_metabox_layout() {\n $map = wp_emoji2_get_image_map();\n?>\n<?php foreach($map as $code => $attrs): ?>\n<img src=\"<?php echo WP_EMOJI2_IMG_URL. $attrs[\"img\"]; ?>\" alt=\"<?php echo esc_attr($attrs[\"alt\"]); ?>\"/>\n<?php endforeach; ?>\n<script type=\"text/javascript\">\njQuery(function(){\n jQuery(\"#wp_emoji2_default img\").wpemoji2();\n});\n</script>\n<?php\n}",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function process_im_icons()\n\t{\n\t}",
"function ClusterHelper_MapName($group, $name='')\n{ \n\tglobal $ClusterSeparator;\n\n\t$groups_orig = explode($ClusterSeparator, $group);\n\t$map = array();\n\t$index = 0;\n\tforeach($groups_orig as $item)\n\t{\n\t\t$path = '';\n\t\tfor\t($num = 0; $num <= $index; $num++)\n\t\t{\n\t\t\tif\t(\t$num != 0)\n\t\t\t{\n\t\t\t\t$path.= $ClusterSeparator;\n\t\t\t}\n\n\t\t\t$path.= $groups_orig[$num];\n\t\t}\n\n\t\t$map[] = array('name' => $item, 'path' => $path, 'link' => \"$path/\");\n\n\t\t$index++;\n\t}\n\tif ($name)\n\t{\n\t $names_orig = explode($ClusterSeparator, $name);\n\t $index = 0;\n\t foreach($names_orig as $item)\n\t {\n\t\t$path = '';\n\t\tfor\t($num = 0; $num <= $index; $num++)\n\t\t{\n\t\t if\t(\t$num != 0)\n\t\t {\n\t\t\t$path.= $ClusterSeparator;\n\t\t }\n\n\t\t $path.= $names_orig[$num];\n\t\t}\n\n\t\t$map[] = array('name' => $item,\n\t\t\t'path' =>$group . '.' . $path,\n\t\t\t'link' =>$group . '.' . $path);\n\n\t\t$index++;\n\t }\n\t}\n\n\treturn $map;\n}",
"function imageMappingGrid() {\n\tglobal $mode;\n\t$tmp = getUserResources(array(\"imageAdmin\"), \n array(\"manageGroup\"), 1);\n\t$imagegroups = $tmp[\"image\"];\n\tuasort($imagegroups, \"sortKeepIndex\");\n\t$imagecompmapping = getResourceMapping(\"image\", \"computer\");\n\t$resources2 = getUserResources(array(\"computerAdmin\"),\n\t array(\"manageGroup\"), 1);\n\t$compgroups = $resources2[\"computer\"];\n\tuasort($compgroups, \"sortKeepIndex\");\n\n\tif(! count($imagegroups) || ! count($compgroups)) {\n\t\tprint \"You don't have access to manage any image group to computer group \";\n\t\tprint \"mappings.<br>\\n\";\n\t\treturn;\n\t}\n\n\tprint \"<FORM action=\\\"\" . BASEURL . SCRIPT . \"\\\" method=post>\\n\";\n\tprint \"<TABLE border=1>\\n\";\n\tprint \" <col>\\n\";\n\tforeach(array_keys($compgroups) as $id) {\n\t\tprint \" <col id=compgrp$id>\\n\";\n\t}\n\tprint \" <TR>\\n\";\n\tprint \" <TH rowspan=2>Image Group</TH>\\n\";\n\tprint \" <TH class=nohlcol colspan=\" . count($compgroups) . \">Computer Groups</TH>\\n\";\n\tprint \" </TR>\\n\";\n\tprint \" <TR>\\n\";\n\tforeach($compgroups as $id => $group) {\n\t\tprint \" <TH onclick=\\\"toggleColSelect('compgrp$id');\\\">$group</TH>\\n\";\n\t}\n\tprint \" </TR>\\n\";\n\t$count = 1;\n\tforeach($imagegroups as $imgid => $imgname) {\n\t\tif($count % 12 == 0) {\n\t\t\tprint \" <TR>\\n\";\n\t\t\tprint \" <TH><img src=images/blank.gif></TH>\\n\";\n\t\t\tforeach($compgroups as $id => $group) {\n\t\t\t\tprint \" <TH onclick=\\\"toggleColSelect('compgrp$id');\\\">$group</TH>\\n\";\n\t\t\t}\n\t\t\tprint \" </TR>\\n\";\n\t\t}\n\t\tprint \" <TR id=imggrpid$imgid>\\n\";\n\t\tprint \" <TH align=right onclick=\\\"toggleRowSelect('imggrpid$imgid');\\\">$imgname</TH>\\n\";\n\t\tforeach($compgroups as $compid => $compname) {\n\t\t\t$name = \"mapping[\" . $imgid . \":\" . $compid . \"]\";\n\t\t\tif(array_key_exists($imgid, $imagecompmapping) &&\n\t\t\t\tin_array($compid, $imagecompmapping[$imgid])) {\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\telse\n\t\t\t\t$checked = \"\";\n\t\t\tprint \" <TD align=center>\\n\";\n\t\t\tprint \" <INPUT type=checkbox name=\\\"$name\\\" $checked>\\n\";\n\t\t\tprint \" </TD>\\n\";\n\t\t}\n\t\tprint \" </TR>\\n\";\n\t\t$count++;\n\t}\n\tprint \"</TABLE>\\n\";\n\t$cont = addContinuationsEntry('submitImageMapping', array(), SECINWEEK, 1, 0, 1);\n\tprint \"<INPUT type=hidden name=continuation value=\\\"$cont\\\">\\n\";\n\tprint \"<INPUT type=submit value=\\\"Submit Changes\\\">\\n\";\n\tprint \"<INPUT type=reset value=Reset>\\n\";\n\tprint \"</FORM>\\n\";\n}",
"protected function _getAvatarGroup() {\n return [\n 'big' => [\n 'width' => _const('AVATAR_BIG'),\n 'height' => _const('AVATAR_BIG')\n ],\n 'medium' => [\n 'width' => _const('AVATAR_MEDIUM'),\n 'height' => _const('AVATAR_MEDIUM')\n ],\n 'small' => [\n 'width' => _const('AVATAR_SMALL'),\n 'height' => _const('AVATAR_SMALL')\n ]\n ];\n }",
"public function vcMap() {\n\n\t\tvc_map( array(\n\t\t\t\t'name' => 'Mikado Image With Hover Info',\n\t\t\t\t'base' => $this->getBase(),\n\t\t\t\t'category' => 'by MIKADO',\n\t\t\t\t'icon' => 'icon-wpb-image-with-text-hover extended-custom-icon',\n\t\t\t\t'allowed_container_element' => 'vc_row',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'attach_image',\n\t\t\t\t\t\t'heading' => 'Image',\n\t\t\t\t\t\t'param_name' => 'image'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"type\" => \"textarea_html\",\n\t\t\t\t\t\t\"heading\" => \"Hover Info\",\n\t\t\t\t\t\t\"param_name\" => \"content\",\n\t\t\t\t\t\t\"description\" => \"Add content to be displayed on hover. You can use shortcodes.\"\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\t\"heading\" => \"Link\",\n\t\t\t\t\t\t\"param_name\" => \"link\",\n\t\t\t\t\t\t\"save_always\" => true,\n\t\t\t\t\t\t\"description\" => \"Add a URL to link to.\"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t) );\n\n\t}",
"public static function map() {\n\n\t\t\t// Get overlays and remove some that don't make sense\n\t\t\t$overlays = wpex_overlay_styles_array();\n\t\t\tif ( is_array( $overlays ) ) {\n\t\t\t\tunset( $overlays['thumb-swap'] );\n\t\t\t\tunset( $overlays['category-tag'] );\n\t\t\t\tunset( $overlays['category-tag-two'] );\n\t\t\t\t$overlays = array_flip( $overlays );\n\t\t\t}\n\n\t\t\t// Return array\n\t\t\treturn array(\n\t\t\t\t'name' => __( 'Image Grid', 'total' ),\n\t\t\t\t'description' => __( 'Responsive image gallery', 'total' ),\n\t\t\t\t'base' => 'vcex_image_grid',\n\t\t\t\t'icon' => 'vcex-image-grid vcex-icon fa fa-picture-o',\n\t\t\t\t'category' => wpex_get_theme_branding(),\n\t\t\t\t'params' => array(\n\t\t\t\t\t// General\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_attach_images',\n\t\t\t\t\t\t'heading' => __( 'Attach Images', 'total' ),\n\t\t\t\t\t\t'param_name' => 'image_ids',\n\t\t\t\t\t\t'group' => __( 'Gallery', 'total' ),\n\t\t\t\t\t\t'description' => __( 'Click the plus icon to add images to your gallery. Once images are added they can be drag and dropped for sorting.', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'false',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t\t'heading' => __( 'Post Gallery', 'total' ),\n\t\t\t\t\t\t'param_name' => 'post_gallery',\n\t\t\t\t\t\t'group' => __( 'Gallery', 'total' ),\n\t\t\t\t\t\t'description' => __( 'Enable to display images from the current post \"Image Gallery\".', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Unique Id', 'total' ),\n\t\t\t\t\t\t'param_name' => 'unique_id',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Extra class name', 'total' ),\n\t\t\t\t\t\t'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total' ),\n\t\t\t\t\t\t'param_name' => 'classes',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t\t'heading' => __( 'Visibility', 'total' ),\n\t\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t\t),\n\t\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_hover_animations',\n\t\t\t\t\t\t'heading' => __( 'Hover Animation', 'total'),\n\t\t\t\t\t\t'param_name' => 'hover_animation',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Grid Style', 'total' ),\n\t\t\t\t\t\t'param_name' => 'grid_style',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Fit Rows', 'total' ) => 'default',\n\t\t\t\t\t\t\t__( 'Masonry', 'total' ) => 'masonry',\n\t\t\t\t\t\t\t__( 'No Margins', 'total' ) => 'no-margins',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-3 vc_column clear',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_grid_columns',\n\t\t\t\t\t\t'heading' => __( 'Columns', 'total' ),\n\t\t\t\t\t\t'param_name' => 'columns',\n\t\t\t\t\t\t'std' => '4',\n\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-3 vc_column',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_column_gaps',\n\t\t\t\t\t\t'heading' => __( 'Gap', 'total' ),\n\t\t\t\t\t\t'param_name' => 'columns_gap',\n\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-3 vc_column',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Responsive', 'total' ),\n\t\t\t\t\t\t'param_name' => 'responsive_columns',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Yes', 'total' ) => 'true',\n\t\t\t\t\t\t\t__( 'No', 'total' ) => 'false',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-3 vc_column',\n\t\t\t\t\t\t'dependency' => array( 'element' => 'columns', 'value' => array( '2', '3', '4', '5', '6', '7', '8', '9', '10' ) ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_grid_columns_responsive',\n\t\t\t\t\t\t'heading' => __( 'Responsive Settings', 'total' ),\n\t\t\t\t\t\t'param_name' => 'columns_responsive_settings',\n\t\t\t\t\t\t'dependency' => array( 'element' => 'responsive_columns', 'value' => 'true' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'false',\n\t\t\t\t\t\t'heading' => __( 'Randomize Images', 'total' ),\n\t\t\t\t\t\t'param_name' => 'randomize_images',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Images Per Page', 'total' ),\n\t\t\t\t\t\t'param_name' => 'posts_per_page',\n\t\t\t\t\t\t'value' => '-1',\n\t\t\t\t\t\t'description' => __( 'This will enable pagination for your gallery. Enter -1 or leave blank to display all images without pagination.', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'true',\n\t\t\t\t\t\t'heading' => __( 'Pagination', 'total' ),\n\t\t\t\t\t\t'param_name' => 'pagination',\n\t\t\t\t\t),\n\t\t\t\t\t// Links\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Image Link', 'total' ),\n\t\t\t\t\t\t'param_name' => 'thumbnail_link',\n\t\t\t\t\t\t'std' => 'lightbox',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'None', 'total' ) => 'none',\n\t\t\t\t\t\t\t__( 'Lightbox', 'total' ) => 'lightbox',\n\t\t\t\t\t\t\t__( 'Attachment Page', 'total' ) => 'attachment_page',\n\t\t\t\t\t\t\t__( 'Custom Links', 'total' ) => 'custom_link',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'false',\n\t\t\t\t\t\t'heading' => __( 'Link Title Attribute', 'total' ),\n\t\t\t\t\t\t'param_name' => 'link_title_tag',\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => array( 'lightbox', 'attachment_page', 'custom_link' ) ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_lightbox_skins',\n\t\t\t\t\t\t'heading' => __( 'Lightbox Skin', 'total' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_skin',\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => 'lightbox' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Lightbox Title', 'total' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_title',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Alt', 'total' ) => 'alt',\n\t\t\t\t\t\t\t__( 'Title', 'total' ) => 'title',\n\t\t\t\t\t\t\t__( 'None', 'total' ) => 'false',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => 'lightbox' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'true',\n\t\t\t\t\t\t'heading' => __( 'Lightbox Gallery', 'total' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_gallery',\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => 'lightbox' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Lightbox Thumbnails Placement', 'total' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_path',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Horizontal', 'total' ) => '',\n\t\t\t\t\t\t\t__( 'Vertical', 'total' ) => 'vertical',\n\t\t\t\t\t\t\t__( 'Disabled', 'total' ) => 'disabled',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'lightbox_gallery', 'value' => 'true' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'true',\n\t\t\t\t\t\t'heading' => __( 'Lightbox Caption', 'total' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_caption',\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => 'lightbox' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'exploded_textarea',\n\t\t\t\t\t\t'heading' => __( 'Custom links', 'total' ),\n\t\t\t\t\t\t'param_name' => 'custom_links',\n\t\t\t\t\t\t'description' => __( 'Enter links for each slide here. Divide links with linebreaks (Enter). For images without a link enter a # symbol. And don\\'t forget to include the http:// at the front.', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => array( 'custom_link' ) ),\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Link Target', 'total' ),\n\t\t\t\t\t\t'param_name' => 'custom_links_target',\n\t\t\t\t\t\t'group' => __( 'Links', 'total' ),\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Same window', 'total' ) => '_self',\n\t\t\t\t\t\t\t__( 'New window', 'total' ) => '_blank'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'thumbnail_link', 'value' => array( 'custom_link' ) ),\n\t\t\t\t\t),\n\t\t\t\t\t// Image\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Image Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_size',\n\t\t\t\t\t\t'std' => 'wpex_custom',\n\t\t\t\t\t\t'value' => vcex_image_sizes(),\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_image_crop_locations',\n\t\t\t\t\t\t'heading' => __( 'Image Crop Location', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_crop',\n\t\t\t\t\t\t'std' => 'center-center',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Image Crop Width', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_width',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Image Crop Height', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_height',\n\t\t\t\t\t\t'description' => __( 'Enter a height in pixels. Leave empty to disable vertical cropping and keep image proportions.', 'total' ),\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'img_size', 'value' => 'wpex_custom' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'false',\n\t\t\t\t\t\t'heading' => __( 'Rounded Image?', 'total' ),\n\t\t\t\t\t\t'param_name' => 'rounded_image',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Image Overlay', 'total' ),\n\t\t\t\t\t\t'param_name' => 'overlay_style',\n\t\t\t\t\t\t'value' => $overlays,\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Overlay Excerpt Length', 'total' ),\n\t\t\t\t\t\t'param_name' => 'overlay_excerpt_length',\n\t\t\t\t\t\t'value' => '15',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'overlay_style', 'value' => 'title-excerpt-hover' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Overlay Button Text', 'total' ),\n\t\t\t\t\t\t'param_name' => 'overlay_button_text',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'overlay_style', 'value' => 'hover-button' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_image_hovers',\n\t\t\t\t\t\t'heading' => __( 'CSS3 Image Hover', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_hover_style',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_image_filters',\n\t\t\t\t\t\t'heading' => __( 'Image Filter', 'total' ),\n\t\t\t\t\t\t'param_name' => 'img_filter',\n\t\t\t\t\t\t'group' => __( 'Image', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\t// Title\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t\t'std' => 'no',\n\t\t\t\t\t\t'heading' => __( 'Enable', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title',\n\t\t\t\t\t\t'vcex' => array(\n\t\t\t\t\t\t\t'off' => 'no',\n\t\t\t\t\t\t\t'on' => 'yes'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Tag', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_tag',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Default', 'total' ) => '',\n\t\t\t\t\t\t\t'h2' => 'h2',\n\t\t\t\t\t\t\t'h3' => 'h3',\n\t\t\t\t\t\t\t'h4' => 'h4',\n\t\t\t\t\t\t\t'div' => 'div',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t\t'heading' => __( 'Based On', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_type',\n\t\t\t\t\t\t'value' => array(\n\t\t\t\t\t\t\t__( 'Default', 'total' ) => '',\n\t\t\t\t\t\t\t__( 'Title', 'total' ) => 'title',\n\t\t\t\t\t\t\t__( 'Alt', 'total' ) => 'alt',\n\t\t\t\t\t\t\t__( 'Caption', 'total' ) => 'caption',\n\t\t\t\t\t\t\t__( 'Description', 'total' ) => 'description',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_color',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_font_family_select',\n\t\t\t\t\t\t'heading' => __( 'Font Family', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_font_family',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_font_weight',\n\t\t\t\t\t\t'heading' => __( 'Font Weight', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_weight',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_text_transforms',\n\t\t\t\t\t\t'heading' => __( 'Text Transform', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_transform',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Font Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_size',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Line Height', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_line_height',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Margin', 'total' ),\n\t\t\t\t\t\t'param_name' => 'title_margin',\n\t\t\t\t\t\t'group' => __( 'Title', 'total' ),\n\t\t\t\t\t\t'description' => __( 'Please use the following format: top right bottom left.', 'total' ),\n\t\t\t\t\t\t'dependency' => array( 'element' => 'title', 'value' => 'yes' ),\n\t\t\t\t\t),\n\t\t\t\t\t// Entry CSS\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t\t'heading' => __( 'Entry CSS', 'total' ),\n\t\t\t\t\t\t'param_name' => 'entry_css',\n\t\t\t\t\t\t'group' => __( 'Entry CSS', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\t// CSS\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t\t'heading' => __( 'Wrap CSS', 'total' ),\n\t\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t\t'group' => __( 'Wrap CSS', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\n\t\t}",
"public function mosaicImages() {\n\t}",
"public function run()\n {\n $groups = [\n \n \n \n [ \"icon\" => \"paper-roll\" , \"Home\" => 1 , \"GroupNameEn\"=> \"عود\" , \"GroupName\"=>\"عود \", \"image\" => null , \"FatherCode\"=>null, \"Featured\" => 1],\n [ \"icon\" => \"paper-roll\" , \"Home\" => 1 , \"GroupNameEn\"=> \"بخور\" , \"GroupName\"=>\"بخور \", \"image\" => null , \"FatherCode\"=>null, \"Featured\" => 1],\n [ \"icon\" => \"desktop-classic\" , \"Home\" => 1 , \"GroupNameEn\"=> \"عطر\" , \"GroupName\"=>\"عطر\",\"FatherCode\"=>null, \"image\" => null , \"Featured\" => 1],\n ];\n Group::insert($groups);\n }",
"function gmw_ps_location_form_map_icons_panel( $form ) {\n\n\t$addon_data = gmw_get_addon_data( $form->slug );\n\t$prefix = $addon_data['prefix'];\n\n\t// get saved icon\n\t$saved_icon = ! empty( $form->saved_location->map_icon ) ? $form->saved_location->map_icon : '_default.png';\n\t?>\n\t<div id=\"map_icons-tab-panel\" class=\"section-wrapper map-icons\">\n\n\t\t<?php do_action( 'gmw_lf_' . $prefix . '_map_icons_section_start', $form ); ?>\n\n\t\t<div class=\"icons-wrapper\">\n\t\t\t<?php\n\t\t\t$icons_data = gmw_get_icons();\n\n\t\t\tif ( ! empty( $icons_data[ $prefix . '_map_icons' ] ) ) {\n\n\t\t\t\t$map_icons = $icons_data[ $prefix . '_map_icons' ]['all_icons'];\n\t\t\t\t$icons_url = $icons_data[ $prefix . '_map_icons' ]['url'];\n\t\t\t\t$cic = 1;\n\n\t\t\t\tforeach ( $map_icons as $map_icon ) {\n\n\t\t\t\t\t$checked = ( ( $saved_icon == $map_icon ) || 1 === $cic ) ? 'checked=\"checked\"' : '';\n\n\t\t\t\t\techo '<label>';\n\t\t\t\t\techo '<input type=\"radio\" name=\"gmw_location_form[map_icon]\" value=\"' . esc_attr( $map_icon ) . '\" ' . $checked . ' />';\n\t\t\t\t\techo '<img src=\"' . esc_url( $icons_url . $map_icon ) . '\" />';\n\t\t\t\t\techo '</label>';\n\n\t\t\t\t\t$cic++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t\t<?php do_action( 'gmw_lf_' . $prefix . '_map_icons_section_end', $form ); ?>\n\t</div>\n\t<?php\n}",
"function change_my_icons( $icons ) {\n $icons['visa'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/visa.svg\" style=\"width: 25px;\"/>';\n $icons['mastercard'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/mastercard.svg\" style=\"width: 25px;\"/>';\n $icons['amex'] = '<img src=\"/mu-plugins/woocommerce/assets/images/icons/credit-cards/amex.svg\" style=\"width: 25px;\" />';\n return $icons;\n}"
] | [
"0.769722",
"0.5986006",
"0.5960367",
"0.5924155",
"0.57764137",
"0.56241286",
"0.5621595",
"0.5574537",
"0.554978",
"0.5536541",
"0.5519635",
"0.5519155",
"0.5504317",
"0.5497455",
"0.54967433",
"0.54760814",
"0.5474998",
"0.54712003",
"0.544202",
"0.544202",
"0.544202",
"0.54153246",
"0.54033476",
"0.5387423",
"0.5376894",
"0.53480315",
"0.5340905",
"0.53408736",
"0.5322353",
"0.5315769"
] | 0.69781613 | 1 |
Create a layer asset. (layers.create) | public function create(\Google\Service\MapsEngine\Layer $postBody, $optParams = array())
{
$params = array('postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('create', array($params), 'Google\Service\MapsEngine\Layer');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function make_image() {\n $this->imagecreatetruecolortrans();\n\n // Get all the layers in this design and theme\n $this->_get_layer_data();\n\n // Process the layers\n $this->_make_layers();\n }",
"function factoryLayer($style = PLUGINS_INVOCATIONS_TAGS_ADLAYER_DEFAULT_LAYERSTYLE, $type = 'invocation')\n {\n $fileName = dirname(__FILE__).\"/layerstyles/{$style}/{$type}.inc.php\";\n\n if(!file_exists($fileName)) {\n MAX::raiseError(\"Unable to include the {$fileName} file\");\n return false;\n } else {\n include_once $fileName;\n }\n $className = \"Plugins_\" . ucfirst($this->group) . '_' . ucfirst($this->component) . '_Layerstyles_'\n . ucfirst($style) . '_' . ucfirst($type);\n if (!class_exists($className)) {\n MAX::raiseError(\"Plugin file included but class '$className' doesn't exists\");\n return false;\n }\n\n $obj = new $className;\n\n // Assign this component group's translation resource to the created layer object\n $obj->oTrans = $this->oTrans;\n return $obj;\n }",
"public function create()\n {\n //Image\n }",
"public function create()\n\t{\n\t\t$TileLayer = new \\App\\TileLayer();\n\n\t\treturn view('backend.tilelayer.create', compact('TileLayer'));\n\t}",
"public function actionCreate()\n {\n $model = new Assets;\n $module = 'Assets';\n $this->LoginCheck();\n unset($_POST['submit']);\n // call function createAsset to create new asset\n $model->createAsset($module, $_POST);\n }",
"public function createAsset($inputs = array(), $filters = array(), array $options = array()) {\n\t\tif (! is_array ( $inputs )) {\n\t\t\t$inputs = array (\n\t\t\t\t\t$inputs \n\t\t\t);\n\t\t}\n\t\t\n\t\tif (! is_array ( $filters )) {\n\t\t\t$filters = array (\n\t\t\t\t\t$filters \n\t\t\t);\n\t\t}\n\t\t\n\t\tif (! isset ( $options ['output'] )) {\n\t\t\t$options ['output'] = $this->output;\n\t\t}\n\t\t\n\t\tif (! isset ( $options ['vars'] )) {\n\t\t\t$options ['vars'] = array ();\n\t\t}\n\t\t\n\t\tif (! isset ( $options ['debug'] )) {\n\t\t\t$options ['debug'] = $this->debug;\n\t\t}\n\t\t\n\t\tif (! isset ( $options ['root'] )) {\n\t\t\t$options ['root'] = array (\n\t\t\t\t\t$this->root \n\t\t\t);\n\t\t} else {\n\t\t\tif (! is_array ( $options ['root'] )) {\n\t\t\t\t$options ['root'] = array (\n\t\t\t\t\t\t$options ['root'] \n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t$options ['root'] [] = $this->root;\n\t\t}\n\t\t\n\t\tif (! isset ( $options ['name'] )) {\n\t\t\t$options ['name'] = $this->generateAssetName ( $inputs, $filters, $options );\n\t\t}\n\t\t\n\t\t$asset = $this->createAssetCollection ( array (), $options );\n\t\t$extensions = array ();\n\t\t\n\t\t// inner assets\n\t\tforeach ( $inputs as $input ) {\n\t\t\tif (is_array ( $input )) {\n\t\t\t\t// nested formula\n\t\t\t\t$asset->add ( call_user_func_array ( array (\n\t\t\t\t\t\t$this,\n\t\t\t\t\t\t'createAsset' \n\t\t\t\t), $input ) );\n\t\t\t} else {\n\t\t\t\t$asset->add ( $this->parseInput ( $input, $options ) );\n\t\t\t\t$extensions [pathinfo ( $input, PATHINFO_EXTENSION )] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filters\n\t\tforeach ( $filters as $filter ) {\n\t\t\tif ('?' != $filter [0]) {\n\t\t\t\t$asset->ensureFilter ( $this->getFilter ( $filter ) );\n\t\t\t} elseif (! $options ['debug']) {\n\t\t\t\t$asset->ensureFilter ( $this->getFilter ( substr ( $filter, 1 ) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// append variables\n\t\tif (! empty ( $options ['vars'] )) {\n\t\t\t$toAdd = array ();\n\t\t\tforeach ( $options ['vars'] as $var ) {\n\t\t\t\tif (false !== strpos ( $options ['output'], '{' . $var . '}' )) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$toAdd [] = '{' . $var . '}';\n\t\t\t}\n\t\t\t\n\t\t\tif ($toAdd) {\n\t\t\t\t$options ['output'] = str_replace ( '*', '*.' . implode ( '.', $toAdd ), $options ['output'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// append consensus extension if missing\n\t\tif (1 == count ( $extensions ) && ! pathinfo ( $options ['output'], PATHINFO_EXTENSION ) && $extension = key ( $extensions )) {\n\t\t\t$options ['output'] .= '.' . $extension;\n\t\t}\n\t\t\n\t\t// output --> target url\n\t\t$asset->setTargetPath ( str_replace ( '*', $options ['name'], $options ['output'] ) );\n\t\t\n\t\t// apply workers and return\n\t\treturn $this->applyWorkers ( $asset );\n\t}",
"private function createOnDemand()\n {\n global $Core;\n\n $this->resize();\n\n if ($this->isWatermarkRequired()) {\n $this->addWatermark();\n\n $hasWatermark = 1;\n } else {\n $hasWatermark = 0;\n }\n\n $file = $this->imagick->__toString();\n\n $fileLocation = $this->insertImage($Core->imagesDir.$this->currentFolder, md5($file), 0, $hasWatermark);\n\n $this->previewImage($fileLocation);\n }",
"private function _make_layers() {\n $layer_count = count($this->layers);\n\n for ($i = 0; $i < $layer_count; $i++) {\n call_user_func($this->layers[$i]['functionname'], $this, $this->layers[$i]['data']);\n // $this->layers[$i]['functionname']($this, $this->layers[$i]['data']);\n }\n }",
"public static function create($parentId, $data = array(), $save = true) {\n\n // create already the real class for the asset type, this is especially for images, because a system-thumbnail\n // (tree) is generated immediately after creating an image\n $class = \"Asset\";\n if(array_key_exists(\"filename\", $data) && (array_key_exists(\"data\", $data) || array_key_exists(\"sourcePath\", $data) || array_key_exists(\"stream\", $data))) {\n if(array_key_exists(\"data\", $data) || array_key_exists(\"stream\", $data)) {\n $tmpFile = PIMCORE_SYSTEM_TEMP_DIRECTORY . \"/asset-create-tmp-file-\" . uniqid() . \".\" . File::getFileExtension($data[\"filename\"]);\n if(array_key_exists(\"data\", $data)) {\n File::put($tmpFile, $data[\"data\"]);\n } else {\n $streamMeta = stream_get_meta_data($data[\"stream\"]);\n if(file_exists($streamMeta[\"uri\"])) {\n // stream is a local file, so we don't have to write a tmp file\n $tmpFile = $streamMeta[\"uri\"];\n } else {\n // write a tmp file because the stream isn't a pointer to the local filesystem\n rewind($data[\"stream\"]);\n $dest = fopen($tmpFile, \"w+\");\n stream_copy_to_stream($data[\"stream\"], $dest);\n fclose($dest);\n }\n }\n $mimeType = Mime::detect($tmpFile);\n unlink($tmpFile);\n } else {\n $mimeType = Mime::detect($data[\"sourcePath\"], $data[\"filename\"]);\n if (is_file($data[\"sourcePath\"])) {\n $data[\"stream\"] = fopen($data[\"sourcePath\"], \"r+\");\n }\n\n unset($data[\"sourcePath\"]);\n }\n\n $type = self::getTypeFromMimeMapping($mimeType, $data[\"filename\"]);\n $class = \"\\\\Pimcore\\\\Model\\\\Asset\\\\\" . ucfirst($type);\n if(array_key_exists(\"type\", $data)) {\n unset($data[\"type\"]);\n }\n }\n\n $asset = new $class();\n $asset->setParentId($parentId);\n $asset->setValues($data);\n\n if($save) {\n $asset->save();\n }\n\n\n return $asset;\n }",
"public function store(Requests\\CreateOrEditTileLayerRequest $request)\n\t{\n\t\t\\App\\TileLayer::create(Request::all());\n\n\t\treturn redirect('admin/tilelayer');\n\t}",
"public function createZone();",
"public abstract function create($width, $height, $color = 0xffffff, $opacity = 0);",
"public function createAsset($inputs = [], $filters = [], array $options = [])\n {\n if (!is_array($inputs)) {\n $inputs = array($inputs);\n }\n\n if (!is_array($filters)) {\n $filters = array($filters);\n }\n\n if (!isset($options['output'])) {\n $options['output'] = $this->output;\n }\n\n if (!isset($options['vars'])) {\n $options['vars'] = [];\n }\n\n if (!isset($options['debug'])) {\n $options['debug'] = $this->debug;\n }\n\n if (!isset($options['root'])) {\n $options['root'] = array($this->root);\n } else {\n if (!is_array($options['root'])) {\n $options['root'] = array($options['root']);\n }\n\n $options['root'][] = $this->root;\n }\n\n if (!isset($options['name'])) {\n $options['name'] = $this->generateAssetName($inputs, $filters, $options);\n }\n\n $asset = $this->createAssetCollection([], $options);\n $extensions = [];\n\n // inner assets\n foreach ($inputs as $input) {\n if (is_array($input)) {\n // nested formula\n $asset->add(call_user_func_array(array($this, 'createAsset'), $input));\n } else {\n $asset->add($this->parseInput($input, $options));\n $extensions[pathinfo($input ?: '', PATHINFO_EXTENSION)] = true;\n }\n }\n\n // filters\n foreach ($filters as $filter) {\n if ('?' != $filter[0]) {\n $asset->ensureFilter($this->getFilter($filter));\n } elseif (!$options['debug']) {\n $asset->ensureFilter($this->getFilter(substr($filter, 1)));\n }\n }\n\n // append variables\n if (!empty($options['vars'])) {\n $toAdd = [];\n foreach ($options['vars'] as $var) {\n if (false !== strpos($options['output'] ?: '', '{'.$var.'}')) {\n continue;\n }\n\n $toAdd[] = '{'.$var.'}';\n }\n\n if ($toAdd) {\n $options['output'] = str_replace('*', '*.'.implode('.', $toAdd), $options['output']);\n }\n }\n\n // append consensus extension if missing\n if (1 == count($extensions) && !pathinfo($options['output'] ?: '', PATHINFO_EXTENSION) && $extension = key($extensions)) {\n $options['output'] .= '.'.$extension;\n }\n\n // output --> target url\n $asset->setTargetPath(str_replace('*', $options['name'], $options['output']));\n\n // apply workers and return\n return $this->applyWorkers($asset);\n }",
"abstract protected function createResource();",
"public function create() {\n //$this->configuration->setContainer($this->container);\n //$this->configuration->setConfigRootDirectory('/src/Garbanzo/Core');\n //$this->configuration->loadFile($this->mainConfigFileName);\n }",
"public abstract function create();",
"public function created(Asset $a)\n {\n //\n }",
"public function createStage($params);",
"abstract public function create();",
"abstract public function create();",
"abstract public function create();",
"abstract public function create();",
"abstract public function create();",
"public function get()\n {\n if (!isset($this->layer)) {\n $this->layer = $this->objectManager->create($this->layersPool['category']);\n }\n return $this->layer;\n }",
"public function testOptionalOutputPath()\n {\n $width = 830;\n $height = 360;\n\n $config = [\n 'id' => 11,\n 'width' => $width,\n 'height' => $height,\n ];\n\n $instance = new Pslayers($config);\n\n // background layer\n $backgroundLayer = new SolidLayer([\n 'id' => 'master-layer-solid-base',\n 'width' => $width,\n 'height' => $height,\n 'opacity' => 1.0,\n 'positionX' => 0,\n 'positionY' => 0,\n 'composite' => Imagick::COMPOSITE_DEFAULT,\n 'colour' => '#0F0',\n ]);\n\n $instance->addLayer($backgroundLayer, 0);\n\n // gradient layer\n $gradientLayer = new GradientLayer([\n 'id' => 'master-layer-gradient',\n 'width' => $width,\n 'height' => $height / 2,\n 'opacity' => 0.9,\n 'positionX' => 0,\n 'positionY' => 0,\n 'composite' => Imagick::COMPOSITE_OVER,\n 'startColour' => '#F00',\n 'endColour' => 'transparent',\n ]);\n\n $instance->addLayer($backgroundLayer, 0);\n $instance->addLayer($gradientLayer, 1);\n $img = $instance->render();\n\n $this->assertInstanceOf(Pslayers::class, $instance);\n $this->assertNotEmpty($instance->layers);\n $this->assertInstanceOf(LayerCollection::class, $instance->layers);\n $this->assertInstanceOf(Imagick::class, $img);\n $this->assertEquals($width, $img->getImageWidth());\n $this->assertEquals($height, $img->getImageHeight());\n $this->assertEquals('png32', $img->getImageFormat());\n }",
"function CreateObject($modelid, $X, $Y, $Z, $rX, $rY, $rZ, $DrawDistance = 0.0) {\n \n}",
"function create();",
"function create();",
"function create();",
"function create();"
] | [
"0.5864453",
"0.5611243",
"0.55078024",
"0.55015165",
"0.51529855",
"0.51486766",
"0.51443225",
"0.50925535",
"0.5085779",
"0.4940608",
"0.48839566",
"0.4872278",
"0.4856707",
"0.4851796",
"0.4827042",
"0.48161936",
"0.48073578",
"0.47938538",
"0.4786241",
"0.4786241",
"0.4786241",
"0.4786241",
"0.4786241",
"0.4774543",
"0.4767619",
"0.4733382",
"0.4715537",
"0.4715537",
"0.4715537",
"0.4715537"
] | 0.61415964 | 0 |
Simple UPDATE query [w/ MULTITABLE UPDATE support] | abstract protected function simple_update_query ( $sql ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function exec_UPDATEquery($table, $where, $fields_values, $no_quote_fields = false);",
"function update($sql, $mode = ResultSet::FETCHMODE_NUM);",
"function _update() {\n\t\t$database = database::db();\n\t\t$update = 'UPDATE `'.$this->table.'` SET '.$this->_fields();\n\t\t$update .= sprintf(' WHERE '.$this->_esc($this->id_field).'=%s', $this->_esc($this->set[$this->id_field]));\n\t\t$database->query($update);\n\t\t$this->query = $update;\n\t\t//return $ret;\n\t}",
"public function UPDATEquery($table, $where, $fields_values, $no_quote_fields = false);",
"private function update() {\n // use prepared statements\n }",
"function update($table,$data,$cond='',$limit=''){\r\n if(is_array($data)){\r\n $d='';\r\n foreach($data as $k=>$v){$d.=$k.'='.$this->value($v).',';}\r\n $data=rtrim($d,',');\r\n }\r\n $q='update '.$table.' set '.$data;\r\n if(is_numeric($cond))$cond='rowid='.$cond;\r\n if(!empty($cond))$q.=' where '.$cond; //echo $q;\r\n //if(!empty($limit))$q.=' LIMIT '.$limit; //Must enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT , https://www.sqlite.org/compile.html#enable_update_delete_limit\r\n $q=@$this->query($q);\r\n return $q;\r\n //if($q)return $this->id(); else return false; // $this->id() available for insert() only\r\n}",
"abstract public function UPDATE($args);",
"function dbUpdate($table, $modifyFields, $idName, $idValue, $idName2 = null, $idValue2 = null)\n{\n $i = 1;\n $sql = \"UPDATE $table SET \";\n $proxyFields = array((\":\".$idName)=>$idValue);\n foreach ($modifyFields as $column => $value){\n if ($value !== null){\n $proxyFields[\":\" . $column] = $value;\n } else {\n $proxyFields[\":\" . $column] = NULL;\n }\n $sql .= \"$column = :$column\";\n if ($i != sizeOf($modifyFields)){\n $sql .= \", \";\n } else {\n $sql .= \" \";\n }\n $i++;\n }\n $sql .= \"WHERE $idName = :$idName \";\n if ($idName2 != null && $idValue2 != null){\n $sql .= \"AND $idName2 = :$idName2 \";\n $proxyFields[\":\" .$idName2] = $idValue2;\n } else {\n $sql .= \"LIMIT 1;\";\n }\n\n $result = db_query($sql, $proxyFields);\n\n return ($result != false);\n}",
"function update($fields_with_values, $where, $table = '') {\n \n if (is_array($where)) {\n \t$where = implode(',', $where);\n }\n \n return $this->_db->_connection->AutoExecute(strlen($table) ? $this->_db->prefix . $table : $this->table, $fields_with_values, 'UPDATE', $where);\n }",
"public function update ($table_quotef, $where_quotef, $sets_quotef_etc);",
"public function update() {\n\t\t$this->updateSanityCheck();\n\t\t$sql = 'UPDATE ' . self::escapeWithTicks($this->table) . ' SET ';\n\t\t\n\t\t$first = true;\n\t\t$table_prefix = $this->tableAsPrefix() . '.';\n\t\tforeach($this->assignments as $assignment) {\n\t\t\tif($first) { $first = false; }\n\t\t\telse { $sql .= ', '; }\n\t\t\t$sql .= self::escapeWithTicks(str_replace($table_prefix, '', $assignment->column)) . ' = ' . $assignment->getQueryParameter();;\n\t\t}\n\t\t\n\t\t$sql .= $this->whereHelper();\n\t\t\n\t\treturn $sql;\n\t}",
"function dbUpdate($opt)\n{\n\tglobal $context; \n\t\n\tif(!isset($opt[cond]))\n\t\t$opt[cond] = 'limit 1'; //prevent updating of all entries \n\t\n\t$set = array(); \n\tforeach($opt[dbFields] as $fld => $val)\n\t{\n\t\tarray_push($set, $fld.'=\"'.addslashes($val).'\"'); \n\t}\n\t\n\t$theSet = implode(',', $set); \n\t\n\t$upd = 'update '.$opt[tableName].' set '.$theSet.' '.$opt[cond]; \n\t$u = mysql_query($upd, $context[conn]) or die(mysql_error().' '.$upd); \n\t\n\treturn $u; \n}",
"function update(){\r\n\t\t# UPDATE tablename SET values WHERE condition.\r\n\t\tfor ($i = 0; $i < func_num_args(); $i++) {\r\n\t\t #printf(\"Argument %d: %s\\n\", $i, func_get_arg($i));\r\n\t\t $param[$i]=func_get_arg($i);\r\n\t\t \r\n\t\t}\r\n\t\ttry {\r\n\t\t\t$param_len = count($param) ;\r\n\t\t\tif ( $param_len < 2 ) {\r\n\t\t\t\techo \"Insufficient Arguments!<br>\"; \r\n\t\t\t} elseif ($param_len == 2) {\r\n\t\t\t\t# code...\r\n\t\t\t\t$table_name = $param[0];\r\n\t\t\t\t$data = $param[1];\r\n\t\t\t\t$condition = \"\";\r\n\t\t\t\t//echo \"<br> select query with 2 param\";\t\t\t\r\n\t\t\t\trun_update_query($table_name, $data, $condition);\t\t\r\n\r\n\t\t\t} elseif ($param_len == 3) {\r\n\t\t\t\t# code...\r\n\t\t\t\t$table_name = $param[0];\r\n\t\t\t\t$data = $param[1];\r\n\t\t\t\t$condition = $param[2] ;\r\n\t\t\t\t//echo \" <br> select query with 3 param\";\r\n\t\t\t\trun_update_query($table_name, $data, $condition);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\treturn $e; \t\r\n\t\t\t}\r\n\t}",
"public static function update($stmt, $params = []);",
"function makeUpdateQuery($table, $column_map, $conditional_map);",
"public function doUpdate() {\r\n\t\t// need to set the where clause\r\n\t\t$v = $this->valueObject->getvariable();\r\n\t\t$where[] = array('variable'=>$v);\r\n\t\t$this->valueObject->getQueryObject()->setWhere($where);\r\n\r\n\t\t//$sql = $this->getSQLFactory()->prepUpdateStatement($this->valueObject);\r\n\t\t$result = $this->getDBFactory()->doUpdate($this->valueObject);\r\n\r\n\t}",
"private function bulkUpdate()\n {\n foreach ($this->fetchRecords() as $record) {\n $this->rowsAffected += $this->resourceConnection\n ->getConnection()\n ->update(\n $this->resourceConnection->getTableName($this->tableName),\n $this->getUpdateBindings($record[$this->getBindKey()]),\n $this->getUpdateWhereClause($record[$this->getWhereKey()])\n );\n }\n }",
"function sql_update($tbl,$row,$settings,$conditions=\"\")\r\n\t{\r\n\t\t$sql = $this->sql_connection($settings);\r\n\t\t$sets = array();\r\n\t\tforeach ($row as $key => $value)\r\n\t\t{\r\n\t\t\tif ($value === NULL)\r\n\t\t\t\t$value = 'NULL';\r\n\t\t\telse\r\n\t\t\t\t$value = \"'\".mysql_real_escape_string($value).\"'\";\r\n\t\t\tarray_push($sets,$key.\"=\".$value);\r\n\t\t}\r\n\t\t$str = \"UPDATE \".$settings['dbPrefix'].$tbl.\" SET \".implode(',',$sets).\" \".$conditions;\r\n\t\t$q = mysql_query($str,$sql);\r\n\t}",
"public function update($sql,$params=[])\n\t{\n\t\t return $this->rawQuery($sql,$params);\n\t}",
"private function _update() {\n // SQL query\n $sql = \"UPDATE {$this->getTableQuery()} SET {$this->prepareSet()} {$this->getWhereQuery()}\";\n\n // prepare SQL\n $statement = $this->db->prepare($sql);\n // bind data\n $statement = $this->bindData($statement);\n // bind where clause\n $statement = $this->bindWhere($statement);\n\n // notify\n $this->logger->notify($this->toString($sql));\n\n // reset data\n $this->clearData();\n\n // execute query and return rows affected count\n $statement->execute();\n return $statement->rowCount();\n }",
"public function update_1 ($table_quotef, $where_quotef, $sets_quotef_etc);",
"function update() {\n\t\tif (count($this->changed) == 0) { return; }\n\n\t\t$qry = array();\n\t\t$params = array();\n\t\tforeach ($this->changed as $col => $v) {\n\t\t\t$params[\":$col\"] = $this->{$col};\n\t\t\t$qry[] = \"`$col` = :$col\";\n\t\t}\n\n\t\t// debug($qry);\n\t\t// reset this back\n\t\t$this->changed = array();\n\t\t\n\t\t$qry = implode(\", \", array_filter($qry));\n\t\t$qry = \"UPDATE `{$this->table}` SET \".$qry;\n\t\t$qry .= \" WHERE id = {$this->id}\";\n\n\t\t$rs = $this->query($qry, $params);\n\t\t$this->afterupdate();\n\n\t\treturn $rs;\n\t}",
"public function update( $table, $set, $where='', $shutdown=false, $preformatted=false, $add_join=array() );",
"private function update() {\n\t\t// TODO: UPDATE EXISTING ROW\n\t\t$sql = \"UPDATE {$this->tableName} SET \";\n\n\t\t$i = 0;\n\n\t\tforeach ( $this->columns as $column => $value ) {\n\t\t\tif ( ! empty( $value ) && $column != 'ID' ) {\n\t\t\t\tif ( $i != 0 ) {\n\t\t\t\t\t$sql .= ', ';\n\t\t\t\t}\n\t\t\t\t$sql .= \"{$column}='{$value}'\";\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t}\n\n\t\t$sql .= \" WHERE ID={$this->ID}\";\n\n\t\tif ( $result = $this->query( $sql ) ) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tapp::$errors['db:update'] = \"Error in updating {$this->class}: \" . app::$conn->error;\n\n\t\treturn false;\n\t}",
"function update($fields=array(), $where=false, $limit=false, $params=array()) {\n if (count($fields) == 0) {\n return;\n }\n $qStr\t= \"\";\n foreach ($fields as $key => $val) {\n $qStr .= \"$key = :$key, \";\n }\n $qStr\t\t\t= rtrim($qStr, \", \");\n $this->query\t= \"UPDATE \".$this->table.\" SET \".$qStr;\n if ($where) {\n $this->query\t.= \" WHERE \".$where;\n }\n if ($limit) {\n $this->query .= \" LIMIT $limit\";\n }\n //echo $this->query;\n $this->execute($params);\n $this->rowsAffected = $this->result->rowCount();\n\t}",
"public function Update(){\r\n\r\n //Create the update query.\r\n $qu = \"UPDATE $this->tableName SET \";\r\n foreach($this->propertyNames as $tempName){\r\n if ($tempName != $this->keyId_name){\r\n $qu .= \" $tempName='\" . @mysql_real_escape_string($this->propertyVals[array_search($tempName,$this->propertyNames,true)]) . \"',\";\r\n }\r\n }\r\n\r\n //Remove the last comma from the query.\r\n $qu=substr($qu,0,strlen($qu)-1);\r\n\r\n //There may be a facilty code, so one of two possible \"WHERE\" clauses will be used accordingly.\r\n if ($this->fckeyname == 'none'){\r\n $qu .= \" WHERE $this->keyId_name = $this->keyId LIMIT 1;\";\r\n }\r\n if ($this->fckeyname != 'none'){\r\n $qu .= \" WHERE $this->keyId_name = $this->keyId\r\n AND $this->fckeyname = \" . $this->GetValue($this->fckeyname) . \" LIMIT 1;\";\r\n }\r\n $ru = @mysql_query($qu,$this->dbconnection);\r\n }",
"function update() {\n\t global $db, $repository;\n\n\t reset($this->data);\n\t while(list($key,$val)=each($this->data)){\n\t\tif($key != $this->idKey) {\n\t\t if($val === NULL) {\n\t\t\t $my_sql[] = $key . \" = NULL\";\n\t\t } else {\n\t\t\t //dump($val, 'val');\n\t\t\t if(in_array($key, $this->binaryFields)) {\n\t\t\t\t//if(strpos($val, \"'\"))\n\t\t\t\t//\t raiseError(\"invalid character in binary field data\");\n\t\t\t\t$my_sql[] = $key . \" = '\". addslashes($val) . \"'\";\n\t\t\t } else {\n\t\t\t\t$my_sql[] = $key . \" = '\" . sotf_Utils::magicQuotes($val) . \"'\";\n\t\t\t }\n\t\t }\n\t\t}\n\t }\n\t $my_sql = implode(\", \", $my_sql);\n\n\t //execute the query\n\t $res = $db->query(\"UPDATE \" . $this->tablename . \" SET \" . $my_sql . \" WHERE \" . $this->idKey . \"='\" . $this->id . \"' \");\n\t \n\t //if the query is dead, stop executio, output error\n\t if(DB::isError($res)){\n\t\traiseError($res);\n\t }\n\n\t //$count = $db->affectedRows();\n\t $count = $res;\n\n\t if($count > 1)\n\t\t logError(\"This updated more objects\", $count);\n\t if($count < 1)\n\t\t logError(\"Update failed\", $count);\n\t if($count==1) {\n\t\t $this->changed = false;\n\t\t // mark if this change requires a refresh in the metadata.xml file\n\t\t $this->markParentToUpdate();\n\t }\n\t return ($count==1);\n }",
"public function testBasicUpdateQuery()\n\t{\n\t\t$update = new Query_Update($this->db);\n\t\t$update->table('sometable');\n\t\t$update->set('id', 1);\n\n\t\t$expected = \"UPDATE `sometable`\\n\";\n\t\t$expected .= \"SET `id` = 1\\n\";\n\n\t\t$actual = $update->getSql();\n\n\t\t$this->assertEquals($expected, $actual);\n\t}",
"public function executeUpdate($sqlQuery);",
"function update($table, $record, $recordWhere) {\r\n\r\n $tmpSet = array();\r\n $tmpWhere = array();\r\n foreach($record as $fieldName=>$field )\r\n {\r\n $tmpSet[] = $fieldName . \"=\" . $field;\r\n }\r\n\r\n foreach($recordWhere as $fieldName=>$field )\r\n {\r\n $tmpWhere[] = \" \" . $fieldName . \" = \" . $field . \" \";\r\n }\r\n $sql = \"update \" . $table .\" set \" . join(\",\",$tmpSet) . \" where \" . join(\" and \",$tmpWhere);\r\n\r\n {\r\n echo \"<hr>(\".$this->driver.\") $sql<hr>\";\r\n }\r\n $res = $this->conn->Execute( $sql );\r\n\r\n return( $res );\r\n\r\n }"
] | [
"0.7260558",
"0.71450216",
"0.71164644",
"0.7116055",
"0.7107259",
"0.6933108",
"0.6922604",
"0.6914396",
"0.69130236",
"0.68985444",
"0.68920445",
"0.6794856",
"0.6774688",
"0.6742726",
"0.6696439",
"0.66804427",
"0.66641843",
"0.66535413",
"0.6650521",
"0.66481966",
"0.6647928",
"0.66379565",
"0.6637482",
"0.6635643",
"0.66272813",
"0.65906376",
"0.6577276",
"0.6560222",
"0.6541324",
"0.6535334"
] | 0.75030744 | 0 |
Simple ALTER TABLE query | abstract protected function simple_alter_table ( $sql ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _alterTables() {\n \t// to be used lower down the inheritance chain to create the table(s)\n }",
"public function change()\n {\n $table = $this->table('subjects',[\n 'id' => false,\n 'primary_key' => 'id'\n ]);\n $table\n ->addColumn('id','uuid')\n ->addColumn('subject_name',\\Phinx\\Util\\Literal::from('citext'),[\n 'null' => false,\n 'length' => 20,\n ])\n ->addColumn('description','text',[\n 'null' => false,\n 'length' => 70,\n ])\n ->addColumn('department_id', 'uuid')\n ->addColumn('created','datetime')\n ->addColumn('modified','datetime')\n ->create();\n }",
"protected function updateTable()\n {\n $connection = $this->entityManager->getConnection();\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` CHANGE evaluation_generation_date generated_at DATETIME',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (InvalidFieldNameException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` CHANGE display_name title VARCHAR(255) NOT NULL',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (InvalidFieldNameException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` ADD COLUMN category VARCHAR(255) NOT NULL',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` ADD COLUMN brand VARCHAR(255) NOT NULL',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` ADD COLUMN state VARCHAR(255) NOT NULL',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` ADD COLUMN cid VARCHAR(255) NOT NULL',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = ('DROP TABLE IF EXISTS `medium`');\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = ('DROP TABLE IF EXISTS `evaluation_mediums`');\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n try {\n $query = sprintf(\n 'ALTER TABLE `%s` DROP COLUMN uid',\n $this->tableName\n );\n\n $connection->exec($query);\n } catch (DriverException $ex) {\n }\n }",
"public function change()\n {\n // create the table\n $table = $this->table('transactions');\n $table->addColumn('description', 'string')\n ->addColumn('amount', 'integer')\n ->addColumn('account_id', 'integer')\n ->addColumn('created_at', 'datetime')\n ->addColumn('updated_at', 'datetime')\n ->addColumn('deleted_at', 'datetime', array('null' => true))\n ->create();\n }",
"public function change()\n {\n $table = $this->table('attempts');\n $table->addColumn('ip', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('action', 'string', [\n 'default' => null,\n 'limit' => 64,\n 'null' => false,\n ]);\n $table->addColumn('expires', 'timestamp', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('created_at', 'timestamp', [\n 'default' => 'CURRENT_TIMESTAMP',\n 'update' => '',\n 'null' => false,\n ]);\n $table->addIndex(['ip', 'action'], ['name' => 'IX_ip_action']);\n $table->create();\n }",
"public function change()\n {\n $table = $this->table('dishOrderDetail', ['id'=>false]);\n $table\n ->addColumn('userName', 'string', ['limit' => 32])\n ->addColumn('ID', 'integer', ['limit' => 8])\n ->addColumn('menuForDate', 'date')\n ->addColumn('dishNumber', 'integer', ['limit' => 8])\n ->addColumn('dishName', 'string', ['limit'=>32])\n ->addColumn('price', 'integer', ['limit' => 12])\n ->addColumn('description', 'string', ['limit' => 1000])\n ->addColumn('imageName', 'string', ['limit' => 32])\n ->create();\n \n }",
"public function change()\n {\n $table = $this->table('role_rule');\n $table->addColumn('role_id', 'integer', ['limit'=> 11, 'null' => false]);\n $table->addColumn('component_code', 'string', ['limit'=> 20, 'null' => false]);\n $table->addColumn('permission_flg', 'string', ['limit'=> 1, 'null' => false, 'default' => 'A', 'comment' => 'A = all , R = view only, N = not view']);\n $table->addColumn('data_flg', 'boolean', ['limit'=> 1, 'null' => false, 'default' => 1]);\n $table->addColumn('created_time', 'datetime');\n $table->addColumn('create_user', 'string', ['limit'=> 100, 'null' => false]);\n $table->addColumn('update_time', 'datetime');\n $table->addColumn('update_user', 'string', ['limit'=> 100, 'null' => false]);\n $table->create();\n }",
"public function change()\n {\n // ↑\n $table = $this->table(\"deleted\", ['id' => false, 'primary_key' => 'id'] );\n $table->addColumn(\"id\", \"uuid\" );\n $table->addColumn(\"tablename\", \"text\" );\n $table->addColumn(\"content\", \"jsonb\" );\n $table->addColumn(\"reason\", \"text\", ['null' => 'true'] );\n $table->addColumn(\"user_id\", \"uuid\" );\n $table->addColumn(\"manager_id\", \"uuid\", ['null' => 'true'] );\n $table->addTimestamps();\n $table->addForeignKey('user_id', 'users', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'] );\n $table->addForeignKey('manager_id', 'users', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE'] );\n\n $table->create();\n\n $this->execute('ALTER TABLE deleted ALTER COLUMN id SET DEFAULT uuid_generate_v4()');\n $this->execute(\"ALTER TABLE deleted ALTER COLUMN created_at SET DEFAULT timezone('Australia/Melbourne'::text, now())\");\n }",
"public function change()\n {\n $productions = $this->table('productions');\n $productions->addColumn('member_id', 'integer')\n ->addColumn('industry_code', 'string')\n ->addColumn('name', 'string')\n ->addColumn('code', 'string')\n ->addColumn('short_description', 'text')\n ->addColumn('price', 'string')\n ->addColumn('unit', 'string')\n ->addColumn('image', 'string')\n ->addColumn('description', 'text')\n ->addColumn('status', 'integer',['default' => STATUS_UNAPPROVED])\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true, 'default' => null])\n ->save();\n }",
"public function change()\n {\n $table = $this->table('blogs');\n $table->addColumn('user_id', 'integer');\n $table->addColumn('title', 'string');\n $table->addColumn('body', 'text');\n $table->addColumn('tags', 'string');\n $table->addColumn('category_id', 'integer');\n $table->addColumn('status', 'string');\n $table->addTimestamps();\n $table->create();\n }",
"public function change()\n {\n $table = $this->table('teacher_schedules');\n $table->addColumn('title', 'string', [\n 'default' => null,\n 'limit' => 100,\n 'null' => false,\n ]);\n $table->addColumn('start_at', 'time', [\n 'default' => null,\n 'limit' => 6,\n 'null' => false,\n ]);\n $table->addColumn('end_at', 'time', [\n 'default' => null,\n 'limit' => 6,\n 'null' => false,\n ]);\n $table->addColumn('status', 'boolean', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->create();\n }",
"public function change()\n {\n $table = $this->table('registro_equipos');\n $table->addColumn('Codigo', 'string', array('limit' => 100))\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime')\n ->create();\n\n $refTable = $this->table(\"registro_equipos\");\n $refTable->addColumn(\"persona_id\", \"integer\", array(\"signed\" => \"disable\"))\n ->addForeignKey(\"persona_id\", \"personas\", \"id\", array(\"delete\" => \"CASCADE\", \"update\" => \"NO_ACTION\"))\n ->addColumn(\"user_id\", \"integer\", array(\"signed\" => \"disable\"))\n ->addForeignKey(\"user_id\", \"users\", \"id\", array(\"delete\" => \"CASCADE\", \"update\" => \"NO_ACTION\"))\n ->update();\n }",
"function AlterTable($conf)\n\t{\n\t\tif(!$qu = $this->DDL()->GetAlterTable( Toolbox::toArray($conf) )){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->query($qu,'alter');\n\t}",
"public function change()\n {\n $table = $this->table('url');\n $table->addColumn('hits', 'integer', ['default' => 0])\n ->addColumn('url', 'string')\n ->addColumn('shortUrl', 'string')\n ->addColumn('user', 'integer')\n ->addIndex(['user'])\n ->addForeignKey('user', 'user', 'id', ['constraint' => 'url_user_foreign_key'])\n ->create();\n }",
"function MigrateSchemaByAlter(&$dbh)\n\t{\n\t\tif($this->SchemaMatches($dbh)) return 0;\n\n\t\t//Existing columns must match\n\t\t//Return value of -1 means ALTER cannot be used to migrate\n\t\t$sql = \"PRAGMA table_info(\".$dbh->quote($this->name).\");\";\n\t\t$ret = $dbh->query($sql);\n\t\tif($ret===false) {$err= $dbh->errorInfo();throw new Exception($sql.\",\".$err[2]);}\n\t\t$count =0;\n\t\tforeach($ret as $row)\n\t\t{\n\t\t\tif((int)$row['cid'] >= count($this->cols)) return -1;\n\t\t\tlist($name,$type,$primaryKey,$unique) = $this->cols[(int)$row['cid']];\n\t\t\tif($row['name'] != $name) return -1;\n\t\t\tif($row['type'] != $type) return -1;\n\t\t\tif((int)$row['pk'] != $primaryKey) return -1;\n\t\t\t$count ++;\n\t\t}\n\n\t\t//Add additional columns\n\t\tfor($i=$count;$i < count($this->cols);$i++)\n\t\t{\n\t\t\t$col = $this->cols[$i];\n\t\t\t$sqlVals = array($this->name);\n\t\t\tlist($name,$type,$primaryKey,$unique) = $col;\n\t\t\tif($primaryKey or $unique) return -1; //Cannot add a new indexed column\n\t\t\tlist($sqlCode, $sv) = $this->GetColumnDef($col, $dbh);\n\t\t\t$sqlVals = array_merge($sqlVals, $sv);\n\t\t\t$sql = \"ALTER TABLE ? ADD COLUMN \".$sqlCode.\";\";\n\t\t\t//echo $sql;\n\t\t\t$sth = $dbh->prepare($sql);\n\t\t\tif($sth===false) {$err= $dbh->errorInfo();throw new Exception($sql.\",\".$err[2]);}\n\t\t\t$ret = $sth->execute($sqlVals);\n\t\t\tif($ret===false) {$err= $dbh->errorInfo();throw new Exception($sql.\",\".$err[2]);}\n\t\t}\n\t\n\t\t//Check migration result\n\t\tif(!$this->SchemaMatches($dbh)) throw new Exception(\"Database migration failed\");\n\n\t\treturn 1;\n\t}",
"public function change()\n {\n $table = $this->table('category', ['signed' => false]);\n $table->addColumn('name', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('slug', 'string', ['limit' => 255, 'null' => false])\n ->create();\n\n $table = $this->table('post_category', ['id' => false, 'primary_key' => ['post_id', 'category_id']]);\n $table->addColumn('post_id', 'integer', ['signed' => false])\n ->addForeignKey('post_id', 'post', 'id', ['delete' => 'CASCADE', 'update' => 'RESTRICT', 'constraint' => 'fk_post'])\n ->addColumn('category_id', 'integer', ['signed' => false])\n ->addForeignKey('category_id', 'category', 'id', ['delete' => 'CASCADE', 'update' => 'RESTRICT', 'constraint' => 'fk_category'])\n ->create();\n }",
"public function change()\n {\n $table = $this->table($this->tableName);\n $table->addColumn('name', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n 'comment' => 'Full Name'\n ]);\n $table->addColumn('description', 'text', [\n 'default' => null,\n 'null' => true,\n 'comment' => 'Comment',\n ]);\n $table->addColumn('balance', 'decimal', [\n 'default' => 0,\n 'null' => false,\n 'comment' => 'Balance',\n ]);\n $table->addColumn('interest', 'decimal', [\n 'default' => 0,\n 'null' => false,\n 'comment' => 'Interest',\n ]);\n $table->addColumn('type', 'string', [\n 'null' => true,\n 'comment' => 'Type',\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n 'comment' => 'Created',\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n 'comment' => 'Modified',\n ]);\n $table->create();\n }",
"private function dbAlterTable($table)\n {\n if (!isset($table['name']) || empty($table['fields'])) {\n return false;\n }\n\n // check if number of columns match\n $columns = array_keys($table['fields']);\n $columns_list = implode('\\',\\'', $columns);\n $sql = '\nSELECT\n\tcolumn_name\nFROM\n\tinformation_schema.columns\nWHERE\n\ttable_schema = \"'._DB_NAME_.'\"\nAND\n\ttable_name = \"'.$table['name'].'\"\nAND\n\tcolumn_name IN (\\''.$columns_list.'\\')';\n\n $db = Db::getInstance(_PS_USE_SQL_SLAVE_);\n // query columns already present\n $columns_present = $db->ExecuteS($sql);\n $return = (0 === $db->getNumberError());\n\n if ($return && count($columns_present) !== count($columns)) {\n // required columns are Not all present\n // create missing columns\n $columns_present = array_map('current', $columns_present);\n $after = !isset($table['after']) ? '' : ('FIRST' === $table['after'] ? 'FIRST' : 'AFTER '.$table['after']);\n $sql = 'ALTER TABLE `'.$table['name'].'`'.PHP_EOL;\n foreach ($table['fields'] as $key => $value) {\n if (!in_array($key, $columns_present)) {\n $sql .= 'ADD COLUMN `'.$key.'` '.$value.' '.$after.','.PHP_EOL;\n }\n\n $after = 'AFTER `'.$key.'`';\n }\n // remove final ',' -1 if no EOL char added\n $sql = Tools::substr($sql, 0, -2);\n\n // add missing columns\n $db->execute($sql);\n $return = (0 === $db->getNumberError());\n }\n\n return $return;\n }",
"public function addAlterCol($_query, $_tableName, Setup_Backend_Schema_Field_Abstract $_declaration, $_oldName = NULL);",
"public function safeUp()\n {\n $this->getDbConnection()->createCommand(\"\nALTER TABLE `compare_estimated_price_table` \n ADD `bathrooms_weighted` INT(11) DEFAULT '5' AFTER `house_weighted`,\n ADD `bedrooms_weighted` INT(11) DEFAULT '2' AFTER `bathrooms_weighted`,\n ADD `garages_weighted` INT(11) DEFAULT '3' AFTER `bedrooms_weighted`,\n ADD `pool_weighted` INT(11) DEFAULT '5' AFTER `garages_weighted`,\n DROP `amenties_weighted`\n \")->execute();\n }",
"public function change()\n {\n $table = $this->table('events');\n $table->addColumn('title', 'string')\n ->addColumn('date', 'date')\n ->addColumn('is_enabled', 'boolean')\n ->addColumn('is_recurring', 'boolean')\n ->create();\n }",
"function alterSchema($compare, $table = null) {\n\t\tif (!is_array($compare)) {\n\t\t\treturn false;\n\t\t}\n\t\t$out = '';\n\t\t$colList = array();\n\t\tforeach($compare as $curTable => $types) {\n\t\t\tif (!$table || $table == $curTable) {\n\t\t\t\t$out .= 'ALTER TABLE ' . $this->fullTableName($curTable) . \" \\n\";\n\t\t\t\tforeach($types as $type => $column) {\n\t\t\t\t\tswitch($type) {\n\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\tforeach($column as $field => $col) {\n\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t$alter = 'ADD '.$this->buildColumn($col);\n\t\t\t\t\t\t\t\tif (0 && isset($col['after'])) {\n\t\t\t\t\t\t\t\t\t$alter .= ' AFTER '. $this->name($col['after']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$colList[] = $alter;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'drop':\n\t\t\t\t\t\t\tforeach($column as $field => $col) {\n\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t$colList[] = 'DROP COLUMN '.$this->name($field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'change':\n\t\t\t\t\t\t\tforeach($column as $field => $col) {\n\t\t\t\t\t\t\t\tif (!isset($col['name'])) {\n\t\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// remove the not null statement if needed\n\t\t\t\t\t\t\t\t// as Oracle forbids setting NOT NULL if the constraint is already there!\n\t\t\t\t\t\t\t\tif (isset($col['null']) && $col['null'] === $this->_has_null_flag($curTable, $col['name'])) {\n\t\t\t\t\t\t\t\t\tunset($col['null']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$colList[] = 'MODIFY ('.$this->buildColumn($col).')';\n\t\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$out .= \"\\t\" . implode(\",\\n\\t\", $colList) . \"\\n\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}",
"public function change()\n {\n $table = $this->table('entrant_answers');\n\n if (!$table->exists()) {\n $table\n ->addColumn('id_entrant', 'integer', [\n 'null' => false\n ])\n ->addColumn('id_question', 'integer', [\n 'null' => false\n ])\n ->addColumn('answers', 'string', [\n 'null' => false,\n 'limit' => 255\n ])\n\n ->addForeignKey('id_entrant', 'entrants')\n ->addForeignKey('id_question', 'questions')\n\n ->addTimestamps('created', 'modified')\n ->save();\n }\n }",
"public function alterSchema($compare, $table = null) {\n\t\tif (!is_array($compare)) {\n\t\t\treturn false;\n\t\t}\n\t\t$out = '';\n\t\t$colList = array();\n\t\tforeach ($compare as $curTable => $types) {\n\t\t\t$indexes = $colList = array();\n\t\t\tif (!$table || $table === $curTable) {\n\t\t\t\t$out .= 'ALTER TABLE ' . $this->fullTableName($curTable) . \" \\n\";\n\t\t\t\tforeach ($types as $type => $column) {\n\t\t\t\t\tif (isset($column['indexes'])) {\n\t\t\t\t\t\t$indexes[$type] = $column['indexes'];\n\t\t\t\t\t\tunset($column['indexes']);\n\t\t\t\t\t}\n\t\t\t\t\tswitch ($type) {\n\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\tforeach ($column as $field => $col) {\n\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t$colList[] = 'ADD COLUMN ' . $this->buildColumn($col);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'drop':\n\t\t\t\t\t\t\tforeach ($column as $field => $col) {\n\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t$colList[] = 'DROP COLUMN ' . $this->name($field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'change':\n\t\t\t\t\t\t\t$schema = $this->describe($curTable);\n\t\t\t\t\t\t\tforeach ($column as $field => $col) {\n\t\t\t\t\t\t\t\tif (!isset($col['name'])) {\n\t\t\t\t\t\t\t\t\t$col['name'] = $field;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$original = $schema[$field];\n\t\t\t\t\t\t\t\t$fieldName = $this->name($field);\n\n\t\t\t\t\t\t\t\t$default = isset($col['default']) ? $col['default'] : null;\n\t\t\t\t\t\t\t\t$nullable = isset($col['null']) ? $col['null'] : null;\n\t\t\t\t\t\t\t\t$boolToInt = $original['type'] === 'boolean' && $col['type'] === 'integer';\n\t\t\t\t\t\t\t\tunset($col['default'], $col['null']);\n\t\t\t\t\t\t\t\tif ($field !== $col['name']) {\n\t\t\t\t\t\t\t\t\t$newName = $this->name($col['name']);\n\t\t\t\t\t\t\t\t\t$out .= \"\\tRENAME {$fieldName} TO {$newName};\\n\";\n\t\t\t\t\t\t\t\t\t$out .= 'ALTER TABLE ' . $this->fullTableName($curTable) . \" \\n\";\n\t\t\t\t\t\t\t\t\t$fieldName = $newName;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($boolToInt) {\n\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' SET DEFAULT NULL';\n\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' TYPE ' . str_replace(array($fieldName, 'NOT NULL'), '', $this->buildColumn($col)) . ' USING CASE WHEN TRUE THEN 1 ELSE 0 END';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' TYPE ' . str_replace(array($fieldName, 'NOT NULL'), '', $this->buildColumn($col));\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($nullable)) {\n\t\t\t\t\t\t\t\t\t$nullable = ($nullable) ? 'DROP NOT NULL' : 'SET NOT NULL';\n\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' ' . $nullable;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($default)) {\n\t\t\t\t\t\t\t\t\tif (!$boolToInt) {\n\t\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' SET DEFAULT ' . $this->value($default, $col['type']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$colList[] = 'ALTER COLUMN ' . $fieldName . ' DROP DEFAULT';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isset($indexes['drop']['PRIMARY'])) {\n\t\t\t\t\t$colList[] = 'DROP CONSTRAINT ' . $curTable . '_pkey';\n\t\t\t\t}\n\t\t\t\tif (isset($indexes['add']['PRIMARY'])) {\n\t\t\t\t\t$cols = $indexes['add']['PRIMARY']['column'];\n\t\t\t\t\tif (is_array($cols)) {\n\t\t\t\t\t\t$cols = implode(', ', $cols);\n\t\t\t\t\t}\n\t\t\t\t\t$colList[] = 'ADD PRIMARY KEY (' . $cols . ')';\n\t\t\t\t}\n\n\t\t\t\tif (!empty($colList)) {\n\t\t\t\t\t$out .= \"\\t\" . implode(\",\\n\\t\", $colList) . \";\\n\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$out = '';\n\t\t\t\t}\n\t\t\t\t$out .= implode(\";\\n\\t\", $this->_alterIndexes($curTable, $indexes));\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}",
"static function Alter(string $table, Closure $callback): DResult|false;",
"public function change()\n {\n $table = $this->table('events');\n $table->removeColumn('laburpena')\n ->removeColumn('prezioa')\n ->removeColumn('sarrerak')\n ->removeColumn('web')\n ->removeColumn('fitx')\n ->save();\n\n $table->addColumn('laburpena', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('prezioa', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('sarrerak', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('web', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('fitx', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n\n $table->save();\n }",
"private function _alterTable($tableName, $column) {\n\t\t$s = \"ALTER TABLE `$tableName` CHANGE `{$column->getName()}` \";\n\t\t#$s .= $this->_Column($column);\n\t\t$s .= $column->getSql();\n\t\t$this->_showQuery($s);\n\t\t$this->_dbExecute($s);\n\t}",
"public function change()\n {\n $table = $this->table('roles',['engine'=>'Innodb', 'comment' => '角色表', 'signed' => false]);\n $table->addColumn('role_name', 'string',['limit' => 15,'default'=>'','comment'=>'角色名'])\n ->addColumn('parent_id', 'integer',['default'=>0,'comment'=>'父级ID', 'signed' => false])\n ->addColumn('description', 'string',['default'=> '','comment'=>'角色备注'])\n ->addColumn('data_range', 'integer',['limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,'default'=> 0,'comment'=>'1 全部数据 2 自定义数据 3 仅本人数据 4 部门数据 5 部门及以下数据'])\n ->addColumn('creator_id', 'integer',['default' => 0, 'comment'=>'创建人ID'])\n ->addColumn('created_at', 'integer', array('default'=>0,'comment'=>'创建时间', 'signed' => false ))\n ->addColumn('updated_at', 'integer', array('default'=>0,'comment'=>'更新时间', 'signed' => false))\n ->addColumn('deleted_at', 'integer', array('default'=>0,'comment'=>'删除状态,0未删除 >0 已删除', 'signed' => false))\n ->create();\n }",
"public function change()\n {\n $this->execute('CREATE TABLE IF NOT EXISTS `product_categories_import` (\n `product_id` int(50) NOT NULL,\n `product_sku` varchar(150) NOT NULL,\n `category_id` int(50) NOT NULL,\n `category_name` varchar(150) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n');\n }",
"public function change()\n {\n $this->table('easy_menus')\n ->addColumn('level', 'integer', ['null'=>false,'default'=>0,'limit' => MysqlAdapter::INT_TINY])\n ->addIndex('level')\n ->addColumn('state', 'integer', ['null'=>false,'default'=>1,'limit' => MysqlAdapter::INT_TINY])\n ->addIndex('state')\n ->save()\n ;\n }"
] | [
"0.64045465",
"0.63951665",
"0.63350767",
"0.61371833",
"0.61069137",
"0.60946435",
"0.6064281",
"0.60394645",
"0.6021206",
"0.6006128",
"0.6004831",
"0.59920627",
"0.59713906",
"0.596438",
"0.59627885",
"0.59351796",
"0.5935072",
"0.5902257",
"0.5901953",
"0.5899944",
"0.5878832",
"0.5852655",
"0.58451855",
"0.5815845",
"0.58143806",
"0.58019227",
"0.57973874",
"0.57949966",
"0.5793193",
"0.57823753"
] | 0.7653088 | 0 |
masterDBConnection sets master db connection | public function setConnection()
{
$config = $this->app->make('config');
$connections = $config->get('database.connections');
$default = $connections[$config->get('database.default')];
$new = $default;
$new['database'] = $default['master'];
$this->app->make('config')->set('database.connections.'.$default['master'], $new);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMasterDB()\n {\n return $this->masterDB->database_name;\n }",
"public function use_master()\n\t\t{\n\t\t\t// make sure we aren't stepping on any toes\n\t\t\tif($this->is_locked())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t// return the main connection (non-replicated) and/or master connection (replicated)\n\t\t\t$this->dbc\t=\t&$this->connections[0];\n\t\t\t\n\t\t\t$this->using\t=\t'master';\n\t\t\t$this->set_lock();\n\t\t}",
"function _get_db($master=true)\n\t{\n\t\tif ($this->db_inited) return $this->ret();\n\n\t\t$count = count($this->dbc['m']);\n\t\t$idx = hexdec(substr($this->hash, -3, 1)) % $count;\n\n\t\t$host_conf = $master ? $this->dbc['m'] : $this->dbc['s'];\n\t\t$host = $host_conf[$idx];\n\t\t_debug_log(\"Host: {$idx} {$host}\\n\");\n\n\t\t$db = @mysql_connect($host, $this->dbc['u'], $this->dbc['p']);\n\t\tif (!$db) return $this->ret(E_DB_CONNECT);\n\n\t\t$ret = @mysql_select_db($this->dbc['n'], $db);\n\t\tif (!$ret) {\n\t\t\t@mysql_close($db);\n\t\t\t$this->my_errno = @mysql_errno($db);\n\t\t\treturn $this->ret(E_DB_SELECTDB);\n\t\t} \n\t\t$this->db = $db;\n\t\t$str = strtolower(substr($this->hash, -2, $this->dbc['tbc']));\n\t\t//$this->table = $this->dbc['tbp'] . $str; ///////DEBUGDEBUGDEBUG\n\t\t$this->table = $this->dbc['tbp'] . \"0\";\n\t\t_debug_log(\"Table: {$this->table}\\n\");\n\t\t//$this->table = $this->dbc['tbp'] . str_pad(\"\", $this->dbc['tbc'], '0') ;\n\t\t$this->db_inited = true;\n\n\t\treturn $this->ret();\n\t}",
"protected function _initConnection()\n {\n\n //get application settings & set allowmodification true\n $options['allowModifications'] = true;\n $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini');\n\n //set master connection\n $masterServer = $config->db->master->toArray();\n $masterAdapter = Zend_Db::factory($config->db->adapter, $masterServer['server1']);\n $masterAdapter->query(\"SET CHARACTER SET 'utf8'\");\n Zend_Registry::set('Master_Adapter', $masterAdapter);\n Zend_Db_Table_Abstract :: setDefaultAdapter($masterAdapter);\n }",
"function db_get_conn ($master = 0) {\n\tglobal $db_list, $db_last_conn;\n\tif ($master === 1 && isset ($db_list['master'])) {\n\t\t$db_last_conn = 'master';\n\t\treturn $db_list['master'];\n\t} elseif ($master === -1) {\n\t\t$keys = array_keys ($db_list);\n\t\tif (isset ($db_list['master'])) {\n\t\t\tforeach ($keys as $k => $v) {\n\t\t\t\tif ($v === 'master') {\n\t\t\t\t\tunset ($keys[$k]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$db_last_conn = $keys[array_rand ($keys)];\n\t\treturn $db_list[$db_last_conn];\n\t}\n\t$keys = array_keys ($db_list);\n\t$db_last_conn = $keys[array_rand ($keys)];\n\treturn $db_list[$db_last_conn];\n}",
"public static function get_connection ($master = 0) {\n\t\tif (count (self::$connections) === 0) {\n\t\t\tself::load_connections ();\n\t\t}\n\t\n\t\tif ($master === 1 && isset (self::$connections['master'])) {\n\t\t\tself::$last_conn = 'master';\n\t\t\treturn self::$connections['master'];\n\t\t} elseif ($master === -1) {\n\t\t\t$keys = array_keys (self::$connections);\n\t\t\tif (isset (self::$connections['master'])) {\n\t\t\t\tforeach ($keys as $k => $v) {\n\t\t\t\t\tif ($v === 'master') {\n\t\t\t\t\t\tunset ($keys[$k]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tself::$last_conn = $keys[array_rand ($keys)];\n\t\t\treturn self::$connections[self::$last_conn];\n\t\t}\n\t\t$keys = array_keys (self::$connections);\n\t\tself::$last_conn = $keys[array_rand ($keys)];\n\t\treturn self::$connections[self::$last_conn];\n\t}",
"public function getMaster(): ConnectionInterface\n {\n }",
"private function connection()\n {\n $this->db = true;\n }",
"private function setDatabase() {\r\n\r\n\t\tglobal $dbh;\r\n\r\n\t\tif ($dbh instanceof PDO) {\r\n\t\t\t$this->dbh = $dbh;\r\n\t\t} else {\r\n\t\t\t$Connection = new Connection();\r\n\t\t\t$this->dbh = $Connection->PDO_Connection();\r\n\t\t}\r\n\r\n\t}",
"protected function get_db()\n\t{\n\t\treturn $this->connections['primary'];\n\t}",
"public function setConnection(){\n\t\tif($this->checkConnection()!=DATABASE_CONNECTION_ESTABILISHED){\n\t\t\t$this->propertySet(\"conn_id\",@mysql_connect($this->auth_info['dbhost'],$this->auth_info['dbuser'],$this->auth_info['dbpasswd']));\n\t\t\tif(!$this->isError()){\n\t\t\t\t$this->propertySet('sql_res',@mysql_select_db($this->auth_info[\"dbname\"],$this->getProperty('conn_id')));\n\t\t\t\t$this->proceedQuery(\"SET NAMES utf8\");\n\t\t\t}\n\t\t}\n\t}",
"private function openDatabaseConnection()\n {\n //$this->db = '';\n }",
"public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}",
"public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}",
"public function setConnection()\n\t{\n\t\t$this->connection = new DataBase();\n\t}",
"public static function getSharedDatabaseConnection(){\n if(static::$db == null){\n static::$db = new PCDatabase();\n }\n return static::$db->connection;\n }",
"public static function load_connections () {\n\t\t$list = conf ('Database');\n\t\tforeach ($list as $key => $conf) {\n\t\t\tif ($key == 'master') {\n\t\t\t\t$conf['master'] = true;\n\t\t\t}\n\t\t\tif (! self::open ($conf)) {\n\t\t\t\tif ($conf['master'] === true) {\n\t\t\t\t\t// Die immediately if connection to master fails,\n\t\t\t\t\t// since we can't issue any write commands.\n\t\t\t\t\tdie (self::$error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Die if no connections succeeded.\n\t\tif (self::count () === 0) {\n\t\t\tdie (self::$error);\n\t\t}\n\t}",
"function db_connect($mode)\n {\n $this->db_mode = $mode;\n\n // Already connected\n if ($this->db_connected)\n {\n // no replication, current connection is ok\n if ($this->db_dsnw==$this->db_dsnr)\n return;\n\n // connected to master, current connection is ok\n if ($this->db_mode=='w')\n return;\n\n // Same mode, current connection is ok\n if ($this->db_mode==$mode)\n return;\n }\n\n if ($mode=='r')\n $dsn = $this->db_dsnr;\n else\n $dsn = $this->db_dsnw;\n\n $this->db_handle = $this->dsn_connect($dsn);\n $this->db_connected = true;\n }",
"protected function db_master() {\r\n // Start timer\r\n $timer = new Timer();\r\n\r\n // Check master\r\n require '/gsr/systems/db.master.php';\r\n\r\n try {\r\n new PDO( \"mysql:host=$db_host;dbname=$db_name\", $db_username, $db_password );\r\n $message = 'OK';\r\n } catch( PDOException $e ) {\r\n $message = 'FAIL';\r\n }\r\n\r\n // Create XML\r\n $xml = new SimpleXMLElement('<pingdom_http_custom_check/>');\r\n $xml->addChild( 'status', $message );\r\n $xml->addChild( 'response_time', round( $timer->stop() * 1000000, 3 ) );\r\n\r\n // Spit out XML\r\n return new XmlResponse( $xml->asXML() );\r\n }",
"private function setConection() {\r\n\t\ttry {\r\n\t\t\t@ $db = mysqli_connect($this->serverName.':'.$this->port, $this->userName, $this->password);\r\n\t\t\tif(!$db) {\r\n\t\t\t\treturn null;\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t} else {\r\n\t\t\t\treturn $db;\r\n\t\t\t}\r\n\t\t} catch(Exception $ex) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"function useDb()\n {\n global $config;\n\n if(!is_object($this->m_db))\n {\n $db = DB::connect($config[\"dbma\"].\"://\".$config[\"db_user\"].\":\".$config[\"db_passwd\"].\"@\".$config[\"db_host\"].\"/\".$config[\"db\"]);\n if(PEAR::isError($db))\n {\n debug(__CLASS__.\"::\".__FUNCTION__.\" : \".$this->m_db->getMessage());\n }\n else if(is_object($db))\n {\n $this->m_db=&$db; \n debug(__CLASS__.\"::\".__FUNCTION__.\" : connected to database \");\n }\n }\n else\n {\n debug(__CLASS__.\"::\".__FUNCTION__.\" : database connection already made, using existing db object\");\n }\n }",
"public function setConnection()\n {\n $_SESSION[\"COMPANY_SUBDOMAIN\"] = $this->subDomain;\n\n\n define('LOCALHOST', self::$host);\n define(\"DB_NAME\", $this->subDomain);\n\n define(\"DB_USERNAME\", self::$user);\n define(\"DB_PASSWORD\", self::$password);\n\n define('DB_TYPE', 'mysql');\n\n }",
"public function DB($db=null) {\n $this->DBconfig = env();\n\n $connection = $this->DBconfig['app']['PRIMARY_DB'];\n $dbName = false;\n\n if ($db !== null && isset($this->DBconfig[$db])) {\n $connection = $db; // New connection\n } elseif (null !== $db) {\n $dbName = $db; // New Database on same connection\n }\n\n $this->db_name = $dbName ? $dbName : $this->DBconfig[$connection]['DB_NAME'];\n $this->db_type = isset($this->DBconfig[$connection]['DB_TYPE']) ? $this->DBconfig[$connection]['DB_TYPE'] : 'mysql';\n $this->db_prefix = $this->DBconfig[$connection]['DB_PREFIX'] ? $this->DBconfig[$connection]['DB_PREFIX'] : false;\n\n if ($this->db_type !== 'sqlite') {\n $this->db_host = $this->DBconfig[$connection]['DB_HOST'];\n $this->db_user = $this->DBconfig[$connection]['DB_USERNAME'];\n $this->db_pass = $this->DBconfig[$connection]['DB_PASSWORD'];\n $this->db_port = $this->DBconfig[$connection]['DB_PORT'];\n\n $temp_conn = $this->db_type.$this->db_name.$this->db_host.$this->db_user.$this->db_pass.$this->db_port.$this->db_prefix;\n } else {\n $temp_conn = $this->db_type.$this->db_name.$this->db_prefix;\n }\n\n if ($this->current_connection == $temp_conn && $this->connect !== null) {\n return $this->connect;\n } else {\n $this->current_connection = $temp_conn;\n\n switch ($this->db_type) {\n case 'mysql':\n $this->mysql();\n break;\n\n case 'sqlite':\n $this->sqlite();\n break;\n\n default:\n $this->mysql();\n break;\n }\n\n return $this->connect;\n }\n }",
"abstract public function getDbConnection();",
"function get_database_connection() {\n return $this->db;\n }",
"private function set_connection()\n {\n if (isset($this->database_connection)) {\n $this->database = $this->load->database($this->database_connection, true);\n } else {\n $this->database =$this->db;\n }\n // This may not be required\n return $this;\n }",
"public function open_connection_db();",
"function get_db () {\n\t\treturn $this->db_conn_name;\n\t}",
"public function setDbConnection($db)\n {\n $this->db = $db;\n }",
"protected function getDatabaseConnection() {\n\t\treturn $GLOBALS['TYPO3_DB'];\n\t}"
] | [
"0.72497916",
"0.6988618",
"0.6968237",
"0.6643964",
"0.6643546",
"0.6551715",
"0.6383607",
"0.6379269",
"0.62858564",
"0.6265139",
"0.62414443",
"0.61925226",
"0.61311764",
"0.61311764",
"0.6112611",
"0.610552",
"0.60779464",
"0.603022",
"0.60225797",
"0.6018654",
"0.6015149",
"0.59849244",
"0.5983781",
"0.59768236",
"0.5967856",
"0.5961426",
"0.59574264",
"0.59479123",
"0.59367067",
"0.59345484"
] | 0.7206655 | 1 |
setNewDbConnection override the config file | public function setNewConnection()
{
$config = $this->app->make('config');
$connections = $config->get('database.connections');
$default = $connections[$config->get('database.default')];
$new = $default;
$new['database'] = $this->schema;
return $this->app->make('config')->set('database.connections.'.$this->schema, $new);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setConnection()\r\n\t{\r\n\t\t$config = $this->app->make('config');\r\n\r\n\t $connections = $config->get('database.connections');\r\n\t \r\n\t $default = $connections[$config->get('database.default')];\r\n\r\n\t $new = $default;\r\n\r\n\t $new['database'] = $default['master'];\r\n\r\n\t $this->app->make('config')->set('database.connections.'.$default['master'], $new);\r\n\t}",
"private function setDatabase() {\r\n\r\n\t\tglobal $dbh;\r\n\r\n\t\tif ($dbh instanceof PDO) {\r\n\t\t\t$this->dbh = $dbh;\r\n\t\t} else {\r\n\t\t\t$Connection = new Connection();\r\n\t\t\t$this->dbh = $Connection->PDO_Connection();\r\n\t\t}\r\n\r\n\t}",
"private static function setBdd()\r\n {\r\n $configBdd = Retrinko\\Ini\\IniFile::load(PATH_CONFIG.\"database.ini\");\r\n self::$_bdd = new PDO('pgsql:host='.$configBdd->get('database', 'host').';dbname='.$configBdd->get('database', 'dbname'), $configBdd->get('database', 'username'), $configBdd->get('database', 'password'));\r\n self::$_bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\r\n }",
"protected static function _createConnection()\n {\n $config_path = static::getPath() . '/propel.json';\n $config = static::getConfig();\n $connectionName = static::getConnection();\n $propelConfig = $config['propel'];\n // Create database connection\n $propelConfig['database']['connections'][$connectionName]['adapter'] = 'sqlite';\n $propelConfig['database']['connections'][$connectionName]['user'] = '';\n $propelConfig['database']['connections'][$connectionName]['password'] = '';\n file_put_contents ($config_path, json_encode(array('propel' => $propelConfig))); \n }",
"public function configureDb(){\n if( $option = $this->getCustomConfig() ){\n $option->configure();\n $this->saved = 'db';\n return true;\n }\n return false;\n }",
"private function _setConnStr() {\r\n $this->connStr = 'mysql:host=' . $this->dbInfo['hostname'] . ';dbname=' . $this->dbInfo['db_name'];\r\n }",
"public function setConnection()\n\t{\n\t\t$this->connection = new DataBase();\n\t}",
"public function setDefaultConnection($name);",
"public function setDefaultConnection($name);",
"protected function laravelMakeThisConnectionDefault()\n {\n config(['database.default' => $this->configDTO->connection]);\n\n $this->di->log->vDebug(\"Changed the default connection to: \\\"{$this->configDTO->connection}\\\"\");\n }",
"private function openDatabaseConnection()\n {\n //$this->db = '';\n }",
"public static function SetConnection($newConnection) {\n Admin::$conn = $newConnection;\n }",
"public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}",
"public function setConnexion() {\n\t\tself::$_oConnexion = database::getInstance();// pas besoin de parametrer, un manager arrive apres la conf\n\t}",
"public function open_connection_db();",
"public function setDb($name);",
"protected function connectToDatabase()\r\n {\r\n $config = \\Zend_Registry::get('config');\r\n \r\n $property = \"db_{$this->connectionIndex}_dsn\";\r\n $dsn = $config->$property;\r\n \r\n $property = \"db_{$this->connectionIndex}_user\";\r\n $username = $config->$property;\r\n \r\n $property = \"db_{$this->connectionIndex}_pass\";\r\n $password = $config->$property;\r\n\r\n if (!isset(self::$dbConnection[$this->connectionIndex])) {\r\n self::$dbConnection[$this->connectionIndex] = new \\PDO($dsn, $username, $password);\r\n try {\r\n self::$dbConnection[$this->connectionIndex]->query('SET CHARACTER SET utf8');\r\n self::$dbConnection[$this->connectionIndex]->setAttribute(\\PDO::ATTR_AUTOCOMMIT, false);\r\n self::$dbConnection[$this->connectionIndex]->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\r\n }\r\n catch (\\Exception $ex) {\r\n }\r\n }\r\n }",
"public function setDbConnection($db)\n {\n $this->db = $db;\n }",
"public function setDefaultConnection($name)\n {\n $this->app['config']['database.default'] = $name;\n }",
"public function setDefaultConnection($name)\n {\n $this->app['config']['database.default'] = $name;\n }",
"public static function config_db ()\r\n {\r\n Model::$hostname = 'localhost';\r\n Model::$dbname = 'blog-ecrivain';\r\n Model::$user = 'root';\r\n Model::$pswd = '';\r\n }",
"protected function _initConnection()\n {\n\n //get application settings & set allowmodification true\n $options['allowModifications'] = true;\n $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini');\n\n //set master connection\n $masterServer = $config->db->master->toArray();\n $masterAdapter = Zend_Db::factory($config->db->adapter, $masterServer['server1']);\n $masterAdapter->query(\"SET CHARACTER SET 'utf8'\");\n Zend_Registry::set('Master_Adapter', $masterAdapter);\n Zend_Db_Table_Abstract :: setDefaultAdapter($masterAdapter);\n }",
"private function mod_set_dbname(){\r\n \r\n switch ($this->mod_project) {\r\n //for language dependent projects\r\n default:\r\n case \"wikinews\":\r\n case \"wikiquote\":\r\n case \"wikisource\":\r\n case \"wikiversity\": \r\n case \"wikibooks\":\r\n case \"wiktionary\":\r\n case \"wiki\": \r\n $this->mod_dbhost = $this->mod_project_language . $this->mod_project . constant(\"DB_HOST_SUFFIX\");\r\n $this->mod_dbname = $this->mod_project_language . $this->mod_project . constant(\"DB_NAME_SUFFIX\"); \r\n break;\r\n //for language indepepndent projects \r\n case \"commonswiki\": \r\n case \"metawiki\": \r\n case \"specieswiki\": \r\n case \"mediawikiwiki\": \r\n case \"incubatorwiki\":\r\n $this->mod_dbhost = $this->mod_project . constant(\"DB_HOST_SUFFIX\");\r\n $this->mod_dbname = $this->mod_project . constant(\"DB_NAME_SUFFIX\"); \r\n break; \r\n }\r\n }",
"private function createDBConnection() {\n $configFile = null;\n switch ($this->appConfiguration)\n {\n case AppConfiguration::Production:\n $configFile = dirname(__FILE__) . '/config/Production-Config.php';\n break;\n case AppConfiguration::Testing:\n $configFile = dirname(__FILE__) . '/config/Testing-Config.php';\n break;\n default:\n $configFile = dirname(__FILE__) . '/config/Development-Config.php';\n break;\n }\n return new DbConnection($configFile);\n }",
"public function setConnection(){\n\t\tif($this->checkConnection()!=DATABASE_CONNECTION_ESTABILISHED){\n\t\t\t$this->propertySet(\"conn_id\",@mysql_connect($this->auth_info['dbhost'],$this->auth_info['dbuser'],$this->auth_info['dbpasswd']));\n\t\t\tif(!$this->isError()){\n\t\t\t\t$this->propertySet('sql_res',@mysql_select_db($this->auth_info[\"dbname\"],$this->getProperty('conn_id')));\n\t\t\t\t$this->proceedQuery(\"SET NAMES utf8\");\n\t\t\t}\n\t\t}\n\t}",
"function initDataBaseConnection() {\n\t\t$this->db = new AJAXChatDataBase(\n\t\t\t$this->_config['dbConnection']\n\t\t);\n\t\t// Use a new database connection if no existing is given:\n\t\tif(!$this->_config['dbConnection']['link']) {\n\t\t\t// Connect to the database server:\n\t\t\t$this->db->connect($this->_config['dbConnection']);\n\t\t\tif($this->db->error()) {\n\t\t\t\techo $this->db->getError();\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t// Select the database:\n\t\t\t$this->db->select($this->_config['dbConnection']['name']);\n\t\t\tif($this->db->error()) {\n\t\t\t\techo $this->db->getError();\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t\t// Unset the dbConnection array for safety purposes:\n\t\tunset($this->_config['dbConnection']);\t\t\t\n\t}",
"abstract public function getDbConnection();",
"private function connection()\n {\n $this->db = true;\n }",
"function setDb($cn) {\n\t\t$this->db = $cn;\n\t}",
"function setDb($cn) {\n\t\t$this->db = $cn;\n\t}"
] | [
"0.70045006",
"0.64329916",
"0.6406556",
"0.63610095",
"0.63299716",
"0.62846035",
"0.6279778",
"0.6266403",
"0.6266403",
"0.62349516",
"0.6228337",
"0.622073",
"0.62013286",
"0.62013286",
"0.6179864",
"0.61393166",
"0.61312133",
"0.6127349",
"0.6114246",
"0.6114246",
"0.6110087",
"0.6095694",
"0.60817814",
"0.60476935",
"0.6044411",
"0.60293263",
"0.60276383",
"0.6021868",
"0.60014725",
"0.60014725"
] | 0.7458093 | 0 |
createDatbase creats tenant database | public function createDatbase()
{
$db = \DB::statement('CREATE DATABASE IF NOT EXISTS '.$this->schema);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function CreateDB($db){\n \n $db2 ='spice_'.$db;\n \n DB::statement('CREATE DATABASE '.$db2);\n \n DB::statement(\"GRANT ALL PRIVILEGES ON \".$db2.\".* TO '\".$db.\"'@'localhost' IDENTIFIED BY '\".$db.\"'\");\n \n \n \n DB::purge('tenant');\n \n // Make sure to use the database name we want to establish a connection.\n Config::set('database.connections.tenant.host', 'localhost');\n Config::set('database.connections.tenant.database',$db2);\n Config::set('database.connections.tenant.username',$db);\n Config::set('database.connections.tenant.password',$db);\n \n // Rearrange the connection data\n DB::reconnect('tenant');\n Schema::connection('tenant')->getConnection()->reconnect();\n \n $file = base_path() .'/public/hrmpayroll.sql';\n DB::connection('tenant')->unprepared(file_get_contents($file) );\n \n \n \n \n \n \n }",
"protected function createDatabase() {\n\t\t$this->indexer->createDatabase();\n\t}",
"public function create_database(array $task) {\n\n $server = self::getServer($task['orderitem_id'], 'database');\n\n // Get the Json encoded parameters in the task\n $parameters = json_decode ( $task ['parameters'], true );\n if(empty($parameters)){\n throw new Exception(\"No parameters found in the service\", 3501);\n }\n\n // Get the server id\n if(!empty($server['server_id']) && is_numeric($server['server_id'])){\n\n $clientId = self::get_client_id($task, $server['server_id']);\n\n // Connection to the SOAP system\n $client = $this->connect ($server['server_id']);\n\n // Get the remote server ID set in the servers profile in ShineISP\n $customAttribute = CustomAttributes::getAttribute($server['server_id'], \"remote_server_id\");\n\n // Get the remote server id set in ShineISP\n if(is_numeric($customAttribute['value'])){\n $ServerId = $customAttribute['value'];\n\n // Get all the customer information\n $customer = Customers::getAllInfo ( $task ['customer_id'] );\n $id = rand(1, 100);\n\n // Create the username string for instance from John Doe to jdoe\n $username = strtolower(substr($customer ['firstname'], 0, 1) . preg_replace(\"#[^a-zA-Z0-9]*#\", \"\", $customer ['lastname']));\n $dbuser = $username . \"_u$id\";\n $dbname = $username . \"_db$id\";\n\n // Create a random password string\n $password = Shineisp_Commons_Utilities::GenerateRandomString();\n\n // Create a database user\n $params = array(\n 'server_id' => $ServerId,\n 'database_user' => $dbuser,\n 'database_password' => $password\n );\n\n $dbUserId = $client->sites_database_user_add($this->getSession(), $clientId, $params);\n\n if($dbUserId){\n // Create the database\n $params = array(\n 'server_id' => $ServerId,\n 'type' => 'mysql',\n 'database_name' => $dbname,\n 'database_user_id' => $dbUserId,\n 'database_ro_user_id' => '0',\n 'database_charset' => 'utf8',\n 'remote_access' => 'y',\n 'remote_ips' => '',\n 'backup_interval' => 'none',\n 'backup_copies' => 1,\n 'active' => 'y'\n );\n\n $databaseID = $client->sites_database_add($this->getSession(), $clientId, $params);\n\n // Save the setup in the service setup field\n OrdersItems::set_setup($task ['orderitem_id'], array('db'=>$dbname, 'username'=>$dbuser, 'password'=>$password), \"database\");\n\n // Add relation between order_item and server\n OrdersItemsServers::addServer($task['orderitem_id'], $server['server_id']);\n\n // Create the log message\n Shineisp_Commons_Utilities::logs (\"ID: \" . $task ['action_id'] . \" - \" . __METHOD__ . \" - Parameters: \" . json_encode($params), \"ispconfig.log\" );\n }else{\n throw new Exception(\"Database User ID has not been found.\", \"3503\");\n }\n }else{\n throw new Exception(\"Database Server has not been found in IspConfig server settings.\", \"3501\");\n }\n }else{\n throw new Exception(\"No remote database server id set in the ShineISP server profile.\", \"3502\");\n }\n\n // Logout from the IspConfig Remote System\n $client->logout($this->getSession ());\n\n return $databaseID;\n\n }",
"public function createDatabase()\r\n {\r\n global $ANTAPI_STORE_PGSQL_DBNAME;\r\n \r\n if(defined(\"ANTAPI_STORE_PGSQL_DBNAME\"))\r\n $pgSqlDbName = ANTAPI_STORE_PGSQL_DBNAME;\r\n else if(isset($ANTAPI_STORE_PGSQL_DBNAME))\r\n $pgSqlDbName = $ANTAPI_STORE_PGSQL_DBNAME;\r\n \r\n $result = $this->connect(\"template1\");\r\n \r\n if($result['status']==1)\r\n {\r\n if(empty($pgSqlDbName))\r\n $ret = array(\"status\" => -4, \"message\" => \"Database name is empty! \"); \r\n else if($this->DatabaseExists($pgSqlDbName))\r\n {\r\n $this->connect();\r\n $ret = array(\"status\" => 2, \"message\" => \"Database already exist! \");\r\n }\r\n else\r\n {\r\n $query = \"CREATE DATABASE $pgSqlDbName;\"; \r\n $result = $this->Query($query);\r\n \r\n if($result)\r\n {\r\n $this->connect();\r\n \r\n $ret = array(\"status\" => 1, \"message\" => \"Database $pgSqlDbName created! \");\r\n }\r\n else\r\n $ret = array(\"status\" => -1, \"message\" => \"Error while creating $pgSqlDbName database! \");\r\n }\r\n \r\n // Always make sure system registry table is created/checked along with its fields\r\n if($this->dbh)\r\n {\r\n $customFields[] = array(\"name\" => \"key_name\", \"type\" => \"text\", \"subtype\" => 256);\r\n $customFields[] = array(\"name\" => \"key_val\", \"type\" => \"text\");\r\n $customFields[] = array(\"name\" => \"user_id\", \"type\" => \"number\");\r\n $this->createTable(\"system_registry\", $customFields);\r\n }\r\n }\r\n else\r\n $ret = array(\"status\" => -3, \"message\" => \"Error while trying to connect to pgSql! \");\r\n \r\n return $ret;\r\n }",
"public function setupTenantSystem() //sytem is the model from craigland..... \n\t{\n \t$tenantDatabaseBuilder = new TenantDatabaseBuilder($this->system);\n \n $tenantDatabaseBuilder->createTenantDatabase();\n TenantDatabaseConnector::createTenantConnection($this->system);\n $tenantDatabaseBuilder->migrateTenantDatabase();\n $this->console('Migration Complete');\n $this->createTenantSystemAdminAccount();\n $this->console('Admin Accounts Complete');\n\n /*\n * load csv -- due to foreign key restraints have to move to migrations\n */\n $path = database_path(\"seeds/csv_startup_data/tenant\");\n DatabaseCsvLoader::loadCSVStartupData($this->dbc, $path);\n $this->console('Csv Data Complete');\n\n\n\n\n //create a store... nope\n //create filesystem... yup\n\n\n\t}",
"public function createDatabase () {\n\t\t// nothing to do\n\t}",
"public function createDb() {\n $this->say('Getting Applications...');\n $appHelper = new ChoiceQuestion('Select which Acquia Cloud Application you want to operate on', $this->getApplicationsId());\n $appName = $this->doAsk($appHelper);\n // Attempt to get the UUID of this application.\n try {\n $appUuId = $this->getUuidFromName($appName);\n }\n catch (Exception $e) {\n $this->say('Incorrect Application ID.');\n }\n $dbNameHelper = new Question('Production domain name: ');\n $dbName = $this->doAsk($dbNameHelper);\n if (!is_null($dbName)) {\n $this->say('Creating database > ' . $dbName);\n $dbName = str_replace('.', '_', strtolower($dbName));\n $makeItSo = $this->confirm(\"Do want to create database: ${dbName}?\");\n if ($makeItSo) {\n $this->createDatabase($appUuId, $dbName);\n }\n }\n else {\n $this->say('Nothing provided, stopping');\n exit();\n }\n }",
"public function dbCreate(): void {\n $this->initUliCMS();\n\n Database::setEchoQueries(true);\n\n Database::createSchema($_ENV['DB_DATABASE']);\n Database::select($_ENV['DB_DATABASE']);\n }",
"private function createDatabase()\n {\n $options = array('command' => 'doctrine:database:create', '--if-not-exists' => true);\n $this->application->run(new ArrayInput($options));\n }",
"public function DBCreate(){\n $params=new Parameters();\n $DB_ROOTUSER=$params->getParameter('root','id');\n $DB_ROOTPASSWORD=$params->getParameter('root','password');\n $DB_NAME=$params->getParameter('root','dbName');\n $DB_HOST=$params->getParameter('root','serveur');\n $DB_USER=$params->getParameter('MasterUser','id');\n $DB_PASSWORD=$params->getParameter('MasterUser','password');\n\n\n try {\n \n $dbh=new PDO(\"mysql:host=$DB_HOST\", $DB_ROOTUSER, $DB_ROOTPASSWORD); \n $dbh ->exec(\"CREATE DATABASE IF NOT EXISTS `$DB_NAME` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;\n CREATE USER IF NOT EXISTS `$DB_USER`@`$DB_HOST` IDENTIFIED BY '$DB_PASSWORD';\n GRANT ALL PRIVILEGES ON `$DB_NAME`.* TO `$DB_USER`@`$DB_HOST` ;\n FLUSH PRIVILEGES;\n SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));\");\n } catch (PDOException $exception) {\n die(\"Connexion Error ${exception}\");\n }\n }",
"private function createTenantConnection()\n {\n $config = $this->app['config'];\n\n $connections = $config->get('database.connections');\n\n $connections['tenant'] = $this->app['db']->getConfig();\n\n $config->set([\n 'database.connections' => $connections,\n ]);\n }",
"public function createDatabase()\r\n {\r\n try {\r\n $this->conn->exec(\"CREATE DATABASE IF NOT EXISTS $this->db\");\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n }\r\n\r\n }",
"function createDB($db) {\n}",
"public function createTestDb() {\n //return $this->getDb('mysql')->query('CREATE DATABASE IF NOT EXISTS `testing`;');\n return $this->getDb('test')->query('CREATE DATABASE IF NOT EXISTS `testing`;');\n }",
"private function crearBD(){\n\t\t//echo '<script>alertify.log(\"Creando la base de datos...\");</script>';\n\t\t//echo '<script>alertify.success(\"Success notification\");</script>';\n\t\t//echo '<script>alertify.error(\"Error notification\");</script>';\n\t\t$sql = \"SET NAMES UTF8\";\n\t\tif(!$this->BD->query($sql)){\n\t\t\t//echo '<script>alertify.log(\"','\", type, wait);'\n\t\t\t$msg = \"Error: \".$this->BD->errorInfo()[1].\" -> \".$this->BD->errorInfo()[2];\n\t\t\techo '<script>alertify.error(\"',$msg,'\");</script>'; \n\t\t}\n\t\t\n\t\t$sql= \"CREATE DATABASE IF NOT EXISTS ejercicios\";\n\t\tif(!$this->BD->query($sql)){\n\t\t\t$msg = \"Error: \".$this->BD->errorInfo()[1].\" -> \".$this->BD->errorInfo()[2];\n\t\t\techo '<script>alertify.error(\"',$msg,'\");</script>';\n\t\t}\n\t}",
"function createDB($db=\"PI\"){\n //uses the forge class\n $this->load->dbforge();\n //create new database\n if ($this->dbforge->create_database($db))\n {\n $s='Database created!';\n return $s;\n }\n }",
"public function createDatabase() { \n\n if (!file_exists('data/mailer/')) {\n mkdir('data/mailer/', 0777, true);\n }\n }",
"private function createDatabase () {\n $db_exists_query = \"CREATE DATABASE IF NOT EXISTS PHP_TRIALS\";\n\n if (!$db_result = $this->mysqli->query($db_exists_query)) {\n echo \"Database creation failed\" . $db_result->error . PHP_EOL;\n return false;\n }\n\n return true;\n }",
"public function __construct(){\n $factory = (new Factory)->withServiceAccount(__DIR__.'/hackathon-rtdb-firebase-adminsdk-sbm0f-0382ae8bc4.json');\n $this->database = $factory->createDatabase();\n }",
"private function create_db()\n\t{\n\t\t$sql = \"CREATE DATABASE \".$this->project_slug;\n\t\tif (!mysqli_query($this->db_connection,$sql)) {\n\t\t\tthrow new Exception('<a href=\"'.$this->site_path.'\">'.$this->project_name.'</a> database already exists or something else went wrong (db name has illegal characters?).');\n\t\t}\n\t}",
"function createUserDB( ) { \n}",
"public function CreateDB($database)\r\n\t{\r\n\t\t// database connencton\r\n\t\t$mysqli = $this->mysqli();\r\n\t\t//sql query creat databse name\r\n\t\t$sql = 'CREATE DATABASE '.$database;\r\n\t\t$retval = $mysqli->query($sql);\r\n\t\t//if database exest\r\n\t\tif ($mysqli->errno == 1007) {\r\n\r\n\t\t\techo \"قاعدة البيانات موجوده مسبقا<br>\";\r\n\t\t}\r\n\t\telse\r\n\t\t\t// if creation database sessefulley\r\n\t\t\techo \"تم انشاء قاعدة البيانات بنجاح<br>\";\r\n\t\r\n\t}",
"function createBDD($name, $user) {\n $t = shell_exec(\"sudo -i -u postgres psql -c \\\"SELECT datname FROM pg_database\n WHERE datistemplate = false AND datname = '$name';\\\"\");\n preg_match(\"/\\(([0-9]+)\\s+rows?\\)/m\", $t, $matches);\n $nbRows = intval($matches[1]);\n if ($nbRows == 0) {\n $t = shell_exec(\"sudo -i -u postgres psql -c \\\"CREATE DATABASE $name WITH OWNER = $user\\\"\");\n \\Hos\\Command\\BuildSQL::execute();\n }\n}",
"function _create_database($name)\n\t{\n\t\treturn \"CREATE DATABASE \".$name;\n\t}",
"function create_site_database($creds = array()) {\n $project_name = d()->project;\n $environment_name = d()->environment;\n\n $project = (object) d(\"@project_{$project_name}\")->project;\n $environment = (object) $project->environments[$environment_name];\n\n $output = d()->db_server->service('Process')->process(\"terra status {$project_name}\", '', \"Install\");\n if (strpos($output, $project->git_url) === FALSE) {\n $web_server = d()->platform->web_server->remote_host;\n\n $cmd = \"terra app:add {$project_name} {$project->git_url} --host='$web_server' --description='Added by DevShop'\";\n d()->db_server->service('Process')->process($cmd, '', \"Install\");\n }\n\n // 2. Add environment.\n $environment = (object) d(\"@project_{$project_name}\")->project['environments'][$environment_name];\n $cmd = \"terra environment:add {$project_name} {$environment_name} {$environment->repo_root}\";\n d()->db_server->service('Process')->process($cmd, '', \"Terra\");\n\n // 3. enable environment.\n $cmd = \"terra environment:enable {$project->project->name} {$environment->name}\";\n d()->db_server->service('Process')->process($cmd, '', \"Terra\");\n\n }",
"function zawiw_share_create_db( $prefix ) {\r\n // Prepare SQL query to create database table\r\n // using function parameter\r\n $creation_query = 'CREATE TABLE ' . $prefix . \"zawiw_share_data (\r\n id int(20) NOT NULL AUTO_INCREMENT,\r\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\r\n name tinytext NOT NULL,\r\n owner int(20) NOT NULL,\r\n copyright tinytext NOT NULL,\r\n url tinytext NOT NULL,\r\n file tinytext NOT NULL,\r\n size int(20) NOT NULL,\r\n UNIQUE KEY id (id)\r\n );\";\r\n // Updates database if nescessary\r\n require_once ABSPATH . 'wp-admin/includes/upgrade.php';\r\n dbDelta( $creation_query );\r\n}",
"function create_database($data)\n\t{\n\t\t// Connect to the database\n\t\t$mysqli = new mysqli($data['hostname'],$data['username'],$data['password'],'');\n\n\t\t// Check for errors\n\t\tif(mysqli_connect_errno())\n\t\t\treturn false;\n\n\t\t// Create the prepared statement\n\t\t$mysqli->query(\"CREATE DATABASE IF NOT EXISTS \".$data['database']);\n\n\t\t// Close the connection\n\t\t$mysqli->close();\n\n\t\treturn true;\n\t}",
"private function createDB()\n {\n $DB = $this->Model->createDB();\n\n $this->output($DB);\n }",
"public function createDataBase($baseName) {\n if ($this->isDbReady()) {\n try {\n $this->pdo_dbName = $baseName;\n $this->dbpdo->beginTransaction();\n $base = \"CREATE DATABASE `$this->pdo_dbName`;\n GRANT ALL ON `$this->pdo_dbName`.* TO '$this->pdo_dbUser'@'localhost';\n FLUSH PRIVILEGES;\n USE `$this->pdo_dbName`;\";\n $this->dbpdo->exec($base);\n $this->dbpdo->commit();\n return true;\n } catch (\\PDOException $e) {\n $msg = 'ERREUR PDO dans ' . $e->getFile() . ' L.' . $e->getLine() . ' : ' . $e->getMessage();\n throw new DataBaseException($msg);\n }\n } else {\n return false;\n }\n }",
"function generate_database($bdd){\n $link = mysqli_connect($bdd['host'], $bdd['username'], $bdd['password']);\n if (!$link) {\n die('Not connected : ' . mysqli_error());\n }\n \n // make foo the current db\n $db_selected = mysqli_select_db($link,$bdd['name']);\n if (!$db_selected) {\n $sql = \"CREATE DATABASE \".$bdd['name'];\n if ($link->query($sql) === TRUE) {\n $link->close();\n }\n }\n return true;\n}"
] | [
"0.71455616",
"0.660801",
"0.6556395",
"0.6481879",
"0.64734894",
"0.64617693",
"0.6457855",
"0.64477444",
"0.63674414",
"0.63662",
"0.634307",
"0.62303305",
"0.6189511",
"0.60918856",
"0.60753024",
"0.6028055",
"0.60273737",
"0.5999977",
"0.5957432",
"0.5917127",
"0.58971393",
"0.58939284",
"0.5855149",
"0.582472",
"0.58084494",
"0.58042103",
"0.57992184",
"0.57943875",
"0.57674927",
"0.57663083"
] | 0.77053326 | 0 |
Establece a 'empty' el valor de todos los atributos | function setNullAllAtributes()
{
$aPK = $this->getPrimary_key();
$this->setId_repeticion('');
$this->setRepeticion('');
$this->setTemporada('');
$this->setTipo('');
$this->setPrimary_key($aPK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setF_traslado('');\n $this->setTipo_cmb('');\n $this->setId_ctr_origen('');\n $this->setCtr_origen('');\n $this->setId_ctr_destino('');\n $this->setCtr_destino('');\n $this->setObserv('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_nom('');\n $this->setPropio('');\n $this->setEst_ok('');\n $this->setCfi('');\n $this->setCfi_con('');\n $this->setFalta('');\n $this->setEncargo('');\n $this->setDl_responsable('');\n $this->setObserv('');\n $this->setObserv_est('');\n $this->setPlazaSinComprobar('');\n $this->setPropietario('');\n $this->setId_tabla('');\n $this->setPrimary_key($aPK);\n }",
"public static function set_empty() {\n\t\t\n\t\treturn '';\n\t\t\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_mod('');\n $this->setNom('');\n $this->setDescripcion('');\n $this->setMods_req('');\n $this->setApps_req('');\n $this->setPrimary_key($aPK);\n }",
"public function blankData()\r\n\t{\r\n\t return [$this->name => null];\r\n\t}",
"protected function blankValues()\n {\n $this->id = '';\n $this->name = '';\n $this->displayName = '';\n $this->description = '';\n $this->tags = array();\n $this->customAttributes = array();\n $this->metadata = array();\n\n $this->createdTime = 0;\n $this->modifiedTime = 0;\n $this->latestRevisionNumber = -1; // Indicates that this value is unset.\n $this->activeRevision = null;\n }",
"function fieldEmpty()\n {\n $rtr = true;\n foreach ($this->field as $key => $value) {\n $value = trim($value);\n if (empty($value))\n $rtr = false;\n }\n return $rtr;\n }",
"public function validaCamposObrigatorios(){\n\t\tforeach ($this->arAtributos as $chave => $valor)\n\t\tif( isset($this->arAtributosObrigatorios[$chave])) {\n\t\t\tif (empty($this->arAtributos[$chave]) ){\n\t\t\t\tver($chave);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\n\t\treturn true;\n\t}",
"public function isEmpty() {\r\n\t\treturn empty($this->tblAttributes);\r\n\t}",
"public function allowEmpty()\n\t{\n\t\treturn true;\n\t}",
"public function isEmpty()\n {\n return is_null($this->name) && is_null($this->value);\n }",
"function getEmptyValue()\n {\n return $this->m_emptyvalue;\n }",
"public function vaciar_campos()\n {\n $this->txt_nombre->Text = \"\";\n $this->btn_incluir->Enabled=false;\n $this->drop_tipo->SelectedIndex = 0;\n $this->drop_falta->SelectedIndex = 0;\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->cadastro_valido = false;\n\t}",
"protected function getEmptyExample()\r\n {\r\n return array('none'=>'none');\r\n }",
"public function getAllowEmpty()\n {\n return $this->_allowEmpty;\n }",
"public function checkEmptyValue() {\n $this->object->setStaticValues(array(\n '1' => '<'\n ));\n\n // check that the empty option exists\n $html = $this->object->getEditHtml();\n $this->assertContains('value=\"\"', $html);\n\n // check that the empty option DOES NOT EXIST\n $this->object->setAddEmptyOption(false);\n $html = $this->object->getEditHtml();\n $this->assertNotContains('value=\"\"', $html);\n }",
"public function checkForEmptyFields($args = array())\r\n {\r\n $errors = array();\r\n foreach ($args as $key => $value) {\r\n if ($key !== 'etat') {\r\n $newValue = trim($value);\r\n }\r\n if (empty($newValue)) {\r\n $errors[] = \"<div class='error'>Le champ \" . ucfirst($key) . \" est obligatoire</div>\";\r\n }\r\n }\r\n return $errors;\r\n }",
"function addEmptySelect($list = array())\n {\n return array(\"\" => \"\") + $list;\n }",
"function _addEmptyListOption()\n {\n $ret='';\n\n // use a different (more descriptive) text for obligatory items\n $text_key = $this->hasFlag(AF_OBLIGATORY) ? \"list_null_value_obligatory\" : \"list_null_value\";\n\n if (!$this->hasFlag(AF_LIST_NO_NULL_ITEM) ||\n ($this->hasFlag(AF_OBLIGATORY) &&\n // CONFIG IS DEPRECATED\n ((atkconfig(\"list_obligatory_null_item\")&&!$this->hasFlag(AF_LIST_NO_OBLIGATORY_NULL_ITEM))||\n ($this->hasFlag(AF_LIST_OBLIGATORY_NULL_ITEM)))))\n {\n $ret = '<option value=\"'.$this->m_emptyvalue.'\">'.atk_htmlentities($this->text(array($this->fieldName().'_'.$text_key, $text_key))).'</option>';\n }\n return $ret;\n }",
"public function getEmptyValue()\n {\n return $this->emptyValue;\n }",
"public function getEmptyValue()\n {\n return $this->emptyValue;\n }",
"protected function remove_empty_data() {\n\n\t\tforeach ( (array) $this->request_data as $key => $value ) {\n\n\t\t\tif ( is_array( $value ) ) {\n\n\t\t\t\tif ( empty( $value ) ) {\n\n\t\t\t\t\tunset( $this->request_data[ $key ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tforeach ( $value as $inner_key => $inner_value ) {\n\n\t\t\t\t\t\tif ( is_null( $inner_value ) || '' === $inner_value ) {\n\t\t\t\t\t\t\tunset( $this->request_data[ $key ][ $inner_key ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( is_null( $value ) || '' === $value ) {\n\t\t\t\t\tunset( $this->request_data[ $key ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function isEmpty()\n\t{\n\t\treturn empty($this->values);\n\t}",
"public function isEmpty(){\r\n return empty($this->data);\r\n }",
"public static function mempty();",
"function _empty()\n {\n return '';\n }",
"protected function showAll() {\r\n\t\treturn !empty($this->value);\r\n\t}",
"public function isEmpty() {\n\t\treturn $this->getValue() == null || $this->getValue() == '';\n\t}",
"public function isEmpty(){\n\t\treturn $this->_empty;\n\t}"
] | [
"0.65133446",
"0.6393303",
"0.6332762",
"0.6285486",
"0.61736315",
"0.6130671",
"0.61271185",
"0.6118777",
"0.6107362",
"0.60789305",
"0.60524505",
"0.6018878",
"0.59813553",
"0.5969416",
"0.5959193",
"0.5953941",
"0.5941632",
"0.5909544",
"0.5888469",
"0.5863867",
"0.58475435",
"0.58475435",
"0.58416927",
"0.58386344",
"0.58317304",
"0.5831584",
"0.582219",
"0.58199364",
"0.58183503",
"0.5767593"
] | 0.6685466 | 0 |
Recupera el atributo iid_repeticion de Repeticion | function getId_repeticion()
{
if (!isset($this->iid_repeticion) && !$this->bLoaded) {
$this->DBCarregar();
}
return $this->iid_repeticion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setId_repeticion($iid_repeticion)\n {\n $this->iid_repeticion = $iid_repeticion;\n }",
"function getRepeticion()\n {\n if (!isset($this->srepeticion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->srepeticion;\n }",
"function getDatosRepeticion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'repeticion'));\n $oDatosCampo->setEtiqueta(_(\"repetición\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(30);\n return $oDatosCampo;\n }",
"function setRepeticion($srepeticion = '')\n {\n $this->srepeticion = $srepeticion;\n }",
"public static function getRepetitiesVoorMaaltijdRepetitie($mrid) {\n\t\tif (!is_int($mrid) || $mrid <= 0) {\n\t\t\tthrow new Exception('Load taken voor maaltijd faalt: Invalid $mrid =' . $mrid);\n\t\t}\n\t\treturn self::loadRepetities('mlt_repetitie_id = ?', array($mrid));\n\t}",
"public function getRetractil()\n {\n return $this->hasOne(Retractil::className(), ['id' => 'retractil_id']);\n }",
"public function getPeliculaId()\n {\n return $this->pelicula_id;\n }",
"function agregar_consecutivo_recibo($id_carrito_compra) {\r\n $this->db->escape($id_carrito_compra);\r\n $this->db->set('id_carritos_compras', $id_carrito_compra);\r\n $this->db->insert('consecutivo_recibos');\r\n $id_consecutivo = mysql_insert_id();\r\n \r\n $carritos = $this->usuario_model->dar_items_compra_idcarrito($id_carrito_compra);//el id está vacío\r\n return $id_consecutivo;\r\n }",
"public function getFkAdministracaoRestricaoIntegridade()\n {\n return $this->fkAdministracaoRestricaoIntegridade;\n }",
"abstract public function rentedBy($idC);",
"public function imprimir($id)\n {\n $registro = RegistroEscritura::find($id);\n\n $predio = $this->padron->getByClaveOCuenta($registro->clave);\n\n //enajenante\n $enajenante = personas::find($registro->enajenante_id);\n $registro->enajenante->fill($enajenante->toArray());\n\n //adquiriente\n $adquiriente = personas::find($registro->adquiriente_id);\n $registro->adquiriente->fill($adquiriente->toArray());\n\n $registro->registro = $registro;\n\n $notaria = Notaria::find($registro->notaria_id);\n $registro->notariaEscritura = $notaria->nombre.$notaria->mpio->nombre_municipio.$notaria->estado->nom_ent;\n\n $notario = Notaria::where('id_notario', $notaria->id_notario)->first();\n $registro->notarioEscritura = $notario->notario->nombres.' ' .$notario->notario->apellido_paterno. ' '.$notario->notario->apellido_materno;\n\n // Title\n $title = 'Imprimir registro de escritura';\n\n //barcodes\n $seguimiento = DNS1D::getBarcodePNGPath($registro->seguimiento, \"C128\");\n\n $colindancias = Colindancias::where('registro_id',$id);\n\n $notaria = Notaria::find($registro->notaria_id);\n $registro->notariaEscritura = $notaria->id_notario.$notaria->nombre.$notaria->mpio->nombre_municipio.$notaria->estado->nom_ent;\n\n $notario = Notaria::where('id_notario', $notaria->id_notario)->first();\n $registro->notarioEscritura = $notario->notario->nombres.' ' .$notario->notario->apellido_paterno. ' '.$notario->notario->apellido_materno;\n\n $JsonColindancias = $registro->colindancia->toJson();\n\n //barcodes\n $seguimiento = DNS1D::getBarcodePNGPath($registro->seguimiento, \"C128\");\n $domicilioE = Domicilio::domicilioCompleto($registro->dir_enajenante_id);\n $domicilioA = Domicilio::domicilioCompleto($registro->dir_adquiriente_id);\n\n\n\n // Show the page\n $vista = View:: make('ofvirtual.notario.registro.pdf', compact('domicilioE', 'domicilioA', 'title', 'registro', 'predio','seguimiento','colindancias','notaria','notario','JsonColindancias'));\n\n //devuelvo los datos en PDF\n $pdf = PDF::load($vista)->show(\"Registro-Escritura\");\n $response = Response::make($pdf, 200);\n $response->header('Content-Type', 'application/pdf');\n return $response;\n }",
"function retour_idpersonne_chambre_fiche($id){\nreturn ResultatRequette(\"select ID_PERSONNE as info from occuper where ID_OCCUPATION='$id'\");\n}",
"public function getIdI()\r {\r return $this->idI;\r }",
"function setId_mod($iid_mod)\n {\n $this->iid_mod = $iid_mod;\n }",
"function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }",
"function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }",
"public function getIdRecipe()\n {\n return $this->id_recipe;\n }",
"public function getIdModulo()\n {\n return $this->_id_Modulo;\n }",
"function getId_item()\n {\n if (!isset($this->iid_item) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_item;\n }",
"public function reparaciones($id_vehiculo){\n\t\t$sql =\"select a.id_reparacion as IDR, a.id_vehiculo as VIN, a.fecha_entrada as Fecha, a.kilometros as KM, a.periodo as HRS,\n\t\t\t\tb.nombre as Ciudad,\n\t\t\t\ta.notas as Notas,\n\t\t\t\tc.id_viaje as Viaje\n\t\t\t\tfrom reparacion as a\n\t\t\t\tleft join ciudad as b on (a.id_ciudad = b.id_ciudad)\n\t\t\t\tleft join viaje as c on(a.id_viaje = c.id_viaje)\n\t\t\t\tWHERE a.id_vehiculo = '$id_vehiculo'\n\t\t\t\torder by a.id_vehiculo, a.id_reparacion;\";\n\t\t\t\t$result = $this->db->query($sql);\n\t\t\t\treturn $result->result_array();\n\t}",
"public function getIdCompetencia()\n {\n return $this->idCompetencia;\n }",
"public function getIdCarrito(){\n return $this->idCarrito;\n }",
"public function setIdgenero($p_idgenero){\r\n\t$this->idgenero=$p_idgenero;\r\n}",
"public function getIdretos()\n {\n return $this->hasMany(AccionesRetos::className(), ['id' => 'idreto'])->viaTable('retos_usuarios', ['usuario_id' => 'id']);\n }",
"public function getId() {\n return $this->recibodescuentos->getId_recdesc();\n }",
"public function setId($id) {\n $this->recibodescuentos->setId_recdesc($id);\n }",
"public function setPrimary_key($a_id = '')\n {\n if (is_array($a_id)) {\n $this->aPrimary_key = $a_id;\n foreach ($a_id as $nom_id => $val_id) {\n if (($nom_id == 'id_repeticion') && $val_id !== '') $this->iid_repeticion = (int)$val_id; \n }\n }\n }",
"function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }",
"public function getRub_id() \n\t{\n\t\treturn $this->rub_id;\n\t}",
"function recup_id_responsable__personne_visite($nom,$prenom){\n return ResultatRequette(\"select ID_CLIENT as info from personne_physique where NOM_CLIENT='$nom' AND PRENOM_CLIENT='$prenom'\");\n}"
] | [
"0.8651948",
"0.6461814",
"0.6299234",
"0.60669386",
"0.5772552",
"0.571221",
"0.5667594",
"0.5650743",
"0.56067365",
"0.55556226",
"0.55385303",
"0.5523271",
"0.55219316",
"0.5480253",
"0.5467878",
"0.5467878",
"0.54531115",
"0.541926",
"0.53802735",
"0.5368773",
"0.53539276",
"0.53538066",
"0.52771276",
"0.52717155",
"0.527076",
"0.52597827",
"0.5236773",
"0.52323663",
"0.5227321",
"0.5226077"
] | 0.80383945 | 1 |
Establece el valor del atributo iid_repeticion de Repeticion | function setId_repeticion($iid_repeticion)
{
$this->iid_repeticion = $iid_repeticion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getId_repeticion()\n {\n if (!isset($this->iid_repeticion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_repeticion;\n }",
"function getRepeticion()\n {\n if (!isset($this->srepeticion) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->srepeticion;\n }",
"function getDatosRepeticion()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'repeticion'));\n $oDatosCampo->setEtiqueta(_(\"repetición\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(30);\n return $oDatosCampo;\n }",
"function setRepeticion($srepeticion = '')\n {\n $this->srepeticion = $srepeticion;\n }",
"public function getPeliculaId()\n {\n return $this->pelicula_id;\n }",
"public function getFkAdministracaoRestricaoIntegridade()\n {\n return $this->fkAdministracaoRestricaoIntegridade;\n }",
"function agregar_consecutivo_recibo($id_carrito_compra) {\r\n $this->db->escape($id_carrito_compra);\r\n $this->db->set('id_carritos_compras', $id_carrito_compra);\r\n $this->db->insert('consecutivo_recibos');\r\n $id_consecutivo = mysql_insert_id();\r\n \r\n $carritos = $this->usuario_model->dar_items_compra_idcarrito($id_carrito_compra);//el id está vacío\r\n return $id_consecutivo;\r\n }",
"public function getIdI()\r {\r return $this->idI;\r }",
"function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }",
"function setId_nom($iid_nom)\n {\n $this->iid_nom = $iid_nom;\n }",
"public function imprimir($id)\n {\n $registro = RegistroEscritura::find($id);\n\n $predio = $this->padron->getByClaveOCuenta($registro->clave);\n\n //enajenante\n $enajenante = personas::find($registro->enajenante_id);\n $registro->enajenante->fill($enajenante->toArray());\n\n //adquiriente\n $adquiriente = personas::find($registro->adquiriente_id);\n $registro->adquiriente->fill($adquiriente->toArray());\n\n $registro->registro = $registro;\n\n $notaria = Notaria::find($registro->notaria_id);\n $registro->notariaEscritura = $notaria->nombre.$notaria->mpio->nombre_municipio.$notaria->estado->nom_ent;\n\n $notario = Notaria::where('id_notario', $notaria->id_notario)->first();\n $registro->notarioEscritura = $notario->notario->nombres.' ' .$notario->notario->apellido_paterno. ' '.$notario->notario->apellido_materno;\n\n // Title\n $title = 'Imprimir registro de escritura';\n\n //barcodes\n $seguimiento = DNS1D::getBarcodePNGPath($registro->seguimiento, \"C128\");\n\n $colindancias = Colindancias::where('registro_id',$id);\n\n $notaria = Notaria::find($registro->notaria_id);\n $registro->notariaEscritura = $notaria->id_notario.$notaria->nombre.$notaria->mpio->nombre_municipio.$notaria->estado->nom_ent;\n\n $notario = Notaria::where('id_notario', $notaria->id_notario)->first();\n $registro->notarioEscritura = $notario->notario->nombres.' ' .$notario->notario->apellido_paterno. ' '.$notario->notario->apellido_materno;\n\n $JsonColindancias = $registro->colindancia->toJson();\n\n //barcodes\n $seguimiento = DNS1D::getBarcodePNGPath($registro->seguimiento, \"C128\");\n $domicilioE = Domicilio::domicilioCompleto($registro->dir_enajenante_id);\n $domicilioA = Domicilio::domicilioCompleto($registro->dir_adquiriente_id);\n\n\n\n // Show the page\n $vista = View:: make('ofvirtual.notario.registro.pdf', compact('domicilioE', 'domicilioA', 'title', 'registro', 'predio','seguimiento','colindancias','notaria','notario','JsonColindancias'));\n\n //devuelvo los datos en PDF\n $pdf = PDF::load($vista)->show(\"Registro-Escritura\");\n $response = Response::make($pdf, 200);\n $response->header('Content-Type', 'application/pdf');\n return $response;\n }",
"function setId_mod($iid_mod)\n {\n $this->iid_mod = $iid_mod;\n }",
"public function getIdCompetencia()\n {\n return $this->idCompetencia;\n }",
"public function getIdCarrito(){\n return $this->idCarrito;\n }",
"function retour_idpersonne_chambre_fiche($id){\nreturn ResultatRequette(\"select ID_PERSONNE as info from occuper where ID_OCCUPATION='$id'\");\n}",
"public function setIdgenero($p_idgenero){\r\n\t$this->idgenero=$p_idgenero;\r\n}",
"public function getIdInventario(){\n\t\treturn $this->id_inventario;\n\t}",
"public function getIdReserva()\n {\n return $this->idReserva;\n }",
"function getId_item()\n {\n if (!isset($this->iid_item) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_item;\n }",
"public function getRetractil()\n {\n return $this->hasOne(Retractil::className(), ['id' => 'retractil_id']);\n }",
"function actualizar_institucion_id()\n {\n $this->App_model->actualizar_institucion_id();\n \n $data['mensaje'] = \"Actualización del campo institucion_id ejecutada\";\n $data['titulo_pagina'] = \"Actualización institucion_id\";\n $data['vista_a'] = \"app/mensaje_v\";\n \n $this->load->view('plantilla_apanel/plantilla', $data);\n }",
"public function setPrimary_key($a_id = '')\n {\n if (is_array($a_id)) {\n $this->aPrimary_key = $a_id;\n foreach ($a_id as $nom_id => $val_id) {\n if (($nom_id == 'id_repeticion') && $val_id !== '') $this->iid_repeticion = (int)$val_id; \n }\n }\n }",
"public function getRemesa() {\n \n $remesa = '';\n\n if ((($this->Origen == '3') or ($this->Origen == '5')) and ($this->Entidad != '') and ($this->IDEntidad != '')) {\n $recibo = new $this->Entidad($this->IDEntidad);\n $remesa = $recibo->getIDRemesa();\n unset($recibo);\n }\n\n return $remesa;\n }",
"function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }",
"public function getIdModulo()\n {\n return $this->_id_Modulo;\n }",
"public function set_id_indice($valor){\n $er = new Er();\n if ( !$er->valida_numero_entero($valor) ){\n $this->errores[] = 'id_indice no valido ('.$valor.').';\n }\n //trim simplemente quita espacios al principio y final de la cadena\n $this->id_indice = trim($valor);\n }",
"public function getFkImobiliarioImovel()\n {\n return $this->fkImobiliarioImovel;\n }",
"public function getId() {\n return $this->recibodescuentos->getId_recdesc();\n }",
"private function id_retorno_init(): int\n {\n $id_retorno = -1;\n if(isset($_POST['id_retorno'])){\n $id_retorno = (int)$_POST['id_retorno'];\n }\n return $id_retorno;\n }",
"public function getIdgenero(){\r\n\treturn $this->idgenero;\r\n}"
] | [
"0.77888954",
"0.61693215",
"0.5930182",
"0.59254694",
"0.5851921",
"0.5803653",
"0.579294",
"0.57741916",
"0.576753",
"0.576753",
"0.5747947",
"0.5652649",
"0.5633036",
"0.5597895",
"0.55941564",
"0.55345327",
"0.5524562",
"0.5518556",
"0.55165",
"0.5468136",
"0.54634666",
"0.5460653",
"0.54467523",
"0.5444019",
"0.54385614",
"0.5437481",
"0.54328007",
"0.53892875",
"0.53888726",
"0.53736967"
] | 0.85571915 | 0 |
Recupera les propietats de l'atribut srepeticion de Repeticion en una clase del tipus DatosCampo | function getDatosRepeticion()
{
$nom_tabla = $this->getNomTabla();
$oDatosCampo = new core\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'repeticion'));
$oDatosCampo->setEtiqueta(_("repetición"));
$oDatosCampo->setTipo('texto');
$oDatosCampo->setArgument(30);
return $oDatosCampo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _setear_campos()\r\n\t{\r\n\t\t$this->datos_formulario->id_equipo = isset($this->datos_formulario->id_equipo) ? $this->datos_formulario->id_equipo : '';\r\n\t\t$this->datos_formulario->id_liga = isset($this->datos_formulario->id_liga) ? $this->datos_formulario->id_liga : '';\r\n\t\t$this->datos_formulario->nombre = isset($this->datos_formulario->nombre) ? $this->datos_formulario->nombre : '';\r\n\t\t$this->datos_formulario->id_estadio = isset($this->datos_formulario->id_estadio) ? $this->datos_formulario->id_estadio : '';\r\n\t\t$this->datos_formulario->id_usuario = isset($this->datos_formulario->id_usuario) ? $this->datos_formulario->id_usuario : '';\r\n\t\t$this->datos_formulario->imagen = isset($this->datos_formulario->imagen) ? $this->datos_formulario->imagen : '';\r\n\t}",
"private function getElementosData () {\n\n if ((is_array($this->data) or is_object($this->data)) and count($this->data) > 0) {\n\n if ($this->selector == 'TABLE') {\n #Debug::mostrarArray($this->data);\n }\n foreach ($this->data as $key => $value) {\n\n $this->selectorCreado .= \" $key='\" . $value . \"'\";\n }\n }\n }",
"public function cargando_datos_form_3(){\n //donde los atributos ó variables de instancia del mismo\n //representan los campos del formulario.\n //<input name=\"form[nombres]\" ... />\n //<select name=\"form[sexo]\" ... />, etc.\n $this->form->nombres = 'Manuel Aguirre';\n $this->form->edad = 23;\n $this->form->sexo = 'M';\n }",
"function getDatosPropietario()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'propietario'));\n $oDatosCampo->setEtiqueta(_(\"propietario\"));\n return $oDatosCampo;\n }",
"function consulta_campos($mostrar = false) {\n\t\t$this->campos_num = 0;\n\t\tforeach(mysqli_fetch_fields($this->dados) as $campo) { \n\t\t\tif($mostrar == false){\n\t\t\t\tarray_push($this->campos_nome, $campo->name);\n\t\t\t} else {\n\t\t\t\techo($campo->name. \" [\" . $campo->type . \"]<br>\" ); \t\n\t\t\t}\n\t\t\t$this->campos_num++; // guarda a quantidade de campos\n \t}\n\t\tif($mostrar != false) \techo(\"Total de campos: \" . $this->campos_num); // mostra o número de campos\n\t\t\n }",
"function puestoDatos($idPuesto){\n $pdo = new conexion();\n $query = $pdo->prepare(\"SELECT * FROM puesto WHERE idPuesto = $idPuesto;\");\n $query->execute();\n $res = $query->fetchAll();\n \n foreach ($res as $value) {\n $this->idPuesto=$value['idPuesto'];\n $this->nombrePuest=$value['nombrePuest'];\n $this->descripcion=$value['descripcion'];\n $this->salarioDia=$value['salarioDia'];\n }\n }",
"function getDatosPropio()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'propio'));\n $oDatosCampo->setEtiqueta(_(\"propio\"));\n return $oDatosCampo;\n }",
"private function campo(){}",
"public function cargando_datos_form_1(){\n //de texto y un select.\n //la primera jaca de texto tiene como atributo name=\"nombres\"\n //la segunda es edad y el select se llama sexo.\n //al pasar variables desde los controladores a la vista\n //con nombres de variable igual a algun atributo name de algun input\n //ó select u otro, estos se cargan con el valor de dicha variable.\n $this->nombres = 'Manuel Aguirre'; //en la vista hay un input de tipo texto con\n // name=\"nombres\" , y desde el controlador le estamos dando valor a dicho input\n $this->edad = 23; //lo mismo para el input con name=\"edad\"\n $this->sexo = 'M'; //una de las opciones del select con name=\"sexo\"\n //tiene como valor 'M', y esa será la opcion que aparecerá seleccionada \n //al mostrar la vista en el navegador \n }",
"public function __construct($recurso){\r\n parent::__construct();\r\n\r\n if(!is_resource($recurso))\r\n throw new Exception(\"El parametro recibido no es un recurso\");\r\n\r\n if(get_resource_type($recurso)!=RecordSetMySQL::TIPO_RECURSO)\r\n throw new Exception(\"El recurso recibido no es de\r\n tipo \".RecordSetMySQL::TIPO_RECURSO);\r\n\r\n $this->cantidadCampos=mysql_num_fields($recurso);\r\n for($i=0; $i<$this->cantidadCampos; $i++){\r\n $this->campos[]=mysql_fetch_field($recurso);\r\n //=$descripcion;\r\n }\r\n\r\n $this->cantidad=mysql_num_rows($recurso);\r\n if($this->cantidad>0){\r\n $this->numeroCampos=mysql_num_fields ($recurso);\r\n if($this->numeroCampos===FALSE)\r\n throw new Exception(\"No fue posible contar el numero de compos\r\n del record set\");\r\n }\r\n $i=0;\r\n for($i=0; $i<$this->cantidad; $i++){\r\n $this->registros[$i]=mysql_fetch_object($recurso);\r\n\r\n for($k=0; $k<$this->cantidadCampos; $k++){\r\n if($this->campos[$k]->type=='int'){\r\n $nombreCampo=$this->campos[$k]->name;\r\n $this->registros[$i]->$nombreCampo=(int)$this->registros[$i]->$nombreCampo;\r\n continue;\r\n }\r\n\r\n if($this->campos[$k]->type=='float'){\r\n $nombreCampo=$this->campos[$k]->name;\r\n $this->registros[$i]->$nombreCampo=(float)$this->registros[$i]->$nombreCampo;\r\n continue;\r\n }\r\n\r\n if($this->campos[$k]->type=='double'){\r\n $nombreCampo=$this->campos[$k]->name;\r\n $this->registros[$i]->$nombreCampo=(double)$this->registros[$i]->$nombreCampo;\r\n continue;\r\n }\r\n\r\n if($this->campos[$k]->type=='boolean'){\r\n $nombreCampo=$this->campos[$k]->name;\r\n $this->registros[$i]->$nombreCampo=(boolean)$this->registros[$i]->$nombreCampo;\r\n continue;\r\n }\r\n\r\n if($this->campos[$k]->type=='bool'){\r\n $nombreCampo=$this->campos[$k]->name;\r\n $this->registros[$i]->$nombreCampo=(bool)$this->registros[$i]->$nombreCampo;\r\n continue;\r\n }\r\n }\r\n }\r\n }",
"public function refactory_amigos($datos,$tipo){\n\n $complete = \"\"; \n \n foreach ($datos as $valor){\n $global = new Global_var();\n $empresa = '';\n $nombre = '';\n $url = '';\n $aux = $this->$tipo;\n //$aux = $this->segui;\n //echo $valor->type;\n if($valor->type == \"Empresa\"){ \t \n $empresa = 'style=\"background-color: #CBFEC1\"';\n $nombre = $valor->nombre;\n $url = $global->url_empresa;\n }else{\n $nombre = $valor->nick;\n $url = $global->url_usuario;\n } \n $aux = str_ireplace('{empresa}', $empresa, $aux); \n $aux = str_ireplace('{id}', $valor->id, $aux);\n $aux = str_ireplace('{url}', $url, $aux);\n $aux = str_ireplace('{imagen}', $valor->imagen, $aux);\n $aux = str_ireplace('{nombre}', $nombre, $aux);\n $complete .= $aux;\n }\n \n //$this->$segui = $complete;\n $this->$tipo = $complete;\n $this->actualizar_diccionarios();\n \n }",
"protected function camposBuscador(){\n $paisesBuscador = Consultas::querys('paisesPublicados');\n $ciudades = Consultas::querys('ciudadesPublicados');\n $marcas = Consultas::querys('marcasPublicados'); \n $tipos = Consultas::querys('tiposPublicados'); \n $colors = Consultas::querys('coloresPublicados'); \n $anospublicados = Consultas::querys('anosPublicados');\n $modelosTotal = Consultas::querys('modelosPublicados'); \n $paisesLista = Consultas::querys('paisesLista');\n $marcasPublicadosHoy = Consultas::querys('marcasPublicadosHoy');\n \n \\View::share(compact('paisesBuscador','tipos','colors','modelosTotal','ciudades','marcas','anospublicados','paisesLista','marcasPublicadosHoy')); \n }",
"function set_dataTproyectos()\n {\n $this->tproyectos['data1'] = 'idEmpresa';\n $this->tproyectos['data2'] = 'nombre';\n $this->tproyectos['data3'] = 'actividadEconomica';\n $this->tproyectos['data4'] = 'descripcionGeneral';\n $this->tproyectos['data5'] = 'video';\n $this->tproyectos['data6'] = 'regDate';\n $this->tproyectos['data7'] = 'monto';\n }",
"private function preencheDadosPermissao()\r\n\t{\r\n\t\t$idPermissao = $this->getValueForm(\"id_permissao\");\r\n $qtdeAplicacoes = $this->getValueForm(\"qtdeAplicacoes\");\r\n $idAplicacao = $_POST[\"aplicacao\"];\r\n \r\n $acesso = $_POST[\"acesso\"];\r\n\t\t$consulta = $_POST[\"consulta\"];\r\n\t\t$cadastra = $_POST[\"cadastra\"];\r\n\t\t$atualiza = $_POST[\"altera\"];\r\n\t\t$exclui = $_POST[\"exclui\"];\r\n $imprimi = $_POST[\"imprimi\"];\r\n \r\n $perfil = new Perfil();\r\n $perfil->setId($this->getValueForm(\"perfil\"));\r\n \r\n\r\n $this->listaPermissoes = new ArrayList();\r\n \r\n for($i = 0; $i < $qtdeAplicacoes; $i++){\r\n \t$aplicacao = new Aplicacao();\r\n \t\t$aplicacao->setId($idAplicacao[$i]);\r\n \t\t\r\n\t\t\t$permissao = new Permissao();\r\n\t\t\t$permissao->setId($idPermissao);\r\n\t\t\t$permissao->setPerfil($perfil);\r\n\t\t\t$permissao->setAplicacao($aplicacao);\r\n\t\t\t\r\n\t\t\tif($this->checkboxSelecionado($acesso, $aplicacao->getId()))\r\n\t\t\t\t$permissao->setAcessa('S');\r\n\t\t\t\r\n\t \tif($this->checkboxSelecionado($cadastra, $aplicacao->getId()))\r\n\t\t \t$permissao->setCadastra('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($atualiza, $aplicacao->getId()))\r\n\t\t \t$permissao->setAtualiza('S');\r\n\t\t \r\n\t \tif($this->checkboxSelecionado($exclui, $aplicacao->getId()))\r\n\t\t \t$permissao->setExclui('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($consulta, $aplicacao->getId()))\r\n\t\t \t$permissao->setConsulta('S');\r\n\t\t \r\n\t\t if($this->checkboxSelecionado($imprimi, $aplicacao->getId()))\r\n\t\t \t$permissao->setImprimi('S');\r\n\t \t\r\n\t \t//echo \"<br/>\".$permissao->toString();\r\n\t \t$this->listaPermissoes->add($permissao, $i);\r\n\t }\r\n\t \r\n }",
"function __construct($objeto_anfitrion,$cantidad_usuarios, $clave){\n\t\t\t$this->clave=$clave;\n\t\t\t$this->paises=array(50);\n\t\t\t//datos creador de partida\n\t\t\t$this->objeto_anfitrion=$objeto_anfitrion;\n\t\t\t\n\t\t\t//futuros datos jugadores;\n\t\t\t$this->objetos_usuarios=array($cantidad_usuarios);\n\t\t\t\n\t\t\t\t//CREO UN ARREGLO EN EL QUE SE GUARDAN LOS USUARIOS TEMPORALES, ESTOS SON LOS QUE QUIEREN INGRESAR, O SEA SELECCIONAN COLOR, PERO \n\t\t\t\t//TODAVIA NO INGRESARON\n\t\t\t$this->objetos_usuarios_temporales=array($cantidad_usuarios-1);\n\t\t\t\n\t\t\t//Pongo todos los campos de los usuarios en NULL\n\t\t\tfor($i=0;$i<$cantidad_usuarios;$i++)\n\t\t\t\t$this->objetos_usuarios[$i]=NULL;\n\t\t\t\n\t\t\t//Meto el objeto anfitrion en objetos_usuarios\n\t\t\t$this->objetos_usuarios[0]=$this->objeto_anfitrion;\n\t\t\t$this->usuarios_efectivos++;\n\t\t\t\n\t\t\t//creo paises y los y continentes\n\t\t\t\t//America del norte\n\t\t\t$paises_america_norte=array(10);\n\t\t\t\n\t\t\t$this->paises_america_norte[0]=$yukon=new Pais(\"Yukon\",0,1);\n\t\t\t$this->paises[0]=$yukon;\n\t\t\t\n\t\t\t$this->paises_america_norte[1]=$canada= new Pais(\"Canada\",1,1);\n\t\t\t$this->paises[1]=$canada;\n\t\t\t\n\t\t\t$this->paises_america_norte[2]=$alasca= new Pais(\"Alasca\",2,1);\n\t\t\t$this->paises[2]=$alasca;\n\t\t\t\n\t\t\t$this->paises_america_norte[3]=$groenlandia= new Pais(\"Groenlandia\",3,1);\n\t\t\t$this->paises[3]=$groenlandia;\n\t\t\t$this->paises_america_norte[4]=$oregon= new Pais(\"Oregon\",4,1);\n\t\t\t$this->paises[4]=$oregon;\n\t\t\t$this->paises_america_norte[5]=$nueva_york= new Pais(\"Nueva York\",5,1);\n\t\t\t$this->paises[5]=$nueva_york;\n\t\t\t$this->paises_america_norte[6]=$terranova= new Pais(\"Terranova\",6,1);\n\t\t\t$this->paises[6]=$terranova;\n\t\t\t$this->paises_america_norte[7]=$labrador= new Pais(\"Labrador\",7,1);\n\t\t\t$this->paises[7]=$labrador;\n\t\t\t$this->paises_america_norte[8]=$california= new Pais(\"California\",8,1);\n\t\t\t$this->paises[8]=$california;\n\t\t\t$this->paises_america_norte[9]=$mexico= new Pais(\"Mexico\",9,1);\n\t\t\t$this->paises[9]=$mexico;\n\t\t\t\n\t\t\t\t//America del sur\n\t\t\t$paises_america_sur=array(6);\n\t\t\t$this->paises_america_sur[0]=$colombia= new Pais(\"Colombia\",10,2);\n\t\t\t$this->paises[10]=$colombia;\n\t\t\t$this->paises_america_sur[1]=$brasil= new Pais(\"Brasil\",11,2);\n\t\t\t$this->paises[11]=$brasil;\n\t\t\t$this->paises_america_sur[2]=$peru= new Pais(\"Peru\",12,2);\n\t\t\t$this->paises[12]=$peru;\n\t\t\t$this->paises_america_sur[3]=$chile= new Pais(\"Chile\",13,2);\n\t\t\t$this->paises[13]=$chile;\n\t\t\t$this->paises_america_sur[4]=$argentina= new Pais(\"Argentina\",14,2);\n\t\t\t$this->paises[14]=$argentina;\n\t\t\t$this->paises_america_sur[5]=$uruguay= new Pais(\"Uruguay\",15,2);\n\t\t\t$this->paises[15]=$uruguay;\n\t\t\t\n\t\t\t\t//Africa\n\t\t\t$paises_africa=array(6);\n\t\t\t$this->paises_africa[0]=$sahara= new Pais(\"Sahara\",16,3);\n\t\t\t$this->paises[16]=$sahara;\n\t\t\t$this->paises_africa[1]=$egipto= new Pais(\"Egipto\",17,3);\n\t\t\t$this->paises[17]=$egipto;\n\t\t\t$this->paises_africa[2]=$etiopia= new Pais(\"Etiopia\",18,3);\n\t\t\t$this->paises[18]=$etiopia;\n\t\t\t$this->paises_africa[3]=$zaire= new Pais(\"Zaire\",19,3);\n\t\t\t$this->paises[19]=$zaire;\n\t\t\t$this->paises_africa[4]=$sudafrica= new Pais(\"Sudafrica\",20,3);\n\t\t\t$this->paises[20]=$sudafrica;\n\t\t\t$this->paises_africa[5]=$madagascar= new Pais(\"Madagascar\",21,3);\n\t\t\t$this->paises[21]=$madagascar;\n\t\t\t\n\t\t\t\t//Europa\n\t\t\t$paises_europa=array(9);\n\t\t\t$this->paises_europa[0]=$islandia= new Pais(\"Islandia\",22,4);\n\t\t\t$this->paises[22]=$islandia;\n\t\t\t$this->paises_europa[1]=$gran_bretania= new Pais(\"Gran bretaña\",23,4);\n\t\t\t$this->paises[23]=$gran_bretania;\n\t\t\t$this->paises_europa[2]=$suecia= new Pais(\"Suecia\",24,4);\n\t\t\t$this->paises[24]=$suecia;\n\t\t\t$this->paises_europa[3]=$rusia= new Pais(\"Rusia\",25,4);\n\t\t\t$this->paises[25]=$rusia;\n\t\t\t$this->paises_europa[4]=$polonia= new Pais(\"Polonia\",26,4);\n\t\t\t$this->paises[26]=$polonia;\n\t\t\t$this->paises_europa[5]=$alemania= new Pais(\"Alemania\",27,4);\n\t\t\t$this->paises[27]=$alemania;\n\t\t\t$this->paises_europa[6]=$italia= new Pais(\"Italia\",28,4);\n\t\t\t$this->paises[28]=$italia;\n\t\t\t$this->paises_europa[7]=$francia= new Pais(\"Francia\",29,4);\n\t\t\t$this->paises[29]=$francia;\n\t\t\t$this->paises_europa[8]=$espania= new Pais(\"España\",30,4);\n\t\t\t$this->paises[30]=$espania;\n\t\t\t\t\n\t\t\t\t//Asia\n\t\t\t$paises_asia=array(15);\n\t\t\t$this->paises_asia[0]=$aral= new Pais(\"Aral\",31,5);\n\t\t\t$this->paises[31]=$aral;\n\t\t\t$this->paises_asia[1]=$tartaria= new Pais(\"Tartaria\",32,5);\n\t\t\t$this->paises[32]=$tartaria;\n\t\t\t$this->paises_asia[2]=$taimir= new Pais(\"Taimir\",33,5);\n\t\t\t$this->paises[33]=$taimir;\n\t\t\t$this->paises_asia[3]=$siberia= new Pais(\"Siberia\",34,5);\n\t\t\t$this->paises[34]=$siberia;\n\t\t\t$this->paises_asia[4]=$camchatca= new Pais(\"Camchatca\",35,5);\n\t\t\t$this->paises[35]=$camchatca;\n\t\t\t$this->paises_asia[5]=$japon= new Pais(\"Japon\",36,5);\n\t\t\t$this->paises[36]=$japon;\n\t\t\t$this->paises_asia[6]=$iran= new Pais(\"Iran\",37,5);\n\t\t\t$this->paises[37]=$iran;\n\t\t\t$this->paises_asia[7]=$mongolia= new Pais(\"Mongolia\",38,5);\n\t\t\t$this->paises[38]=$mongolia;\n\t\t\t$this->paises_asia[8]=$china= new Pais(\"China\",39,5);\n\t\t\t$this->paises[39]=$china;\n\t\t\t$this->paises_asia[9]=$gobi= new Pais(\"Gobi\",40,5);\n\t\t\t$this->paises[40]=$gobi;\n\t\t\t$this->paises_asia[10]=$turquia= new Pais(\"Turquia\",41,5);\n\t\t\t$this->paises[41]=$turquia;\n\t\t\t$this->paises_asia[11]=$israel= new Pais(\"Israel\",42,5);\n\t\t\t$this->paises[42]=$israel;\n\t\t\t$this->paises_asia[12]=$arabia= new Pais(\"Arabia\",43,5);\n\t\t\t$this->paises[43]=$arabia;\n\t\t\t$this->paises_asia[13]=$india= new Pais(\"India\",44,5);\n\t\t\t$this->paises[44]=$india;\n\t\t\t$this->paises_asia[14]=$malasia= new Pais(\"Malasia\",45,5);\n\t\t\t$this->paises[45]=$malasia;\n\t\t\t\n\t\t\t\t//Oceania\n\t\t\t$paises_oceania=array(4);\n\t\t\t$this->paises_oceania[0]=$sumatra= new Pais(\"Sumatra\",46,6);\n\t\t\t$this->paises[46]=$sumatra;\n\t\t\t$this->paises_oceania[1]=$australia= new Pais(\"Australia\",47,6);\n\t\t\t$this->paises[47]=$australia;\n\t\t\t$this->paises_oceania[2]=$borneo= new Pais(\"Borneo\",48,6);\n\t\t\t$this->paises[48]=$borneo;\n\t\t\t$this->paises_oceania[3]=$java= new Pais(\"Java\",49,6);\n\t\t\t$this->paises[49]=$java;\n\t\t\t\n\t\t\t\n\t\t\t\t//Creo Continentes\n\t\t\t$this->continentes=array(6);\t\n\t\t\t$this->continentes[0] = new Continente(\"America del norte\",1,5,$this->paises_america_norte);\n\t\t\t$this->continentes[1] = new Continente(\"America del sur\",2,3,$this->paises_america_sur);\n\t\t\t$this->continentes[2] = new Continente(\"Africa\",3,3,$this->paises_africa);\n\t\t\t$this->continentes[3] = new Continente(\"Europa\",4,5,$this->paises_europa);\n\t\t\t$this->continentes[4] = new Continente(\"Asia\",5,7,$this->paises_asia);\n\t\t\t$this->continentes[5] = new Continente(\"Oceania\",6,2,$this->paises_oceania);\t\n\t\t\t\n\t\t\t//Creo tarjetas\n\t\t\t$this->tarjetas=array(50);\n\t\t\t$this->tarjetas[0]=new Tarjeta(0,1,0);\n\t\t\t$this->tarjetas[1]=new Tarjeta(1,0,0);\n\t\t\t$this->tarjetas[2]=new Tarjeta(2,2,0);\n\t\t\t$this->tarjetas[3]=new Tarjeta(3,1,0);\n\t\t\t$this->tarjetas[4]=new Tarjeta(4,0,0);\n\t\t\t$this->tarjetas[5]=new Tarjeta(5,2,0);\n\t\t\t$this->tarjetas[6]=new Tarjeta(6,0,0);\n\t\t\t$this->tarjetas[7]=new Tarjeta(7,0,0);\n\t\t\t$this->tarjetas[8]=new Tarjeta(8,0,0);\n\t\t\t$this->tarjetas[9]=new Tarjeta(9,0,0);\n\t\t\t$this->tarjetas[10]=new Tarjeta(10,1,0);\n\t\t\t$this->tarjetas[11]=new Tarjeta(11,2,0);\n\t\t\t$this->tarjetas[12]=new Tarjeta(12,2,0);\n\t\t\t$this->tarjetas[13]=new Tarjeta(13,1,0);\n\t\t\t$this->tarjetas[14]=new Tarjeta(14,3,0);\n\t\t\t$this->tarjetas[15]=new Tarjeta(15,1,0);\n\t\t\t$this->tarjetas[16]=new Tarjeta(16,0,0);\n\t\t\t$this->tarjetas[17]=new Tarjeta(17,1,0);\n\t\t\t$this->tarjetas[18]=new Tarjeta(18,1,0);\n\t\t\t$this->tarjetas[19]=new Tarjeta(19,2,0);\n\t\t\t$this->tarjetas[20]=new Tarjeta(20,0,0);\n\t\t\t$this->tarjetas[21]=new Tarjeta(21,2,0);\n\t\t\t$this->tarjetas[22]=new Tarjeta(22,2,0);\n\t\t\t$this->tarjetas[23]=new Tarjeta(23,2,0);\n\t\t\t$this->tarjetas[24]=new Tarjeta(24,2,0);\n\t\t\t$this->tarjetas[25]=new Tarjeta(25,1,0);\n\t\t\t$this->tarjetas[26]=new Tarjeta(26,0,0);\n\t\t\t$this->tarjetas[27]=new Tarjeta(27,2,0);\n\t\t\t$this->tarjetas[28]=new Tarjeta(28,1,0);\n\t\t\t$this->tarjetas[29]=new Tarjeta(29,1,0);\n\t\t\t$this->tarjetas[30]=new Tarjeta(30,1,0);\n\t\t\t$this->tarjetas[31]=new Tarjeta(31,0,0);\n\t\t\t$this->tarjetas[32]=new Tarjeta(32,0,0);\n\t\t\t$this->tarjetas[33]=new Tarjeta(33,3,0);\n\t\t\t$this->tarjetas[34]=new Tarjeta(34,2,0);\n\t\t\t$this->tarjetas[35]=new Tarjeta(35,1,0);\n\t\t\t$this->tarjetas[36]=new Tarjeta(36,0,0);\n\t\t\t$this->tarjetas[37]=new Tarjeta(37,1,0);\n\t\t\t$this->tarjetas[38]=new Tarjeta(38,2,0);\n\t\t\t$this->tarjetas[39]=new Tarjeta(39,2,0);\n\t\t\t$this->tarjetas[40]=new Tarjeta(40,1,0);\n\t\t\t$this->tarjetas[41]=new Tarjeta(41,2,0);\n\t\t\t$this->tarjetas[42]=new Tarjeta(42,2,0);\n\t\t\t$this->tarjetas[43]=new Tarjeta(43,0,0);\n\t\t\t$this->tarjetas[44]=new Tarjeta(44,1,0);\n\t\t\t$this->tarjetas[45]=new Tarjeta(45,0,0);\n\t\t\t$this->tarjetas[46]=new Tarjeta(46,1,0);\n\t\t\t$this->tarjetas[47]=new Tarjeta(47,0,0);\n\t\t\t$this->tarjetas[48]=new Tarjeta(48,2,0);\n\t\t\t$this->tarjetas[49]=new Tarjeta(49,0,0);\n\t\t\t\n\t\t\t\n\t\t\t//Creo objetivos\n\t\t\t//$id, $america_norte,$america_sur,$europa,$africa,$asia,$oceania,$color\n\t\t\t//si hay un 1 es que tiene que hacer continente, menos en el ultimo valor que corresponde al color\n\t\t\t$this->objetivos= array(13);\n\t\t\t$this->objetivos[0] = new Objetivo(0,1,0,0,0,4,2,0);\n\t\t\t$this->objetivos[1] = new Objetivo(1,0,0,0,0,0,0,6);\n\t\t\t$this->objetivos[2] = new Objetivo(2,0,0,0,0,0,0,2);\n\t\t\t$this->objetivos[3] = new Objetivo(3,0,0,0,0,0,0,1);\n\t\t\t$this->objetivos[4] = new Objetivo(4,0,2,0,0,1,0,0);\n\t\t\t$this->objetivos[5] = new Objetivo(5,0,1,0,1,4,0,0);\n\t\t\t$this->objetivos[6] = new Objetivo(6,1,0,2,0,0,1,0);\n\t\t\t$this->objetivos[7] = new Objetivo(7,4,2,3,2,3,2,0);\n\t\t\t$this->objetivos[8] = new Objetivo(8,5,0,0,1,0,1,0);\n\t\t\t$this->objetivos[9] = new Objetivo(9,0,2,1,0,4,0,0);\n\t\t\t$this->objetivos[10]= new Objetivo(10,0,0,0,0,0,0,3);\n\t\t\t$this->objetivos[11]= new Objetivo(11,0,0,0,0,0,0,4);\n\t\t\t$this->objetivos[12]= new Objetivo(12,0,0,0,0,0,0,5);\n\t\t}",
"function __construct() { \n\t\t\t$this->id_contrato;\n\t\t\t$this->id_contratante;\n\t\t\t$this->id_avalista;\n\t\t\t$this->id_empresa;\n\t\t\t$this->dt_contrato;\n\t\t\t$this->valor_contrato;\n\t\t\t$this->pacote_contrato;\n\t\t\t$this->numero_contrato;\n\t\t\t\n\t\t\t\n\t\t}",
"function consultarCurso(){\n $oConexion= new conectar();\n //se establece conexión con la base de datos\n $conexion=$oConexion->conexion();\n //consulta para retornar un solo registro\n $sql=\"SELECT * FROM cursos c LEFT JOIN profesores p ON c.idProfesor=p.id WHERE c.id=$this->id\";\n //se ejecuta la consulta\n $result=mysqli_query($conexion,$sql);\n $result=mysqli_fetch_all($result,MYSQLI_ASSOC);\n foreach($result as $registro){\n //se registra la consulta en los parametros\n $this->nombreCurso=$registro['curso'];\n $this->idProfesor=$registro['idProfesor'];\n $this->nombreProfesor=$registro['nombre'].\" \".$registro['apellido'];\n $this->fechaInicio=$registro['fechaInicio'];\n $this->fechaFin=$registro['fechaFin'];\n }\n }",
"public function consulta(){\n $dal = new \\App\\Models\\DAL\\Cadastropermissoes();\n $combo = new Cadastroperfilusuario();\n $dados['1'] = $dal->consulta();\n $dados['2'] = $combo->consulta();\n return $dados; \n }",
"public function campos_query()\n {\n\n $x = 0;\n\n while ($finfo = mysqli_fetch_field($this->result)) {\n\n $resultado[$x] = $finfo->name;\n $x++;\n }\n\n return $resultado;\n\n }",
"private function montaLista(){\r\n\t\t\t$this->sql = \"SELECT \" . $this->campos . \" FROM `\" . $this->tabela . \"` \" . $this->joinTabela . \" WHERE 1=1 \" . $this->criterio . $this->ordem . $this->grupo . $this->limite;\r\n\t\t}",
"public function __construct()\n {\n //parent::__construct();\n try {\n\n\n \n $dao = new Cdao();\n\n $query = 'SELECT id,idVisiteur,mois,libelle,date,montant from lignefraishorsforfait';\n\n $lesObjetsFHF = $dao->getTabObjetFromSql($query,'CligneFraisFHF'); //le deuxieme parametre est le type d'ojet qui sera créé\n\n $this->ocollFHFById = array();\n \n\n foreach ($lesObjetsFHF as $oFHF) {\n\n \n $this->ocollFHFById[$oFHF->id] = $oFHF;\n \n \n }\n \n // objet odao meurt de toutes façons à la fin du try puisque instancié dedans\n unset($dao); \n\n \n\n }\n catch(PDOException $e) {\n $msg = 'ERREUR PDO dans ' . $e->getFile() . ' L.' . $e->getLine() . ' : ' . $e->getMessage();\n die($msg);\n }\n \n\n }",
"public function cargando_datos_form_2(){\n //donde las posiciones del arreglo representan los campos del \n //formulario ( cajas de texto, selects, textarea, checks, radios, etc )\n //dichos campos tienen los atributos name de la siguiente manera:\n //<input name=\"form[nombres]\" ... />\n //<select name=\"form[sexo]\" ... />, etc.\n $this->form['nombres'] = 'Manuel Aguirre';\n $this->form['edad'] = 23;\n $this->form['sexo'] = 'M';\n \n $this->otro_form = array(\n 'nombres' => 'Carmen Maria',\n 'edad' => 30,\n 'sexo' => 'F'\n );\n }",
"public function __construct($tabela){\r\n\t\t\t$this->tabela = $tabela;\r\n\t\t\tparent::__construct();\r\n\t\t\t$this->sql = \"\";\r\n\t\t\t$this->campos = \"\";\r\n\t\t\t$this->criterio = \"\";\r\n\t\t\t$this->limite = \"\";\r\n\t\t\t$this->joinTabela = \"\";\r\n\t\t\t$this->ordem = \"\";\r\n\t\t\t$this->grupo = \"\";\r\n\t\t}",
"function get_entry_datos_fields($entry) {\n\t\t$form_id = $entry->forms_id;\n\t\t$entry_id = $entry->entry_id;\n\t\t\n\t\t//Obtenemos el form al cual pertenece la entrada\n\t\t$form = $this->get_form_by_id($form_id);\n\t\t$grupo_fields_id = $form->grupos_fields_id;\n\t\t\n\t\t//Obtenemos el conjunto de fields asociados al grupo de fields\n\t\t$fields = $this->get_fields_grupo_fields($grupo_fields_id);\n\t\t\n\t\tif( !is_null($fields) ) {\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t//Buscamos los campos custom para el formulario\n\t\t\t\tif($f = in_object(\"field_id_\" . $field['fields_id'], $entry)) {\n\t\t\t\t\t$campos[$f]['atributos'] = array(\n\t\t\t\t\t\t'value' => $entry->$f,\n\t\t\t\t 'class' => 'text span5',\n\t\t\t\t 'id' => $entry->$f\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Seteamos los campos comunes a todos los forms\n\t\t$campos['titulo']['atributos'] = array(\n\t\t\t\t\t'value' => $entry->titulo,\n\t\t\t 'class' => 'text span5',\n\t\t\t 'id' => 'titulo'\n\t\t);\n\t\t\n\t\tif(isset($campos)) {\n\t\t\treturn $campos;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}",
"function leerParametros(&$campos,$porDefecto) {\n $keys=array_keys($campos);\n for ($i=0;$i<count($keys);$i++) {\n if (array_key_exists ( $keys[$i], $porDefecto )) {\n $campos[$keys[$i]]=leerParametro($keys[$i],$porDefecto[$keys[$i]]);\n } else {\n $campos[$keys[$i]]=leerParametro($keys[$i]);\n }\n }\n}",
"public function generarCamposFijos($datos=array())\n {\n foreach ($datos as $key => $value)\n {\n if (strpos($key, 'campoDesc') === 0)\n {\n array_push($this -> camposDesc, $value);\n }\n elseif(strpos($key, 'campoCant') === 0)\n {\n array_push($this -> camposCant, $value);\n }\n elseif(strpos($key, 'campoPrecio') === 0)\n {\n $value = substr($value, 3);\n array_push($this -> camposPrecio, $value);\n }\n }\n }",
"function CabeceraListadoInmueblesAsociados()\n\t{\n\t\t// Obtenemos la gama de colores a usar\n\t\t$gama_colores=InformesFichasVisitaClientesPDF::ObtenerGamaColores($this->color);\t\t\n\t\n\t\t$this->pdf->SetFont('Arial','B',$this->tam_letra);\n\t\t$this->pdf->SetFillColor($gama_colores['cabecera2'][0], $gama_colores['cabecera2'][1], $gama_colores['cabecera2'][2]);\n\t\t$this->pdf->SetWidths(array(15,30,65));\n\t\t$this->pdf->SetAligns(array(\"C\",\"C\",\"C\"));\n\n\t\tif(!is_null($this->pos_x))\n\t\t\t$this->pdf->SetX($this->pos_x);\n\t\t$this->pdf->Row(array(\"HORA\",\"MUNICIPIO\",\"DIRECCIÓN\"),true);\t\t\t\t\t\n\t}",
"public function SelectPassageiros($idViagem){\n \n $sql =\" SELECT * FROM passagem_view WHERE idViagem = $idViagem \";\n \n// concat_ws(cid.nomeCidade, des.nomeCidade)\n $conex = new Mysql_db();\n \n // Chama o metodo para conectar no BD, e guarda o retorno da conexão na variavel $PDO_conex.\n $POD_conex = $conex->Conectar();\n \n // Executa o select no BD e guarda o retorno na variavel $select.\n $select = $POD_conex->query($sql);\n \n $cont = 0;\n \n while($rs = $select->fetch(PDO::FETCH_ASSOC)){\n \n // Cria um array de objetos da classe Contato.\n $listPassageiros1[] = new Passagem();\n \n// Guarda os dados de BD em cada indice do objeto criado.\n $listPassageiros1[$cont]->idViagem= $rs['idViagem'];\n $listPassageiros1[$cont]->destino= $rs['destinos'];\n $listPassageiros1[$cont]->dataEmbarque= $rs['dataEmbarque'];\n $listPassageiros1[$cont]->horaEmbarque= $rs['horaEmbarque'];\n $listPassageiros1[$cont]->tipoOnibus= $rs['tipoOnibus'];\n $listPassageiros1[$cont]->idPassagem= $rs['idPassagem'];\n $listPassageiros1[$cont]->idCliente= $rs['idCliente'];\n $listPassageiros1[$cont]->nomeCompleto= $rs['nomeCompleto'];\n $listPassageiros1[$cont]->rg= $rs['rg'];\n $listPassageiros1[$cont]->telefone= $rs['telefone'];\n $listPassageiros1[$cont]->email= $rs['email'];\n \n \n// var_dump($listPassageiros1[$cont]);\n \n $cont+=1;\n }\n \n $conex->Desconectar();\n \n // Apenas retorna o listContatos se existir dados no BD.\n if(isset($listPassageiros1)){\n return $listPassageiros1;\n }\n \n }",
"protected function agregarRelaciones() {\n //Por defecto, todas las relaciones se realizan, a menos que:\n //- Se invoque modelo::omitirRelaciones()\n //- El campo relacional presente @omitir (o @simple en el caso de operaciones de inserción/actualización)\n //- Si el campo relacional presenta @siempre, o es invocado modelo::forzarRelaciones(campo), la realación se\n // procesará de todos modos\n\n foreach($this->campos as $campo) {\n if(!$campo->relacional||$campo->relacion=='1:n') continue;\n\n $siempre=$campo->siempre||in_array($campo->nombre,$this->configForzarRelaciones);\n $omitir=!$this->configProcesarRelaciones||$campo->omitir||($campo->oculto&&!$this->configObtenerOcultos);\n\n if($omitir&&!$siempre) continue;\n\n $modelo=$this->fabricarModeloCampo($campo);\n\n if($campo->alias) {\n $alias=$campo->alias;\n } else {\n $alias=++$this->contadorAlias;\n $alias='t'.$alias;\n }\n $modelo->establecerAlias($alias);\n\n if($campo->relacion=='1:1') {\n $tipo=self::relacion11;\n } elseif($campo->relacion=='1:0') {\n $tipo=self::relacion10;\n } else {\n $tipo=self::relacion1N;\n }\n\n $campoLocal=$campo->campo;\n $campoForaneo='id';\n if($campo->campoforaneo) {\n $campoLocal='id';\n $campoForaneo=$campo->campoforaneo;\n }\n \n $this->agregarRelacion($tipo,$modelo,$alias,$campoLocal,$campoForaneo);\n\n $this->relaciones[]=(object)[\n 'modelo'=>$modelo,\n 'campo'=>$campo->nombre\n ];\n }\n\n return $this;\n }",
"public function __construct(){\n // initialization des listes\n $this->listeCommentaires = array();\n $this->listeCategories = array();\n $cpt= func_num_args();\n $args= func_get_args();\n switch($cpt){\n case 2: // la proposition existe deja\n $co = $args[0];\n $id = $args[1];\n\n $result = mysqli_query($co, \"SELECT * FROM Proposition\n WHERE `proposition_id` = '$id'\")\n or die;\n \n if(mysqli_num_rows($result)==0) throw new Exception(); // si aucun resultat, lancer exeption\n\n while($row = mysqli_fetch_assoc($result)){\n $this->co = $co;\n $this->id = $id;\n $this->titre = $row['titre'];\n $this->description = $row['description'];\n $this->number_reports = $row['number_reports'];\n $this->votes_positives = $row['votes_positives'];\n $this->votes_negatives = $row['votes_negatives'];\n $this->votes_total = $row['votes_total'];\n $this->dateCreationProposition = $row['date_creation_proposition'];\n $this->datePropositionTroisJours = $row['date_suppression_proposition'];\n $this->idCreateurProposition = $row['identifiant_user'];\n }\n break;\n case 5:\n $co = $args[0];\n $titre = $args[1];\n $description = $args[2];\n $idCreateurProposition = $args[3];\n $listeIdCat = $args[4];\n \n\n \n mysqli_query($co, \"INSERT INTO `Proposition` (`titre`, `description`, `number_reports`, `votes_positives`, \n `votes_negatives`,`votes_total`, `date_creation_proposition`, identifiant_user) \n VALUES('$titre','$description',0,0,0,0,CURRENT_TIMESTAMP,'$idCreateurProposition')\")\n or die(\"Erreur insertion\".mysqli_error($co));\n\n $this->co = $co;\n $this->id = mysqli_insert_id($co);\n $this->titre = $titre;\n $this->description = $description;\n $this->number_reports = 0;\n $this->votes_positives = 0;\n $this->votes_negatives = 0;\n $this->votes_total = 0;\n $this->dateCreationProposition = new Datetime();\n $this->idCreateurProposition = $idCreateurProposition;\n $this->datePropositionTroisJours = strtotime($dateCreationProposition . ' +3 days');\n\n\n foreach($listeIdCat as $idCat){\n array_push($this->listeCategories, new Categorie($this->co, $idCat));\n \n mysqli_query($co, \"INSERT INTO `est` (`proposition_id`, `categorie_id`)\n VALUES('$this->id','$idCat')\") or die;\n }\n break;\n \n \n case 4:\n $co = $args[0];\n $titre = $args[1];\n $description = $args[2];\n $idCreateurProposition = $args[3];\n $dateCreationProposition = new Datetime();\n $datePropositionTroisJours = date_add($dateCreationProposition, date_interval_create_from_date_string('3 days'));\n \n\n mysqli_query($co, \"INSERT INTO `Proposition` (`titre`, `description`, `number_reports`, `votes_positives`, \n `votes_negatives`,`votes_total`, `date_creation_proposition`, identifiant_user) \n VALUES('$titre','$description',0,0,0,0,CURRENT_TIMESTAMP,'$idCreateurProposition')\")\n or die(\"Erreur insertion\".mysqli_error($co));\n \n $this->co = $co;\n $this->id = mysqli_insert_id($co);\n $this->titre = $titre;\n $this->description = $description;\n $this->number_reports = 0;\n $this->votes_positives = 0;\n $this->votes_negatives = 0;\n $this->votes_total = 0;\n $this->dateCreationProposition = $dateCreationProposition;\n $this->datePropositionTroisJours = $datePropositionTroisJours;\n $this->idCreateurProposition = $idCreateurProposition;\n break;\n \n case 10:\n $this->co = $args[0];\n $this->id = $args[1];\n $this->titre = $args[2];\n $this->description = $args[3];\n $this->number_reports = $args[4];\n $this->votes_positives = $args[5];\n $this->votes_negatives = $args[6];\n $this->votes_total = $args[7];\n $this->dateCreationProposition = $args[8];\n $this->idCreateurProposition = $args[9];\n \n break;\n defaut: \n echo \"<script>console.log('hey buddy, wrong number of arguments when creating Proposition object')</script>\";\n }\n }"
] | [
"0.6700629",
"0.6357784",
"0.628126",
"0.6278832",
"0.6258937",
"0.62114406",
"0.6106136",
"0.6070224",
"0.60598516",
"0.6056903",
"0.6025277",
"0.59861046",
"0.5969099",
"0.5966228",
"0.5928365",
"0.5905112",
"0.59040475",
"0.59037447",
"0.5879645",
"0.58730453",
"0.5871488",
"0.58398056",
"0.58140296",
"0.58087015",
"0.5806707",
"0.5802663",
"0.5799022",
"0.5790136",
"0.5784127",
"0.57732767"
] | 0.68547004 | 0 |
Assert the current page using the progress bar's markup. | protected function assertCurrentPage($title, $page) {
$this->assertPattern('|<li data-webform-page="' . $page . '" class="webform-progress-bar__page webform-progress-bar__page--current">\s+<b>' . $title . '</b>|');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_Progressmeter_Renders()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Voortgangsmeter');\n });\n }",
"function test_pageinfo(){\n global $ID,$conf;\n $ID = 'wiki:start';\n\n $info = $this->_get_info();\n $info['id'] = 'wiki:start';\n $info['namespace'] = 'wiki';\n $info['rev'] = null;\n $info['subscribed'] = false;\n $info['locked'] = false;\n $info['filepath'] = $conf['datadir'].'/wiki/start.txt';\n $info['exists'] = false;\n $info['writable'] = true;\n $info['editable'] = true;\n $info['lastmod'] = false;\n $info['meta'] = array();\n $info['ip'] = null;\n $info['user'] = null;\n $info['sum'] = null;\n $info['editor'] = null;\n\n // basic test, no revision\n $this->assertEquals(pageinfo(),$info);\n\n // TODO: test with revision = current page\n\n // TODO: test with true revision\n\n // TODO: test with revision & range\n\n // TODO: validate against the same test run on master branch pre this change\n }",
"public function testExhibitBuilderPageTextWhenExhibitPageIsNotSpecified()\n {\n $exhibitPage = get_current_record('exhibit_page');\n $this->assertTrue($exhibitPage->exists());\n\n set_current_record('exhibit_page', $exhibitPage);\n for($i = 1; $i <= $this->maxExhibitPageEntries; $i++) {\n $this->assertEquals('Exhibit Page Entry '.$i, exhibit_builder_page_text($i));\n }\n }",
"public function testValueOnPage()\n {\n $this->makeData(10);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin')\n ->clickLink('Home Page')\n ->assertSee('Categories')\n ->assertSee('Places')\n ->assertSee('News')\n ->assertSee('Booking Rooms')\n ->assertSee('Hotels')\n ->assertSee('Users')\n ->assertSeeIn('.small-box .inner h3', '10');\n });\n }",
"function testPageNumbers() {\n $this->mods->pages = 133;\n $this->assertEqual(133, $this->mods->pages);\n // but should be stored in the xml with page abbreviation\n $this->assertPattern('|<mods:extent>133 p.</mods:extent>|', $this->mods->saveXML());\n \n }",
"private function testDisplayRequestedPage(){\n $this->url = 'homeadmin';\n $this->dispatcher->displayRequestedPage($this->url);\n if(!assert($this->dispatcher->getHtml() === file_get_contents('../../view/src/admin/home.template.html'))){\n parent::addError(\"testDisplayRequestedPage failed!\");\n }\n }",
"public function testExhibitBuilderPageTextWhenExhibitPageIsSpecified()\n {\n $exhibitPage = get_current_record('exhibit_page');\n $this->assertTrue($exhibitPage->exists());\n\n for($i = 1; $i <= $this->maxExhibitPageEntries; $i++) {\n $this->assertEquals('Exhibit Page Entry '.$i, exhibit_builder_page_text($i, $exhibitPage));\n }\n }",
"public function testdisplay()\n {\n $myBreadcrumb = new Breadcrumb();\n $myBreadcrumb->addLink('#','link','0');\n $myBreadcrumb->addLink('#','link 2','1');\n $result = $myBreadcrumb->render('html');\n\n $expectedResult= '<ol class=\" breadcrumb \" ><li><a href=\"#\">link</a></li><li class=\"active\"><a href=\"#\">link 2</a></li> </ol>';\n \n // assert that the badge displays correctly\n $this->assertEquals($expectedResult, trim($result));\n }",
"protected function verifyPage()\n {\n }",
"protected function verifyPage()\n {\n }",
"public function test_Howto_PageLoadsCorrectly()\n {\n $response = $this->get('/how-to');\n $response->assertSee('A comprehensive guide for the website');\n\n $response->assertStatus(200);\n }",
"public function testHasPage() {\n $this->assertEquals(1, $this->lists->page());\n }",
"public function testGetKeokPrintingPageData()\n {\n }",
"public function assert(Browser $browser)\n {\n $browser->pause(500);\n\n $browser->assertVisible($this->selector());\n }",
"public function testGetPercentageSaved()\n {\n $this->_instance->setBytesBefore(500);\n $this->_instance->setBytesAfter(400);\n\n $this->assertEquals('20 %', $this->_instance->getPercentageSaved());\n\n $this->_instance->setBytesBefore(500);\n $this->_instance->setBytesAfter(500);\n\n $this->assertEquals('0 %', $this->_instance->getPercentageSaved());\n }",
"public function testGetPageGoodUrl()\n {\n $this->mock->append(new Response(200, [], $this->html));\n\n $page = PageRequest::getPage($this->client, new Uri($this->url));\n $this->assertSame($this->html, $page->html);\n $this->assertSame($this->url, $page->url);\n }",
"public function assert(Browser $browser)\n {\n $browser->assertVisible($this->selector());\n }",
"public function assert(Browser $browser)\n {\n $browser->assertVisible($this->selector());\n }",
"public function assert(Browser $browser)\n {\n $browser->assertVisible($this->selector());\n }",
"public function testGetIndexPage() {\n $row = $this->getRow();\n\n // Check when it is an index page.\n $this->assertEquals('Y', $this->termManagerExport->getIndexPage($row));\n\n // Check when it isn't an index page.\n $row->index_page = '';\n $this->assertEquals('N', $this->termManagerExport->getIndexPage($row));\n }",
"public function testTabs()\n\t{\n\t\t//Lists converted to astericks\n\t\t//Line breaks removed\n\t\tob_start();\n\t\tinclude( 'fixtures/Tabs-2.md' );\n\t\t$md = ob_get_contents();\n\t\tob_end_clean();\n\t\n\t\n\t\tob_start();\n\t\tinclude( 'fixtures/Tabs.html' );\n\t\t$html = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\t$this->assertEquals( trim( $md ), wpmarkdown_html_to_markdown( $html ) );\n\t}",
"protected function assertPageTitle($title) {\n $title_element = $this->xpath('//h1[contains(@class, \"page-title\")]');\n if (isset($title_element[0])) {\n $this->assertEquals($title, trim(strip_tags($title_element[0]->getHtml(), '<em>')));\n }\n else {\n $this->fail('Page title was not found.');\n }\n }",
"public function testWorkingWithIcons(): void\n {\n Assert::equalsWithoutLE(\n <<<HTML\n <nav aria-label=\"Pagination\">\n <ul class=\"pagination\">\n <li class=\"page-item\"><a class=\"page-link disabled\" href=\"/admin/manage?page=1&pagesize=1\"><span aria-hidden=\"true\"><i>«</i></span></a></li>\n <li class=\"page-item\"><a class=\"page-link active\" href=\"/admin/manage?page=1&pagesize=1\" aria-current=\"page\">1</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=2&pagesize=1\">2</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=3&pagesize=1\">3</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=4&pagesize=1\">4</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=5&pagesize=1\">5</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=2&pagesize=1\"><span aria-hidden=\"true\"><i>»</i></span></a></li>\n </ul>\n </nav>\n HTML,\n OffsetPagination::widget()\n ->iconNextPage('»')\n ->iconPreviousPage('«')\n ->paginator($this->createOffsetPaginator($this->data, 1))\n ->urlArguments([])\n ->render(),\n );\n\n Assert::equalsWithoutLE(\n <<<HTML\n <nav aria-label=\"Pagination\">\n <ul class=\"pagination\">\n <li class=\"page-item\"><a class=\"page-link disabled\" href=\"/admin/manage?page=1&pagesize=1\"><span aria-hidden=\"true\"><i class=\"bi bi-chevron-double-left p-1\"></i></span></a></li>\n <li class=\"page-item\"><a class=\"page-link active\" href=\"/admin/manage?page=1&pagesize=1\" aria-current=\"page\">1</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=2&pagesize=1\">2</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=3&pagesize=1\">3</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=4&pagesize=1\">4</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=5&pagesize=1\">5</a></li>\n <li class=\"page-item\"><a class=\"page-link\" href=\"/admin/manage?page=2&pagesize=1\"><span aria-hidden=\"true\"><i class=\"bi bi-chevron-double-right p-1\"></i></span></a></li>\n </ul>\n </nav>\n HTML,\n OffsetPagination::widget()\n ->iconClassNextPage('bi bi-chevron-double-right p-1')\n ->iconClassPreviousPage('bi bi-chevron-double-left p-1')\n ->paginator($this->createOffsetPaginator($this->data, 1))\n ->urlArguments([])\n ->render(),\n );\n }",
"public function testHomePageSeeText()\n {\n $response = $this->get('/');\n\n $response->assertSeeText(\"Home Page\");\n $response->assertSeeText(\"This is the content of the main page!\");\n }",
"public function testReturnContentIsCorrect()\n {\n $this->assertNotEmpty($this->pageParser->getContent()[1]);\n }",
"protected function _afterOnLoadAssertions() {\n\t\t$this->test->assertEquals('Viewing your data', $this->_byMap('header')->text());\n\t}",
"public function testBook()\n {\n // #todo #cathat #implement test for individual book page\n // #todo #cathat #implement test for individual book page\n $this->assertTrue(true);\n }",
"public function test_page_load()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new SignUpPage)\n ->waitForText('Your journey starts here')\n ->assertSee('Your journey starts here');\n });\n }",
"public function testMarkup()\n {\n\n $this->dispatch('solr-search/results');\n\n // Highlighting:\n $this->assertXpath(\n '//input\n [@name=\"solr_search_hl\"]\n [@value=\"'. get_option('solr_search_hl') . '\"]\n [@checked=\"checked\"]'\n );\n\n // Snippets:\n $this->assertXpath(\n '//input\n [@name=\"solr_search_hl_snippets\"]\n [@value=\"' . get_option('solr_search_hl_snippets') . '\"]'\n );\n\n // Snippet size:\n $this->assertXpath(\n '//input\n [@name=\"solr_search_hl_fragsize\"]\n [@value=\"' . get_option('solr_search_hl_fragsize') . '\"]'\n );\n\n // Facet sort:\n $this->assertXpath(\n '//select\n [@name=\"solr_search_facet_sort\"]\n /option\n [@value=\"'. get_option('solr_search_facet_sort') . '\"]\n [@selected=\"selected\"]'\n );\n\n // Facet count:\n $this->assertXpath(\n '//input\n [@name=\"solr_search_facet_limit\"]\n [@value=\"'. get_option('solr_search_facet_limit') . '\"]'\n );\n\n }",
"public function test_bug_191()\n\t{\n\t\t$expected = <<<EOD\nFirst line\n\nSecond line\n\nThird line\nEOD;\n\t\t$doc = 'First line<p>Second line</p>Third line';\n\t\t$this->html->load($doc);\n\t\t$this->assertEquals($expected, $this->html->root->text());\n\t}"
] | [
"0.6162968",
"0.5880964",
"0.58442533",
"0.58414775",
"0.5822826",
"0.57362413",
"0.5699969",
"0.5594068",
"0.5513509",
"0.5513509",
"0.54664475",
"0.5463214",
"0.5461238",
"0.5460677",
"0.543445",
"0.53577286",
"0.5330071",
"0.5330071",
"0.5330071",
"0.53112096",
"0.5293831",
"0.52860796",
"0.52851015",
"0.52821064",
"0.52615345",
"0.5235403",
"0.5220129",
"0.5206008",
"0.5203359",
"0.5155655"
] | 0.64860237 | 0 |
List all page by title & id | public function listAll()
{
return $this->page->get()->pluck('title', 'id')->all();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPage($id)\n\t{\n $data['page'] = $this->pageOperator->getPage($id);\n\n // Get the title of the url\n $temp = $data['page']->title;\n\n // prepare the title array for from to fetch\n foreach($temp as $element){\n $data['title'][$element->lang_id] = $element->title;\n }\n\t\treturn $data;\n\t}",
"function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }",
"public function getListPage()\n {\n return $this->find()->select(['id', 'title', 'slug'])->enableHydration(false)\n ->where(['Pages.status' => ACTIVE])->toArray();\n }",
"public function findAll()\n {\n $sql = \"SELECT \n `id`,\n `slug`, \n `title` \n FROM \n `page`\n \";\n $stmt = $this->PDO->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(\\PDO::FETCH_OBJ);\n }",
"public function web_page_by_id(){\n\t\t$postData = $this->request->input('json_decode',true);\n\t\t$this->WebPage->tablePrefix = $postData['tablePrefix'];\n\t\t$this->WebPage->WebPageDetail->tablePrefix = $postData['tablePrefix'];\n\t\t$data = $this->WebPage->find('first',array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'slug' => $postData['slug']\n\t\t\t)\n\t\t));\n\t\t$this->set(\n\t\t\t\tarray(\n\t\t\t\t\t'_serialize',\n\t\t\t\t\t'data' => array('singlePage'=>$data),\n\t\t\t\t\t'_jsonp' => true\n\t\t\t\t)\n\t\t);\n\t\t$this->render('data_layout');\n\t}",
"function dbem_get_all_pages() {\r\n\tglobal $wpdb;\r\n\t$query = \"SELECT id, post_title FROM \" . $wpdb->prefix . \"posts WHERE post_type = 'page';\";\r\n\t$pages = $wpdb->get_results ( $query, ARRAY_A );\r\n\t$output = array ();\r\n\tforeach ( $pages as $page ) {\r\n\t\t$output [$page ['id']] = $page ['post_title'];\r\n\t}\r\n\treturn $output;\r\n}",
"function page($title) {\n $this->type = \"page\";\n $this->setID();\n $this->setTitle($title);\n $this->initDocDate();\n $this->setMonthDir();\n }",
"public function getPages();",
"public static function getAll() {\n\t\t$liste = DB::getInstance()->query('SELECT id_page AS id, title, slug, id_user_creator AS creator, id_template AS template\n \t\t FROM page ;', [], DB::FETCH_ALL);\n\t\t$pages = [];\n\t\tforeach ( $liste as $page ) {\n\t\t\t$pages[$page['id']] = new Page();\n\t\t\t$pages[$page['id']]->set($page);\n\n\t\t}\n\t\treturn $pages;\n\t}",
"public function getPage($pageId);",
"public function showTitelId($id)\n {\n $sql = \"SELECT id, title FROM content WHERE id = ?;\";\n $res = $this->contentDB->executeFetch($sql, [$id]);\n return $res;\n }",
"public function getPage($id) {\n $this->db->query('SELECT * FROM tbl_page WHERE PAGEID = :id');\n $this->db->bind(\":id\", $id);\n return $this->db->resultSet();\n }",
"public function getPage();",
"public function getPage();",
"public function getPage();",
"public function pages()\n\t{\n\t\tinclude_once(\"class.page.php\");\n\t\tglobal $db;\n\t\t$pages = Array();\n\t\tif($result = $db->query(\"SELECT \".$db->getPrefix().\"module_pages.id, s_page, s_description FROM\n\t\t\t\".$db->getPrefix().\"module_pages, \".$db->getPrefix().\"tpl_show_pages\n\t\t\tWHERE\n\t\t\t\".$db->getPrefix().\"module_pages.id=\".$db->getPrefix().\"tpl_show_pages.id_page\n\t\t\tAND \".$this->id.\"=\".$db->getPrefix().\"tpl_show_pages.id_section\n\t\t\tORDER BY \".$db->getPrefix().\"tpl_show_pages.i_sort;\"))\n\t\t{\n\t\t\twhile( $line = mysql_fetch_array( $result ) )\n\t\t\t{\n\t\t\t\t$pages[$line[1]] = new Page($line[0], $line[1], $line[2]);\n\t\t\t}\n\t\t}\n\t\treturn $pages;\n\t}",
"function get_pages_by_id($link, $id, $vis){\r\n\t\t$query_string = \"SELECT * FROM pages\";\r\n\t\t$query_string .= \" WHERE subjects_id = {$id}\";\r\n\r\n\t\t//Test if visible\r\n\t\tif($vis){\r\n\t\t\t$query_string .= \" AND visible = 1\";\r\n\t\t}\r\n\t\t\r\n\t\t$query_string .= \" ORDER BY position ASC\";\r\n\t\t//$query_string .= \" LIMIT 1\";\r\n\t\t$page_set = mysqli_query($link, $query_string);\r\n\t\tconfirm_connection($page_set, \"Pages ID query was not successful.\", $link);\r\n\t\treturn $page_set;\r\n\t}",
"function getpages(){\n \t\n }",
"public function display_post_by_title($id, $title){\n $this->db->where('id', $id);\n $query = $this->db->get('tbl_post')->result();\n return $query;\n }",
"public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }",
"function viewListing()\n\t{\n\t\tglobal $modx;\n\n\t\t$this_page = $this->current . '?a=' . $this->a . '&id=' . $this->id;\n\n\t\t$tplparams = array();\n\n\t\t$parentId = isset($_GET['content_id']) ? intval($_GET['content_id']) : $this->config['docId'];\n\n\t\t// Get search filter values\n\t\t$filter = '';\n\t\tif (isset($_GET['query']))\n\t\t{\n\t\t\t$search = $modx->db->escape($modx->stripTags($_GET['query']));\n\t\t\t$filter .= \"WHERE (\";\n\t\t\t$filter .= \"c.pagetitle LIKE '%\" . $search . \"%' OR \";\n\t\t\t$filter .= \"c.longtitle LIKE '%\" . $search . \"%' OR \";\n\t\t\t$filter .= \"c.description LIKE '%\" . $search . \"%' OR \";\n\t\t\t$filter .= \"c.introtext LIKE '%\" . $search . \"%' OR \";\n\t\t\t$filter .= \"c.content LIKE '%\" . $search . \"%' OR \";\n\t\t\t$filter .= \"c.alias LIKE '%\" . $search . \"%'\";\n\t\t\t$filter .= \")\";\n\t\t\t$header = $this->header($this->lang['search_results']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$filter = \"WHERE c.parent = '\" . $parentId . \"'\";\n\t\t\t$header = $this->header();\n\t\t}\n\n\t\t$_GET['orderby'] = isset($_GET['orderby']) ? $_GET['orderby'] : 'c.menuindex';\n\t\t$_GET['orderdir'] = isset($_GET['orderdir']) ? $_GET['orderdir'] : 'ASC';\n\n\t\t// Check for number of records per page preferences and define global setting\n\t\tif (is_numeric($_GET['pageSize']))\n\t\t{\n\t\t\tsetcookie(\"pageSize\", $_GET['pageSize'], time() + 3600000);\n\t\t\t$maxPageSize = $_GET['pageSize'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_numeric($_COOKIE['pageSize']))\n\t\t\t\t$maxPageSize = $_COOKIE['pageSize'];\n\t\t\telse\n\t\t\t\t$maxPageSize = 100;\n\t\t}\n\t\tdefine('MAX_DISPLAY_RECORDS_NUM', $maxPageSize);\n\n\t\t$table = new MakeTable(); // Instantiate a new instance of the MakeTable class\n\n\t\t// Get document count\n\t\t$query = \"SELECT COUNT(c.id) FROM \" . $modx->getFullTableName('site_content') . \" AS c \" . $filter;\n\t\t$numRecords = $modx->db->getValue($query);\n\n\t\t// Execute the main table query with MakeTable sorting and paging features\n\t\t$query = \"SELECT c.id, c.pagetitle, c.longtitle, c.editedon, c.isfolder, COUNT(g.id) as photos FROM \" . $modx->getFullTableName('site_content') . \" AS c \" .\n\t\t \"LEFT JOIN \" . $modx->getFullTableName($this->galleriesTable) . \" AS g ON g.content_id = c.id \" .\n\t\t $filter . \" GROUP BY c.id\" . $table->handleSorting() . $table->handlePaging();\n\n\t\tif ($ds = $modx->db->query($query))\n\t\t{\n\t\t\t// If the query was successful, build our table array from the rows\n\t\t\twhile ($row = $modx->db->getRow($ds))\n\t\t\t{\n\t\t\t\t$documents[] = array(\n\t\t\t\t\t'pagetitle' => '<a href=\"' . $this_page . '&action=view&content_id=' . $row['id'] . '\" title=\"'.$this->lang['click_view_photos'].'\">' . $row['pagetitle'] . ' (' . $row['id'] . ')</a>',\n\t\t\t\t\t'longtitle' => ($row['longtitle'] != '') ? stripslashes($row['longtitle']) : '-',\n\t\t\t\t\t'photos' => $row['photos'],\n\t\t\t\t\t'editedon' => ($row['editedon'] > 0) ? strftime('%m-%d-%Y', $row['editedon']) : '-',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (is_array($documents)) // Ensure data was returned\n\t\t{\n\t\t\t// Create the table header definition with each header providing a link to sort by that field\n\t\t\t$documentTableHeader = array(\n\t\t\t\t'pagetitle' => $table->prepareOrderByLink('c.pagetitle', $this->lang['title']),\n\t\t\t\t'longtitle' => $table->prepareOrderByLink('c.longtitle', $this->lang['long_title']),\n\t\t\t\t'photos' => $table->prepareOrderByLink('photos', $this->lang['N_photos']),\n\t\t\t\t'editedon' => $table->prepareOrderByLink('c.editedon', $this->lang['last_edited']),\n\t\t\t);\n\n\t\t\t$table->setActionFieldName('id'); // Field passed in link urls\n\n\t\t\t// Table styling options\n\t\t\t$table->setTableClass('documentsTable');\n\t\t\t$table->setRowHeaderClass('headerRow');\n\t\t\t$table->setRowRegularClass('stdRow');\n\t\t\t$table->setRowAlternateClass('altRow');\n\n\t\t\t// Generate the paging navigation controls\n\t\t\tif ($numRecords > MAX_DISPLAY_RECORDS_NUM)\n\t\t\t\t$table->createPagingNavigation($numRecords);\n\n\t\t\t$table_html = $table->create($documents, $documentTableHeader); // Generate documents table\n\t\t\t$table_html = str_replace('[~~]?', $this_page . '&action=view&', $table_html); // Create page target\n\t\t}\n\t\telseif (isset($_GET['query']))\n\t\t{\n\t\t\t$table_html = '<p>'.$this->lang['no_docs_found'].'</p>'; // No records were found\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$table_html = '<p class=\"first\">'.$this->lang['no_children'].'</p>';\n\t\t}\n\n\t\t$tplparams['table'] = $table_html;\n\n\t\tif (isset($_GET['query']))\n\t\t\t$tplparams['gallery'] = '';\n\t\telse\n\t\t\t$tplparams['gallery'] = $this->viewGallery();\n\t\t\n\t\t$tpl = $this->processTemplate($this->listingTemplate, $tplparams);\n\t\treturn $header . $tpl;\n\t}",
"public function showAllId($id) : object\n {\n\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n $res = $this->contentDB->executeFetch($sql, [$id]);\n return $res;\n }",
"static function get_content_page_by_title($title)\n {\n global $db;\n\n // grab the page\n $sql = sprintf(\n \"SELECT * FROM `content_pages` WHERE `title`='%s'\",\n api::cleanse($title)\n );\n return mysqli_fetch_assoc(mysqli_query($db, $sql));\n }",
"public function index($page = 1)\n {\n $this->id($page);\n }",
"public function pages() {\n $this->layout = 'front';\n if ($this->request->params['slug']) {\n \n $lang = Configure::read('Config.language');\n $cmsLang = 'EN';\n if( $lang == 'eng' ) {\n $cmsLang = 'EN';\n } else if( $lang == 'deu' ){\n $cmsLang = 'DE';\n } else if( $lang == 'it' ){\n $cmsLang = 'IT';\n } else if( $lang == 'fra' ){\n $cmsLang = 'FR';\n }\n \n $page = $this->CmsPage->find('first', array('conditions' => array('page_url' => $this->request->params['slug'], 'language'=> $cmsLang ), 'fields' => array('title', 'description'), 'recursive' => -1));\n $this->set('data', $page);\n \n if( isset($page['CmsPage']['title']) && $page['CmsPage']['title'] != '' ){\n $this->set('PAGE_TITLE', $page['CmsPage']['title']);\n }\n }\n }",
"public function index()\n {\n Detailpage::with('getContent')->get();\n }",
"function cnapi_ui_page_list() {\n // Getting the current request as a Drupal request object.\n $request_dp = cnapi_ui_get_active_request();\n\n // There's a specific issue with requests with headings that are invalid.\n if (isset($request_dp['query']['heading'])) {\n $headings = $request_dp['query']['heading'];\n $headings = explode(';', $headings);\n\n foreach ($headings as $heading) {\n if (empty($heading) || !is_numeric($heading)) {\n drupal_not_found();\n exit();\n }\n }\n }\n\n // Converting it to an API request.\n $request = cnapi_url_dp2p($request_dp);\n\n // Doing the API request.\n $result = cnapi_get($request);\n\n // Fetch the total from the result and default to 0.\n $total = isset($result['total']) ? $result['total'] : 0;\n\n // Fetch the data from the result.\n $data = isset($result['data']) ? $result['data'] : array();\n\n // Add the API defaults to get the pagelength.\n cnapi_request_add_defaults($request);\n $pagelength = $request['query']['pagelength'];\n\n // Initialize the Drupal pager.\n pager_default_initialize($total, $pagelength);\n\n // Get the full context info for the current request.\n $context = cnapi_ui_contexts('id', $request_dp['context']);\n\n // Add the RSS feed url to the <head>.\n drupal_add_feed(cnapi_ui_rss_feed_url(), cnapi_ui_page_list_title());\n\n // Return the result as a render array using theme_cnapi_ui_list.\n return array(\n '#theme' => 'cnapi_ui_list',\n '#type' => $context['type'],\n '#items' => $data,\n '#total' => $total,\n '#request' => $request_dp\n );\n}",
"public function index()\n\t{\n\t\t$sorting_array = array();\n\n\t\t$orderby = Request()->orderby;\n\t\t$order = Request()->order;\n\n\t\tif(!$orderby && !$order)\n\t\t{\n\t\t\t$orderby = 'id';\n\t\t\t$order = 'desc';\n\t\t}\n\n\t\t$column_array = array('id' => 'Id', 'page_name' => 'Page Name');\n\t\t$search = Request()->search;\n\t\t$where = \"1 \";\n\n\t\tif($search)\n\t\t{\n\t\t\t$where .= \" and (\";\n\t\t\t$i=1;\n\t\t\tforeach($column_array as $key=>$val)\n\t\t\t{\n\t\t\t\tif($i>1)\n\t\t\t\t{\n\t\t\t\t\t$where .= \" or \";\n\t\t\t\t}\n\n\t\t\t\t$where .= $key.\" like '%\".$search.\"%'\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$where .= \")\";\n\t\t}\n\n\t\t$item_display_per_page = config('admin.pagination');\n\t\t$pages = Page::select('pages.*')\n\t\t->whereRaw($where)\n\t\t->orderBy($orderby, $order)\n\t\t->paginate($item_display_per_page);\n\n\n\t\tforeach($column_array as $key => $value)\n\t\t{\n\t\t\t$sorting_class = 'sorting';\n\t\t\t$sorting_url_orderby = $key;\n\t\t\t$sorting_url_order = 'asc';\n\n\t\t\tif($orderby==$key)\n\t\t\t{\n\t\t\t\t$sorting_class = ( $order=='asc' ? 'sorting_asc' : 'sorting_desc' );\n\n\t\t\t\t$sorting_url_order = ( $order=='asc' ? 'desc' : 'asc' );\n\t\t\t}\n\n\t\t\t$sorting_url = 'page?'.($search!=\"\" ? 'search='.$search.'&' : '').'orderby='.$sorting_url_orderby.'&order='.$sorting_url_order;\n\n\t\t\t$sorting_array[$key] = array('sorting_class' => $sorting_class, 'sorting_url' => $sorting_url);\n\t\t}\n\n\t\treturn view('admin.page.index', compact('pages','column_array','sorting_array','search'));\n\t}",
"public function indexAction()\n {\n $model = $this->getModel('page');\n $select = $model->select()->order(['active DESC', 'nav_order ASC', 'id DESC']);\n $rowset = $model->selectWith($select);\n $pages = [];\n $menu = [];\n foreach ($rowset as $row) {\n $page = $row->toArray();\n $page['url'] = $this->url('page', $page);\n if ($page['nav_order'] && $page['active']) {\n $menu[] = $page;\n } else {\n $pages[] = $page;\n }\n }\n $pages = array_merge($menu, $pages);\n\n $this->view()->assign('pages', $pages);\n $this->view()->assign('title', _a('Page list'));\n $this->view()->setTemplate('page-list');\n }",
"public function getPage($page_title = null)\n {\n $query = $this->db\n ->from(\"pages as p\")\n ->where('label', $page_title)\n // ->get_where('pages', ['label' => $page_title])\n ->join('content as c', 'c.page_id = p.id', 'left')\n ->get();\n // debug_helper($query);\n return $query->row_array();\n }"
] | [
"0.67551005",
"0.6423669",
"0.6405154",
"0.63119155",
"0.62679",
"0.6210134",
"0.61882955",
"0.61340046",
"0.6121448",
"0.610695",
"0.60864115",
"0.6082321",
"0.6050388",
"0.6050388",
"0.6050388",
"0.6032968",
"0.60184044",
"0.6008718",
"0.60044974",
"0.6002741",
"0.59959656",
"0.59892416",
"0.5959116",
"0.59459466",
"0.59308803",
"0.59296584",
"0.591105",
"0.5906525",
"0.5901723",
"0.58922875"
] | 0.7052449 | 0 |
Find page with given id. | public function find($id)
{
return $this->page->filterById($id)->first();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPage($id) {\n $pageProvider = $this->pageProvider;\n return $pageProvider::find($id);\n }",
"public function getPageById($id) {\n if(empty($this->pages)) {\n $this->getPages();\n }\n\n $result = FALSE;\n // Page exists? (array starts counting at 1)\n if(count($this->getPages()) > 0) {\n foreach($this->getPages() as $page) {\n if($page->getId() == $id) {\n return $page;\n }\n }\n }\n throw new \\Exception('Page does not exist', 6);\n }",
"protected function findTarget($id)\n {\n return App::content()->pages->get($id);\n }",
"public function find($id)\n\t{\n return $this->Page->with('versions')->findOrFail($id);\n\t}",
"static function get_content_page_by_id($id)\n {\n global $db;\n\n // grab the page\n $sql = sprintf(\n \"SELECT * FROM `content_pages` WHERE `pageid`='%d'\", \n api::cleanse($id)\n );\n return mysqli_fetch_assoc(mysqli_query($db, $sql));\n }",
"function find_page_by_id($id, $options=[]){\n\t\tglobal $db;\n\t\t$visible = isset($options['visible']) ? $options['visible'] : 'false' ;\n\n\t\t$sql = \"SELECT * FROM pages \";\n\t\t$sql .= \"WHERE id='\" . db_escape($db,$id) . \"' \";\n\t\tif ($visible === true) {\n\t\t\t$sql .= \"AND visible=true\";\n\t\t}\n\t\t$result = mysqli_query($db, $sql);\n\t\t$record = mysqli_fetch_assoc($result);\n\t\tmysqli_free_result($result);\n\n\t\treturn $record;\n\t}",
"public function getPageById($id)\n {\n $sql = \"SELECT * FROM site_page WHERE id=?\";\n $stmt = $this->_rdb->prepare($sql);\n $stmt->execute(array($id));\n\t\treturn $stmt->fetch();\n }",
"public function find_by_id( $id ) {\n\t\treturn $this->find_one( array( 'p' => $id ) );\n\n\t}",
"static function find($id);",
"function get_page_by_id($page_id){\n\t\tglobal $connection;\n\t\t$query =\t\"SELECT * \";\n\t\t$query .=\t\t\"FROM work \";\n\t\t$query .=\t\t\"WHERE id=\".$page_id;\n\t\t$result_set = mysql_query($query, $connection);\n\t\tconfirm_query($result_set);\n\t\t\n\t\t//REMEMBER:\n\t\t// If no rows are returned, fetch_array will return false\n\t\tif ($page = mysql_fetch_array($result_set)) {\n\t\t\treturn $page;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }",
"public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }",
"public static function findById($id){\n \t$data = self::find($id);\n \tif (!$data) {\n \t\tabort(404);\n \t}\n \treturn $data;\n }",
"public static function getById( $id ) {\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n\t\t$sql = \"SELECT * FROM pages WHERE id = '$id'\";\n\t\t$st = $conn->prepare( $sql );\n\t\t$st->bindValue( \":id\", $id, PDO::PARAM_INT );\n\t\t$st->execute();\n\t\t$row = $st->fetch();\n\t\t$conn = null;\n\t\tif ( $row ) return new Page( $row );\n\t}",
"public static function getById($id)\r\n\t{\r\n\t\t// Détection si en cache\r\n\t\t$cached = Factory::getInstance('Page', $id);\r\n\t\tif (!is_null($cached))\r\n\t\t{\r\n\t\t\treturn $cached;\r\n\t\t}\r\n\t\t\r\n\t\t// Sélection\r\n\t\t$result = Database::get(self::$server)->query('SELECT * FROM `'.self::$table.'` A LEFT JOIN `'.self::$table.'_access` B ON A.`id_page`=B.`page` AND (B.`status` IS NULL OR B.`status`=?) WHERE id_page=?;', array(User::getCurrent()->status, $id));\r\n\t\t\r\n\t\t// Si trouvé\r\n\t\tif ($result->count() > 0)\r\n\t\t{\r\n\t\t\t// Composition\r\n\t\t\treturn Factory::getInstance('Page', $result[0]);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static function find_by_id($id=0) {\n\t\tglobal $session;\n\t\tglobal $database;\n\t\t\n\t\t// check that the id is an int\n\t\tif (!is_numeric($id))\n\t\t{\n\t\t\t$session->message(\"There is an error with the page you were trying to access.\");\n\t\t\tredirect_head(ROOT_URL);\n\t\t}\n\t\t\n\t\t$sql = \"SELECT `\".static::$table_name.\"`.* FROM `\".\n\t\t\tstatic::$table_name.\"` WHERE `\".static::primary_key_field().\"`={$id} LIMIT 1;\";\n\t\t$result_array = static::find_by_sql($sql);\n\t\t\n\t\tif ($result_array != null)\n\t\t\treturn array_shift($result_array);\n\t\telse\n\t\t\treturn false;\n\t}",
"public static function getPageById( $id ) {\n\t$sql = \"SELECT * FROM page WHERE page_id = '\".$id.\"'\";\n\t$result = mysql_query($sql) or die(mysql_error());\n $row = mysql_fetch_array($result);\n if ( $row ) return new Page( $row );\n }",
"public static function findById($id);",
"public static function find( $id );",
"public function getPage($id)\n {\n $qb = $this->createQueryBuilder('page')\n ->where('page.id = :id AND page.deleted = 0')\n ->setParameter('id', $id);\n\n return $qb->getQuery()->getOneOrNullResult();\n }",
"public function find ($id);",
"protected function findPageById($id)\n {\n $pageRecord = [];\n $row = BackendUtility::getRecord(self::PAGE_JUMP_TABLE, $id);\n if (is_array($row)) {\n $pageRecord = $row;\n }\n return $pageRecord;\n }",
"public function getPage($id) {\n\n $id = '';\n foreach ($this->pageMenu as $key => $value) {\n if( $id==$value['id'] ){\n $id = $value['id'];\n break;\n }\n }\n\n return $id;\n }",
"public function findForDetailsPage($id) {\r\n $queryBuilder = $this->getQueryBuilder();\r\n\r\n $this->_em->getFilters()->disable('softdeleteable');\r\n\r\n $queryBuilder\r\n ->andWhere($queryBuilder->expr()->eq('o.id', ':id'))\r\n ->andWhere('o.deletedAt is NULL')\r\n ->innerJoin('o.admin', 'admin')\r\n ->andWhere('admin = :admin')\r\n ->setParameter('admin', $this->adminUser)\r\n ->setParameter('id', $id) \r\n ;\r\n\r\n $result = $queryBuilder\r\n ->getQuery()\r\n ->getOneOrNullResult()\r\n ;\r\n $result->setCompanyId($this->adminUser->getCompanyId());\r\n\r\n return $result;\r\n }",
"public function getPage($id_page){\t\n\t\t\t\n\t\t\treturn $this->selectPage($id_page);\n\t\t}",
"public function getPage($pageId);",
"public function getApplicationPageByPageId($id)\n {\n foreach ($this->applicationPages as $applicationPage) {\n if ($applicationPage->getPage()->getId() == $id) {\n return $applicationPage;\n }\n }\n\n return false;\n }",
"function read_id_page_by_id_text($id){\n\n\t\tif (($id!=0) or ($id!=\"\")){\n\t\t\t$sSql=\"select * from tbl_contenuto where idtipo=1 and id_sito='\" . $this->id_sito . \"' and idcont_tab=\" . $id;\n\t\t\t\n\t\t\t$risultato = mysql_query($sSql);\n\t\t\tif (!$risultato){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\t$row=mysql_fetch_assoc($risultato);\n\t\t\t\t$sSql=\"select * from tbl_rel_pag_cont where id_sito='\" . $this->id_sito . \"' and idC=\" . $row[\"id\"];\n\t\t\t\t$risultato = mysql_query($sSql);\n\t\t\t\tif (!$risultato){\n\t\t\t\t\treturn false;\n\t\t\t\t}else{\n\t\t\t\t\t$row=mysql_fetch_assoc($risultato);\n\t\t\t\t\treturn $row[\"idP\"];\n\t\t\t\t\tmysql_free_result($risultato);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n \t}",
"public function findByID($id);",
"public function find($id){}"
] | [
"0.7802233",
"0.7793064",
"0.75743556",
"0.75740904",
"0.7287194",
"0.728442",
"0.7254965",
"0.7169",
"0.71628606",
"0.71437776",
"0.7097539",
"0.7097539",
"0.7097539",
"0.7097101",
"0.7032445",
"0.7020215",
"0.69976723",
"0.6983481",
"0.69581306",
"0.69520384",
"0.69229656",
"0.69223523",
"0.6857606",
"0.684463",
"0.6787902",
"0.67497444",
"0.67443544",
"0.6715792",
"0.6704152",
"0.66840166"
] | 0.81109184 | 0 |
Find page with given uuid. | public function findByUuid($uuid)
{
return $this->page->filterByUuid($uuid)->first();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPageReferenceByUuid($uuid)\n {\n return array_get($this->uuids['pages'], $uuid);\n }",
"public function findByUuid($uuid)\n {\n }",
"private function findPageForSlug($slug)\n {\n// $menuItem = app(MenuItemRepository::class)->findByUriInLanguage($slug, locale());\n//\n// if ($menuItem) {\n// return $this->page->find($menuItem->page_id);\n// }\n\n return $this->page->findBySlugInLocale($slug, locale());\n }",
"public function find_by_uuid($uuid)\n {\n $q = $this->db->get_where($this->table_name, array(\"uuid\" => $uuid));\n return $q->row();\n }",
"public function find_by_uuid($uuid)\n {\n $q = $this->db->get_where($this->table_name, array(\"uuid\" => $uuid));\n return $q->row();\n }",
"public function show($uuid)\n {\n //\n }",
"public function find($id)\n {\n return $this->page->filterById($id)->first();\n }",
"public function findOneByUuid(string $uuid, string $locale = null): ?PageInterface\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->createDefaultQueryBuilder($locale)\n\t\t\t\t->andWhere('e.uuid = :uuid')\n\t\t\t\t->setParameter('uuid', $uuid)\n\t\t\t\t->getQuery()\n\t\t\t\t->getOneOrNullResult();\n\t\t}\n\t\tcatch (NonUniqueResultException $e)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public function findByUuid($uuid)\n {\n return $this->where('uuid', $uuid)->first();\n }",
"public function getPage($id) {\n $pageProvider = $this->pageProvider;\n return $pageProvider::find($id);\n }",
"public function find($id)\n\t{\n return $this->Page->with('versions')->findOrFail($id);\n\t}",
"function bibdk_custom_search_page_load($p_uuid) {\n return db_select('bibdk_custom_search', 'p')\n ->addTag('translatable')\n ->fields('p')\n ->condition('p_uuid', $p_uuid, '=')\n ->execute()\n ->fetchAssoc();\n}",
"function load_page($params) {\n $params = (object) $params;\n $where = empty($params->id) ? \"uri = '$params->uri'\" : \"id = $params->id\";\n $result = pod_query(\"SELECT * FROM @wp_pod_pages WHERE $where LIMIT 1\");\n return mysql_fetch_assoc($result);\n }",
"public function getPage($pageId);",
"public function findByUuid(string $uuid): Response\n {\n $url = vsprintf(self::ENDPOINT_FIND_BY_UUID, [$uuid]);\n\n $hubUrl = $this->hub->setToken('', true);\n\n return $hubUrl->request->get($url)->throw();\n }",
"public function find_page($path) {\n\t\t$page = $this->db->query(\"SELECT * FROM pages WHERE path = \\\"{$path}\\\"\")->fetchAll();\n\t\treturn reset($page);\n\t}",
"public function find($slug);",
"public function findByUuidOrFail($uuid, $field = 'message')\n {\n $page = $this->page->filterByUuid($uuid)->first();\n\n if (! $page) {\n throw ValidationException::withMessages([$field => trans('frontend.could_not_find_page')]);\n }\n\n return $page;\n }",
"public function findBySlug(string $slug): ?Page;",
"public function getPageById($id) {\n if(empty($this->pages)) {\n $this->getPages();\n }\n\n $result = FALSE;\n // Page exists? (array starts counting at 1)\n if(count($this->getPages()) > 0) {\n foreach($this->getPages() as $page) {\n if($page->getId() == $id) {\n return $page;\n }\n }\n }\n throw new \\Exception('Page does not exist', 6);\n }",
"public function find($identifier);",
"public function getProjectPageBySlug($slug);",
"function get_page_id_by_slug($slug){\n global $wpdb;\n $id = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts WHERE post_name LIKE '\".$slug.\"%' AND post_type = 'page' LIMIT 1\");\n return $id;\n}",
"public function findByUuid($uuid)\n {\n return $this->model->filterByUuid($uuid)->first();\n }",
"public function findByUrl($url)\n {\n $this->url = $url = RouterHelper::normalizeUrl($url);\n\n /**\n * @event cms.router.beforeRoute\n * Fires before the CMS Router handles a route\n *\n * Example usage:\n *\n * Event::listen('cms.router.beforeRoute', function ((string) $url, (\\Cms\\Classes\\Router) $thisRouterInstance) {\n * return \\Cms\\Classes\\Page::loadCached('trick-theme-code', 'page-file-name');\n * });\n *\n */\n $apiResult = Event::fire('cms.router.beforeRoute', [$url, $this], true);\n if ($apiResult !== null) {\n return $apiResult;\n }\n\n for ($pass = 1; $pass <= 2; $pass++) {\n $fileName = null;\n $urlList = [];\n\n $cacheable = Config::get('cms.enable_route_cache');\n if ($cacheable) {\n $fileName = $this->getUrlRouteCache($url, $urlList);\n if (is_array($fileName)) {\n [$fileName, $this->parameters] = $fileName;\n }\n }\n\n // Find the page by URL and cache the route\n //\n if (!$fileName) {\n $router = $this->getRouterObject();\n if ($router->match($url)) {\n $this->parameters = $router->getParameters();\n $fileName = $router->matchedRoute();\n\n if ($cacheable) {\n $this->putUrlRouteCache($fileName, $url, $urlList);\n }\n }\n }\n\n // Return the page\n //\n if ($fileName) {\n if (($page = Page::loadCached($this->theme, $fileName)) === null) {\n // If the page was not found on the disk, clear the URL cache\n // and repeat the routing process.\n if ($pass === 1) {\n $this->clearCache();\n continue;\n }\n\n return null;\n }\n\n return $page;\n }\n\n return null;\n }\n }",
"public function findByUuid($uuid)\n {\n return $this->reply->where('uuid', $uuid)->first();\n }",
"public function findByTag($slug, $page, $size);",
"public function getPage($slug)\n {\n if (!isset($slug)) {\n if ($this->getPages()->count() == 0) {\n throw new \\Exception(\"Page not found\", 1);\n }\n return $this->getPages()->first();\n }\n $k = $this->getPages()->search(function ($item) use ($slug) {\n return str_slug($item->name) == str_slug($slug);\n });\n if ($k === false) {\n throw new \\Exception(\"Page not found\", 1);\n }\n return $this->getPages()->get($k);\n }",
"public function getPageId();",
"static function find($id);"
] | [
"0.6725867",
"0.6533389",
"0.6436531",
"0.63158035",
"0.63158035",
"0.61563826",
"0.6122024",
"0.6054654",
"0.6051226",
"0.5962681",
"0.59328663",
"0.59039783",
"0.58926904",
"0.58541954",
"0.5841485",
"0.5838565",
"0.5814516",
"0.57930726",
"0.5774298",
"0.56392026",
"0.5586753",
"0.5566163",
"0.55419743",
"0.5521691",
"0.5511931",
"0.54675466",
"0.5450324",
"0.5450235",
"0.5432265",
"0.5431958"
] | 0.74138 | 0 |
Find page with given uuid or throw an error. | public function findByUuidOrFail($uuid, $field = 'message')
{
$page = $this->page->filterByUuid($uuid)->first();
if (! $page) {
throw ValidationException::withMessages([$field => trans('frontend.could_not_find_page')]);
}
return $page;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findByUuid($uuid)\n {\n return $this->page->filterByUuid($uuid)->first();\n }",
"public function getPageById($id) {\n if(empty($this->pages)) {\n $this->getPages();\n }\n\n $result = FALSE;\n // Page exists? (array starts counting at 1)\n if(count($this->getPages()) > 0) {\n foreach($this->getPages() as $page) {\n if($page->getId() == $id) {\n return $page;\n }\n }\n }\n throw new \\Exception('Page does not exist', 6);\n }",
"private function findPageForSlug($slug)\n {\n// $menuItem = app(MenuItemRepository::class)->findByUriInLanguage($slug, locale());\n//\n// if ($menuItem) {\n// return $this->page->find($menuItem->page_id);\n// }\n\n return $this->page->findBySlugInLocale($slug, locale());\n }",
"public function findOneByUuid(string $uuid, string $locale = null): ?PageInterface\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->createDefaultQueryBuilder($locale)\n\t\t\t\t->andWhere('e.uuid = :uuid')\n\t\t\t\t->setParameter('uuid', $uuid)\n\t\t\t\t->getQuery()\n\t\t\t\t->getOneOrNullResult();\n\t\t}\n\t\tcatch (NonUniqueResultException $e)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public function findBySlug(string $slug): ?Page;",
"public function findByUuid($uuid)\n {\n }",
"public function getPageReferenceByUuid($uuid)\n {\n return array_get($this->uuids['pages'], $uuid);\n }",
"public function find($id)\n\t{\n return $this->Page->with('versions')->findOrFail($id);\n\t}",
"public function getPage($slug)\n {\n if (!isset($slug)) {\n if ($this->getPages()->count() == 0) {\n throw new \\Exception(\"Page not found\", 1);\n }\n return $this->getPages()->first();\n }\n $k = $this->getPages()->search(function ($item) use ($slug) {\n return str_slug($item->name) == str_slug($slug);\n });\n if ($k === false) {\n throw new \\Exception(\"Page not found\", 1);\n }\n return $this->getPages()->get($k);\n }",
"public function findByUuid(string $uuid): Response\n {\n $url = vsprintf(self::ENDPOINT_FIND_BY_UUID, [$uuid]);\n\n $hubUrl = $this->hub->setToken('', true);\n\n return $hubUrl->request->get($url)->throw();\n }",
"public function find_by_uuid($uuid)\n {\n $q = $this->db->get_where($this->table_name, array(\"uuid\" => $uuid));\n return $q->row();\n }",
"public function find_by_uuid($uuid)\n {\n $q = $this->db->get_where($this->table_name, array(\"uuid\" => $uuid));\n return $q->row();\n }",
"public function find($id)\n {\n return $this->page->filterById($id)->first();\n }",
"public function show($uuid)\n {\n //\n }",
"public function pageNotFound() {\n\n $this->mainPage->getPage('page_not_found.tpl');\n }",
"public function find($slug);",
"public function pageExists($pageId);",
"public function single($slug_or_id){\n $page = Page::where('slug', $slug_or_id)\n ->orWhere('id', $slug_or_id)\n ->first();\n if( empty($page) ) { return response()->json('Page not found', 404); }\n\n return response()->json($page);\n }",
"public function find_page($path) {\n\t\t$page = $this->db->query(\"SELECT * FROM pages WHERE path = \\\"{$path}\\\"\")->fetchAll();\n\t\treturn reset($page);\n\t}",
"private function throw404IfNotFound($page)\n {\n if (is_null($page)) {\n $this->app->abort('404');\n }\n }",
"public function findBySlug(string $slug): Model\n {\n $this->debug('Getting the specified page', ['slug' => $slug]);\n $page = $this->model->whereSlug($slug)->first();\n\n if (!$page) {\n throw new DataNotFound;\n }\n\n return $page;\n }",
"public function findByUuid($uuid)\n {\n return $this->where('uuid', $uuid)->first();\n }",
"function load_page($params) {\n $params = (object) $params;\n $where = empty($params->id) ? \"uri = '$params->uri'\" : \"id = $params->id\";\n $result = pod_query(\"SELECT * FROM @wp_pod_pages WHERE $where LIMIT 1\");\n return mysql_fetch_assoc($result);\n }",
"public function getPage($id) {\n $pageProvider = $this->pageProvider;\n return $pageProvider::find($id);\n }",
"public static function getBasicBrowserByUuid($uuid){\n try {\n $conn = Database::getConnection();\n $commString = 'SELECT browser_id, can_add_renew_users, can_check_in, is_cash_register FROM stippers_browsers WHERE uuid = ?';\n $stmt = $conn->prepare($commString);\n \n //Check if statement could be prepared\n if ($stmt) {\n \n $stmt->bind_param('s', $uuid);\n \n if (!$stmt->execute())\n throw new BrowserDBException('Unknown error during statement execution while getting browser.', BrowserDBException::UNKNOWNERROR);\n else {\n $stmt->bind_result($browserId, $canAddRenewUsers, $canCheckIn, $isCashRegister);\n \n if ($stmt->fetch()) {\n $canAddRenewUsers = ($canAddRenewUsers != 0);\n $canCheckIn = ($canCheckIn != 0);\n $isCashRegister = ($isCashRegister != 0);\n return new Browser($browserId, null, null, $canAddRenewUsers, $canCheckIn, $isCashRegister);\n }\n else\n throw new BrowserDBException('No browser was found for this id.', BrowserDBException::NOBROWSERFORUUID);\n \n }\n }\n else\n throw new BrowserDBException('Cannot prepare statement.', BrowserDBException::CANNOTPREPARESTMT);\n }\n catch (Exception $ex) {\n throw $ex;\n }\n finally {\n if (isset($conn)){\n $conn->kill($conn->thread_id);\n $conn->close();\n }\n }\n }",
"public function findByUrl($url)\n {\n $this->url = $url = RouterHelper::normalizeUrl($url);\n\n /**\n * @event cms.router.beforeRoute\n * Fires before the CMS Router handles a route\n *\n * Example usage:\n *\n * Event::listen('cms.router.beforeRoute', function ((string) $url, (\\Cms\\Classes\\Router) $thisRouterInstance) {\n * return \\Cms\\Classes\\Page::loadCached('trick-theme-code', 'page-file-name');\n * });\n *\n */\n $apiResult = Event::fire('cms.router.beforeRoute', [$url, $this], true);\n if ($apiResult !== null) {\n return $apiResult;\n }\n\n for ($pass = 1; $pass <= 2; $pass++) {\n $fileName = null;\n $urlList = [];\n\n $cacheable = Config::get('cms.enable_route_cache');\n if ($cacheable) {\n $fileName = $this->getUrlRouteCache($url, $urlList);\n if (is_array($fileName)) {\n [$fileName, $this->parameters] = $fileName;\n }\n }\n\n // Find the page by URL and cache the route\n //\n if (!$fileName) {\n $router = $this->getRouterObject();\n if ($router->match($url)) {\n $this->parameters = $router->getParameters();\n $fileName = $router->matchedRoute();\n\n if ($cacheable) {\n $this->putUrlRouteCache($fileName, $url, $urlList);\n }\n }\n }\n\n // Return the page\n //\n if ($fileName) {\n if (($page = Page::loadCached($this->theme, $fileName)) === null) {\n // If the page was not found on the disk, clear the URL cache\n // and repeat the routing process.\n if ($pass === 1) {\n $this->clearCache();\n continue;\n }\n\n return null;\n }\n\n return $page;\n }\n\n return null;\n }\n }",
"public function find($identifier);",
"function get_id_by_slug($page_slug) {\n\t$page = get_page_by_path($page_slug);\n\tif($page) {\n\t\treturn $page->ID;\n\t} else {\n\t\treturn null;\n\t}\n}",
"function get_id_by_slug( $page_slug ) {\r\n\t$page = get_page_by_path( $page_slug );\r\n\tif ( $page ) {\r\n\t\treturn $page->ID;\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n}",
"public function getProjectPageBySlug($slug);"
] | [
"0.6649714",
"0.6143969",
"0.6135602",
"0.6041412",
"0.5996691",
"0.59548795",
"0.5937653",
"0.58235717",
"0.5791869",
"0.5782972",
"0.5702568",
"0.5702568",
"0.5654397",
"0.5653508",
"0.563938",
"0.55580324",
"0.5535392",
"0.5532707",
"0.55126",
"0.5489711",
"0.54348457",
"0.54276025",
"0.5406281",
"0.5402213",
"0.5372203",
"0.535487",
"0.5342218",
"0.53158146",
"0.5292018",
"0.529148"
] | 0.6488254 | 1 |
Paginate all page using given params. | public function paginate($params)
{
$page_length = gv($params, 'page_length', config('config.page_length'));
return $this->getData($params)->paginate($page_length);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function paginate();",
"protected function paginate()\n {\n if (! is_null($this->request->get('start'))) {\n $this->query()\n ->skip($this->request->get('start'))\n ->take($this->request->get('length', $this->config->get('laratables.defaultLength')));\n }\n }",
"public function getAllPaginated()\n {\n }",
"public function getListPaginate($perPage = 10, ...$params)\n {\n $resultModel = $this->getModel();\n // foreach condition\n if(count($params) > 0){\n foreach ($params as $key => $statement) {\n $condition = $statement[0];\n $operator = (in_array($statement[1], $this->operators) ? $statement[1] : '=');\n $value = (in_array($statement[1], $this->operators) ? $statement[2] : $statement[1]);\n $clause = isset($statement[3]) ? $statement[3] : 'and';\n $relation = isset($statement[4]) ? $statement[4] : '';\n $id = isset($statement[5]) ? $statement[5] : '';\n $resultModel = $this->getData($resultModel, $condition,$operator,$value,$clause,$relation,$id);\n }\n }\n // return paginate\n return $resultModel->paginate($perPage);\n }",
"public function paginate(array $data);",
"public function paginate(array $data);",
"public function paginate(array $data);",
"public function paginate($perPage);",
"public function paginate($params)\n {\n $sort_by = gv($params, 'sort_by', 'created_at');\n $order = gv($params, 'order', 'desc');\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->email_template->orderBy($sort_by, $order)->paginate($page_length);\n }",
"public function paginate($params)\n {\n $query = $this->getRepliesIndexQuery($params['ticket_id']);\n\n $paginated = $query->paginate(isset($params['perPage']) ? $params['perPage'] : 10);\n\n return $paginated;\n }",
"function findAllPaginated($perPage = 20);",
"public function paginate($pageSize, $wheres = [], $orders = []);",
"public function paginate($pageSize, $wheres = [], $orders = []);",
"public function paginate($perPage = 5);",
"function paginate() {\n\t\t$args = func_get_args();\n\t\treturn call_user_func_array(array('TagHelper', 'pagination'), $args);\n\t}",
"public function getAllPages(array $params = array())\n {\n $params['list'] = 'allpages';\n return $this->query($params);\n }",
"public function paginator($params) {\t\n\t\t$request_url = \"{$this->url}&api_action=campaign_paginator&api_output={$this->output}&{$params}\";\n\t\t$response = parent::curl($request_url);\n\t\treturn $response;\n\t}",
"public function getAll($paginate, $orderBy);",
"public function Pages($params = array()) {\n\t\t//设置默认参数\n\t\t$_defaults_params = array(\n\t\t\t'allow_cache' => true,\n\t\t\t'page' => isset($_GET['page']) ? intval($_GET['page']) : 1,\n\t\t\t'pagesize' => 10,\n\t\t);\n\t\t$params = array_merge($_defaults_params, $params);\n\t\t\n\t\t//有开启缓存功能,则从缓存中取数据, 如果有数据,则直接返回结果\n\t\tif($params['allow_cache'] && isset($this->cache)) {\n\t\t\t$cacheKey = 'collect.rule.pages.' . serialize($params);\n\t\t\t$ret = $this->cache->get($cacheKey);\n\t\t\t\n\t\t\tif($ret && is_array($ret)) {\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//添加条件\n $builds = array(\n 'select' => 'COUNT(ct.collect_rule_id) AS COUNT',\n 'from' => array('{{collect_rule}}', 'ct'),\n );\n \n\t\tif(isset($params['collect_rule_status']) && !empty($params['collect_rule_status'])) {\n\t\t\t$builds['where'][] = array('AND', 'ct.collect_rule_status=:collect_rule_status');\n\t\t\t$sql_params[':collect_rule_status'] = $params['collect_rule_status'];\n\t\t} else {\n\t\t\t$builds['where'][] = array('AND', 'ct.collect_rule_status>:collect_rule_status');\n\t\t\t$sql_params[':collect_rule_status'] = 0;\n\t\t}\n \n\t\tif(isset($params['collect_rule_id']) && !empty($params['collect_rule_id'])) {\n\t\t\t$builds['where'][] = array('AND', 'ct.collect_rule_id=:collect_rule_id');\n\t\t\t$sql_params[':collect_rule_id'] = $params['collect_rule_id'];\n\t\t}\n\t\t//\n\t\tif(isset($params['collect_rule_name']) && !empty($params['collect_rule_name'])) {\n\t\t\t$builds['where'][] = array('LIKE', 'ct.collect_rule_name', '%:collect_rule_name%');\n\t\t\t$sql_params[':collect_rule_name'] = $params['collect_rule_name'];\n\t\t}\n\t\t//\n\t\t//\n\t\tif(isset($params['searchKey']) && $params['searchKey']) {\n\t\t\t$builds['where'][] = array(\n\t\t\t\t'OR',\n\t\t\t\tarray(\n\t\t\t\t\t'OR LIKE',\n\t\t\t\t\t'ct.collect_rule_name',\n\t\t\t\t\t\":searchKey\",\n\t\t\t\t),\n\t\t\t);\n\t\t\t$sql_params[':searchKey'] = \"%{$params['searchKey']}%\";\n\t\t}\n $sql = $this->buildQuery($builds);\n\t\t\n\t\t//统计数量\n\t\t$count = $this->db->queryScalar($sql, $sql_params);\n\t\t\n\t\t//分页处理\n\t\t$pages = new CPagination($count);\n\t\t\n\t\t//设置分页大小\n\t\t$pages->pageSize = $params['pagesize'];\n\t\t\n\t\tif(isset($params['orderby']) && $params['orderby']) {\n\t\t\t$builds['order'] = $params['orderby'];\n\t\t} else {\n\t\t\t$builds['order'] = array(\n\t\t\t\t\t'ct.collect_rule_dateline DESC',\n\t\t\t\t);\n\t\t}\n \n $builds['select'] = 'ct.collect_rule_id, ct.collect_rule_name';\n $pages->applyLimit($builds);\n $sql = $this->buildQuery($builds);\n\t\t$ret = array(\n 'pages' => $pages,\n 'rows' => $this->db->queryAll($sql, $sql_params),\n );\n\t\t\n\t\t//有开启缓存,则把结果添加到缓存中\n\t\tif($params['allow_cache'] && isset($this->cache)) {\n\t\t\t$cacheTimeout = SettingModel::getSettingValue('COLLECT_TEMPLATE_PAGES_CACHE_TIME');\n\t\t\t$this->cache->set($cacheKey, json_encode($ret), $cacheTimeout);\n\t\t\tunset($cacheTimeout, $cacheKey);\n\t\t}\n\t\treturn $ret;\n\t}",
"public function setPage(int $page): PaginationParamsInterface;",
"public function fetchAllByPage($page, $itemsPerPage);",
"public function paginate($noOfItem = 10);",
"public function paginate($noOfItem = 10);",
"public function pageFromQuery($params=null)\n {\n $clone = $this->makeClone(true);\n $clone->paginate = true;\n if ($params !== null) {\n $this->pageParams = $params;\n }\n if ($this->pageLimit === null) {\n $this->pageLimit = 'default';\n }\n return $clone;\n }",
"public function paginate($query, int $limit, int $offset): void;",
"function getAllPaginated($page=1,$perPage=-1) { \r\n\t\tif ($perPage == -1)\r\n\t\t\t$perPage = \tCommon::getRowsPerPage();\r\n\t\tif (empty($page))\r\n\t\t\t$page = 1;\r\n\t\trequire_once(\"propel/util/PropelPager.php\");\r\n\t\t$cond = new Criteria(); \r\n\t\t$pager = new PropelPager($cond,\"SurveyQuestionPeer\", \"doSelect\",$page,$perPage);\r\n\t\treturn $pager;\r\n\t}",
"public function per_page();",
"public function search($params)\n {\n $pageRepository = $this->dm\n ->getRepository('AiselPageBundle:Page');\n\n $total = $pageRepository->getTotalFromRequest($params);\n $collection = $pageRepository->getCollectionFromRequest($params);\n\n $return = array(\n 'total' => $total,\n 'collection' => $collection\n );\n\n return $return;\n }",
"public function paginate($perPage = 1, $columns = ['*']);",
"function get_all_paginate() {\n\n $page = (isset($_REQUEST['page'])) ? $_REQUEST['page'] : '';\n $limit = (isset($_REQUEST['item_por_page'])) ? $_REQUEST['item_por_page'] : 50;\n $select_column = (isset($_REQUEST['select_column'])) ? $_REQUEST['select_column'] : '1';\n $order_column = (isset($_REQUEST['order_column'])) ? $_REQUEST['order_column'] : 'desc';\n $search = (isset($_REQUEST['search_column'])) ? $_REQUEST['search_column'] : '';\n $data = array(\n 'page' => $page,\n 'item_por_page' => $limit,\n 'select_column' => $select_column,\n 'order_column' => $order_column,\n 'search_column' => $search\n );\n\n $data = $this->app_roles_model->get_all_paginate($data);\n\n echo json_encode($data);\n }"
] | [
"0.75492114",
"0.73559064",
"0.71336645",
"0.71201336",
"0.70892984",
"0.70892984",
"0.70892984",
"0.6968745",
"0.6915288",
"0.6905993",
"0.6904826",
"0.68827474",
"0.68827474",
"0.6828588",
"0.67509264",
"0.67272466",
"0.6676001",
"0.6658914",
"0.66401464",
"0.6544099",
"0.65413505",
"0.6504043",
"0.6504043",
"0.6479657",
"0.6475737",
"0.6443341",
"0.6431796",
"0.6419231",
"0.6391201",
"0.63903946"
] | 0.7696432 | 0 |
Flag that shows that a previous execution was prevented because the job was locked | public function getJobWasLocked()
{
return $this->jobWasLocked;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function maybe_release_locked_jobs() {\n\t\t\tglobal $wpdb;\n\n\t\t\t$expired = $this->datetime( - $this->release_time );\n\n\t\t\t$sql = $wpdb->prepare( \"\n\t\t\t\tUPDATE {$this->table}\n\t\t\t\tSET attempts = attempts + 1, locked = 0, locked_at = NULL\n\t\t\t\tWHERE locked = 1\n\t\t\t\tAND locked_at <= %s\"\n\t\t\t, $expired );\n\n\t\t\t$wpdb->query( $sql );\n\t\t}",
"public function fix_stuck_queue_document_and_prevent_parallel_executions()\n {\n DB::query(Database::UPDATE, 'UPDATE pinsurance_documents_queue SET `status` = 0, restarts = (restarts + 1) WHERE TIMESTAMPDIFF(MINUTE, DATE_ADD(date, INTERVAL 5 MINUTE), NOW()) > 5 AND `status` = 1')\n ->execute();\n\n //Check if another instance of the same script is running in the background\n $query = DB::select()\n ->from('pinsurance_documents_queue')\n ->where('status', '=', '1')\n ->execute()\n ->as_array();\n if (!empty($query)) {\n //kill the script, prevent parallel execution.\n //exit();\n }\n }",
"public function isLocked();",
"public function isLocked();",
"private function get_action_lock() {\n\t\t\tif($this->action_has_lock() && !$this->action_has_completed()) {\n\t\t\t\tif( $this->is_lock_owner() )\n\t\t\t\t\treturn true; //already own it\n\t\t\t\treturn false; //someone else owns it\n\t\t\t}\n\t\t\t\n\t\t\t//set it for this instance\n\t\t\t$this->lock_key = md5( uniqid( microtime() . mt_rand(), true ) );\t\n\t\t\tset_transient($this->get_lock_name(), $this->lock_key);\n\t\t\treturn true;\n\t\t}",
"public function acquire_lock() {\n\t\t$query = \"UPDATE {$this->table_prefix}cavalcade_jobs\";\n\t\t$query .= ' SET status = \"running\"';\n\t\t$query .= ' WHERE status = \"waiting\" AND id = :id';\n\n\t\t$statement = $this->db->prepare( $query );\n\t\t$statement->bindValue( ':id', $this->id );\n\t\t$statement->execute();\n\n\t\t$rows = $statement->rowCount();\n\t\treturn ( $rows === 1 );\n\t}",
"function hook_panels_edit_cache_break_lock($argument, $cache) {\n $cache->locked = FALSE;\n}",
"private function lockRunning() {\n //bloqueamos la transformacion \n $this->analyzing = true;\n $f = fopen(\"analizing.lock\", \"w\") or die(\"Unable to open file!\");\n fclose($f);\n }",
"public function isLocked(): bool;",
"public function locked(): bool {\n return $this->_locked;\n }",
"public function isLocked(): bool\n {\n return $this->counter > 0;\n }",
"private function couldBeLocked()\n {\n return !$this->isLocked();\n }",
"public function isReserved()\n {\n return $this->job->reserved;\n }",
"public function message()\n {\n return 'Asset issuance must be locked.';\n }",
"public function isLocked()\n {\n return ($this->status == 'locked');\n }",
"public function isLocked() {\n return !$this->isNew();\n }",
"public function lock()\n {\n return $this->_locked = true;\n }",
"public function getAccountTemporarilyLocked()\n {\n return ($this->accountTemporarilyLocked()) ? 'yes' : '';\n }",
"public function isLockable(): bool;",
"public function isSuspended(): bool;",
"public function isLocked(){\n if($this->state=='locked'){\n return true;\n }else{\n return false;\n }\n }",
"function bbp_edit_lock($default = 5)\n{\n}",
"public function lock_record() {\n\t\tglobal $database;\n\n\t\t$sql = \"SELECT * FROM \". static::$table_name .\" WHERE id = '\". $database->escape_value($this->id) .\"' FOR UPDATE\";\n\t \t$database->query($sql);\n\t \treturn ($database->query($sql)) ? true : false;\n\t\t//return true;\n\t\n\t}",
"public function disableTask()\n {\n return $this->setTaskStage(0, 1, 3, false);\n }",
"public function isLocked()\n\t{\n\t\treturn null;\n\t}",
"public function setLocked($boolean)\r\n {\r\n }",
"private function is_locked()\n\t\t{\n\t\t\treturn $this->connection_lock;\n\t\t}",
"public function isLocked()\n {\n return $this->_locked;\n }",
"static public function isLocked(){\n\t\treturn self::$_locked;\n\t}",
"public function accountTemporarilyLocked()\n {\n if (($this->getLastLoginAttempt('U') +\n sfConfig::get('app_sf_easy_auth_lockout_duration')) > time())\n {\n if ($this->getFailedLogins() >= sfConfig::get('app_sf_easy_auth_login_attempt_threshold'))\n {\n return true;\n }\n }\n\n return false;\n }"
] | [
"0.6055841",
"0.60446393",
"0.5912336",
"0.5912336",
"0.58115506",
"0.5806689",
"0.58028144",
"0.5741455",
"0.5705302",
"0.5672939",
"0.56654805",
"0.56635666",
"0.5653542",
"0.56402826",
"0.5582817",
"0.5576726",
"0.5555511",
"0.554246",
"0.55396605",
"0.55270225",
"0.55259156",
"0.552475",
"0.5506557",
"0.5489164",
"0.54803044",
"0.5476063",
"0.544098",
"0.54359573",
"0.5428361",
"0.54252815"
] | 0.6239338 | 0 |
Get start time (planned or actual) | public function getStarttime()
{
$starttime = $this->getExecutedAt();
if (empty($starttime) || $starttime == '0000-00-00 00:00:00') {
$starttime = $this->getScheduledAt();
}
return $starttime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getStartTime()\n\t{\n\t\treturn $this->start_time;\n\t}",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"public function getStartTime()\n {\n return $this->start_time;\n }",
"protected function getStartTime() {\n\t return (int)$this->getConfig('rublon_start_time');\n\t}",
"public function getStartTime()\n {\n return isset($this->start_time) ? $this->start_time : null;\n }",
"public function getTimeStart()\n\t{\n\t\treturn $this->timeStart;\n\t}",
"public function getStartTime()\n {\n return $this->_start_time;\n }",
"public function getStartTime()\n {\n return $this->start;\n }",
"public function getStartTime()\n {\n return $this->start;\n }",
"function getTimeStart();",
"public function getStartTime();",
"public function getStartTime();",
"public function getEventTimeStart()\n {\n }",
"public function getStartTimestamp() {\n\t\t\treturn $this->startTime ?? 0;\n\t\t}",
"public function getStartTs()\n {\n return $this->start_ts;\n }",
"function getStartTime() {\n\t\treturn $this->getData('startTime');\n\t}",
"public function getStart()\n {\n return $this->start->getTimestamp();\n }",
"public function startTime()\n {\n if (! $this->entity->start_date) {\n return '';\n }\n return $this->entity->start_date->format('H:i');\n }",
"public function getProposedStartDateTime()\n {\n return isset($this->proposed_start_date_time) ? $this->proposed_start_date_time : '';\n }",
"public function getStartTime(): int\n {\n return $this->started_at;\n }",
"public function get_starttime()\n {\n if ($this->startTime !== null) {\n return $this->startTime;\n }\n\n return null;\n }",
"public function getStartTime()\n {\n return $this->startTime;\n }",
"public function getStartDateTimestamp();",
"function getStartTime()\n {\n return $this->startTime;\n }",
"public function getStartTime()\n {\n return $this->startTime;\n }",
"public function getStartTime()\n {\n return $this->startTime;\n }"
] | [
"0.7651718",
"0.7553472",
"0.7553472",
"0.7553472",
"0.7553472",
"0.7553472",
"0.7553472",
"0.7536327",
"0.7527544",
"0.74920136",
"0.74445564",
"0.7407578",
"0.7407578",
"0.735658",
"0.7338633",
"0.7338633",
"0.73198605",
"0.7241908",
"0.7230964",
"0.71584725",
"0.7146808",
"0.7137231",
"0.7129125",
"0.711223",
"0.7074661",
"0.70245117",
"0.7022946",
"0.6998123",
"0.6997792",
"0.6997792"
] | 0.7607477 | 1 |
Is this process still alive? true > alive false > dead null > we don't know because the task is running on a different server | public function isAlive()
{
if ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
if (time() - strtotime($this->getLastSeen()) < 2 * 60) { // TODO: make this configurable
return true;
} elseif ($this->getHost() == gethostname()) {
if ($this->checkPid()) {
$this
->setLastSeen(strftime('%Y-%m-%d %H:%M:%S', time()))
->save();
return true;
} else {
$this->markAsDisappeared(sprintf('Process "%s" on host "%s" cannot be found anymore', $this->getPid(), $this->getHost()));
return false; // dead
}
} else {
// we don't know because the task is running on a different server
return null;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isAlive(): bool\n {\n return self::isProcessIdLive($this->processId);\n }",
"private function isAlive()\n\t{\n\t\treturn !self::$useForks\n\t\t\t || $this->isForked\n\t\t\t\t && 0 === pcntl_waitpid(\n\t\t\t\t\t\t\t$this->child_pid, $s, WNOHANG\n\t\t\t\t\t\t);\n\t}",
"protected function is_process_running() {\n\t\tif ( get_transient( $this->identifier . '_process_lock' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isRunning()\n {\n return $this->process->isRunning();\n }",
"public function isProcessRunning(){\n\t\tif (substr(php_uname(), 0, 7) == \"Windows\"){\n\t\t\tif($this->pid){\n\t\t\t\texec('tasklist /FI \" PID eq '.($this->pid).'\"',$op);\n\t\t\t\t$res = implode($op,\" \");\n\t\t\t\tif(preg_match('/\\b'.$this->pid.'\\b/',$res)){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t\t//Zend_Debug::dump();\n\n\t\t\t\t//exit;\n\t\t\t} else {\n\n\n\t\t\t\t//one can lookup based on the title part\n\t\t\t\t//die('tasklist /FI \"WINDOWTITLE eq instance_'.($this->instance_id).'\"');\n\t\t\t\texec('tasklist /nh /fo CSV /FI \"WINDOWTITLE eq instance_'.($this->instance_id).'\"',$op);\n\t\t\t\t$res = implode($op,\" \");\n\n\t\t\t\tif($res && !preg_match(\"/.*No tasks.*/\",$res)){\n\t\t\t\t\t$data = str_getcsv($res);\n\t\t\t\t\t//Zend_Debug::dump($data);\n\t\t\t\t\t$pid = $data[1];\n\t\t\t\t\t$this->pid = $pid;\n\t\t\t\t\t$this->save();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\t//look into the port\n\t\t\t\texec('netstat -na | find \"'.$this->port.'\"',$op);\n\t\t\t\tif(count($op) == 0){\n\t\t\t\t\treturn false; //best guess\n\t\t\t\t}\n\t\t\t\t//exit;\n\t\t\t\treturn true; //at least the port is taken\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t\t$command = 'ps -p '.$this->pid;\n exec($command,$op);\n if (!isset($op[1])) return false;\n else return true;\n\t}",
"public function checkpid() {\n\n if($this->pid()){\n return $this->respond([\"message\" => \"process is running...\"]);\n }\n\n return $this->respond([\"message\" => \"process has stopped...\"]);\n\n }",
"public function isRunning();",
"public function isRunning();",
"public function isRunning();",
"public function nodeProcessIsRunning()\n {\n if (! $this->importable_process_id) {\n return false;\n }\n\n if (app()->environment('testing')) {\n // When testing the process doesnt disapear but has process state code of `R` (running\n // or runnable (on run queue)). This condition may work even when no testing but in my\n // tests seems like an unnecesary extra condition that can cause troubles in production\n return posix_kill($this->importable_process_id, 0)\n && trim(shell_exec(\"ps aux | grep 'node' | grep '\" . $this->importable_process_id . \"' | grep -v 'ps aux' | awk '{print $8}'\")) === 'R+';\n }\n\n return posix_kill($this->importable_process_id, 0);\n }",
"public function isRunning()\n {\n return $this->status === 'running';\n }",
"public function isRunning(): bool;",
"public function isRunning()\n\t{\n\t\tif ($this->process) {\n\t\t\t$status = $this->getStatus(true);\n\n\t\t\treturn (bool) ($status['running']);\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isRunning()\n\t{\n\t\treturn proc_get_status($this->proc)['running'];\n\t}",
"function isAlive();",
"public function isAlive(): bool\n {\n return ($this->health > 0);\n }",
"public function isRunning() {\n return true;\n }",
"public static function is_running() {\n\t\tif (!file_exists(Config::$pid_file)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function is_running() {\n if (is_resource($this->process_handle)) {\n $stat = proc_get_status($this->process_handle);\n return ! (! $stat['running'] || $stat['signaled'] || $stat['stopped']);\n }\n return false;\n }",
"public static function isRunning()\r\n {\r\n $pidFilePath = base_path(\"storage/logs/pid\");\r\n return file_exists($pidFilePath) && \r\n !empty(file_get_contents($pidFilePath));\r\n }",
"public function isRunning() {\n return $this->isConnected();\n }",
"public function isAlive() {\n\n\t\t\tif ($this->health > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"protected function _isPidAlive($pid)\n {\n return ((function_exists('posix_getpgid') && posix_getpgid($pid)) || file_exists(\"/proc/{$pid}\")) ? true : false;\n }",
"public function isRunning(): bool\n {\n return proc_get_status($this->fileDescriptor)[\"running\"];\n }",
"public function isAlive(): bool\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->pdo->query('SELECT 1');\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function isRunning()\n {\n return $this->running;\n }",
"public function isRunning(): bool\n {\n return $this->is_running;\n }",
"public function IsRunning()\n {\n global $user_id;\n\n $process_id = (int) $this->process_id;\n\n // Return by default that is not running\n $toReturn = false;\n\n // If \n if($this->IsStarted() && $process_id > 0 && $process_id != null)\n {\n // Gets all current pids from layers instances \n exec(\"pgrep layers\", $pids);\n\n foreach ($pids as $pid) \n {\n // Only if the process_id is in the list, return true\n if($pid == $process_id)\n $toReturn = true;\n }\n }\n\n return $toReturn; \n }",
"public function isRunning()\n {\n #return ( $Cmd >= 1 ) ? true : false;\n }",
"public function isServerRunning()\n {\n $pid = $this->getServerPid();\n\n return !empty($pid);\n }"
] | [
"0.78193176",
"0.7638889",
"0.7043039",
"0.6951904",
"0.6929012",
"0.6847222",
"0.68053025",
"0.68053025",
"0.68053025",
"0.68009794",
"0.6768819",
"0.67183834",
"0.67088884",
"0.66976136",
"0.66421753",
"0.66412306",
"0.6631923",
"0.6623917",
"0.6595644",
"0.6581138",
"0.6548788",
"0.6538918",
"0.6526971",
"0.652226",
"0.65188795",
"0.65115535",
"0.6508239",
"0.6486525",
"0.6447095",
"0.64401317"
] | 0.8109688 | 0 |
Check if this is an "always" task | public function isAlwaysTask()
{
$isAlwaysTask = false;
try {
$job = $this->getJob();
$isAlwaysTask = $job && $job->isAlwaysTask();
} catch (Exception $e) {
Mage::logException($e);
}
return $isAlwaysTask;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function checkTask() : bool\n {\n\n $check = true;\n if (isset($_POST['task'])) {\n $task = $_POST['task'];\n\n if ($task === 'createMenuItem' && $this->checkNewItem()) {\n $this->task = $task;\n\n } elseif ($task === 'createMenuCategory' && $this->checkNewCategory()) {\n $this->task = $task;\n\n } else {\n $check = false;\n\n }\n } else {\n $check = false;\n }\n\n return $check;\n }",
"public function isScheduledTask()\n {\n return $this->type === EntryType::SCHEDULED_TASK;\n }",
"public static function hasTasks();",
"public function canAnyoneProcessTask()\r\n {\r\n return (!$this->hasTaskAssigned() && $this->content->getSpace()->isMember());\r\n }",
"public function canResetTask()\r\n {\r\n return (self::isTaskResponsible() && (self::isCompleted()));\r\n }",
"function ht_dms_task_mode() {\n\tif ( defined( 'HT_DMS_TASK_MODE' ) && HT_DMS_TASK_MODE ) {\n\t\treturn true;\n\n\t}\n}",
"protected function checkTaskData() {\n if (!$this->checkType()) {\n return false;\n }\n\n if (empty($this->time_exec)) {\n return false;\n }\n\n if (empty($this->task)) {\n return false;\n }\n\n return true;\n }",
"public function beforeExecute()\n {\n //echo \"[\".time().\"] \".__METHOD__.\" \".$this->taskReference.'@'.$this->taskType.PHP_EOL;\n $this->readyToExecute = true;\n return $this->readyToExecute;\n }",
"protected function task( $item ) {\n\n // Your Logic here\n return false;\n }",
"public function isScheduled();",
"public function tasks()\n {\n return (\n isset(Settings::getInstance()->MODULES['REW_ACTION_PLANS']) && !empty(Settings::getInstance()->MODULES['REW_ACTION_PLANS']) &&\n $this->auth->info('mode') == 'admin' && $this->auth->isSuperAdmin()\n ) ? true : false;\n }",
"public function is_scheduled() {\n\t\treturn (bool) $this->get_data();\n\t}",
"public function enableTask()\n {\n return $this->setTaskStage(2, 0, 3, false);\n }",
"public static function check_task($item)\n {\n // Set to lower!\n $item = strtolower($item);\n \n // Read session type\n $type = Pi_session::read(\"type\");\n if(!$type) return(false); // No type\n if($type == \"superuser\") return(true); // Superuser ok\n\n // Check if this item is set\n $tasks = Pi_session::read('tasks');\n if(!$tasks) return(false); // No tasks for this user\n\n // If it is set\n if(in_array($item, $tasks)) return(true);\n }",
"public function add_new_task_if_not_exist(): Bool\n {\n try {\n $result = null;\n if (!$this->is_task_in_cron()) {\n $result = wp_schedule_event(time(), $this->slug, $this->slug);\n }\n\n return null === $result;\n } catch (\\Exception $e) {\n throw $e;\n }\n }",
"function communityservice_task_loop() {\n\treturn have_posts() || 'tasks' !== communityservice_get_loop_display_mode();\n}",
"public function canHandleTask($task): bool\n {\n }",
"function ht_dms_is_task( $id = false ) {\n\n\treturn ht_dms_is( HT_DMS_TASK_POD_NAME, $id );\n\n}",
"public function runAlways() {\n\n }",
"public function isScheduled()\n {\n return (null !== $this->getPublishing() || null !== $this->getArchiving());\n }",
"public function canProcessTask(TaskInterface $task);",
"public function canReviewTask()\r\n {\r\n return (self::isTaskResponsible());\r\n }",
"public function testAnUrgentTask()\n {\n $subject = $this->_generateSubject();\n $actual = Task::anUrgentTask($subject);\n $expected = $this->getExpectedTask($subject, Task::PRIORITY_HIGH);\n\n $this->assertEquals($expected, $actual);\n\n }",
"public function testATask()\n {\n $subject = $this->_generateSubject();\n $actual = Task::aTask($subject);\n $expected = $this->getExpectedTask($subject, Task::PRIORITY_NORMAL);\n\n $this->assertEquals($expected, $actual);\n\n }",
"public function shouldContinueWorking(Task $task = null): bool\n {\n try {\n $optMaxTasks = $this->opt(self::OPT_MAX_TASKS);\n $optAlive = $this->opt(self::OPT_ALIVE);\n $restartTime = $this->cache->get(self::CACHE_RESTART, 0);\n $optUntilEmpty = $this->opt(self::OPT_UNTIL_EMPTY);\n\n if ($optMaxTasks > 0 && $optMaxTasks < $this->taskCount) {\n $this->exitReason = 'maximum number of tasks reached';\n return false;\n }\n if ($optAlive > 0 && $optAlive <= round(time() - $this->startTime)) {\n $this->exitReason = 'maximum alive time reached';\n return false;\n }\n if ($restartTime !== 0 && $restartTime > $this->startTime) {\n $this->exitReason = 'restart signal received';\n return false;\n }\n if ($optUntilEmpty && $task === null) {\n $this->exitReason = 'queue is now empty';\n return false;\n }\n\n return true;\n } catch (InvalidArgumentException $e) {\n $this->exitReason = 'cache read failed';\n return false;\n }\n }",
"public function isManualExecution(){\r\n\t\treturn $this->_isManual;\r\n\t}",
"static function always(){\n return true;\n \n }",
"public function start_from_start_checker() {\n\n if (in_array($this->request->entry_type,['pause','resume','end'])) {\n\n //if task has no entry , return error\n $msg = \"Please START this task first before you \".\n strtoupper($this->request->entry_type).\" it\";\n\n $this->task_has_entries($msg,false);\n\n //prerequisite to be checked when a task has more than 1 entry\n $this->check_on_entry_exists();\n }\n }",
"public function hasWaitaction(){\n return $this->_has(14);\n }",
"public function add_new_task(): Bool\n {\n try {\n $this->remove_task();\n $result = wp_schedule_event(time(), $this->slug, $this->slug);\n\n return null === $result;\n } catch (\\Exception $e) {\n throw $e;\n }\n }"
] | [
"0.6617297",
"0.6601964",
"0.6580515",
"0.6387404",
"0.6119138",
"0.6108513",
"0.60436755",
"0.6026435",
"0.6003972",
"0.6001221",
"0.5993814",
"0.597458",
"0.59261554",
"0.5826233",
"0.5822141",
"0.57913846",
"0.5730608",
"0.5720532",
"0.5678037",
"0.56508255",
"0.56301767",
"0.5603297",
"0.5597576",
"0.55748826",
"0.5565752",
"0.5553087",
"0.55514127",
"0.5543875",
"0.5542502",
"0.5520048"
] | 0.8066906 | 0 |
Processing object before save data Check if there are other schedules for the same job at the same time and skip saving in this case. | protected function _beforeSave()
{
if (!$this->getScheduledBy() && php_sapi_name() !== 'cli' && Mage::getSingleton('admin/session')->isLoggedIn()) {
$this->setScheduledBy(Mage::getSingleton('admin/session')->getUser()->getId());
}
$collection = Mage::getModel('cron/schedule')/* @var $collection Mage_Cron_Model_Resource_Schedule_Collection */
->getCollection()
->addFieldToFilter('status', Aoe_Scheduler_Model_Schedule::STATUS_PENDING)
->addFieldToFilter('job_code', $this->getJobCode())
->addFieldToFilter('scheduled_at', $this->getScheduledAt());
if ($this->getId() !== null) {
$collection->addFieldToFilter('schedule_id', array('neq' => $this->getId()));
}
$count = $collection->count();
if ($count > 0) {
$this->_dataSaveAllowed = false; // prevents this object from being stored to database
$this->log(sprintf('Pending schedule for "%s" at "%s" already exists %s times. Skipping.', $this->getJobCode(), $this->getScheduledAt(), $count));
} else {
$this->_dataSaveAllowed = true; // allow the next object to save (because it's not reset automatically)
}
return parent::_beforeSave();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function processSave()\r\r\n {\r\r\n\r\r\n\r\r\n if ($this->id_object) {\r\r\n $this->object = $this->loadObject();\r\r\n\r\r\n return $this->processUpdate();\r\r\n } else {\r\r\n return $this->processAdd();\r\r\n }\r\r\n }",
"public function dispatch_queue() {\n\t\tif ( ! empty( $this->data ) ) {\n\t\t\t$this->save()->dispatch();\n\t\t}\n\t}",
"protected function _processSchedule(array $data)\r\n\t{\r\n\t\t/**\r\n\t\t * Result of scheduling\r\n\t\t * \t1) a. change scheduling status to 3 or scheduled\r\n\t\t * \t b. update checkout stuff\r\n\t\t * 2) insert into baby studies\r\n\t\t * \t@todo: email researcher about study\r\n\t\t * \t@todo: email parent about study\r\n\t\t * \t@todo: google calendar functional\r\n\t\t **/\r\n\r\n\t\t$db = Zend_Registry::get('db');\r\n \r\n\t\t// Throw error if baby is already participating in this study\r\n\t\t$babyStudyTbl = new BabyStudy();\r\n\t\t$select = $babyStudyTbl->select()->where(\"baby_id = ?\", $data[\"baby_id\"])->where(\"study_id = ?\", $data[\"study_id\"]);\r\n\t\t$thisStudyRow = $babyStudyTbl->fetchAll($select);\r\n\t\tif(count($thisStudyRow)>0)\r\n\t\t\tthrow new Zend_Controller_Action_Exception(\"This baby is already scheduled for this study!\");\r\n \r\n\t\t// Set the appointment time\r\n\t\t$data['appointment'] = $data['appt_date'] . \" \" . $data['appt_time'];\r\n\t\tunset($data[\"appt_date\"]);\r\n\t\tunset($data[\"appt_time\"]);\r\n\t\t\r\n\t\t# 1. UPDATE CHECKOUT HISTORY (if checking out)\r\n\t\t$babyTbl = new Baby();\r\n\t\t$babySelect = $babyTbl->select()->where(\"id = ?\", $data[\"baby_id\"]);\r\n\t\t$babyRow = $babyTbl->fetchRow($babySelect);\r\n\t\tif ($babyRow->checked_out == 0) {\r\n\t\t\t$chTbl = new CheckoutHistory();\r\n\t\t\t$chData = array(\r\n\t\t\t\t\"baby_id\"\t\t=> $data[\"baby_id\"],\r\n\t\t\t\t\"study_id\"\t\t=> $data[\"study_id\"],\r\n\t\t\t\t\"checked_out\"\t=> 1\r\n\t\t\t);\r\n\t\t\t$chTbl->insert($chData);\r\n\t\t}\r\n\t\t\r\n\t\t# 2. UPDATE CHECKOUT + STATUS UPDATE\r\n\t\t$babyTbl = new Baby();\r\n\t\t$where = $db->quoteInto(\"id = ?\", $data[\"baby_id\"]);\r\n\t\t$babyData = array(\r\n\t\t\t\"checkout_date\"\t=> new Zend_Db_Expr('CURDATE()'),\r\n\t\t\t\"checkout_caller_id\" => $data[\"caller_id\"]\r\n\t\t);\r\n\t\t// Already scheduled for other studies?\r\n\t\tif($data[\"other_studies\"] != 1) {\r\n\t\t\t$babyData[\"status_id\"] = self::SCHEDULED;\r\n\t\t\t$babyData[\"checked_out\"] = 1;\r\n\t\t}\r\n\t\t$babyTbl->update($babyData, $where);\r\n\t\t\r\n\t\t# 3. ASSOCIATE BABY W/ STUDY\r\n\t\t$babyStudyTbl = new BabyStudy();\r\n\t\t$babyStudyTbl->filterInsert($data);\r\n\t\t\r\n\t\t# 4. Update any other studies\r\n\t\tif($data[\"other_studies\"] == 1) {\r\n\t\t\t// Fetch rows\r\n\t\t\t$babyStudyTbl = new BabyStudy();\r\n\t\t\t$select = $babyStudyTbl->select()\r\n\t\t\t\t->where(\"baby_id = ?\", $data[\"baby_id\"])\r\n\t\t\t\t->where(\"study_id != ?\", $data[\"study_id\"]);\r\n\t\t\t$babyStudyRows = $babyStudyTbl->fetchAll($select);\r\n\t\t\t// Loop through and save info\r\n\t\t\tforeach($babyStudyRows as $bsRow) {\r\n\t\t\t\t$bsRow->appointment = $data[\"appointment\"];\r\n\t\t\t\t$bsRow->appointment_end_time = $data[\"appointment_end_time\"];\r\n\t\t\t\t$bsRow->comments = $data[\"comments\"];\r\n\t\t\t\t$bsRow->save();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $data[\"appointment\"] . \" is SCHEDULED\";\r\n\t}",
"protected function process() {\n require_once 'libs/Auth.php';\n $userId = Auth::userId();\n\n require_once 'models/Job.php';\n $jobId = $this->param();\n\n $job = new Job($jobId);\n\n if($job->postedById() != $userId) {\n $err = Array(\n 'success' => false\n );\n $this->addRecord($err);\n return;\n }\n\n $status = $job->status();\n\n if($status == 'open') {\n $job->setStatus('closed');\n $job->saveToDb();\n $record = Array(\n 'success' => true,\n 'status' => 'closed'\n );\n $this->addRecord($record);\n }\n\n if($status == 'closed') {\n $job->setStatus('open');\n $job->saveToDb();\n $record = Array(\n 'success' => true,\n 'status' => 'open'\n );\n $this->addRecord($record);\n }\n }",
"public function processSaveData($data) {\n if (!empty($data->id)) {\n return;\n }\n\n if (!empty($data->dateAdded)) {\n return;\n }\n\n $data->dateAdded = time();\n }",
"protected function _preSave() {}",
"public function save()\n\t{\n\t//\tGoes to the workflow...\n\t\tif ($this->is_inflow() === true) parent::save();\n\t//\t...or just save the item\n\t\telse {$this->item->save();}\n\t}",
"public function processAfterSubmit()\n {\n // submitted\n //\n // override this method to perform any checks that need\n // to be done on the data that has been submitted\n }",
"protected function _preSave()\n {\n // Create logic that precedes saving of data into the database.\n }",
"public function afterObjectProcessed();",
"public function saveParticipateSchedule()\n {\n $data = $this->input->post(null, true);\n $result = ActivityParticipateScheduleService::getInstance()->save($data);\n $this->_success($result);\n }",
"protected function preSave()\n {\n parent::preSave();\n\n $this->setProcessed(false);\n\n return true;\n }",
"protected function handleCronjob()\n {\n $aUnmarkedOrders = $this->getUnmarkedShippedOrders();\n foreach ($aUnmarkedOrders as $sUnmarkedOrderId) {\n $oOrder = oxNew(Order::class);\n if ($oOrder->load($sUnmarkedOrderId) && $oOrder->mollieIsMolliePaymentUsed()) {\n $oOrder->mollieMarkOrderAsShipped();\n $this->outputInfo(\"Marked order-id \".$oOrder->getId().\" as shipped.\");\n }\n }\n return true;\n }",
"public function postFlush()\n {\n $currentDeepLevel = $this->deepLevel;\n\n if (!empty($this->entitiesScheduledForWorkflowStart[$currentDeepLevel])) {\n $this->deepLevel++;\n $massStartData = $this->entitiesScheduledForWorkflowStart[$currentDeepLevel];\n unset($this->entitiesScheduledForWorkflowStart[$currentDeepLevel]);\n $this->getWorkflowManager()->massStartWorkflow($massStartData);\n $this->deepLevel--;\n }\n }",
"protected function _preSave()\n {\n }",
"public function save(){\r\n\t\tif($this->id){\r\n\t\t\t$where = $this->getAdapter()->quoteInto('id = ?', $this->id);\r\n\t\t\t$this->update($this->scheduleData,$where);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->id = $this->insert($this->scheduleData);\r\n\t\t}\r\n\t}",
"protected function _postSave()\n {\n // Create logic that precedes saving of data into the database.\n }",
"protected function beforeValidate(){\n\t\t//\twill work with CDateTimeParser rather than the display format\n\t\tYii::log('Due date formatted: '.$this->formattedDueDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\tYii::log('Print date formatted : '.$this->formattedPrintDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\t\n\t\tYii::log('Due date before: '.$this->dueDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\tYii::log('Print date before : '.$this->printDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\t\n\t\t//TODO: should preserve null through strtotime here?\n\t\t$this->dueDate = date('Y-m-d', strtotime($this->dueDate));\n\t\t$this->printDate = date('Y-m-d', strtotime($this->printDate));\n\t\t\n\t\tYii::log('job scenario : '.$this->getScenario(), CLogger::LEVEL_TRACE, 'application.models.job');\n\t\t\n\t\t//TODO: only want to do this if we aren't in the update print date scenario\n\t\tif($this->isNewRecord === false && $this->printDate > $this->dueDate\n\t\t\t\t&& $this->getScenario() != \"update_printDate\"){\n\t\t\t$printEvent = $this->getEventModel(EventLog::JOB_PRINT);\n\t\t\t$printEvent->DATE = $this->dueDate;\n\t\t}\n\t\t\n\t\tYii::log('Due date after: '.$this->dueDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\tYii::log('Print date after: '.$this->printDate, CLogger::LEVEL_TRACE, 'application.models.job');\n\t\t\n\t\tif(parent::beforeValidate()){\n\t\t\tif($this->STATUS == null){\n\t\t\t\t$this->STATUS = Job::CREATED;\n\t\t\t}\n\t\t\t$valid = true;\n\t\t\tforeach($this->jobLines as $line){\n\t\t\t\t$line->JOB_ID = $this->ID;\n\t\t\t\t$valid = $valid && $line->validate();\n\t\t\t}\n\t\t\treturn $valid;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function onFlush(OnFlushEventArgs $args)\n {\n /** @var ProcessJob $entity */\n $unitOfWork = $args->getEntityManager()->getUnitOfWork();\n\n foreach ($unitOfWork->getScheduledEntityInsertions() as $entity) {\n if ($this->isSupported($entity) && $entity->getData()->isModified()) {\n $this->scheduledEntities[] = $entity;\n }\n }\n\n foreach ($unitOfWork->getScheduledEntityUpdates() as $entity) {\n if ($this->isSupported($entity) && $entity->getData()->isModified()) {\n $this->scheduledEntities[] = $entity;\n }\n }\n }",
"public function save_action()\n {\n if ($this->request->is('post')) {\n if ($this->ProcessReplays->save($this->request->data))\n $error = true;\n }\n $this->autoRender = false;\n }",
"public function process()\n {\n if (! $this->activationHelper->getIsActivated()) {\n return;\n }\n\n if ($this->canProcess()) {\n $data = [];\n $data['from_time'] = $this->cronLogHelper->getBulkPush();\n $data['to_time'] = $this->dateTime->date();\n $this->cronLogHelper->updateBulkPush();\n \n try {\n $this->uploader->create(['data' => $data])->process();\n } catch (LocalizedException $e) {\n $this->logger->error(__('Narvar Bulk Process - Unable to process : %1', $e->getMessage()));\n }\n }\n }",
"protected function afterSave() {\n\t\t// If admin assigned real delivery spec to already existing\n\t\t// partner delivery spec when we should update all projects\n\t\t// because now they can generate real projects, project jobs\n\t\t// and project job files.\n\t\tif (!$this->isNewRecord and $this->attributeChanged('delivery_spec_id') and $this->delivery_spec_id) {\n\t\t\t$partnerProjects = PartnerProject::model()->byPartnerDeliverySpec($this->id)->findAll();\n\t\t\tforeach ($partnerProjects as $partnerProject) {\n\t\t\t\t$partnerProject->save(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We do this after our code because we use AttributesBackupBehavior\n\t\t// and it updated values on afterSave, so we can determine\n\t\t// delivery_spec_id was changed only before behavior afterSave\n\t\t// method execution\n\t\tparent::afterSave();\n\t}",
"public function processUnchangedRecords()\n {\n $harvestedRecords = $this->parent()->getTaskData(\"harvestedRecordIDs\");\n\n if ($harvestedRecords === false || $harvestedRecords === null) {\n return;\n }\n\n $total = count($harvestedRecords);\n foreach ($harvestedRecords as $index => $roID) {\n// $this->log('Processing (unchanged) record: ' . $roID);\n// $this->log('setting harvest_id for not refreshed records: ' . $roID);\n if ($record = RegistryObject::find($roID)) {\n $record->setRegistryObjectAttribute('harvest_id',\n $this->parent()->batchID);\n $record->status = $this->parent()->getTaskData(\"targetStatus\");\n $record->save();\n // $this->updateProgress($index, $total, \"Processed ($index/$total) (unchanged) $record->title($roID) \");\n } else {\n $this->log(\"Unable to find RegistryObject ID: \". $roID);\n }\n }\n }",
"public function save() {\n\t\t// skip;\n\t}",
"public function postProcess($object)\n {\n }",
"public function processUpdate()\n {\n $old_object = parent::loadObject();\n if ($obj = parent::processUpdate()) {\n $this->saveCustomJsAndCss($obj->position.$obj->position_key, $old_object->position.$obj->position_key);\n }\n }",
"protected function _preSave()\n {\n // todo: determine what you will do before a save operation, document if you include\n }",
"public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}",
"function proccess_workload( $job )\n {\n $new = (isset($_REQUEST['new']))?$_REQUEST['new'] :null;\n\n //New job\n\n if( $new ) {\n\n $work = OCM_WORK_NAME;\n $start = 1;\n $end = 500;\n $count = 0;\n $refresh = true;\n $processing = true;\n\n } else {\n\n //Current Job\n\n if( ! is_array( $job ) ) die();\n\n extract($job);\n\n error_log('['.date('dmY').']got:'.json_encode( $job ).\"\\n\", 3, \"./activity.log\");\n\n }\n\n settype($work, \"string\" );\n settype($start, \"integer\");\n settype($end, \"integer\");\n settype($count, \"integer\");\n settype($refresh, \"boolean\");\n settype($processing, \"boolean\");\n\n $this->count = $count;\n\n $this->job = $this->write_job_file( array( 'work' => $work, 'start' => $start, 'end' => $end, 'count' => $count, 'refresh' => $refresh, 'processing' => $processing, 'error' => ( $work !== OCM_WORK_NAME ) ? 'Invalid Workload' : null ) );\n\n ob_end_clean();\n\n //DO JOB\n ////////\n\n $do_job = ( $work == OCM_WORK_NAME && $end !== 0 && $processing ) ? $this->do_job() : $this->job;\n\n //CHECK RESULT\n //////////////\n if( $this->job['start'] > OCM_TOTAL ) {\n $this->archive_zip();\n }\n\n if( $do_job['refresh'] ) {\n wp_schedule_single_event( time(), 'ocm_product_report', array( $this->job ) );\n\n } else {\n\n $this->job = $this->write_job_file( array( 'work' => OCM_WORK_NAME, 'start' => 1, 'end' => 500, 'count' => 0, 'refresh' => false, 'processing' => false ) ); \n wp_schedule_single_event( time(), 'ocm_product_report', array( $this->job ) );\n error_log('['.date('dmY').']got:'.json_encode($do_job).\"\\n\", 3, \"./activity.log\");\n }\n\n }",
"public function beforeSave(){\n\t\tif ($this -> isNewRecord) {\n\t\t\tif (($this -> id_call_type == CallType::model() -> getNumber('verifyed'))||($this -> id_call_type == CallType::model() -> getNumber('assigned'))) {\n\t\t\t\t//echo \"123\";\n\t\t\t\t$assign_time = $this -> giveAssignDate();\n\t\t\t\t$assign = getdate($assign_time);\n\t\t\t\t$date = getdate($this -> date);\n\t\t\t\tif ($assign [\"mon\"] != $date [\"mon\"]) {\n\t\t\t\t\t$this -> date = $assign_time;\n\t\t\t\t\t$this -> prev_month = 1;\n\t\t\t\t\t//echo \"next!\";\n\t\t\t\t}\n\t\t\t}//*/\n\t\t}\n\n\t\tif ($this -> date > 1376046800) {\n\t\t\t$this -> date = new CDbExpression('FROM_UNIXTIME('.$this -> date.')');\n\t\t}\n\t\tif ($this -> calledDate > 1376046800) {\n\t\t\t$this -> calledDate = new CDbExpression('FROM_UNIXTIME('.$this -> calledDate.')');\n\t\t}\n\t\treturn parent::beforeSave();\n\t}"
] | [
"0.6443592",
"0.6194046",
"0.60430795",
"0.60313964",
"0.59644276",
"0.595934",
"0.5899501",
"0.58822787",
"0.58204734",
"0.5769422",
"0.57651204",
"0.5737357",
"0.5704479",
"0.56844383",
"0.5674713",
"0.5591507",
"0.557447",
"0.5560949",
"0.55462074",
"0.5525696",
"0.5475016",
"0.54724544",
"0.5462543",
"0.54593426",
"0.54402083",
"0.5440052",
"0.5439814",
"0.5397164",
"0.5397076",
"0.53936553"
] | 0.7735344 | 0 |
Get parameters (and fallback to job) | public function getParameters()
{
if ($this->getData('parameters')) {
return $this->getData('parameters');
}
// fallback to job
$job = $this->getJob();
if ($job) {
return $job->getParameters();
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function getTaskParams();",
"public function getparams()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$app = JFactory::getApplication();\n\t\t\t$jinput = $app->input;\n\t\t\t$jform = $jinput->post->get('jform', array(), 'ARRAY');\n\t\t\t$plugin = $parent = null;\n\t\t\t$default = $jinput->get('default', 0, 'INT');\n\n\t\t\tif ($default && !empty($jform['plugin']))\n\t\t\t{\n\t\t\t\t$plugin = $jform['plugin'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$parent = isset($jform['parent']) ? $jform['parent'] : $jform['id'];\n\t\t\t}\n\n\t\t\t$model = $this->getModel('tjreport');\n\t\t\t$report = $model->getReportPluginData($parent, $plugin);\n\n\t\t\techo new JResponseJson($report);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo new JResponseJson($e);\n\t\t}\n\t}",
"abstract public function getOptionalParams();",
"public function get_params();",
"public function get_params();",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function getParameters()\n {\n $applicationConfig = $GLOBALS[\"app\"]->applicationConfig;\n $requestedUri = $_SERVER[\"REQUEST_URI\"];\n $parameters = split(\"/\", $requestedUri);\n\n if (substr($parameters[1], 0, 1) === '?')\n {\n $getString = str_replace('?', '', $parameters[1]);\n }\n\n if (isset($getString))\n {\n $parameters[1] = $applicationConfig[\"router\"][\"defaultController\"];\n $parameters[2] = $applicationConfig[\"router\"][\"defaultMethod\"];\n }\n else\n {\n if (!isset($parameters[1])) $parameters[1] = $applicationConfig[\"router\"][\"defaultController\"];\n if (!isset($parameters[2])) $parameters[2] = $applicationConfig[\"router\"][\"defaultMethod\"];\n\n if (empty($parameters[1])) $parameters[1] = $applicationConfig[\"router\"][\"defaultController\"];\n if (empty($parameters[2])) $parameters[2] = $applicationConfig[\"router\"][\"defaultMethod\"];\n }\n\n return $parameters;\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n global $data_source;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n}",
"function getParams()\r\n {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id = $id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode = $mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode = $view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode = $edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source = $data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab = $tab;\r\n }\r\n }",
"function getParameters();",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n $this->checkSettings();\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"private function params_with_defaults() {\n $pars = ['console', 'city', 'last-7-days', 'type', 'game', 'accessory', 'max-price'];\n\n return [\n 'console' => isset($this->params['console']) ? $this->params['console'] : '',\n 'city' => isset($this->params['city']) ? $this->params['city'] : '',\n 'last-7-days' => isset($this->params['last-7-days']) ? $this->params['last-7-days'] : '',\n 'type' => isset($this->params['type']) ? $this->params['type'] : '',\n 'game' => isset($this->params['game']) ? $this->params['game'] : '',\n 'accessory' => isset($this->params['accessory']) ? $this->params['accessory'] : '',\n 'max-price' => isset($this->params['max-price']) ? $this->params['max-price'] : '0'\n ];\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function getJobConfig($jobname) {\n #if a consumers job get default consumers runner config\n if (strpos($jobname,\"mm_consumer\") > -1) {\n $job = $this->config[\"consumers_runner\"];\n $job[\"name\"] = $jobname;\n } elseif (isset($this->config[$jobname])) {\n $job = $this->config[$jobname];\n } else {\n $job = false;\n }\n return $job;\n }",
"protected function get_default_params() {\n\n\t\treturn apply_filters(\n\t\t\t'wp_mail_smtp_providers_mailer_get_default_params',\n\t\t\tarray(\n\t\t\t\t'timeout' => 15,\n\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t'blocking' => true,\n\t\t\t),\n\t\t\t$this->mailer\n\t\t);\n\t}",
"public function getParams()\n {\n return $this->defaults;\n }",
"public function getParams() {}",
"abstract public function getRequiredParams();",
"public static function getPossibleParameters();",
"function paramGet($name,$default=null) {\n\t\t$hash = get_class();\n\t\t$session = JFactory::getSession();\n\t\t$params = $session->get('DefaultParams',false,$hash); // Get cached parameteres\n\t\tif (empty($params) || empty($params[$name])) {\n\t\t\t//$xmlfile = dirname(__FILE__).'/'.basename(__FILE__,'.php').'.xml';\n\t\t\t$xmlfile = $this->plg_path.'/'.$this->plg_name.'.xml';\n\t\t\t$xml = simplexml_load_file($xmlfile);\n\t\t\t//unset ($xml->scriptfile);\n\t\t\t$field = 'field';\n\t\t\t$xpath = 'config/fields/fieldset';\n\n\t\t\tforeach ($xml->xpath('//'.$xpath.'/'.$field) as $f) {\n\t\t\t\tif (isset($f['default']) ) {\n\t\t\t\t\tif (preg_match('~[0-9]+,[0-9]*~',(string)$f['default'])) {\n\t\t\t\t\t\t$params[(string)$f['name']] = explode (',',(string)$f['default']);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$params[(string)$f['name']] = (string)$f['default'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$session->set('DefaultParams',$params,$hash);\n\t\t}\n\t\tif (!isset ($params[$name])) {\n\t\t\t$params[$name] = $default;\n\t\t}\n\t\treturn $this->params->get( $name,$params[$name]);\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams ();",
"public function getParameters();",
"public function getParameters();"
] | [
"0.68549967",
"0.6030627",
"0.59014887",
"0.58757085",
"0.58757085",
"0.5855953",
"0.5851774",
"0.5787328",
"0.57555205",
"0.5750142",
"0.57370305",
"0.57332754",
"0.56881326",
"0.56881326",
"0.5655073",
"0.56363416",
"0.56363416",
"0.5625774",
"0.56192505",
"0.5618465",
"0.5608848",
"0.5602512",
"0.5591337",
"0.55836326",
"0.5581821",
"0.5581821",
"0.5581821",
"0.55778766",
"0.5571394",
"0.5571394"
] | 0.6323901 | 1 |
Switch the job error context | protected function jobErrorContext()
{
if (!Mage::getStoreConfigFlag('system/cron/enableErrorLog')) {
return;
}
$settings = array(
'error_reporting' => intval(Mage::getStoreConfig('system/cron/errorLevel')),
'log_errors' => true,
'display_errors' => true,
'error_log' => $this->getErrorLogFile()
);
restore_error_handler();
// (doesn't work for PHP 5.3) set_error_handler(null); // switch to PHP default error handling
if (!is_dir(dirname($settings['error_log']))) {
mkdir(dirname($settings['error_log']), 0775, true);
}
foreach ($settings as $key => $value) {
// backup original settings first
$this->errorSettingsBackup[$key] = ini_get($key);
// set new value
ini_set($key, $value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function runErrorMode();",
"public function failed()\n {\n // Called when the job is failing...\n }",
"protected function restoreErrorContext()\n {\n if (!Mage::getStoreConfigFlag('system/cron/enableErrorLog')) {\n return;\n }\n\n restore_error_handler();\n foreach ($this->errorSettingsBackup as $key => $value) {\n ini_set($key, $value);\n }\n }",
"public function failure(JobResult $result)\n {}",
"function _setInputErrorToContext()\n\t{\n\t\tif($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE'] && !Context::get('XE_VALIDATOR_MESSAGE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE', $_SESSION['XE_VALIDATOR_MESSAGE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] && !Context::get('XE_VALIDATOR_MESSAGE_TYPE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE_TYPE', $_SESSION['XE_VALIDATOR_MESSAGE_TYPE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_RETURN_URL'] && !Context::get('XE_VALIDATOR_RETURN_URL'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_RETURN_URL', $_SESSION['XE_VALIDATOR_RETURN_URL']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_ID'] && !Context::get('XE_VALIDATOR_ID'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ID', $_SESSION['XE_VALIDATOR_ID']);\n\t\t}\n\t\tif(count($_SESSION['INPUT_ERROR']))\n\t\t{\n\t\t\tContext::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);\n\t\t}\n\n\t\t$this->_clearErrorSession();\n\t}",
"public function failed()\n\t{\n\t\t//This is handled in the constructor so it won't send failed emails just because the handle() method is empty\n//\t\t$this->sendFailedJobEmail();\n\t}",
"function setErrorStatus($submittedJob)\n {\n $video = $this->video->findorfail($submittedJob[\"id\"]);\n $video->job_status = 'Error';\n $video->save();\n \n $filePath = base_path('public' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'videos' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $submittedJob[\"fine_uploader_uuid\"] . DIRECTORY_SEPARATOR . $submittedJob[\"fine_uploader_name\"]);\n $folderPath = base_path('public' . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'videos' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . $submittedJob[\"fine_uploader_uuid\"]);\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n if (file_exists($folderPath)) {\n rmdir($folderPath);\n }\n }",
"function fail() {\n\t\t$this->set_error('fail');\n\t}",
"public function error(DateTime $when , $msg = '')\n {\n $this->current_state = WorkerConfig::STATE_ERROR;\n \n # create the transition entity\n $trans = new Transition();\n \n $trans->setWorker($this->getId());\n $trans->setState(WorkerConfig::STATE_ERROR);\n $trans->setOccured($when);\n $trans->setMessage($this->definition->getWorkerName() .' Worker ERROR :: '.$msg);\n \n # unlock jobs \n \n # raise the finish event\n $this->event->dispatch(WorkerEventsMap::WORKER_ERROR,new WorkerTransitionEvent($this,$trans));\n }",
"public static function error_handler($errno, $errstr, $errfile, $errline, $errcontext)\r\n\t{\r\n self::log()->log_error($errno, $errstr, $errfile, $errline, $errcontext);\r\n\t}",
"public function markAsFailed();",
"public function setAsFailed();",
"abstract protected function errorReporting();",
"protected function postprocessErrorAction()\n {\n \\XLite\\Core\\TopMessage::getInstance()->addBatch($this->getErrorMessages(), \\XLite\\Core\\TopMessage::ERROR);\n\n $method = __FUNCTION__ . ucfirst($this->currentAction);\n\n if (method_exists($this, $method)) {\n // Run corresponded function\n $this->$method();\n }\n\n $this->setActionError();\n }",
"public function store(FailedJob $job);",
"public function error($message, array $context = array());",
"public function failed(JobInterface $job, array $options = array());",
"public function errorCommand()\n {\n trigger_error('oo, this is a runtime error!', E_USER_ERROR);\n }",
"function errors( $errno , $errstr, $errfile, $errline, $errcontext ){\n\n\t// Set it up\n\t$GLOBALS[\"bento\"]->error( $errstr . \". Line \" . $errline . \" in \" . $errfile . \".\" );\n\t\n// method\n}",
"public function actionError() {\n\n parent::error();\n }",
"function myErrorHandler($errno, $errstr, $errfile, $errline, $errcontext){\n\n\t$mytext = date(\"Y-m-d h:i:s\").'|';\n\n if (!(error_reporting() & $errno)) {\n // Ce code d'erreur n'est pas inclus dans error_reporting()\n return;\n }\n\n switch ($errno) {\n case E_USER_ERROR:\n\t\t$mytext .= \"Erreur E_USER_ERROR : [$errno] $errstr - Erreur fatale sur la ligne $errline dans le fichier $errfile - PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")\\r\\n\";\n\t\tWriteInFile($mytext);\n exit(1);\n break;\n\n case E_USER_WARNING:\n $mytext .= \"ALERTE : [$errno] $errstr - ligne $errline dans le fichier $errfile\\\\r\\n\";\n\t\tWriteInFile($mytext);\n break;\n\n case E_USER_NOTICE:\n $mytext .= \"AVERTISSEMENT : [$errno] $errstr - ligne $errline dans le fichier $errfile\\\\r\\n\";\n\t\tWriteInFile($mytext);\n break;\n\n default:\n $mytext .= \"Type d'erreur inconnu : [$errno] $errstr - ligne $errline dans le fichier $errfile\\n\";\n\t\tWriteInFile($mytext);\n break;\n }\n\n\tif(IN_PRODUCTION)\n\t\t/* Ne pas exécuter le gestionnaire interne de PHP */\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"function error()\r\n {\r\n }",
"function myErrorHandler($errno, $errstr, $errfile, $errline, array $errcontext) {\n\t// error was suppressed with the @-operator\n\tif (0 === error_reporting()) {\n\t\treturn false;\n\t}\n\tthrow new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}",
"function app_ajax_error_handler(\n $in_errno,\n $in_errstr,\n $in_errfile,\n $in_errline,\n $in_errcontext\n)\n{\n $customErrorMsg = 'We are sory , but an unexpected error has occured during performing your action.';\n //throw new SystemException($customErrorMsg, $in_errstr, $in_errfile, $in_errline);\n die(json_encode(array('Error message' => $customErrorMsg, 'Error' => $in_errstr, 'Error file' => $in_errfile, 'Error line' => $in_errline)));\n}",
"function errorHandler2($errno, $errstr, $errfile, $errline, $errcontext){\n $log = \"Error[$errno] on \" . date(\"d/m/Y H:i:s\") . \"\\r\\n\";\n $log .= \"Details: $errstr. \\r\\n\";\n $log .= \"Location: In $errfile on line $errline. \\r\\n\";\n // print_r($errcontext, true) yeh karna bht jaruri hai otherwise error ke bare mai store ni hoga and print_r ko true krna jaruri hai.\n $log .= \"Variables: \" . print_r($errcontext, true) . \"\\r\\n\";\n \n // error_log yeh error ka log maintain karega pehele ek variable pass karenge then , '3' ka matlb error ko login krke dekhna hai, then uski location dalenge \"logs/errorhandlingerrors.log\" = isme 'logs' namm ka folder hai joh ki create kar rakha hai and 'errorhandlingerrors.log' naam ki file joh ki hum jab ban jayegi logs wale folder mai jab error_log chalega. \n error_log($log, 3, \"logs/errorhandlingerrors.log\");\n error_log($log, 1, \"[email protected]\");// yeh email pe bejega '1' email ka code hai.\n die(\"<p>An error occured, please try again!</p>\"); // agar koi error aa jayegi toh die chalega.and script yahi se exit ho jayegi.\n}",
"function piecrust_error_handler($errno, $errstr, $errfile = null, $errline = 0, $errcontext = null)\r\n{\r\n if (error_reporting() & $errno)\r\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\r\n return;\r\n}",
"public function markAsFailed()\n {\n $this->update(['status' => 'failed']);\n\n StackTaskFailed::dispatch($this);\n }",
"public function handleFailedJob(JobFailed $event): void\n {\n $processedJob = $event->job;\n $payload = $processedJob->payload();\n\n // We'll firstly attempt to get the haystack from the payload. The reason\n // we do this first, is because if we attempt to unserialize the job\n // first and the haystack is deleted, it will throw an exception\n // because the model now longer exists.\n\n $haystack = $this->getHaystackFromPayload($payload);\n\n if (! $haystack instanceof Haystack) {\n return;\n }\n\n // We will next attempt to decode the \"command\" from the job payload.\n // The command data contains a serialized version of the job.\n\n $job = $this->unserializeJobFromPayload($payload);\n\n if (! $job instanceof StackableJob) {\n return;\n }\n\n // If allow failures is turned on, we'll dispatch the next job.\n\n if ($haystack->options->allowFailures === true) {\n $haystack->dispatchNextJob($job);\n\n return;\n }\n\n // Otherwise we'll fail the Haystack\n\n $haystack->fail();\n }",
"function _DefaultErrorHandler() {\n\n}",
"protected function error(){ \n }"
] | [
"0.6515919",
"0.6066834",
"0.57620555",
"0.574834",
"0.57050943",
"0.567926",
"0.5602646",
"0.558005",
"0.55706185",
"0.55633754",
"0.5556789",
"0.554013",
"0.5510106",
"0.5499843",
"0.5498447",
"0.54847676",
"0.5464399",
"0.5401612",
"0.5388361",
"0.5385521",
"0.5375745",
"0.5371966",
"0.53517824",
"0.5336453",
"0.53335166",
"0.5331512",
"0.5321144",
"0.53126335",
"0.52909476",
"0.5288082"
] | 0.72848713 | 0 |
Restore the original error context | protected function restoreErrorContext()
{
if (!Mage::getStoreConfigFlag('system/cron/enableErrorLog')) {
return;
}
restore_error_handler();
foreach ($this->errorSettingsBackup as $key => $value) {
ini_set($key, $value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function restore()\n {\n return restore_error_handler();\n }",
"protected function resetError()\n {\n $this->error = null;\n }",
"protected function restoreErrorHandler()\n {\n $this->lastIconvError = false;\n restore_error_handler();\n }",
"public function resetErrors();",
"public function restore() {\n\t\tif (!ModelManager::getInstance()->isCachingContext()) {\n\t\t\tthrow new ComhonException('error function restore may be called only in caching context');\n\t\t}\n\t\tif (is_string($this->model)) {\n\t\t\t$this->model = ModelManager::getInstance()->getNotLoadedInstanceModel($this->model);\n\t\t} else {\n\t\t\t$this->model->restore();\n\t\t}\n\t}",
"function _setInputErrorToContext()\n\t{\n\t\tif($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE'] && !Context::get('XE_VALIDATOR_MESSAGE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE', $_SESSION['XE_VALIDATOR_MESSAGE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] && !Context::get('XE_VALIDATOR_MESSAGE_TYPE'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_MESSAGE_TYPE', $_SESSION['XE_VALIDATOR_MESSAGE_TYPE']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_RETURN_URL'] && !Context::get('XE_VALIDATOR_RETURN_URL'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_RETURN_URL', $_SESSION['XE_VALIDATOR_RETURN_URL']);\n\t\t}\n\t\tif($_SESSION['XE_VALIDATOR_ID'] && !Context::get('XE_VALIDATOR_ID'))\n\t\t{\n\t\t\tContext::set('XE_VALIDATOR_ID', $_SESSION['XE_VALIDATOR_ID']);\n\t\t}\n\t\tif(count($_SESSION['INPUT_ERROR']))\n\t\t{\n\t\t\tContext::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']);\n\t\t}\n\n\t\t$this->_clearErrorSession();\n\t}",
"public static function restoreErrorHandler(){\r\n //Restore the php engine error handler\r\n set_error_handler(null);\r\n }",
"protected function jobErrorContext()\n {\n if (!Mage::getStoreConfigFlag('system/cron/enableErrorLog')) {\n return;\n }\n\n $settings = array(\n 'error_reporting' => intval(Mage::getStoreConfig('system/cron/errorLevel')),\n 'log_errors' => true,\n 'display_errors' => true,\n 'error_log' => $this->getErrorLogFile()\n );\n\n restore_error_handler();\n // (doesn't work for PHP 5.3) set_error_handler(null); // switch to PHP default error handling\n\n if (!is_dir(dirname($settings['error_log']))) {\n mkdir(dirname($settings['error_log']), 0775, true);\n }\n\n foreach ($settings as $key => $value) {\n // backup original settings first\n $this->errorSettingsBackup[$key] = ini_get($key);\n // set new value\n ini_set($key, $value);\n }\n }",
"private function ResetError()\n {\n $this->error_desc = '';\n $this->error_number = 0;\n }",
"private function rewindErrorHandler()\n {\n $dummyHandler = function ($level, $message) { return false; };\n\n while (set_error_handler($dummyHandler)) {\n // Unsets the error handler we just set.\n restore_error_handler();\n // Unsets the previous error handler.\n restore_error_handler();\n }\n\n // Restores the built-in error handler.\n restore_error_handler();\n }",
"public function retrace ()\n {\n $this->getBundle (MapperFactory::getLanguageMapper ()->getFromToken ('original'))->disable ();\n }",
"protected function clear_error() {\n\t\t$this->error_code = 0;\n\t\t$this->error_message = '';\n\t}",
"public function resetError()\n {\n $this->notImplemented();\n }",
"public function errorResetAll() {\n\t\tif ($this->is_api) {\n\t\t\t$general = [];\n\t\t} else {\n\t\t\t$general = $this->errors['general'] ?? [];\n\t\t}\n\t\t$this->errors = [\n\t\t\t'flag_error_in_fields' => false,\n\t\t\t'flag_warning_in_fields' => false,\n\t\t\t'flag_num_errors' => 0,\n\t\t\t'general' => $general,\n\t\t];\n\t}",
"private function clearError()\n {\n $this->error = array();\n }",
"public static function reset() {\r\n self::$_exceptions = array();\r\n }",
"protected function resetEventErrors()\n {\n $this->eventErrors = [];\n }",
"public static function clean()\n {\n if (self::$stack) {\n restore_error_handler();\n }\n\n self::$stack = array();\n }",
"abstract public function restore();",
"private function slCleanError()\n {\n $this->response_error = 0;\n $this->response_error_message = '';\n }",
"function objectRestore()\n {\n }",
"function objectRestore()\n {\n }",
"function error_reset()\n {\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, \"PclXmlTag::error_reset\", \"\"); \n $v_result = PCLXML_ERR_NO_ERROR;\n\n if (isset($this->working_data['error_code'])) {\n unset($this->working_data['error_code']);\n }\n if (isset($this->working_data['error_message'])) {\n unset($this->working_data['error_message']);\n }\n \n // ----- Return\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\n return $v_result;\n }",
"protected function refrescar()\r\n\t\t{\r\n\t\t}",
"protected function revert()\n {\n }",
"public function clear_error() {\r\n\t\t$this->error = false;\r\n\t}",
"public function unwrapErr();",
"function ps_restore($psdoc): void\n{\n error_clear_last();\n $safeResult = \\ps_restore($psdoc);\n if ($safeResult === false) {\n throw PsException::createFromPhpError();\n }\n}",
"public function reset()\n {\n $this->_modified = [];\n $this->_errors = [];\n }",
"public function resetValidationErrors();"
] | [
"0.68038523",
"0.6796479",
"0.67588097",
"0.6677172",
"0.6508596",
"0.6505966",
"0.6259513",
"0.6215821",
"0.61421746",
"0.5924846",
"0.592368",
"0.5875164",
"0.58702517",
"0.58343375",
"0.5804434",
"0.5791928",
"0.5784661",
"0.57824796",
"0.5765527",
"0.5731998",
"0.57287",
"0.57287",
"0.5703372",
"0.57013565",
"0.56942165",
"0.5679131",
"0.56300527",
"0.56231076",
"0.56002975",
"0.5587797"
] | 0.7526394 | 0 |
Get error log filename | public function getErrorLogFile()
{
$replace = array(
'###PID###' => $this->getPid(),
'###ID###' => $this->getId(),
'###JOBCODE###' => $this->getJobCode()
);
$basedir = Mage::getBaseDir('log') . DS . 'cron' . DS;
return $basedir . str_replace(array_keys($replace), array_values($replace), Mage::getStoreConfig('system/cron/errorLogFilename'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getErrorFileName()\n {\n return self::_createFileName(self::FILE_ERRORS);\n }",
"public function getLogFilename()\n {\n return $this->filename;\n }",
"public function getLogFileName(): string\n {\n return $this->logFileName;\n }",
"public function getLogFileName()\n {\n $logFileName = \"duitku_\" . date('Ymd') . \".log\";\n return $logFileName;\n }",
"public static function getLogFileName(){\r\n return self::$logfilename;\r\n }",
"public static function getErrorRecordsFileName()\n {\n return self::_createFileName(self::FILE_ERROR_RECORDS);\n }",
"public function getFileName()\n {\n return $this->logFile;\n }",
"protected function get_log_file_basename() {\n\t\treturn apply_filters( 'tribe_file_logger_file_prefix', $this->module_id . '_' );\n\t}",
"protected function getChangelogFilename() {\n return metaFN($this->id, '.changes');\n }",
"protected function getFilename()\n {\n return 'laravel' . ($this->isCli() ? '-cli' : '') . '.log';\n }",
"public function get_filename_log_debug () {\n\n return $this->debug_file_name;\n }",
"private function _getFilename() {\n $debug = debug_backtrace();\n return $debug[1][file];\n }",
"public static function getLogFilePath()\n {\n $configList = DirectoryList::getDefaultConfig();\n return BP . DIRECTORY_SEPARATOR . $configList[DirectoryList::VAR_DIR]['path'] . DIRECTORY_SEPARATOR . DirectoryList::LOG;\n }",
"public function get_log_file_path() {\n\t\treturn $this->log_file_path;\n\t}",
"abstract protected function getChangelogFilename();",
"function getFilename() {\n $debug = debug_backtrace();\n return $debug[0][file];\n }",
"protected function filename()\n {\n return 'AccessLog_' . date('YmdHis');\n }",
"protected function getChangelogFilename() {\n return mediaMetaFN($this->id, '.changes');\n }",
"public function getLogFilePath() {\n\t\t$path = $this->getSanitisedLogFilePath();\n\n\t\t// for backwards compatibility on old logs\n\t\tif (!file_exists($path)) {\n\t\t\t$path = $this->getRawFilePath();\n\n\t\t\tif (!file_exists($path)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn $path;\n\t}",
"protected function get_log_file_name( $date = null ) {\n\t\tif ( null === $date ) {\n\t\t\t$date = date_i18n( 'Y-m-d' );\n\t\t}\n\n\t\t$filename = $this->log_dir . DIRECTORY_SEPARATOR . $this->get_log_file_basename() . $date . '.log';\n\n\t\t/**\n\t\t * Dictates the filename of the log used to record events for the specified date.\n\t\t *\n\t\t * @var string $filename\n\t\t * @var string $date\n\t\t */\n\t\treturn apply_filters( 'tribe_file_logger_filename', $filename, $date );\n\t}",
"public function logErrorPath($modelName){\n\t\t\n\t\t$this->log = new Logger('name');\n\t\t$orgId = \\Illuminate\\Support\\Facades\\Session::get('selectedOrg');\n\t\t$projectId = \\Illuminate\\Support\\Facades\\Session::get('selectedProject');\n\t\t$type = 'Error';\n\t\t$logPah = \"\\logs\\\\\".$orgId.\"\\\\\".$projectId.\"\\\\\".$modelName.\"\\\\\". $type.\"\\\\\".\"logs_\".date('Y-m-d').'.log';\n\t\t$storage_path = storage_path();\t\n\t\t\t\n\t\t//$this->log->pushHandler(new StreamHandler($storage_path.$logPah));\n\t\treturn $storage_path.$logPah;\t\t\n\t}",
"public static function getErrorRecordsWithoutErrorFileName()\n {\n return self::_createFileName(self::FILE_ERROR_RECORDS_ONLY);\n }",
"public function file(): string\n {\n return $this->errfile;\n }",
"protected function getLogFile() {\n return $this->getLogDir() . '/kissmetrics_query.log';\n }",
"public function getLogFile()\n {\n return $this->_log_file;\n }",
"public function getLogFile(): string;",
"public function getSanitisedLogFilePath() {\n\t\treturn $this->basePath . '/' . strtolower(FileNameFilter::create()->filter($this->logFile));\n\t}",
"public function getLogFilePath()\n {\n return $this->logFilePath;\n }",
"abstract function getErrorLogMessage();",
"protected function getLastError() : string\n\t{\n\t\t$data = \\error_get_last();\n\t\tif(null === $data)\n\t\t\treturn '(no error)';\n\t\t\n\t\treturn 'File : '.$data['file'].' ; Line : '.((string) $data['line']).' ; Message : '.$data['message'];\n\t}"
] | [
"0.8018665",
"0.7712712",
"0.74438614",
"0.7429471",
"0.7312559",
"0.73027885",
"0.71816546",
"0.705949",
"0.7014411",
"0.67892593",
"0.67616683",
"0.6732665",
"0.6726112",
"0.65895826",
"0.6587539",
"0.6585313",
"0.65766215",
"0.65028256",
"0.65016514",
"0.6500275",
"0.6490366",
"0.6485521",
"0.63564694",
"0.6344872",
"0.633332",
"0.6330134",
"0.63214046",
"0.62808025",
"0.62663954",
"0.62539214"
] | 0.7923756 | 1 |
Redirect all output to the messages field of this Schedule. We use ob_start with `_addBufferToMessages` to redirect the output. | protected function _startBufferToMessages()
{
if (!Mage::getStoreConfigFlag('system/cron/enableJobOutputBuffer')) {
return $this;
}
if ($this->_redirect) {
return $this;
}
$this->addMessages('---START---' . PHP_EOL);
ob_start(
array($this, '_addBufferToMessages'),
$this->_redirectOutputHandlerChunkSize
);
$this->_redirect = true;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _stopBufferToMessages()\n {\n if (!Mage::getStoreConfigFlag('system/cron/enableJobOutputBuffer')) {\n return $this;\n }\n\n if (!$this->_redirect) {\n return $this;\n }\n\n ob_end_flush();\n $this->addMessages('---END---' . PHP_EOL);\n\n $this->_redirect = false;\n\n return $this;\n }",
"public function do_output_buffer() {\n ob_start();\n }",
"public static function collectOutput()\n {\n\n ob_start();\n\n }",
"function ob_flush () {}",
"public function start_buffering() : void {\n\t\t\tob_start( array( $this, 'staging_url_override' ) );\n\t\t}",
"function ob_get_flush () {}",
"public static function recordOutput(){\n ob_start();\n }",
"public function startPageOutputBuffering()\n {\n ob_start( array( 'self', 'callback' ) );\n }",
"function ob_implicit_flush ($flag = true) {}",
"function ob_end_flush () {}",
"protected function _makeOutputProcessing()\n {\n $oOutput = oxNew(\"oxOutput\");\n $this->setBody($oOutput->process($this->getBody(), \"oxemail\"));\n $this->setAltBody($oOutput->process($this->getAltBody(), \"oxemail\"));\n $oOutput->processEmail($this);\n }",
"protected function startOutputBuffer() {\n\t\t$this->isBufferingEnabled = true;\n\t\tif (is_null($this->startingObLevel)) {\n\t\t\t$this->startingObLevel = ob_get_level();\n\t\t}\n\t\tob_start();\n\t}",
"public function ProcessOutputBuffer()\n\t{\n\t\tob_clean();\n\t\tflush();\n\t}",
"public static function start(){\n ob_start();\n register_shutdown_function(array(__CLASS__, 'shutdown'));\n }",
"private function _buffer_flush()\n {\n switch ($this->_browser) {\n default:\n echo str_repeat(' ', 1024 * 4);\n while (ob_get_level()) {\n ob_end_flush();\n }\n\n if (ob_get_length()) {\n @ob_flush();\n @flush();\n @ob_end_flush();\n }\n @ob_start();\n break;\n }\n }",
"public static function start()\n {\n ob_start();\n }",
"function flushLogDisplayMessage() {\n\n if (isset($this->lastMessage)) {\n $tps = Html::timestampToString(time() - $this->lastMessage['time']);\n $this->log($tps . ' for \"' . $this->lastMessage['msg'] . '\"', false);\n unset($this->lastMessage);\n }\n }",
"public function init()\n {\n parent::init();\n ob_start();\n ob_implicit_flush(false);\n }",
"private function flush(): void\n {\n $keepWriting = true;\n while ($keepWriting) {\n $message = $this->messages[0]['message'];\n $promise = $this->messages[0]['promise'];\n\n $bytesWritten = @\\fwrite($this->output, $message);\n\n if ($bytesWritten > 0) {\n $message = (string)\\substr($message, $bytesWritten);\n }\n\n // Determine if this message was completely sent\n if (\\strlen($message) === 0) {\n \\array_shift($this->messages);\n\n // This was the last message in the queue, remove the write handler.\n if (\\count($this->messages) === 0) {\n Loop\\removeWriteStream($this->output);\n $keepWriting = false;\n }\n\n $promise->fulfill();\n } else {\n $this->messages[0]['message'] = $message;\n $keepWriting = false;\n }\n }\n }",
"public function end_buffering() : void {\n\t\t\tregister_shutdown_function(\n\t\t\t\tfunction() {\n\t\t\t\t\tob_end_flush();\n\t\t\t\t}\n\t\t\t);\n\t\t}",
"public function clearAllOutput() {\n\t\twhile (ob_get_level() > $this->startingObLevel) {\n\t\t\tob_end_clean();\n\t\t}\n\t\t$this->startOutputBuffer();\n\t}",
"public function write(): void\n {\n if (empty($this->_messages)) {\n // There is nothing to write, move along\n return;\n }\n\n // Import all messages locally\n $messages = $this->_messages;\n\n // Reset the messages array\n $this->_messages = [];\n\n foreach ($this->_writers as $writer) {\n if (empty($writer['levels'])) {\n // Write all of the messages\n $writer['object']->write($messages);\n } else {\n // Filtered messages\n $filtered = [];\n\n foreach ($messages as $message) {\n if (in_array($message['level'], $writer['levels'], true)) {\n // Writer accepts this kind of message\n $filtered[] = $message;\n }\n }\n\n // Write the filtered messages\n $writer['object']->write($filtered);\n }\n }\n }",
"function ob_implicit_flush($flag = false)\n{\n}",
"function flush() {\n $this->start();\n foreach ($this->log->getSortedJournal() as $entry) {\n $entry->send();\n }\n }",
"private function sendOutput()\n\t{\n\t\t$this->registry->output->html .= $this->html->convertFooter();\n\t\t$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();\n\t\t$this->registry->output->sendOutput();\n\t\texit;\n\t}",
"public function send()\n\t{\n\t\t// ob_end_clean();\n\n\t\techo $this->content;\n\n\t\tflush();\n\n\t\texit;\n\t}",
"private function sendOutput()\r\n\t\t{\r\n\t\t\t$this->registry->output->html .= $this->html->convertFooter();\r\n\t\t\t$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();\r\n\t\t\t$this->registry->output->sendOutput();\r\n\t\t\texit;\r\n\t\t}",
"public function process_slp_clear_schedule_messages() {\n\t $messages = SLP_Message_Manager::get_instance( array( 'slug' => 'schedule' ) );\n\t $messages->clear_messages();\n\t die( 'ok' );\n }",
"public function collect($messages, $final)\n {\n $this->messages = array_merge($this->messages, static::filterMessages($messages, $this->getLevels(), $this->categories, $this->except));\n $count = count($this->messages);\n if ($count > 0 && ($final || $this->exportInterval > 0 && $count >= $this->exportInterval)) {\n if (($context = $this->getContextMessage()) !== '') {\n $this->messages[] = [$context, Logger::LEVEL_INFO, 'application', YII_BEGIN_TIME];\n }\n // set exportInterval to 0 to avoid triggering export again while exporting\n $oldExportInterval = $this->exportInterval;\n $this->exportInterval = 0;\n $this->export();\n $this->exportInterval = $oldExportInterval;\n\n $this->messages = [];\n }\n }",
"public function startOb(){ ob_start(array(&$this, 'fallbackOb'));\n }"
] | [
"0.6921155",
"0.60693747",
"0.6023384",
"0.5707687",
"0.5661397",
"0.56536776",
"0.561752",
"0.55778164",
"0.5574294",
"0.5533673",
"0.5479751",
"0.543404",
"0.5426428",
"0.5398947",
"0.5364775",
"0.5328351",
"0.5319846",
"0.5274117",
"0.52684987",
"0.5257853",
"0.52569395",
"0.5209052",
"0.5192152",
"0.51584804",
"0.5151163",
"0.51182646",
"0.51167065",
"0.50970846",
"0.50933653",
"0.5075893"
] | 0.7219736 | 0 |
Stop redirecting all output to the messages field of this Schedule. We use ob_end_flush to stop redirecting the output. | protected function _stopBufferToMessages()
{
if (!Mage::getStoreConfigFlag('system/cron/enableJobOutputBuffer')) {
return $this;
}
if (!$this->_redirect) {
return $this;
}
ob_end_flush();
$this->addMessages('---END---' . PHP_EOL);
$this->_redirect = false;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function end_buffering() : void {\n\t\t\tregister_shutdown_function(\n\t\t\t\tfunction() {\n\t\t\t\t\tob_end_flush();\n\t\t\t\t}\n\t\t\t);\n\t\t}",
"function ob_end_flush () {}",
"static public function stop()\n\t{\n\t\tif (!self::$started) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'Output buffering can not be stopped since it has not been started'\n\t\t\t);\n\t\t}\n\t\tif (self::$capturing) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'Output capturing is currently active and it must be stopped before buffering can be stopped'\n\t\t\t);\n\t\t}\n\n\t\t// Only flush if there is content to push out, otherwise\n\t\t// we might prevent headers from being sent\n\t\tif (ob_get_contents()) {\n\t\t\tob_end_flush();\n\t\t} else {\n\t\t\tob_end_clean();\n\t\t}\n\n\t\tself::$started = FALSE;\n\t}",
"public function clearAllOutput() {\n\t\twhile (ob_get_level() > $this->startingObLevel) {\n\t\t\tob_end_clean();\n\t\t}\n\t\t$this->startOutputBuffer();\n\t}",
"public function endPageOutputBuffering()\n {\n ob_end_flush();\n }",
"function ob_flush () {}",
"function ob_get_flush () {}",
"function ob_implicit_flush ($flag = true) {}",
"protected function disableOutputBuffer() {\n\t\t$this->isBufferingEnabled = false;\n\n\t\t$this->sendHeaders();\n\n\t\t$this->headers = array();\n\t\t$this->cookies = array();\n\n\t\twhile (ob_get_level() > $this->startingObLevel) {\n\t\t\t$this->output->out(ob_get_clean());\n\t\t}\n\t\t$this->startingObLevel = null;\n\t}",
"public function end()\n {\n if ($this->_outputBuffer == 'head') {\n $this->_head = ob_get_clean();\n } elseif ($this->_outputBuffer == 'body') {\n $this->_body = ob_get_clean();\n } else {\n die('You must first run the start method.');\n }\n }",
"public function process_slp_clear_schedule_messages() {\n\t $messages = SLP_Message_Manager::get_instance( array( 'slug' => 'schedule' ) );\n\t $messages->clear_messages();\n\t die( 'ok' );\n }",
"function ob_implicit_flush($flag = false)\n{\n}",
"function flushLogDisplayMessage() {\n\n if (isset($this->lastMessage)) {\n $tps = Html::timestampToString(time() - $this->lastMessage['time']);\n $this->log($tps . ' for \"' . $this->lastMessage['msg'] . '\"', false);\n unset($this->lastMessage);\n }\n }",
"protected function _startBufferToMessages()\n {\n if (!Mage::getStoreConfigFlag('system/cron/enableJobOutputBuffer')) {\n return $this;\n }\n\n if ($this->_redirect) {\n return $this;\n }\n\n $this->addMessages('---START---' . PHP_EOL);\n\n ob_start(\n array($this, '_addBufferToMessages'),\n $this->_redirectOutputHandlerChunkSize\n );\n\n $this->_redirect = true;\n\n return $this;\n }",
"private function flush(): void\n {\n $keepWriting = true;\n while ($keepWriting) {\n $message = $this->messages[0]['message'];\n $promise = $this->messages[0]['promise'];\n\n $bytesWritten = @\\fwrite($this->output, $message);\n\n if ($bytesWritten > 0) {\n $message = (string)\\substr($message, $bytesWritten);\n }\n\n // Determine if this message was completely sent\n if (\\strlen($message) === 0) {\n \\array_shift($this->messages);\n\n // This was the last message in the queue, remove the write handler.\n if (\\count($this->messages) === 0) {\n Loop\\removeWriteStream($this->output);\n $keepWriting = false;\n }\n\n $promise->fulfill();\n } else {\n $this->messages[0]['message'] = $message;\n $keepWriting = false;\n }\n }\n }",
"public function ProcessOutputBuffer()\n\t{\n\t\tob_clean();\n\t\tflush();\n\t}",
"function ob_end_clean () {}",
"public static function endOB($msg = '')\n {\n echo '<p style=\"color: grey; margin: 3px;\"><small>' . $msg . '</small></p>';\n sleep(3);\n echo '<pageBreak style=\"page-break-after: always;\"></pageBreak>';\n echo str_repeat(' ', self::$browserBufferLength);\n echo '</div>';\n echo '<script>let sl = document.getElementById(\"showProgressLoading\");sl.innerHTML=\"\";</script>'; # 清空\n ob_end_flush();\n }",
"private static function cleanOutput() \n\t\t{\n for($level=ob_get_level();$level>0;--$level)\n {\n @ob_end_clean();\n }\n }",
"protected static function clear(): void{\n ob_end_clean();\n }",
"private function flushOutput() {\n echo '.';\n ob_flush();\n flush();\n }",
"public function send()\n\t{\n\t\t// ob_end_clean();\n\n\t\techo $this->content;\n\n\t\tflush();\n\n\t\texit;\n\t}",
"protected function disableOb()\n {\n ini_set('output_buffering', 'off');\n // Turn off PHP output compression\n //ini_set('zlib.output_compression', false);\n // Implicitly flush the buffer(s)\n ini_set('implicit_flush', true);\n ob_implicit_flush(true);\n // Clear, and turn off output buffering\n while (ob_get_level() > 0) {\n // Get the curent level\n $level = ob_get_level();\n // End the buffering\n ob_end_clean();\n // If the current level has not changed, abort\n if (ob_get_level() == $level) {\n break;\n }\n }\n // Disable apache output buffering/compression\n if (function_exists('apache_setenv')) {\n apache_setenv('no-gzip', '1');\n apache_setenv('dont-vary', '1');\n }\n }",
"public function do_output_buffer() {\n ob_start();\n }",
"public static function clean()\n {\n ob_clean();\n }",
"function output($disable_return_id=false)\n\t{\n\t\t$this->finalize($disable_return_id);\n\t\t$this->dump_queue();\n\t}",
"public function end() {\n\t\t\tob_end_flush();\n\t\t\t$this->_endCapture = true;\n\t\t}",
"function mbtng_discard_output() {\r\n\tif (mbtng_display_page() && mbtng_use_tng_homepage()) {\r\n\t\tob_clean();\r\n\t\t// Remove actions in case loop used elsewhere (e.g. in sidebar)\r\n\t\tremove_action('loop_start', 'mbtng_output_page');\r\n\t\tremove_action('loop_end', 'mbtng_discard_output');\r\n\t}\r\n\r\n}",
"public static function End()\r\n {\r\n $data = ob_get_contents();\r\n ob_end_flush();\r\n \r\n self::write(self::$group, self::$id, self::$ttl, $data);\r\n }",
"public function output(bool $remove = true): void\n {\n foreach ($this->messages as $message) {\n echo $message;\n }\n\n if (true === $remove) {\n parent::clear();\n }\n }"
] | [
"0.6625656",
"0.65170085",
"0.62990683",
"0.6245861",
"0.6232044",
"0.6217547",
"0.6147028",
"0.61360186",
"0.6011045",
"0.58932006",
"0.5877544",
"0.58209354",
"0.5773519",
"0.57297647",
"0.5692893",
"0.5692878",
"0.56923705",
"0.56590647",
"0.5659001",
"0.5649552",
"0.56491315",
"0.56371564",
"0.5629881",
"0.5627822",
"0.5601078",
"0.5592959",
"0.5569813",
"0.5552311",
"0.5535519",
"0.5533534"
] | 0.71835953 | 0 |
Save the messages directly to the schedule record. If the `messages` field was not updated in the database, check if this is because of `data truncation` and fix the message length. | public function saveMessages()
{
if (!$this->getId()) {
return $this->save();
}
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
/* @var $connection Varien_Db_Adapter_Interface */
$count = $connection
->update(
$this->getResource()->getMainTable(),
array('messages' => $this->getMessages()),
array('schedule_id = ?' => $this->getId())
);
if (!$count) {
/**
* Check if the row was not updated because of data truncation.
*/
$warning = $this->_getPdoWarning($connection->getConnection());
if ($warning && $warning->Code = 1265) {
$maxLength = strlen($this->getMessages()) - 5000;
$this->setMessages($warning->Level . ': ' .
str_replace(' at row 1', '.', $warning->Message) . PHP_EOL . PHP_EOL .
'...' . substr($this->getMessages(), -$maxLength));
}
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Save(): void {\n if($this->ID === null) {\n $this->ID = Expression::Insert()\n ->Into(\"Messenger.Messages\")\n ->Values(\n [\n \"ID\" => $this->ID,\n \"Sender\" => $this->Sender,\n \"Recipient\" => $this->Recipient,\n \"Status\" => $this->Status,\n \"Date\" => $this->Date,\n \"Text\" => $this->Text\n ]\n )\n ->ID();\n } else {\n //Only the transmission status of Messages are mutable after creation.\n Expression::Update(\"Messenger.Messages\")\n ->Set([\"Status\" => $this->Status])\n ->Where([\"ID\" => $this->ID])\n ->Execute();\n }\n }",
"public function saveMessage()\n {\n return $this->database()->insert($this->_sTable, array(\n 'sms_text' => $this->preParse()->clean($this->smsInfo['message'], 255),\n 'phone_number' => $this->smsInfo['phone'],\n 'owner_user_id' => Phpfox::getUserId(),\n 'viewer_user_id' => $this->smsInfo['user-id'],\n 'sms_status_id' => '0',\n 'viewer_is_new' => '1',\n 'time_stamp' => PHPFOX_TIME,\n 'sms_server_id' => $this->smsInfo['sms-id']\n ));\n }",
"function save() {\n\t\t$return = false;\n\t\tif ( $this->isModified() ) {\n\t\t\t$message = '';\n\t\t\tif ( !$this->isValid($message) ) {\n\t\t\t\tthrow new systemException($message);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ( $this->_Modified ) {\n\t\t\t\t$query = '\n\t\t\t\tINSERT INTO '.system::getConfig()->getDatabase('mofilm_content').'.userPrivateMessages\n\t\t\t\t\t( messageID, toUserID, fromUserID, subject, message, status, createDate, readDate)\n\t\t\t\tVALUES \n\t\t\t\t\t(:MessageID, :ToUserID, :FromUserID, :Subject, :Message, :Status, :CreateDate, :ReadDate)\n\t\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\t\ttoUserID=VALUES(toUserID),\n\t\t\t\t\tfromUserID=VALUES(fromUserID),\n\t\t\t\t\tsubject=VALUES(subject),\n\t\t\t\t\tmessage=VALUES(message),\n\t\t\t\t\tstatus=VALUES(status),\n\t\t\t\t\tcreateDate=VALUES(createDate),\n\t\t\t\t\treadDate=VALUES(readDate)';\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$oDB = dbManager::getInstance();\n\t\t\t\t\t$oStmt = $oDB->prepare($query);\n\t\t\t\t\t$oStmt->bindValue(':MessageID', $this->_MessageID);\n\t\t\t\t\t$oStmt->bindValue(':ToUserID', $this->_ToUserID);\n\t\t\t\t\t$oStmt->bindValue(':FromUserID', $this->_FromUserID);\n\t\t\t\t\t$oStmt->bindValue(':Subject', $this->_Subject);\n\t\t\t\t\t$oStmt->bindValue(':Message', $this->_Message);\n\t\t\t\t\t$oStmt->bindValue(':Status', $this->_Status);\n\t\t\t\t\t$oStmt->bindValue(':CreateDate', $this->_CreateDate);\n\t\t\t\t\t$oStmt->bindValue(':ReadDate', $this->_ReadDate);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tif ( $oStmt->execute() ) {\n\t\t\t\t\t\tif ( !$this->getMessageID() ) {\n\t\t\t\t\t\t\t$this->setMessageID($oDB->lastInsertId());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t$oLog = mofilmUserPrivateMessageLog::getInstance($this->getMessageID());\n\t\t\t\t\t\t\t$oLog->setMessageID($this->getMessageID());\n\t\t\t\t\t\t\t$oLog->setFromUserID($this->getFromUserID());\n\t\t\t\t\t\t\t$oLog->setMessage($this->getMessage());\n\t\t\t\t\t\t\t$oLog->setSentDate($this->getCreateDate());\n\t\t\t\t\t\t\t$oLog->setSubject($this->getSubject());\n\t\t\t\t\t\t\t$oLog->setToUserID($this->getToUserID());\n\t\t\t\t\t\t\t$oLog->save();\n\t\t\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t\t\tsystemLog::error($e->getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->setModified(false);\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t}\n\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\tsystemLog::error($e->getMessage());\n\t\t\t\t\tthrow $e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}",
"public function meetingMessageSave()\n {\n $rules = Validator::make(Request::all(), [\n 'accessToken' => 'required',\n 'userId' => 'required',\n 'meetingId' => 'required',\n 'userRole' => 'required',\n 'messageText' => 'required'\n ]);\n if ($rules->fails()) {\n $this->status = 'Validation fails';\n $this->message = 'arguments missing';\n \n } else {\n $accessToken = Request::get('accessToken');\n $userId = Request::get('userId');\n $meetingId = Request::get('meetingId');\n $userRole = Request::get('userRole');\n $messageText = Request::get('messageText');\n $getUser = User::where('id', '=', $userId)->where('site_token','=',$accessToken)->first();\n if(!empty($getUser)){\n if($userRole=='Receiver'){\n $getGiverData=DB::table('requests')->where('requests.id','=',$meetingId)->get();\n //Add message in requests_messages table\n if(!empty($getGiverData)){\n $messageData=new Message;\n $messageData->request_id=$meetingId;\n $messageData->sender_id=$userId;\n $messageData->giver_id=$getGiverData[0]->user_id_giver;\n $messageData->receiver_id=$userId;\n $messageData->message_type='user';\n $messageData->messageText=$messageText;\n $messageData->save();\n $meetingTrailData=DB::table('requests_messages')->where('request_id','=',$meetingId)->orderBy('created_at','ASC')->get();\n $meetingMessageData=array();\n if(!empty($meetingTrailData)){\n foreach ($meetingTrailData as $key => $value) {\n if($value->message_type=='user'){\n if($value->sender_id==$value->giver_id){\n $meetingMessageData[$key]['messageUser']='Giver';\n $meetingMessageData[$key]['userId']=$value->giver_id;\n }else if($value->sender_id==$value->receiver_id){\n $meetingMessageData[$key]['messageUser']='Receiver';\n $meetingMessageData[$key]['userId']=$value->receiver_id;\n } \n }else{\n $meetingMessageData[$key]['messageUser']='System';\n $meetingMessageData[$key]['userId']='0';\n }\n $meetingMessageData[$key]['messageText']=$value->messageText;\n $meetingMessageData[$key]['date']=date('Y-m-d H:i:s', strtotime($value->created_at));\n } \n }\n \n $changeStatus=KarmaHelper::updateMeetingStatus($meetingId,$userRole);\n $this->status = 'success';\n $this->message = 'Message is successfully saved.';\n return Response::json(array('status'=>$this->status,\n 'message'=>$this->message,\n 'meetingTrailData'=>$meetingMessageData\n ));\n }else{\n $this->status = 'failure';\n $this->message = 'Please enter correct meeting id.';\n } \n }else if($userRole=='Giver'){\n $getReceiverData=DB::table('requests')->where('requests.id','=',$meetingId)->get();\n //Add message in requests_messages table\n if($getReceiverData[0]->status=='pending'){\n DB::table('users_mykarma')->where('entry_id','=',$meetingId)->update(array('status' => 'responded','entry_updated_on' => Carbon::now()));\n DB::table('requests')->where('id','=',$meetingId)->update(array('status' => 'responded'));\n }\n if(!empty($getReceiverData)){\n $messageData=new Message;\n $messageData->request_id=$meetingId;\n $messageData->sender_id=$userId;\n $messageData->giver_id=$userId;\n $messageData->receiver_id=$getReceiverData[0]->user_id_receiver;\n $messageData->message_type='user';\n $messageData->messageText=$messageText;\n $messageData->save();\n $meetingTrailData=DB::table('requests_messages')->where('request_id','=',$meetingId)->orderBy('created_at','ASC')->get();\n $meetingMessageData=array();\n if(!empty($meetingTrailData)){\n foreach ($meetingTrailData as $key => $value) {\n if($value->message_type=='user'){\n if($value->sender_id==$value->giver_id){\n $meetingMessageData[$key]['messageUser']='Giver';\n $meetingMessageData[$key]['userId']=$value->giver_id;\n }else if($value->sender_id==$value->receiver_id){\n $meetingMessageData[$key]['messageUser']='Receiver';\n $meetingMessageData[$key]['userId']=$value->receiver_id;\n } \n }else{\n $meetingMessageData[$key]['messageUser']='System';\n $meetingMessageData[$key]['userId']='0';\n }\n $meetingMessageData[$key]['messageText']=$value->messageText;\n $meetingMessageData[$key]['date']=date('Y-m-d H:i:s', strtotime($value->created_at));\n } \n }\n $meetingData=Meetingrequest::find($meetingId);\n if($meetingData->status=='pending'){\n DB::table('users_mykarma')->where('entry_id','=',$meetingId)->update(array('status' => 'responded'));\n DB::table('requests')->where('id','=',$meetingId)->update(array('status' => 'responded')); \n }\n $changeStatus=KarmaHelper::updateMeetingStatus($meetingId,$userRole);\n $this->status = 'success';\n $this->message = 'Message is successfully saved.';\n return Response::json(array('status'=>$this->status,\n 'message'=>$this->message,\n 'meetingTrailData'=>$meetingMessageData\n ));\n }else{\n $this->status = 'failure';\n $this->message = 'Please enter correct meeting id.';\n } \n }else{\n $this->status = 'failure';\n $this->message = 'Please enter correct user role.';\n }\n \n }else{\n $this->status = 'failure';\n $this->message = 'You are not a login user.';\n }\n }\n return Response::json(array('status'=>$this->status,\n 'message'=>$this->message,\n \n ));\n }",
"function save() {\n\t\tif ( strlen ($this->_dao->get('subject')) < 1 ) {\n\t\t\t$this->_dao->set('subject',\n\t\t\t\tsubstr($this->_dao->get('message'),0,25).'...');\n\t\t}\n\t\treturn $this->_dao->save();\n\t}",
"public function postUpdateScheduleSMS(Request $request)\n {\n\n $self = 'send-schedule-sms';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $v = \\Validator::make($request->all(), [\n 'phone_number' => 'required', 'schedule_time' => 'required'\n ]);\n\n if ($v->fails()) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->withInput($request->all())->withErrors($v->errors());\n }\n\n $schedule_sms = CampaignSubscriptionList::find($request->cmd);\n\n if (!$schedule_sms) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => 'SMS info not found',\n 'message_important' => true\n ]);\n }\n\n if (\\DateTime::createFromFormat('m/d/Y h:i A', $request->schedule_time) !== FALSE) {\n $schedule_time = date('Y-m-d H:i:s', strtotime($request->schedule_time));\n } else {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => language_data('Invalid time format'),\n 'message_important' => true\n ]);\n }\n\n $campaign = Campaigns::where('campaign_id', $schedule_sms->campaign_id)->first();\n\n if (!$campaign) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->with([\n 'message' => 'SMS info not found',\n 'message_important' => true\n ]);\n }\n\n $msg_type = $campaign->sms_type;\n $message = $request->message;\n\n if ($msg_type == 'plain' || $msg_type == 'voice' || $msg_type == 'mms') {\n $msgcount = strlen(preg_replace('/\\s+/', ' ', trim($message)));\n if ($msgcount <= 160) {\n $msgcount = 1;\n } else {\n $msgcount = $msgcount / 157;\n }\n }\n if ($msg_type == 'unicode' || $msg_type == 'arabic') {\n $msgcount = mb_strlen(preg_replace('/\\s+/', ' ', trim($message)), 'UTF-8');\n\n if ($msgcount <= 70) {\n $msgcount = 1;\n } else {\n $msgcount = $msgcount / 67;\n }\n }\n\n $msgcount = ceil($msgcount);\n\n $blacklist = BlackListContact::where('user_id', 0)->select('numbers')->get()->toArray();\n\n if ($blacklist && is_array($blacklist) && count($blacklist) > 0) {\n $blacklist = array_column($blacklist, 'numbers');\n }\n\n if (in_array($request->phone_number, $blacklist)) {\n return redirect('sms/manage-update-schedule-sms/' . $request->cmd)->withInput($request->all())->with([\n 'message' => language_data('Phone number contain in blacklist'),\n 'message_important' => true\n ]);\n }\n\n $clphone = str_replace(['(', ')', '+', '-', ' '], '', $request->phone_number);\n\n CampaignSubscriptionList::where('id', $request->cmd)->where('campaign_id', $campaign->campaign_id)->update([\n 'number' => $clphone,\n 'amount' => $msgcount,\n 'message' => $message,\n 'submitted_time' => $schedule_time\n ]);\n\n return redirect('sms/manage-campaign/' . $campaign->id)->with([\n 'message' => language_data('SMS are scheduled. Deliver in correct time')\n ]);\n\n }",
"public function save() {\n\n\t\t// We can't use the empty function because it doesn't work with Countable object.\n\t\tif ( ! count( $this->records ) ) {\n\t\t\treturn;\n\t\t}\n\t\tglobal $wpdb;\n\t\t$sql = 'INSERT INTO ' . self::get_table_name() . ' ( `id`, `title`, `message`, `types`, `create_at`, `form_id`, `entry_id`, `user_id` ) VALUES ';\n\t\tforeach ( $this->records as $record ) {\n\t\t\t$sql .= $wpdb->prepare(\n\t\t\t\t'( NULL, %s, %s, %s, %s, %d, %d, %d ),',\n\t\t\t\t$record->get_title(),\n\t\t\t\t$record->get_message(),\n\t\t\t\timplode( ',', $record->get_types() ),\n\t\t\t\t$record->get_date( 'sql' ),\n\t\t\t\t$record->get_form_id(),\n\t\t\t\t$record->get_entry_id(),\n\t\t\t\t$record->get_user_id()\n\t\t\t);\n\t\t}\n\t\t$sql = rtrim( $sql, ',' );\n\n\t\t//phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching\n\t\t//phpcs:disable WordPress.DB.PreparedSQL.NotPrepared\n\t\t$wpdb->query( $sql );\n\t\t//phpcs:enable WordPress.DB.DirectDatabaseQuery.NoCaching\n\t\t//phpcs:enable WordPress.DB.PreparedSQL.NotPrepared\n\t\twp_cache_delete( self::CACHE_TOTAL_KEY );\n\t}",
"private function redeliverMessages(): void\n {\n if (null === $this->redeliverMessagesLastExecutedAt) {\n $this->redeliverMessagesLastExecutedAt = \\microtime(true);\n } elseif ((\\microtime(true) - $this->redeliverMessagesLastExecutedAt) < 1) {\n return;\n }\n\n $this->connection->createQueryBuilder()\n ->update($this->tableName)\n ->set('delivery_id', ':deliveryId')\n ->andWhere('redeliver_after < :now')\n ->andWhere('delivery_id IS NOT NULL')\n ->setParameter(':now', new \\DateTimeImmutable(), Type::DATETIMETZ_IMMUTABLE)\n ->setParameter(':deliveryId', null, UuidBinaryType::NAME)\n ->execute()\n ;\n\n $this->redeliverMessagesLastExecutedAt = \\microtime(true);\n }",
"public function save ()\n {\n if ( $this->objMysql === null )\n {\n $this->getConnection ();\n }\n\n if ( trim ($this->app_msg_uid) === \"\" )\n {\n $id = $this->objMysql->_insert (\"workflow.APP_MESSAGE\", [\n \"MSG_UID\" => $this->msg_uid,\n \"APP_UID\" => $this->app_uid,\n \"CASE_UID\" => $this->caseId,\n \"DEL_INDEX\" => $this->del_index,\n \"APP_MSG_TYPE\" => $this->app_msg_type,\n \"APP_MSG_SUBJECT\" => $this->app_msg_subject,\n \"APP_MSG_FROM\" => $this->app_msg_from,\n \"APP_MSG_TO\" => $this->app_msg_to,\n \"APP_MSG_BODY\" => $this->app_msg_body,\n \"APP_MSG_DATE\" => $this->app_msg_date,\n \"APP_MSG_CC\" => $this->app_msg_cc,\n \"APP_MSG_BCC\" => $this->app_msg_bcc,\n \"APP_MSG_TEMPLATE\" => $this->app_msg_template,\n \"APP_MSG_STATUS\" => $this->app_msg_status,\n \"APP_MSG_ATTACH\" => $this->app_msg_attach,\n \"APP_MSG_SEND_DATE\" => $this->app_msg_send_date,\n \"APP_MSG_SHOW_MESSAGE\" => $this->app_msg_show_message,\n \"APP_MSG_ERROR\" => $this->app_msg_error]\n );\n\n return $id;\n }\n else\n {\n $this->objMysql->_update (\"workflow.APP_MESSAGE\", [\n \"MSG_UID\" => $this->msg_uid,\n \"APP_UID\" => $this->app_uid,\n \"CASE_UID\" => $this->caseId,\n \"DEL_INDEX\" => $this->del_index,\n \"APP_MSG_TYPE\" => $this->app_msg_type,\n \"APP_MSG_SUBJECT\" => $this->app_msg_subject,\n \"APP_MSG_FROM\" => $this->app_msg_from,\n \"APP_MSG_TO\" => $this->app_msg_to,\n \"APP_MSG_BODY\" => $this->app_msg_body,\n \"APP_MSG_DATE\" => $this->app_msg_date,\n \"APP_MSG_CC\" => $this->app_msg_cc,\n \"APP_MSG_BCC\" => $this->app_msg_bcc,\n \"APP_MSG_TEMPLATE\" => $this->app_msg_template,\n \"APP_MSG_STATUS\" => $this->app_msg_status,\n \"APP_MSG_ATTACH\" => $this->app_msg_attach,\n \"APP_MSG_SEND_DATE\" => $this->app_msg_send_date,\n \"APP_MSG_SHOW_MESSAGE\" => $this->app_msg_show_message,\n \"APP_MSG_ERROR\" => $this->app_msg_error], [\"APP_MSG_UID\" => $this->app_msg_uid]\n );\n }\n }",
"public function saveMessage(array $data, $messageId = null);",
"public function process_slp_clear_schedule_messages() {\n\t $messages = SLP_Message_Manager::get_instance( array( 'slug' => 'schedule' ) );\n\t $messages->clear_messages();\n\t die( 'ok' );\n }",
"protected function saveTaskContent()\n {\n\n // Validate Body\n if (empty($this->row['body'])) {\n throw new Exception_ValidationError('Email Message Required');\n }\n\n if (!empty($this->row['body']) || !empty($this->row['doc_id'])) {\n $query = $this->db->prepare(sprintf(\n \"INSERT INTO `%s` SET \"\n . \" `task_id` = :task_id, \"\n . \" `subject` = :subject, \"\n . \" `body` = :body, \"\n . \" `doc_id` = :doc_id \"\n . \" ON DUPLICATE KEY UPDATE \"\n . \" `subject` = :subject, \"\n . \" `body` = :body, \"\n . \" `doc_id` = :doc_id \"\n . \";\",\n $this->settings->TABLES['LM_TASK_EMAILS']\n ));\n $query->execute(array('task_id' => $this->id, 'subject' => $this->row['subject'], 'body' => $this->row['body'], 'doc_id' => $this->row['doc_id']));\n }\n }",
"public function store_messages ()\n {\n $this->notifications->store();\n }",
"public function updated_messages($messages)\n {\n }",
"public function updated_messages($messages)\n {\n }",
"public function updated_messages($messages)\n {\n }",
"public function run()\n {\n\n DB::table('messages')->insert([\n [\n 'sender_id' => 1,\n 'recipient_id' => 2,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 0,\n 'created_at' => '2017-12-01 12:00:00',\n 'updated_at' => '2017-12-01 12:00:00'\n ],\n [\n 'sender_id' => 1,\n 'recipient_id' => 2,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 1,\n 'created_at' => '2017-12-02 12:00:00',\n 'updated_at' => '2017-12-02 12:00:00'\n ],\n [\n 'sender_id' => 1,\n 'recipient_id' => 2,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 0,\n 'created_at' => '2017-12-01 12:00:00',\n 'updated_at' => '2017-12-01 12:00:00'\n ],\n [\n 'sender_id' => 1,\n 'recipient_id' => 3,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 0,\n 'created_at' => '2017-12-01 11:00:00',\n 'updated_at' => '2017-12-01 11:00:00'\n ],\n [\n 'sender_id' => 1,\n 'recipient_id' => 4,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 1,\n 'created_at' => '2017-12-01 13:00:00',\n 'updated_at' => '2017-12-01 13:00:00'\n ],\n [\n 'sender_id' => 2,\n 'recipient_id' => 1,\n 'reply_to_id' => 1,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 1,\n 'created_at' => '2017-12-01 13:00:00',\n 'updated_at' => '2017-12-01 13:00:00'\n ],\n [\n 'sender_id' => 2,\n 'recipient_id' => 3,\n 'reply_to_id' => 0,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 0,\n 'created_at' => '2017-12-01 12:00:00',\n 'updated_at' => '2017-12-01 12:00:00'\n ],\n [\n 'sender_id' => 1,\n 'recipient_id' => 2,\n 'reply_to_id' => 6,\n 'subject' => 'Message Subject',\n 'content' => 'Lorem ipsum',\n 'read' => 1,\n 'created_at' => '2017-12-01 14:00:00',\n 'updated_at' => '2017-12-01 14:00:00'\n ],\n ]);\n \n }",
"private function process_register_new_message(){\n //Add New Message\n if(($this->input->post('register_new_message') !== NULL) || ($this->input->post('update_message') !== NULL)){\n $this->form_validation->set_rules('message_to', 'Message To', 'required');\n $this->form_validation->set_rules('msg_subject', 'Message Subject', 'trim|required|htmlspecialchars|min_length[2]');\n $this->form_validation->set_rules('msg_content', 'Message Content', 'trim|required|htmlspecialchars|min_length[2]');\n \n \n\n if( !$this->form_validation->run() ) {\n \t\t\t\t\t$error_message_array = $this->form_validation->error_array();\n \t\t\t\t\t$this->session->set_flashdata('error_msg_arr', $error_message_array);\n \t\t\t\t}else{\n\n $data_arr = array(\n 'msg_subject'=> trim($this->input->post('msg_subject')),\n 'msg_excerpt'=> trim($this->input->post('msg_excerpt')),\n 'msg_content'=> trim($this->input->post('msg_content')), \n 'msg_to'=> trim($this->input->post('message_to')), \n 'msg_author'=> $this->currently_logged_user,\n 'msg_date'=> $this->booking_date_time\n );\n\n if(($this->input->post('update_message_id') !== NULL) || ($this->input->post('update_message') !== NULL)){\n $message_id = $this->input->post('update_message_id');\n $this->common->update( 'messages', $data_arr, array( 'ID' => $message_id ) );\n \t\t\t\t\t$this->session->set_flashdata('success_msg','Updated done!');\n }else{\n $message_id = $this->common->insert( 'messages', $data_arr );\n\t\t\t $generate_message_slug = $this->input->post('msg_subject').'-'.$message_id;\n $message_slug = url_title($generate_message_slug, 'dash', TRUE);\n $this->common->update( 'messages', array('msg_slug' => $message_slug), array( 'ID' => $message_id ) );\n $this->session->set_flashdata('success_msg','Added done!');\n redirect('admin/messages');\n }\n\n\n\n \t\t}\n }\n\n }",
"public function store(MessageRequest $request)\n {\n $receivers_ids = $request->input('to');\n $sent_message = new SendMessage();\n $sent_message->sender_id = Auth::id();\n $sent_message->receivers_id = implode(\",\",$receivers_ids);\n $sent_message->title = $request->input('title');\n $sent_message->message = $request->input('message');\n if($sent_message->save()){\n $receive_messages_data = [];\n $receive_messages_array = [];\n foreach ($receivers_ids as $receivers_id){\n $receive_messages_data[\"send_message_id\"] = $sent_message->id;\n $receive_messages_data[\"receiver_id\"] = $receivers_id;\n $receive_messages_data[\"is_read\"] = 0;\n $receive_messages_data[\"created_at\"] = Carbon::now()->toDateTimeString();\n $receive_messages_data[\"updated_at\"] = Carbon::now()->toDateTimeString();\n array_push($receive_messages_array,$receive_messages_data);\n }\n $receive_message_create = ReceiveMessage::insert($receive_messages_array);\n if($receive_message_create) {\n createSessionFlash('Message Create', 'SUCCESS', 'Message create successfully');\n } else {\n createSessionFlash('Message Create', 'FAIL', 'Error in Message create');\n }\n } else {\n createSessionFlash('Message Create', 'FAIL', 'Error in Message create');\n }\n return redirect('developer/messages');\n }",
"public function saveMessage($data)\n {\n $date = date('Y-m-d');\n \n $sql = \" INSERT INTO `site_notifi_message` (PubID, SiteID, page, to_mail, to_name, subject, text, updated, created) \n VALUES ('\".$data['PubID'].\"', '\".$data['SiteID'].\"', '\".$data['page'].\"', '\".$data['mail'].\"', '\".$data['name'].\"', '\".mysql_escape_string($data['subject']).\"', '\".mysql_escape_string($data['text']).\"', '\".$date.\"', '\".$date.\"') \n ON DUPLICATE KEY UPDATE page = '\".$data['page'].\"', to_mail = '\".$data['mail'].\"', to_name = '\".$data['name'].\"', subject = '\".mysql_escape_string($data['subject']).\"', text = '\".mysql_escape_string($data['text']).\"', updated = '\".$date.\"'\";\n \n return $this->_db->query($sql);\n }",
"public function saveMOMessageToSQL()\n {\n $query = dbService::getDBObject()->prepare(\"INSERT INTO mo VALUES (NULL, :msisdn,:operatorID,:shortCodeID,:text,:token,:dateTime,:processStatus)\");\n $valuesToInsert = array(\n \"msisdn\" => $this->getMOMessage()->getMSISDN(),\n \"operatorID\" => $this->getMOMessage()->getOperatorID(),\n \"shortCodeID\" => $this->getMOMessage()->getShortCodeID(),\n \"text\" => $this->getMOMessage()->getText(),\n \"token\" => $this->getMOMessage()->getAuthToken(),\n \"dateTime\" => $this->getMOMessage()->getDateTime(),\n \"processStatus\" => 0 // 0 being unprocessed, assuming that an external application updates this to reflect 1 for processed\n );\n $query->execute($valuesToInsert);\n }",
"function afterSave($created)\r\n {\r\n $this->Topic->expects();\r\n $topic = $this->Topic->find(array('Topic.id' => $this->data['Post']['topic_id']));\r\n $topic['Topic']['modified'] = date('Y-m-d H:i:s');\r\n if (!$this->Topic->Save($topic))\r\n {\r\n $this->error('Post::afterSave', 'There was an error trying to update the topics modification time', $this->data[$this->name]['user_id']);\r\n }\r\n else\r\n {\r\n // delete topic cache\r\n// $cacheId = 'element_topic_cache_plugin_' . $this->data['Post']['topic_id'] . '_topic';\r\n// $this->_clearCache($cacheId);\r\n // create messages\r\n $this->data['Topic'] = $topic['Topic'];\r\n $this->data[$this->name]['id'] = $this->getLastInsertID();\r\n $this->User->Message->newPost($this->data);\r\n }\r\n return parent::afterSave($created);\r\n }",
"public function save(){\n $data = array();\n $lstFields = array(\n 'id' => array('positive_int', 'Идентификатор новости неправильный'),\n 'datetime' => array('not_empty', 'Поле Дата-время должно быть заполнено'),\n 'subject' => array(\n array('not_empty', 'Поле Заголовок должно быть заполнено'),\n array('length_interval', array(3, 200), 'Поле Заголовок должно быть больше :param1 и меньше :param2 символов')\n ),\n 'text' => array(\n array('not_empty', 'Поле Текст должно быть заполнено'),\n array('length_min', array(20), 'Поле Текст должно быть больше :param1 символов')\n ),\n );\n \n foreach ($lstFields as $field => $validInfo){\n $value = $this->getGlobalVar()->post($field);\n if (in_array($field, array('id'))){\n if ($value){\n $result = Lib_Helper_Valid::validation($value, $validInfo);\n if ($result !== true){\n $this->error = $result;\n break;\n }\n else $data[$field] = $value;\n }\n else ;\n }\n else {\n $result = Lib_Helper_Valid::validation($value, $validInfo);\n if ($result !== true){\n $this->warning = $result;\n break;\n }\n else $data[$field] = $value;\n }\n }\n \n $dm = Lib_DataMapper::getInstance();\n \n if (!empty($data['id'])){\n $model = $dm->getNews($data['id']);\n if (!$model->loaded()) $this->error = 'Запись не найдена';\n }\n \n if ($this->warning || $this->error) $this->gotoAction('form');\n else {\n try{\n $model = new Model_News($data);\n $dm->save($model);\n $this->success = empty($data['id']) ? 'add' : 'edit';\n }\n catch (Exception $e){\n if ($dm->getLastErrno() == 1062) $this->warning = 'Запись с таким же заголовком уже есть в бд';\n else $this->warning = 'Произошла ошибка при сохранении данных';\n \n $this->gotoAction('form');\n }\n }\n }",
"public function store(Request $request)\n {\n //return $request->all();\n //return $request->input('nombre');\n\n //Guardar mensaje\n /*\n DB::table('messages')->insert([\n \"nombre\" => $request->input('nombre'),\n \"email\" => $request->input('email'),\n \"mensaje\" => $request->input('mensaje'),\n \"created_at\" => Carbon::now(),\n \"updated_at\" => Carbon::now(),\n\n ]);\n */\n //Hay dos formas de insertar en ELOCUENT\n //1era\n /*\n $message=new Message;\n $message->nombre = $request->input('nombre'); \n $message->email = $request->input('email'); \n $message->mensaje = $request->input('mensaje'); \n $message.save();\n */\n // fin 1ra\n //2da\n //este es un domp and die, muestra y se detiene\n //dd($request->all());\n //Model::unguard(); con esta instruccion no se validan los campos a acualizacion masiva\n // se debera declara al inicio del archivo lo siguiente\n //use illuminate\\Database\\Eloquent\\Model;\n //No es recomendable hacer esto(Pasos anteriores)\n //fin 2da\n //Redireccionar\n //El sistema automaticamente busca en los datos del request los que coincidan con los definidos en la clase modelo \n \n //Message::create($request->all());\n /* hay mas de una manera de guardar el mensaje para usuarios autenticados\n guardamos el mensaje en la DB y si el usuario esta autenticado\n lo actualizamos con el user_id\n este es la mejor manera ya que maneja usuarios autenticados o no\n */\n $message = $this->messages->store($request);\n\n event(new MessageWasReceived($message));\n\n //Este codigo se paso al listener del evento MessageWasReceived que es SendAutoresponse\n // Mail::send('emails.contact',['msg' => $message], function($m) use ($message){\n // $m->to($message->email, $message->nombre)->subject('Tu mensaje fue recibido');\n// $m->to('[email protected]', 'Marco')->subject('Tu mensaje fue recibido');\n // });\n\n /* Esta Opcion es unicamente para usuarios autenticados\n fallaria si el usuario no esta autenticado\n desde que se crea el mensaje va relacionado al usuario\n auth()->user()->messages()->create($request->all());\n */\n /* Otra manera de relacionar el usuario autenticado, es\n se crea el mensaje y posterior mente se actualiza el user_id\n utilizando save\n $message = Message::create($request->all());\n $message->user_id=auth()->id();\n $message->save();\n */\n\n return redirect()->route('mensajes.create')->with('info','Hemos recibdo tu mensaje');\n \n }",
"public function run()\n {\n $records = [\n [\n 'name' => 'test name 1',\n 'email' => '[email protected] 1',\n 'message' => 'test message 1',\n 'created_at' => '2018-08-28 10:00:00',\n ],\n [\n 'name' => 'test name 2',\n 'email' => '[email protected] 2',\n 'message' => 'test message 2',\n 'created_at' => '2018-08-29 10:00:00',\n ],\n [\n 'name' => 'test name 3',\n 'email' => '[email protected] 3',\n 'message' => 'test message 3',\n 'created_at' => '2018-08-30 10:00:00',\n ]\n ];\n\n $table = $this->table('messages');\n $table\n ->insert($records)\n ->save();\n }",
"private function update_messages() {\n if (isset($_SESSION['msg']) && $_SESSION['msg'] != '') {\n $this->msg = array_merge($this->msg, $_SESSION['msg']);\n $_SESSION['msg'] = '';\n }\n if (isset($_SESSION['error']) && $_SESSION['error'] != '') {\n $this->error = array_merge($this->error, $_SESSION['error']);\n $_SESSION['error'] = '';\n }\n }",
"public function addMessages(){\n\t\ttry{\n\t\t\t$query = $this->db->prepare('INSERT INTO chat(refmember,message) VALUES(?,?)') ;\n\t\t\t$query->execute(array($this->user->id,$_POST['message']));\n\t\t\t//$result = $query->fetch(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch (SpykeeException $e){\n\t\t\tif($this->isAdmin){\n\t\t\t\tError::displayError($e);\n\t\t\t}\n\t\t}\n\t}",
"public function run()\n {\n DB::table('sm_sys')->insert([\n [\n 'key' => 'mail_mode',\n 'value' => '1',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'entry_mail_from',\n 'value' => '[email protected]',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'entry_mail_subject',\n 'value' => '【MessageBoard】アカウント登録確認のご案内',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'entry_mail_message_template_before',\n 'value' => 'この度はMessageBoardのアカウントを作成いただき誠にありがとうございます。,下記URLをクリックし、登録を完了してください。',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'entry_mail_message_template_after',\n 'value' => '上記URLの有効期限は24時間となります。,有効期限を過ぎた場合は大変お手数ですが、再度アカウント作成行ってください。,,※本メールはシステムの自動返信のため、返信はできません。,お問い合わせは下記メールアドレスへお願いします。,,-------------------------,MessageBoard事務局,メールアドレス:[email protected],-------------------------',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'reset_password_mail_from',\n 'value' => '[email protected]',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'reset_password_mail_subject',\n 'value' => '【MessageBoard】パスワードリセットのご案内',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'reset_password_mail_message_template_before',\n 'value' => 'この度はMessageBoardをご利用いただき誠にありがとうございます。,パスワードのリセット方法についてご案内いたします。,下記URLLをクリックし、新しいパスワードをご登録ください。',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'reset_password_mail_message_template_after',\n 'value' => '※上記URLの有効期限は24時間となります。,有効期限を過ぎた場合は大変お手数ですが、再度パスワードリセットを行ってください。,,※本メールはシステムの自動返信のため、返信はできません。,お問い合わせは下記メールアドレスへお願いします。,,-------------------------,MessageBoard事務局,メールアドレス:[email protected],-------------------------',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'message_login_fail',\n 'value' => 'メールアドレスまたはパスワードが正しくありません。',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'messsage_login_lock',\n 'value' => 'アカウントをロックしています。しばらくしてから再度ログインしてください。',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'message_account_lock',\n 'value' => 'アカウント凍結中です。',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'limit_login_fail_count',\n 'value' => '4',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'limit_login_fail_minutes',\n 'value' => '10',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'limit_login_lock_count',\n 'value' => '3',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n [\n 'key' => 'limit_login_lock_minutes',\n 'value' => '30',\n 'created_at' => new DateTime(), // timestamp type\n 'updated_at' => new DateTime(), // timestamp type\n ],\n ]);\n }",
"public function saveMessage(){\n $this->validate([\n 'name'=>'required',\n 'email'=>'required|email',\n 'phone'=>'required',\n 'comment'=>'required'\n ]);\n $message = new Contact();\n $message->name = $this->name;\n $message->email = $this->email;\n $message->phone = $this->phone;\n $message->comment = $this->comment;\n $message->save();\n session()->flash('save_message','Message Sent Successfully');\n }",
"public function saveSchedule()\n {\n $data = $this->input->post(null, true);\n $result = ActivityScheduleService::getInstance()->save($data);\n $this->_success($result);\n }"
] | [
"0.65310276",
"0.63248265",
"0.6083983",
"0.6045957",
"0.59944785",
"0.5967925",
"0.57953095",
"0.5789609",
"0.57088",
"0.5619519",
"0.55907935",
"0.5584304",
"0.5583057",
"0.55668586",
"0.55668586",
"0.55668586",
"0.548816",
"0.5461825",
"0.543063",
"0.54243714",
"0.5366461",
"0.5356441",
"0.53465503",
"0.53450656",
"0.53311765",
"0.53147197",
"0.53086454",
"0.53015643",
"0.52911925",
"0.5270312"
] | 0.7781962 | 0 |
Retrieve the last PDO warning. | protected function _getPdoWarning(PDO $pdo)
{
$originalErrorMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$stm = $pdo->query('SHOW WARNINGS');
$pdo->setAttribute(PDO::ATTR_ERRMODE, $originalErrorMode);
return $stm->fetchObject();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _lastWarning()\n {\n if (($e = error_get_last()))\n {\n if ($e['type'] == E_WARNING && $e['file'] == __FILE__)\n return ' ('.strip_tags($e['message']).')';\n }\n return '';\n }",
"function db_last_error () {\n\t$err = Database::$connections[Database::$last_conn]->errorInfo ();\n\treturn $err[2];\n}",
"public function last_connection_error() {\n\t\tif (!$this->status())\n\t\t\treturn false;\n\t\treturn $this->pdo->errorInfo();\n\t}",
"function db_last_error () {\n\tglobal $db_list, $db_last_conn;\n\t$err = $db_list[$db_last_conn]->errorInfo ();\n\treturn $err[2];\n}",
"public function last_error() {\n\t\treturn $this->dbLastError;\n\t}",
"public function lastError() {\n\t\treturn $this->dbError;\n\t}",
"function error_get_last () {}",
"function getWarning() {\r\n return $this->warningMsg;\r\n }",
"public function getNextWarningTime()\n {\n return $this->_nextWarningTime;\n }",
"public function getWarning();",
"public function getWarning();",
"public function getLastErrno()\n {\n return $this->_stmtErrno;\n }",
"public function getWarning(): ?string\n {\n return $this->warning;\n }",
"function error_last()\n{\n\treturn drone()->errorLast();\n}",
"function db_last_sql () {\n\treturn Database::$last_sql;\n}",
"public function getLastStmt()\n {\n return $this->last_stmt;\n }",
"function db_message($dbh)\r\n{\r\n $e = $dbh->errorInfo();\r\n return $e[2];\r\n \r\n}",
"function db_last_sql () {\n\treturn $GLOBALS['db_sql'];\n}",
"public function lastError()\n {\n return static::$lastError;\n }",
"public function last_errorNr() {\n\t\treturn $this->dbLastErrorNr;\n\t}",
"function get_last_error() {\n\t\tif (empty($this->last_error)) return;\n\t\treturn $this->last_error;\n\t}",
"public function getLastError()\n\t{\n\t\treturn $this->driver->getLastError($this->conn);\n\t}",
"static function get_last_error() \t\t{ return self::$_LAST_ERROR; }",
"public function lastAffected() {\n\t\tif ($this->_result) {\n\t\t\treturn sybase_affected_rows($this->connection);\n\t\t}\n\t\treturn null;\n\t}",
"public function getWarningCount()\n {\n return $this->countWarning;\n }",
"public function get_last_error() {\n return $this->last_error;\n }",
"public function lastError(): ?string;",
"public function get_last_error(): string {\n\t\treturn $this->table_definition->get_table_worker()->get_last_error();\n\t}",
"public function last_error(){\n return socket_last_error($this->socket);\n }",
"function getLastStatement();"
] | [
"0.7000523",
"0.68761885",
"0.6802627",
"0.6786237",
"0.6508108",
"0.6492778",
"0.6421179",
"0.6396291",
"0.6267898",
"0.6184772",
"0.6184772",
"0.61791956",
"0.61767507",
"0.6147619",
"0.6061272",
"0.60504454",
"0.604678",
"0.60023654",
"0.58953375",
"0.5852985",
"0.58280766",
"0.57434356",
"0.57239676",
"0.5710309",
"0.5678122",
"0.56775033",
"0.5673155",
"0.56614196",
"0.566067",
"0.5650492"
] | 0.7259927 | 0 |
Gets statuses that are currently in the scheduler table | public function getStatuses()
{
$schedules = clone $this->getCollection()
->setOrder('status', Zend_Db_Select::SQL_ASC);
$schedules->getSelect()
->group('status')
->reset(Zend_Db_Select::COLUMNS)
->columns('status');
$statuses = $schedules->getConnection()
->fetchCol($schedules->getSelect());
$statusArray = array();
foreach ($statuses as $status) {
$statusArray[$status] = $status;
}
return $statusArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTaskStatus()\n {\n $em = $this->getEm();\n\n $query = $em->createQuery(\n 'SELECT t FROM ScrunoBoardBundle:TaskStatus t ORDER BY t.position ASC'\n );\n\n return $query->getResult();\n }",
"public function getStatuses(){\n \treturn $this->statusesController->getAllStatuses();\n }",
"public function listStatuses();",
"function retrieveSchedulers() {\n\t\t$GLOBALS['log']->info('Gathering Schedulers');\n\t\t$executeJobs = array();\n\t\t$query \t= \"SELECT id \" .\n\t\t\t\t\"FROM schedulers \" .\n\t\t\t\t\"WHERE deleted=0 \" .\n\t\t\t\t\"AND status = 'Active' \" .\n\t\t\t\t\"AND date_time_start < \".db_convert(\"'\".TimeDate::getInstance()->nowDb().\"'\",'datetime').\" \" .\n\t\t\t\t\"AND (date_time_end > \".db_convert(\"'\".TimeDate::getInstance()->nowDb().\"'\",'datetime').\" OR date_time_end IS NULL)\";\n\t\t\t\t\n\t\t$result\t= $this->db->query($query);\n\t\t$rows=0;\n\t\t$executeTimes = array();\n\t\t$executeIds = array();\n\t\t$executeJobTimes = array();\n\t\twhile(($arr = $this->db->fetchByAssoc($result)) != null) {\n\t\t\t$focus = BeanFactory::getBean('Schedulers', $arr['id']);\n\t\t\t$executeTimes[$rows] = $this->deriveDBDateTimes($focus);\n\t\t\tif(count($executeTimes) > 0) {\n\t\t\t\tforeach($executeTimes as $k => $time) {\n\t\t\t\t$executeIds[$rows] = $focus->id;\n\t\t\t\t\t$executeJobTimes[$rows] = $time;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rows++;\n\t\t}\n\t\t$executeJobs['ids'] = $executeIds;\n\t\t$executeJobs['times'] = $executeJobTimes;\n\t\treturn $executeJobs;\n\t}",
"function getAllEventsForScheduler() {\n\n\tglobal $dbh;\n\t\n\t$eventQuery = $dbh->prepare(\"\n\t\tSELECT \n\t\t\te.id,\n\t\t\te.show_name,\n\t\t\te.comments,\n\t\t\te.show_status,\n\t\t\te.from_date,\n\t\t\te.to_date,\n\t\t\te.administrator,\n\t\t\te.venue_id\n\t\tFROM EVENT e\n\t\");\n\n $eventQuery->execute();\n\n $eventsArray = $eventQuery->fetchAll(PDO::FETCH_ASSOC);\n\n\tforeach($eventsArray as &$event){\n\n\t\t$event[\"show_name\"] = stripslashes($event[\"show_name\"]);\n\n\t\tif($event[\"show_status\"] == \"Cancelled\"){\n\t\t\tcontinue;\n\t\t} \n\n\t\t$colorStatusQuery = $dbh->prepare(\"\n\t\t\tSELECT * \n\t\t\tFROM EVENT_ROLE_USER er\n\t\t\tWHERE er.event_id = :event_id AND (er.status = 0 OR er.status = -1)\n\t\t\");\n\n\t\t$colorStatusQuery->bindParam(\"event_id\", $event[\"id\"]);\n\t\t$colorStatusQuery->execute();\n\t\t$colorStatusArr = $colorStatusQuery->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tif(count($colorStatusArr) === 0){\n\t\t\t$event[\"show_status\"] = \"Scheduled\";\n\t\t} else {\n\t\t\t$event[\"show_status\"] = \"Deferred\";\n\t\t}\n\n\t}\n\n\n $statusArray = array(\n \tarray(\n \"id\" => -3,\n \"show_name\" => \"Scheduled\",\n \"comments\" => \"...\",\n \"show_status\" => \"Scheduled\",\n \"from_date\" => \"2011-03-16 17:00:00\",\n \"to_date\" => \"2011-03-16 17:00:00\",\n \"administrator\" => 1,\n \"venue_id\" => 1\n ),\n \tarray(\n \"id\" => -2,\n \"show_name\" => \"Deferred\",\n \"comments\" => \"...\",\n \"show_status\" => \"Deferred\",\n \"from_date\" => \"2011-03-16 18:00:00\",\n \"to_date\" => \"2011-03-16 18:00:00\",\n \"administrator\" => 1,\n \"venue_id\" => 1\n ), \t\n array(\n \"id\" => -1,\n \"show_name\" => \"Cancelled\",\n \"comments\" => \"...\",\n \"show_status\" => \"Cancelled\",\n \"from_date\" => \"2011-03-16 19:00:00\",\n \"to_date\" => \"2011-03-16 19:00:00\",\n \"administrator\" => 1,\n \"venue_id\" => 1\n ) \t\n );\n\n return array_merge($statusArray, $eventsArray); \n}",
"public function getAllStatus()\n {\n $result = self::$dbInterface -> query(\"SELECT statusID, statusName FROM status\");\n return $result;\n }",
"public function getStatuses()\n {\n return $this->statuses;\n }",
"public static function retrieveStatuses() {\n\t\treturn array(\n\t\t\t\tself::FLOW_STATUS_ACTIVE => 'Active',\n\t\t\t\tself::FLOW_STATUS_INACTIVE => 'Inactive',\n\t\t\t\tself::FLOW_STATUS_DELETED => 'Deleted'\n\t\t);\n\t}",
"public function getStatuses()\n\t{\n\t\treturn $this->component->getStatuses();\n\t}",
"public static function activeStatuses(){\n return self::$activeStatuses;\n }",
"public function getTableStatus();",
"public function getStatuses()\n {\n \n if (isset($this->xml->StatusData) === true) {\n $this->setStatus();\n }\n \n return $this->statuses;\n }",
"public function get_all_statuses() {\n try {\n $sql = \"SELECT DISTINCT status FROM tasks ORDER BY name ASC\";\n $stmt = $this->conn->prepare($sql); \n $stmt -> execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n } catch (PDOException $e) {\n echo $e->getMessage();\n } \n }",
"public static function selectStatuses(){\n\n // establishes the DB connection.\n $pdo = DbConnect::getConnection();\n \n $list = [];\n\n // builds the query string.\n $sql = \"SELECT ass_req_status_id, ass_req_status_name FROM assistance_request_status WHERE 1\";\n\n // prepares the query.\n $stmt = $pdo->prepare($sql);\n\n // executes the query.\n if ($stmt->execute()) {\n\n // set result to be an associative array.\n $rs = $stmt->setFetchMode(PDO::FETCH_ASSOC); \n\n // returns records as associative array.\n $data = $stmt->fetchAll();\n \n // if records found, return an associative array, otherwise return an empty array.\n if (count($data) > 0) {\n foreach ($data as $k => $v) {\n $list[$v[\"ass_req_status_id\"]] = $v[\"ass_req_status_name\"];\n }\n }\n }\n\n return $list;\n }",
"public function getAllStatuses(){\n $sql_select = \"SELECT os.* from order_status as os \"; \n\n $select_query = $this->db->query($sql_select);\n $statuses = $select_query->result_array();\n\n if($statuses) {\n return $statuses;\n }\n else {\n return 0;\n }\n }",
"public function statusList() {\n\t\ttry {\n\t\t\t$status = $this->status;\n\t\t\t$res = Cache::remember('faqcategories.statusList', Config::get('cache.duration.hour'), function() use($status) {\n\t\t\t\treturn $this->status->whereIn('id', [$status::ACTIVE, $status::INACTIVE])->orderBy('status')->get();\n\t\t\t});\n\t\t\t$list = [];\n\t\t\tforeach ($res as $row) {\n\t\t\t\t$list[$row->id] = $row->status;\n\t\t\t}\n\n\t\t\treturn $list;\n\t\t} catch (Exception $e) {\n\t\t\tlog::error($e);\n\t\t}\n\n\t\treturn [];\n\t}",
"public static function getSchedules() {\n $client = self::getClient();\n $session = Session::get('session');\n // $rootSession = $client->getRoot\n $contact = Session::get('contact');\n\n $params = array(\n 'session' => $session->root_session_id,\n 'student_id' => $contact->id,\n );\n\n $result = $client->call(SugarMethod::GET_SCHEDULES, $params);\n\n return $result;\n }",
"public function getStatuses() {\n $hiddenStatuses = [Reports::ALERT, Reports::CALLED_PH, Reports::SENT, Reports::INSPECTION_COMPLETED,\n Reports::PRE_INVOICE, Reports::INVOICED];\n $statuses = WorkorderStatuses::whereNotIn('id', $hiddenStatuses)\n ->orderBy('display_order')\n ->get();\n return response()->json(compact('statuses'));\n }",
"public static function statuses()\n\t{\n\t\treturn [\n\t\t\tself::ACTIVE_STATUS => self::ACTIVE_STATUS,\n\t\t\tself::INACTIVE_STATUS => self::INACTIVE_STATUS,\n\t\t\tself::ARCHIVED_STATUS => self::ARCHIVED_STATUS,\n\t\t\tself::COMING_SOON_STATUS => self::COMING_SOON_STATUS,\n\t\t\tself::SOLD_OUT_STATUS => self::SOLD_OUT_STATUS,\n\t\t];\n\t}",
"public function getAllInvoiceStatus()\n {\n $q = \\DB::select(\"SELECT * FROM ta_status ORDER BY name ASC\");\n return $q;\n }",
"public static function getStatuses()\n {\n return [ self::STATUS_NEW, self::STATUS_PUBLISHED, self::STATUS_REJECTED ];\n }",
"public function getStatus() {\n $query = $this->db->get('tb_status');\n //Retorna em formato de array\n return $query->result();\n }",
"public function get_job_status(){\n\t\treturn $status = array('1' => 'Active', '0' => 'Inactive', '2' => 'Expired'); \n\t}",
"public function get_status()\n {\n $keys = array_keys($this->services_status);\n $status = array();\n foreach ($keys as &$key)\n $status[$key] = ServiceStatus::getName($this->get_service_status($key));\n\n return (object)array(\n \"Status\" => $status,\n \"Content\" => $this->request_data,\n \"Connection\" => $this->urabe->get_connection_data(),\n \"Table\" => array(\n \"name\" => $this->table_name,\n \"primary_key\" => $this->primary_key,\n \"columns\" => $this->table_fields,\n \"selection_filter\" => $this->selection_filter\n ),\n \"Actions\" => $this->get_available_actions(),\n \"Filter\" => $this->selection_filter,\n );\n }",
"public function getStatuses(){\n\t\treturn array(\n\t\t\t''\n\t\t);\n\t}",
"function checkPendingJobs() {\n\t\tglobal $sugar_config;\n\t\tglobal $timedate;\n\t\t\n\t\t$GLOBALS['log']->debug('');\n\t\t$GLOBALS['log']->debug('----->Scheduler checking for qualified jobs to run.');\n\t\tif(empty($this->db)) {\n\t\t\t$this->db = DBManagerFactory::getInstance();\n\t\t}\n\t\t\n\t\t$fireTimeMinus = $timedate->asDb($timedate->getNow()->get('-1 minute'));\n\t\t$fireTimePlus = $timedate->asDb($timedate->getNow()->get('+1 minute'));\n\n\t\t// collapse list of schedulers where \"catch_up\" is 0 and status is \"ready\" (not \"in progress, completed, etc.\");\n\t\t$q = 'UPDATE schedulers_times st\n\t\t\t\t\tSET st.status = \\'not run\\' \n\t\t\t\t\tWHERE st.execute_time < '.$this->db->convert($this->db->quoted($fireTimeMinus), 'datetime').'\n\t\t\t\t\tAND st.status = \\'ready\\' \n\t\t\t\t\tAND st.scheduler_id IN (SELECT s.id FROM schedulers s WHERE st.scheduler_id = s.id AND s.catch_up = 0)';\n\t\t$this->db->query($q);\n\t\t\n\t\t$q = 'SELECT DISTINCT st.id, st.scheduler_id, st.status, s.name, s.job FROM schedulers_times st\n\t\t LEFT JOIN schedulers s ON st.scheduler_id = s.id WHERE st.execute_time < '.$this->db->convert($this->db->quoted($fireTimeMinus), 'datetime').\n ' AND st.deleted=0 AND s.deleted=0 AND st.status=\\'ready\\' AND s.status=\\'Active\\' ORDER BY s.name';\n\t\t$r = $this->db->query($q);\n\t\t$count = 0;\n\n\t\twhile($a = $this->db->fetchByAssoc($r)) {\n\t\t\t\n\t\t\t$job = BeanFactory::newBean('SchedulersJobs');\n\t\t\t\n\t\t\t$paramJob = $a['scheduler_id'];\n\t\t\t$job->fire($sugar_config['site_url'].'/index.php?entryPoint=schedulers&type=job&job_id='.$paramJob.'&record='.$a['id']);\n\t\t\t$count++;\n\t\t}\n\n\n\t\tif($count < 1) {\n\t\t\t$GLOBALS['log']->debug('----->Scheduler has found 0 Jobs to fire');\n\t\t}\n\t}",
"public function status()\n {\n return $this->status->get($this->entity->status);\n }",
"public function status()\n {\n return $this->status->get($this->entity->status);\n }",
"public function lists()\n {\n return $this->statuses;\n }",
"public function getAllProjectStatuses() {\n\n $query = Doctrine_Core::getTable('ProjectStatus')\n ->createQuery('c');\n\n return $query->execute();\n }"
] | [
"0.682527",
"0.66393566",
"0.6604774",
"0.6462194",
"0.637855",
"0.63544023",
"0.6247142",
"0.6220948",
"0.61244166",
"0.6101406",
"0.608107",
"0.6068037",
"0.6066852",
"0.6027402",
"0.60121036",
"0.599918",
"0.59609216",
"0.5951155",
"0.58821374",
"0.58548176",
"0.58512354",
"0.5818737",
"0.5805124",
"0.5802831",
"0.57837003",
"0.5765363",
"0.57608473",
"0.57608473",
"0.57470334",
"0.5731362"
] | 0.7185208 | 0 |
Check if the user running the process matches the configured user. Message will capture cases where the user is not set too in its response message. Process may optionally be killed, or may be allowed to continue. | public function checkRunningAsCorrectUser()
{
if (Mage::helper('aoe_scheduler')->runningAsConfiguredUser()) {
return true;
}
// We may decide that these processes should be killed, or they may continue...
$kill = Mage::helper('aoe_scheduler')->getShouldKillOnWrongUser();
$optionalKillMessage = ($kill) ? ' Schedule will not run until this is addressed.' : '';
$this->log(
sprintf(
'Job "%s" (id: %s) is running as %s, but this doesn\'t match the configuration. You can disable this'
. ' message by setting the default user in configuration.' . $optionalKillMessage,
$this->getJobCode(),
$this->getId(),
Mage::helper('aoe_scheduler')->getRunningUser()
)
);
if ($kill) {
return false;
}
// Allow it to run anyway
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function checkUserResponse()\n\t{\n\t\tif ($this->ignoreUserCheck || $this->browser) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Print the query to the user, ask them if they want to continue using it.\n\t\techo $this->color->primary(\n\t\t\t'This is the query we have formatted using your criteria, you can run it in SQL to see if you like the results:' .\n\t\t\tself::N . $this->query . ';' . self::N .\n\t\t\t'If you are satisfied, type yes and press enter. Anything else will exit.'\n\t\t);\n\n\t\t// Check the users response.\n\t\t$userInput = trim(fgets(fopen('php://stdin', 'r')));\n\t\tif ($userInput !== 'yes') {\n\t\t\techo $this->color->primary('You typed: \"' . $userInput . '\", the program will exit.');\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected function verify(){\r\n $msg = $this->msg;\r\n if ( !( isset($msg[\"data\"]) && isset($msg[\"data\"][\"cmd\"]) ) ) return;\r\n\r\n $cmd = $msg[\"data\"][\"cmd\"];\r\n if ( !isset($this->stdProcess[$cmd]) ) return;\r\n $this->process = $this->stdProcess[$cmd];\r\n return 1;\r\n }",
"protected function canProcess($message) {\n\n if (!(isset($message['email']))) {\n echo '- canProcess(), email not set.', PHP_EOL;\n return FALSE;\n }\n\n if (filter_var($message['email'], FILTER_VALIDATE_EMAIL) === false) {\n echo '- canProcess(), failed FILTER_VALIDATE_EMAIL: ' . $message['email'], PHP_EOL;\n return FALSE;\n }\n else {\n $message['email'] = filter_var($message['email'], FILTER_VALIDATE_EMAIL);\n }\n\n // Exclude generated emails adresses.\n if (preg_match('/@.*\\.import$/', $this->message['email'])) {\n echo '- canProcess(), import placeholder address: ' . $this->message['email'], PHP_EOL;\n return false;\n }\n\n if (!(isset($message['activity']))) {\n echo '- canProcess(), activity not set.', PHP_EOL;\n return FALSE;\n }\n if ($message['activity'] != 'user_register' &&\n $message['activity'] != 'vote' &&\n $message['activity'] != 'user_welcome-niche' &&\n $message['activity'] != 'user_welcome-teenlife' &&\n $message['activity'] != 'user_welcome-att-ichannel' &&\n $message['activity'] != 'user_import') {\n echo '- canProcess(), activity: ' . $message['activity'] . ' not \"user_register\",\"vote\" or one of the user_import activities, skipping message.', PHP_EOL;\n return FALSE;\n }\n\n if (!(isset($message['mailchimp_list_id']))) {\n echo '- canProcess(), mailchimp_list_id not set.', PHP_EOL;\n return FALSE;\n }\n\n if (isset($message['birthdate_timestamp']) && ($message['birthdate_timestamp'] > time() - (60 * 60 * 24 * 365 * 13))) {\n echo '- canProcess(), user is 13 or under years old.', PHP_EOL;\n return FALSE;\n }\n\n if (isset($message['user_country']) && $message['user_country'] == 'CA') {\n echo '- canProcess(), user_country : CA, skip processing.', PHP_EOL;\n return FALSE;\n }\n if (isset($message['application_id']) && $message['application_id'] == 'CA') {\n echo '- canProcess(), application_id : CA, skip processing.', PHP_EOL;\n return FALSE;\n }\n\n if (!(isset($message['user_language']))) {\n echo '- canProcess(), WARNING: user_language not set.', PHP_EOL;\n parent::reportErrorPayload();\n }\n\n if (!(isset($message['user_country']))) {\n echo '- canProcess(), WARNING: user_country not set.', PHP_EOL;\n parent::reportErrorPayload();\n }\n\n return TRUE;\n }",
"public function is_user_response($user_id){\n\t\t\tif(!empty($this->is_user_response)) return $this->is_user_response;\n\t\t\tglobal $wpdb;\n\t\t\t$data = $wpdb->get_row( \n\t\t\t\t$wpdb->prepare(\n\t\t\t\t \"SELECT COUNT(id) AS count FROM \" . KG_Config::getPublic('table_tasks_reponses') . \" \n\t\t\t\t WHERE task_id = %d AND user_id = %d\", \n\t\t\t\t $this->get_ID(), \n\t\t\t\t $user_id\n\t\t\t ),\n\t\t\t\tARRAY_A \n\t\t\t);\n\t\t\t$this->is_user_response = (int) $data['count'] > 0 ? true : false;\n\t\t\treturn $this->is_user_response; \n\t\t}",
"private function canTerminate($process)\n {\n if($process['owner'] === get_current_user() OR posix_getuid() === 0)\n return TRUE;\n return FALSE;\n }",
"public function isUserMessage()\n {\n return $this->messageScope === self::SCOPE_USER_MESSAGE;\n }",
"function user ($user = \"\") {\n\n if( empty($user) ) {\n $this->ERROR = \"POP3 user: \" . _(\"no login ID submitted\");\n return false;\n } elseif(!isset($this->FP)) {\n $this->ERROR = \"POP3 user: \" . _(\"connection not established\");\n return false;\n } else {\n $reply = $this->send_cmd(\"USER $user\");\n if(!$this->is_ok($reply)) {\n $this->ERROR = \"POP3 user: \" . _(\"Error \") . \"[$reply]\";\n return false;\n } else\n return true;\n }\n }",
"public static function i_am_user()\n {\n return self::is_user();\n }",
"public function getUserID()\n\t{\n\t\tif (isset($this->form_process_result['user_id']))\n\t\t{\n\t\t\treturn $this->form_process_result['user_id'];\n\t\t}\n\t\treturn false;\n\t}",
"function isUser(){\n\t\treturn isset($_SESSION['person']);\n\t}",
"public function isProcess(OutboxMessage $event): bool\n {\n }",
"protected function process( $user, $message) { $this->oneuser = $user; echo \"received msg[$message]\\n\"; if ( $message == 'first') return $this->tobii();}",
"public function checkpid() {\n\n if($this->pid()){\n return $this->respond([\"message\" => \"process is running...\"]);\n }\n\n return $this->respond([\"message\" => \"process has stopped...\"]);\n\n }",
"function checkuser() {\n\n return true;\n }",
"function can_message($user, $recipient_id) {\r\n\r\n\tglobal $db, $session;\r\n\r\n\t//\r\n\t// Are we dumb enough to PM ourself?\r\n\t//\r\n\r\n\tif($user == $session->sess_info['user_info']['name'] AND $recipient_id == $session->sess_info['user_info']['id']) {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\t$result = $db->query('SELECT * FROM '.TABLE_PREFIX.'filters WHERE filter_user_id = \"'.$recipient_id.'\" LIMIT 1');\r\n\r\n\tif($db->num_rows($result) > 0) {\r\n\r\n\t\t$filter_data = $db->fetch_result($result);\r\n\r\n\t\t$names = explode(',', $filter_data['filter_names']);\r\n\r\n\t\tswitch($filter_data['filter_method']) {\r\n\r\n\t\t\tcase 'ONLY ALLOW THESE':\r\n\t\t\t\tif(in_array($user, $names)) {\r\n\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'DISALLOW THESE':\r\n\t\t\t if(in_array($user, $names)) {\r\n\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'DISALLOW ALL':\r\n\t\t\t\treturn false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n}",
"function bbp_is_user_spammer($user_id = 0)\n{\n}",
"public static function userIsProcessed(int $userid): bool {\n $connection = SqlConnection::get(\"e621\");\n $statement = $connection->prepare(\"SELECT user_id from processed_users WHERE user_id = :userid\");\n $statement->bindValue(\"userid\", $userid);\n $statement->execute();\n return $statement->fetch() !== false;\n }",
"protected function isValid($value) {\n\t\t$result = TRUE;\n\n\t\tif (!$this->userRepository->findOneByUsername($value)) {\n\t\t\t$this->addError('PM reciepient user not found!', 1372429326);\n\t\t\t$result = FALSE;\n\t\t}\n\t\t$user = $this->userRepository->findCurrent();\n\t\tif ($user->getUsername() == $value) {\n\t\t\t$this->addError('You can\\'t write yourself a message :)', 1372682275);\n\t\t\t$result = FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function is_pole_responsable($user_id)\n\t{\n\t\treturn $this->pole_query_model->exists(array('responsable_id' => $user_id));\n\t}",
"private function verifyUser() {\n\t\t//TODO: add logic to check if a user is authorised to edit/view something\n\t\tif(isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function actorIsCurrentUser($user) {\n\t\ttry {\n\t\t\treturn \\strip_tags($user) === $this->activityManager->getCurrentUserId();\n\t\t} catch (\\UnexpectedValueException $e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function replyMessage()\n {\n if (!Input::exists('message')) {\n Check::addUserError('Reply cannot be empty.');\n return false;\n }\n if (!Input::exists('messageID')) {\n return false;\n }\n if (!Check::token()) {\n return false;\n }\n return true;\n }",
"function test_user() {\n\tif (isset($_SESSION['user'])) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}",
"private function isMy(User $user,UserMessage $userMessage){\n \n\n //Check if this object is created by this user\n try { //Try to access a property that might not exist\n $myId=$userMessage->creator_user_id;\n\n if ($user->id==$myId){\n return true;\n }\n }catch(\\Exception $ex){\n\n }\n\n try { //Try to access a property that might not exist\n $myId=$userMessage->user_id;\n\n if ($user->id==$myId){\n return true;\n }\n }catch(\\Exception $ex){\n\n }\n\n \n return false;\n }",
"private function getProcessUser()\n {\n $process = posix_getpwuid(posix_geteuid()); // if not, the project config is probably stored under it's NGINX user. grab that.\n $processUser = $process['name'];\n return $processUser;\n }",
"public static function check()\n {\n return static::user() ? true : false;\n }",
"public static function isTheUser($param)\n {\n return $param['caller'] === $param['userParam'];\n }",
"public function getUserPresent() {\n return $this->_flags->userPresent;\n }",
"protected function process($user,$message){\n $this->send($user,$message);\n }",
"function processUserMessage(){\n\t\t$ret = \"\";\n\t\t$this->chatId = $this->obj->message->chat->id;\t\n\t\t$date = $this->obj->message->date;\n\t\t$text = $this->obj->message->text;\n\t\tif (strpos($text, '/start')===0) {\n\t\t\t$this->response = \"Selamat datang ke bot Hendrasoewarnobot\";\n\t\t\t//ini contoh kalau mau buat keyboard\n\t\t\t$keyboard = array(\n\t\t\t\t\"inline_keyboard\" => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\tarray(\"text\" => \"\\xE2\\x9C\\x8F Register\", \"one_time_keyboard\" => false, \"callback_data\" => \"1\"),\n\t\t\t\t\t\tarray(\"text\" => \"\\xE2\\x98\\x91 Verify Account\", \"one_time_keyboard\" => false, \"callback_data\" => \"2\")\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->keyboard = json_encode($keyboard, true);\n\t\t} elseif (strpos($text, '/reg')===0) {\n\t\t\t$this->response = \"belum diimplementasikan\";\n\t\t} else {\n\t\t\t$this->response = \"perintah tidak dikenali!\";\n\t\t}\n\t}"
] | [
"0.60661864",
"0.55993223",
"0.5557916",
"0.5398318",
"0.5312582",
"0.5293486",
"0.5279024",
"0.5233043",
"0.5224655",
"0.5212163",
"0.52109426",
"0.5191316",
"0.5164352",
"0.5147486",
"0.512966",
"0.51042765",
"0.5072471",
"0.50713944",
"0.50676954",
"0.50534266",
"0.50523895",
"0.50332254",
"0.50289965",
"0.5026178",
"0.50012064",
"0.4976479",
"0.49626288",
"0.49492383",
"0.49456292",
"0.49299002"
] | 0.63526946 | 0 |
Set the user who ran the last successfully started schedule into a core variable | public function setLastRunUser($user = null)
{
if (is_null($user)) {
$user = Mage::helper('aoe_scheduler')->getRunningUser();
}
// Log the current user running the schedule if it's executed
Mage::getModel('core/variable')
->loadByCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
->setCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
->setName('Scheduler - User Last Run As')
->setPlainValue((string) $user)
->save();
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set_user()\n\t{\n\n\t}",
"public function on_set_current_user(): void {\n\t\t$this->get_client()->configureScope( function ( Scope $scope ) {\n\t\t\t$scope->setUser( $this->get_current_user_info() );\n\t\t} );\n\t}",
"public function _event_before_save()\r\n\t{\r\n\t\t// assign the user id that lasted updated this record\r\n\t\t\r\n\t}",
"function getCurUser() {\r\n $user = '';\r\n return $user;\r\n}",
"function update_last_activity() {\n\t\t$update = new ElUser;\n\t\t$update->update_last_activity();\n}",
"private function setUser()\n {\n $this->cas_user = phpCAS::getUser();\n Session::put('cas_user', $this->cas_user);\n }",
"function setUser($value){\n $_SESSION[\"User\"] = $value; // Setzt den aktuell eingeloggten User\n }",
"protected function _setCurrentUser()\n {\n $userId = \\core\\Session::forge()->get(static::SESSION_USER_ID_KEY);\n \n if (isset($userId))\n { \n $users = \\models\\User::findBy(array(\"id\" => $userId));\n $this->_user = $users[0];\n }// if \n }",
"public function getTaskUser()\n {\n return $this->task_user;\n }",
"public function set_logined_status() {\r\n\t\r\n\t\t//设置登录session uid\r\n\t\t$GLOBALS['user']->uid = $this->uid;\r\n\r\n\t\t//重新变更session id\r\n\t\tSimPHP::$session->regenerate_id();\r\n\t\t\r\n\t\t//新起一个对象来编辑,避免过多更新\r\n\t\t$nUser = new self($this->uid);\r\n\t\t$nUser->lastlogin = simphp_time();\r\n\t\t$nUser->lastip = Request::ip();\r\n\t\t$nUser->save();\r\n\t}",
"function GetCurrentUser() {\r\n\t\t//echo $this->usersessionmanager->getVar(\"CurrentUser\");\r\n\r\n\t\treturn $this->GetUser($this->usersessionmanager->getVar(\"CurrentUser\"));\t\r\n\t\t\r\n\t}",
"public function activity_user()\n\t{\n\t\treturn $this->_get_activity();\n\n\t}",
"function cron(){\n\n $this->sync_users(true);\n }",
"function getCurrentUser();",
"function set_user_previous_login()\n{\n date_default_timezone_set(\"Canada/Newfoundland\");\n $current_user = wp_get_current_user();\n $user_id = $current_user->ID;\n update_user_meta($user_id, 'current_login', \"\");\n update_user_meta($user_id, 'previous_login', date(\"Y-m-d H:i:s\"));\n\n // testing purposes\n // $file_1 = $_SERVER['DOCUMENT_ROOT'] . '/logout_output.txt';\n // $current_1 = \"<pre>\" . print_r($user_id, true) . \"</pre>\\n\";\n // $current_1 .= \"<pre>\" . print_r(date(\"Y-m-d H:i:s\"), true) . \"</pre>\\n\";\n // file_put_contents($file_1, $current_1);\n}",
"public function getCurrentUser() {\r\n\t\treturn $_SESSION[\"userObject\"];\r\n\t}",
"public function getStartUserId(): ?string;",
"public function the_user()\n {\n }",
"function bbp_setup_current_user()\n{\n}",
"public function setActiveUser()\n {\n if (Auth::check()) {\n // Set the active user in session\n if (!Session::has('activeUser')) {\n Session::put('activeUser', Auth::user());\n }\n $this->activeUser = Session::get('activeUser');\n $this->activeUser->updateLastActive();\n }\n\n View::share('activeUser', $this->activeUser);\n }",
"abstract protected function currentUser();",
"function get_current_user () {}",
"public function getLogUser()\n {\n return $this->log_user;\n }",
"function __commonAdmin_RegisterLastActive()\n {\n\n //update team member as last active now()\n $this->teamprofile_model->registerLastActive($this->session->userdata('team_profile_id'));\n\n }",
"public function getCurrentUser() {\n\t\treturn $this->channel_name;\n\t}",
"function setUser($value) {\n $this->user = $value;\n }",
"public function setGlobalUser( $set_uid = 1 ) {\n\t\t$GLOBALS['user_id'] = $set_uid;\n\t\twp_set_current_user( $set_uid );\n\t\treturn $set_uid;\n\t}",
"public function preSave() {\n parent::preSave();\n if(!$this->uid) {\n $this->uid = \\Drupal::currentUser()->id();\n }\n if(!$this->created) {\n $this->created = \\Drupal::time()->getRequestTime();\n }\n }",
"public function currentUserId()\n\t{\n\t\treturn (isset($_SESSION['uid']) ? $_SESSION['uid'] : -1);\n\t}",
"protected function saved()\r\n\t{\r\n\t\tif ($this->getValue(\"user_id\") != $this->user->id)\r\n\t\t{\r\n\t\t\tif ($this->fieldValueChanged(\"user_id\"))\r\n\t\t\t{\r\n\t\t\t\t$desc = $this->user->getValue(\"full_name\") . \" assigned you a task called \" . $this->getName();\r\n\t\t\t\t$name = \"Task Assigned\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$name = \"Task Updated\";\r\n\t\t\t\t$desc = $this->user->getValue(\"full_name\") . \" updated a task you are assinged to: \" . $this->getName();\r\n\t\t\t}\r\n\r\n\t\t\t// Add notification for user\r\n\t\t\t/*\r\n\t\t\t$notification = CAntObject::factory($this->dbh, \"notification\", null, $this->user);\r\n\t\t\t$notification->setValue(\"name\", $name);\r\n\t\t\t$notification->setValue(\"description\", $desc);\r\n\t\t\t$notification->setValue(\"obj_reference\", \"task:\".$this->id);\r\n\t\t\t$notification->setValue(\"f_popup\", 'f');\r\n\t\t\t$notification->setValue(\"f_seen\", 'f');\r\n\t\t\t$notification->setValue(\"owner_id\", $this->getValue(\"user_id\"));\r\n\t\t\t$nid = $notification->save();\r\n\t\t\t*/\r\n\t\t}\r\n\t}"
] | [
"0.5947804",
"0.58937556",
"0.58728284",
"0.5730576",
"0.5729364",
"0.5721096",
"0.571121",
"0.5680205",
"0.56234705",
"0.56029403",
"0.5575515",
"0.55693847",
"0.5562338",
"0.5545602",
"0.5518261",
"0.5516113",
"0.54981834",
"0.547887",
"0.54729307",
"0.5465075",
"0.5460541",
"0.5444098",
"0.5441173",
"0.5440403",
"0.5435455",
"0.5418377",
"0.5409007",
"0.53967124",
"0.5396596",
"0.5391067"
] | 0.6777972 | 0 |
Constructor Calls $this>resetOrder() to set the default values for an Order | function __construct(){
$this->resetOrder();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct() {\r\n $this->order = Array();\r\n }",
"public function __construct()\n {\n $this->order = $order;\n \n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n //\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->order = $order;\n }",
"public function __construct(Order $objOrder) {\n $this->objOrder = $objOrder;\n }",
"public function __construct(Orders $order)\n {\n $this->order = $order;\n }",
"public function __construct(Orders $order)\n {\n $this->order = $order;\n }",
"function __construct()\n {\n $this->order = self::$current_order;\n self::$current_order++;\n }",
"public function __construct(public $order)\n {\n }",
"public function __construct($order)\n {\n $this->stockOrder = $order;\n }",
"public function __construct(public Order $order)\n {\n //\n }",
"public function __construct($orderData)\n {\n $this->orderData = $orderData;\n }",
"private function initializeOrder()\n {\n $order = $this->request->getParameter(self::ORDER_PARAMETER_NAME) ?? $this->defaultOrder;\n if ($order != \"asc\" && $order != \"desc\") {\n $order = \"asc\";\n }\n $this->order = $order;\n }",
"public function __construct(Order $order)\n {\n $this->model = $order;\n }"
] | [
"0.78630704",
"0.7806248",
"0.7654099",
"0.7654099",
"0.7654099",
"0.7649336",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7544994",
"0.7533068",
"0.75288546",
"0.75288546",
"0.7514746",
"0.7498142",
"0.71966755",
"0.71344197",
"0.7106786",
"0.7105626",
"0.7104782"
] | 0.780658 | 1 |
This function is used to calculate the total for this order It automatically gives the sales tax as well. | public function calculate_order_total(){
$this->order_total = 0;
foreach($this->items as $item){
$this->order_total += $this->getItemSubTotal($item);
}
$this->sales_tax_amount = ($this->order_total * $this->sales_tax);
return $this->order_total + $this->sales_tax_amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function calcTotal() {\n\t\t$order = $this->controller->Session->read('Order');\n\t\t$subtotal = 0;\t\n\n\t\tforeach ($order['LineItem'] as $id => $lineItem) {\n\n\t\t\t$lineQuantity = 0;\n\t\t\t$lineTotal = 0;\n\t\t\tforeach ($lineItem['Selection'] as $count => $selection) {\n\t\t\t\t$selectionTotal = $selection['price'] * $selection['quantity'];\n/*\t\t\t\tif ($selection['taxable'])\n\t\t\t\t\t$selectionTotal += $selectionTotal * $this->taxRate;*/\n\t\t\t\t$subtotal += $selectionTotal;\n\n\t\t\t\t$lineQuantity += $selection['quantity'];\n\t\t\t\t$lineTotal += $selectionTotal;\n\t\t\t}\n\n\t\t\t$totals = array(\n\t\t\t\t'quantity' => $lineQuantity,\n\t\t\t\t'subtotal' => $lineTotal,\n\t\t\t\t'numAttribs' => count($selection['attributes']),\n\t\t\t);\n\n\t\t\t$this->controller->Session->write('Order.LineItem.' . $id . '.Totals', $totals);\n\t\t}\n\n\t\t$tax = sprintf('%.2f', $subtotal * $this->taxRate);\n\n\t\t$shipping = 0;\n\t\tif ($this->shipRate > 0) {\n\t\t\t$shipping = ($this->shipFlat) ? $this->shipRate : $subtotal * $this->shipRate;\n\t\t} elseif (!empty($order['Totals']) && $order['Totals'] > 0) {\n\t\t\t$shipping = $order['Totals']['shipping'];\t\n\t\t}\n\n\t\t$total = $subtotal + $tax + $shipping;\n\n\t\t$data = array(\n\t\t\t'subtotal' => $subtotal,\n\t\t\t'tax' => $tax,\n\t\t\t'shipping' => $shipping,\n\t\t\t'total' => $total,\n\t\t);\n\n\t\treturn $this->controller->Session->write('Order.Totals', $data);\n\t}",
"public function total()\r\n {\r\n \t// do these calculations before getting the taxes\r\n $total = $this->subtotal();\r\n \t$discount_total = $this->discountTotal(); \r\n \t$giftcard_total = $this->giftCardTotal(); \r\n \t$credit_total = $this->creditTotal();\r\n \t\r\n \t// get taxes\r\n if ($shippingMethod = $this->shippingMethod()) \r\n {\r\n \t$total = $total + $shippingMethod->total();\r\n \t$total = $total + $this->taxTotal();\r\n } \r\n else \r\n {\r\n $total = $total + $this->shippingEstimate();\r\n $total = $total + $this->taxEstimate();\r\n }\r\n \r\n // do these calculations again after getting taxes\r\n $total = $total - $this->discountTotal() - $this->giftCardTotal() - $this->creditTotal();\r\n \r\n if ($total < 0) {\r\n $total = 0;\r\n }\r\n \r\n return (float) $total;\r\n }",
"public function totalAmount() {\n \n return $this->subtotal() + $this->allTaxes();\n }",
"public function getTaxTotal()\n {\n $value = $this->getTax()->multiply($this->qty);\n return $value;\n }",
"function calculate_total_tax() \r\n\t{\r\n\t\t$total = 0;\r\n\r\n\t\tforeach ($this->contents as $product_id=>$product)\r\n\t\t{\r\n\t\t\tif ($product_id == -1)\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\t\r\n\t\t\tforeach ($product[\"color\"] as $color=>$quantity)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t$price = $product['price'];\r\n\t\t\t\t$subtotal = $price * $quantity;\r\n\t\t\t\t$total += $subtotal;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $total;\r\n }",
"private function calculateTotal() {\n $this->total = 0.00;\n if($this->hasItems()) {\n $tot = 0.00;\n foreach($this->items as $item) {\n $tot += $item['subtotal'];\n }\n $this->total = $tot;\n }\n }",
"public function getTotal()\n {\n $value = $this->getPriceWithTax()->multiply($this->qty);\n return $value;\n }",
"function recalc_total($target_oID) {\r\n global $db;\r\n global $currencies;\r\n\r\n $ot_subtotal = 0;\r\n $ot_tax = 0;\r\n $ot_total = 0;\r\n\r\n $products = $db->Execute(\"SELECT * FROM \" . TABLE_ORDERS_PRODUCTS . \"\r\n WHERE orders_id = '\" . $target_oID . \"'\");\r\n\r\n // recalculate subtotal and tax from products in order\r\n while (!$products->EOF) {\r\n $this_subtotal = 0;\r\n $this_tax = 0;\r\n\r\n $this_subtotal = ($products->fields['final_price'] * $products->fields['products_quantity']);\r\n $ot_subtotal += $this_subtotal;\r\n\r\n // not everyone charges tax, so we check to see if it exists first\r\n if ($products->fields['products_tax'] > 0) {\r\n $this_tax = $this_subtotal * ($products->fields['products_tax'] / 100);\r\n $ot_tax += $this_tax;\r\n }\r\n\r\n $products->MoveNext();\r\n }\r\n\r\n // apply new subtotal and tax values to the record\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS_TOTAL . \" SET\r\n text = '\" . $currencies->format($ot_subtotal) . \"',\r\n value = '\" . $ot_subtotal . \"'\r\n WHERE orders_id = '\" . $target_oID . \"'\r\n AND class = 'ot_subtotal'\");\r\n\r\n if ($ot_tax > 0) {\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS_TOTAL . \" SET\r\n text = '\" . $currencies->format($ot_tax) . \"',\r\n value = '\" . $ot_tax . \"'\r\n WHERE orders_id = '\" . $target_oID . \"'\r\n AND class = 'ot_tax'\");\r\n }\r\n\r\n // add up all the records for the roder ('cept ot_total of course)\r\n $all_totals = $db->Execute(\"SELECT * FROM \" . TABLE_ORDERS_TOTAL . \"\r\n WHERE orders_id = '\" . $target_oID . \"'\r\n ORDER BY sort_order ASC\");\r\n\r\n while (!$all_totals->EOF) {\r\n $orders_total_id = $all_totals->fields['orders_total_id'];\r\n\r\n if ($all_totals->fields['class'] != 'ot_total') {\r\n if ($all_totals->fields['class'] == 'ot_gv' || $all_totals->fields['class'] == 'ot_group_pricing') {\r\n $ot_total -= $all_totals->fields['value'];\r\n }\r\n else {\r\n $ot_total += $all_totals->fields['value'];\r\n }\r\n }\r\n\r\n $all_totals->MoveNext();\r\n }\r\n\r\n // apply new total value\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS_TOTAL . \" SET\r\n text = '\" . $currencies->format($ot_total) . \"',\r\n value = '\" . $ot_total . \"'\r\n WHERE orders_id = '\" . $target_oID . \"'\r\n AND class = 'ot_total'\");\r\n\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS . \" SET\r\n order_tax = '\" . $ot_tax . \"',\r\n order_total = '\" . $ot_total . \"'\r\n WHERE orders_id = '\" . $target_oID . \"'\");\r\n\r\n //return $ot_total;\r\n}",
"protected function obtainTotal()\n {\n $arResult =& $this->arResult;\n\n $basket = $this->calculateBasket;\n\n $arResult['ORDER_PRICE'] = $basket->getPrice();\n $arResult['ORDER_PRICE_FORMATED'] = SaleFormatCurrency($arResult['ORDER_PRICE'], $this->order->getCurrency());\n\n //$arResult['ORDER_WEIGHT'] = $basket->getWeight();\n //$arResult['ORDER_WEIGHT_FORMATED'] = roundEx(floatval($arResult['ORDER_WEIGHT'] / $arResult['WEIGHT_KOEF']), SALE_WEIGHT_PRECISION).' '.$arResult['WEIGHT_UNIT'];\n\n $arResult['PRICE_WITHOUT_DISCOUNT_VALUE'] = $basket->getBasePrice();\n $arResult['PRICE_WITHOUT_DISCOUNT'] = SaleFormatCurrency($arResult['PRICE_WITHOUT_DISCOUNT_VALUE'], $this->order->getCurrency());\n\n $arResult['DISCOUNT_PRICE'] = Sale\\PriceMaths::roundPrecision(\n $this->order->getDiscountPrice() + ($arResult['PRICE_WITHOUT_DISCOUNT_VALUE'] - $arResult['ORDER_PRICE'])\n );\n $arResult['DISCOUNT_PRICE_FORMATED'] = SaleFormatCurrency($arResult['DISCOUNT_PRICE'], $this->order->getCurrency());\n\n $arResult['DELIVERY_PRICE'] = Sale\\PriceMaths::roundPrecision($this->order->getDeliveryPrice());\n $arResult['DELIVERY_PRICE_FORMATED'] = SaleFormatCurrency($arResult['DELIVERY_PRICE'], $this->order->getCurrency());\n\n $arResult['ORDER_TOTAL_PRICE'] = Sale\\PriceMaths::roundPrecision($this->order->getPrice());\n $arResult['ORDER_TOTAL_PRICE_FORMATED'] = SaleFormatCurrency($arResult['ORDER_TOTAL_PRICE'], $this->order->getCurrency());\n }",
"public function getTaxTotal()\n {\n return $this->taxTotal;\n }",
"public function getTaxAmount();",
"public function getTotalWithTaxes()\n {\n $total_ttc = 0;\n\n foreach ($this->getItems() as $item)\n {\n if ($this->is_unit_price_ttc)\n {\n $total_ttc += $item->getQuantity() * $item->getPriceDueToday() * (1 - $item->getDiscount() / 100);\n }\n else\n {\n $total_ttc += $item->getQuantity() * $item->getPriceDueToday() * (1 - $item->getDiscount() / 100) * (1 + $this->tax / 100);\n }\n }\n \n $total_ttc = $this->applyDiscounts($total_ttc);\n\n return $total_ttc;\n }",
"public function taxableTotal()\r\n {\r\n $total = 0;\r\n \r\n /*\r\n foreach ($this->items as $item)\r\n {\r\n // is the item taxable?\r\n if ($taxable = \\Dsc\\ArrayHelper::get( $item, 'product.taxes.enabled' ))\r\n {\r\n $total = $total + \\Dsc\\ArrayHelper::get( $item, 'price' );\r\n }\r\n } \r\n */\r\n \r\n $total = $total + $this->subtotal();\r\n \r\n if ($shippingMethod = $this->shippingMethod())\r\n {\r\n $total = $total + $shippingMethod->total();\r\n }\r\n \r\n $total = $total - $this->discountTotal() - $this->creditTotal();\r\n \r\n if ($total < 0) {\r\n $total = 0;\r\n }\r\n \r\n return (float) $total;\r\n }",
"public function getTotal(): float\n {\n return $this->gross + $this->taxes;\n }",
"public function total(){\n $subtotal = $this->subtotal();\n $shipping = (new ShippingController)->shipping();\n\n $total = $subtotal+$shipping;\n return $total;\n }",
"public function order_totals() {\n global $SESSION;\n\n $this->check_context();\n\n $config = get_config('local_shop');\n\n $str = '';\n\n $totalobjects = 0;\n $amount = 0;\n $untaxed = 0;\n $taxes = 0;\n if (!empty($SESSION->shoppingcart->order)) {\n foreach ($SESSION->shoppingcart->order as $shortname => $q) {\n $totalobjects += $q;\n $ci = $this->thecatalog->get_product_by_shortname($shortname);\n $ttc = $ci->get_taxed_price($q) * $q;\n $ht = $ci->get_price($q) * $q;\n $amount += $ttc;\n $untaxed += $ht;\n $taxes += ($ttc - $ht) * $q;\n }\n }\n\n $str .= '<table width=\"100%\">';\n\n $str .= '<tr valign=\"top\">';\n $str .= '<td align=\"left\" class=\"shop-ordercell\">';\n $str .= '<b>'.get_string('ordertotal', 'local_shop').'</b> :';\n $str .= '</td>';\n $str .= '<td align=\"left\" class=\"shop-ordercell\">';\n $str .= '<span id=\"total_euros_span\"> '.sprintf('%.2f', round($amount, 2)).' </span>';\n $str .= $this->theshop->get_currency('symbol');\n $str .= ' '.get_string('for', 'local_shop');\n $str .= '<span id=\"object_count_span\"> '.$totalobjects.' </span>';\n $str .= get_string('objects', 'local_shop');\n $str .= '</td></tr>';\n\n $discountrate = $this->theshop->calculate_discountrate_for_user($amount, $this->context, $reason);\n\n if ($discountrate) {\n $str .= '<tr>';\n $str .= '<td colspan=\"2\">';\n $str .= $reason;\n $str .= ' : <b>'.$discountrate.' %</b>.<br/>';\n $str .= '</td>';\n $str .= '</tr>';\n $discounted = $amount - ($amount * $discountrate / 100);\n } else {\n $discounted = $amount;\n }\n $str .= '<tr valign=\"bottom\">';\n $str .= '<td class=\"shop-finalcount\">';\n $str .= '<b>'.get_string('orderingtotal', 'local_shop').'</b>';\n $str .= '</td>';\n $str .= '<td align=\"left\" class=\"shop-finalcount\">';\n $str .= '<span id=\"shop-discounted-span\"> '.sprintf('%.2f', $discounted).' </span>';\n $str .= $this->theshop->get_currency('symbol');\n $str .= '</td>';\n $str .= '</tr>';\n if (!empty($config->useshipping)) {\n $shipchecked = (!empty($SESSION->shoppingcart->shipping)) ? 'checked=\"checked\"' : '';\n $str .= '<tr>';\n $str .= '<td align=\"left\" colspan=\"2\">';\n $str .= '<span class=\"smalltext\">(*)'. get_string('shippingadded', 'local_shop') .'<br/></span>';\n $str .= '<input type=\"checkbox\"\n name=\"shipping\"\n value=\"1\"\n '.sprintf('%.2f', $shipchecked).' /> '.get_string('askforshipping', 'local_shop');\n $str .= '</td>';\n $str .= '</tr>';\n }\n $str .= '</table>';\n\n return $str;\n }",
"public function calculateTotalPrice()\n {\n }",
"public function getOrdersTotalPaid(){\n $db = JFactory::getDBO();\n\n $query = \"SELECT SUM(total_paid_tax_incl) FROM \" . $db->quoteName('#__jeproshop_orders') . \" WHERE \";\n $query .= $db->quoteName('reference') . \" = \" . $db->quote($this->reference) . \" AND \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id;\n\n $db->setQuery($query);\n return $db->loadResult();\n }",
"public function getTotal() {\n\t\n\t\t$total = 0;\n\t\t\n $allproducts = $this->getProducts_all($_SESSION['store_code']);\n// var_dump($allproducts); exit;\n\t\tforeach ($allproducts as $product) {\n\t\t\tif ($this->customer->isLogged()) {\n\t\t\t\t $total += $this->tax->calculate($product['total'], $this->data['cust_tax_class'], $this->config->get('config_tax'));\n\t\t\t} else {\n\t\t\t\t$total += $this->tax->calculate($product['total'], $product['tax_class_id'], $this->config->get('config_tax'));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $total;\n\t\n\t}",
"public function getTotal()\n {\n return $this->getPrixHorsTaxe() + $this->getTaxe() - $this->getRemise();\n }",
"public function getTotal()\n {\n $total = $this->_getTotal();\n\n if ( ! empty($this->_tax)) {\n foreach ($this->_tax as $tax) {\n $total += $total * $tax;\n }\n }\n\n return number_format($total, 2);\n }",
"public function calculateTotal();",
"public function getTaxTotalPrice()\n {\n return $this->taxTotalPrice;\n }",
"function calcTotal(){\n //calculate the total for the entire cart.\n \n $productBS = new ProductBusinessService();\n //create an array to hold subtotal value\n $subtotals_array = array();\n $this->total_price = 0;\n foreach ($this->items as $item=> $qty){\n $product = $productBS->findByID($item);\n $product_subtotal = $product->getPrice() * $qty;\n $subtotals_array = $subtotals_array + array($item => $product_subtotal);\n $this->total_price = $this->total_price + $product_subtotal;\n }\n \n $this->subtotals= $subtotals_array;\n }",
"public function collectTotals($order)\n {\n $order->grand_total = $order->base_grand_total = 0;\n $order->sub_total = $order->base_sub_total = 0;\n $order->tax_amount = $order->base_tax_amount = 0;\n $order->discount_amount_invoiced = $order->base_discount_amount_invoiced = 0;\n $order->commission = $order->base_commission = 0;\n $order->seller_total = $order->base_seller_total = 0;\n $order->total_item_count = $order->total_qty_ordered = 0;\n $order->discount_amount = $order->base_discount_amount = 0;\n\n $shippingCodes = explode('_', $order->order->shipping_method);\n $carrier = current($shippingCodes);\n $shippingMethod = end($shippingCodes);\n\n $marketplaceShippingRates = session()->get('marketplace_shipping_rates');\n\n if (isset($marketplaceShippingRates[$carrier])\n && isset($marketplaceShippingRates[$carrier][$shippingMethod])\n && isset($marketplaceShippingRates[$carrier][$shippingMethod][$order->marketplace_seller_id])) {\n $sellerShippingRate = $marketplaceShippingRates[$carrier][$shippingMethod][$order->marketplace_seller_id];\n\n $order->shipping_amount = $sellerShippingRate['amount'];\n $order->base_shipping_amount = $sellerShippingRate['base_amount'];\n }\n\n foreach ($order->items()->get() as $sellerOrderItem) {\n $item = $sellerOrderItem->item;\n $order->discount_amount += $item->discount_amount;\n $order->base_discount_amount += $item->base_discount_amount;\n $order->grand_total += $item->total + $item->tax_amount - $item->discount_amount;\n\n $order->base_grand_total += $item->base_total + $item->base_tax_amount - $item->base_discount_amount;\n\n $order->sub_total += $item->total;\n $order->base_sub_total += $item->base_total;\n\n $order->tax_amount += $item->tax_amount;\n $order->base_tax_amount += $item->base_tax_amount;\n\n $order->commission += $sellerOrderItem->commission;\n $order->base_commission += $sellerOrderItem->base_commission;\n\n $order->seller_total += $sellerOrderItem->seller_total;\n $order->base_seller_total += $sellerOrderItem->base_seller_total;\n\n $order->total_qty_ordered += $item->qty_ordered;\n\n $order->total_item_count += 1;\n }\n\n if ($order->shipping_amount > 0) {\n $order->grand_total += $order->shipping_amount;\n $order->base_grand_total += $order->base_shipping_amount;\n\n // $order->seller_total += $order->shipping_amount;\n // $order->base_seller_total += $order->base_shipping_amount;\n }\n\n $order->sub_total_invoiced = $order->base_sub_total_invoiced = 0;\n $order->shipping_invoiced = $order->base_shipping_invoiced = 0;\n $order->commission_invoiced = $order->base_commission_invoiced = 0;\n $order->seller_total_invoiced = $order->base_seller_total_invoiced = 0;\n $order->base_grand_total_invoiced = $order->grand_total_invoiced = 0;\n $order->base_tax_amount_invoiced = $order->tax_amount_invoiced = 0;\n\n foreach ($order->invoices as $invoice) {\n $order->sub_total_invoiced += $invoice->sub_total;\n $order->base_sub_total_invoiced += $invoice->base_sub_total;\n\n $order->shipping_invoiced += $invoice->shipping_amount;\n $order->base_shipping_invoiced += $invoice->base_shipping_amount;\n\n $order->tax_amount_invoiced += $invoice->tax_amount;\n $order->base_tax_amount_invoiced += $invoice->base_tax_amount;\n\n $order->discount_amount_invoiced += $invoice->discount_amount;\n $order->base_discount_amount_invoiced += $invoice->base_discount_amount;\n\n $order->commission_invoiced += $commissionInvoiced = ($invoice->sub_total * $order->commission_percentage) / 100;\n $order->base_commission_invoiced += $baseCommissionInvoiced = ($invoice->base_sub_total * $order->commission_percentage) / 100;\n\n $order->seller_total_invoiced += $invoice->sub_total - $commissionInvoiced - $invoice->discount_amount + $invoice->shipping_amount + $invoice->tax_amount;\n $order->base_seller_total_invoiced += $invoice->base_sub_total - $baseCommissionInvoiced - $invoice->base_discount_amount + $invoice->base_tax_amount;\n }\n\n $order->grand_total_invoiced = $order->sub_total_invoiced + $order->shipping_invoiced + $order->tax_amount_invoiced - $order->discount_amount_invoiced;\n $order->base_grand_total_invoiced = $order->base_sub_total_invoiced + $order->base_shipping_invoiced + $order->base_tax_amount_invoiced - $order->base_discount_amount_invoiced;\n\n foreach ($order->refunds as $refund) {\n $order->sub_total_refunded += $refund->sub_total;\n $order->base_sub_total_refunded += $refund->base_sub_total;\n\n $order->shipping_refunded += $refund->shipping_amount;\n $order->base_shipping_refunded += $refund->base_shipping_amount;\n\n $order->tax_amount_refunded += $refund->tax_amount;\n $order->base_tax_amount_refunded += $refund->base_tax_amount;\n\n $order->discount_refunded += $refund->discount_amount;\n $order->base_discount_refunded += $refund->base_discount_amount;\n }\n\n $order->grand_total_refunded = $order->sub_total_refunded + $order->shipping_refunded + $order->tax_amount_refunded - $order->discount_refunded;\n\n $order->base_grand_total_refunded = $order->base_sub_total_refunded + $order->base_shipping_refunded + $order->base_tax_amount_refunded - $order->base_discount_refunded;\n\n $order->save();\n\n return $order;\n }",
"private function getTotal($order)\n {\n // $total = $order->getSubtotalInclTax(); // w/ tax (no shipping)\n $total = $order->getGrandTotal(); // w/ tax and shipping (discounts applied)\n return $total;\n }",
"public function get_total() {\n $total = 0;\n if (!empty($this->items)) {\n foreach ($this->items as $item) {\n if (!empty($item['discount'])) {\n $total += $item['quantity'] * $item['price'] * ($item['discount'] / 100);\n } else {\n if($item['total'] != 0){\n $total = $item['total'];\n }\n }\n }\n \n foreach ($this->items as $item) {\n if (!empty($item['discount'])) {\n $total += $item['quantity'] * $item['price'] * ($item['discount'] / 100);\n } else {\n if($item['price'] > 0 && empty($item['total'])){\n $total += $item['quantity'] * $item['price'];\n }\n }\n }\n }\n return $total;\n }",
"public function getTotalAfterTaxes(): Money\n {\n return $this->_product\n ->getPriceAfterTaxes()\n ->multiply($this->_qty);\n }",
"public function getTotal()\n {\n $total_ht = 0;\n\n foreach ($this->getItems() as $item)\n { \n if ($this->is_unit_price_ttc)\n { \n $total_ht += $item->getQuantity() * $item->getPriceDueToday() * (1 - $item->getDiscount() / 100) / (1 + $this->tax / 100);\n }\n else\n {\n $total_ht += $item->getQuantity() * $item->getPriceDueToday() * (1 - $item->getDiscount() / 100);\n }\n }\n \n $total_ht = $this->applyDiscounts($total_ht);\n\n return $total_ht;\n }",
"public function getShippingTaxAmount();"
] | [
"0.7832286",
"0.7556385",
"0.75120974",
"0.74571484",
"0.740024",
"0.7348799",
"0.7278923",
"0.72709286",
"0.726966",
"0.7223427",
"0.71944153",
"0.71555907",
"0.7131571",
"0.7130355",
"0.71153826",
"0.70992285",
"0.7038898",
"0.7029099",
"0.7023457",
"0.6991422",
"0.69906163",
"0.6980532",
"0.69654536",
"0.6893232",
"0.6852667",
"0.68454313",
"0.6796665",
"0.67563087",
"0.67491984",
"0.67410916"
] | 0.8546088 | 0 |
This function is used to calculate the total amount paid for this order | public function calculate_total_paid(){
$this->total_paid = 0;
foreach($this->payments as $payment){
$this->total_paid += $payment->getAmount();
}
return $this->total_paid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOrdersTotalPaid(){\n $db = JFactory::getDBO();\n\n $query = \"SELECT SUM(total_paid_tax_incl) FROM \" . $db->quoteName('#__jeproshop_orders') . \" WHERE \";\n $query .= $db->quoteName('reference') . \" = \" . $db->quote($this->reference) . \" AND \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id;\n\n $db->setQuery($query);\n return $db->loadResult();\n }",
"public function getAmountPaid();",
"public function getPaidTotal(): float\n {\n return $this->paidTotal;\n }",
"public function getTotalAmount(){\n $total_amount =Payment::sum('paid')->get();\n return $total_amount;\n }",
"public function paymentTotal()\n {\n return $this->payments->total();\n }",
"public function getTotalPaid()\n {\n return $this->_getPaymentSummaryElement('total', substr(__FUNCTION__, 8));\n }",
"public function getPaidAmount()\n {\n return $this->paid_amount;\n }",
"public function getAmountPaid()\n {\n return $this->AmountPaid;\n }",
"public function calculate_order_total(){\r\n $this->order_total = 0;\r\n foreach($this->items as $item){\r\n $this->order_total += $this->getItemSubTotal($item);\r\n }\r\n $this->sales_tax_amount = ($this->order_total * $this->sales_tax);\r\n return $this->order_total + $this->sales_tax_amount;\r\n }",
"public function amount(){\n switch ($this->status){\n\n case 'pendent'; case 'payed' : return $this->amount;\n case 'parcial'; case 'overdue' : return (\n $this->amount - $this->sumOfPayments()\n );\n\n }\n }",
"function get_total_paid( $format = false ){\n\t\t$status = ($this->booking_status == 0 && !get_option('dbem_bookings_approval') ) ? 1:$this->booking_status;\n\t\t$total = $status ? $this->get_price() : 0;\n\t\t$total = apply_filters('em_booking_get_total_paid', $total, $this);\n\t\tif( $format ){\n\t\t\treturn $this->format_price($total);\n\t\t}\n\t\treturn $total;\n\t}",
"public function getTotalPayed()\n {\n $total = 0;\n\n foreach ($this->getAccountLines() as $accountLine) {\n $total += $accountLine->getValueTaxInclude();\n }\n\n return $total;\n }",
"public function getTotalAmount();",
"public function totalAmount() {\n \n return $this->subtotal() + $this->allTaxes();\n }",
"public function calculate_total_amount()\n {\n $this->interest= ($this->principal*$this->interest_rate)/100;\n $this->total_interest = $this->year*$this->interest;\n $this->total_amount=$this->total_interest+$this->principal;\n //return $total_amount;\n }",
"public function totalValue()\n {\n $orders = $this->user->orders;\n\n $sum = 0;\n foreach ($orders as $order) {\n $sum += $order->total_price;\n }\n\n return $sum;\n }",
"public function getPaidPrice()\n {\n return $this->paid_price;\n }",
"public function getAmount()\n {\n /*\n * Return payment amount (in cents)\n */\n $amount = 666;\n\n return $amount;\n }",
"public function totalEarned() {\n $total = 0;\n\n foreach ($this->all() as $record)\n if ($record->transactionType == 'Return' || $record->transactionType == 'Sale')\n $total += $record->amount;\n\n return $total;\n }",
"public function getPaymentAmt()\n\t{\n\t\treturn $this->PaymentAmt;\n\t}",
"static function get_paid_purchases_percent(){\r\n\t\t\r\n\t\tif(self::get_all() <= 0 ){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn ( self::get_paid() / self::get_all() );\r\n\t}",
"private function total_payment_count(){\n $payment = $this->Payment_model->total_payment();\n\n //Employee Salary\n $sallary = $this->Salary_model->total_sallary();\n\n return $payment->amount + $sallary->amount;\n }",
"public function totalSpent() {\n $total = 0;\n\n foreach ($this->all() as $record)\n if ($record->transactionType == 'Purchase')\n $total += $record->amount;\n\n return $total;\n }",
"public function total()\r\n {\r\n return $this->price + $this->extra;\r\n }",
"public function getTotalAmount()\n {\n return $this->total_amount;\n }",
"public function getProposalAmount();",
"public function total(){\n $subtotal = $this->subtotal();\n $shipping = (new ShippingController)->shipping();\n\n $total = $subtotal+$shipping;\n return $total;\n }",
"function totalPrice($price,$delivery)\r\n\t\t\t\t{\r\n\t\t\t\t$total=$price+$delivery;\r\n\t\t\t\treturn $total;\r\n\t\t\t\t}",
"public function getTotalAmount()\r\n {\r\n return $this->totalAmount;\r\n }",
"function calcTotal() {\n\t\t$order = $this->controller->Session->read('Order');\n\t\t$subtotal = 0;\t\n\n\t\tforeach ($order['LineItem'] as $id => $lineItem) {\n\n\t\t\t$lineQuantity = 0;\n\t\t\t$lineTotal = 0;\n\t\t\tforeach ($lineItem['Selection'] as $count => $selection) {\n\t\t\t\t$selectionTotal = $selection['price'] * $selection['quantity'];\n/*\t\t\t\tif ($selection['taxable'])\n\t\t\t\t\t$selectionTotal += $selectionTotal * $this->taxRate;*/\n\t\t\t\t$subtotal += $selectionTotal;\n\n\t\t\t\t$lineQuantity += $selection['quantity'];\n\t\t\t\t$lineTotal += $selectionTotal;\n\t\t\t}\n\n\t\t\t$totals = array(\n\t\t\t\t'quantity' => $lineQuantity,\n\t\t\t\t'subtotal' => $lineTotal,\n\t\t\t\t'numAttribs' => count($selection['attributes']),\n\t\t\t);\n\n\t\t\t$this->controller->Session->write('Order.LineItem.' . $id . '.Totals', $totals);\n\t\t}\n\n\t\t$tax = sprintf('%.2f', $subtotal * $this->taxRate);\n\n\t\t$shipping = 0;\n\t\tif ($this->shipRate > 0) {\n\t\t\t$shipping = ($this->shipFlat) ? $this->shipRate : $subtotal * $this->shipRate;\n\t\t} elseif (!empty($order['Totals']) && $order['Totals'] > 0) {\n\t\t\t$shipping = $order['Totals']['shipping'];\t\n\t\t}\n\n\t\t$total = $subtotal + $tax + $shipping;\n\n\t\t$data = array(\n\t\t\t'subtotal' => $subtotal,\n\t\t\t'tax' => $tax,\n\t\t\t'shipping' => $shipping,\n\t\t\t'total' => $total,\n\t\t);\n\n\t\treturn $this->controller->Session->write('Order.Totals', $data);\n\t}"
] | [
"0.80763674",
"0.7806815",
"0.76807827",
"0.7498415",
"0.7496282",
"0.7435088",
"0.7356388",
"0.7266924",
"0.71960294",
"0.7171543",
"0.71588737",
"0.71329474",
"0.70059305",
"0.69874483",
"0.6982682",
"0.6872737",
"0.683671",
"0.68171203",
"0.6754374",
"0.6724317",
"0.67057407",
"0.6652351",
"0.6638369",
"0.66146314",
"0.6596527",
"0.6591597",
"0.6567786",
"0.65644765",
"0.6543225",
"0.65256506"
] | 0.84661376 | 0 |
Set Sales Tax for this order | public function setSalesTax($sales_tax, $percentage = true){
if ($percentage){
$this->sales_tax = ($sales_tax / 100);
}
else {
$this->sales_tax = $sales_tax;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTax($tax)\n {\n $this->tax = $tax;\n }",
"public function setBillingTaxAttribute($value)\n {\n $this->attributes['billing_tax'] = $value*100;\n }",
"public function setShippingTaxAmount($amount);",
"public function setTaxAmount($taxAmount);",
"public function setShippingTax($value)\n {\n $this->_fields['ShippingTax']['FieldValue'] = $value;\n return $this;\n }",
"function setTaxRate($rate=0.0){\r\n\t\t$this->taxRate = $rate;\r\n\t}",
"public function setTaxes(?array $taxes): void\n {\n $this->taxes['value'] = $taxes;\n }",
"public function setBaseShippingTaxAmount($amount);",
"function setTaxRate($taxRate) {\n\t\t// Ensures that percent values are changed to decimal\n\t\tif ($taxRate > 1)\n\t\t\t$taxRate = $taxRate / 100;\n\n\t\t$this->taxRate = $taxRate;\n\t\t$this->calcTotal();\n\t}",
"public function setTaxAmountAttribute($value)\n {\n $this->attributes['taxAmount'] = (float) $value;\n }",
"public function setTax(?float $tax): self\n {\n $this->initialized['tax'] = true;\n $this->tax = $tax;\n\n return $this;\n }",
"public function setTax(?float $tax): self\n {\n $this->initialized['tax'] = true;\n $this->tax = $tax;\n\n return $this;\n }",
"public function setItemTax($value)\n {\n $this->_fields['ItemTax']['FieldValue'] = $value;\n return $this;\n }",
"public function setTaxMode(string $taxMode): void\n {\n $this->taxMode = $taxMode;\n }",
"public function setShippingInclTax($amount);",
"public function setSalesTaxItem(?string $salesTaxItem): self\n {\n $this->salesTaxItem = $salesTaxItem;\n\n return $this;\n }",
"public function GcApi_setDeliveryTaxes($val)\r\n {\r\n $this->m_gcOrder['DeliveryTaxes']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }",
"public function GcApi_setTotalTaxes($val)\r\n {\r\n $this->m_gcOrder['TotalTaxes']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }",
"public function setTaxCode($rate)\n {\n $this->taxCode = number_format($rate * 100, 2);\n }",
"public function getTax()\n {\n return $this->tax;\n }",
"public function GcApi_setDiscountTaxes($val)\r\n {\r\n $this->m_gcOrder['DiscountTaxes']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }",
"public function setBaseShippingInclTax($amount);",
"function add_on_sales_tax($x, $y) { // define a function that takes two inputs (price and sales tax rate)\n\t\t$multiplier = $y/100 + 1; // e.g. $y is 5, then the multipler should be 1.05\n\t\t$total_with_sales_tax = $x * $multiplier; // e.g. $x is $10, so the total should be $10.50\n\t\t$total_with_sales_tax = round ($total_with_sales_tax, 2); // lets round things off to 2 decimals using the built-in round() function -- functions within functions!\n\t\t\n\t\treturn $total_with_sales_tax;\n\t}",
"public function getTaxAttribute(): float\n {\n return $this->getTax();\n }",
"public function setTaxMoney(?Money $taxMoney): void\n {\n $this->taxMoney = $taxMoney;\n }",
"public function tax(int $decimals = null, string $decimalPoint = null, string $thousandSeparator = null): string\n {\n return $this->formatNumber($this->tax, $decimals, $decimalPoint, $thousandSeparator);\n }",
"abstract public function registerTax();",
"public function getTax()\n {\n $rate = $this->taxRate / 100;\n $value = $this->price->multiply($rate);\n return $value;\n }",
"public function setTaxIncluded ($taxIncluded)\n {\n $this->taxIncluded = $taxIncluded;\n }",
"public function priceTax(int $decimals = null, string $decimalPoint = null, string $thousandSeparator = null): string\n {\n return $this->formatNumber($this->priceTax, $decimals, $decimalPoint, $thousandSeparator);\n }"
] | [
"0.67880136",
"0.6666143",
"0.65705204",
"0.6481557",
"0.647962",
"0.6414044",
"0.63891405",
"0.6374504",
"0.63077545",
"0.62568814",
"0.62349844",
"0.62349844",
"0.62129134",
"0.62094635",
"0.6204672",
"0.6179153",
"0.61711097",
"0.6142421",
"0.6129793",
"0.6081146",
"0.6078965",
"0.6075484",
"0.597806",
"0.5863411",
"0.5833666",
"0.5753399",
"0.57522017",
"0.5739284",
"0.57095736",
"0.5708367"
] | 0.70806444 | 0 |
Calculates the subtotal for an item | public function getItemSubTotal($item){
return $item->getAmount() * $this->item_quantities[$item->getID()];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function calcSubtotal(){\n foreach($this->cartItems as $cartItem){\n $this->subtotal+=$this->itemsManager->getItemPrice($cartItem);\n }\n // convert to desired currency \n $this->subtotal = $this->currencyManager->convert($this->subtotal,$this->currency);\n $this->total=$this->subtotal;\n // Append subtotal details to the bill\n $this->billDetails .=\"Subtotal: \". $this->subtotal .\" \". $this->currencyManager->getSymbol($this->currency).\"\\n\";\n }",
"private function calculateTotal() {\n $this->total = 0.00;\n if($this->hasItems()) {\n $tot = 0.00;\n foreach($this->items as $item) {\n $tot += $item['subtotal'];\n }\n $this->total = $tot;\n }\n }",
"function calcTotal(){\n //calculate the total for the entire cart.\n \n $productBS = new ProductBusinessService();\n //create an array to hold subtotal value\n $subtotals_array = array();\n $this->total_price = 0;\n foreach ($this->items as $item=> $qty){\n $product = $productBS->findByID($item);\n $product_subtotal = $product->getPrice() * $qty;\n $subtotals_array = $subtotals_array + array($item => $product_subtotal);\n $this->total_price = $this->total_price + $product_subtotal;\n }\n \n $this->subtotals= $subtotals_array;\n }",
"public static function calcItemSubtotal( $data )\r\n {\r\n $subtotal = $data['quantity'] * $data['price'];\r\n return $subtotal;\r\n }",
"public function subtotal() {\n \n $subtotal = 0.0;\n\n foreach ($this->orderItems as $orderItem) {\n $subtotal += $orderItem->subtotal();\n }\n\n return $subtotal;\n }",
"public static function getItemSubtotal($item) {\n return $item['BNew'];\n }",
"public function getSubtotal();",
"public function getSubtotal();",
"function calcTotal() {\n\t\t$order = $this->controller->Session->read('Order');\n\t\t$subtotal = 0;\t\n\n\t\tforeach ($order['LineItem'] as $id => $lineItem) {\n\n\t\t\t$lineQuantity = 0;\n\t\t\t$lineTotal = 0;\n\t\t\tforeach ($lineItem['Selection'] as $count => $selection) {\n\t\t\t\t$selectionTotal = $selection['price'] * $selection['quantity'];\n/*\t\t\t\tif ($selection['taxable'])\n\t\t\t\t\t$selectionTotal += $selectionTotal * $this->taxRate;*/\n\t\t\t\t$subtotal += $selectionTotal;\n\n\t\t\t\t$lineQuantity += $selection['quantity'];\n\t\t\t\t$lineTotal += $selectionTotal;\n\t\t\t}\n\n\t\t\t$totals = array(\n\t\t\t\t'quantity' => $lineQuantity,\n\t\t\t\t'subtotal' => $lineTotal,\n\t\t\t\t'numAttribs' => count($selection['attributes']),\n\t\t\t);\n\n\t\t\t$this->controller->Session->write('Order.LineItem.' . $id . '.Totals', $totals);\n\t\t}\n\n\t\t$tax = sprintf('%.2f', $subtotal * $this->taxRate);\n\n\t\t$shipping = 0;\n\t\tif ($this->shipRate > 0) {\n\t\t\t$shipping = ($this->shipFlat) ? $this->shipRate : $subtotal * $this->shipRate;\n\t\t} elseif (!empty($order['Totals']) && $order['Totals'] > 0) {\n\t\t\t$shipping = $order['Totals']['shipping'];\t\n\t\t}\n\n\t\t$total = $subtotal + $tax + $shipping;\n\n\t\t$data = array(\n\t\t\t'subtotal' => $subtotal,\n\t\t\t'tax' => $tax,\n\t\t\t'shipping' => $shipping,\n\t\t\t'total' => $total,\n\t\t);\n\n\t\treturn $this->controller->Session->write('Order.Totals', $data);\n\t}",
"public function subtotal(){\n $cart = \\Session::get('cart');\n $subtotal = 0;\n\n foreach($cart as $item){\n $subtotal += $item->quantity * $item->price;\n }\n\n return $subtotal;\n }",
"function getTotal(){\n\t\t$items = $this->Items();\n\t\t$sum = 0;\n\t\tif ($items){\n\t\t\tforeach ($items as $item) {\n\t\t\t\t$sum+= $item->getSubTotal();\n\t\t\t}\n\t\t}\n\t\treturn $sum;\n\t}",
"public function getSubTotal(){\n return $this->subTotal;\n }",
"public function getShippableSubTotal() {\n\t\t$total = 0;\n\t\t\n\t\t$product_rows = (array)$this->getProducts_all($_SESSION['store_code']);\n\t\tforeach ($product_rows as $product) {\n // KMC - Gift Certs - 07/27/2010\n if ($product['shipping']) { // only calculate shipable items in subtotal.\n\t\t\t //$total += $product['total'] - ($product['total'] * ($this->data['cust_discount'] * .01)); // MODIFIED for Customer Group module\n\t\t\t $total += $product['total'];\n }\n\t\t}\n\n\t\treturn $total;\n }",
"private function calcSubtotal(CartItem $item, $isvatfree=false) {\n\t\t\n\t\tforeach ( $this->items as $item ) {\n\t\t\t\n\t\t\t$isrecurring = false;\n\t\t\t$months = 0;\n\t\t\t$percentage = 0;\n\t\t\t$tax = 0;\n\t\t\t\n\t\t\tif(\"domain\" == $item->getType()){\n\t\t\t\t\n\t\t\t $item->setIsrecurring(true);\n\t\t\t \n\t\t\t // Get the billyng cycle / term / recurring period price\n\t\t\t if($item->getTerm ()){\n\t\t\t $priceInfo = ProductsTranches::getTranchebyId ( $item->getTerm () );\n\t\t\t $item->setBillingid($priceInfo ['BillingCycle'] ['billing_cycle_id']);\n\t\t\t $months = $priceInfo['BillingCycle']['months'];\n\t\t\t }else{\n\t\t\t $priceInfo = BillingCycle::getDefaultDomainBillingCycle();\n\t\t\t $item->setBillingid($priceInfo ['billing_cycle_id']);\n\t\t\t $months = $priceInfo['months'];\n\t\t\t }\n\t\t\t \n\t\t\t\t$unitprice = $item->getUnitPrice();\n\t\t\t\t$setupfee = 0;\n\t\t\t\t\n\t\t\t\t// Calculate the price per Quantity\n\t\t\t\t$subtotal = $unitprice * $item->getQty ();\n\t\t\t\t\n\t\t\t\t// check the taxes\n\t\t\t\tif(Taxes::get_percentage($item->getTaxId())){\n\t\t\t\t\t$percentage = Taxes::get_percentage($item->getTaxId());\n\t\t\t\t\t$tax = ($subtotal * $percentage) / 100;\n\t\t\t\t\t$price = ($subtotal * (100 + $percentage)) / 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t// Get all the product information\n\t\t\t\t$product = Products::getAllInfo ( $item->getId () );\n\t\t\t\t\t\n\t\t\t\t// Check the type of the product and get the price information\n\t\t\t\tif ($product ['ProductsAttributesGroups'] ['isrecurring']) {\n\t\t\t\t\n\t\t\t\t\t$item->setIsrecurring(true);\n\t\t\t\t\t\r\n\t\t\t\t\t// Get the billyng cycle / term / recurring period price\n\t\t\t\t\t$priceInfo = ProductsTranches::getTranchebyId ( $item->getTerm () );\n\t\t\t\t\t\n\t\t\t\t\t// Price multiplier\n\t\t\t\t\t$months = $priceInfo ['BillingCycle'] ['months'];\n\t\t\t\t\n\t\t\t\t\t$unitprice = $priceInfo ['price'];\n\t\t\t\t\t$setupfee = $priceInfo ['setupfee'];\n\t\t\t\t\n\t\t\t\t\t// Calculate the price per the months per Quantity\n\t\t\t\t\t$subtotal = ($unitprice * $months) * $item->getQty ();\n\t\t\t\t\t\n\t\t\t\t\t$item->setBillingid($priceInfo ['BillingCycle'] ['billing_cycle_id']);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t $item->setIsrecurring(false);\n\t\t\t\t \n\t\t\t\t\t$unitprice = $product ['price_1'];\n\t\t\t\t\t$setupfee = $product ['setupfee'];\n\t\t\t\t\n\t\t\t\t\t// Calculate the price per Quantity\n\t\t\t\t\t$subtotal= $unitprice * $item->getQty ();\n\t\t\t\t}\n\n\t\t\t\t// check the taxes for each product\n\t\t\t\tif (! empty ( $product ['tax_id'] ) && ! $isvatfree) {\n\t\t\t\t\tif (! empty ( $product ['Taxes'] ['percentage'] ) && is_numeric ( $product ['Taxes'] ['percentage'] )) {\n\t\t\t\t\t\t$percentage = $product ['Taxes'] ['percentage'];\n\t\t\t\t\t\t$tax = ($subtotal * $percentage) / 100;\n\t\t\t\t\t\t$price = ($subtotal * (100 + $percentage)) / 100;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// ... and add the setup fees\n\t\t\t$price = $subtotal + $setupfee;\n\t\t\t\n\t\t\t$item->setSubtotals ( array (\n\t\t\t\t\t'months' => $months,\n\t\t\t\t\t'subtotal' => $subtotal,\n\t\t\t\t\t'setupfee' => $setupfee,\n\t\t\t\t\t'price' => $price,\n\t\t\t\t\t'taxes' => $tax,\n\t\t\t\t\t'percentage' => $percentage \n\t\t\t) );\n\t\t}\n\t\t\n\t\treturn $this->items;\n\t}",
"function GetItemTotalPrice($item){\n\t\t\treturn $item['ItemPrice'] * $item['ItemQty']; \n\t\t}",
"function GetItemTotalPrice($item){\n\t\treturn $item['ItemPrice'] * $item['ItemQty'];\n\t}",
"private function _calcTotal()\n {\n $total = 0;\n foreach ($this->cart as $item) {\n $total += ($item->bundlePrice ? ($item->bundlePrice * $item->quantity) : ($item->price * $item->quantity));\n }\n return $total;\n }",
"public function getTotal(){\n\t\t$total = 0;\n\n\t\tforeach ($this->items as $id) {\n\t\t\t\t\t\t$subtotal = $id['qty'] * ($id['item']->getPrice());\n\t\t\t\t\t\t$total += $subtotal;\n\t\t\t\t\t}\n\n\t\treturn $total;\t\t\t\n\t}",
"public function getSubtotal()\n {\n $value = $this->price->multiply($this->qty);\n return $value;\n }",
"public function getSubtotal() {\n return $this->costPerUnit * $this->qty;\n }",
"private function SubTotals() {\n\t\n\t\treturn $this->CurrencyFormat->format($this->invoice->subtotal, $this->invoice->currency, self::$standard_num_options) ;\n\t\t\n\t}",
"public function Subtotal(){\n $this->Subtotal= $this->carro->Total();\n return $this->Subtotal;\n }",
"public function getSubTotal(){\n $dateCreation = $this->getOrder()->getDateCreation();\n $articlePrice = $this->getArticle()->getArticlePriceAt($dateCreation)->getPrice();\n\n return $articlePrice * $this->getQuantity();\n }",
"public function get_total() {\n $total = 0;\n if (!empty($this->items)) {\n foreach ($this->items as $item) {\n if (!empty($item['discount'])) {\n $total += $item['quantity'] * $item['price'] * ($item['discount'] / 100);\n } else {\n if($item['total'] != 0){\n $total = $item['total'];\n }\n }\n }\n \n foreach ($this->items as $item) {\n if (!empty($item['discount'])) {\n $total += $item['quantity'] * $item['price'] * ($item['discount'] / 100);\n } else {\n if($item['price'] > 0 && empty($item['total'])){\n $total += $item['quantity'] * $item['price'];\n }\n }\n }\n }\n return $total;\n }",
"function _update_total()\n\t\t{\n\t\t$this->itemcount = 0;\n\t\t$this->total = 0;\n\t\tif(sizeof($this->items > 0))\n\t\t\t{\n\t\t\tforeach($this->items as $item)\n\t\t\t\t{\n\t\t\t\t$this->total = $this->total + ($this->itemprices[$item] * $this->itemqtys[$item]);\n\n\t\t\t\t// TOTAL ITEMS IN CART (ORIGINAL wfCart COUNTED TOTAL NUMBER OF LINE ITEMS)\n\t\t\t\t$this->itemcount += $this->itemqtys[$item];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function getPurchaseSubtotal()\n {\n $items = $this->getItemsCollection();\n $subtotal = 0;\n foreach ($items as $_item) {\n $subtotal += $_item->getRowTotal();\n }\n return $subtotal;\n }",
"public function subtotal($clear_cache = FALSE)\n\t{\n\t\tif ($clear_cache === TRUE)\n\t\t{\n\t\t\t$this->cache(__FUNCTION__, NULL);\n\t\t}\n\t\t\n\t\t$cache = $this->cache(__FUNCTION__);\n\t\t\n\t\tif ($this->calculation_caching === FALSE || is_null($cache))\n\t\t{\n\t\t\tif ( ! is_null($this->subtotal))\n\t\t\t{\n\t\t\t\t$cache = $this->subtotal;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cache = 0;\n\t\t\t\t\n\t\t\t\tforeach ($this->items() as $item)\n\t\t\t\t{\n\t\t\t\t\t$cache += $item->price_subtotal(); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->cache(__FUNCTION__, $cache);\n\t\t}\n\t\t\n\t\treturn $this->core->round($cache);\n\t}",
"private function calculateTotals(): float{\r\n $tempTotal = 0;\r\n foreach($this->listOfItems as &$item){\r\n $item['total'] = $item['price'] * $item['quantity'];\r\n $tempTotal += $item['total'];\r\n }\r\n\r\n return $tempTotal;\r\n }",
"public function product_subtotal()\n\t{\n\t\treturn format::number($this->quantity * $this->variant->price);\n\t}",
"public function calculateTotal();"
] | [
"0.8362097",
"0.77215004",
"0.76906526",
"0.7645561",
"0.7598848",
"0.74659026",
"0.7353574",
"0.7353574",
"0.7293836",
"0.7290822",
"0.71855646",
"0.70886",
"0.7072547",
"0.706886",
"0.7068777",
"0.7039156",
"0.7023337",
"0.70017725",
"0.7000886",
"0.6988221",
"0.69858015",
"0.69834524",
"0.696921",
"0.69496274",
"0.68885404",
"0.67679346",
"0.6704403",
"0.66653824",
"0.6650633",
"0.6643501"
] | 0.8105557 | 1 |
Marshal a middleware not callable exception event | protected function marshalMiddlewareNotCallable(
$type,
$middlewareName,
MvcEvent $event,
Application $application,
\Exception $exception = null
) {
$event->setName(MvcEvent::EVENT_DISPATCH_ERROR);
$event->setError($type);
$event->setController($middlewareName);
$event->setControllerClass('Middleware not callable: ' . $middlewareName);
if ($exception !== null) {
$event->setParam('exception', $exception);
}
$events = $application->getEventManager();
$results = $events->triggerEvent($event);
$return = $results->last();
if (! $return) {
$return = $event->getResult();
}
return $return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function registerExceptionHandler();",
"protected function marshalInvalidMiddleware(\n $type,\n $middlewareName,\n MvcEvent $event,\n Application $application,\n Exception $exception = null\n ) {\n $event->setName(MvcEvent::EVENT_DISPATCH_ERROR);\n $event->setError($type);\n $event->setController($middlewareName);\n $event->setControllerClass('Middleware not callable: ' . $middlewareName);\n if ($exception !== null) {\n $event->setParam('exception', $exception);\n }\n\n $events = $application->getEventManager();\n $results = $events->triggerEvent($event);\n $return = $results->last();\n if (! $return) {\n $return = $event->getResult();\n }\n return $return;\n }",
"public function onDispatch(MvcEvent $event)\n {\n $routeMatch = $event->getRouteMatch();\n $middleware = $routeMatch->getParam('middleware', false);\n if (false === $middleware) {\n return;\n }\n\n $request = $event->getRequest();\n $application = $event->getApplication();\n $response = $application->getResponse();\n $serviceManager = $application->getServiceManager();\n $middlewareName = is_string($middleware) ? $middleware : get_class($middleware);\n\n if (is_string($middleware) && $serviceManager->has($middleware)) {\n $middleware = $serviceManager->get($middleware);\n }\n if (! is_callable($middleware)) {\n $return = $this->marshalMiddlewareNotCallable($application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, $middlewareName, $event, $application);\n $event->setResult($return);\n return $return;\n }\n\n $caughtException = null;\n try {\n $return = $middleware(Psr7Request::fromZend($request), Psr7Response::fromZend($response));\n } catch (\\Throwable $ex) {\n $caughtException = $ex;\n } catch (\\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced\n $caughtException = $ex;\n }\n\n if ($caughtException !== null) {\n $event->setName(MvcEvent::EVENT_DISPATCH_ERROR);\n $event->setError($application::ERROR_EXCEPTION);\n $event->setController($middlewareName);\n $event->setControllerClass(get_class($middleware));\n $event->setParam('exception', $caughtException);\n\n $events = $application->getEventManager();\n $results = $events->triggerEvent($event);\n $return = $results->last();\n if (! $return) {\n $return = $event->getResult();\n }\n }\n\n if (! $return instanceof PsrResponseInterface) {\n $event->setResult($return);\n return $return;\n }\n $response = Psr7Response::toZend($return);\n $event->setResult($response);\n return $response;\n }",
"protected function _throwDispatchException(){ }",
"public function testMiddlewareNotFoundExeption()\n {\n $this->expectException(MiddlewareNotFoundException::class);\n $app = new App();\n $routes = new MiddlewareNoFound($app, [\n 'banana' => function($request, $response, $next) {\n return $response; \n }\n ]);\n Routes::init([$routes]);\n }",
"public function handle($request, Closure $next)\n {\n if($request->hasValidSignature()){\n return $next($request);\n }throw new Exception(\"Error Processing Request\", 1);\n \n\n }",
"public function registerErrorHandler();",
"public function onDispatch(MvcEvent $event)\n {\n if (null !== $event->getResult()) {\n return;\n }\n\n $routeMatch = $event->getRouteMatch();\n $middleware = $routeMatch->getParam('middleware', false);\n if (false === $middleware) {\n return;\n }\n\n trigger_error(sprintf(\n 'Dispatching middleware with %s is deprecated since 3.2.0;'\n . ' please use the laminas/laminas-mvc-middleware package instead',\n self::class\n ), E_USER_DEPRECATED);\n\n $request = $event->getRequest();\n $application = $event->getApplication();\n $response = $application->getResponse();\n $serviceManager = $application->getServiceManager();\n\n $psr7ResponsePrototype = Psr7Response::fromLaminas($response);\n\n try {\n $pipe = $this->createPipeFromSpec(\n $serviceManager,\n $psr7ResponsePrototype,\n is_array($middleware) ? $middleware : [$middleware]\n );\n } catch (InvalidMiddlewareException $invalidMiddlewareException) {\n $return = $this->marshalInvalidMiddleware(\n $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH,\n $invalidMiddlewareException->toMiddlewareName(),\n $event,\n $application,\n $invalidMiddlewareException\n );\n $event->setResult($return);\n return $return;\n }\n\n $caughtException = null;\n try {\n $return = (new MiddlewareController(\n $pipe,\n $psr7ResponsePrototype,\n $application->getServiceManager()->get('EventManager'),\n $event\n ))->dispatch($request, $response);\n } catch (Throwable $ex) {\n $caughtException = $ex;\n }\n\n if ($caughtException !== null) {\n $event->setName(MvcEvent::EVENT_DISPATCH_ERROR);\n $event->setError($application::ERROR_EXCEPTION);\n $event->setParam('exception', $caughtException);\n\n $events = $application->getEventManager();\n $results = $events->triggerEvent($event);\n $return = $results->last();\n if (! $return) {\n $return = $event->getResult();\n }\n }\n\n $event->setError('');\n\n if (! $return instanceof PsrResponseInterface) {\n $event->setResult($return);\n return $return;\n }\n $response = Psr7Response::toLaminas($return);\n $event->setResult($response);\n return $response;\n }",
"private function registerCustomExceptions()\n {\n $this->renderContainer->registerMapping([\n\n MassAssignmentException::class => Response::HTTP_FORBIDDEN,\n\n ]);\n\n //\n // That's an example of how to create JSON API Error response from exception.\n //\n $custom404render = function (/*Request $request, ModelNotFoundException $exception*/) {\n $responses = new Responses($this->integration);\n\n $supportedExtensions = app()->resolved(SupportedExtensionsInterface::class) === false ? null :\n app()->make(SupportedExtensionsInterface::class);\n\n $title = 'Requested item not found';\n $error = new Error(null, null, null, null, $title);\n $content = Encoder::instance([])->error($error);\n\n return $responses->getResponse(\n Response::HTTP_NOT_FOUND,\n new MediaType(CodecContainerInterface::JSON_API_TYPE),\n $content,\n $supportedExtensions\n );\n };\n $this->renderContainer->registerRender(ModelNotFoundException::class, $custom404render);\n }",
"public function testRegisterException()\n\t{\n\t\t$this->object->register('fakeevent', 'nonExistingClass');\n\t}",
"public function handleException(\\Exception $exception, $event);",
"protected function _register_error_handler()\n {\n if (null === $this->_processor_handle_signal) {\n $this->_processor_handle_signal = new \\XPSPL\\processor\\signal\\Processor_Errors();\n } else {\n $queue = $this->search_signals($this->_processor_handle_signal);\n if ($queue->count() !== 0) {\n return true;\n }\n }\n // TODO allow for specifing a context for the event rather than the \n // event itself and recieve it as the first parameter\n $processor = $this;\n $this->signal($this->_processor_handle_signal, function() use ($processor){\n $exception = $processor->current_signal()->get_exception();\n if (null !== $exception) {\n $trace = array_reverse($exception->getTrace());\n $error = get_class_name($exception);\n $message = $exception->getMessage();\n $line = $exception->getLine();\n $file = $exception->getFile();\n } else {\n $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n $stack = array_pop($trace);\n $message = $processor->current_signal()->get_error();\n $error = get_class_name($processor->current_signal());\n $file = $stack['file'];\n $line = $stack['line'];\n }\n $stacktrace = '';\n $i=0;\n foreach ($trace as $_trace) {\n if (!isset($_trace['file']) \n || strpos($_trace['file'], XPSPL_PATH) === false) {\n $stacktrace .= sprintf(\n $i.': # %s:%s(%s)'.PHP_EOL,\n (isset($_trace['file'])) ? $_trace['file'] : '-',\n (isset($_trace['line'])) ? $_trace['line'] : '-',\n ((isset($_trace['class'])) \n ? $_trace['class'] . $_trace['type'] : '') \n . $_trace['function']\n );\n $i++;\n }\n }\n echo sprintf(\n 'Exception: %s'.PHP_EOL.''\n .'Message: %s'.PHP_EOL.''\n .'Line: %s'.PHP_EOL.''\n .'File: %s'.PHP_EOL.''\n .'Trace:'.PHP_EOL.''\n .'%s',\n $error,\n $message,\n $line,\n $file,\n $stacktrace\n );\n });\n }",
"public static function register()\n {\n // y en otro momento\n if (M3::$execution_type != 'cli') {\n set_exception_handler ([__CLASS__, 'handler']); \n }\n }",
"protected function registerExceptionHandler()\n {\n $this->app->singleton('api.exception', function ($app) {\n return new ApiExceptionHandler($app['Illuminate\\Contracts\\Debug\\ExceptionHandler'], Config('api.errorFormat', [\n 'message' => ':message',\n 'errors' => ':errors',\n 'code' => ':code',\n 'statusCode' => ':status_code',\n 'debug' => ':debug',\n ]), Config('api.debug', true));\n });\n }",
"public function shouldSkipMiddleware()\n {\n }",
"public function testOnKernelExceptionTransformToJsonResponseDoesNothingWhenRouteIsNotFoundInCollection()\n {\n $request = new Request();\n $request->attributes->set('_route', 'not_in_collection');\n\n /** @var MockObject|GetResponseForExceptionEvent $eventMock */\n $eventMock = $this->getMockBuilder(GetResponseForExceptionEvent::class)\n ->disableOriginalConstructor()\n ->setMethods(['getRequest'])\n ->getMock();\n $eventMock->expects($this->once())\n ->method('getRequest')\n ->willReturn($request);\n\n $this->subscriber->onKernelExceptionTransformToJsonResponse($eventMock);\n\n $this->assertNull($eventMock->getResponse());\n }",
"protected function onControllerExceptionResponse(Response $response)\n {\n\n }",
"private function setErrorHandler()\n {\n $this->getEventDispatcher()->addListener(\n 'request.error',\n function (Event $event) {\n // Stop other events from firing when you override 401 responses\n $event->stopPropagation();\n if ($event['response']->getStatusCode() >= 400 && $event['response']->getStatusCode() < 600) {\n $e = SemantriaException::factory($event['request'], $event['response']);\n $event['request']->setState(Request::STATE_ERROR, array('exception' => $e) + $event->toArray());\n throw $e;\n }\n }\n );\n }",
"protected function onControllerException(\\Exception $exception)\n {\n\n }",
"protected function _handleException(){ }",
"abstract protected function setExceptionHandler($callback);",
"public function register()\n {\n $this->reportable(function (PingWriteException $e) {\n Log::error($e->getMessage(), $e->getTrace());\n return false;\n });\n\n $this->reportable(function (ValidatorException $e) {\n Log::error($e->getMessage(), $e->getTrace());\n return false;\n });\n\n parent::register();\n }",
"public function testMiddlewareArgsExeption()\n {\n $this->expectException(MiddlewareArgsException::class);\n $app = new App();\n $routes = new MiddlewareArgs($app, [\n 'banana' => function($request, $response, $next) {\n return $response; \n }\n ]);\n Routes::init([$routes]);\n }",
"protected function registerWhoops()\n {\n return tap(new Whoops, function ($whoops) {\n // We will instruct Whoops to not exit after it displays the exception as it\n // will otherwise run out before we can do anything else. We just want to\n // let the framework go ahead and finish a request on this end instead.\n $whoops->allowQuit(false);\n\n $whoops->writeToOutput(false);\n\n return $whoops->pushHandler($this->whoopsHandler());\n });\n }",
"protected function registerHandler()\n {\n $this->app['exception'] = $this->app->share(function ($app) {\n return new Handler($app, $app['exception.plain'], $app['exception.debug']);\n });\n }",
"public function testRegisterExceptionHandlerWithoutApi() {\n\t\t$listener = $this->getMockBuilder('ApiListener')\n\t\t\t->setMethods(array('_request'))\n\t\t\t->disableOriginalConstructor()\n\t\t\t->getMock();\n\n\t\t$request = $this->getMockBuilder('CakeRequest')\n\t\t\t->setMethods(array('is'))\n\t\t\t->disableOriginalConstructor()\n\t\t\t->getMock();\n\t\t$request\n\t\t\t->expects($this->at(0))\n\t\t\t->method('is')\n\t\t\t->with('api')\n\t\t\t->will($this->returnValue(false));\n\n\t\t$listener\n\t\t\t->expects($this->once())\n\t\t\t->method('_request')\n\t\t\t->with()\n\t\t\t->will($this->returnValue($request));\n\n\t\t$listener->registerExceptionHandler();\n\n\t\t$expected = 'ExceptionRenderer';\n\t\t$result = Configure::read('Exception.renderer');\n\t\t$this->assertEquals($expected, $result);\n\t}",
"public abstract function handleException();",
"public function apply(Event $event, Throwable $exception, ?ServerRequestInterface $request): void;",
"public function render($request, Exception $exception)\n {\n if (env('APP_ENV') === 'local') {\n return parent::render($request, $exception);\n }\n /**\n * Api Request\n */\n if ( $request->expectsJson() ) {\n\n if ($exception instanceof ThrottleRequestsException)\n return $this->errorResponse( __('validation.handler.max_attempts'), 429 );\n\n if ($exception instanceof ValidationException)\n return $this->convertValidationExceptionToResponse( $exception, $request );\n\n if ($exception instanceof ModelNotFoundException)\n return $this->errorResponse(__('validation.handler.resource_not_found'), 404);\n\n if ($exception instanceof AuthenticationException)\n return $this->unauthenticated($request, $exception);\n\n if ($exception instanceof NotFoundHttpException)\n return $this->errorResponse(__('validation.handler.resource_not_found_url'), 404);\n\n if ($exception instanceof RelationNotFoundException)\n return $this->errorResponse(__('validation.handler.relation_not_found'), 404);\n\n if ($exception instanceof AuthorizationException)\n return $this->errorResponse(__('validation.handler.unauthorized'), 403);\n\n if ($exception instanceof AccessDeniedHttpException)\n return $this->errorResponse(__('validation.handler.unauthorized'), 403);\n\n if ($exception instanceof MethodNotAllowedHttpException)\n return $this->errorResponse(__('validation.handler.method_allow'), 405);\n\n if ($exception instanceof ConnectionException)\n return $this->errorResponse(__('validation.handler.connection_refused', ['db' => 'Redis']), 405);\n\n if ( $exception instanceof Connection) {\n dd($exception);\n }\n\n if ($exception instanceof HttpException)\n return $this->errorResponse($exception->getMessage(), $exception->getStatusCode());\n\n if ( $exception instanceof ErrorException )\n return $this->errorResponse(__('validation.handler.unexpected_failure'), 500);\n\n if ($exception instanceof PDOException)\n return $exception->getCode();\n\n if ($exception instanceof FatalThrowableError)\n return $this->errorResponse(__('validation.handler.conflict'), 409);\n\n if ($exception instanceof QueryException) {\n\n if ($exception->errorInfo[0] === \"23503\")\n return $this->errorResponse(__('validation.handler.relation_not_delete'), 409);\n\n if ($exception->errorInfo[0] === \"42S22\")\n return $this->errorResponse(__('validation.handler.column_not_found'), 409);\n\n if ($exception->errorInfo[0] === \"42S02\")\n return $this->errorResponse(__('validation.handler.column_not_found'), 409);\n\n if ($exception->errorInfo[1] == 2002)\n return $this->errorResponse( __('validation.handler.connection_refused', ['db' => 'MySQL'] ), 405);\n\n if ($exception->errorInfo[1] == 1451)\n return $this->errorResponse(__('validation.handler.relation_not_delete'), 409);\n\n if ($exception->errorInfo[1] == 7)\n return $this->errorResponse(__('validation.handler.conflict'), 409);\n\n if ($exception->getCode() == 7)\n return $this->errorResponse(__('validation.handler.service_unavailable'), 503);\n }\n\n if ($exception instanceof TokenMismatchException)\n return $this->errorResponse(__('validation.handler.token_mismatch'), 422);\n }\n\n /**\n * Request Web\n */\n if ($exception instanceof TokenMismatchException)\n return redirect()->back()->withInput($request->input());\n\n if ($exception instanceof QueryException) {\n if ($exception->getCode() == 7)\n return response()->view('errors.503');\n }\n\n if ($exception instanceof AuthenticationException)\n return $this->unauthenticated($request, $exception);\n\n if ($exception instanceof ClientException || $exception instanceof ServerException) {\n $status = $exception->getResponse()->getStatusCode();\n if ( view()->exists(\"errors.{$status}\"))\n return response()->view(\"errors.{$status}\");\n }\n\n if ($exception instanceof ErrorException) {\n return parent::render($request, $exception);\n// $status = $exception->getPrevious()->getResponse()->getStatusCode();\n// if (view()->exists(\"errors.{$status}\"))\n// return response()->view(\"errors.{$status}\");\n }\n\n if ($exception instanceof PDOException) {\n if ($exception->getCode() == 7)\n return response()->view('errors.503');\n\n if ($exception->getCode() == 2002)\n return $this->errorResponse( __('validation.handler.connection_refused', ['db' => 'MySQL'] ), 405);\n }\n\n if ($exception instanceof HttpException) {\n $status = $exception->getStatusCode();\n if (view()->exists(\"errors.{$status}\"))\n return response()->view(\"errors.{$status}\", ['exception' => $exception], $status, $exception->getHeaders());\n }\n\n return parent::render($request, $exception);\n }",
"protected function registerApiCustomError()\n {\n $this->app[Handler::class]->register(function (ApiCustomException $exception) {\n\n $response = $this->getDefaultExceptionResponse($exception);\n\n if ($exception->hasErrors()) {\n $response += $exception->getErrors();\n }\n\n return response($response, $exception->getStatusCode());\n });\n }"
] | [
"0.6713116",
"0.6310791",
"0.59929687",
"0.5896748",
"0.5779859",
"0.5767988",
"0.5727393",
"0.5707739",
"0.56166303",
"0.5610234",
"0.55287176",
"0.55283",
"0.55221826",
"0.54626745",
"0.5459248",
"0.5410386",
"0.53925943",
"0.53594446",
"0.5348036",
"0.5344687",
"0.53332835",
"0.53293806",
"0.5316595",
"0.5313605",
"0.5312441",
"0.53087807",
"0.5306504",
"0.529017",
"0.5285617",
"0.52572376"
] | 0.65052813 | 1 |
Returns attributes examples. Each entry should validate against validation rules. ```php return [ 'attributeName' => ['validValue', 'anotherValidValue'] ]; ``` | public function attributesExamples(): array; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function providerTestAttributeData() {\n return [\n // Verify that special characters are HTML encoded.\n [['&\"\\'<>' => 'value'], ' &"'<>=\"value\"', 'HTML encode attribute names.'],\n [['title' => '&\"\\'<>'], ' title=\"&"'<>\"', 'HTML encode attribute values.'],\n // Verify multi-value attributes are concatenated with spaces.\n [['class' => ['first', 'last']], ' class=\"first last\"', 'Concatenate multi-value attributes.'],\n // Verify boolean attribute values are rendered correctly.\n [['disabled' => TRUE], ' disabled', 'Boolean attribute is rendered.'],\n [['disabled' => FALSE], '', 'Boolean attribute is not rendered.'],\n // Verify empty attribute values are rendered.\n [['alt' => ''], ' alt=\"\"', 'Empty attribute value #1.'],\n [['alt' => NULL], '', 'Null attribute value #2.'],\n // Verify multiple attributes are rendered.\n [\n [\n 'id' => 'id-test',\n 'class' => ['first', 'last'],\n 'alt' => 'Alternate',\n ],\n ' id=\"id-test\" class=\"first last\" alt=\"Alternate\"',\n 'Multiple attributes.',\n ],\n // Verify empty attributes array is rendered.\n [[], '', 'Empty attributes array.'],\n ];\n }",
"public function attributeProvider()\n {\n return [\n 'Single attribute' => [\n [\n 'id' => 'first-name',\n ],\n '[id=\"first-name\"]',\n ],\n 'Multiple attributes' => [\n [\n 'id' => 'first-name',\n 'value' => 'Ringo',\n ],\n '[id=\"first-name\"][value=\"Ringo\"]',\n ],\n 'Boolean attribute' => [\n [\n 'checked' => null,\n ],\n '[checked]',\n ],\n 'Data attribute' => [\n [\n 'data-foo' => 'bar',\n ],\n '[data-foo=\"bar\"]',\n ],\n 'Value contains quotes' => [\n [\n 'name' => 'Austin \"Danger\" Powers',\n ],\n '[name=\"Austin "Danger" Powers\"]',\n ],\n ];\n }",
"public function dataAttribute()\n {\n return [\n [\n '/* testAttribute */',\n 2,\n [ T_STRING ],\n ],\n [\n '/* testAttributeWithParams */',\n 7,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_STRING,\n T_DOUBLE_COLON,\n T_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeWithNamedParam */',\n 10,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_STRING,\n T_DOUBLE_COLON,\n T_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeOnFunction */',\n 2,\n [ T_STRING ],\n ],\n [\n '/* testAttributeOnFunctionWithParams */',\n 17,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeWithShortClosureParameter */',\n 17,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_STATIC,\n T_WHITESPACE,\n T_FN,\n T_WHITESPACE,\n T_OPEN_PARENTHESIS,\n T_VARIABLE,\n T_CLOSE_PARENTHESIS,\n T_WHITESPACE,\n T_FN_ARROW,\n T_WHITESPACE,\n T_BOOLEAN_NOT,\n T_WHITESPACE,\n T_VARIABLE,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeGrouping */',\n 26,\n [\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n T_COMMA,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeMultiline */',\n 31,\n [\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n T_COMMA,\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n T_WHITESPACE,\n ],\n ],\n [\n '/* testFqcnAttribute */',\n 13,\n [\n T_STRING,\n T_NS_SEPARATOR,\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_NS_SEPARATOR,\n T_STRING,\n T_NS_SEPARATOR,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n ];\n\n }",
"public function attributes()\n {\n\n // Get all attributes, that were registered with the ValidationManager service.\n $attributes = app()[ValidationManager::class]->getAttributes(null, true);\n\n // Parse the registered rules for array-field-names (e.g. \"domainList.*.domainName\" or \"domainName.*\")\n // and try adding correct attribute translations (e.g. \"domainName\" in these examples) to $attributes.\n $this->processArrayAttributes($attributes);\n\n return $attributes;\n\n }",
"public function rules()\n {\n $attributes = $this->advert->getAllAttributes();\n\n $rules = [];\n\n /** @var Attribute $attribute */\n foreach ($attributes ?? [] as $attribute) {\n $key = \"attr.{$attribute->id}\";\n $rule = [];\n\n if ($attribute->required) {\n array_push($rule, 'required');\n } else {\n array_push($rule, 'nullable');\n }\n\n if ($attribute->isNumber()) {\n array_push($rule, 'integer');\n } elseif ($attribute->isFloat()) {\n array_push($rule, 'numeric');\n } elseif ($attribute->isText()) {\n array_push($rule, 'string');\n } elseif ($attribute->isCheckbox()) {\n array_push($rule, 'boolean');\n } elseif ($attribute->isSelect() || $attribute->isRadio()) {\n array_push($rule, Rule::in(array_keys($attribute->variantsToArray())));\n }\n\n $rules[$key] = $rule;\n }\n\n return $rules;\n }",
"public function rules()\n {\n return [\n 'title' => 'required|string|min:5',\n 'attributes' => [new Attributes],\n 'modifiers' => 'required|string',\n 'description' => [\n 'required',\n 'string',\n function ($attribute, $value, $fail) {\n if(!Str::is('*.', $value)) {\n $fail(\"The $attribute must have dot at the end.\");\n }\n },\n ],\n 'price' => 'required|numeric|min:1',\n 'image' => 'required|image|max:2000',\n ];\n }",
"public function getValidNameAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'element_name_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'element_name_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'element_name_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'element_name_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'element_name_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'element_name_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'element_name_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'element_name_0008.xsd', 'foo_bar', \n ], \n ];\n }",
"public function dataAttributeOnParameters()\n {\n return [\n [\n '/* testSingleAttributeOnParameter */',\n 4,\n 2,\n [T_STRING],\n ],\n [\n '/* testMultipleAttributesOnParameter */',\n 4,\n 10,\n [\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_COMMENT,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testMultilineAttributesOnParameter */',\n 4,\n 13,\n [\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_WHITESPACE,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_WHITESPACE,\n T_CLOSE_PARENTHESIS,\n T_WHITESPACE,\n T_WHITESPACE,\n ],\n ],\n ];\n\n }",
"public function getSampleHtmlValidTagsWithAttributes()\n {\n return array(\n 'normal html, single tag, single attribute' => array(\n 'valueInput' => '<span class=\"test\">test this</span>',\n 'outputValue' => array(\n array('class=\"test\"')\n ),\n ),\n 'normal html, single tag, double attribute' => array(\n 'valueInput' => '<span class=\"test\" style=\"float: right;\">test this</span>',\n 'outputValue' => array(\n array('class=\"test\"', 'style=\"float: right;\"')\n ),\n ),\n 'normal html, nested tags, several attributes attribute' => array(\n 'valueInput' => '<div class=\"outerDiv\"><input type=\"text\" name=\"mightyInput\" /><span class=\"test\" style=\"float: right;\">test this</span></div>',\n 'outputValue' => array(\n array('class=\"outerDiv\"'),\n array('type=\"text\"', 'name=\"mightyInput\"'),\n array('class=\"test\"', 'style=\"float: right;\"'),\n ),\n ),\n );\n }",
"public function attributes(): array\n {\n return [\n 'name' => 'Название',\n 'subject' => 'Субъект',\n 'resource' => 'Ресурс',\n 'properties' => 'Атрибуты',\n 'action' => 'Действие',\n 'algorithm' => 'Алгоритм',\n 'rules' => 'Правила',\n ];\n }",
"protected function validate_attributes( $attributes = [] )\n\t{\n\t\tis_array( $attributes ) || $attributes = [ $attributes ];\n\t\t\n\t\t$valid_attributes = [];\n\t\t\n\t\tforeach ( $attributes as $attribute ) \n\t\t{\n\t\t\t$attribute = trim( $attribute );\n\t\t\tif ( in_array( $attribute, $this->allowed_fields ) )\n\t\t\t{\n\t\t\t\t$valid_attributes[] = $attribute;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $valid_attributes;\n\t}",
"public function getValidDefaultAttributes(): array\n {\n return [\n 'Empty string' => [\n 'element_default_0001.xsd', \n '', \n ], \n 'Only white spaces' => [\n 'element_default_0002.xsd', \n ' ', \n ], \n 'Alphanumeric' => [\n 'element_default_0003.xsd', \n 'foo3bar6baz9', \n ], \n 'Alphanumeric with white spaces' => [\n 'element_default_0004.xsd', \n ' foo2 bar9 baz8 qux1 ', \n ], \n ];\n }",
"public function getAttributes(): array\n {\n return [\n 'name' => $this->name,\n 'types' => $this->types,\n 'resolveType' => function ($value) {\n return $this->resolveType($value);\n },\n ];\n }",
"public function validationData()\n {\n foreach ($this->shouldCheck as $attribute) {\n if (! $this->has($attribute)) {\n $this->merge([$attribute => null]);\n }\n }\n\n return $this->all();\n }",
"public function getValidAbstractAttributes(): array\n {\n return [\n 'true (string)' => [\n 'element_abstract_0001.xsd', \n TRUE, \n ], \n 'true (numeric)' => [\n 'element_abstract_0002.xsd', \n TRUE, \n ], \n 'true (string) surrounded by white spaces' => [\n 'element_abstract_0003.xsd', \n TRUE, \n ], \n 'true (numeric) surrounded by white spaces' => [\n 'element_abstract_0004.xsd', \n TRUE, \n ], \n 'false (string)' => [\n 'element_abstract_0005.xsd', \n FALSE, \n ], \n 'false (numeric)' => [\n 'element_abstract_0006.xsd', \n FALSE, \n ], \n 'false (string) surrounded by white spaces' => [\n 'element_abstract_0007.xsd', \n FALSE, \n ], \n 'false (numeric) surrounded by white spaces' => [\n 'element_abstract_0008.xsd', \n FALSE, \n ], \n ];\n }",
"private function getDefaultAttributes(): array\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }",
"public function attributes(): array\n {\n return [\n 'email' => 'e-mail',\n 'cpf' => 'CPF',\n 'phone' => 'Telefone'\n ];\n }",
"public function validationData(): array\n {\n return $this->only(['name']);\n }",
"public static function validationArray():array {\n $validation = array (\n \"displayName\" => 'required|string|max:255',\n \"fieldName\" => 'required|string|max:255',\n \"uri\" => 'required|string|max:255',\n \"mediaType\" => 'required|integer|max:255',\n );\n\n return $validation;\n }",
"public function attributes()\n {\n return [\n\n ];\n }",
"public function attributes()\n {\n return [\n\n ];\n }",
"public function attributes()\n {\n return [\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function validationAttributes(Attribute $attribute)\n {\n return (new HtmlRules($attribute->rules(), $attribute->type()))->attributes();\n }"
] | [
"0.7408375",
"0.6848916",
"0.67413545",
"0.65645677",
"0.65031666",
"0.645069",
"0.6428237",
"0.6425922",
"0.64075726",
"0.6367345",
"0.6345695",
"0.62673753",
"0.622331",
"0.6174803",
"0.61636317",
"0.6161198",
"0.61478513",
"0.61448246",
"0.6134649",
"0.6126473",
"0.6126473",
"0.61224985",
"0.6092359",
"0.6092359",
"0.6092359",
"0.6092359",
"0.6092359",
"0.6092359",
"0.6092359",
"0.6082363"
] | 0.7097357 | 1 |
Returns the examples for the specified attribute. | public function getAttributeExamples(string $attribute): ?array; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function attributesExamples(): array;",
"public function getAttributeMultiple($attribute);",
"public function dataAttribute()\n {\n return [\n [\n '/* testAttribute */',\n 2,\n [ T_STRING ],\n ],\n [\n '/* testAttributeWithParams */',\n 7,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_STRING,\n T_DOUBLE_COLON,\n T_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeWithNamedParam */',\n 10,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_STRING,\n T_DOUBLE_COLON,\n T_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeOnFunction */',\n 2,\n [ T_STRING ],\n ],\n [\n '/* testAttributeOnFunctionWithParams */',\n 17,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeWithShortClosureParameter */',\n 17,\n [\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_STATIC,\n T_WHITESPACE,\n T_FN,\n T_WHITESPACE,\n T_OPEN_PARENTHESIS,\n T_VARIABLE,\n T_CLOSE_PARENTHESIS,\n T_WHITESPACE,\n T_FN_ARROW,\n T_WHITESPACE,\n T_BOOLEAN_NOT,\n T_WHITESPACE,\n T_VARIABLE,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeGrouping */',\n 26,\n [\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n T_COMMA,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n [\n '/* testAttributeMultiline */',\n 31,\n [\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n T_COMMA,\n T_WHITESPACE,\n T_WHITESPACE,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_PARAM_NAME,\n T_COLON,\n T_WHITESPACE,\n T_OPEN_SHORT_ARRAY,\n T_CONSTANT_ENCAPSED_STRING,\n T_WHITESPACE,\n T_DOUBLE_ARROW,\n T_WHITESPACE,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_SHORT_ARRAY,\n T_CLOSE_PARENTHESIS,\n T_WHITESPACE,\n ],\n ],\n [\n '/* testFqcnAttribute */',\n 13,\n [\n T_STRING,\n T_NS_SEPARATOR,\n T_STRING,\n T_COMMA,\n T_WHITESPACE,\n T_NS_SEPARATOR,\n T_STRING,\n T_NS_SEPARATOR,\n T_STRING,\n T_OPEN_PARENTHESIS,\n T_CONSTANT_ENCAPSED_STRING,\n T_CLOSE_PARENTHESIS,\n ],\n ],\n ];\n\n }",
"public function providerTestAttributeData() {\n return [\n // Verify that special characters are HTML encoded.\n [['&\"\\'<>' => 'value'], ' &"'<>=\"value\"', 'HTML encode attribute names.'],\n [['title' => '&\"\\'<>'], ' title=\"&"'<>\"', 'HTML encode attribute values.'],\n // Verify multi-value attributes are concatenated with spaces.\n [['class' => ['first', 'last']], ' class=\"first last\"', 'Concatenate multi-value attributes.'],\n // Verify boolean attribute values are rendered correctly.\n [['disabled' => TRUE], ' disabled', 'Boolean attribute is rendered.'],\n [['disabled' => FALSE], '', 'Boolean attribute is not rendered.'],\n // Verify empty attribute values are rendered.\n [['alt' => ''], ' alt=\"\"', 'Empty attribute value #1.'],\n [['alt' => NULL], '', 'Null attribute value #2.'],\n // Verify multiple attributes are rendered.\n [\n [\n 'id' => 'id-test',\n 'class' => ['first', 'last'],\n 'alt' => 'Alternate',\n ],\n ' id=\"id-test\" class=\"first last\" alt=\"Alternate\"',\n 'Multiple attributes.',\n ],\n // Verify empty attributes array is rendered.\n [[], '', 'Empty attributes array.'],\n ];\n }",
"public function getAttributeExample(string $attribute): ?string;",
"function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n $res = $this->call(\"InputFile.GetAtributeByAttribute?attr_name=\".urlencode($attr_name).\"&attr_value=\".urlencode($attr_value).\"&exactly=\".urlencode($exactly).\"&name_attr=\".urlencode($name_attr));\n if ($res ==\"false\")\n\t\t\treturn false;\n\t\telse\n\t\t\treturn $res;\n }",
"public function getExamples($word) {\n\t\tif(is_null($word) || trim($word) == '') {\n\t\t\tthrow new InvalidParameterException(\"getExamples expects word to be a string\");\n\t\t}\n\t\treturn $this->callApi( '/word.json/' . rawurlencode($word) . '/examples' );\n\t}",
"public function getExamples()\n\t{\n\t\t$Example = new Product_Example();\n\t\treturn $Example->findList( array( 'ProductId = '.$this->Id ), 'Position asc' );\n\t}",
"public function supportsAttribute($attribute);",
"public function getAttributeList();",
"public function getAttributeHint($attribute);",
"public function selectData(array $attribute)\n {\n $tableName = $this->table_prefix . 'listattr_' . $attribute['tablename'];\n\n return $this->dbCommand->queryAll(<<<END\n SELECT id, name\n FROM $tableName\n ORDER BY listorder, id\nEND\n );\n\n return $this->dbCommand->queryAll($sql);\n }",
"public function attributeProvider()\n {\n return [\n 'Single attribute' => [\n [\n 'id' => 'first-name',\n ],\n '[id=\"first-name\"]',\n ],\n 'Multiple attributes' => [\n [\n 'id' => 'first-name',\n 'value' => 'Ringo',\n ],\n '[id=\"first-name\"][value=\"Ringo\"]',\n ],\n 'Boolean attribute' => [\n [\n 'checked' => null,\n ],\n '[checked]',\n ],\n 'Data attribute' => [\n [\n 'data-foo' => 'bar',\n ],\n '[data-foo=\"bar\"]',\n ],\n 'Value contains quotes' => [\n [\n 'name' => 'Austin \"Danger\" Powers',\n ],\n '[name=\"Austin "Danger" Powers\"]',\n ],\n ];\n }",
"function get($attribute)\n {\n return $this->_get($attribute);\n }",
"function get_y_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_y_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"function get_y_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_y_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"public function getAttributes(): array;",
"public function getAttributes(): array;",
"public function getAttributes(): array;",
"public function getAttributes(): array;",
"protected function getExamples($string, $name='<string>')\n {\n $examples = array();\n $parsed = $this->parse($string, $name);\n foreach ($parsed as $x) {\n if ($x instanceof DocTest_Example) {\n $examples[] = $x;\n }\n }\n return $examples;\n }",
"function z_get_y_by_atribute($attr_name,$attr_value,$exactly)\n\t{\n\t\treturn $this->call(\"$this->prefix.GetYByAttr?attr_name=\".urlencode($attr_name).\"&attr_value=\".urlencode($attr_value).\"&exactly=\".urlencode($exactly));\n\t}",
"public function __get($attribute)\n\t{\t\t$this->attributes[] = $attribute;\n\t\treturn $this->output();\n\t}",
"public function get($attribute)\n {\n return $this->$attribute;\n }",
"public function getValues($attribute)\r\n {\r\n $values = array();\r\n foreach ($this->_resultSet as $result) {\r\n if (is_object($result)) {\r\n $values[] = $result->$attribute;\r\n } else {\r\n $values[] = $result[$attribute];\r\n }\r\n }\r\n return $values;\r\n }",
"public function getAttributes(array $attributes);",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();"
] | [
"0.7077743",
"0.63363427",
"0.5919675",
"0.5900192",
"0.5844217",
"0.5604553",
"0.55871713",
"0.5564598",
"0.5472381",
"0.5399267",
"0.53646666",
"0.5353878",
"0.5317168",
"0.53123623",
"0.5305501",
"0.5305501",
"0.5301165",
"0.5301165",
"0.5301165",
"0.5301165",
"0.5288226",
"0.52628887",
"0.5248726",
"0.5245541",
"0.52114916",
"0.52037835",
"0.5193378",
"0.5193378",
"0.5193378",
"0.5193378"
] | 0.78183854 | 0 |
Returns first available example for the specified attribute. | public function getAttributeExample(string $attribute): ?string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAttributeExamples(string $attribute): ?array;",
"function get($attribute)\n {\n return $this->_get($attribute);\n }",
"public function getAttributeHint($attribute);",
"public function __get($attribute){\r\n\t\tif(isset($this->attributes[$attribute])){\r\n\t\t\treturn $this->attributes[$attribute];\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}",
"public function getAttributeHint($attribute) {\n $hints = $this->attributeHints();\n return isset($hints[$attribute]) ? $hints[$attribute] : null;\n }",
"function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n $res = $this->call(\"InputFile.GetAtributeByAttribute?attr_name=\".urlencode($attr_name).\"&attr_value=\".urlencode($attr_value).\"&exactly=\".urlencode($exactly).\"&name_attr=\".urlencode($name_attr));\n if ($res ==\"false\")\n\t\t\treturn false;\n\t\telse\n\t\t\treturn $res;\n }",
"public function __get($attribute){\n // run through the resources, looking for matches\n if(isset($this->node->$attribute)) {\n $value = $this->node->$attribute;\n }\n\n // return\n return $value;\n }",
"public function get($attribute, $default = NULL){\n\t\tif($attribute === 'the_content'){\n\t\t\treturn apply_filters('the_content', $this->data['content']);\n\t\t}elseif(isset($this->data[$attribute])){\n\t\t\treturn $this->data[$attribute];\n\t\t}else{\n\t\t\treturn $default;\n\t\t}\t\n\t}",
"function z_get_x_by_atribute($attr_name,$attr_value,$exactly)\n\t{\n\t\treturn $this->call(\"$this->prefix.GetXByAttr?attr_name=\".urlencode($attr_name).\"&attr_value=\".urlencode($attr_value).\"&exactly=\".urlencode($exactly));\n\t}",
"public function passes($attribute, $value)\n {\n return (Dico::getDictionaryModel())\n ->where('id', $value)\n ->getByTypeCodes($this->code)\n ->first();\n }",
"public function get($attribute)\n {\n return $this->$attribute;\n }",
"function terminus_api_site_attribute_get($site_uuid, $attribute) {\n $realm = 'site';\n $uuid = $site_uuid;\n $path = 'attributes/' . $attribute;\n $method = 'GET';\n\n return terminus_request($realm, $uuid, $path, $method);\n}",
"function get_x_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_x_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"function get_x_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_x_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"function get_instagram_gallery_attribute( $attribute, $attributes ) {\n\tif ( array_key_exists( $attribute, $attributes ) ) {\n\t\treturn $attributes[ $attribute ];\n\t}\n\n\t$default_attributes = array(\n\t\t'columns' => 3,\n\t\t'count' => 9,\n\t\t'isStackedOnMobile' => true,\n\t\t'spacing' => 10,\n\t);\n\n\tif ( array_key_exists( $attribute, $default_attributes ) ) {\n\t\treturn $default_attributes[ $attribute ];\n\t}\n}",
"public function getAttribute($model, Attribute $attribute);",
"public function getAttribute(string $attribute)\n {\n return $this->attributes[$attribute] ?? null;\n }",
"public function __get($attribute) {}",
"function getAttribute($attribute)\n {\n return parent::getAttribute($attribute);\n }",
"function getAttributeFromRDF($rdf, $attribute)\r\n\t\t{\r\n\t\t\tif (preg_match('/'.$attribute.'=\"([^\"]+)\"/', $rdf, $matches)) \r\n\t\t\t{\r\n\t\t\t\treturn $matches[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}",
"public function __get($attribute)\n\t{\n\t\tif (isset($this->{\"_\".$attribute}))\n\t\t{\n\t\t\treturn $this->{\"_\".$attribute};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function __get($attribute)\n\t{\n\t\tif (isset($this->{\"_\".$attribute}))\n\t\t{\n\t\t\treturn $this->{\"_\".$attribute};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function __get($attribute)\n\t{\n\t\tif (isset($this->{\"_\".$attribute}))\n\t\t{\n\t\t\treturn $this->{\"_\".$attribute};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getFallback(string $attribute)\n {\n return $this->getOr($attribute, $this->getFallbackLocale());\n }",
"function get_y_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_y_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"function get_y_by_atribute($attr_name,$attr_value,$exactly=true)\n\t{\n\t\treturn $this->z_get_y_by_atribute($attr_name,$attr_value,$exactly);\n\t}",
"function getattr($attribute)\n {\n return isset($this->_attributeValues[$attribute]) ?\n $this->_attributeValues[$attribute] :\n null;\n }",
"public function meetsMinimum($id, Attribute $attribute);",
"public function attribute(): ?string;",
"public function get($sample)\n {\n return $sample;\n }"
] | [
"0.6467889",
"0.5873836",
"0.5849649",
"0.5752211",
"0.57153535",
"0.5698464",
"0.5692805",
"0.55506754",
"0.5541251",
"0.5519682",
"0.55143845",
"0.5453884",
"0.54346365",
"0.54346365",
"0.5410364",
"0.53998786",
"0.53936976",
"0.53808737",
"0.5366573",
"0.534807",
"0.53448313",
"0.53448313",
"0.53448313",
"0.5337957",
"0.5333518",
"0.5333518",
"0.5325388",
"0.53068775",
"0.5304203",
"0.5297514"
] | 0.67649925 | 0 |
Data for a single notification | public static function singleNotificationData()
{
return self::dataNotification(
rand(10,30),
str_random(12),
rand(31,42),
str_random(12),
rand(43,60),
str_random(24),
str_random(12)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getNotificationInfo()\n {\n return $this->_notificationInfo; \n }",
"function set_dataTnotify()\n {\n $this->tnotify['data1'] = 'id';\n $this->tnotify['data2'] = 'idusuario';\n $this->tnotify['data3'] = 'idmsgtype';\n $this->tnotify['data4'] = 'regDate';\n $this->tnotify['data5'] = 'link';\n $this->tnotify['data6'] = 'estatus';\n $this->tnotify['data7'] = 'complemento';\n }",
"public function getNotificationDetails()\n {\n $whereArray = [];\n\n $notificationId = $this->request->input(\"notification_id\");\n if ($notificationId) {\n $whereArray[] = [\"notification_id\", '=', $notificationId];\n }\n\n $this->notificationModel->setWhere($whereArray);\n $details = $this->notificationModel->getOrderByData(\"notification_id\");\n\n return $details;\n }",
"public function notification()\n {\n return array(\n 'title' => $this->title,\n 'body' => $this->body,\n \"sound\" => \"default\"\n );\n }",
"public function getNotification()\n {\n return $this->notification;\n }",
"public function getNotification()\n {\n return $this->notification;\n }",
"function userNotification()\n {\n // notifications Details\n $notification = DB::table('user_notifications')->where('user_id',auth()->user()->id)->where('is_read',0)->get();\n if (!empty($notification)) {\n return $notification;\n }\n }",
"public function getNotification()\n {\n return $this->ok($this->repo->getNotification($this->request->all()));\n }",
"public function __construct($data)\n {\n $this->my_notification = $data;\n }",
"public function getNotification(){\n if(func_num_args()>0):\n $userId = func_get_arg(0);\n $select = $this->select()\n ->from($this,array('message','notification_id','sent_on','contest_id'))\n ->where('send_to=?',$userId)\n ->where('status=?',1)\n ->where('accept!=?',2);\n $result = $this->getDefaultAdapter()->fetchAll($select);\n if($result):\n return $result;\n endif;\n endif;\n \n }",
"public function notification(){\n\t}",
"public function getDataMessage()\n {\n return $this->get(self::DATAMESSAGE);\n }",
"public function newNotification()\n {\n // is it from client ?\n // this will mark if the new notifiction has been sent to client -> status will updated to sent\n $client = ($this->input->post('client') == 1);\n\n $data = $this->NotificationModel->getNewNotificationByUser($this->user, $client);\n // header('Content-Type: application/json');\n // echo json_encode($data);\n // die;\n return $this->output\n ->set_content_type('application/json')\n ->set_status_header(200)\n ->set_output(json_encode($data));\n }",
"private function getNotificationData($action)\n {\n $isInstall = $action == 'INSTALL';\n if (empty($this->_notificationData)) {\n\n $tblDeviceInfo = new Application_Model_DbTable_DeviceInfo();\n $deviceInfo = $tblDeviceInfo->fetchRow(array(\"device_id = ?\" => $this->_deviceId));\n\n $tblParentInfo = new Application_Model_DbTable_ParentInfo();\n $parentInfo = $tblParentInfo->fetchRow(array('parent_id = ?' => $this->_parentId));\n\n $tblChildInfo = new Application_Model_DbTable_ChildInfo();\n $childInfo = $tblChildInfo->fetchRow(array('child_id = ?' => $this->_childId));\n\n $this->_notificationData = array(\n 'user_id' => $parentInfo['user_id'],\n 'notification_type' => $isInstall ? 'APPIN' : 'APPUN',\n 'description' => ($isInstall ? \"installed %s in \" : \"uninstalled %s from \") . $deviceInfo['device_name'],\n 'child_device_id' => $this->_deviceId,\n 'childe_name' => $childInfo['name'],\n 'child_id' => $this->_childId\n );\n }\n\n return $this->_notificationData;\n }",
"public function createNotification(string $name, array $data = []): Notification;",
"public function getnotification()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$taskCode = \"\";\n\t\t\t\t$userid = 0;\n\t\t\t\t$this->LogAccess($taskCode);\n\t\t\t\tif (isset($_COOKIE[\"ropaziuser\"])){\n\t\t\t\t\t$logger->debug(\"Got user cookie\");\n\t\t\t\t\t$logger->debug($_COOKIE[\"ropaziuser\"]);\n\t\t\t\t\t$userid = CommonUtils::verifyUserCookie();\n\t\t\t\t}\n\t\t\t\t$notificationBO = new NotificationBO($this->_UserInfo);\n\t\t\t\t$notifications = $notificationBO->SelectByAppUserID($userid);\n\t\t\t\t$logger->debug(\"Got notifications::\" . sizeof($notifications));\n\t\t\t\t$this->model = $notifications;\n\t\t\t\tob_start();\n\t\t\t\tinclude('views/_alerts.php');\n\t\t\t\t$output = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\treturn $this->view->outputJson(Constants::$OK, $output, \"\");\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t}",
"private function notification(){\n\t\n\t}",
"function notification(){\n\t\t//checking form valid\n\t\tif (@$_GET['token'] && @$_GET['id']) {\n\t\t\t//if request form valid\n\t\t\t//checking token valid\n\t\t\tif (check_token($_GET['token'],$_GET['id'])) {\n\t\t\t\t// if token and id valid\n\t\t\t\t//get data month attandance\n\t\t\t\t$data = get_notification();\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\t//if token and id invalid\n\t\t\t\treturn '{\"status\":\"401\",\"message\":\"You dont have access\"}' ;\n\t\t\t}\n\t\t}else{\n\t\t\t//if request form invalid\n\t\t\treturn '{\"status\":\"400\",\"message\":\"Bad Request\"}' ;\n\t\t}\n\t}",
"abstract protected function handle_notification($p_notification);",
"public function __construct($notification) {\n\n\n $this -> notification = $notification;\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = '';\n if(isset($notification['show_link']) && $notification['show_link'] == 'no') {\n $this -> notification['show_link'] = 'no';\n } else {\n $this -> notification['show_link'] = 'yes';\n }\n\n\n\n if($notification['notify_by_database'] == 'yes') {\n $this -> notify_by[] = 'database';\n }\n if($notification['notify_by_email'] == 'yes') {\n $this -> notify_by[] = 'mail';\n }\n if($notification['notify_by_text'] == 'yes') {\n $this -> notify_by[] = 'nexmo';\n }\n\n\n // %%%%%% Commission %%%%%% //\n if($notification['type'] == 'commission') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'].'?tab=commission';\n $this -> notification['link_text'] = 'View Commission';\n\n // %%%%%% Release %%%%%% //\n } else if($notification['type'] == 'release') {\n\n $this -> notification['link_url'] = '/doc_management/document_review/'.$notification['sub_type_id'];\n $this -> notification['link_text'] = 'View Release';\n\n // %%%%%% Earnest %%%%%% //\n } else if($notification['type'] == 'earnest' || $notification['type'] == 'using_heritage_title') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Contract';\n\n }\n\n // %%%%%% Agents %%%%%% //\n // Commission Ready\n else if($notification['type'] == 'commission_ready') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'].'?tab=commission';\n $this -> notification['link_text'] = 'View Commission';\n\n // Bounced Earnest\n } else if($notification['type'] == 'bounced_earnest') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Contract';\n\n // %%%%%% Tasks, Reminders, Calendar Events %%%%%% //\n // Tasks\n } else if($notification['type'] == 'task_due') {\n\n $this -> notification['link_url'] = '/agents/doc_management/transactions/transaction_details/'.$notification['sub_type_id'].'/'.$notification['sub_type'];\n $this -> notification['link_text'] = 'View Transaction';\n\n // Calendar Events\n } else if($notification['type'] == 'calendar_event') {\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = '';\n\n // %%%%%% System Admin %%%%%% //\n } else if($notification['type'] == 'admin') {\n\n if($notification['sub_type'] == 'failed_job') {\n\n $this -> notification['link_url'] = '';\n $this -> notification['link_text'] = 'Failed Queued Job!!';\n\n } else if($notification['sub_type'] == 'bug_report') {\n\n $this -> notification['link_url'] = '/bug_reports/view_bug_report/'.$notification['sub_type_id'];\n $this -> notification['link_text'] = 'View Bug Report';\n\n }\n\n }\n\n }",
"public function store($data)\n {\n Notification::Create($data);\n }",
"public function personalEventNotification($eventArr, $post_data) {\n $CI = & get_instance();\n $CI->load->model('Common_model');\n try {\n $promises = array();\n $insert_data = array();\n $i = 0;\n foreach ($eventArr as $row => $val) {\n $insert_data['title'] = isset($val['title']) ? $val['title'] : \"\";\n $insert_data['sender_id'] = isset($post_data['sender']) ? $post_data['sender'] : \"\";\n $insert_data['message'] = \"You have an event \" . ucfirst($val[\"title\"]) . \" at \" . date(\"H:i A\", strtotime($val[\"event_time\"])) . \" today\";\n $insert_data['receive_id'] = isset($val['id']) ? $val['id'] : \"\";\n $insert_data['device_type'] = isset($val['device_type']) ? $val['device_type'] : \"\";\n $insert_data['type'] = isset($post_data['type']) ? $post_data['type'] : \"\";\n $insert_data['type_id'] = isset($val[\"type_id\"]) ? $val[\"type_id\"] : \"\";\n $insert_data['category'] = isset($val[\"type\"]) ? $val[\"type\"] : \"\";\n $insert_data['created_date'] = date('Y-m-d H:i:s');\n $id = $CI->Common_model->insert_single('budfie_notifications', $insert_data);\n \n $notificationCount = $this->getBadgeCount($val['id']);\n $message = [\n \"default\" => isset($val[\"title\"]) ? $val[\"title\"] : \"\",\n \"APNS\" => json_encode([\n \"aps\" => [\n \"alert\" => array(\n \"title\" => \"\",\n \"body\" => \"You have an event \" . ucfirst($val[\"title\"]) . \" at \" . date(\"H:i A\", strtotime($val[\"event_time\"])) . \" today\",\n \"subtitle\" => \"\"\n ),\n \"sound\" => \"default\",\n \"mutable-content\" => 1,\n \"category\" => \"budfieIcon\",\n \"badge\" => (int) $notificationCount,\n \"data\" => array(\n \"attachment_url\" => isset($val[\"rest_image\"]) ? $val[\"rest_image\"] : \"\",\n \"ext_link\" => $post_data[\"ext_link\"],\n \"url_title\" => $post_data[\"url_title\"],\n \"content_type\" => \"image\",\n \"type\" => $post_data[\"type\"],\n \"type_id\" => isset($val[\"type_id\"]) ? $val[\"type_id\"] : \"\",\n \"category\" => isset($val[\"type\"]) ? $val[\"type\"] : \"\"\n )\n ]\n ]),\n \"GCM\" => json_encode([\n \"data\" => [\"body\" => array(\n \"title\" => isset($val[\"title\"]) ? $val[\"title\"] : \"\",\n \"message\" => \"You have an event \" . ucfirst($val[\"title\"]) . \" at \" . date(\"H:i A\", strtotime($val[\"event_time\"])) . \" today\",\n \"type\" => $post_data[\"type\"],\n \"type_id\" => isset($val[\"type_id\"]) ? $val[\"type_id\"] : \"\",\n \"image\" => isset($val[\"rest_image\"]) ? $val[\"rest_image\"] : \"\",\n \"ext_link\" => $post_data[\"ext_link\"],\n \"url_title\" => $post_data[\"url_title\"],\n \"category\" => isset($val[\"type\"]) ? $val[\"type\"] : \"\"\n )]\n ])\n ];\n $promises[] = $this->sns->publishAsync([\n 'Message' => json_encode($message),\n 'MessageStructure' => 'json',\n 'TargetArn' => $val['device_arn']\n ]);\n// $insert_data[$i]['title'] = isset($val['title']) ? $val['title'] : \"\";\n// $insert_data[$i]['sender_id'] = isset($post_data['sender']) ? $post_data['sender'] : \"\";\n// $insert_data[$i]['message'] = \"You have an event \" . ucfirst($val[\"title\"]) . \" at \" . date(\"H:i A\", strtotime($val[\"event_time\"])) . \" today\";\n// $insert_data[$i]['receive_id'] = isset($val['id']) ? $val['id'] : \"\";\n// $insert_data[$i]['device_type'] = isset($val['device_type']) ? $val['device_type'] : \"\";\n// $insert_data[$i]['type'] = isset($post_data['type']) ? $post_data['type'] : \"\";\n// $insert_data[$i]['type_id'] = isset($val[\"type_id\"]) ? $val[\"type_id\"] : \"\";\n// $insert_data[$i]['category'] = isset($val[\"type\"]) ? $val[\"type\"] : \"\";\n// $insert_data[$i]['created_date'] = date('Y-m-d H:i:s');\n// $i++;\n }\n// $CI->Common_model->insert_batch('budfie_notifications', array(), $insert_data);\n $allPromise = \\GuzzleHttp\\Promise\\all($promises);\n $data_promise = $allPromise->wait();\n return [\n \"success\" => true,\n \"message\" => \"OK\",\n \"result\" => $data_promise\n ];\n } catch (\\Exception $error) {\n // file_put_contents(getcwd() . \"/application/sns_log/error.txt\", $error);\n return [\n \"success\" => false,\n \"message\" => \"error\"\n ];\n }\n }",
"function notification($name, $object)\n\t{\n\t\t$ci = &get_instance();\n\t\t$notification = $ci->model->get(\"*\", TABLE_NOTIFICATIONS, ['name' => $name], '', '', true);\n\n\t\tif (isset($notification[$object])) return $notification[$object];\n\t}",
"public function read($data)\n {\n DB::beginTransaction();\n try{\n $notification = $this->find($data['id']);\n\n if(is_object($notification)){\n $post = [\n 'read_at' => date('Y-m-d H:i:s')\n ];\n\n $notification->update($post);\n\n DB::commit();\n return ['status' => '00'];\n }\n\n DB::rollback();\n return ['status' => '01', 'message' => 'A notificação informada não existe.'];\n }catch(\\Exception $e){\n DB::rollback();\n return ['status' => '01', 'message' => $e->getMessage()];\n }\n }",
"public function createNotification($notification, $size = 'tiny')\r\n\t {\r\n\t\t $output = '';\r\n\t\t $preWrapper = \"<a href='\" . $notification->getFormattedURL() . \"' class='left box-img-container-\" . strtolower($size) . \"'>\";\r\n\t\t $postWrapper = \"</a>\";\r\n\t\t $class\t = 'box-img-' . strtolower($size);\r\n\t\t $currentID = false;\r\n\t\t if ($notification->_attribs['pictureType'] == 'sports') {\r\n\t\t\t // Sport icon to be shown, wrap in container\r\n\t\t\t $preWrapper = \"<a href='\" . $notification->getFormattedURL() . \"' class='notification-sports-img-container-\" . $size . \"'>\";\r\n\t\t\t $class = '';\r\n\t\t\t //$postWrapper = \"</a>\";\r\n\t\t } \r\n\t\t \r\n\t\t $img = $preWrapper . \"<img src='\" . $notification->getPicture($size) . \"' class='newsfeed-notification-img \" . $class . \"' />\" . $postWrapper;\r\n\t\t \r\n\t\t $containerClass = '';\r\n\t\t \r\n\t\t if ($this->_view->game) {\r\n\t\t\t //On game page, change notifications to \"this game...\"\r\n\t\t\t $currentID = $notification->gameID;\r\n\t\t\t if ($notification->isJoin()) {\r\n\t\t\t \t $containerClass = 'newsItem-status newsItem-status-' . $notification->getJoin();\r\n\t\t\t\t $img = $notification->getBoxProfilePic($size, $notification->actingUserID, 'users','', '' ,$notification->confirmed);\r\n\t\t\t } else {\r\n\t\t\t\t $containerClass = 'newsItem-' . $notification->action;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t if ($this->_view->lastVisited) {\r\n\t\t\t \r\n\t\t\t\t if ($notification->getDateTime()->format('U') > $this->_view->lastVisited->format('U')) { \r\n\t\t\t\t\t // Is new notification since last visited\r\n\t\t\t\t\t $containerClass .= ' light-back';\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t $output .= \"<div class='newsfeed-notification-container \" . $containerClass . \"'>\";\r\n\t\t $output .= \t$img;\r\n\t\t $output .= \t\"<div class='newsfeed-notification-text-container'>\";\r\n\t\t $output .= \t\t\"<p class='left newsfeed-notification-text'>\" . $notification->getFormattedText($currentID) . \"</p>\r\n\t\t \t\t\t\t\t <span class='newsfeed-notification-time light smaller-text'>\" . $notification->getTimeFromNow() . \"</span>\";\r\n\t\t $output .= \t\"</div>\r\n\t\t\t\t\t </div>\";\r\n\t\t\t\t\t \r\n\t\t return $output;\r\n\t }",
"public function getData(): array\n {\n $body = array(\n 'notification' => array(\n \"title\" => $this->title,\n \"body\" => $this->body\n )\n );\n\n if($this->priority !== '')\n $body['priority'] = $this->priority;\n if($this->data !== [])\n $body['data'] = $this->data;\n if($this->timeToLive !== null)\n $body['time_to_live'] = $this->timeToLive;\n\n return $body;\n }",
"public function notification($type)\n {\n }",
"public function getNotificationType(): string;",
"function short_app_notification($data = array()) { \n\t\t$this->loadAllModel(array('EmailTemplate','State','User','Notification','Todo'));\n\t\t$this->layout = '';\n\t\t$this->autoRender = false;\n\t\t$userTypeID = array(2,3,4,5);\n\t\t$states = $this->State->find('list',array('fields'=>array('id','name'),'order'=>'name ASC'));\n\t\t$notifiyUserEmail = $this->User->find('all',array('conditions'=>array('User.user_type'=>$userTypeID,'User.status'=>1,'User.is_deleted' =>0),'fields' => array('id','email_address','name','user_type'),'order'=>'name ASC'));\n\t\t$link = '<a href = \"' .BASE_URL. 'homes/login/\">Click to see application details </a>';\n\t\t$newLoans = $this->getLoanLifeCyclePhase();\n\t\t$alert = $newLoans['1'];\n\t\tforeach($notifiyUserEmail as $user) {\n\t\t\t//if broker Todo will be save else notification\n\t\t\tif($user['User']['user_type'] == 2){\n\t\t\t\t$todoData['Todo']['receiver_id'] = $user['User']['id'];\n\t\t\t\t$todoData['Todo']['sender_id'] = '';\n\t\t\t\t$todoData['Todo']['to_do'] = '<a href = \"' .BASE_URL. 'commons/propertyDetail/'.base64_encode($data['id']).'\">'.$alert.' </a>';\n\t\t\t\t$todoData['Todo']['to_do_id'] = $data['id'];\n\t\t\t\t$todoData['Todo']['created'] = CURRENT_DATE_TIME_DB;\n\t\t\t\t$this->Todo->create();\n\t\t\t\t$this->Todo->save($todoData);\n\t\t\t}else {\n\t\t\t\t//save Notification\n\t\t\t\t$notificationData['Notification']['receiver_id'] = $user['User']['id'];\n\t\t\t\t$notificationData['Notification']['action'] = $alert;\n\t\t\t\t$notificationData['Notification']['action_id'] = $data['id'];\n\t\t\t\t$notificationData['Notification']['created'] = CURRENT_DATE_TIME_DB;\n\t\t\t\t$this->Notification->create();\n\t\t\t\t$this->Notification->save($notificationData);\n\t\t\t\t\n\t\t\t}\n\t\t\t// email notification\n\t\t\t$template = $this->EmailTemplate->getEmailTemplate('short_app_notification');\n\t\t\t$to = $user['User']['email_address'];\n\t\t\t$emailData = $template['EmailTemplate']['template'];\t\t\t\t\t\n\t\t\t$logo = '<img src=\"'.BASE_URL.'img/logo.png\" style=\"height:100px; width:157px;padding-bottom: 12px;float:left;\" />';\n\t\t\t$name = $data['applicant_first_name'] . ' '. $data['applicant_last_name'];\n\t\t\t/*if($data['property_type'] != 'other'){\n\t\t\t\t$propertyType = $this->propertyTypes[$data['property_type']];\n\t\t\t}else{\n\t\t\t\t$propertyType = $data['other_property_type'];\n\t\t\t}*/\n\t\t\t$emailData = str_replace('{FirstName}',$user['User']['name'],$emailData);\n\t\t\t$emailData = str_replace('{Broker Email}',$data['email_address'],$emailData);\n\t\t\t$emailData = str_replace('{Name}',$name,$emailData);\n\t\t\t$emailData = str_replace('{Borrower Email Address}',$data['applicant_email_ID'],$emailData);\n\t\t\t$emailData = str_replace('{Borrower Phone}',$data['applicant_phone'],$emailData);\n\t\t\t$emailData = str_replace('{Property Name}',$data['property_address'],$emailData);\n\t\t\t$emailData = str_replace('{Property Type}',$data['property_type'],$emailData);\n\t\t\t$emailData = str_replace('{Property State}',$states[$data['property_state']],$emailData);\n\t\t\t$emailData = str_replace('{Property City}',$this->getCityName($data['property_city']),$emailData);\n\t\t\t$emailData = str_replace('{Loan Type}',$this->loanTypes[$data['loan_type']],$emailData);\n\t\t\t$emailData = str_replace('{Loan Reason}',$this->loanReasons[$data['loan_reason']],$emailData);\n\t\t\t$emailData = str_replace('{Loan Amount}',$data['loan_amount'],$emailData);\n\t\t\t$emailData = str_replace('{Loan To Value}',$data['loan_value'],$emailData);\n\t\t\t$emailData = str_replace('{Loan Objective}',$data['loan_objective'],$emailData);\n\t\t\t$emailData = str_replace('{Logo}',$logo,$emailData);\n\t\t\t$subject = ucfirst(str_replace('_', ' ', $template['EmailTemplate']['name']));\n\t\t\t$this->sendEmail($to,$subject,$emailData);\t\t\t\n\t\t}\n\t}",
"public function getNotificationTemplateData()\n {\n $fields = $this->Context->getValues();\n if (!is_array($fields)) {\n $fields = [];\n }\n $fields['Content'] = $this->Content;\n return $fields;\n }"
] | [
"0.69103795",
"0.66563725",
"0.6628902",
"0.65637493",
"0.63349456",
"0.63349456",
"0.62802",
"0.6261192",
"0.6237593",
"0.6222389",
"0.6169815",
"0.61190003",
"0.6092384",
"0.59999883",
"0.5999581",
"0.599816",
"0.59902817",
"0.59747547",
"0.5952154",
"0.5939839",
"0.5927196",
"0.58863103",
"0.5880282",
"0.58782434",
"0.58732843",
"0.584337",
"0.58265394",
"0.5809134",
"0.58059514",
"0.5801184"
] | 0.7945348 | 0 |
Marks post as seen. | public function seen()
{
$this->post_seen = self::POST_SEEN;
return $this->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSeen(bool $seen) {\n $this->seen = (int)$seen;\n\n }",
"abstract function flag_post_for_publicize( $new_status, $old_status, $post );",
"public function wd_dpvc_set_post_view() {\n\t\t$key = 'post_views_count';\n\t\tif( is_single() ) {\n\t\t\t$post_id = get_the_ID();\n\t\t\t$count = (int) get_post_meta( $post_id, $key, true );\n\t\t\t$count++;\n\t\t\tupdate_post_meta( $post_id, $key, $count );\n\t\t}\n\t}",
"public function updateSeen( Post $post ) {\n\t\t$post->ingoing->delete();\n\n\t\treturn response()->json();\n\t}",
"public function unseen()\n {\n $this->post_seen = self::POST_NEW;\n return $this->save();\n }",
"function observePostViews($postID) {\n\t$count_key = 'post_views_count';\n\t\t$count = get_post_meta($postID, $count_key, true);\n\t\tif($count==''){\n\t\t\t$count = 0;\n\t\t\tdelete_post_meta($postID, $count_key);\n\t\t\tadd_post_meta($postID, $count_key, '0');\n\t\t} else {\n\t\t\t$count++;\n\t\t\tupdate_post_meta($postID, $count_key, $count);\n\t\t}\n}",
"public function markUnderDiscussion()\n {\n $this->_reaktorfile->setUnderDiscussion(1);\n $this->_reaktorfile->save();\n HistoryPeer::logAction(6, sfContext::getInstance()->getUser()->getId(), $this);\n }",
"public function markAsVisited(){\n $this->visited = true;\n $this->save();\n }",
"public function actionFlag($postid) {\n $this->_check($postid);\n // get the owner of the post\n $userid = current($this->_req->getParams(1));\n $this->_check($userid);\n BaseDAO::factory('Blogpost')->flag($postid);\n BaseDAO::factory('User')->updateFlaggedCount($userid);\n $this->_return($postid);\n }",
"function setPostViews($postID) {\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta($postID, $count_key, true);\r\n if($count==''){\r\n $count = 0;\r\n delete_post_meta($postID, $count_key);\r\n add_post_meta($postID, $count_key, '0');\r\n }else{\r\n $count++;\r\n update_post_meta($postID, $count_key, $count);\r\n }\r\n}",
"function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}",
"function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}",
"public function setPosted($posted) {\n $this->_posted = $posted;\n }",
"function li_mark_post_as_loved($post_id) \n{\n\t// retrieve the love count for $post_id\n\t$love_count = get_post_meta($post_id, '_li_love_count', true);\n\tif($love_count)\n\t\t$love_count = $love_count + 1;\n\telse\n\t\t$love_count = 1;\n\n\tif(update_post_meta($post_id, '_li_love_count', $love_count)) \n\t{\n\t\tif(is_user_logged_in())\n\t\t{\n\t\t\t$uid = get_current_user_id();\n\t\t\t$loves = get_user_meta($uid, 'pinfinity_loved_items', true);\n\t\t\tif(!is_array($loves))\n\t\t\t\t$loves = array();\n\t\t\t$loves[] = $post_id;\n\t\t\tupdate_user_meta($uid, 'pinfinity_loved_items', $loves);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"function codexin_set_post_views( $post_id ) {\n\t\t$count_key = 'cx_post_views';\n\t\t$count = get_post_meta( $post_id, $count_key, true );\n\t\tif ( '' == $count ) {\n\t\t\t$count = 0;\n\t\t\tdelete_post_meta( $post_id, $count_key );\n\t\t\tadd_post_meta( $post_id, $count_key, '0' );\n\t\t} else {\n\t\t\t$count++;\n\t\t\tupdate_post_meta( $post_id, $count_key, $count );\n\t\t}\n\t}",
"private function makeSeen($receiver, $sender)\n {\n $this->userConversations($receiver, $sender)\n ->update(['seen_at' => Carbon::now()]);\n }",
"function setPostViews($postID)\n{\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if ($count == '') {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n } else {\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}",
"public function track_post_view() {\n\n // No need to track view if I'm logged in\n if( is_user_logged_in() ) {\n return false;\n }\n\n $views = get_post_meta( get_the_ID(), 'wpe_view_data', true );\n\n $referer = isset( $_SERVER['HTTP_REFERER'] ) ? parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ) : false ;\n\n $refers = !empty( $referer ) ? $referer : 'not-set';\n $source = isset( $_GET['utm_source'] ) ? $_GET['utm_source'] : 'not-set';\n $medium = isset( $_GET['utm_medium'] ) ? $_GET['utm_medium'] : 'not-set';\n $uagent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : 'not-set';\n $date = date( 'Y-m-d' );\n\n if( empty( $views ) ) {\n $view = array(\n 'total' => 0,\n 'days' => array(),\n 'refers' => array(),\n 'source' => array(),\n 'medium' => array(),\n 'agents' => array(),\n );\n }\n\n $views['total']++;\n $views['days'][ $date ] = isset( $views['days'][ $date ] ) ? $views['days'][ $date ] + 1 : 1;\n $views['refers'][ $refers ] = isset( $views['refers'][ $refers ] ) ? $views['refers'][ $refers ] + 1 : 1;\n $views['agents'][ $uagent ] = isset( $views['agents'][ $uagent ] ) ? $views['agents'][ $uagent ] + 1 : 1;\n\n update_post_meta( get_the_ID(), 'wpe_view_data', $views );\n }",
"function observePostViews_zxc($postID)\n{\n$count_key = 'post_views_count';\n$count = get_post_meta($postID, $count_key, true);\nif($count=='')\n\t{\n\t$count = 0;\n\tdelete_post_meta($postID, $count_key);\n\tadd_post_meta($postID, $count_key, '0');\n\t}\nelse\n\t{\n\t$count++;\n\tupdate_post_meta($postID, $count_key, $count);\n\t}\n}",
"function snazzy_set_post_views( $post_id ) {\n\t\t$count_key = 'post_views_count';\n\t\t$count = get_post_meta( $post_id, $count_key, true );\n\n\t\tif ( '' == $count ) {\n\t\t\t$count = 0;\n\t\t\tdelete_post_meta( $post_id, $count_key );\n\t\t\tadd_post_meta( $post_id, $count_key, '0' );\n\t\t} else {\n\t\t\t$count++;\n\t\t\tupdate_post_meta( $post_id, $count_key, $count );\n\t\t}\n\t}",
"function extendedforum_tp_mark_post_read($userid, $post, $extendedforumid) {\n if (!extendedforum_tp_is_post_old($post)) {\n return extendedforum_tp_add_read_record($userid, $post->id);\n } else {\n return true;\n }\n}",
"function gogreen_set_post_views($post_id) {\n $count_key = '_w_post_views';\n $count = get_post_meta($post_id, $count_key, true);\n if($count == ''){\n $count = 0;\n delete_post_meta($post_id, $count_key);\n add_post_meta($post_id, $count_key, '0');\n }else{\n $count++;\n update_post_meta($post_id, $count_key, $count);\n }\n}",
"function isMine( $post ){\n\t\tif( empty($post->author->id) ) return false;\n\t\t// variables\n\t\t$id = $post->author->id;\n\t\t$me = $this->me;\n\n\t\treturn ( $id == $me );\n\t}",
"public function updateSeen($inputs, $id)\n {\n $post = $this->getById($id);\n\n $post->seen = $inputs['seen'] == 'true';\n\n $post->save();\n }",
"public function updateSeen($inputs, $id)\n {\n $post = $this->getById($id);\n\n $post->seen = $inputs['seen'] == 'true';\n\n $post->save();\n }",
"function fastway_set_post_views( $postID ) {\r\n\t$countKey = 'post_views_count';\r\n\t$count = get_post_meta( $postID, $countKey, true );\r\n\tif ( $count == '' ) {\r\n\t\t$count = 0;\r\n\t\tdelete_post_meta( $postID, $countKey );\r\n\t\tadd_post_meta( $postID, $countKey, '0' );\r\n\t} else {\r\n\t\t$count ++;\r\n\t\tupdate_post_meta( $postID, $countKey, $count );\r\n\t}\r\n}",
"function setPostViews($postID) {\n\t$countKey = 'wpb_post_views_count';\n\t$count = get_post_meta($postID, $countKey, true);\n\tif($count==''){\n\t\t$count = 0;\n\t\tdelete_post_meta($postID, $countKey);\n\t\tadd_post_meta($postID, $countKey, '0');\n\t}else{\n\t\t$count++;\n\t\tupdate_post_meta($postID, $countKey, $count);\n\t}\n}",
"function fpr_theme_save_post_views( $postID ){\r\r\n\r\r\n $metaKey = 'fpr_theme_post_views';\r\r\n $views = get_post_meta( $postID, $metaKey, true );\r\r\n\r\r\n $count = ( empty( $views ) ? '0' : $views );\r\r\n $count++;\r\r\n\r\r\n update_post_meta( $postID, $metaKey, $count );\r\r\n\r\r\n}",
"public function newsSetAllSeen() {\n $this->db->DoQuery($this->db->BuildUpdateQuery('news',\n array('news_admin_seen' => 1 )));\n }",
"function publish() {\n\n\t\t$post_data = array(\n\t\t\t'ID'\t\t\t=> $this->post_id,\n\t\t\t'post_status'\t=> 'publish'\n\t\t);\n\n\t\t$this->post_id = wp_update_post($post_data);\n\t}"
] | [
"0.6325446",
"0.61228013",
"0.59516275",
"0.5932013",
"0.5795235",
"0.579087",
"0.5784385",
"0.57528704",
"0.561017",
"0.56051946",
"0.55877084",
"0.55877084",
"0.55873144",
"0.5580253",
"0.5571333",
"0.5563966",
"0.5532874",
"0.55315024",
"0.5529482",
"0.5525861",
"0.5503669",
"0.5493319",
"0.5487507",
"0.5465473",
"0.5465473",
"0.5463635",
"0.5463221",
"0.5451118",
"0.5382761",
"0.53583807"
] | 0.72781754 | 0 |
Marks post as unseen. | public function unseen()
{
$this->post_seen = self::POST_NEW;
return $this->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function unpublish()\n {\n $this->state = self::STATE_DRAFT;\n }",
"public function unPublish()\n {\n $this->published = false;\n }",
"public function unpublish()\n {\n if($this->userHasPrivilege('publish'))\n {\n $this['status'] = 'draft';\n $this->save();\n }\n }",
"function reset_unasked () {\n\t\tforeach ( $this->entries as $entry )\n\t\t\t$entry->set_has_been_asked( FALSE );\n\t}",
"public function a_post_can_not_be_published_without_tags()\n {\n $unPublishedPost = factory(Post::class)->create([\n 'published_at' => null\n ]);\n\n $payload = [\n 'published_at' => now()->toDateTimeString()\n ];\n\n $this->be($unPublishedPost->user, 'api')\n ->putJson('api/posts/'.$unPublishedPost->id, $payload)\n ->assertStatus(400);\n\n $post = $unPublishedPost->fresh();\n $this->assertNull($post->published_at);\n $this->assertCount(0, $post->tags);\n }",
"public static function clear_post() { self::$post = array(); }",
"public function markAsUnidentifiable()\n {\n $now = Carbon::now();\n\n Observation::whereIn('id', $this->getObservationIds())->update([\n 'approved_at' => null,\n 'updated_at' => $now,\n ]);\n\n FieldObservation::whereIn('id', $this->getIds())->update([\n 'unidentifiable' => true,\n 'updated_at' => $now,\n ]);\n }",
"public function testPostUnpublish() {\n\t\tadd_action( 'ep_delete_post', array( $this, 'action_delete_post' ), 10, 0 );\n\n\t\t$post_id = ep_create_and_sync_post();\n\n\t\tep_refresh_index();\n\n\t\t$post = ep_get_post( $post_id );\n\n\t\t// Ensure that our post made it over to elasticsearch\n\t\t$this->assertTrue( ! empty( $post ) );\n\n\t\t// Let's transition the post status from published to draft\n\t\twp_update_post( array( 'ID' => $post_id, 'post_status' => 'draft' ) );\n\n\t\tep_refresh_index();\n\n\t\t$this->assertTrue( ! empty( $this->fired_actions['ep_delete_post'] ) );\n\n\t\t$post = ep_get_post( $post_id );\n\n\t\t// Alright, now the post has been removed from the index, so this should be empty\n\t\t$this->assertTrue( empty( $post ) );\n\n\t\t$this->fired_actions = array();\n\t}",
"public function seen()\n {\n $this->post_seen = self::POST_SEEN;\n return $this->save();\n }",
"public function _resetLastPost() {\n\t\t/** @var $lastPost Tx_MmForum_Domain_Model_Forum_Post */\n\t\t$lastPost = NULL;\n\t\tforeach ($this->topics as $topic) {\n\t\t\t/** @var $topic Tx_MmForum_Domain_Model_Forum_Topic */\n\t\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t\t$lastTopicPostTimestamp = $topic->getLastPost()->getTimestamp();\n\t\t\tif ($lastPost === NULL || $lastTopicPostTimestamp > $lastPost->getTimestamp()) {\n\t\t\t\t$lastPost = $topic->getLastPost();\n\t\t\t}\n\t\t}\n\n\t\t$this->lastPost = $lastPost;\n\t}",
"public function markThreadAsOrphaned($args)\n {\n // Get the thread related to invitation\n $thread = $args['invitation'];\n\n // Check whether the thread is related to automatically sent invitation\n $result = Database::getInstance()->query(\n \"SELECT COUNT(*) AS autoinvited FROM {mibew_autoinvite} WHERE threadid = :threadid\",\n array(':threadid' => $thread->id),\n array('return_rows' => Database::RETURN_ONE_ROW)\n );\n\n if ($result && isset($result['autoinvited']) && ($result['autoinvited'] > 0)) {\n // A visitor was invited automatically, change thread state\n $thread->state = Thread::STATE_WAITING;\n $thread->nextAgent = 0;\n $thread->save(true);\n // Forget about the thread\n $this->forgetThread($args);\n }\n }",
"public function saved(Post $post)\n {\n Cache::forget('home-news');\n }",
"function unpublish($id)\n\t{\t\n\t\t$object = $this->get($id);\n\t\t$object->setIsPublished(false);\n\t\t$this->update($object);\n\t}",
"function unpublish()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$cid = JRequest::getVar('cid', array(), 'post', 'array');\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count($cid) < 1) {\n\t\t\tJError::raiseError(500, JText::_('Select an item to unpublish'));\n\t\t}\n\n\t\t$model = $this->getModel('newsfeed');\n\t\tif (!$model->publish($cid, 0)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=com_newsfeeds');\n\t}",
"public function _resetPostCount() {\n\t\t$this->postCount = 0;\n\t\tforeach ($this->topics as $topic) {\n\t\t\t/** @var $topic Tx_MmForum_Domain_Model_Forum_Topic */\n\t\t\t$this->postCount += $topic->getPostCount();\n\t\t}\n\t}",
"public function junk(Post $post)\n {\n $this->authorize('junkPost', $post);\n $post->delete();\n event(new PostWasJunked($post));\n return redirect()->back();\n }",
"public function unpublished()\n {\n return Post::unpublished()\n ->orderBy('publish_date', 'desc')\n ->get()\n ->load('tags')\n ->each(function (Post $post) {\n $post->withDates();\n });\n }",
"private function deletePostPermanently() {\n // The CSS selector for 'Delete Permanently' is actually exactly the same as when trashing\n // the post, so is the update message, so we just use that method internally\n $this->trashPost();\n }",
"function li_unmark_post_as_loved($post_id) \n{\n\t// retrieve the love count for $post_id\n\t$love_count = get_post_meta($post_id, '_li_love_count', true);\n\tif($love_count)\n\t\t$love_count = $love_count - 1;\n\telse\n\t\t$love_count = 0;\n\n\tif(update_post_meta($post_id, '_li_love_count', $love_count)) \n\t{\n\t\tif(is_user_logged_in())\n\t\t{\n\t\t\t$uid = get_current_user_id();\n\t\t\t$loves = get_user_meta($uid, 'pinfinity_loved_items', true);\n\t\t\tif(is_array($loves))\n\t\t\t{\n\t\t\t\t$key = array_search($post_id, $loves);\n\t\t\t\tif($key!==false)\n\t\t\t\t{\n\t\t\t\t\tunset($loves[$key]);\n\t\t\t\t\tupdate_user_meta($uid, 'pinfinity_loved_items', $loves);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"public function markAsUnread()\n {\n $this->status = self::STATUS_UNREAD;\n $this->save();\n }",
"public function undeleteToPublish(Post $post): bool\n {\n if (!$this->blogPublishStateMachine->can($post, 'undeletetopublish')) {\n $this->addError('publish');\n return false;\n }\n $update = $this->blogPublishStateMachine->apply($post, 'undeletetopublish');\n if ($update) {\n $post->setPublishedAt(new DateTime());\n $this->entityManager->flush();\n $this->addSuccess('publish');\n return true;\n } else {\n $this->addError('publish');\n return false;\n }\n }",
"public function junk(ThreadWasJunked $event)\n {\n if ($event->thread->firstPost && !$event->thread->firstPost->trashed()) {\n $event->thread->firstPost->delete();\n event(new PostWasJunked($event->thread->firstPost));\n }\n }",
"function nuclear() {\n\t\t\n\t\tforeach ( $this->all_pages as $thispage ){\n\t\t\tupdate_post_meta( $thispage->ID , 'idies_update_status' , $this->default_status ) ;\n\t\t\tupdate_post_meta( $thispage->ID , 'idies_update_reviewer' , $this->default_reviewer ) ;\n\t\t\tupdate_post_meta( $thispage->ID , 'idies_update_comment' , '' ) ;\n\t\t}\n\t\n\t}",
"public function markUnderDiscussion()\n {\n $this->_reaktorfile->setUnderDiscussion(1);\n $this->_reaktorfile->save();\n HistoryPeer::logAction(6, sfContext::getInstance()->getUser()->getId(), $this);\n }",
"public function unpublish()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to unpublish' ) );\n\t\t}\n\n\t\t$model = $this->getModel('feed');\n\t\tif(!$model->publish($cid, 0)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect($this->_link);\n\t}",
"public function unrepost(PostReaction $request)\n {\n $userId = Auth::user()->id;\n\n DB::beginTransaction();\n\n Queries::Unrepost($userId, $request->post_id);\n\n $post = Post::find($request->post_id);\n $post->num_reposts--;\n $post->save();\n DB::commit();\n\n return redirect()->back();\n }",
"public function unfollow() {\n }",
"public function updateSeen( Post $post ) {\n\t\t$post->ingoing->delete();\n\n\t\treturn response()->json();\n\t}",
"function unpublish()\r\n {\r\n JRequest::checkToken() or jexit('Invalid Token');\r\n\r\n $cid = JRequest::getVar('cid', array (), 'post', 'array');\r\n JArrayHelper::toInteger($cid);\r\n if (count($cid) < 1)\r\n {\r\n JError::raiseError(500, JText::_('Select an item to unpublish'));\r\n }\r\n\r\n $model = $this->getModel('attribute');\r\n if (!$model->publish($cid, 0))\r\n {\r\n echo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\r\n }\r\n\r\n $this->setRedirect('index.php?option=com_webmapplus&view=markers');\r\n }",
"function trashThread() {\n\t\t$this->getThread();\n\t\tforeach ($this->replies as $x=>$v) {\n\t\t\t$v->trash();\n\t\t}\n\t\t//the post itself is included in the replies array\n\t\t//get thread is the entire thread\n\t}"
] | [
"0.63497055",
"0.62458074",
"0.59407353",
"0.58091676",
"0.58064705",
"0.5754419",
"0.57376385",
"0.5694017",
"0.5693358",
"0.5686171",
"0.5659571",
"0.56579244",
"0.56080633",
"0.5578867",
"0.5565412",
"0.5515838",
"0.54901797",
"0.5476458",
"0.5476281",
"0.5449927",
"0.54404885",
"0.5440359",
"0.5423673",
"0.54163784",
"0.5390756",
"0.5367674",
"0.53076226",
"0.528082",
"0.52495086",
"0.5249155"
] | 0.76218694 | 0 |
Confirm Replacement Creates an HTML link. If $url starts with " this is treated as an external link. Else, it is treated as a path to controller/action and parsed with the HtmlHelper::url() method. If the $url is empty, $title is used instead. Options `escape` Set to false to disable escaping of title and attributes. | function link($title, $url = null, $options = array(), $confirmMessage = false) {
$escapeTitle = true;
if ($url !== null) {
$url = $this->url($url);
} else {
$url = $this->url($title);
$title = $url;
$escapeTitle = false;
}
if (isset($options['escape'])) {
$escapeTitle = $options['escape'];
}
if ($escapeTitle === true) {
$title = h($title);
} elseif (is_string($escapeTitle)) {
$title = htmlentities($title, ENT_QUOTES, $escapeTitle);
}
if (!empty($options['confirm'])) {
$confirmMessage = $options['confirm'];
unset($options['confirm']);
}
if ($confirmMessage) {
$confirmMessage = str_replace("'", "\'", $confirmMessage);
$confirmMessage = str_replace('"', '\"', $confirmMessage);
$options['onclick'] = "return bootbox.confirm('{$confirmMessage}');";
} elseif (isset($options['default']) && $options['default'] == false) {
if (isset($options['onclick'])) {
$options['onclick'] .= ' event.returnValue = false; return false;';
} else {
$options['onclick'] = 'event.returnValue = false; return false;';
}
unset($options['default']);
}
return sprintf($this->Html->tags['link'], $url, $this->_parseAttributes($options), $title);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function link($title, $url = null, $options = array(), $confirmMessage = false) {\n\t\t$escapeTitle = true;\n\t\tif ($url !== null) {\n\t\t\t$url = $this->url($url);\n\t\t} else {\n\t\t\t$url = $this->url($title);\n\t\t\t$title = h(urldecode($url));\n\t\t\t$escapeTitle = false;\n\t\t}\n\n\t\tif (isset($options['escape'])) {\n\t\t\t$escapeTitle = $options['escape'];\n\t\t}\n\n\t\tif ($escapeTitle === true) {\n\t\t\t$title = h($title);\n\t\t} elseif (is_string($escapeTitle)) {\n\t\t\t$title = htmlentities($title, ENT_QUOTES, $escapeTitle);\n\t\t}\n\n\t\tif (!empty($options['confirm'])) {\n\t\t\t$confirmMessage = $options['confirm'];\n\t\t\tunset($options['confirm']);\n\t\t}\n\t\tif ($confirmMessage) {\n\t\t\t$confirmMessage = str_replace(\"'\", \"\\'\", $confirmMessage);\n\t\t\t$confirmMessage = str_replace('\"', '\\\"', $confirmMessage);\n\t\t\t$options['onclick'] = \"return confirm('{$confirmMessage}');\";\n\t\t} elseif (isset($options['default']) && $options['default'] == false) {\n\t\t\tif (isset($options['onclick'])) {\n\t\t\t\t$options['onclick'] .= ' event.returnValue = false; return false;';\n\t\t\t} else {\n\t\t\t\t$options['onclick'] = 'event.returnValue = false; return false;';\n\t\t\t}\n\t\t\tunset($options['default']);\n\t\t}\n\t\treturn sprintf($this->_tags['link'], $url, $this->_parseAttributes($options), $title);\n\t}",
"public function completeLink($title, $url = null, $options = [], $confirmMessage = false) {\n\t\tif (is_array($url)) {\n\t\t\t// Named are deprecated\n\t\t\t$url += $this->params['named'];\n\n\t\t\t// Add query strings\n\t\t\tif (!isset($url['?'])) {\n\t\t\t\t$url['?'] = [];\n\t\t\t}\n\t\t\t$url['?'] += $this->request->query;\n\t\t}\n\t\treturn $this->link($title, $url, $options, $confirmMessage);\n\t}",
"public function link($title, $url = null, $options = array(), $confirmMessage = false) {\n\t\tif (is_string($url)) {\n\t\t\t$url = Router::parse($url);\n\t\t}\n\t\tif ($this->check($url)) {\n\t\t\t$helper = 'Html';\n\t\t\t$hasJs = array_intersect(array('update', 'success', 'complete', 'beforeSend', 'error'), array_keys($options));\n\t\t\tif (!empty($hasJs)) {\n\t\t\t\t$helper = 'Js';\n\t\t\t}\n\t\t\treturn $this->{$helper}->link($title, $url, $options, $confirmMessage);\n\t\t}\n\t\treturn null;\n\t}",
"public function button_link($title, $url, $options = array(), $confirm = false) {\n\t\t$options = $this->button_options($options);\n\t\treturn $this->Html->link($title, $url, $options, $confirm);\n\t}",
"public function link(array|string $title, array|string|null $url = null, array $options = []): string\n {\n $escapeTitle = true;\n if ($url !== null) {\n $url = $this->Url->build($url, $options);\n unset($options['fullBase']);\n } else {\n $url = $this->Url->build($title);\n $title = htmlspecialchars_decode($url, ENT_QUOTES);\n $title = h(urldecode($title));\n $escapeTitle = false;\n }\n\n if (isset($options['escapeTitle'])) {\n $escapeTitle = $options['escapeTitle'];\n unset($options['escapeTitle']);\n } elseif (isset($options['escape'])) {\n $escapeTitle = $options['escape'];\n }\n\n if ($escapeTitle === true) {\n $title = h($title);\n } elseif (is_string($escapeTitle)) {\n /** @psalm-suppress PossiblyInvalidArgument */\n $title = htmlentities($title, ENT_QUOTES, $escapeTitle);\n }\n\n $templater = $this->templater();\n $confirmMessage = null;\n if (isset($options['confirm'])) {\n $confirmMessage = $options['confirm'];\n unset($options['confirm']);\n }\n if ($confirmMessage) {\n $confirm = $this->_confirm('return true;', 'return false;');\n $options['data-confirm-message'] = $confirmMessage;\n $options['onclick'] = $templater->format('confirmJs', [\n 'confirmMessage' => h($confirmMessage),\n 'confirm' => $confirm,\n ]);\n }\n\n return $templater->format('link', [\n 'url' => $url,\n 'attrs' => $templater->formatAttributes($options),\n 'content' => $title,\n ]);\n }",
"public function resetLink($title, $url = null, $options = [], $confirmMessage = false) {\n\t\tif ($this->_linkDefaults === null) {\n\t\t\t$this->_linkDefaults = CommonComponent::defaultUrlParams();\n\t\t}\n\t\tif (!defined('PREFIX_ADMIN')) {\n\t\t\tdefine('PREFIX_ADMIN', 'admin');\n\t\t}\n\t\tif ($url !== null && is_array($url)) {\n\t\t\t$url = array_merge($this->_linkDefaults, $url);\n\t\t\tif (!empty($url[PREFIX_ADMIN])) {\n\t\t\t\t$options['rel'] = 'nofollow';\n\t\t\t}\n\t\t} elseif (is_array($title)) {\n\t\t\t$title = array_merge($this->_linkDefaults, $title);\n\t\t\tif (!empty($title[PREFIX_ADMIN])) {\n\t\t\t\t$options['rel'] = 'nofollow';\n\t\t\t}\n\t\t}\n\t\treturn $this->link($title, $url, $options, $confirmMessage);\n\t}",
"public function defaultLink($title, $url = null, $options = [], $confirmMessage = false) {\n\t\treturn $this->resetLink($title, $url, $options, $confirmMessage);\n\t}",
"public function link(string $url, ?string $title = null, array $attributes = [], ?bool $secure = null, bool $escaped = true): HtmlString;",
"public function link($title, $url = null, array $options = [])\n {\n $default = ['icon' => null, 'escape' => true];\n $options = array_merge($default, (array)$options);\n if ($options['icon']) {\n if ($options['escape']) {\n $title = h($title);\n }\n $title = $this->bs_icon($options['icon']) . ' ' . $title;\n $options['escape'] = false;\n unset($options['icon']);\n }\n $lang = $this->_View->request->query('lang');\n if (!isset($url['lang']) && is_array($url) && isset($lang) && !empty($lang)) :\n $url['lang'] = $lang;\n endif;\n // we add class = activation to a link that matches the current page\n if ($url !== null) {\n $urlRouter = $this->Url->build($url);\n }\n //debug($urlRouter);\n if ($this->_View->request->here === $urlRouter) {\n if (!empty($options['class'])) {\n $mixClasses = [\n $options['class'],\n 'activation'\n ];\n $options['class'] = implode(' ', $mixClasses);\n } else {\n $options['class'] = 'activation';\n }\n }\n return parent::link($title, $url, $options);\n }",
"public function postLink($title, $url = null, $options = array(), $confirmMessage = false) {\n\t\t$block = false;\n\t\tif (!empty($options['block'])) {\n\t\t\t$block = $options['block'];\n\t\t\tunset($options['block']);\n\t\t}\n\n\t\t$fields = $this->fields;\n\t\t$this->fields = array();\n\n\t\t$out = parent::postLink($title, $url, $options, $confirmMessage);\n\n\t\t$this->fields = $fields;\n\n\t\tif ($block) {\n\t\t\t$regex = '/<form.*?>.*?<\\/form>/';\n\t\t\tif (preg_match($regex, $out, $match)) {\n\t\t\t\t$this->_View->append($block, $match[0]);\n\t\t\t\t$out = preg_replace($regex, '', $out);\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}",
"public function postButton($title, $url = null, $options = array(), $confirmMessage = false) {\n\t\t$options['class'] = (!empty($options['class']))?$options['class'].' ':'' . 'btn';\n\t\tif (array_key_exists('size', $options)) {\n\t\t\t$options['class'] = $options['class'] .' ' . $options['size'];\n\t\t\tunset($options['size']);\n\t\t}\n\t\tif (array_key_exists('type', $options)) {\n\t\t\t$options['class'] = $options['class'] .' '. $options['type'];\n\t\t\tunset($options['type']);\n\t\t} else {\n\t\t\t$options['class'] .= ' btn-default';\n\t\t}\n\t\n\t\treturn $this->postLink($title, $url, $options, $confirmMessage);\n\t}",
"public function secureLink(string $url, ?string $title = null, array $attributes = [], bool $escaped = true): HtmlString;",
"public static function url($url, $title, $class = '') {\n echo '<a href=\"' . Misc::link($url) . '\" class=\"' . $class . '\">' . htmlspecialchars($title) . '</a>';\n }",
"public function link($url, $title, $attributes = [])\n\t{\n\t\treturn '<a href=\"'.$url.'\"'.$this->attributes($attributes).'>'.$this->entities($title).'</a>';\n\t}",
"function delete_link($name, $url, $confirm = true, $confirm_text = 'Are you sure?') {\n\t\tif($confirm) {\n\t\t\t$confirmtxt = \"confirm('$confirm_text')\";\n\t\t}else{\n\t\t\t$confirmtxt = 'true';\n\t\t}\n\t\t$content = \"if ($confirmtxt) { var f = document.createElement('form');\n\t\t f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;\n\t\t var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method');\n\t\t m.setAttribute('value', 'delete'); f.appendChild(m);f.submit(); };return false;\";\n\t\treturn TagHelper::content_tag('a', $name, array('href' => $url, 'onclick' => $content));\n\t}",
"function we_tag_newsletterConfirmLink($attribs, $content=\"\") {\n\t\n\t$plain = we_getTagAttribute(\"plain\",$attribs,false,true);\n\t\n\t$content = trim($content);\n\t$link = isset($GLOBALS[\"WE_CONFIRMLINK\"]) ? $GLOBALS[\"WE_CONFIRMLINK\"] : \"\";\n\tif (strlen($content) < 1) {\n\t\t$content = $link;\n\t}\n\t\n\tif (strlen($link) > 0) {\n\t\tif(!$plain) {\n\t\t\t$attribs[\"href\"] = $link;\n\t\t\treturn getHtmlTag(\"a\", $attribs, $content);\n\t\t} else {\n\t\t\treturn $link;\n\t\t}\n\t} else {\n\t\treturn \"\";\n\t}\n}",
"function html_url($url, $title) \n {\n\n return '<a href='.$url.'?'.$title. '>';\n}",
"public static function actionLink($url, $options)\n {\n if ($url !== null) {\n $options['href'] = Url::to($url);\n }\n $visible = ArrayHelper::remove($options, 'visible', true);\n $disabled = ArrayHelper::remove($options, 'disabled', false);\n $disabledHint = ArrayHelper::remove($options, 'disabledHint');\n $type = ArrayHelper::remove($options, 'type', 'icon');\n $icon = ArrayHelper::remove($options, 'icon');\n $hideIcon = ArrayHelper::remove($options, 'hideIcon', false);\n $size = ArrayHelper::remove($options, 'size');\n $block = ArrayHelper::remove($options, 'block');\n $color = ArrayHelper::remove($options, 'color', 'primary');\n\n $class = ArrayHelper::getValue($options, 'class', '');\n $title = ArrayHelper::getValue($options, 'title');\n\n if (!$visible) {\n return '';\n }\n\n\n if ($type == 'icon') {\n $text = (empty($icon) || $hideIcon) ? $title : static::icon($icon);\n\n if ($disabled) {\n if (empty($icon) || $hideIcon) {\n return static::tag('span', $text, [\n 'title' => $disabledHint,\n 'class' => 'text-muted',\n 'data-toggle' => 'tooltip',\n ]);\n } else {\n return static::icon($icon, [\n 'title' => $disabledHint,\n 'class' => 'text-muted',\n 'data-toggle' => 'tooltip',\n ]);\n }\n }\n\n if ($color != 'primary') {\n $options['class'] .= \" text-$color\";\n }\n\n return static::a($text, $url, $options);\n } elseif ($type == 'button') {\n $class .= \" btn btn-$color\" \n . ($size ? \" btn-$size\" : '')\n . ($block ? \" btn-block\" : '')\n . ($disabled ? \" disabled\" : '');\n if ($disabled) {\n $options['title'] = $disabledHint;\n }\n $options['class'] = $class;\n\n $text = (empty($icon) || $hideIcon) ? '' : static::icon($icon);\n $text .= $title;\n\n return static::a($text, $url, $options);\n }\n }",
"function link($url = '', $title = '', $class = '', $target = '',\n $onclick = '', $title2 = '', $accesskey = '',\n $attributes = array(), $escape = true)\n {\n static $charset;\n\t\t if (!isset($charset)) {\n $charset = NLS::getCharset();\n }\n\n if (!empty($title2)) {\n $title = $title2;\n }\n\n $ret = '<a';\n if (!empty($url)) {\n $ret .= \" href=\\\"$url\\\"\";\n }\n if (!empty($onclick)) {\n $ret .= \" onclick=\\\"$onclick\\\"\";\n }\n if (!empty($class)) {\n $ret .= \" class=\\\"$class\\\"\";\n }\n if (!empty($target)) {\n $ret .= \" target=\\\"$target\\\"\";\n }\n if (!empty($title)) {\n if ($escape) {\n $old_error = error_reporting(0);\n $title = str_replace(\n array(\"\\r\", \"\\n\"), '',\n htmlspecialchars(\n nl2br(htmlspecialchars($title, ENT_QUOTES, $charset)),\n ENT_QUOTES, $charset));\n error_reporting($old_error);\n }\n $ret .= ' title=\"' . $title . '\"';\n }\n if (!empty($accesskey)) {\n $ret .= ' accesskey=\"' . htmlspecialchars($accesskey) . '\"';\n }\n\n foreach ($attributes as $name => $value) {\n $ret .= ' ' . htmlspecialchars($name) . '=\"'\n . htmlspecialchars($value) . '\"';\n }\n\n return \"$ret>\";\n }",
"public function link(string $url, string $title = null, array $attributes = [], bool $secure = null, bool $escape = true): HtmlString|string\n {\n $url = $this->url->to($url, [], $secure);\n\n if (!$title) {\n $title = $url;\n }\n\n if ($escape) {\n $title = $this->entities($title);\n }\n\n return $this->toHtmlString('<a href=\"' . $this->entities($url) . '\"' . $this->attributes($attributes) . '>' . $title . '</a>');\n }",
"public function link($url, $title = null, $attributes = array()) {\n\t\t\t$url = $this->url->to($url, array());\n\t\t\t\n\t\t\tif (is_null($title) or $title === false) {\n\t\t\t\t$title = $url;\n\t\t\t}\n\t\t\t\n\t\t\treturn '<a href=\"' . $url . '\"' . $this->attributes($attributes) . '>' . e($title) . '</a>';\n\t\t}",
"public function insert($title, $fieldName = null, $content = array(), $htmlAttributes = array(), $confirmMessage = false) {\n\t\tif (isset($fieldName)) {\n\t\t\t$content['target'] = ($fieldName{0} === '#') ? $fieldName : '#' . parent::domId($fieldName);\n\t\t}\n\t\tif (!is_array($content)) {\n\t\t\t$content['replaceWith'] = $content;\n\t\t}\n\t\t$properties = '';\n\t\tforeach ($content as $k => $v) {\n\t\t\t$properties .= $k . ':\"' . addslashes($v) . '\",';\n\t\t}\n\t\t$properties = substr($properties, 0, -1);\n\n\t\t$htmlAttributes = am($htmlAttributes, array('onclick' => '$.markItUp( { ' . $properties . ' } ); return false;'));\n\t\treturn $this->Html->link($title, \"#\", $htmlAttributes, $confirmMessage, false);\n\t}",
"public function linkSecureAsset(string $url, ?string $title = null, array $attributes = []): HtmlString;",
"protected function createConfirmHTML($header, $text, $linkText, $url, $token = null)\n {\n if($token)\n {\n $tokenHtml = '<br><br><h4>Your Data</h4><table class=\"table aligh-left\">\n <thead>\n <tr>\n <th scope=\"col\">First name</th>\n <th scope=\"col\">Last name</th>\n <th scope=\"col\">Email</th>\n <th scope=\"col\">Token</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">' . $token['firstname'] .'</th>\n <td>' . $token['lastname'] .'</td>\n <td>' . $token['email'] .'</td>\n <td>' . $token['token'] .'</td>\n </tr>\n \n </tbody>\n </table>';\n } else {\n $tokenHtml = '';\n }\n\n $html = \"<!doctype html>\n <html lang='en'>\n <head>\n <!-- Required meta tags -->\n <meta charset='utf-8'>\n <meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>\n \n <!-- Bootstrap CSS -->\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' integrity='sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm' crossorigin='anonymous'>\n \n <title>GDPR removal request</title>\n <style>\n body {\n padding-top: 5rem;\n }\n .gdpr {\n padding: 3rem 1.5rem;\n text-align: center;\n }\n\n </style>\n </head>\n <body>\n <main role='main' class='container'>\n\n <div class='gdpr'>\n <h1>$header</h1>\n <p class='lead'>$text</p>\n $tokenHtml\n <a id='confirmDelete' href='$url' class='btn btn-danger' role='button'>$linkText</a>\n \n </div>\n \n </main><!-- /.container -->\n\n </body>\n </html>\";\n return $html;\n\n }",
"public function confirmLink ($confirm_what)\n\t{\n\t\treturn $this->template->confirmLink($confirm_what);\n\t}",
"function DoURL($bbcode, $action, $name, $default, $params, $content) {\n // We can't check this with BBCODE_CHECK because we may have no URL before the content\n // has been processed.\n if ($action == BBCODE_CHECK) {\n $bbcode->autolink_disable++;\n return true;\n }\n\n $bbcode->autolink_disable--;\n $url = is_string($default) ? $default : $bbcode->UnHTMLEncode(strip_tags($content));\n $url = preg_replace('# #u', '%20', $url);\n if (!preg_match('#^(/|https?:|ftp:)#ui', $url)) {\n // Add scheme to raw domain URLs.\n $url = \"http://{$url}\";\n }\n\n if ($bbcode->IsValidURL($url, false, true)) {\n if ($bbcode->debug)\n echo \"ISVALIDURL<br />\";\n if ($bbcode->url_targetable !== false && isset($params ['target']))\n $target = \" target=\\\"\" . htmlspecialchars($params ['target']) . \"\\\"\";\n elseif ($bbcode->url_target !== false)\n $target = \" target=\\\"\" . htmlspecialchars($bbcode->url_target) . \"\\\"\";\n else\n $target = '';\n return '<a href=\"' . htmlspecialchars($url) . '\" class=\"bbcode_url\" rel=\"nofollow\"' . $target . '>' . $content . '</a>';\n }\n return htmlspecialchars($params ['_tag']) . $content . htmlspecialchars($params ['_endtag']);\n }",
"public static function nostyleUrl($title, $url) {\n $url = self::expandLink($url);\n echo('<a href=\"'.$url.'\" target=\"_blank\" typeof=\"oer:SupportingMaterial\">'.htmlentities($url).\"</a>\\n\");\n if ( isset($_SESSION['gc_count']) ) {\n echo('<div class=\"g-sharetoclassroom\" data-size=\"16\" data-url=\"'.$url.'\" ');\n\t echo(' data-title=\"'.htmlentities($title).'\" ');\n\t echo('></div>');\n }\n }",
"public function linkAsset(string $url, ?string $title = null, array $attributes = [], ?bool $secure = null): HtmlString;",
"function linkTooltip($url, $status = '', $class = '', $target = '',\n $onclick = '', $title = '', $accesskey = '',\n $attributes = array())\n {\n static $charset;\n if (!isset($charset)) {\n $charset = NLS::getCharset();\n }\n\n if (!empty($title)) {\n $old_error = error_reporting(0);\n $title = '<pre>' . preg_replace(array('/\\n/', '/((?<!<br)\\s{1,}(?<!\\/>))/em', '/<br \\/><br \\/>/', '/<br \\/>/'), array('', 'str_repeat(\" \", strlen(\"$1\"))', '<br /> <br />', '<br />'), nl2br(htmlspecialchars(htmlspecialchars($title, ENT_QUOTES, $charset), ENT_QUOTES, $charset))) . '</pre>';\n error_reporting($old_error);\n }\n return Horde::link($url, $title, $class, $target, $onclick, null, $accesskey, $attributes, false);\n }",
"public function button_form($title, $url, $options = array(), $confirm = false) {\n\t\t$options = $this->button_options($options);\n\t\treturn $this->Form->postLink($title, $url, $options, $confirm);\n\t}"
] | [
"0.69258803",
"0.6552731",
"0.6504481",
"0.6234174",
"0.6218458",
"0.60988677",
"0.60657746",
"0.602512",
"0.5839544",
"0.56446743",
"0.5616616",
"0.56103194",
"0.5577801",
"0.5573677",
"0.54990405",
"0.54863703",
"0.5473831",
"0.5446016",
"0.54174256",
"0.5406888",
"0.5381712",
"0.534887",
"0.52834135",
"0.52814585",
"0.52780604",
"0.52766263",
"0.5245466",
"0.52411354",
"0.5235193",
"0.5217816"
] | 0.70639485 | 0 |
Takes the options from the input method and returns an array of the inline help and inline block content wrapped in the appropriate markup. | public function _help_markup($options) {
$help_markup = array("help_inline" => "", "help_block" => "");
foreach (array_keys($help_markup) as $help) {
if (isset($options[$help]) && !empty($options[$help])) {
$help_class = str_replace("_", "-", $help);
$help_markup[$help] = $this->Html->tag(
"span",
$options[$help],
array("class" => $help_class)
);
}
}
return array_values($help_markup);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getHelpLines() : array\n {\n return array_merge($this->getVersion(), $this->getCommandList(), $this->getOptions());\n }",
"static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}",
"static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}",
"static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}",
"static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}",
"public function helpText() {\n return array(\n\n '#markup' => $this->t('Use this page to add information for secondary navigation under the global navigation \n (agency) menu. Use the WYSIWYG box to enter a 250 character message. The Link section\n will be available to use to add up to 10 links. Use both sections or each individual,\n depending on your need.<br /><br />'\n ),\n '#prefix' => '<p>',\n '#suffix' => '</p>',\n );\n }",
"public function getHelp();",
"public function getHelp();",
"static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t$help [__CLASS__] [\"text\"] [] .= \"--template_class\";\n\t\t\n\t\treturn $help;\n\t}",
"function Blocks_htmlblock_info()\n{\n return array('module' => 'Blocks',\n 'text_type' => __('HTML'),\n 'text_type_long' => __('HTML'),\n 'allow_multiple' => true,\n 'form_content' => true,\n 'form_refresh' => false,\n 'show_preview' => true);\n}",
"function help_box( $show=array(), $title=\"\", $content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='help-box' style=\"display:{$show['div_fc']}\" id=\"fc_{$show['div_key']}\">\n\t<h2>\n\t\t<div style='float:right;'><a href=\"javascript:togglecategory('{$show['div_key']}', 0);\"><img style='margin: 4px 4px 4px 2px;' src='{$this->ipsclass->skin_acp_url}/images/arrow_down.png' alt='Show' /></a></div>\n\t\t<div><a href=\"javascript:togglecategory('{$show['div_key']}', 0);\" style='text-decoration:none;'>{$title}</a></div>\n\t</h2>\n</div>\n<div class='help-box' style=\"display:{$show['div_fo']}\" id=\"fo_{$show['div_key']}\">\n <img src='{$this->ipsclass->skin_acp_url}/images/icon_help.png' alt='help' />\n <h2>\n \t<div style='float:right;'><a href=\"javascript:togglecategory('{$show['div_key']}', 1);\"><img style='margin: 4px 4px 4px 2px;' src='{$this->ipsclass->skin_acp_url}/images/arrow_up.png' alt='Hide' /></a></div>\n \t<div><a href=\"javascript:togglecategory('{$show['div_key']}', 1);\" style='text-decoration:none;'>{$title}</a></div>\n </h2>\n <p>\n \t<br />\n \t$content\n </p>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}",
"static function help()\n {\n # display the help banner if one has been set\n if (self::$banner !== null) {\n echo self::$banner . \"\\n\";\n }\n\n # to get the formatting to look nice when printed, do some\n # calculations regarding help message line-length.\n $max_before_colon_pos = 0;\n foreach (self::$options as $option) {\n # calculate the line-length based on the absence or presence\n # of a type requirement\n if ($option->type != null) {\n $t = substr($option->type, 0, 1);\n $line = \"{$option->long}, {$option->short} <$t>: {$option->description}\\n\";\n } else {\n $line = \"{$option->long}, {$option->short}: {$option->description}\\n\";\n }\n $before_colon_pos = strlen(substr($line, 0, strpos($line, ':')));\n\n if ($before_colon_pos > $max_before_colon_pos) {\n $max_before_colon_pos = $before_colon_pos;\n }\n }\n\n # then display the options\n echo \"Options:\\n\";\n foreach (self::$options as $option) {\n # same as above\n if ($option->type != null) {\n $t = substr($option->type, 0, 1);\n $line = \"{$option->long}, {$option->short} <$t>: {$option->description}\\n\";\n } else {\n $line = \"{$option->long}, {$option->short}: {$option->description}\\n\";\n }\n\n # now pad the string before the colon with spaces as appropriate\n $before_colon_str = substr($line, 0, strpos($line, ':'));\n $before_colon_str = str_pad($before_colon_str, $max_before_colon_pos, ' ', STR_PAD_LEFT);\n $after_colon_str = substr($line, strpos($line, ':'));\n\n # and output the result\n echo \"$before_colon_str$after_colon_str\";\n }\n die();\n }",
"public static function getHelp(&$htmlOptions)\n {\n\n $help = self::popOption('help', $htmlOptions);\n if (null !== $help && is_array($help)) {\n $text = self::popOption('text', $help, 'help');\n $type = self::popOption('type', $help, self::HELP_BLOCK);\n $help = self::tag('span', array('class' => 'help-' . $type, $text));\n }\n return $help;\n }",
"protected function output() {\n\t\t$is_inline = ( true === $this->option( 'inline' ) ) ? 'wpo-inline-list' : '';\n\t\t$options = $this->option( 'options' );\n\t\t$options = ( wponion_is_array( $options ) ) ? $options : array_filter( $this->element_data( $options ) );\n\n\t\tif ( wponion_is_array( $options, true ) ) {\n\t\t\t$this->html( \"<ul class=\\\"${is_inline}\\\" >\" );\n\t\t\tforeach ( $options as $option_key => $option ) {\n\t\t\t\tif ( ! wponion_is_array( $option ) || ( wponion_is_array( $option ) && wponion_is_set( $option, 'label' ) || wponion_is_set( $option, 'custom_input' ) ) ) {\n\t\t\t\t\t$this->html( '<li>' )\n\t\t\t\t\t\t->html( $this->render_element( $this->handle_options( $option_key, $option ) ) )\n\t\t\t\t\t\t->html( '</li>' );\n\t\t\t\t} elseif ( wponion_is_array( $option ) && false === isset( $option['label'] ) ) {\n\t\t\t\t\t$this->html( \"<li class=\\\"has-subgroup\\\"><h4 class=\\\"wponion-checkbox-radio-header\\\">${option_key}</h4><ul class=\\\"wponion-checkbox-group-lists\\\">\" );\n\t\t\t\t\tforeach ( $option as $key => $value ) {\n\t\t\t\t\t\t$this->html( '<li>' )\n\t\t\t\t\t\t\t->html( $this->render_element( $this->handle_options( $key, $value ), true ) )\n\t\t\t\t\t\t\t->html( '</li>' );\n\t\t\t\t\t}\n\t\t\t\t\t$this->html( '</ul></li>' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->html( '</ul>' );\n\t\t} elseif ( 'checkbox' === $this->element_type() && empty( $options ) && empty( $this->option( 'query_args' ) ) ) {\n\t\t\t$this->html( $this->render_element( $this->handle_options( $this->field_id(), $this->option( 'label' ) ), 'single' ) );\n\t\t} elseif ( 'switcher' === $this->element_type() ) {\n\t\t\t$this->html( $this->render_element( $this->handle_options( $this->field_id(), $this->option( 'label' ) ), 'single' ) );\n\t\t} else {\n\t\t\t$this->html( '<p class=\"wpo-text-danger\">' . __( 'No Options Found.', 'wponion' ) . '</p>' );\n\t\t}\n\t\treturn $this->before() . $this->html( true ) . $this->after();\n\t}",
"function helpShowSection($one_text=\"\",$two_text=\"\",$three_text=\"\", $text) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<if test=\"notajax:|:!$this->request['xml']\">\n<div class='topic_controls'>\n\t<ul class='topic_buttons'>\n\t\t<li><a href=\"{parse url=\"app=core&module=help\" base=\"public\"}\" title=\"{$this->lang->words['help_back_list_title']}\"><img src='{$this->settings['img_url']}/back.png' alt='' /> {$this->lang->words['help_return_list']}</a></li>\n\t</ul>\n</div>\n</if>\n<if test=\"isajax:|:$this->request['xml']\">\n<br />\n</if>\n<if test=\"notajax:|:!$this->request['xml']\">\n\t<h1 class='ipsType_pagetitle'>{$one_text}: {$three_text}</h1>\n<else />\n\t<h1 class='ipsType_subtitle'>{$one_text}: {$three_text}</h1>\n</if>\n<br />\n<div class='row2 help_doc ipsPad bullets'>\n\t{$text}\n</div>\n<br />\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"public function displayExamples() {\n return array(\n '#type' => 'details',\n '#title' => t('Secondary Navigation Examples/Help'),\n '#open' => TRUE,\n );\n }",
"public function help() {\n $help = [];\n foreach ($this->commands as $c => $v) {\n $help[] = sprintf (\"%20s: %-s\", $c, $v['help']);\n }\n\n $output = \"\";\n switch ($this->output) {\n case 'text':\n $output = implode(\"\\n\", $help);\n break;\n\n case 'json':\n $output = json_encode($help, true);\n break;\n\n case 'html':\n // TODO:\n break;\n }\n return $output;\n }",
"public function getHelp()\n {\n echo <<<EOS\nn/a\nEOS;\n }",
"function example_firstblock_info()\n{\n /* Values */\n return array(\n 'text_type' => 'First',\n 'module' => 'example',\n 'text_type_long' => 'Show first example items (alphabetical)',\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => true\n );\n}",
"public function getHelpHtml()\n {\n return $this->helpHtml;\n }",
"public function help()\n {\n return \"Here you can enter HTML with paragrpah tags or whatever you like\";\n \n // or\n \n // You could include a file and return it here.\n return $this->load->view('help', null, true); // loads modules/sample/views/help.php\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"function global_help_block($title, $msg) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div><strong>$title</strong><p>$msg</p></div>\n<br />\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}",
"protected function field_help() {\n\t\t\t$html = '';\n\t\t\tif ( $this->has( 'help' ) ) {\n\t\t\t\t$data = $this->tooltip_data( $this->data( 'help' ), array( 'icon' => 'dashicons dashicons-editor-help' ) );\n\t\t\t\t$span_attr = wponion_array_to_html_attributes( $data['attr'] );\n\t\t\t\t$html = '<span ' . $span_attr . '><span class=\"' . $data['data']['icon'] . '\"></span></span>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}",
"public function help() {\n $f=appData::getParam('wsdl');\n $file=appData::getParam('wsdlpath').$f;\n $xml=file_get_contents($file);\n $x=htmlentities($xml,ENT_QUOTES,'UTF-8');\n $rc=[ \"[h3]The wdsl file ({$f}) defines the web service\n according to SOAP model \",\n \"<a href='{$file}' target=_blank>\n To see the file in a browser tab</a>\",\n ];\n return ['xml'=>$x,\n 'html'=>[\n 'html'=>htmlSimple::html($rc),\n 'styles'=>'',\n 'script'=>''\n ]\n ];\n }",
"public function help()\n {\n // You could include a file and return it here.\n return \"<h4>Overview</h4>\";\n }",
"protected function helpMsg()\n {\n \n foreach($this->defaultOptions as $array) {\n \n foreach($array['options'] as $option) {\n \n CliColors::render($option . PHP_EOL, CliColors::FG_GREEN);\n \n }\n \n print(\"\\t\\t\\t\");\n \n CliColors::render($array['description'] . PHP_EOL, CliColors::FG_YELLOW);\n \n }\n \n exit();\n \n }",
"abstract protected function options_layout();",
"public function toOptionArray()\n {\n return array(\n array('value' => 'comment',\n 'label' => Mage::helper('devtools')->__('Comment block')\n ),\n\n array('value' => 'section',\n 'label' => Mage::helper('devtools')->__('Section')\n ),\n\n array('value' => 'div',\n 'label' => Mage::helper('devtools')->__('Div')\n ),\n );\n }",
"public function getHTML($options = [])\n {\n $defaults = [\n // Only return the start of the form element\n 'start' => false,\n \n // Layout all elements in one column\n 'columns' => 1,\n \n // Layout consequtive buttons as one element wrapped in <p>\n 'use_buttonbar' => true,\n\n // Wrap fields within <fieldset>\n 'use_fieldset' => true,\n\n // Use legend for fieldset\n 'legend' => isset($this->form['legend']) ?\n $this->form['legend']\n : null,\n ];\n $options = array_merge($defaults, $options);\n\n $form = array_merge($this->form, $options);\n $id = isset($form['id']) ? \" id='{$form['id']}'\" : null;\n $class = isset($form['class']) ? \" class='{$form['class']}'\" : null;\n $name = isset($form['name']) ? \" name='{$form['name']}'\" : null;\n $action = isset($form['action']) ? \" action='{$form['action']}'\" : null;\n $method = isset($form['method']) ? \" method='{$form['method']}'\" : \" method='post'\";\n\n if ($options['start']) {\n return \"<form{$id}{$class}{$name}{$action}{$method}>\\n\";\n }\n\n $fieldsetStart = '<fieldset>';\n $legend = null;\n $fieldsetEnd = '</fieldset>';\n if (!$options['use_fieldset']) {\n $fieldsetStart = $fieldsetEnd = null;\n }\n\n if ($options['use_fieldset'] && $options['legend']) {\n $legend = \"<legend>{$options['legend']}</legend>\";\n }\n\n $elementsArray = $this->GetHTMLForElements($options);\n $elements = $this->GetHTMLLayoutForElements($elementsArray, $options);\n $output = $this->GetOutput();\n\n $html = <<< EOD\n\\n<form{$id}{$class}{$name}{$action}{$method}>\n{$fieldsetStart}\n{$legend}\n{$elements}\n{$output}\n{$fieldsetEnd}\n</form>\\n\nEOD;\n\n return $html;\n }"
] | [
"0.61762625",
"0.6115004",
"0.6115004",
"0.6115004",
"0.6115004",
"0.6027393",
"0.59809357",
"0.59809357",
"0.59484327",
"0.58904797",
"0.5882416",
"0.58763075",
"0.58709955",
"0.58126795",
"0.5799351",
"0.5736858",
"0.567187",
"0.56711423",
"0.5662238",
"0.55688715",
"0.55565333",
"0.55416155",
"0.55268896",
"0.5511441",
"0.5505188",
"0.5486765",
"0.5476855",
"0.5467766",
"0.54520816",
"0.5448897"
] | 0.72556174 | 0 |
Uses the selected JS engine to create a submit input element that is enhanced with Javascript. Options can include both those for FormHelper::submit() and JsBaseEngine::request(), JsBaseEngine::event(); Forms submitting with this method, cannot send files. Files do not transfer over XmlHttpRequest and require an iframe or flash. Options `url` The url you wish the XHR request to submit to. `confirm` A string to use for a confirm() message prior to submitting the request. `method` The method you wish the form to send by, defaults to POST `buffer` Whether or not you wish the script code to be buffered, defaults to true. Also see options for JsHelper::request() and JsHelper::event() | function submit($caption = null, $options = array()) {
if (!isset($options['id'])) {
$options['id'] = 'submit-' . intval(mt_rand());
}
$formOptions = array('div');
list($options, $htmlOptions) = $this->_getHtmlOptions($options, $formOptions);
if( isset($options['escape']) ) $htmlOptions['escape']=$options['escape'];
$out = $this->Form->submit($caption, $htmlOptions);
$this->Js->get('#' . $htmlOptions['id']);
$options['data'] = $this->Js->serializeForm(array('isForm' => false, 'inline' => true));
$requestString = $url = '';
if (isset($options['confirm'])) {
$requestString = $this->confirmReturn($options['confirm']);
unset($options['confirm']);
}
if (isset($options['url'])) {
$url = $options['url'];
unset($options['url']);
}
if (!isset($options['method'])) {
$options['method'] = 'post';
}
$options['dataExpression'] = true;
$buffer = isset($options['buffer']) ? $options['buffer'] : null;
$safe = isset($options['safe']) ? $options['safe'] : true;
unset($options['buffer'], $options['safe']);
$requestString .= $this->request($url, $options);
if (!empty($requestString)) {
$event = $this->Js->event('click', $requestString, $options + array('buffer' => $buffer));
}
if (isset($buffer) && !$buffer) {
$opts = array('safe' => $safe);
$out .= $this->Html->scriptBlock($event, $opts);
}
return $out;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function submit($value = 'Submit', array $options = array()) {\n\t\treturn $this->add('submit', array('value' => $value) + $options);\n\t}",
"public function submit(?string $caption = null, array $options = []): string\n {\n $caption ??= __d('cake', 'Submit');\n $options += [\n 'type' => 'submit',\n 'secure' => false,\n 'templateVars' => [],\n ];\n\n if (isset($options['name']) && $this->formProtector) {\n $this->formProtector->addField(\n $options['name'],\n $options['secure']\n );\n }\n unset($options['secure']);\n\n $isUrl = str_contains($caption, '://');\n $isImage = preg_match('/\\.(jpg|jpe|jpeg|gif|png|ico)$/', $caption);\n\n $type = $options['type'];\n unset($options['type']);\n\n if ($isUrl || $isImage) {\n $type = 'image';\n\n if ($this->formProtector) {\n $unlockFields = ['x', 'y'];\n if (isset($options['name'])) {\n $unlockFields = [\n $options['name'] . '_x',\n $options['name'] . '_y',\n ];\n }\n foreach ($unlockFields as $ignore) {\n $this->unlockField($ignore);\n }\n }\n }\n\n if ($isUrl) {\n $options['src'] = $caption;\n } elseif ($isImage) {\n if ($caption[0] !== '/') {\n $url = $this->Url->webroot(Configure::read('App.imageBaseUrl') . $caption);\n } else {\n $url = $this->Url->webroot(trim($caption, '/'));\n }\n $url = $this->Url->assetTimestamp($url);\n $options['src'] = $url;\n } else {\n $options['value'] = $caption;\n }\n\n $input = $this->formatTemplate('inputSubmit', [\n 'type' => $type,\n 'attrs' => $this->templater()->formatAttributes($options),\n 'templateVars' => $options['templateVars'],\n ]);\n\n return $this->formatTemplate('submitContainer', [\n 'content' => $input,\n 'templateVars' => $options['templateVars'],\n ]);\n }",
"public function submit($value = null, $options = [])\n {\n return $this->input('submit', null, $value, $options);\n }",
"public function submit($value = null, $options = array())\n {\n $element = parent::submit($value, $options);\n\n return $element;\n }",
"public function submit($text){\n return Tag::button(array('class' => 'css3button', 'type' => 'submit', 'value' => $this->opts['name']), $text);\n }",
"function FormSubmit($id, $value, $form) {\n $output = sprintf('<input type=\"submit\" id=\"%s\" name=\"%s\" value=\"%s\" />', $id, $id, $value);\n\n $jscriptoutput = sprintf('var fv%s=new FormValidator($(\\'%s\\'),{onElementPass:ValidateElementPass,onElementFail:ValidateElementFail});', $form, $form);\n $output .= JsBlock($jscriptoutput, true);\n\n return $output;\n}",
"function add_submit($name='submit', $value='Submit', $doconfirm=false, $confirm_text='', $id='', $class='', $style='', $extra='')\n\t{\n\t\t$extra .= ($doconfirm ? ' onclick=\"return confirm(' . \"'$confirm_text'\" . ');\"' : '');\n\t\t$this->add_input('submit', $name, $value, $id, $class, $style, $extra);\n\t}",
"function form_submit($value, $name = 'op', $attributes = NULL) {\n return form_button($value, $name, 'submit', $attributes);\n}",
"function form_submit_confirm_new() {\r\n /* echoed before enterim form, inside <script>, define form_submit_confirm javascript function behaviour in your code\r\n */\r\n return <<<__END__\r\n function form_submit_confirm(myform) {\r\n //action = myform.elements['act'].value;\r\n //myform.submit();\r\n }\r\n__END__;\r\n }",
"protected abstract function getSubmitAction();",
"protected abstract function getSubmitAction();",
"protected function submit_button(question_attempt $qa, question_display_options $options, $button_name='submit', $button_text=null, $class='', $disabled=null, $on_click = '') {\n\n //if no button text was provided, then use the default string\n $button_text = $button_text ?: get_string('gradenow', 'qbehaviour_adaptiveweighted');\n\n //compute the button's attributes\n $attributes = array\n (\n 'type' => 'submit',\n 'id' => $qa->get_behaviour_field_name($button_name),\n 'name' => $qa->get_behaviour_field_name($button_name),\n 'value' => $button_text,\n 'alt' => $button_text,\n 'class' => 'submit btn '.$class,\n 'onclick' => $on_click\n );\n\n //If disabled is explicitly set to false, never disable this question.\n //If disabled is set to true, prevent the button from being clicked.\n //If disabled is set to null (or an invalid value), use $options->readonly.\n if (($options->readonly || $disabled === true) && $disabled !== false) {\n $attributes['disabled'] = 'disabled';\n $attributes['class'] .= ' disabled';\n }\n\n //generate a new submit button \n $output = html_writer::empty_tag('input', $attributes);\n\n //if this question isn't read-only, initialize the submit button routine, which prevents multiple submissions\n if (!$options->readonly) {\n $this->page->requires->js_init_call('M.core_question_engine.init_submit_button', array($attributes['id'], $qa->get_slot()));\n }\n\n //finally, return the rendered submit button\n return $output;\n }",
"function submit($title = 'Submit', $options = array()) {\n\t\tif(!isset($options['class'])) $options['class'] = \"formButton\";\n\t\treturn parent::submit($title, $options);\n\t}",
"public static function submit($text = 'Submit', $extras = []){\n\t\t$html = self::input('submit', '', $text, $extras);\n\t\treturn $html;\n\t}",
"public function submit($name=NULL,$value=NULL,$attributes=NULL) {\r\n\t\t\tif(is_array($value)):\r\n\t\t\t\t$attributes = $value;\r\n\t\t\t\t$value = $name;\r\n\t\t\t\t$name = false;\r\n\t\t\telseif($value === NULL):\r\n\t\t\t\t$value = $name;\r\n\t\t\t\t$name = false;\r\n\t\t\tendif;\r\n\t\t\t$attributes = $this->_attributes('input',$attributes);\r\n\t\t\tif($name) $attributes['name'] = $name;\r\n\t\t\t$attributes['type'] = 'submit';\r\n\t\t\t$attributes['value'] = $value;\r\n\t\t\tif(isset($attributes['class'])) $attributes['class'] = 'submit button '.$attributes['class'];\r\n\t\t\telse $attributes['class'] = 'submit button';\r\n\t\t\treturn new \\PHY\\Markup\\Element('input',$attributes,true);\r\n\t\t}",
"public function postLink(string $title, array|string|null $url = null, array $options = []): string\n {\n $options += ['block' => null, 'confirm' => null];\n\n $requestMethod = 'POST';\n if (!empty($options['method'])) {\n $requestMethod = strtoupper($options['method']);\n unset($options['method']);\n }\n\n $confirmMessage = $options['confirm'];\n unset($options['confirm']);\n\n $formName = str_replace('.', '', uniqid('post_', true));\n $formOptions = [\n 'name' => $formName,\n 'style' => 'display:none;',\n 'method' => 'post',\n ];\n if (isset($options['target'])) {\n $formOptions['target'] = $options['target'];\n unset($options['target']);\n }\n $templater = $this->templater();\n\n $restoreAction = $this->_lastAction;\n $this->_lastAction($url);\n $restoreFormProtector = $this->formProtector;\n\n $action = $templater->formatAttributes([\n 'action' => $this->Url->build($url),\n 'escape' => false,\n ]);\n\n $out = $this->formatTemplate('formStart', [\n 'attrs' => $templater->formatAttributes($formOptions) . $action,\n ]);\n $out .= $this->hidden('_method', [\n 'value' => $requestMethod,\n 'secure' => static::SECURE_SKIP,\n ]);\n $out .= $this->_csrfField();\n\n $formTokenData = $this->_View->getRequest()->getAttribute('formTokenData');\n if ($formTokenData !== null) {\n $this->formProtector = $this->createFormProtector($formTokenData);\n }\n\n $fields = [];\n if (isset($options['data']) && is_array($options['data'])) {\n foreach (Hash::flatten($options['data']) as $key => $value) {\n $fields[$key] = $value;\n $out .= $this->hidden($key, ['value' => $value, 'secure' => static::SECURE_SKIP]);\n }\n unset($options['data']);\n }\n $out .= $this->secure($fields);\n $out .= $this->formatTemplate('formEnd', []);\n\n $this->_lastAction = $restoreAction;\n $this->formProtector = $restoreFormProtector;\n\n if ($options['block']) {\n if ($options['block'] === true) {\n $options['block'] = __FUNCTION__;\n }\n $this->_View->append($options['block'], $out);\n $out = '';\n }\n unset($options['block']);\n\n $url = '#';\n $onClick = 'document.' . $formName . '.submit();';\n if ($confirmMessage) {\n $onClick = $this->_confirm($onClick, '');\n $onClick = $onClick . 'event.returnValue = false; return false;';\n $onClick = $this->templater()->format('confirmJs', [\n 'confirmMessage' => h($confirmMessage),\n 'formName' => $formName,\n 'confirm' => $onClick,\n ]);\n $options['data-confirm-message'] = $confirmMessage;\n } else {\n $onClick .= ' event.returnValue = false; return false;';\n }\n $options['onclick'] = $onClick;\n\n $out .= $this->Html->link($title, $url, $options);\n\n return $out;\n }",
"function ConstructGForm($options)\n {\n // If no URL then return as nothing useful can be done.\n if (!$options['form'])\n {\n return false; \n }\n else\n {\n $form = $options['form'] ;\n }\n\n // Custom Alert Message? Optional\n if (!$options['alert'])\n {\n $alert = null ;\n }\n else\n {\n $alert = $options['alert'] ;\n }\n\n // Custom Confirmation URL? Optional\n if (!$options['confirm'])\n {\n $confirm = null ;\n }\n else\n {\n $confirm = $options['confirm'] ;\n }\n\n // Custom Class? Optional\n if (!$options['class'])\n {\n $class = null ;\n }\n else\n {\n $class = $options['class'] ;\n }\n\n // Class Prefix? Optional\n if (!$options['prefix'])\n {\n $prefix = null ;\n }\n else\n {\n $prefix = $options['prefix'] ;\n }\n\n // Label Suffix? Optional\n if (!$options['suffix'])\n {\n $suffix = null ;\n }\n else\n {\n $suffix = $options['suffix'] ;\n }\n\n // Breaks between labels and inputs?\n $br = $options['br'] === 'on' ;\n\n // Output the H1 title included in the Google Form?\n $title = $options['title'] === 'on' ;\n\n // Map H1 tags to H2 tags? Apparently helps SEO ...\n $maph1h2 = $options['maph1h2'] === 'on' ;\n\n // Google Legal Stuff?\n $legal = $options['legal'] !== 'off' ;\n\n // Should form be set to readonly?\n $readonly = $options['readonly'] === 'on' ;\n\n // Should email confirmation be sent?\n $email = $options['email'] === 'on' ;\n\n // Who should email confirmation be sent to?\n if (!$options['sendto'])\n {\n $sendto = null ;\n }\n else\n {\n $sendto = is_email($options['sendto']) ;\n }\n\n\n // Show the custom confirmation via AJAX instead of redirect?\n $style = $options['style'] ;\n\n // WordPress converts all of the ampersand characters to their\n // appropriate HTML entity or some variety of it. Need to undo\n // that so the URL can be actually be used.\n\n $form = str_replace(array('&','&','&'), '&', $form) ;\n if (!is_null($confirm))\n $confirm = str_replace(array('&','&','&'), '&', $confirm) ;\n \n // If we arrive here as a result of a POST then the Google Form was\n // submitted (either completely or partially) so we need to act on\n // the posted data appropriately. The user \"submitting\" the form\n // doesn't actually do anything - it just tells us that the form was\n // submitted and now the plugin needs to \"really\" submit it to Google,\n // get the response, and display it as part of the WordPress content.\n\n if (!empty($_POST))\n {\n $posted = true ;\n $action = $_POST['gform-action'] ;\n unset($_POST['gform-action']) ;\n\n $body = '' ;\n\n // The name of the form fields are munged, they need\n // to be restored before the parameters can be posted\n\n $patterns = array('/^entry_([0-9]+)_(single|group)_/', '/^entry_([0-9]+)_/') ;\n $replacements = array('entry.\\1.\\2.', 'entry.\\1.') ;\n\n foreach ($_POST as $key => $value)\n {\n // Need to handle parameters passed as array values\n // separately because of how Python (used Google)\n // handles array arguments differently than PHP does.\n\n if (is_array($_POST[$key]))\n {\n $pa = &$_POST[$key] ;\n foreach ($pa as $pv)\n $body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($pv) . '&' ;\n }\n else\n {\n $body .= preg_replace($patterns, $replacements, $key) . '=' . rawurlencode($value) . '&' ;\n }\n }\n // Remove the action from the form and POST it\n\n //$form = str_replace($action, 'action=\"' . get_permalink(get_the_ID()) . '\"', $form) ;\n $form = str_replace($action, 'action=\"\"', $form) ;\n\n $response = wp_remote_post($action,\n array('sslverify' => false, 'body' => $body)) ;\n }\n else\n {\n $posted = false ;\n $response = wp_remote_get($form, array('sslverify' => false)) ;\n }\n\n // Retrieve the HTML from the URL\n\n if (is_wp_error($response))\n return '<div class=\"gform-google-error\">Unable to retrieve Google Form. Please try reloading this page.</div>' ;\n else\n $html = $response['body'] ;\n\n // Need to filter the HTML retrieved from the form and strip off the stuff\n // we don't want. This gets rid of the HTML wrapper from the Google page.\n\n $allowed_tags = array(\n 'a' => array('href' => array(), 'title' => array(), 'target' => array())\n ,'b' => array()\n ,'abbr' => array('title' => array()),'acronym' => array('title' => array())\n ,'code' => array()\n ,'pre' => array()\n ,'em' => array()\n ,'strong' => array()\n ,'ul' => array()\n ,'ol' => array()\n ,'li' => array()\n ,'p' => array()\n ,'br' => array()\n ,'div' => array('class' => array())\n ,'h1' => array('class' => array())\n ,'h2' => array('class' => array())\n ,'h3' => array('class' => array())\n ,'h4' => array('class' => array())\n ,'h5' => array('class' => array())\n ,'h6' => array('class' => array())\n ,'i' => array()\n ,'label' => array('class' => array(), 'for' => array())\n ,'input' => array('id' => array(), 'name' => array(), 'class' => array(), 'type' => array(), 'value' => array(), 'checked' => array())\n ,'select' => array('name' => array(), 'for' => array(), 'checked' => array())\n ,'option' => array('value' => array(), 'selected' => array())\n ,'form' => array('id' => array(), 'class' => array(), 'action' => array(), 'method' => array(), 'target' => array(), 'onsubmit' => array())\n ,'script' => array('type' => array())\n ,'style' => array()\n ,'table' => array()\n ,'tbody' => array()\n ,'textarea' => array('id' => array(), 'name' => array(), 'class' => array(), 'type' => array(), 'value' => array(), 'rows' => array(), 'cols' => array())\n ,'thead' => array()\n ,'tr' => array('class' => array())\n ,'td' => array('class' => array(), 'style' => array())\n ) ;\n\n // Process the HTML\n\n $html = wp_kses($html, $allowed_tags) ;\n\n // Did we end up with anything prior to the first DIV? If so, remove it as\n // it should have been removed by wp_kses() but sometimes stuff slips through!\n\n $first_div = strpos($html, '<div') ;\n\n // If there are no DIVs, then we have garbage and should stop now!\n\n if ($first_div === false)\n {\n return '<div class=\"gform-google-error\">Unexpected content encountered, unable to retrieve Google Form.</div>' ;\n }\n\n // Strip off anything prior to the first DIV, we don't want it.\n\n if ($first_div !== 0)\n $html = substr($html, $first_div) ;\n\n // The Google Forms have some Javascript embedded in them which needs to be\n // stripped out. I am not sure why it is in there, it doesn't appear to do\n // much of anything useful.\n\n $html = preg_replace('#<script[^>]*>.*?</script>#is',\n '<!-- Google Forms unnessary Javascript removed -->' . PHP_EOL, $html) ;\n\n // Allow H1 tags through if user wants them (which is the default)\n\n if (!$title)\n $html = preg_replace('#<h1[^>]*>.*?</h1>#is', '', $html) ;\n\n // Map H1 tags to H2 tags?\n\n if ($maph1h2)\n {\n $html = preg_replace('/<h1/i', '<h2', $html) ;\n $html = preg_replace('/h1>/i', 'h2>', $html) ;\n }\n\n // Augment class names with some sort of a prefix?\n\n if (!is_null($prefix))\n $html = preg_replace('/ class=\"/i', \" class=\\\"{$prefix}\", $html) ;\n\n // Augment labels with some sort of a suffix?\n\n if (!is_null($suffix))\n $html = preg_replace('/<\\/label>/i', \"{$suffix}</label>\", $html) ;\n\n // Insert breaks between labels and input fields?\n\n if ($br)\n $html = preg_replace('/<\\/label>[\\w\\n]*<input/i', '</label><br/><input', $html) ;\n\n // Hide Google Legal Stuff?\n\n if (!(bool)$legal)\n {\n $html = preg_replace(sprintf('/<div class=\"%sss-legal\"/i', $prefix),\n sprintf('<div class=\"%sss-legal\" style=\"display:none;\"', $prefix), $html) ;\n }\n\n // Need to extract form action and rebuild form tag, and add hidden field\n // which contains the original action. This action is used to submit the\n // form via wp_remote_post().\n\n if (preg_match_all('/(action(\\\\s*)=(\\\\s*)([\\\"\\'])?(?(1)(.*?)\\\\2|([^\\s\\>]+)))/', $html, $matches)) \n { \n for ($i=0; $i< count($matches[0]); $i++)\n {\n $action = $matches[0][$i] ;\n }\n\n $html = str_replace($action, 'action=\"' . get_permalink(get_the_ID()) . '\"', $html) ;\n //$html = str_replace($action, 'action=\"\"', $html) ;\n $action = preg_replace('/^action/i', 'value', $action) ;\n\n $html = preg_replace('/<\\/form>/i',\n \"<input type=\\\"hidden\\\" {$action} name=\\\"gform-action\\\"></form>\", $html) ;\n } \n else \n {\n $action = null ;\n }\n \n // Output custom CSS?\n \n $wpgform_options = wpgform_get_plugin_options() ;\n\n if (($wpgform_options['custom_css'] == 1) && !empty($wpgform_options['custom_css_styles']))\n $css = '<style>' . $wpgform_options['custom_css_styles'] . '</style>' ;\n else\n $css = '' ;\n\n // Tidy up Javascript to ensure it isn't affected by 'the_content' filters\n $patterns = array('/[\\r\\n]+/', '/ +/') ;\n $replacements = array('', ' ') ;\n $css = preg_replace($patterns, $replacements, $css) . PHP_EOL ;\n //$css = preg_replace('/[\\r\\n]+/', '', $css) . PHP_EOL ;\n\n\n // Output Javscript for form validation, make sure any class prefix is included\n // Need to fix the name arguments for checkboxes so PHP will pass them as an array correctly.\n // This jQuery script reformats the checkboxes so that Googles Python script will read them.\n\n $js = sprintf('\n<script type=\"text/javascript\">\njQuery(document).ready(function($) {\n $(\"div.%sss-form-container input:checkbox\").each(function(index) {\n this.name = this.name + \\'[]\\';\n });\n', $prefix) ;\n // Before closing the <script> tag, is the form read only?\n if ($readonly) $js .= sprintf('\n $(\"div.%sss-form-container :input\").attr(\"disabled\", true);\n ', $prefix) ;\n\n // Before closing the <script> tag, is this the confirmation\n // AND do we have a custom confirmation page or alert message?\n\n if ($posted && is_null($action) && !is_null($alert))\n $js .= PHP_EOL . 'alert(\"' . $alert . '\") ;' ;\n\n // Load the confirmation URL via AJAX?\n if ($posted && is_null($action) && !is_null($confirm) && $style === WPGFORM_CONFIRM_AJAX)\n $js .= PHP_EOL . '$(\"body\").load(\"' . $confirm . '\") ;' ;\n\n // Load the confirmation URL via Redirect?\n if ($posted && is_null($action) && !is_null($confirm) && $style === WPGFORM_CONFIRM_REDIRECT)\n //printf('<h2>%s::%s</h2>', basename(__FILE__), __LINE__) ;\n $js .= PHP_EOL . 'window.location.replace(\"' . $confirm . '\") ;' ;\n\n $js .= '\n});\n</script>\n ' ;\n\n // Tidy up Javascript to ensure it isn't affected by 'the_content' filters\n //$js = preg_replace('/[\\r\\n]+/', '', $js) . PHP_EOL ;\n $js = preg_replace($patterns, $replacements, $js) . PHP_EOL ;\n\n // Send email?\n if ($posted && is_null($action) && $email)\n {\n wpGForm::SendConfirmationEmail($wpgform_options['email_format'], $sendto) ;\n }\n\n // Check browser compatibility? The jQuery used by this plugin may\n // not work correctly on old browsers or IE running in compatibility mode.\n\n if ($wpgform_options['browser_check'] == 1)\n {\n require_once(ABSPATH . '/wp-admin/includes/dashboard.php') ;\n \n // Let's check the browser version just in case ...\n\n \t $response = wp_check_browser_version();\n\n if ($response && $response['upgrade'])\n {\n\t\t if ($response['insecure'])\n $css .= '<div class=\"gform-browser-warning\"><h4>' .\n __('Warning: You are using an insecure browser!') . '</h4></div>' ;\n\t\t else\n $css .= '<div class=\"gform-browser-warning\"><h4>' .\n __('Warning: Your browser is out of date! Please update now.') . '</h4></div>' ;\n\t }\n }\n\n return $js . $css . $html ;\n }",
"public static function input_submit($id, $opts=array()){\n self::input_generic('submit', $id, $opts);\n }",
"public function open($options = [])\n {\n $attributes = [];\n\n if ($this->isMode(static::MODE_EDIT)) {\n $this->addHiddenField((new Hidden('_method'))->value('PUT'));\n }\n\n $this->addRedirectUrlField();\n\n $attributes['id'] = $this->getElementId();\n $attributes['action'] = $this->action();\n $attributes['method'] = Arr::get($options, 'method', 'post');\n $attributes['accept-charset'] = 'UTF-8';\n $attributes['data-toggle'] = 'validator';\n $attributes['class'] = Arr::get($options, 'class');\n\n if ($this->hasFile()) {\n $attributes['enctype'] = 'multipart/form-data';\n }\n\n $html = [];\n foreach ($attributes as $name => $value) {\n $html[] = \"$name=\\\"$value\\\"\";\n }\n\n return '<form '.implode(' ', $html).' '.Admin::getPjaxContainerId().'>';\n }",
"function grid_submit_confirm_new() {\r\n /* echoed before enterim form, inside <script>, define form_submit_confirm javascript function behaviour in your code\r\n */\r\n return <<<__END__\r\n function submit_confirm(myform) {\r\n //action = myform.elements['act'].value;\r\n //myform.submit();\r\n }\r\n__END__;\r\n }",
"public function button_form($title, $url, $options = array(), $confirm = false) {\n\t\t$options = $this->button_options($options);\n\t\treturn $this->Form->postLink($title, $url, $options, $confirm);\n\t}",
"public function _getGlobalSubmitScriptCode($partial = false)\n {\n // global submit script can only be registered in the original request\n if ($partial) {\n return '';\n }\n\n $res = \"if (!window.ATK) {var ATK = {};}\\n\";\n $res .= \"ATK.globalSubmit = function(form, standardSubmit)\\n\";\n $res .= \" {\\n\";\n $res .= \" var retval = true; var bag = {};\\n\";\n $res .= \" if (typeof(ATK.FormSubmit.preGlobalSubmit) == 'function') { ATK.FormSubmit.preGlobalSubmit(form, bag, standardSubmit);}\\n\";\n\n for ($i = 0, $_i = Tools::count($this->m_submitscripts); $i < $_i; ++$i) {\n $res .= ' retval = ' . $this->m_submitscripts[$i] . \"\\n\";\n $res .= \" if (retval != true) {\\n\";\n $res .= \" if (typeof(ATK.FormSubmit.postGlobalSubmit) == 'function') {\\n\";\n $res .= \" return ATK.FormSubmit.postGlobalSubmit(form, bag, retval, standardSubmit);\\n\";\n $res .= \" }\\n\";\n $res .= \" return false;\\n\";\n $res .= \" }\\n\";\n }\n\n $res .= \" if (typeof(ATK.FormSubmit.postGlobalSubmit) == 'function') { return ATK.FormSubmit.postGlobalSubmit(form, bag, retval, standardSubmit);}\\n\";\n $res .= \" return retval;\\n\";\n $res .= \" }\\n\";\n\n return $res;\n }",
"public function postLink($title, $url = null, array $options = [])\n {\n $options += ['block' => null, 'confirm' => null];\n\n $requestMethod = 'POST';\n if (!empty($options['method'])) {\n $requestMethod = strtoupper($options['method']);\n unset($options['method']);\n }\n\n $formName = str_replace('.', '', uniqid('post_', true));\n $formOptions = [\n 'name' => $formName,\n 'style' => 'display:none;',\n 'method' => 'post',\n ];\n if (isset($options['target'])) {\n $formOptions['target'] = $options['target'];\n unset($options['target']);\n }\n $templater = $this->templater();\n\n $restoreAction = $this->_lastAction;\n $this->_lastAction($url);\n\n $action = $templater->formatAttributes([\n 'action' => $this->Url->build($url),\n 'escape' => false\n ]);\n\n $out = $this->formatTemplate('formStart', [\n 'attrs' => $templater->formatAttributes($formOptions) . $action\n ]);\n $out .= $this->hidden('_method', [\n 'value' => $requestMethod,\n 'secure' => static::SECURE_SKIP\n ]);\n $out .= $this->_csrfField();\n\n $fields = [];\n if (isset($options['data']) && is_array($options['data'])) {\n foreach (Hash::flatten($options['data']) as $key => $value) {\n $fields[$key] = $value;\n $out .= $this->hidden($key, ['value' => $value, 'secure' => static::SECURE_SKIP]);\n }\n unset($options['data']);\n }\n $out .= $this->secure($fields);\n $out .= $this->formatTemplate('formEnd', []);\n $this->_lastAction = $restoreAction;\n\n if ($options['block']) {\n if ($options['block'] === true) {\n $options['block'] = __FUNCTION__;\n }\n $this->_View->append($options['block'], $out);\n $out = '';\n }\n unset($options['block']);\n\n $options['data-toggle'] = 'modal';\n $options['data-target'] = '#modal';\n $options['data-form-name'] = $formName;\n $options['role'] = 'button';\n $options['type'] = 'button';\n\n if (!isset($options['data-name'])) {\n $options['data-name'] = '';\n }\n\n $url = '/#';\n\n $out .= $this->Html->link($title, $url, $options);\n\n return $out;\n }",
"public function postButton(string $title, array|string $url, array $options = []): string\n {\n $formOptions = ['url' => $url];\n if (isset($options['method'])) {\n $formOptions['type'] = $options['method'];\n unset($options['method']);\n }\n if (isset($options['form']) && is_array($options['form'])) {\n $formOptions = $options['form'] + $formOptions;\n unset($options['form']);\n }\n $out = $this->create(null, $formOptions);\n if (isset($options['data']) && is_array($options['data'])) {\n foreach (Hash::flatten($options['data']) as $key => $value) {\n $out .= $this->hidden($key, ['value' => $value]);\n }\n unset($options['data']);\n }\n $out .= $this->button($title, $options);\n $out .= $this->end();\n\n return $out;\n }",
"function render_submit(array $attributes = array()) {\n return (new Submit($attributes))\n ->render();\n}",
"protected function addSubmitButtonField()\n {\n $this->addSubmitButtonElement(array('name' => 'submit'));\n }",
"public function add_js( $options ){\n\t\t$options[\"type\"] = \"js\";\n\t\t\n\t\t// Clear this up\n\t\tif( !isset($options[\"file\"]) && isset($options[\"name\"]) && !isset($options[\"plugin\"]) ){\n\t\t\t\n\t\t\t$plugin = debug_backtrace(false);\n\t\t\t$options[\"plugin\"] = $plugin[1][\"class\"];\n\t\t\t\n\t\t// if\n\t\t}\n\t\n\t\t// Add the file type\n\t\treturn $this->add($options);\n\t\n\t// method\n\t}",
"public function ajax_submit()\n\t{\n\t\t// check nonce, die if invalid.\n\t\tcheck_ajax_referer('_mc4wp_form_nonce', '_mc4wp_form_nonce');\n\n\t\t// unset AJAX $_POST action\n\t\tif( isset( $_POST['action'] ) ) {\n\t\t\tunset( $_POST['action'] );\n\t\t}\n\n\t\t$success = $this->subscribe();\n\t\t$response = array();\n\t\t$response['success'] = $success;\n\t\t\n\t\tif( true === $success ) {\n\t\t\t$form_ID = $_POST['_mc4wp_form_ID'];\n\t\t\t$settings = mc4wp_get_form_settings($form_ID, true);\n\t\t\t$response['redirect'] = (empty($settings['redirect'])) ? false : $settings['redirect'];\n\t\t\t$response['hide_form'] = ($settings['hide_after_success'] == 1);\n\t\t} else {\n\t\t\t$response['error'] = $this->error;\n\t\t\t$response['mailchimp_error'] = $this->mailchimp_error;\n\t\t\t$response['show_error'] = current_user_can('manage_options');\n\t\t}\n\n\t\t// clear output, some plugins might have thrown errors by now.\n\t\tif( ob_get_level() > 0 ) {\n\t\t\tob_end_clean();\n\t\t}\n\n\t\theader( \"Content-Type: application/json\" );\n\t\techo json_encode($response);\n\t\texit;\n\t}",
"public function submit(string $url, RequestParameters $params): string;",
"public static function submit($name, $value = null, array $attributes = array()) {\n return self::input($name, $value, $attributes, 'submit');\n }"
] | [
"0.58683574",
"0.56476223",
"0.5592347",
"0.5379558",
"0.5316831",
"0.5314411",
"0.5270559",
"0.5258222",
"0.5226078",
"0.5188725",
"0.5188725",
"0.51795375",
"0.5175018",
"0.51714945",
"0.51291513",
"0.50378126",
"0.5015606",
"0.50017494",
"0.49900988",
"0.4959958",
"0.49580714",
"0.49270922",
"0.48886332",
"0.48857164",
"0.4874667",
"0.48691702",
"0.48648486",
"0.48447338",
"0.484028",
"0.48361042"
] | 0.65150523 | 0 |
Takes the array of options from $this>button or $this>button_link and returns the modified array with the bootstrap classes | public function button_options($options) {
$valid_styles = array("danger", "info", "primary", "success");
$valid_sizes = array("small", "large");
$style = isset($options["style"]) ? $options["style"] : "";
$size = isset($options["size"]) ? $options["size"] : "";
$disabled = isset($options["disabled"]) ? (bool)$options["disabled"] : false;
$class = "btn";
if (!empty($style) && in_array($style, $valid_styles)) { $class .= " {$style}"; }
if (!empty($size) && in_array($size, $valid_sizes)) { $class .= " {$size}"; }
if ($disabled) { $class .= " disabled"; }
unset($options["style"]);
unset($options["size"]);
unset($options["disabled"]);
$options["class"] = isset($options["class"]) ? $options["class"] . " " . $class : $class;
return $options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bootstrap4_content_options($options) {\n\t return array_merge($options, array(\n\t\t'img_class' => 'img-fluid',\n\t\t'align_center_class' => 'mx-auto',\n\t\t'edit_post_link_class' => 'btn btn-secondary'\n\t ));\n\t}",
"public function getClassOptions() {\n static $classes;\n\n if (!isset($classes)) {\n $utility = [];\n $col = [];\n $hidden = [];\n $visible = [];\n $bg = [];\n $text_color = [];\n $text_alignment = [\n 'text-left' => $this->t('Left'),\n 'text-right' => $this->t('Right'),\n 'text-center' => $this->t('Center'),\n 'text-justify' => $this->t('Justify'),\n 'text-nowrap' => $this->t('No Wrap'),\n ];\n $text_transformation = [\n 'text-lowercase' => $this->t('Lowercase'),\n 'text-uppercase' => $this->t('Uppercase'),\n 'text-capitalize' => $this->t('Capitalize'),\n ];\n\n // Utility.\n $utility['clearfix'] = $this->t('Clear Fix');\n $utility['row'] = $this->t('Row');\n\n $sizes = [\n 'xs' => $this->t('Extra Small'),\n 'sm' => $this->t('Small'),\n 'md' => $this->t('Medium'),\n 'lg' => $this->t('Large'),\n ];\n\n foreach ($sizes as $size => $size_label) {\n $hidden[\"hidden-$size\"] = $size_label;\n $visible[\"visible-$size\"] = $size_label;\n foreach (range(1, 12) as $column) {\n $col[\"col-$size-$column\"] = $this->t('@size: @column', [\n '@size' => $size_label,\n '@column' => $column,\n ]);\n }\n }\n\n // Background/text color classes.\n foreach (['primary', 'danger', 'info', 'warning', 'success'] as $type) {\n $bg[\"bg-$type\"] = $this->t('@type', ['@type' => Unicode::ucfirst($type)]);\n $text_color[\"text-$type\"] = $this->t('@type', ['@type' => Unicode::ucfirst($type)]);\n }\n $text_color['text-muted'] = $this->t('Muted');\n\n // Groups.\n $groups = [\n 'utility' => $this->t('Utility'),\n 'columns' => $this->t('Columns'),\n 'hidden' => $this->t('Hidden'),\n 'visible' => $this->t('Visible'),\n 'background' => $this->t('Background'),\n 'text_alignment' => $this->t('Text alignment'),\n 'text_color' => $this->t('Text color'),\n 'text_transformation' => $this->t('Text transformation'),\n ];\n\n // Classes, keyed by group.\n $classes = [\n 'utility' => $utility,\n 'columns' => $col,\n 'hidden' => $hidden,\n 'visible' => $visible,\n 'background' => $bg,\n 'text_alignment' => $text_alignment,\n 'text_color' => $text_color,\n 'text_transformation' => $text_transformation,\n ];\n\n // Invokes hook_bootstrap_layouts_class_options_alter().\n $this->moduleHandler->alter('bootstrap_layouts_class_options', $classes, $groups);\n $this->themeManager->alter('bootstrap_layouts_class_options', $classes, $groups);\n\n // Render the group labels and use them for optgroup values.\n $grouped = [];\n foreach ($classes as $group => $data) {\n $group = (string) (isset($groups[$group]) ? $groups[$group] : $group);\n $grouped[$group] = $data;\n }\n $classes = $grouped;\n }\n\n return $classes;\n }",
"private function contextualClasses($options, $tagName = null){\n if (!empty($options['text']))\n {\n $options = $this->addClass($options, 'text-' . $options['text']);\n unset($options['text']);\n }\n \n if (!empty($options['bg']))\n {\n $options = $this->addClass($options, 'bg-' . $options['bg']);\n unset($options['bg']);\n }\n \n if (!empty($options['active']))\n {\n $options = $this->addClass($options, 'active');\n unset($options['active']);\n }\n\n if ($this->hasClass($options, 'btn-group')){\n if (isset($options['sized'])){\n $options = $this->addClass($options, 'btn-group-' . $options['sized']);\n unset($options['sized']);\n }\n }\n \n if (isset($options['right'])){\n if ($options['right'])\n $options = $this->addClass($options, 'pull-right');\n unset($options['right']);\n }\n\n if ($this->hasClass($options, 'btn-group-vertical')){\n if (isset($options['sized'])){\n $options = $this->addClass($options, 'btn-group-' . $options['sized']);\n unset($options['sized']);\n }\n }\n \n if ($this->hasClass($options, 'panel')){\n if (!empty($options['styled']))\n {\n $options = $this->addClass($options, 'panel-' . $options['styled']);\n unset($options['styled']);\n } \n }\n \n if ($tagName == 'span' && $this->hasClass($options, 'label')){\n if (isset($options['styled']))\n {\n $options = $this->addClass($options, 'label-' . $options['styled']);\n unset($options['styled']);\n }\n }\n \n if ($this->hasClass($options, 'alert')){\n if (isset($options['styled']))\n {\n $options = $this->addClass($options, 'alert-' . $options['styled']);\n unset($options['styled']);\n }\n }\n \n if ($tagName == 'span' && $this->hasClass($options, 'badge')){\n if (isset($options['styled']))\n {\n $options = $this->addClass($options, 'badge-' . $options['styled']);\n unset($options['styled']);\n }\n }\n \n if ($tagName == 'a'){\n if (empty($options['href']))\n $options['href'] = '#';\n }\n \n if ($tagName == 'p'){\n if (!empty($options['lead'])){\n $options = $this->addClass($options, 'lead');\n unset($options['lead']);\n }\n }\n \n if ($tagName == 'i'){\n if ($this->hasClass($options, 'fa')){\n if (isset($options['styled'])){\n $options = $this->addClass($options, 'text-' . $options['styled']);\n unset($options['styled']);\n }\n }\n }\n \n if ($this->hasClass($options, 'pagination')){\n if (isset($options['sized']))\n {\n $options = $this->addClass($options, 'pagination-' . $options['sized']);\n unset($options['sized']);\n // debug($options);\n }\n\n }\n \n if ($this->hasClass($options, 'btn')){\n if (isset($options['sized']))\n {\n $options = $this->addClass($options, 'btn-' . $options['sized']);\n unset($options['sized']);\n // debug($options);\n }\n \n if (isset($options['styled']))\n {\n $options = $this->addClass($options, 'btn-' . $options['styled']);\n unset($options['styled']);\n }\n }\n \n return $options;\n }",
"function post_link_attributes_bootsbutton() {\n\treturn 'class=\"btn btn-primary\"';\n}",
"function bootstrap4_gallery_options($options) {\n\t return array_merge($options, array(\n\t\t'gallery_thumbnail_class' => '',\n\t\t'gallery_thumbnail_img_class' => 'img-thumbnail mb-2',\n\t\t'close_button_class' => 'btn btn-secondary',\n\t\t'carousel_item_class' => 'carousel-item'\n\t ));\n\t}",
"function bootstrap4_widgets_options($options) {\n\t\treturn array_merge( $options, array(\n\t\t\t'widget_class' => 'card',\n\t\t\t'widget_modifier_class' => '',\n\t\t\t'widget_header_class' => 'card-header',\n\t\t\t'widget_content_class' => 'card-block'\n\t\t) );\n\t}",
"public function button_footer_attr() {\n\t\t\t\treturn [\n\t\t\t\t\t'class' => 'fusion-button button-default button-medium button default medium',\n\t\t\t\t\t'data-dismiss' => 'modal',\n\t\t\t\t];\n\t\t\t}",
"public function allOptions()\n\t{\n\t\t$class = $this->option('class');\n\n\t\treturn !empty($class) ? $this->options + ['class' => $class] : $this->options;\n\t}",
"public function button_attr() {\n\t\t\t\treturn [\n\t\t\t\t\t'class' => 'close',\n\t\t\t\t\t'type' => 'button',\n\t\t\t\t\t'data-dismiss' => 'modal',\n\t\t\t\t\t'aria-hidden' => 'true',\n\t\t\t\t];\n\t\t\t}",
"public function outputButtonStyleOptions()\n {\n ?>\n <script>\n window.tinyMCEButtonStyleOptions = JSON.parse(js_data);\n </script>\n <?php\n }",
"public static function getButtonColorArray()\n {\n $ret = [\n 'press-red' => 'Red',\n 'press-pink' => 'Pink',\n 'press-purple' => 'Purple',\n 'press-deeppurple' => 'Deep purple',\n 'press-indigo' => 'Indigo',\n 'press-blue' => 'Blue',\n 'press-lightblue' => 'Light blue',\n 'press-cyan' => 'Cyan',\n 'press-teal' => 'Teal',\n 'press-green' => 'Green',\n 'press-lightgreen' => 'Light green',\n 'press-lime' => 'Lime',\n 'press-yellow' => 'Yellow',\n 'press-amber' => 'Amber',\n 'press-orange' => 'Orange',\n 'press-deeporange' => 'Deeporange',\n 'press-brown' => 'Brown',\n 'press-grey' => 'Grey',\n 'press-bluegrey' => 'Blue grey',\n 'press-black' => 'Black',\n ];\n\n return $ret;\n }",
"function cunifybuilder_AdminCustomButtonArray() {\n return array(\n \"Button 1 Display Value\" => \"buttonOneFunction\",\n \"Button 2 Display Value\" => \"buttonTwoFunction\",\n );\n}",
"function posts_link_attributes() {\n return 'class=\"btn btn-primary\"';\n}",
"public function toArray(): array\n {\n return array_merge(\n [\n 'text' => $this->label,\n \"style\" => $this->style,\n \"type\"=> \"button\",\n \"name\"=> $this->label ?? 'Default Name',\n \"value\"=> $this->activator ?? $this->label ?? 'default'],\n is_null($this->buttonConfirm) ? [] : $this->buttonConfirm->toArray()\n );\n }",
"function posts_link_attributes_1() {\n\t return 'class=\"btn btn-outline-primary\"';\n\t}",
"public function toOptionArray()\n {\n return array(\n array(\n 'value' => self::TYPE_BUTTON,\n 'label' => Mage::helper('awajaxcatalog')->__('Show more button')\n ), \n array(\n 'value' => self::TYPE_SCROLL,\n 'label' => Mage::helper('awajaxcatalog')->__('Auto-appearing on scrolling')\n ), \n );\n }",
"function actionButtons($options = array())\n {\n $default_options = [\n 'buttons_group' => 'list',\n 'model_id' => null,\n 'paginate_infos' => false,\n 'paginate_infos_format' => '<div>' . ___d('alaxos', 'elements') . ': {{start}} - {{end}} / {{count}}</div><div>' . ___d('alaxos', 'page') . ': {{page}} on {{pages}}</div>',\n\n 'select_pagination_limit' => false,\n 'pagination_limits' => [10, 20, 50, 100],\n 'pagination_limits_text' => 'show {0} elements per page',\n\n /*\n * Groups of buttons to show\n */\n 'buttons_list' => [['add']],\n 'buttons_add' => [['back_to_list']],\n 'buttons_view' => [['list', 'add'], ['edit', 'copy', 'delete']],\n 'buttons_edit' => [['list'], ['back_to_view']],\n 'buttons_copy' => [['list', 'back_to_view']],\n\n /*\n * Buttons properties\n */\n 'btn_list' => ['visible' => true, 'link' => ['action' => 'index']],\n 'btn_add' => ['visible' => true, 'link' => ['action' => 'add']],\n 'btn_view' => ['visible' => true, 'link' => ['action' => 'view']],\n 'btn_edit' => ['visible' => true, 'link' => ['action' => 'edit']],\n 'btn_copy' => ['visible' => true, 'link' => ['action' => 'copy']],\n 'btn_delete' => ['visible' => true, 'link' => ['action' => 'delete']],\n 'btn_back_to_view' => ['visible' => true, 'link' => ['action' => 'view']],\n 'btn_back_to_list' => ['visible' => true, 'link' => ['action' => 'index']],\n ];\n\n $options = array_merge($default_options, $options);\n\n $html = [];\n\n $html[] = '<div class=\"row\">';\n\n /*\n * Buttons groups\n */\n $html[] = $this->getButtonsGroups($options);\n\n /*\n * Pagination infos\n */\n if($options['paginate_infos'])\n {\n $html[] = $this->get_paginate_infos($options);\n }\n\n $html[] = '</div>';\n\n /*\n * Combobox allowing to select pagination limit\n */\n if($options['select_pagination_limit'])\n {\n $html[] = $this->get_pagination_limit_combobox($options);\n }\n\n return implode(\"\\n\", $html);\n }",
"public function buttons_classes( $button, $classes )\n {\n $classes[] = 'btn btn-primary';\n \n return $classes;\n }",
"function clemo_theme_button_class($style) {\n if ($style == 'default') {\n echo 'btn btn-default';\n } elseif ($style == 'primary') {\n echo 'btn';\n } else {\n echo 'default';\n }\n }",
"function oneportal_ClientAreaCustomButtonArray() {\n $buttonarray = array(\n\t \"Reboot Server\" => \"reboot\",\n\t \"Turn Off Server\" => \"turnoff\",\n\t \"Turn On Server\" => \"turnon\",\n\t \"Save rDNS\" => \"saverdns\"\n\t);\n\treturn $buttonarray;\n}",
"function shortcode_button_cmb_config( $button_data ) {\n\n return array(\n 'id' => 'shortcode_'. $button_data['slug'],\n 'fields' => array(\n array(\n 'name' => __( 'Div Shortcode', 'shortcode-button' ),\n 'desc' => __( 'Choose a width for the block element. Widths are based on a 12 column grid.', 'shortcode-button' ),\n 'default' => __( 'col-sm-6', 'shortcode-button' ),\n 'id' => 'class',\n 'type' => 'select',\n 'options' => array(\n 'col-sm-12' => __( 'Full width', 'shortcode-button' ),\n 'col-sm-9' => __( '3/4 width', 'shortcode-button' ),\n 'col-sm-8' => __( '2/3 width', 'shortcode-button' ),\n 'col-sm-6' => __( '1/2 width', 'shortcode-button' ),\n 'col-sm-4' => __( '1/3 width', 'shortcode-button' ),\n 'col-sm-3' => __( '1/4 width', 'shortcode-button' ),\n ),\n ),\n ),\n );\n}",
"function my_option_page_data_init_buttons( array $elements )\n{\n\t/**\n\t * e.g. add 2 custom buttons:\n\t * \n\t * Button 1: add filters with php\n\t * Button 2: add filters directly here\n\t */\n\t$button = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'slug'\t=> 'upload',\n\t\t\t\t\t\t'name' \t=> __( 'Custom Reset Options 1 - add your title', 'avia_framework' ),\n\t\t\t\t\t\t'desc' \t=> __( 'Click the button to reset selected options to theme default values - add your description', 'avia_framework' ),\n\t\t\t\t\t\t'id' \t=> 'reset_selected_button_my_custom_button_1',\n\t\t\t\t\t\t'type' \t=> 'reset_selected_button',\n\t\t\t\t\t),\n\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'slug'\t=> 'upload',\n\t\t\t\t\t\t'name' \t=> __( 'Custom Reset Options 2 skip Quick CSS - add your title', 'avia_framework' ),\n\t\t\t\t\t\t'desc' \t=> __( 'Click the button to reset selected options to theme default values - keep your Quick CSS - add your description', 'avia_framework' ),\n\t\t\t\t\t\t'id' \t=> 'reset_selected_button_my_custom_button_2',\n\t\t\t\t\t\t'type' \t=> 'reset_selected_button',\n\t\t\t\t\t\t'skip_values'\t=> 'avia:quick_css',\n\t\t\t\t\t\t'filter_tabs'\t=> 'avia:cookie'\n\t\t\t\t\t),\n\t\t\n\t\t);\n\t\n\t$index = false;\n\t$index_fallback = false;\n\t\n\t/**\n\t * Find index where to insert button\n\t */\n\tforeach( $elements as $key => $element ) \n\t{\n\t\tif( isset( $element['slug'] ) && 'upload' == $element['slug'] )\n\t\t{\n\t\t\tif( ! $index_fallback )\n\t\t\t{\n\t\t\t\t$index_fallback = $key;\n\t\t\t}\n\t\t\t\n\t\t\tif( isset( $element['id'] ) && 'config_file_upload' == $element['id'] )\n\t\t\t{\n\t\t\t\t$index = $key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif( false === $index && false === $index_fallback )\n\t{\n\t\t//\tThis might break output !!!\n\t\t$elements[] = $button;\n\t\treturn $elements;\n\t}\n\t\n\t$index = false !== $index ? $index : $index_fallback;\n\t\n\t$elements = array_merge( array_slice( $elements, 0, $index + 1 ), $button, array_slice( $elements, $index + 1 ) );\n\t\n\treturn $elements;\n}",
"public function get_html_button_styles(){\n $return = '';\n $return .= '<h4>' . __( 'Button styles', 'masterpopups' ) . '</h4><div class=\"xbox-field-description ampp-padding-bottom-10\">' . __( 'Click on any button to choose styles. Any previously defined style will be replaced.', 'masterpopups' ) . '</div>';\n $return .= \"\n\t\t\t<a class='mpp-btn mpp-btn-green' data-bg-color='#05B489'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-blue' data-bg-color='#2287E1'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-dark' data-bg-color='#464D57'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-red' data-bg-color='#E56464'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-yellow' data-bg-color='#F5CA2D'>Download</a>\n\t\t\t\";\n\n $return .= \"\n\t\t\t<a class='mpp-btn mpp-btn-green mpp-btn-shadow' data-bg-color='#05B489'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-blue mpp-btn-shadow' data-bg-color='#2287E1'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-dark mpp-btn-shadow' data-bg-color='#464D57'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-red mpp-btn-shadow' data-bg-color='#E56464'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-yellow mpp-btn-shadow' data-bg-color='#F5CA2D'>Download</a>\n\t\t\t\";\n\n $return .= \"\n\t\t\t<a class='mpp-btn mpp-btn-outline' data-bg-color='rgba(255,255,255,0.0)'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-outline mpp-btn-radius' data-bg-color='rgba(255,255,255,0.0)'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-outline mpp-btn-rounded' data-bg-color='rgba(255,255,255,0.0)'>Download</a>\n\t\t\t\";\n\n $return .= \"\n\t\t\t<a class='mpp-btn mpp-btn-green mpp-btn-rounded' data-bg-color='#05B489'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-blue mpp-btn-rounded' data-bg-color='#2287E1'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-dark mpp-btn-rounded' data-bg-color='#464D57'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-red mpp-btn-rounded' data-bg-color='#E56464'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-yellow mpp-btn-rounded' data-bg-color='#F5CA2D'>Download</a>\n\t\t\t\";\n\n $return .= \"\n\t\t\t<a class='mpp-btn mpp-btn-green mpp-btn-rounded mpp-btn-shadow' data-bg-color='#05B489'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-blue mpp-btn-rounded mpp-btn-shadow' data-bg-color='#2287E1'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-dark mpp-btn-rounded mpp-btn-shadow' data-bg-color='#464D57'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-red mpp-btn-rounded mpp-btn-shadow' data-bg-color='#E56464'>Download</a>\n\t\t\t<a class='mpp-btn mpp-btn-yellow mpp-btn-rounded mpp-btn-shadow' data-bg-color='#F5CA2D'>Download</a>\n\t\t\t\";\n return $return;\n }",
"function fb_mce_buttons_2($buttons) {\n // UNCOMMENT BELOW TO ENABLE CUSTOM STYLES\n //$buttons = array( 'formatselect', 'styleselect', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' );\n $buttons = array( 'formatselect', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' );\n return $buttons;\n}",
"protected function getFormButtons()\n {\n return array();\n }",
"function theme_tinycme_buttons( $buttons ) {\n\t\tarray_unshift( $buttons, 'styleselect' );\n\t\treturn $buttons;\n\t}",
"function stregistry_AdminCustomButtonArray() \n{\n $buttonarray = array(\n\t\t\"Hold Domain\" => \"HoldDomain\",\n\t\t\"Unhold Domain\" => \"UnHoldDomain\",\n );\n return $buttonarray;\n}",
"function wp_bootstrap_get_comments_options() {\n return apply_filters( 'bootstrap_comments_options', array(\n 'field_class' => 'form-group',\n 'text_input_class' => 'form-control',\n 'submit_class' => 'btn btn-primary',\n 'reply_link_class' => 'btn btn-primary btn-xs',\n 'comment_label' => 'Comment'\n ));\n}",
"public function init() {\n parent::init();\n Html::addCssClass($this->options, 'btn-group');\n }",
"function bf_vc_edit_form_classes( $classes, $atts, $params ) {\n\n\t\t$added_fields = array();\n\t\t$interactive_added = false;\n\t\tforeach ( $params as $param ) {\n\t\t\tif ( ! empty( $param['show_on'] ) ) {\n\t\t\t\tif ( ! $interactive_added ) {\n\t\t\t\t\tarray_push( $classes, 'bf-interactive-fields', 'bf-has-filters' );\n\t\t\t\t\t$interactive_added = true;\n\t\t\t\t}\n\n\t\t\t\tforeach ( (array) $param['show_on'] as $conditions ) {\n\t\t\t\t\tforeach ( (array) $conditions as $condition ) {\n\t\t\t\t\t\t$field_name = explode( '=', $condition, 2 );\n\t\t\t\t\t\t$field_name = $field_name[0];\n\t\t\t\t\t\tif ( ! in_array( $field_name, $added_fields ) ) {\n\t\t\t\t\t\t\tarray_push( $classes, 'bf-filter-field-' . $field_name );\n\t\t\t\t\t\t\t$added_fields[] = $field_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn array_unique( $classes );\n\t}"
] | [
"0.6443343",
"0.6279826",
"0.60773826",
"0.6025523",
"0.59873134",
"0.5980975",
"0.58560985",
"0.58087856",
"0.5781482",
"0.57354516",
"0.57333815",
"0.5726241",
"0.57218826",
"0.57122666",
"0.571099",
"0.5688605",
"0.56704205",
"0.56641865",
"0.5637168",
"0.5570412",
"0.5559253",
"0.5535783",
"0.55142176",
"0.55134463",
"0.54944664",
"0.54937357",
"0.5477123",
"0.54609007",
"0.5419189",
"0.5417331"
] | 0.68600804 | 0 |
Creates a Bootstrap label with $messsage and optionally the $type. Any options that could get passed to HtmlHelper::tag can be passed in the third param. | public function label($message = "", $style = "", $options = array()) {
$class = "label";
$valid = array("success", "important", "warning", "notice");
if (!empty($style) && in_array($style, $valid)) {
$class .= " {$style}";
}
if (isset($options["class"]) && !empty($options["class"])) {
$options["class"] = $class . " " . $options["class"];
} else {
$options["class"] = $class;
}
return $this->Html->tag("span", $message, $options);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function label() \n\t{\n\t\t$classes = array_keys($this->label_classes);\n\n\t\tforeach(array('detail', 'required') as $test)\n\t\t\tif(isset($this->$test) && $this->$test)\n\t\t\t\t$classes[] = $test;\n\n\t\tif($this->required && $this->is_empty())\n\t\t\t$classes[] = 'missing';\n\n\t\t$classes = implode(\" \", $classes);\n\n\t\tif( $classes )\n\t\t\t$classes = new HTMLAttribute('class', $classes);\n\n\t\t$for = '';\n\t\tif( $this->id->value )\n\t\t\t$for = new HTMLAttribute('for', $this->id->value);\n\n\t\treturn sprintf(\"<label%s%s>%s%s</label>\", $classes, $for, $this->label, $this->required ? '<em>*</em>' : '');\n\t}",
"function smarty_block_label($params, $content, &$smarty, &$repeat) {\n $after_text = '';\n if(isset($params['after_text'])) {\n $after_text = $params['after_text'];\n unset($params['after_text']);\n } // if\n \n $is_required = false;\n if(isset($params['required'])) {\n $is_required = (boolean) $params['required'];\n unset($params['required']);\n } // if\n \n $not_lang = (boolean) array_var($params, 'not_lang');\n \n $text = $not_lang ? $content : lang($content);\n \n $render_text = trim($text) . $after_text;\n if($is_required) {\n $render_text = $render_text.'<em>*</em>';\n } // if\n \n return open_html_tag('label', $params) . $render_text . '</label>';\n }",
"function label($data = array()) {\n if (empty($data))\n return false;\n\n if (is_string($data)) {\n $data = array(\n 'text' => Inflector::humanize($data),\n 'for' => Inflector::slug($data)\n );\n } else if (is_array($data)) {\n if (isset($data['text'])) {\n $data['text'] = Inflector::humanize($data['text']);\n if (!isset($data['for']))\n $data['for'] = Inflector::slug($data['text']);\n }\n }\n $data = array_merge(empty($this->_input_default['label']) ? array() : $this->_input_default['label'], $data);\n\n $text = @$data['text'];\n if (isset($data['text']))\n unset($data['text']);\n\n\n $html = array();\n $html[] = '<label';\n foreach ($data as $attribute => $value) {\n $html[] = \"$attribute=\\\"$value\\\"\";\n }\n $html[] = \">$text</label>\";\n return implode(' ', $html);\n }",
"public function createMessage($message, $type){\r\n $texto = '<div class=\"alert alert-'.$type.'\" style=\"display: block;\">\r\n <button class=\"close\" data-close=\"alert\"></button>\r\n '.$message.'\r\n </div>';\r\n return $texto;\r\n }",
"function wp_scgcge_Label($name, $title = '', $text = '')\n{\n $info = ($text != '') ? '<i class=\"fa fa-info-circle fa-1\" title=\"' . $text . '\" data-toggle=\"tooltip\" data-placement=\"top\"></i>' : '';\n return '<label for=\"' . $name . '\">' . $title . ' ' . $info . '</label>';\n}",
"function label($text, $class='', $style='', $extra='', $title_alt='')\n\t{\n\t\t$class = ($class != '' ? ' class=\"' . $class . '\"' : '');\n\t\t$style = ($style != '' ? ' style=\"' . $style . '\"' : '');\n\t\t$title_alt = ($title_alt != '' ? ' alt=\"' . $title_alt . '\" title=\"' . $title_alt . '\"' : '');\n\t\t$extra = ($extra != '' ? ' ' . $extra : '');\n\t\t$this->xecho('<' . $this->label_element . ' ' . $class . $style . $extra . $title_alt . '>' . $text . '</' . $this->label_element . '>');\n\t}",
"function tdLabel($type, $text, $width = '60px')\n{\n return \"<label class='badge badge-$type tdcenter' style='width: $width; line-height: 15px; margin-top: 7px; display: inline-block;'>$text</label>\";\n}",
"public function getLabel() {\n\t\t$text = isset($this->element['label']) ? (string) $this->element['label'] : (string) $this->element['name'];\n\t\t// Build the class for the label.\n\t\t$class = !empty($this->description) ? 'hasTip' : '';\n\t\t$class = $this->required == true ? $class.' required' : $class;\n\t\t$label = '<label id=\"'.$this->id.'-lbl\" for=\"'.$this->id.'\" class=\"'.$class.'\"';\n\t\t// If a description is specified, use it to build a tooltip.\n\t\tif (!empty($this->description)) {\n\t\t\t$label .= ' title=\"'.htmlspecialchars(trim(JText::_($text), ':').'::' .\n\t\t\t\tJText::_($this->description), ENT_COMPAT, 'UTF-8').'\"';\n\t\t}\n\t\t// Retrive label\n\t\t$customLabel = JComponentHelper::getParams('com_clubmanagement')->get($this->element['name']);\n\t\tif (strlen($customLabel) == 0) {\n\t\t\t$customLabel = JText::_($this->element['label']);\n\t\t}\n\t\t// Add the label text and closing tag.\n\t\t$label .= '>'.$customLabel.'</label>';\n\t\treturn $label; \n\t}",
"public function label($atts, $content = '') {\r\n\t\tif (!is_array($atts)) {\r\n\t\t\t$atts = array();\r\n\t\t}\r\n\t\n\t\t$styles = array('radius', 'round');\r\n\t\t$colors = array('regular', 'success', 'alert', 'secondary');\r\n\t\r\n\t\t$classes = array();\r\n\t\r\n\t\tforeach ($atts as $key=>$value) {\r\n\t\t\tif (is_numeric($key)) {\r\n\t\t\t\t$key = $value;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// sanitize the values\n\t\t\tif (in_array($key, $styles)) {\n\t\t\t\t$classes['style'] = $value;\n\t\t\t} else if (in_array($key, $colors)) {\n\t\t\t\t$classes['color'] = $value;\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$classes['label'] = 'label';\r\n\t\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t'text' => $content,\r\n\t\t\t'class' => ''\r\n\t\t), $atts ) );\r\n\t\r\n\t\tif (!empty($class)) {\r\n\t\t\t$classes = array_merge($classes, explode(' ', $class));\r\n\t\t}\r\n\t\t\t\r\n\t\t$classes = Foundation_Framework_Shortcodes::sanitize_html_class_list($classes);\n\t\t\r\n\t\treturn '<span class=\"'.$classes.'\">'.$text.'</span>';\r\n\t}",
"private function message($message, $type)\n\t{\n\t\tif(in_array($type, $this->types))\n\t\t{\n\t\t\t$html = '<div class=\"alert alert-%s\">%s</div>';\n\t\t\treturn sprintf($html, $type, $message);\n\t\t}\n\n\t\treturn $message;\n\t}",
"function SERIA_MetaTemplate_sLabel($tag, $templateFileName)\n\t{ // <s:label for='description'>\n\t\tif(!SERIA_MetaTemplate::inStack('s:form'))\n\t\t\treturn '<?php echo SERIA_MetaTemplate::displayError(\"s:label not allowed outside of s:form\"); ?>';\n\n\t\treturn '<?php echo ($sForm ? $sForm->label('.SERIA_MetaTemplate::attributeToConstant($tag->get('for'), $templateFileName).') : SERIA_MetaTemplate::displayError(\"s:label without active form\")); ?>';\n\t}",
"function loadMessage($msgType,$text_message){\n switch ($msgType) {\n case 1 : $msgType = 'alert-success'; \n $msgTitle = 'Success!';\n $msgIcon = 'fa-check';\n break;\n case 2 : $msgType = 'alert-danger'; \n $msgTitle = 'Error!'; \n $msgIcon = 'fa-times-circle';\n break;\n case 3 : $msgType = 'alert-warning'; \n $msgTitle = 'Warning!';\n $msgIcon = 'fa-times';\n break;\n case 4 : $msgType = 'alert-info'; \n $msgTitle = 'Info!';\n $msgIcon = 'fa-info-circle';\n break; \n } \n return ' <div class=\"alert '.$msgType.' alert-block fade in alert-dismissable\"> \n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\n <p><div style=\"float:left;margin-right:10px;\"><i class=\"fa '.$msgIcon.' icon\"></i></div> <strong>'.$msgTitle.'</strong></p>\n <p>'.$text_message.'</p>\n </div>'; \n }",
"function mensaje($message = \"\", $type = \"danger\")\n{\n switch($type)\n {\n\tcase \"danger\":\n\t$icon = '<span class=\"glyphicon glyphicon-remove\"></span>';\n\tbreak;\n\tcase \"success\":\n\t$icon = '<span class=\"glyphicon glyphicon-ok\"></span>';\n\tbreak;\n\tcase \"warning\":\n\t$icon = '<span class=\"glyphicon glyphicon-warning-sign\"></span>';\n\tbreak;\n\tcase \"info\":\n\t$icon = '<span class=\"glyphicon glyphicon-info-sign\"></span>';\n\tbreak;\n\tdefault:\n\t$icon = '';\n\tbreak;\n }\n\t$html = '\n\t <div class=\"alert alert-'.$type.' alert-dismissable\">\n\t <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\n\t '.$icon.' '.$message.'\n\t </div>';\n return $html;\n}",
"private function create_label($label)\n\t{\n\t\tif ($mylabel = $this->get_label($label))\n\t\t{\n\t\t\t$this->pair .= form::label($this->id, $mylabel, $this->label_extra);\n\t\t}\n\n\t}",
"function label_($tag=true) {\n\t\t$label = trim($this->label);\n\t\t\n\t\tif ($tag) {\n\t\t\tif ($label) {\n\t\t\t\tif (trim($this->skin_id)) {\n\t\t\t\t\t$label = \"<label class='skinid'>$label</label>\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$label = \"<label>$label</label>\";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tif ($this->mandatory_fg == 'Y') {\n\t\t\t\t$label .= '<div class=\"app-req-mandatory\"><span title=\"Mandatory\">*</span></div>';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $label;\t\t\n\t}",
"function message($type, $content = array()) {\n // set the default title\n $title = array(\n \"danger\" => \"DANGER\",\n \"info\" => \"INFORMATION\",\n \"success\" => \"SUCCESS\",\n \"warning\" => \"WARNING\"\n );\n\n // set the default icon\n $icon = array(\n \"danger\" => \"trash-o\",\n \"info\" => \"info-circle\",\n \"success\" => \"check-square-o\",\n \"warning\" => \"warning\"\n );\n\n // set the default emit\n $emit = array(\n \"danger\" => \"Oh snap! This information need to set by user.\",\n \"info\" => \"Heads up! This information need to set by user.\",\n \"success\" => \"Well done! Your action has been execute successfully.\",\n \"warning\" => \"Warning! This information need to set by user.\"\n );\n\n // set the default close button\n $btn = '';\n\n if(count($content) > 0){\n // check the message title exists into the array\n if(array_key_exists('title', $content)){\n $title[$type] = $content['title'];\n }\n\n // check the message icon exists into the array\n if(array_key_exists('icon', $content)){\n $icon[$type] = $content['icon'];\n }\n\n // check the message emit exists into the array\n if(array_key_exists('emit', $content)){\n $emit[$type] = $content['emit'];\n }\n\n // check the message emit exists into the array\n if(array_key_exists('btn', $content)){\n if($content['btn']){\n $btn = '<button type=\"button\" class=\"close\"><span aria-hidden=\"true\">×</span></button>';\n }\n }\n }\n\n $message = '<div class=\"alert alert-'. $type .'\" style=\"margin-top:15px;\">'\n . '<h3><i class=\"fa fa-'. $icon[$type] .'\"></i> '. strtoupper($title[$type]) .'</h3>'\n . $btn\n . '<p>'. $emit[$type] .'</p>'\n . '</div>';\n\n return $message;\n}",
"public static function label($contents, $type=false)\n\t{\n\t\tif ($contents == '') { return false; }\n\t\tif (empty($type)) { $type == 'default'; }\n\t\tif (!is_array($attrs)) { $attrs = array(); }\n\t\t$attrs['class'] = (!empty($attrs['class'])) ? ($attrs['class'] . ' label label-' . $type) : ('label label-' . $type);\n\t\treturn Format::xhe('span', $contents, $attrs);\n\t}",
"public function msg($type = '', $text = ''){\n\t\tif($type == 'danger') {\n\t\t\t$icon = 'zmdi zmdi-block';\n\t\t} else if($type == 'warning') {\n\t\t\t$icon = 'zmdi zmdi-alert-circle-o';\n\t\t} else if($type == 'info') {\n\t\t\t$icon = 'zmdi zmdi-info-outline';\n\t\t} else if($type == 'success') {\n\t\t\t$icon = 'zmdi zmdi-check';\n\t\t}\n\n\t\t$message = '\n\t\t\t<div class=\"alert alert-'.$type.' alert-dismissable\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\n\t\t\t\t<i style=\"color: white;\" class=\"'.$icon.' pr-15 pull-left\"></i><p style=\"color: white;\" class=\"pull-left\">'.$text.'</p> \n\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t</div>\n\t\t';\n\n\t\treturn $message;\t\n\n\t}",
"public static function labelBadge($type, $label, $htmlOptions = array())\n {\n\n $htmlOptions = self::addClassName($type, $htmlOptions);\n $style = self::popOption('style', $htmlOptions);\n if (isset($style) && in_array($style, self::$labelBadgeStyles)) {\n $htmlOptions = self::addClassName($type . '-' . $style, $htmlOptions);\n }\n return CHtml::tag('span', $htmlOptions, $label);\n }",
"function createInput($type, $name, $value = \"\", $label)\n{\n return \"<label>\" . $label . \"</label><input type='\" . $type . \"' name='\" .$name . \"' value= '\" . $value .\"'>\";\n}",
"protected function getLabel() {\n\t\t// Initialise variables.\n\t\t$label = '';\n\n\t\tif ($this->hidden) {\n\t\t\treturn $label;\n\t\t}\n\n\t\t$plgRegisterjOpenSim\t= JPluginHelper::getPlugin('user', 'jopensimregister');\n\t\t$this->params\t\t\t= new JRegistry($plgRegisterjOpenSim->params);\n\t\t$avatarlist\t\t\t\t= $this->params->get('plgJopensimRegisterAvatar');\n\t\t$requiredField\t\t\t= $this->params->get('plgJopensimRegisterUser');\n\n\t\t// Get the label text from the XML element, defaulting to the element name.\n\t\t$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];\n\t\t$text = $this->translateLabel ? JText::_($text) : $text;\n\n\t\tJHtml::_('behavior.modal');\n\n\t\t// Build the class for the label.\n\t\t$class = !empty($this->description) ? 'hasPopover' : '';\n\t\tif($requiredField == \"required\") {\n\t\t\t$this->required = true;\n\t\t\t$class =$class . ' required';\n\t\t}\n\n\t\t$class = !empty($this->labelClass) ? $class . ' jopensimavatar ' . $this->labelClass : $class.' jopensimavatar';\n\n\t\t// Add the opening label tag and main attributes attributes.\n\t\t$label .= '<label id=\"' . $this->id . '-lbl\" for=\"' . $this->id . '\" class=\"' . $class . '\"';\n\n\t\t// If a description is specified, use it to build a tooltip.\n\t\tif (!empty($this->description)) {\n\t\t\t$label .= ' data-title=\"'\n\t\t\t\t. htmlspecialchars(\n trim($text),\n\t\t\t\tENT_COMPAT, 'UTF-8'\n\t\t\t).'\"\n data-content=\"'.JText::_($this->description).'\"';\n\t\t}\n\n\t\t$avatararticle = $this->params->get('plgJopensimRegisterAvatarArticle');\n\t\tif($avatararticle > 0) {\n\t\t\t$link = '<a class=\"modal\" title=\"\" href=\"index.php?option=com_content&view=article&layout=modal&id=' . $avatararticle . '&tmpl=component\" rel=\"{handler: \\'iframe\\', size: {x:800, y:500}}\">' . $text . '</a>';\n\t\t} else {\n\t\t\t$link = $text;\n\t\t}\n\n\t\t// Add the label text and closing tag.\n\t\t$label .= '>' . $link . '</label>';\n\t\treturn $label;\n\t}",
"private function appendLabel( &$tag )\r\n\t{\r\n\t\t//if the NAME attribute is set, we'll use that ( <select> )\r\n\t\t//otherwise, use the tag's value ( everything else )\r\n\t\tif ( isset( $tag['attributes']['NAME'] ) )\r\n\t\t{\r\n\t\t\t$id =& $tag['attributes']['NAME'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$id =& $tag['value'];\r\n\t\t}\r\n\t\t\r\n\t\t//see what kind of label to print\r\n\t\tif ( strpos( $id, \"{blank}\" ) !== FALSE )\r\n\t\t{\r\n\t\t\t//do not print a label\r\n\t\t\t//get rid of the {blank}\r\n\t\t\t$id = str_replace( \"{blank}\", \"\", $id );\r\n\t\t}\r\n\t\telseif ( strpos( $tag['value'], \"{text}\" ) !== FALSE )\r\n\t\t{\r\n\t\t\t//put a textbox for the name instead of a label\r\n\t\t\t//get rid of the {text}\r\n\t\t\t$id = str_replace( \"{text}\", \"\", $id );\r\n\t\t\t$this->appendHTML( \" <input type=\\\"text\\\" id=\\\"\" . $this->spaceToUnderscore( $tag['value'] ) . \"Name\\\"\" );\r\n\t\t\tif ( isset( $tag['attributes']['SIZE'] ) )\r\n\t\t\t{\r\n\t\t\t\t$this->appendHTML( \" size=\\\"{$tag['attributes']['SIZE']}\\\"\" );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->appendHTML( \" size=\\\"10\\\"\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->appendHTML( \" tabIndex=\\\"{$this->getTabIndex()}\\\" />\\n\" );\r\n\t\t\t\t\t\t\r\n\t\t\t//create the script for this form element (name box)\r\n\t\t\t$this->appendForm( \" \" . $this->spaceToUnderscore( $id ) . \"Name: '\" . $this->spaceToUnderscore( $id ) . \"Name',\\n\" );\r\n\t\t}\r\n\t\telseif ( strpos( $id, \"{\" ) !== FALSE )\r\n\t\t{\r\n\t\t\t//use a different label than the element name\r\n\t\t\t//use what's inside the brackets as the label, and what's outside as the name\r\n\t\t\t$label = substr( $id, strpos( $id, \"{\" ) + 1, strpos( $id, \"}\" ) - 1 );\r\n\t\t\t\r\n\t\t\t//get rid of the label inside the ID\r\n\t\t\t$id = str_replace( '{' . $label . '}', \"\", $id );\r\n\t\t\t\r\n\t\t\t$this->appendHTML( \" <label for=\\\"\" . $this->spaceToUnderscore( $id ) . \"\\\">{$label}</label>\\n\" );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//put the standard label\r\n\t\t\t$this->appendHTML( \" <label for=\\\"\" . $this->spaceToUnderscore( $id ) . \"\\\">{$id}</label>\\n\" );\r\n\t\t}\r\n\t}",
"public function label($for, $text, $class=\"\"){\n /*return '<label for=\"' . $for . '\" class=\"' . $class . '\">' . $text . '</label>';*/\n return \"<label for=$for class=$class>$text</label>\";\n }",
"private function notify($type, $message) {\n echo <ui:notice type={$type}>{$message}</ui:notice>;\n }",
"public function create_text($input)\n\t{\n\t\t//<div class=\"form-field\"><label for=\"label_name\">Label_Name</label>\n\t\t$label = '<div class=\"form-field\"><label for=\"'.$input['name'].'\">'.$input['label'].'</label>'.\"\\n\";\n\t\tunset($input['label']);//same reason ^^ but the label\t\n\t\t\n\t\t\n\t\t$inputh = '<input class=\"text-input\" ';\n\t\tunset($input['rules']);//so the rule arent added to the html form\n\t\t\t\n\t\tforeach($input as $param => $value)\n\t\t{\n\t\t\t$inputh .= $param.'=\"'.$value.'\" ';\n\t\t}\n\t\t\n\t\t$inputh .= '/></div>'.\"\\n\";\n\t\t\n\t\t\n\t\techo $label.$inputh;//output the label\n\t}",
"function labelType($type) {\n\tswitch ($type) {\n\t\tcase 1 :\n\t\t\treturn 'Administrateur';\n\t\t\tbreak;\n\t\tcase 2 :\n\t\t\treturn 'Modérateur';\n\t\t\tbreak;\n\t\tcase 3 :\n\t\t\treturn 'Utilisateur';\n\t\t\tbreak;\n\t}\n}",
"public function showMessage($type, $message)\n {\n return '<div class=\"alert alert-'.$type .' alert-dismissible\">\n <button type=\"button\" class=\"close\"\n data-dismiss=\"alert\">×</button>\n <strong class=\"text-center\">'.$message.'</strong>\n </div>';\n }",
"function alertMessage($msg, $type) {\r\n $returnmsg = '';\r\n switch ($type) {\r\n case 0: $returnmsg = \"\"\r\n . \"<div class='alert alert-success'>\"\r\n . \"<i class='fa fa-check'></i>\"\r\n . \"<button class='close' data-close='alert'></button> \"\r\n . \" \" . $msg . \"\"\r\n . \"</div>\";\r\n break;\r\n case 1: $returnmsg = \"\"\r\n . \"<div class='alert alert-danger'>\"\r\n . \"<i class='fa fa-times'></i>\"\r\n . \"<button class='close' data-close='alert'></button> \"\r\n . \" \" . $msg . \"\"\r\n . \"</div>\";\r\n break;\r\n case 2: $returnmsg = \"\"\r\n . \"<div class='alert alert-info'>\"\r\n . \"<i class='fa fa-lightbulb-o'></i>\"\r\n . \"<button class='close' data-close='alert'></button>\"\r\n . \" \" . $msg . \"\"\r\n . \"</div>\";\r\n break;\r\n case 3: $returnmsg = \"\"\r\n . \"<div class='alert alert-warning'>\"\r\n . \"<i class='fa fa-exclamation-triangle'></i>\"\r\n . \"<button class='close' data-close='alert'></button> \"\r\n . \" \" . $msg . \"\"\r\n . \"</div>\";\r\n break;\r\n }\r\n\r\n return $returnmsg;\r\n}",
"function FormLabel($id, $value) {\n $output = sprintf('<label for=\"%s\">%s</label> :', $id, $value);\n return $output;\n}",
"public function addMessage ($type=\"\", $message=\"\")\r\n\t{\r\n\t\t$this->page_message = \"\";\r\n\t\t$f = $this->component_directory . \"/layouts/messages/messages.php\";\r\n\t\t$this->page_message = file_get_contents($f);\r\n\r\n\t\tswitch($type)\r\n\t\t{\r\n\t\t\tcase \"info\":\r\n\t\t\t\t$this->page_message = str_replace(\"message_type\", \"info\", $this->page_message);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"error\":\r\n\t\t\t\t$this->page_message = str_replace(\"message_type\", \"error\", $this->page_message);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->page_message = $this->page_header = $this->display_what(\"message\");\r\n\t\t}\r\n\r\n\t\tif ( strlen($message) > 0 )\r\n\t\t\t$this->page_message = str_replace(\"Lorem ipsum dolor sit amet.\", $message, $this->page_message);\r\n\t\r\n\t\t$this->page_message = $this->format( $this->page_message );\r\n\t\techo ( $this->page_message );\r\n\t}"
] | [
"0.65497106",
"0.63165826",
"0.630081",
"0.62808496",
"0.61079496",
"0.5997144",
"0.5938503",
"0.59285593",
"0.59148943",
"0.59051573",
"0.58579534",
"0.5851763",
"0.58325696",
"0.58251315",
"0.5784773",
"0.57428634",
"0.5724735",
"0.571409",
"0.5709417",
"0.56761795",
"0.564971",
"0.5587882",
"0.5578921",
"0.55750406",
"0.55721307",
"0.5549427",
"0.5548007",
"0.55434835",
"0.55045915",
"0.548941"
] | 0.6743806 | 0 |
Create a text field with Autocomplete. Creates an autocomplete field with the given ID and options. options['with'] defaults to "Form.Element.serialize('$field')", but can be any valid javascript expression defining the additional fields. | function autoComplete($field, $url = "", $options = array()) {
$out=$this->Ajax->autocomplete($field, $url, $options);
return $out;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function autoComplete($field, $url = \"\", $options = array()) {\n $var = '';\n if (isset($options['var'])) {\n \t$var = 'var ' . $options['var'] . ' = ';\n \tunset($options['var']);\n }\n \n if (!isset($options['id'])) {\n \t$options['id'] = Inflector::camelize(r(\"/\", \"_\", $field));\n }\n $divOptions = array('id' => $options['id'] . \"_autoComplete\", 'class' => isset($options['class']) ? $options['class'].' auto_complete' : 'auto_complete');\n \n if (isset($options['div_id'])) {\n \t$divOptions['id'] = $options['div_id'];\n \tunset($options['div_id']);\n }\n $htmlOptions = $this->__getHtmlOptions($options);\n $htmlOptions['autocomplete'] = \"off\";\n \n foreach ($this->autoCompleteOptions as $opt) {\n \tunset($htmlOptions[$opt]);\n }\n \n if (isset($options['tokens'])) {\n \tif (is_array($options['tokens'])) {\n \t\t$options['tokens'] = $this->Javascript->object($options['tokens']);\n \t} else {\n \t\t$options['tokens'] = '\"' . $options['tokens'] . '\"';\n \t}\n }\n \n if(!isset($options['minLength'])){\n $options['minLength']=\"3\";\n }\n $inputfield = str_replace(\"/\", \"\", $field);\n if(is_array($url)){\n $source = $url; \n }else{\n $source =\"'\".$this->Html->url($url).\"'\";\n }\n \n \n $jq_codeB=\"$( \\\"#\".$inputfield.\"\\\" ).autocomplete({\n source: function( request, response ) {\n var ajaxResponse;\n $.ajax({\n url: $source,\n type:'POST',\n async: false, \n data:{ value : request['term']},\n success: function( response, status, xhr ) {\n tmp_rps=response.split('<!--');\n response = tmp_rps[0];\n response = response.replace(/\\\"/g,'');\n response = response.replace('[','');\n response = response.replace(']','');\n ajaxResponse = response.split(',');\n }\n });\n if(ajaxResponse.length>0){\n response(ajaxResponse);\n }\n \n },\n minLength: 3\n });\";\n \n $options = $this->_optionsToString($options, array('paramName', 'indicator'));//\n $options = $this->_buildOptions($options, $this->autoCompleteOptions);//\n //return $this->Html->input($field, $htmlOptions) . \"\\n\" .\n //$this->Html->tag('div', $divOptions, true) . \"</div>\\n\" .\n //$this->Javascript->codeBlock(\"{$var}new Ajax.Autocompleter('\" . $htmlOptions['id']\n //. \"', '\" . $divOptions['id'] . \"', '\" . $this->Html->url($url) . \"', \" .\n //$options . \");\");\n return $this->Html->input($field, $htmlOptions) . \"\\n\" .\n \t\t$this->Html->tag('div', $divOptions, true) . \"</div>\\n\" .\n \t\t$this->Javascript->codeBlock($jq_codeB);//OK\n }",
"public function autoComplete($id, $value = null, array $params = array(), array $attribs = array()) {\n $attribs = $this->_prepareAttributes($id, $value, $attribs);\n\n if (!isset($params['source'])) {\n if (isset($params['url'])) {\n $params['source'] = $params['url'];\n unset($params['url']);\n } else if (isset($params['data'])) {\n $params['source'] = $params['data'];\n unset($params['data']);\n } else {\n require_once \"ZendX/JQuery/Exception.php\";\n throw new ZendX_JQuery_Exception(\n \"Cannot construct AutoComplete field without specifying 'source' field, \" .\n \"either an url or an array of elements.\"\n );\n }\n }\n\n $this->_sourceData = Core_Array::get($params, 'source', array());\n $this->_hiddenIdEnabled = (bool) Core_Array::get($attribs, 'hiddenIdEnabled', false);\n\n $paramsJson[] = 'source : ' . ZendX_JQuery::encodeJson($this->_sourceData);\n $paramsJson[] = 'minLength : ' . Core_Array::get($params, 'minLength', 2);\n\n\n if ($this->_hiddenIdEnabled) {\n $attribs['id'] .= '-' . $this->_labelSufix;\n $attribs['name'] .= '_' . $this->_labelSufix;\n\n $paramsJson[] = 'focus : ' . 'function( event, ui ) {\n $( \"#' . $id . '\" ).val( ui.item.label );\n return false;\n }';\n\n $paramsJson[] = 'select : ' . 'function(event, ui) {\n $(\"#' . $attribs['id'] . '\") .val( ui.item.label) ;\n $(\"#' . $id . '\").val(ui.item.value);\n\n return false;\n }';\n\n unset($attribs['hiddenIdEnabled']);\n }\n\n $paramsJson = '{' . implode(', ', $paramsJson) . '}';\n\n $js = sprintf('%s(\"#%s\").autocomplete(%s);', ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $attribs['id'], $paramsJson);\n $this->jquery->addOnLoad($js);\n\n $html = '';\n\n if ($this->_hiddenIdEnabled) {\n $html = $this->view->formText($attribs['id'], $this->determineHiddenValue($value), $attribs);\n $html .= $this->view->formHidden($id, $value);\n } else {\n $html = $this->view->formText($attribs['id'], $value, $attribs);\n }\n\n return $html;\n }",
"public static function renderAutoCompleteField(&$model, &$view)\n {\n $tw = HtmlWriter::getInstance();\n \n self::openFieldLayout($model, $view);\n $tw->openDiv();\n \n $tw->openScript();\n $tw->addAttribute('type', 'text/javascript');\n $tw->writeRaw('_autoCompleteDataSource[\"' . $model->getName() . '\"] = ' . json_encode($model->getDataSource()) . ';');\n $tw->closeScript();\n \n $tw->openInput();\n $tw->addAttribute('type', 'hidden');\n $tw->addAttribute('id', 'autoComplete_' . $model->getName());\n $tw->addAttribute('name', $model->getName());\n $tw->addAttribute('value', $model->getValue());\n $tw->addAttribute('class', $view->getCssClass() . '-autocompletefield');\n $tw->addAttribute('sourceid', $model->getDataSourceIdField());\n $tw->addAttribute('sourcedescription', $model->getDataSourceDscField());\n $tw->closeInput();\n \n $predefinedText = '';\n if ($model->getValue())\n {\n foreach ($model->getDataSource() as $value)\n {\n if ($value[$model->getDataSourceIdField()] == $model->getValue())\n {\n $predefinedText = $value[$model->getDataSourceDscField()];\n break;\n } \n }\n }\n \n $tw->openInput();\n $tw->addAttribute('type', 'text');\n $tw->addAttribute('id', 'autoComplete_' . $model->getName() . '_textField');\n $tw->addAttribute('class', $view->getCssClass() . '-textfield');\n $tw->addAttribute('value', $predefinedText);\n $tw->closeInput();\n \n $tw->openDiv();\n $tw->addAttribute('id', 'autoComplete_' . $model->getName() . '_container');\n $tw->closeDiv(true);\n \n self::renderToolTip($model, $view);\n $tw->closeDiv();\n self::closeFieldLayout($model, $view);\n }",
"function form_autocomplete($title, $name, $value, $size, $maxlength, $callback_path, $description = NULL, $attributes = NULL, $required = FALSE) {\n drupal_add_js('misc/autocomplete.js');\n\n $size = $size ? ' size=\"'. $size .'\"' : '';\n\n $output = theme('form_element', $title, '<input type=\"text\" maxlength=\"'. $maxlength .'\" class=\"'. _form_get_class('form-text form-autocomplete', $required, _form_get_error($name)) .'\" name=\"edit['. $name .']\" id=\"edit-'. form_clean_id($name) .'\"'. $size .' value=\"'. check_plain($value) .'\"'. drupal_attributes($attributes) .' />', $description, 'edit-'. $name, $required, _form_get_error($name));\n $output .= '<input class=\"autocomplete\" type=\"hidden\" id=\"edit-'. form_clean_id($name) .'-autocomplete\" value=\"'. check_url(url($callback_path, NULL, NULL, TRUE)) .'\" disabled=\"disabled\" />';\n\n return $output;\n}",
"public function registerClientScript()\n {\n $elementId = $this->options['id'];\n $scriptOptions = json_encode($this->autocompleteOptions);\n $view = $this->getView();\n $view->registerJsFile(self::API_URL . http_build_query([\n 'libraries' => $this->libraries,\n 'sensor' => $this->sensor ? 'true' : 'false'\n ]));\n $autocompleteName = \"autocomplete-\";\n if(isset($this->options['autocompleteName'])){\n $autocompleteName .= $this->options['autocompleteName'];\n }\n $view->registerJs(<<<JS\n (function(){\n $(window).attr('$autocompleteName', new google.maps.places.Autocomplete(\n document.getElementById('{$elementId}'),\n {$scriptOptions}\n ));\n })();\nJS\n , \\yii\\web\\View::POS_READY);\n }",
"function create_field($type) {\n\t\techo \"<input id=\\\"\".$this->field_name.\"\\\" class=\\\"\".$this->field_class.\"\\\" type=\\\"\".$type.\"\\\" size=\\\"\".$this->field_length.\"\\\" name=\\\"\".$this->field_name.\"\\\" value=\\\"\".$this->field_selected.\"\\\" tabindex=\\\"\".$this->field_index.\"\\\" />\";\n\t\t$list=\"\";\n\t\tforeach($this->field_list as $arrList){\n\t\t\t$list .= \"\\\"\".$arrList.\"\\\", \";\n\t\t}\n\t\t$list = substr($list,0, strlen($list)-2);\n\t\tif($this->field_show == \"0\") {\n\t\t\t?>\n\t\t\t<script language=\"JavaScript\">\t\t\n\t\t\t$(document).ready(function() {\t\n\t\t\t\t$(\".ui-autocomplete\").css({\n\t\t\t\t\t\"max-height\": \"200px\",\n\t\t\t\t\t\"overflow-y\": \"scroll\",\n\t\t\t\t\t\"overflow-x\": \"hidden\"\n\t\t\t\t});\n\t\t\t\t$(\"#<?php echo $this->field_name ?>\").autocomplete({\n\t\t\t\t\tsource: [<?php echo $list?>],\n\t\t\t\t\tminLength: 0 \n\t\t\t\t}).focus(function() {\n\t\t\t\t\t$(\"#<?php echo $this->field_name ?>\").autocomplete(\"search\", \"\");\n\t\t\t\t});\n\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}else{\n\t\t\t?>\n\t\t\t<script language=\"JavaScript\">\t\t\n\t\t\t$(document).ready(function() {\t\t\n\t\t\t\t$(\"#<?php echo $this->field_name ?>\").autocomplete({\n\t\t\t\t\tsource: [<?php echo $list?>]\n\t\t\t\t});\n\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t\t\n\t\t/*$prt \t\t= \"<select class='$this->field_class' id='\".$this->field_name.\"' name='\".$this->field_name.\"' tabindex='\".$this->field_index.\"' >\";\n\t\t foreach($this->field_list as $list) {\n\t\t\tif($this->field_selected == $list) {\n\t\t\t\t $prt .= \"<option value='\".$list.\"' selected>\".$list.\"</option>\";\n\t\t\t}else{\n\t\t\t\t $prt .= \"<option value='\".$list.\"'>\".$list.\"</option>\";\n\t\t\t}\n\t\t}\n\t\t$prt .= \"</select>\";\n\t\treturn $prt;*/\n\t\t\n\t}",
"public function ajax($url, $idField = 'id', $textField = 'text')\n {\n if(empty($url)){\n return $this;\n }\n\n $configs = array_merge([\n 'allowClear' => true,\n 'placeholder' => $this->label,\n 'minimumInputLength' => 1,\n 'tags' => $this->freeInput,\n ], $this->config);\n\n $configs = json_encode($configs);\n $configs = substr($configs, 1, strlen($configs) - 2);\n $dropdownParent = $this->asModal ? '$(\"' . static::$modalSelectorName . ' .modal-dialog\")' : 'null';\n\n $this->script = <<<EOT\n\n$(\"{$this->getElementClassSelector()}\").not('.admin-added-select2').select2({\n ajax: {\n url: \"$url\",\n dataType: 'json',\n delay: 250,\n data: function (params) {\n return {\n q: params.term,\n page: params.page,\n };\n },\n processResults: function (data, params) {\n params.page = params.page || 1;\n\n return {\n results: $.map(data.data, function (d) {\n d.id = d.$idField;\n d.text = d.$textField;\n return d;\n }),\n pagination: {\n more: data.next_page_url\n }\n };\n },\n cache: true\n },\n $configs,\n dropdownParent: $dropdownParent,\n escapeMarkup: function (markup) {\n return markup;\n }\n}).addClass('admin-added-select2');\n\nEOT;\n\n return $this;\n }",
"private function createInputText($options = ['label' => '', 'name' => '', 'id' => '', 'placeholder' => ''])\n {\n $field = '<div class=\"form-group\">';\n if (!empty($options['label'])) {\n $field .= '<label for=\"' . $options['id'] . '\">' . $options['label'] . '</label>';\n }\n $field .= '<input type=\"text\" name=\"' . $options['name'] . '\" class=\"form-control\" value=\"' . (isset($_GET[$options['name']]) && $_GET[$options['name']] != '' ? $_GET[$options['name']] : '') . '\" placeholder=\"' . $options['placeholder'] . '\" id=\"' . $options['id'] . '\">';\n $field .= '</div>';\n return $field;\n }",
"public function getById($id) {\r\n return $this->autocompleteEntity->find($id);\r\n }",
"protected function autocompletefield()\n\t{\n\t\tif ( ! $this->autocompleted)\n\t\t{\n\t\t\t$fieldname = $this->get('name', null);\n\n\t\t\tif ($fieldname !== null && ($autovalue = $this->form->autovalue($fieldname)) !== null)\n\t\t\t{\n\t\t\t\tif ($this->get('value', false) === $autovalue)\n\t\t\t\t{\n\t\t\t\t\t$this->checked();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->autocompleted = true;\n\t\t}\n\t}",
"public function TagAutoComplete($name, $value = null, $attribs = null, array $options = null)\n {\n $info = $this->_getInfo($name, $value, $attribs);\n $id = $info['id'];\n\n $this->view->HeadScript()->appendFile(noCacheFile(\n '/js/lib/tagit/tagit.js'\n ));\n $this->view->headLink()->appendStylesheet(\n '/css/lib/tagit/tagit-simple-blue-old.css'\n );\n\n // Tagit options\n if(!isset($this->tags[$id])) {\n $this->tags[$id] = array();\n }\n\n $tagit = array_merge(array(\n 'minLength' => 1,\n 'triggerKeys' => array('enter', 'comma', 'tab')\n ),\n isset($attribs['tagit']) ? $attribs['tagit'] : array()\n );\n\n if(isset($tagit['tagSource'])) {\n $tagit['tagSource'] = $this->tagSource($tagit['tagSource']);\n }\n if(isset($tagit['triggerKeys'])) {\n $tagit['triggerKeys'] = $this->tagTriggerKeys($tagit['triggerKeys']);\n }\n $initialTags = array_merge($this->tags[$id], isset($tagit['initialTags']) ? $tagit['initialTags'] : array());\n $initialTags = array_merge($options, isset($initialTags) ? $initialTags : array());\n unset($tagit['initialTags']);\n\n $tagit_options = '';\n //this foreach makes the picker allow spaces\n foreach($tagit as $key => $val) {\n $tagit_options .= $key . ': ' . $val . \",\\n\";\n }\n $ulStyle = null;\n if(!empty($attribs['ul_style'])) {\n $ulStyle = $attribs['ul_style'];\n }\n return $this->tagOptions($id, $name, $options,$ulStyle)\n . \"<script type=\\\"text/javascript\\\">\\n\"\n . \"$(document).ready(function() { $('#{$id}').tagit({\"\n . $tagit_options\n //. $this->tagSource($attribs) . \", \"\n //. $this->tagTriggerKeys($attribs) . \", \"\n . $this->tagInitialTags($initialTags) . \", \"\n . \"select: true }); });\\n\"\n . \"</script>\\n\";\n }",
"public function autoComplete() {\n\t\t$this->layout = 'ajax';\n\t\t\n\t\t$items = $this->Item->find('all', array(\n\t\t\t\t'conditions'=>array('Item.name LIKE' => $this->params['url']['q'].'%'),\n\t\t\t\t'fields'=>array('name', 'id')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->set(compact('items'));\n\t}",
"public function ajax($url, $idField = 'id', $textField = 'text')\n {\n $this->config = array_merge([\n 'removeItems' => true,\n 'removeItemButton' => true,\n 'placeholder' => $this->label,\n ], $this->config);\n\n $this->additional_script = <<<JS\n let elm = document.querySelector(\".{$this->getElementClass()}\");\n var lookupTimeout;\n elm.addEventListener('search', function(event) {\n clearTimeout(lookupTimeout);\n lookupTimeout = setTimeout(function(){\n var query = {$this->choicesObjName()}.input.value;\n admin.ajax.post(\"{$url}\",{query:query},function(data){\n {$this->choicesObjName()}.setChoices(data.data, '{$idField}', '{$textField}', true);\n })\n }, 250);\n });\n\n elm.addEventListener('choice', function(event) {\n {$this->choicesObjName()}.setChoices([], '{$idField}', '{$textField}', true);\n });\n JS;\n\n return $this;\n }",
"function add_field_text($data = '', string $value = '', $extra = [], string $type = 'text'): string\n {\n $attributes = builderHtml($data, $extra);\n $inputHtml = '';\n $inputHtml .= $attributes['row'];\n $inputHtml .= $attributes['label'];\n $inputHtml .= $attributes['col'];\n $components = ['class' => $attributes['inputClass'], 'id' => $attributes['inputId']];\n $extras = array_merge($components, $extra);\n unset($extras['label']);\n $inputHtml .= form_input($data, $value, $extras, $type);\n $inputHtml .= $attributes['endCol'];\n $inputHtml .= $attributes['endRow'];\n\n return $inputHtml;\n }",
"function ajax_autoComplete()\r\n\t\t{\r\n\t\t\tif (!isset($this->data['Physician']['search']))\r\n\t\t\t{\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$value = $this->data['Physician']['search'];\r\n\t\t\t\r\n\t\t\t$single = $this->Physician->find('first', array(\r\n\t\t\t\t'contain' => array(),\r\n\t\t\t\t'fields' => array('id', 'name', 'address_1', 'phone_number'),\r\n\t\t\t\t'conditions' => array('physician_number' => $value),\r\n\t\t\t\t'order' => array('name')\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif ($single === false)\r\n\t\t\t{\r\n\t\t\t\t$matches = $this->Physician->find('all', array(\r\n\t\t\t\t\t'contain' => array(),\r\n\t\t\t\t\t'fields' => array('id', 'name', 'address_1', 'phone_number'),\r\n\t\t\t\t\t'conditions' => array('name like' => $value . '%'),\r\n\t\t\t\t\t'order' => array('name')\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$matches[0] = $single;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set('output', array(\r\n\t\t\t\t'data' => $matches,\r\n\t\t\t\t'id_field' => 'Physician.id', \r\n\t\t\t\t'id_prefix' => '',\r\n\t\t\t\t'value_fields' => array('Physician.name'),\r\n\t\t\t\t'informal_fields' => array('Physician.address_1', 'Physician.phone_number'),\r\n\t\t\t\t'informal_format' => ' | %s | %s'\r\n\t\t\t));\r\n\t\t}",
"protected function action_autocomplete() {\n global $_REQUEST;\n $this->view->set_template('json');\n isset($_REQUEST['query']) ? $queryString = $_REQUEST['query'] : $queryString = \"\";\n $result = $this->json_client->userAutocomplete(array(\"queryString\" => $queryString));\n $this->view->add_param(\"result\", $result);\n }",
"public function autoCompleteUserBox(){\r\n \r\n $this->autoRender = false;\r\n $this->layout = 'ajax';\r\n \r\n $term = $this->request->query('term');\r\n \r\n $data = $this->User->find('all', array(\r\n 'conditions' => array(\r\n 'or' =>array(\r\n array('User.email LIKE' => \"%$term%\"),\r\n array('Profile.last_name LIKE' => \"%$term%\"),\r\n array('Profile.first_name LIKE' => \"%$term%\"))),\r\n 'fields' => array('User.id', 'User.email'), \r\n 'contain' => array('Profile.last_name', 'Profile.first_name')));\r\n $jsonData = array();\r\n $i = 0;\r\n foreach ($data as $key => $value) {\r\n $jsonData[$i]['id'] = $value['User']['id'];\r\n $jsonData[$i]['desc'] = $value['User']['email'] . \" - \" . strtoupper($value['Profile']['first_name']) . \" \" . strtoupper($value['Profile']['last_name']);\r\n $i++;\r\n }\r\n echo json_encode($jsonData );\r\n\r\n }",
"public function iFillTheUiSelectWithAndSelectElement($id, $text, $item)\n {\n $items = explode(\"-\", $item);\n if(count($items) > 1){\n $item = $items[0].'-'.((int)$items[1] - 1);\n }else {\n $item = \"0-\".((int)$item - 1);\n }\n \n $this->iClickTheElement(sprintf(\"#%s > div.ui-select-match.ng-scope > span\",$id));\n $idText = sprintf(\"#%s > input.ui-select-search\",$id);\n// var_dump($idText);\n $this->spin(function($context) use ($idText){\n $element = $context->findElement($idText);\n return $element != null;\n },20);\n \n $this->getSession()->getDriver()->executeScript(\n sprintf('$(\"%s\").val(\"%s\");',$idText,$text)\n );\n $this->getSession()->getDriver()->executeScript(\n sprintf('$(\"%s\").change();',$idText)\n );\n// $selectInput = $this->findElement($idText); \n// $selectInput->setValue($text);\n \n $idItem = sprintf(\"#ui-select-choices-row-%s\",$item);\n $this->spin(function($context) use ($idItem){\n $element = $context->findElement($idItem);\n return $element != null;\n },20);\n $element = $this->findElement($idItem);\n $element->click();\n }",
"function getFeatureHtmlSuggest($featureId) {\n\n\t\t++$this->template->searchNameCounter;\n\t\t$id = \"suggest_\" . $this->template->searchNameCounter;\n\n\t\t$requestedPhpUri = $_SERVER['REQUEST_URI'];\n\t\tif (strpos($requestedPhpUri, '?') !== false) {\n\t\t\t$requestedPhpUri .= '&';\n\t\t} else {\n\t\t\t$requestedPhpUri .= '?';\n\t\t}\n\t\t$requestedPhpUri .= \"type=\" . MS3C_SUGGEST_PAGETYPE . \"&feature=$featureId\";\n\t\t$inputTypeName = \"textedit|$featureId|contains\";\n\n\t\t$content = '<input type=\"text\" id = \"' . $id . '\" name=\"' . $inputTypeName . '\">';\n\t\t$content .= \"<script>\";\n\t\t$content .= <<<EOT\n jQuery(function() {\n var cache = {};\n jQuery( \"#$id\" ).autocomplete({\n minLength: 2,\n\t\t\tdelay: 500,\n source: function( request, response ) {\n var term = request.term;\n if ( term in cache ) {\n response( cache[ term ] );\n return;\n }\n \n jQuery.getJSON( \"$requestedPhpUri\", request, function( data, status, xhr ) {\n cache[ term ] = data;\n response( data );\n });\n }\n });\n });\n\t\n\n\t</script>\nEOT;\n\n\n\t\treturn $content;\n\t}",
"protected function action_autocompletejs() {\n $this->view->set_template('js');\n $this->view->set_view($this->get_path_module() . \"view/autocomplete.js\");\n $this->view->add_param(\"autocomplete\", $this->get_link_to_action(\"autocomplete\"));\n }",
"public function run()\n\t{\n\t\tlist($name,$id)=$this->resolveNameID();\n\n\t\tif(isset($this->htmlOptions['id']))\n\t\t\t$id=$this->htmlOptions['id'];\n\t\telse\n\t\t\t$this->htmlOptions['id']=$id;\n\n\t\tif(isset($this->htmlOptions['name']))\n\t\t\t$name=$this->htmlOptions['name'];\n\n\t\tif($this->hasModel())\n\t\t\techo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);\n\t\telse\n\t\t\techo CHtml::textField($name,$this->value,$this->htmlOptions);\n\n\t\tif($this->sourceUrl!==null)\n\t\t\t$this->options['source']=CHtml::normalizeUrl($this->sourceUrl);\n\t\telse\n\t\t\t$this->options['source']=$this->source;\n\n\t\t$options=CJavaScript::encode($this->options);\n\n\t\t$js = \"jQuery('#{$id}').autocomplete($options);\";\n\t\t\n\t\techo '<script type=\"text/javascript\">/*<![CDATA[*/ '.$js.' /*]]>*/</script>';\n\n\t}",
"function render(){\n $ret = \"<input type='text' name='\".$this->getName().\"' id='\".$this->getName().\"' size='\".$this->getSize().\"' maxlength='\".$this->getMaxlength().\"' value='\".$this->getValue().\"'\".$this->getExtra().\" />\";\n\n $ret .= '\t<div class=\"smartobject_autocomplete_hint\" id=\"smartobject_autocomplete_hint' . $this->getName() . '\"></div>\n\n\t<script type=\"text/javascript\">\n\t\tnew Ajax.Autocompleter(\"' .$this->getName(). '\",\"smartobject_autocomplete_hint' .$this->getName(). '\",\"' . $this->_include_file . '?key=' . $this->getName() . '\");\n\t</script>';\n\n return $ret;\n }",
"public function addInputText(\n $id,\n $validationRules = false,\n $label = false,\n $theme = false, \n $name = false,\n $defaultValue = false,\n array $extraAttributes = null,\n array $autoReplacers = null){\n \n $this->addGeneralInput('text', $id, $validationRules, $label, $theme,\n $name, $defaultValue, $extraAttributes, $autoReplacers);\n \n }",
"public function registerClientScript(){\n $elementId = $this->options['id'];\n $apiKey = $this->pluginOptions['key'];\n $inputLat = $this->pluginOptions['lat'];\n $inputLng = $this->pluginOptions['lng'];\n $scriptOptions = json_encode($this->autocompleteOptions);\n $view = $this->getView();\n $view->registerJsFile(self::API_URL . http_build_query([\n 'libraries' => $this->libraries,\n 'sensor' => $this->sensor ? 'true' : 'false',\n 'language' => $this->language,\n 'key' => $apiKey\n ]));\n $view->registerJs(<<<JS\n(function(){\n var input = document.getElementById('{$elementId}');\n var options = {$scriptOptions};\n\n autocomplete = new google.maps.places.Autocomplete(input, options);\n\n autocomplete.addListener('place_changed', function() {\n var place = autocomplete.getPlace();\n if (place.geometry) {\n lat = place.geometry.location.lat();\n lng = place.geometry.location.lng();\n if (document.getElementById('{$inputLat}') != 'undefined') {\n document.getElementById('{$inputLat}').value = lat;\n }\n if (document.getElementById('{$inputLng}') != 'undefined') {\n document.getElementById('{$inputLng}').value = lng;\n }\n }\n });\n})();\nJS\n , \\yii\\web\\View::POS_READY);\n }",
"function hrld_auto_complete_js(){\n\t$hrld_ajax_data = array(\n\t\t'my_nonce' => wp_create_nonce('hrld_media_nonce')\n\t);\n\twp_enqueue_script('jquery-ui-autocomplete');\n\twp_enqueue_script('hrld_media_credit_js', plugins_url().'/hrld-media-credit/hrld_media_credit_js.js', array('jquery','jquery-ui-autocomplete'));\n\twp_localize_script('hrld_media_credit_js','hrld_media_data', $hrld_ajax_data);\n\t\n\t$hrld_users = get_users(array('order'=>'ASC', 'orderby'=>'login', 'role__not_in'=>'subscriber'));\n\t$hrld_user_tags = array();\n\tforeach( $hrld_users as $hrld_user){\n\t\t$hrld_user_tags[] = array( 'label'=>$hrld_user->display_name, 'value'=>$hrld_user->user_login);\n\t}\n\twp_localize_script( 'hrld_media_credit_js', 'hrld_user_tags', $hrld_user_tags);\n\techo '<style type=\"text/css\">.ui-front{z-index:1600000 !important;}</style>';\n}",
"function og_field_audience_autocomplete($field_name, $string = '') {\n $field = field_info_field($field_name);\n\n $match = isset($field['widget']['autocomplete_match']) ? $field['widget']['autocomplete_match'] : 'contains';\n $matches = array();\n\n $groups = og_field_audience_potential_groups($string, $match, array(), 10);\n foreach ($groups as $gid => $label) {\n // Add a class wrapper for a few required CSS overrides.\n $matches[$label . \" [gid:$gid]\"] = '<div class=\"group-autocomplete\">' . $label . '</div>';\n }\n drupal_json_output($matches);\n}",
"function addAddressFieldJsAction(){\n $this->addr_f->js('keyup',\n $this->js()->_selectorThis()->rvadym_gmap_form()->getCoordByAddr($this->api->url(null,array('rvadym_gmap_action'=>'getAddress'))\n ));\n }",
"function _fields_autocomplete($string) {\n\t// JSON with Fields Nodes\n\t$type = \"gcaba_form_field\"; \n\t$nodes = node_load_multiple(array(), array('type' => $type)); \n\t$rta = array();\n\n\tforeach ($nodes as $key => $value) {\n\t\tif(!empty($string)){\n\t\t\tif(stripos($value->title, $string) !== false ){\n\t\t\t\t$rta[$value->title] = $value->title;\n\t\t\t}\n\t\t}else{\n\t\t\t$rta[$value->title] = $value->title;\n\t\t}\n\t\t\n\t}\n\n\tprint drupal_json_output( $rta );\n}",
"function autoCompleteCustomerID() {\n\t\t$keyword = $this -> input -> post('term');\n\t\t$data['response'] = 'false';\n\t\t$query = $this -> customer_model -> auto_pdt($keyword);\n\t\tif ($query -> num_rows() > 0) {\n\t\t\t$data['response'] = 'true';\n\t\t\t$data['message'] = array();\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\t$data['message'][] = array('label' => $row -> rc_num, 'value' => $row -> rc_num);\n\t\t\t}\n\t\t}\n\t\techo json_encode($data);\n\t}",
"function create_field( $field ) {\n\n\tacf_render_field( $field );\n\n}"
] | [
"0.70474494",
"0.61653334",
"0.5936225",
"0.570497",
"0.5685057",
"0.56514513",
"0.56263757",
"0.55703753",
"0.54733294",
"0.5371279",
"0.5317914",
"0.5313406",
"0.52224326",
"0.5184966",
"0.5163404",
"0.5153336",
"0.5142709",
"0.5128366",
"0.5097404",
"0.5088696",
"0.50233424",
"0.5020415",
"0.50035936",
"0.49983582",
"0.49979818",
"0.49963617",
"0.49943194",
"0.49780372",
"0.49664488",
"0.4940063"
] | 0.62133586 | 1 |
Returns the content from SessionHelper::flash() for the passed in $key. | public function _flash_content($key = "flash") {
return $this->Session->flash($key, array("element" => null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _flashContent($key = 'flash') {\n\t\treturn \"Flash content\";\n\t}",
"public function get(string $key)\n {\n if(isset($_SESSION['flash'][$key])) {\n $message = $_SESSION['flash'][$key];\n unset($_SESSION['flash'][$key]);\n return $message;\n }\n\n return NULL;\n }",
"public static function get(string $key): string\n {\n if (session_status() === PHP_SESSION_NONE) {\n session_start();\n }\n if (empty($_SESSION['flash'][$key])) {\n return '';\n }\n $message = $_SESSION['flash'][$key];\n unset($_SESSION['flash'][$key]);\n return $message;\n }",
"function getFlash($key) {\n\treturn Yii::app()->user->getFlash($key);\n}",
"protected function get_flash($key)\n\t{\n\t\t$flash_key = 'bwp_op_flash_' . $key;\n\n\t\tif (!isset($_SESSION[$flash_key]))\n\t\t{\n\t\t\t$flashes = array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$flashes = (array) $_SESSION[$flash_key];\n\t\t\tunset($_SESSION[$flash_key]);\n\t\t}\n\n\t\treturn $flashes;\n\t}",
"public static function getFlash($key)\n {\n if (isset($_SESSION[$key])) {\n $value = $_SESSION[$key];\n unset($_SESSION[$key]);\n return $value;\n }\n\n return null;\n }",
"public function flashdata(string $key)\n {\n if (!session()->has($key)) {\n return false;\n }\n\n return session()->getFlashdata($key);\n }",
"function getFlash ($key) {\n $val = null;\n if (isset($_SESSION[$key])) {\n $val = $_SESSION[$key];\n unset($_SESSION[$key]);\n }\n return $val;\n }",
"public function getFlash($key)\n {\n\n return (($this->flash) && (property_exists($this->flash, $key)) ? $this->flash->$key : null);\n\n }",
"public function getFlashData($key = null) {\n if (is_null($key)) return false;\n if (!isset($this->flashData[$key])) return false;\n return $this->flashData[$key];\n }",
"function flash(string $key)\n\t{\n\t\t$value = $this->get($key);\n\t\t$this->remove($key);\n\t\treturn $value;\n\t}",
"public static function flash($key)\n {\n if(self::exists($key))\n {\n $session = self::get($key);\n self::delete($key);\n return $session;\n }\n }",
"public function flashdata( $key = NULL )\n\t\t{\n\t\t\tif ( isset( $key ) )\n\t\t\t{\n\t\t\t\treturn ( isset( $_SESSION[ '__session_vars' ], $_SESSION[ '__session_vars' ][ $key ], $_SESSION[ $key ] ) && ! is_int( $_SESSION[ '__session_vars' ][ $key ] ) )\n\t\t\t\t\t? $_SESSION[ $key ]\n\t\t\t\t\t: NULL;\n\t\t\t}\n\n\t\t\t$flashdata = array();\n\n\t\t\tif ( ! empty( $_SESSION[ '__session_vars' ] ) )\n\t\t\t{\n\t\t\t\tforeach ( $_SESSION[ '__session_vars' ] as $key => &$value )\n\t\t\t\t{\n\t\t\t\t\tis_int( $value ) OR $flashdata[ $key ] = $_SESSION[ $key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $flashdata;\n\t\t}",
"public function flashdata($key = NULL)\n\t{\n\t\tif (isset($key))\n\t\t{\n\t\t\treturn (isset($_SESSION['__ci_vars'], $_SESSION['__ci_vars'][$key], $_SESSION[$key]) && ! is_int($_SESSION['__ci_vars'][$key]))\n\t\t\t\t? $_SESSION[$key]\n\t\t\t\t: NULL;\n\t\t}\n\n\t\t$flashdata = array();\n\n\t\tif ( ! empty($_SESSION['__ci_vars']))\n\t\t{\n\t\t\tforeach ($_SESSION['__ci_vars'] as $key => &$value)\n\t\t\t{\n\t\t\t\tis_int($value) OR $flashdata[$key] = $_SESSION[$key];\n\t\t\t}\n\t\t}\n\n\t\treturn $flashdata;\n\t}",
"public function flashdata($aKey) {\n return array_key_exists($aKey, $this->session->flashdata) ? $this->session->flashdata[$aKey]\n : null;\n }",
"public function flash($key = \"flash\", $options = array()) {\n\t\t$content = $this->_flash_content($key);\n\t\tif (empty($content)) { return ''; }\n\t\t$close = false;\n\t\tif ((isset($options['closable']) && $options['closable'])) {\n\t\t\t$close = true;\n\t\t}\n\t\treturn $this->alert($content, array(\"style\" => $key, \"closable\" => $close));\n\t}",
"public function get($key)\n {\n if ($this->has($key)) {\n $flashMessages = $this->storage->get(self::FLASH_KEY);\n $message = $flashMessages[$key];\n\n $this->remove($key);\n\n if ($this->translator instanceof TranslatorInterface) {\n $message = $this->translator->translate($message);\n }\n\n return $message;\n } else {\n throw new RuntimeException(sprintf(\n 'Attempted to read non-existing key %s', $key\n ));\n }\n }",
"function session_flashed($key = null, $default = [])\n {\n if ($key === null)\n {\n return cutlass('session')->getFlashBag();\n }\n\n return cutlass('session')->getFlashBag()->get($key, $default);\n }",
"public function flash($key, $value);",
"function session_flashed($key = null, $default = [])\n {\n if ($key === null) {\n return cartrabbit('session')->getFlashBag();\n }\n return cartrabbit('session')->getFlashBag()->get($key, $default);\n }",
"public function getFlash($key, $defaultValue = NULL, $delete = true) {\n\t\treturn Yii::app()->user->getFlash($key, $defaultValue, $delete);\n\t}",
"public static function flash(string $key, string $msg = '')\r\n\t{\r\n\r\n\t\t// Nachricht erstellen\r\n\t\tif(!self::has($key)) self::put($key, $msg);\r\n\r\n\t\t// Nachricht auslesen und löschen\r\n\t\telse {\r\n\t\t\t$message = self::get($key);\r\n\t\t\tself::delete($key);\r\n\t\t\treturn $message;\r\n\t\t}\r\n\t}",
"public static function flash_get($key, $keep = false) {\n // If we don't already have it, get a copy of the session\n self::$session = isset(self::$session) ? self::$session : Session::instance();\n \n $value = self::$session->get($key, null);\n \n $keep ? null : self::$session->delete($key);\n \n return $value;\n }",
"public static function flash($_key = null, $_argument = null, $_message = null) {\n\n // Add message to the session.\n if (!is_null($_key) and !is_null($_argument)) {\n\n // If key is errors, just set the returned\n // array with the errors list.\n if ($_key == 'errors') {\n Session::set($_key, $_argument);\n }\n // Continue normally with set custom\n // session flash message.\n else {\n Session::set($_key, [\n 'title' => $_argument,\n 'message' => $_message\n ]);\n }\n }\n // Display the flash message and then unset \n // from current session.\n else {\n $_value = Session::get($_key);\n \n if ($_value !== false and !empty($_value)) {\n Session::uset($_key);\n return $_value;\n }\n }\n\n return '';\n\n }",
"public function flash($key, $value) {\n\t\t$this->newFlashData[$key] = $value;\n\t\t$this->allFlashData[$key] = $value;\n\t\t$_SESSION[$this->token . '_flash'][$key] = $this->encrypt($this->serialize($value));\n\t}",
"function flash($key = null, $value = null)\n{\n\tif(!is_null($key)) // getter/setter\n\t{\n\t\tif(!is_null($value)) // setter\n\t\t{\n\t\t\tdrone()->flash->set($key, $value);\n\t\t\treturn;\n\t\t}\n\n\t\treturn drone()->flash->get($key); // getter\n\t}\n\treturn drone()->flash;\n}",
"public function getFlash()\n {\n $message = isset($_SESSION['flash']) ? $_SESSION['flash'] : null;\n unset($_SESSION['flash']);\n return $message;\n }",
"public function removeFlash($key);",
"public function get_flash(){\n\t\t$return = $this->get('HarmonySetFlash');\n\t\t$this->delete('HarmonySetFlash');\n\t\treturn !empty($return) ? $return : '';\n\t}",
"public function keep_flashdata($key)\n\t{\n\t\t$this->mark_as_flash($key);\n\t}"
] | [
"0.79203856",
"0.7916692",
"0.7852158",
"0.77494365",
"0.77320486",
"0.7728076",
"0.7617923",
"0.7613877",
"0.7582813",
"0.74642926",
"0.74574435",
"0.7312977",
"0.7095871",
"0.70289516",
"0.6993993",
"0.68293256",
"0.6759184",
"0.66051817",
"0.6527866",
"0.65107125",
"0.6510243",
"0.65097034",
"0.6509079",
"0.6452385",
"0.6422427",
"0.6382037",
"0.6374005",
"0.6368243",
"0.63200754",
"0.6307483"
] | 0.87297356 | 0 |
Displays the alertmessage.blockmessgae div's from the twitter bootstrap. | public function block($message = null, $options = array()) {
$style = "warning";
$valid = array("warning", "success", "info", "error");
if (isset($options["style"]) && in_array($options["style"], $valid)) {
$style = $options["style"];
}
$class = "alert-message block-message {$style}";
$close = $links = "";
if (isset($options["closable"]) && $options["closable"]) {
$close = '<a href="#" class="close">x</a>';
}
if (isset($options["links"]) && !empty($options["links"])) {
$links = $this->Html->tag(
"div",
implode("", $options["links"]),
array("class" => "alert-actions")
);
}
return $this->Html->tag("div", $close.$message.$links, array("class" => $class));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run() {\n\t\tparent::run();\n\t\t\n\t\t$flashMessages = Yii::app()->user->getFlashes();\n\t\t\n\t\tif (is_array($flashMessages) and count($flashMessages)) {\n\t\techo EBootstrap::openTag('div', $this->htmlOptions);\n\t\t\tforeach ($flashMessages as $key => $message) {\n\t\t\t\tif (substr($key, 0, 5) == 'block') {\n\t\t\t\t\t$block = true;\n\t\t\t\t\t$key = substr($key, 6);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$block = false;\n\t\t\t\t\n\t\t\t\t$this->widget('EBootstrapAlert', array(\n\t\t\t\t\t'type' => $key,\n\t\t\t\t\t'message' => $message,\n\t\t\t\t\t'block' => $block,\n\t\t\t\t));\n\t\t\t}\n\t\techo EBootstrap::closeTag('div');\n\t\t}\n\t}",
"function show_message() {\n\t\t\tglobal $wp;\n\n\t\t\tload_template( CATCHUPDATER_PATH . 'template/template-maintainance-message.php' );\n\n\t\t}",
"public function display(){\n\t\t/**\n\t\t * Use an offset to display the message even if there is a redirection\n\t\t */\n\n\t\tif(isset($_SESSION['flash']['message'])){\n\t\t\t$html = '<div class=\"alert-box ' . $_SESSION['flash']['type'] . '\">' . $_SESSION['flash']['message'] . '<a href=\"#\" class=\"close\">×</a></div>';\n\n\t\t\t$_SESSION['flash'] = array();\n\n\t\t\treturn $html;\n\t\t}\n\t}",
"function core_message_standard_after_main_region_html() {\n return \\core_message\\helper::render_messaging_widget(true, null, null);\n}",
"public function showAlert($message) {\r\n echo '\r\n <script>\r\n alert(\"'.$message.'\");\r\n </script>\r\n ';\r\n }",
"function kibooMessageAlert($text){\n echo '<div id=\"setting-error-settings_updated\" class=\"notice notice-success settings-error is-dismissible\">\n <p><strong>'.$text.'</strong></p><button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">Descartar este aviso.</span></button></div>';\n}",
"function showMessage()\n {\n // Is there an error message to show the user?\n if (isset($_SESSION[\"message\"]))\n {\n $this->setCurrentBlock(\"message\");\n $this->setVariable(\"INFO_MESSAGE\", $_SESSION[\"message\"]);\n $this->parseCurrentBlock(\"message\");\n\n // Clear the error message\n unset($_SESSION[\"message\"]);\n }\n }",
"static public function printMessages(){\n\n $messages = self::getMessages();\n\n print \"<ul>\";\n foreach($messages as $message){\n print \"<li class=\\\"alert alert-success\\\">{$message}</li>\";\n }\n print \"</ul>\";\n }",
"public function displayStopAlert($message,$refresh_time=0,$with_menu=true) {\n if( $this->hidelay )\n $this->pushMessage($message);\n $errorcode = '\n<div id=\"mysbAlerts\">\n <div>\n <div><img src=\"images/icons/dialog-error.png\" alt=\"Error\"></div>\n <div style=\"1padding-right: 15px;\">'.$message.'</div>\n </div>\n</div>\n<script type=\"text/javascript\">offSpin();</script>';\n ob_end_clean();\n ob_start();\n echo $errorcode;\n $content = ob_get_clean();\n $this->view_menu(true);\n $this->view_refresh($refresh_time);\n echo $this->view_render($this->msgWrite().$content.$this->layerWrite());\n die;\n }",
"public function popup_message_model() { ?>\n <div class=\"bwlive-bit-hide bwlive_overlay\">\n <span class=\"bw-close\">X</span>\n <p class=\"bwlive-msg\"><?php esc_html_e( 'You don\\'t have a booking right now', 'bitlive-custom-codes' ); ?></p>\n </div>\n\t\t<?php\n\t}",
"private function alert($message) {\n $this->load->helper('html'); \n $this->data['error'] = heading($message,3);\n }",
"private function alert($message) {\n $this->load->helper('html'); \n $this->data['error'] = heading($message,3);\n }",
"function show_alert ($msg, $type){\n echo '<div class=\"alert alert-'.$type.'\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n <strong>'.$type.'!</strong> '.$msg.'\n </div>';\n }",
"function cminds_show_message( $message, $errormsg = false ) {\n\n\t\t$messageHash = md5( $message );\n\t\t$nonce\t\t = wp_create_nonce( $messageHash );\n\t\t$url\t\t = add_query_arg( array( 'cminds_dismiss_notice' => $nonce ) );\n\t\tob_start();\n\t\t?>\n\t\t<script>\n\t\t\tjQuery( document ).ready( function () {\n\t\t\t\tsetTimeout( function () {\n\t\t\t\t\tjQuery( '.cminds-notice.<?php echo esc_attr( $nonce ); ?> .notice-dismiss ' ).replaceWith( jQuery(\n\t\t\t\t\t\t'<a href=\"<?php echo esc_url( $url ); ?>\" type=\"button\" class=\"notice-dismiss\">' +\n\t\t\t\t\t\t'<span class=\"screen-reader-text\">Dismiss this notice.</span>' +\n\t\t\t\t\t\t'</a>'\n\t\t\t\t\t\t) );\n\t\t\t\t}, 500 );\n\t\t\t} );\n\t\t</script>\n\t\t<?php\n\t\t$content\t = ob_get_clean();\n\t\techo $content;\n\n\t\tif ( $errormsg ) {\n\t\t\techo '<div id=\"message\" class=\"cminds-notice error notice is-dismissible ' . esc_attr( $nonce ) . '\">';\n\t\t} else {\n\t\t\techo '<div id=\"message\" class=\"cminds-notice updated fade notice is-dismissible ' . esc_attr( $nonce ) . '\">';\n\t\t}\n\n\t\techo \"<p><strong>$message</strong></p>\";\n\t\techo \"</div>\";\n\t}",
"function alert(){\n\t\tif(count(@$_SESSION['messageToAlert']) > 0){\n\t\t\tif($this->setting('alert') == 1) echo '<script type=\"text/javascript\"> alert(\\''.str_replace(\"'\",\"\\'\",implode('\\n',$_SESSION['messageToAlert'])).'\\');</script>';\n\t\t\techo '<div class=\"alert\">'.implode(\"<br />\",$_SESSION['messageToAlert'] ).'</div>';\n\t\t\t$_SESSION['messageToAlert'] = array();\n\t\t}\n\t}",
"protected function showAlerts()\r\n {\r\n $processAlerts = function ($key, $path) {\r\n $result = '';\r\n $messages = !empty($_SESSION[$key]) ? $_SESSION[$key] : [];\r\n $_SESSION[$key] = [];\r\n\r\n foreach ($messages as $row) {\r\n $result .= UParser::parsePHPFile(\r\n $path,\r\n array(\r\n 'message' => $row\r\n )\r\n );\r\n }\r\n\r\n return $result;\r\n };\r\n\r\n $messages = $processAlerts('__page_alert', VIEW_PATH . 'blocks/Alerts/message.tpl');\r\n $messages .= $processAlerts(self::ErrorKey, VIEW_PATH . 'blocks/Alerts/error.tpl');\r\n $this->insertIntoResponse( $messages );\r\n }",
"function showMessage($type, $message)\n\n{\n\n echo\n\n '<div class=\"wrap wpfi-content alert alert-' . $type . '\" role=\"alert\">\n\n ' . $message . '\n\n </div>';\n}",
"function flash_message()\n {\n $ci =& get_instance();\n $flashmsg = $ci->session->flashdata('message');\n\n $html = '';\n if (is_array($flashmsg))\n {\n $html = '<div id=\"flashmessage\" class=\"'.$flashmsg[type].'\">\n <img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'images/cross.png\" />\n <strong>'.$flashmsg['title'].'</strong>\n <p>'.$flashmsg['content'].'</p>\n </div>';\n }\n return $html;\n }",
"function magic_message($message_to_display)\n{\n\nglobal $alert_box;\n\n$alert_box=\nmagic_css().'<!-- The Modal -->\n\t<div id=\"msg_alert_myModal\" class=\"msg_alert_modal\" onclick=\"this.style.display=\\'none\\';\" style=\"z-index:999;\">\n\t <!-- Modal content -->\n\t <div class=\"msg_modal-content \">\n\t <span class=\"msg_modalclose\" onclick=\"document.getElementById(\\'msg_alert_myModal\\').style.display=\\'none\\';\">×</span>\n\t <p>'.$message_to_display.'</p>\n\t </div>\n\t</div>';\n\n\nreturn $alert_box;\n}",
"public function print_message($message) {\r\n global $tpl;\r\n $tpl->setCurrentBlock('message_block');\r\n $html = '';\r\n // $message kommt als indexiertes Array daher, wobei alle geraden indices den \r\n // Wert der Klasse (error/success) darstellen, alle ungeraden Werte den Meldungstext \r\n if (count($message) > 0) {\r\n foreach ($message as $index => $value) {\r\n if ($index % 2 == 0) {\r\n $html .= '<span class=\"' . $value . '\">';\r\n } else {\r\n $html .= $value . '</span><br />' . \"\\n\";\r\n }\r\n }\r\n $tpl->setVariable('meldung', $html);\r\n } else {\r\n $tpl->setVariable('class_meldung', 'hide');\r\n }\r\n $tpl->parseCurrentBlock();\r\n }",
"public function onPageContentRaw()\n {\n\n // Manage Popup Message displaying\n $this->displayPopupMessage = false;\n if ($this->config->get('plugins.detect-adblock.popup.message.enabled') &&\n !$this->config->get('plugins.detect-adblock.inside.blockreading.enabled')) {\n $this->displayPopupMessage = true;\n }\n $this->grav['twig']->twig_vars['adblock_popup_displayed'] = $this->displayPopupMessage;\n\n // Read message from data caching\n $locator = $this->grav['locator'];\n $lang = $this->grav['language']->getLanguage();\n\n // Popup Message\n if($this->displayPopupMessage) {\n $message = null;\n $path = $locator->findResource('user://data/detect-adblock/popup-message-content.' . $lang . '.md');\n if(!$path) {\n $path = $locator->findResource('user://data/detect-adblock/popup-message-content.all.md');\n }\n if($path) {\n $message = file_get_contents($path);\n }\n if(!$message){\n $message = 'Bad configuration of Message to Display in Plugin parameters.';\n }\n\n $this->grav['twig']->twig_vars['adblock_popup_message_content'] = $message;\n\n } else {\n // Inside Message\n $message = null;\n $path = $locator->findResource('user://data/detect-adblock/inside-message-content.' . $lang . '.md');\n if(!$path) {\n $path = $locator->findResource('user://data/detect-adblock/inside-message-content.all.md');\n }\n if($path) {\n $message = file_get_contents($path);\n }\n if(!$message){\n $message = 'Bad configuration of Message to Display in Plugin parameters.';\n }\n\n $this->grav['twig']->twig_vars['adblock_inside_message_content'] = $message;\n }\n }",
"function editAlert($inner_text, $alert_type) {\n ?>\n <div class=\"alert <?php echo $alert_type; ?> alert-dismissible fade show animated bounceInLeft\" id=\"adminAlert\" role=\"alert\">\n <?php echo $inner_text; ?>\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <?php\n }",
"function bsalert($alertType,$message,$alertMain=\"\",$alertflag=\"p\") {\n\t\tif($alertType == 'S') {\n\t\t\t$alertHead = \"success\";\n\t\t\tif($alertflag!=\"p\") {\n\t\t\t\t$alertMain = \"Success !\";\n\t\t\t}\n\t\t} else if($alertType == 'E') {\n\t\t\t$alertHead = \"danger\";\n\t\t\tif($alertflag!=\"p\") {\n\t\t\t\t$alertMain = \"Error !\";\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$alrt = '<div class=\"alert alert-'.$alertHead.' fade in text-center bsalertdil\">\n\t\t\t\t\t<a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n\t\t\t\t\t<strong>'.$alertMain .'</strong> '. $message.'.\n\t\t\t\t</div>';\n\t\treturn $alrt;\n\t}",
"function notifications($block = '', $message = '')\n {\n\n //set message and visibility of notification\n $this->data['visible'][$block] = 1;\n $this->data['vars']['notification'] = $message;\n }",
"public function pushAlert($message) {\n $this->Alerts .= '\n <div>\n <div><img src=\"images/icons/dialog-warning.png\" alt=\"Error\"></div>\n <div>'.$this->MsgCleaner($message).'</div>\n </div><br>';\n }",
"function hh_fe_notify($title,$message,$type='info') {\n echo '\n <div style=\"margin:1em;\" class=\"alert alert-'.$type.' alert-dismissable\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\n <p>\n <strong>'.$title.'</strong> - <span>'.$message.'</span>\n </p>\n </div>\n ';\n}",
"public static function printErrorMsg()\n {\n echo \"<div class='text-center alert alert-danger alert-dismissible fade show fixed-bottom' role='alert'>\n <strong>Errore! </strong>\" . self::$error_msg . \"\n <button type='button' class='close' data-dismiss='alert' aria-label='Close'>\n <span aria-hidden='true'>×</span></button></div>\";\n }",
"function displayMessages() {\n $messages = getMessages();\n foreach ($messages as $key => $message) {\n if($key === 1) {\n echo \"<div class='alert alert-success w-50 mx-auto'>\" . $message . \"</div>\";\n }\n if ($key === 2) {\n echo \"<div class='alert alert-danger w-50 mx-auto'>\" . $message . \"</div>\";\n }\n }\n}",
"function toast($message, $id = 'alert-discount', $class = 'alert-warning') {\n /*\n echo \"<script type='text/javascript'>toast('$message');</script>\"; */\n if (!empty($message)) {\n echo '<div class=\"container\">\n\t\t\t\t\t<div id=\"' . $id . '\" class=\"row alert ' . $class . ' fade in\" role=\"alert\">\n\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Chiudi\">\n\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<span class=\"glyphicon glyphicon-alert\" aria-hidden=\"true\"></span> ' . $message . '\n\t\t\t\t\t</div>\n\t\t\t\t </div>';\n }\n return '';\n }",
"function portal_show_error_success_messages() {\n\t\tif($codes = portal_errors()->get_error_codes()) {\n\t\t\techo '<div class=\"job_errors\">';\n\t\t\t // Loop error codes and display errors\n\t\t\t foreach($codes as $code){\n\t\t\t $message = job_errors()->get_error_message($code);\n\t\t\t echo '<div id=\"setting-error-settings_updated\" class=\"updated settings-error notice is-dismissible\"><p><strong>'.$message.'</strong></p><button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">Dismiss this notice.</span></button></div>';\n\t\t\t }\n\t\t\techo '</div>';\n\t\t}\t\n\t}"
] | [
"0.6993768",
"0.6551045",
"0.65092343",
"0.6211823",
"0.6195708",
"0.6149159",
"0.61487734",
"0.6147933",
"0.61327225",
"0.6121199",
"0.6110709",
"0.6110709",
"0.6073915",
"0.6073124",
"0.60633737",
"0.6051212",
"0.60192233",
"0.6000781",
"0.5950115",
"0.59385836",
"0.5929576",
"0.592921",
"0.59081346",
"0.58777803",
"0.5873512",
"0.5864528",
"0.5851804",
"0.5849434",
"0.5847291",
"0.583238"
] | 0.6729764 | 1 |
Installs a handler which throws a ShutdownException upon receiving a SIGINT or a SIGALRM. | private function installSignalHandlers(): void
{
declare (ticks = 1);
pcntl_signal(SIGINT, function () {
throw new ShutdownException('Daemon shutdown requested (received SIGINT)');
});
pcntl_signal(SIGALRM, function () {
throw new ShutdownException('Daemon time limit reached (received SIGALRM)');
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function registerShutdownHandler();",
"protected function registerShutdownHandler()\n {\n register_shutdown_function(array($this, 'handleShutdown'));\n }",
"public static function handlerShutdown()\n {\n// if (Ko::$errors && $error = error_get_last() && self::isShutdownError($error['type'])) {\n if (!is_null($error = error_get_last()) && self::isShutdownError($error['type'])) {\n\n // Fake an exception for nice debugging\n Exception::handler(new ErrorException($error['type'], $error['message'], 0, $error['file'], $error['line']));\n }\n }",
"public function shutdown_handler() {\n if ($error = error_get_last()) {\n $this->exception_handler(new \\ErrorException($error['message'],\n $error['type'], 0, $error['file'], $error['line']));\n }\n }",
"public static function _shutdownHandler() {\t\n\t\t$error = error_get_last();\n\t\t\n\t\tif (self::$sendErrors && (in_array($error['type'], self::$unrecoverable))) {\t\n\t\t\tErrbit::instance()->notify(new \\Errbit_Errors_Fatal($error['message'], $error['file'], $error['line']));\n\t\t}\n\t}",
"public static function shutdownHandler()\n {\n if (!Core::$init) {\n // Do not execute when not active\n return;\n }\n\n try {\n if (Core::$caching === true AND Core::$files_changed === true) {\n // Write the file path cache\n Core::cache('\\KORD\\Core::findFile()', Core::$files);\n }\n } catch (\\Exception $e) {\n // Pass the exception to the handler\n Exception::handler($e);\n }\n\n if (Core::$errors AND $error = error_get_last() AND in_array($error['type'], Core::$shutdown_errors)) {\n // Clean the output buffer\n ob_get_level() AND ob_clean();\n\n // Fake an exception for nice debugging\n Exception::handler(new \\ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line']));\n\n // Shutdown now to avoid a \"death loop\"\n exit(1);\n }\n }",
"public function handleShutdown()\n {\n // If we reached this step, we are in shutdown handler.\n // An exception thrown in a shutdown handler will not be propagated\n // to the exception handler. Pass that information along.\n $this->canThrowExceptions = false;\n\n $error = $this->system->getLastError();\n if ($error && Misc::isLevelFatal($error['type'])) {\n // If there was a fatal error,\n // it was not handled in handleError yet.\n $this->allowQuit = false;\n $this->handleError(\n $error['type'],\n $error['message'],\n $error['file'],\n $error['line']\n );\n }\n }",
"public function shutdownHandler()\n {\n // Check what caused the application to shutdown\n $error = error_get_last();\n\n if ($error) {\n // It seems and error occured\n // Get error type\n $type = $this->_getError($error['type']);\n\n // Log error\n \\nanophp\\Libraries\\Application::logger()->log($type, \"{$error['message']} on {$error['file']}:{$error['line']}\");\n }\n }",
"static function enable_fatal_error_handler($handler) {\n\n\t\t\tif($handler) {\n\t\t\t\t\n\t\t\t\tDEBUG_UTIL::$_SHUTDOWN_CALLBACK = new SHUTDOWN_CALLBACK($handler);\n\t\t\t\t\n\t\t\t\tregister_shutdown_function(array(DEBUG_UTIL::$_SHUTDOWN_CALLBACK,\"call\"));\n\t\t\t}\n\t\t}",
"public function setupShutdownHandlerService(): void\n {\n // Set up any global PHP settings from the config service.\n $config = $this->ci->config;\n\n // Display PHP fatal errors natively.\n if (isset($config['php.display_errors_native'])) {\n ini_set('display_errors', $config['php.display_errors_native']);\n }\n\n // Log PHP fatal errors\n if (isset($config['php.log_errors'])) {\n ini_set('log_errors', $config['php.log_errors']);\n }\n\n // Configure error-reporting level\n if (isset($config['php.error_reporting'])) {\n error_reporting($config['php.error_reporting']);\n }\n\n // Configure time zone\n if (isset($config['php.timezone'])) {\n date_default_timezone_set($config['php.timezone']);\n }\n\n // Determine if error display is enabled in the shutdown handler.\n $displayErrors = false;\n if (in_array(strtolower($config['php.display_errors']), [\n '1',\n 'on',\n 'true',\n 'yes',\n ])) {\n $displayErrors = true;\n }\n\n $sh = new ShutdownHandler($this->ci, $displayErrors);\n $sh->register();\n }",
"public static function __SHUTDOWN_FUNC()\r\n\t{\r\n\t\t$result = Adhoc::eachTrap('ErrorHandler',\r\n\t\t\tfunction ($trap)\r\n\t\t\t{\r\n\t\t\t\tforeach ($trap->GetList() as $handler)\r\n\t\t\t\t{\r\n\t\t\t\t\t$result = $handler->shutdown();\r\n\t\t\t\t\tif (!is_null($result)) break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}",
"public function handleShutdown();",
"function shut(){\n\n //get record for the last error that led to this shutdown instance\n $error = error_get_last();\n\n //check if the error type is one of those defined in 'E_FATAL' constant\n if($error && ($error['type'] & E_FATAL)){\n handler($error['type'], $error['message'], $error['file'], $error['line']);\n }\n\n}",
"function sig_handler($signo) \n{\n switch ($signo) {\n case SIGTERM: // Handle shutdown signal\n\t log_info(\"diary-daemon: Terminating process...\");\n\t exit;\n\t break;\n case SIGHUP: // Handle restart signal\n\t log_info(\"diary-daemon: Received restart signal. Ignored.\");\n\t break;\n default: // Handle all other signals\n\t log_info(\"diary-daemon: Received unknown signal.\");\n }\n}",
"public function handleShutdown() {\n $error = error_get_last();\n if ($error) {\n $exception = new ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line']);\n $this->handleException($exception);\n }\n }",
"public function handleShutdown()\n {\n if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) {\n $this->handleException($this->fatalExceptionFromError($error, 0));\n }\n\n $this->vbot->exitObserver->trigger();\n }",
"function _shutdown_handler()\n\t{\n\t\t$last_error = error_get_last();\n\t\tif (isset($last_error) &&\n\t\t\t($last_error['type'] & (E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)))\n\t\t{\n\t\t\t_error_handler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);\n\t\t}\n\t}",
"public function handleShutdown()\n {\n if ($error = error_get_last()) {\n $this->handleError($error['type'], $error['message'], $error['file'], $error['line']);\n }\n }",
"public static function handle_shutdown()\n {\n $error = error_get_last();\n\n # We don't know whether this error has been already handled. The error_get_last\n # function will return E_NOTICE or E_STRICT errors if the stript has shut down\n # correctly. The only error which cannot be recovered from is E_ERROR, we have\n # to check the type then.\n\n if (($error !== null) && ($error['type'] == E_ERROR))\n {\n $e = new FatalError($error['message'], 0, $error['type'], $error['file'], $error['line']);\n OkapiExceptionHandler::handle($e);\n }\n }",
"private function registerShutdownHandler($closure)\n\t{\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')\n\t\t\treturn;\n\n\t\tif (! is_callable($closure))\n\t\t\treturn;\n\n\t\tif ($this->getOutput()->getVerbosity() === OutputInterface::VERBOSITY_QUIET)\n\t\t\treturn;\n\n\t\tdeclare(ticks = 1);\n\t\tpcntl_signal(SIGINT, $closure);\n\t}",
"function signal_handler($signal) \n{\n echo \"Caught a signal!\\n\";\n}",
"public function defaultHandler($sig) {\n switch ($sig) {\n case SIGTERM:\n // Shutdown\n \\PhpTaskDaemon\\Daemon\\Logger::get()->log('Application (' . $this->_identifier . ') received SIGTERM signal (shutting down)', Zend_Log::DEBUG);\n exit;\n case SIGCHLD:\n // Halt\n \\PhpTaskDaemon\\Daemon\\Logger::get()->log('Application (' . $this->_identifier . ') received SIGCHLD signal (halting)', Zend_Log::DEBUG); \n while (pcntl_waitpid(-1, $status, WNOHANG) > 0);\n break;\n case SIGINT:\n // Shutdown\n \\PhpTaskDaemon\\Daemon\\Logger::get()->log('Application (' . $this->_identifier . ') received SIGINT signal (shutting down)', Zend_Log::DEBUG);\n exit;\n break;\n default:\n \\PhpTaskDaemon\\Daemon\\Logger::get()->log('Application (' . $this->_identifier . ') received ' . $sig . ' signal (unknown action)', Zend_Log::DEBUG);\n //exit;\n break;\n }\n }",
"public static function handle_shutdown()\n\t{\n\t\trestore_error_handler();\n\t\t\n\t\trestore_exception_handler();\n\t\t\n\t\tspl_autoload_unregister(array('Carbon', 'auto_load_carbon'));\n\t}",
"protected static function registerShutdownFunction()\n {\n register_shutdown_function(function () {\n if (!is_null($options = error_get_last())) {\n static::handle(new Error($options));\n }\n });\n }",
"public static function init($handler) {\n\t\tself::$pcntl_loaded = extension_loaded('pcntl');\n\t\tif(self::$pcntl_loaded) {\n\t\t\tpcntl_signal(\\SIGINT, $handler);\n\t\t}\n\t\telse {\n\t\t\ttrigger_error('pcntl extension is not loaded.', E_USER_NOTICE);\n\t\t}\n\t}",
"public static function setFatalErrorHandler(){\r\n //Set the Pokelio fatal error handler\r\n register_shutdown_function( \"Pokelio_Error::PokelioFatalErrorHandler\" );\r\n }",
"static function disable_fatal_error_handler() {\n\t\t\t\n\t\t\tif(DEBUG_UTIL::$_SHUTDOWN_CALLBACK)\n\t\t\t\tDEBUG_UTIL::$_SHUTDOWN_CALLBACK->unregister();\n\t\t}",
"public function handle_shutdown() {\n\t\t// Since we can not unregister a shutdown function, simply don't do\n\t\t// anything if we aren't registered\n\t\tif ($this->is_registered === false) {\n\t\t\treturn;\n\t\t}\n\t}",
"function sig_handler(int $signal, $siginfo = null)\n{\n global $exitsignalled, $gracefulexitsignalled;\n\n logmsg(LOG_DEBUG, \"Signal $signal received\");\n\n switch ($signal) {\n case SIGHUP:\n $gracefulexitsignalled = true;\n // no break\n case SIGINT: # Ctrl+C\n case SIGTERM:\n $exitsignalled = true;\n }\n}",
"public function onShutdown()\n {\n $error = error_get_last();\n if ($error === null) {\n return;\n }\n if (($error['type'] & error_reporting()) === 0) {\n return;\n }\n $exc = new Errors\\Fatal($error['message'], debug_backtrace());\n $this->notifier->notify($exc);\n }"
] | [
"0.7044441",
"0.68130034",
"0.6389585",
"0.6345443",
"0.6330554",
"0.61509025",
"0.6121298",
"0.6107134",
"0.6102914",
"0.6062331",
"0.5953546",
"0.58568275",
"0.58341587",
"0.58307964",
"0.58015496",
"0.57951176",
"0.5785038",
"0.577535",
"0.57402194",
"0.5717987",
"0.56651455",
"0.56485724",
"0.56146485",
"0.5580065",
"0.5578696",
"0.55658615",
"0.5559154",
"0.55471045",
"0.5530188",
"0.55024946"
] | 0.77315116 | 0 |
Checks the current PHP process against the limits specified in a daemon options object. This function will also throw an exception if the daemon has been flagged for shutdown. | private function checkDaemonLimits(): void
{
if ($this->isShutdown) {
throw new ShutdownException($this->shutdownMessage);
}
pcntl_signal_dispatch();
if (DaemonOptions::NO_LIMIT !== $this->requestLimit) {
if ($this->requestLimit <= $this->requestCount) {
throw new ShutdownException('Daemon request limit reached ('.$this->requestCount.' of '.$this->requestLimit.')');
}
}
if (DaemonOptions::NO_LIMIT !== $this->memoryLimit) {
$memoryUsage = memory_get_usage(true);
if ($this->memoryLimit <= $memoryUsage) {
throw new ShutdownException('Daemon memory limit reached ('.$memoryUsage.' of '.$this->memoryLimit.' bytes)');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function doRaisePhpLimits()\n {\n $phpLimits = array(\n 'memory_limit' => $this->memoryLimit,\n 'max_execution_time' => $this->maxExecutionTime,\n 'pcre.backtrack_limit' => $this->pcreBacktrackLimit,\n 'pcre.recursion_limit' => $this->pcreRecursionLimit\n );\n\n // If current settings are higher respect them.\n foreach ($phpLimits as $name => $suggested) {\n $current = $this->normalizeInt(ini_get($name));\n // memory_limit exception: allow -1 for \"no memory limit\".\n if ($current > -1 && ($suggested == -1 || $current < $suggested)) {\n ini_set($name, $suggested);\n }\n }\n }",
"private function setupDaemon(DaemonOptionsInterface $daemonOptions): void\n {\n $this->requestCount = 0;\n $this->requestLimit = (int) $daemonOptions->getOption(DaemonOptions::REQUEST_LIMIT);\n $this->memoryLimit = (int) $daemonOptions->getOption(DaemonOptions::MEMORY_LIMIT);\n $this->autoShutdown = (bool) $daemonOptions->getOption(DaemonOptions::AUTO_SHUTDOWN);\n\n $timeLimit = (int) $daemonOptions->getOption(DaemonOptions::TIME_LIMIT);\n\n if (DaemonOptions::NO_LIMIT !== $timeLimit) {\n pcntl_alarm($timeLimit);\n }\n\n $this->installSignalHandlers();\n }",
"public function getCheckLimits() {\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t\n\t\t/* Check for maximum execution time */\n\t\t$timepassed = time() - $this->_starttime;\n\t\t\n\t\tif (($timepassed + 5) > ini_get('max_execution_time') && ini_get('max_execution_time') > 0) {\n\t\t\t$csvilog->AddStats('information', JText::_('MAXIMUM_EXECUTION_LIMIT_EXCEEDED').$timepassed.JText::_('seconds'));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/* Check for maximum memory usage */\n\t\tif (!function_exists('memory_get_usage')) return true;\n\t\telse {\n\t\t\t/* Get the size of the statistics */\n\t\t\t$statslength = 0;\n\t\t\tif (isset($csvilog->stats)) {\n\t\t\t\tforeach ($csvilog->stats as $type => $value) {\n\t\t\t\t\tif (isset($value['message'])) $statslength += strlen($value['message']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$statslength = round($statslength/(1024*1024));\n\t\t\t\n\t\t\t/* Get the size of the debug message */\n\t\t\t$debuglength = round(strlen($csvilog->debug_message)/(1024*1024));\n\t\t\t\n\t\t\t/* Get the size of the active memory in use*/\n\t\t\t$activelength = round(memory_get_usage()/(1024*1024));\n\t\t\t\n\t\t\t/* Combine memory limits*/\n\t\t\t$totalmem = $activelength + $statslength + $debuglength;\n\t\t\t\n\t\t\t/* Set the memory limit */\n\t\t\tJRequest::setVar('maxmem', $totalmem);\n\t\t\t\n\t\t\t/* Check if we are passing the memory limit */\n\t\t\tif (($totalmem * 1.5) > (int)ini_get('memory_limit')) {\n\t\t\t\t$csvilog->AddStats('information', JText::_('MAXIMUM_MEMORY_LIMIT_EXCEEDED').' '.$totalmem.JText::_('MB'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t /* All is good return true */\n\t\t\treturn true;\n\t\t}\n\t}",
"private function validateIfVipLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n } catch (Exception $e) {\n throw $e;\n }\n }",
"static function checkMemoryLimit() {\n\n $mem = self::getMemoryLimit();\n if ($mem == \"\") {\n return 0;\n }\n if ($mem == \"-1\") {\n return 1;\n }\n if ($mem < (64*1024*1024)) {\n return 2;\n }\n return 3;\n }",
"private function checkLimitRunningProcesses(): void\n {\n while (count($this->currentJobs) >= self::NUMBER_MAX_RUNNING_PROCESSES) {\n $this->removeStoppedJobs();\n $this->logger->debug(sprintf(self::LOG_WAITING_JOB_FINISH, count($this->currentJobs)));\n\n sleep(self::TIMEOUT_IN_SECONDS);\n }\n }",
"function set_time_limit(int $seconds): bool\n{\n // Disable set_time_limit to not stop the worker\n // by default CLI sapi use 0 (unlimited)\n return true;\n}",
"public function checkIntervalLimit()\n {\n if (strtotime('- '.$this->config->getIntervalLimit(). ' second') >= $this->data['period']['lastDate']) {\n return true;\n }\n if ($this->data['intervalMaxRequest'] < 1) {\n $this->execBan('Interval');\n return false;\n }\n return true;\n }",
"protected function stopIfNecessary(ProcessingOptions $options)\n {\n if ($this->shouldQuit) {\n $this->stop();\n }\n\n if ($this->memoryExceeded($options->memory)) {\n $this->stop(12);\n }\n }",
"protected function stopIfNecessary(ProcessingOptions $options)\n {\n if ($this->shouldQuit) {\n $this->stop();\n }\n\n if ($this->memoryExceeded($options->memory)) {\n $this->stop(12);\n }\n }",
"public function checkIPLimit()\r\n {\r\n if ($this->ip_limit === $this::ON) {\r\n\r\n $startTime = TimeHelper::startTime($this->ip_limit_period);\r\n\r\n $ip = Yii::$app->getRequest()->getUserIP();\r\n\r\n if ($ip === \"::1\") {\r\n // Usefull when app run in localhost\r\n $ip = \"81.2.69.160\";\r\n }\r\n\r\n $submissions = FormSubmission::find()->select('id')->asArray()\r\n ->where(['form_id' => $this->id])\r\n ->andWhere(['between','created_at', $startTime, time()])\r\n ->andWhere(['ip' => $ip])\r\n ->count();\r\n\r\n if ($this->ip_limit_number <= $submissions) {\r\n /** @var \\yii\\web\\Response $response */\r\n $response = Yii::$app->getResponse();\r\n $response->format = Response::FORMAT_JSON;\r\n $response->data = array(\r\n 'action' => 'submit',\r\n 'success' => false,\r\n 'id' => 0,\r\n 'message' => Yii::t(\"app\", \"You have reached your Submission Limit per {period}.\", [\r\n 'period' => TimeHelper::getPeriodByCode($this->ip_limit_period)]),\r\n );\r\n $response->send();\r\n\r\n exit;\r\n }\r\n }\r\n }",
"private function validateIfPeopleLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n $this->validateIfQueueHasPenddings('vipSmall');\n } catch (Exception $e) {\n throw $e;\n }\n }",
"public function isExceeded();",
"private function checkLimitations()\n {\n// @todo : build this out into a service\n if ($this->checkLocomotion()) {\n return true;\n }\n return false;\n }",
"protected static function shouldLimit($worker_limit = null)\n {\n if (is_null($worker_limit)) {\n $worker_limit = self::MAX_WORKER_COUNT;\n }\n\n // get a count of how many slipstream processes are running\n $cmd = 'ps ax | grep bin\\/slipstream | grep -v grep | wc -l';\n $output = `$cmd`;\n $workers = intval(trim($output));\n\n if ($workers >= $worker_limit) {\n $limit = true;\n } else {\n $limit = false;\n }\n\n return $limit;\n }",
"private function limit_check( $input = FALSE )\n {\n if ( $input != FALSE )\n {\n list( $this->config['API_Limit_current'], $this->config['API_Limit'] ) = explode( '/', $input );\n }\n else\n {\n // no input given, lets call the limit uri and get our current\n $data = curl('https://xboxapi.com/v1/limit/');\n\n if(strpos($data, '/') != FALSE)\n {\n list( $this->config['API_Limit_current'], $this->config['API_Limit'] ) = explode( '/', $data );\n }\n else\n {\n // set the error\n $this->config['error'] = 'Error retrieveing current limit from XboxAPI...';\n }\n }\n\n // lets do a check against the current data to see if we are over or under the limit\n if ( $this->config['API_Limit_current'] < $this->config['API_Limit'] )\n return TRUE;\n\n return FALSE;\n }",
"public function checkServiceHealth(array $configOptions): void;",
"abstract public function checkRADIUSHostandConfigDaemon();",
"public function checkDailyLimit()\n {\n if (strtotime('- ' .$this->config->getDailyLimit().' second') >= $this->data['period']['lastDate']) {\n return true;\n }\n if ($this->data['dailyMaxRequest'] < 1) {\n $this->execBan('Daily');\n return false;\n }\n return true;\n }",
"private function validateIfCargoLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n $this->validateIfQueueHasPenddings('vipSmall');\n $this->validateIfQueueHasPenddings('peopleLarge');\n $this->validateIfQueueHasPenddings('peopleSmall');\n } catch (Exception $e) {\n throw $e;\n }\n }",
"protected function checkMemoryPressure() : void\n {\n if ($this->memoryLimit === 0) {\n $sysInfo = new SysInfo();\n $this->memoryLimit = $sysInfo->getMemoryLimit();\n } elseif ($this->memoryLimit === -1) {\n return; //We are configured for unlimited memory, so we disable memory pressure checks\n }\n\n $current_memory_usage = memory_get_usage();\n\n $percent_used = (int)(($current_memory_usage / $this->memoryLimit) * 100);\n\n /** Try releasing memory first and recalculate percentage used */\n if ($this->pausedOnMemoryPressure || $percent_used >= static::MEMORY_PRESSURE_HIGH_WATERMARK) {\n /** Running this every check cycle negatively impacts the scheduler's performance,\n * however since we are paused (or going to pause) at this stage, and are awaiting the external action processes to complete the actual impact will be minimal\n */\n $this->memoryReclaim();\n $current_memory_usage = memory_get_usage();\n $percent_used = (int)(($current_memory_usage / $this->memoryLimit) * 100);\n }\n\n $this->currentMemoryPercentUsed = $percent_used;\n\n if (false === $this->pausedOnMemoryPressure &&\n ($percent_used >= static::MEMORY_PRESSURE_HIGH_WATERMARK ||\n count($this->inflightActionCommands) > static::RUNNING_ACTION_LIMIT_HIGH_WATERMARK)\n )\n {\n $this->logger->warning(\n \"Currently using $percent_used% of memory limit with \" . count($this->inflightActionCommands) . \" inflight actions. Pausing input processes\");\n\n foreach($this->input_processes as $processId => $process)\n {\n if ($process->isRunning()) {\n $process->terminate(SIGSTOP);\n $this->logger->debug(\"Paused input process {id}\", ['id' => $processId,]);\n }\n }\n $this->pausedOnMemoryPressure = true;\n ++$this->pausedOnMemoryPressureCount;\n\n /** @TODO take into account delaying shutdown if we still have some outstanding actions and memory usage is dropping */\n $this->scheduledTasks['pausedOnMemoryPressureTimer'] = $this->loop->addTimer(300, function() {\n if ($this->pausedOnMemoryPressure) {\n $this->logger->critical(\"Timeout! Input processes are still paused, shutting down\");\n $this->shutdown();\n }\n });\n }\n else\n {\n if ($this->pausedOnMemoryPressure &&\n $percent_used <= static::MEMORY_PRESSURE_LOW_WATERMARK &&\n count($this->inflightActionCommands) < static::RUNNING_ACTION_LIMIT_LOW_WATERMARK) {\n\n //Cancel the memory pressure timout\n if ($this->scheduledTasks['pausedOnMemoryPressureTimer'] !== null) {\n $this->loop->cancelTimer($this->scheduledTasks['pausedOnMemoryPressureTimer']);\n unset($this->scheduledTasks['pausedOnMemoryPressureTimer']);\n }\n //Resume input\n foreach ($this->input_processes as $processId => $process) {\n $process->terminate(SIGCONT);\n $this->logger->debug( \"Resuming input process {id}\", ['id' => $processId,]);\n }\n $this->pausedOnMemoryPressure = false;\n }\n }\n }",
"public function providerCheckMemoryLimit()\n {\n $memoryLimitsWithExpectedSystemHealth = array(\n array('8M', 0),\n array('31M', 0),\n array('32M', 1),\n array('59M', 1),\n array('60M', 2),\n array('61M', 2),\n array('-1', 2),\n );\n\n return $memoryLimitsWithExpectedSystemHealth;\n }",
"private function validateIfEmergencySmallQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n } catch (Exception $e) {\n throw $e;\n }\n }",
"public function checkTotalLimit()\r\n {\r\n if ($this->total_limit === $this::ON) {\r\n\r\n $startTime = TimeHelper::startTime($this->total_limit_period);\r\n\r\n $submissions = FormSubmission::find()->select('id')->asArray()\r\n ->where(['form_id' => $this->id])\r\n ->andWhere(['between','created_at', $startTime, time()])->count();\r\n\r\n if ($this->total_limit_number <= $submissions) {\r\n /** @var \\yii\\web\\Response $response */\r\n $response = Yii::$app->getResponse();\r\n $response->format = Response::FORMAT_JSON;\r\n $response->data = array(\r\n 'action' => 'submit',\r\n 'success' => false,\r\n 'id' => 0,\r\n 'message' => Yii::t(\"app\", \"Sorry, the form does not accept more submissions per {period}.\", [\r\n 'period' => TimeHelper::getPeriodByCode($this->total_limit_period)]),\r\n );\r\n $response->send();\r\n\r\n exit;\r\n }\r\n }\r\n }",
"function check_running_procs ()\n\t{\n#\t\tinst (\"Check running\");\n\n\t\tforeach ($this->running_procs as $index => $bundle)\n\t\t{\n\t\t\t$status = proc_get_status ($bundle->handle);\n\n\t\t\t// read the streams in case they block\n\t\t\t$bundle->read_streams ();\n\n\t\t\tif ($status[\"running\"] !== true)\n\t\t\t{\n\t\t\t\t$bundle->exit = $status[\"exitcode\"];\n\t\t\t\tunset ($this->running_procs [$index]); // remove from the running list\n\t\t\t\t$bundle->continuation (); // start the next bit straight away\n\t\t\t}\n\t\t\telse if ($this->max_time != 0\n\t\t\t\t&& time () > $bundle->start_time + $this->max_time)\n\t\t\t{\n\t\t\t\tkill_properly ($bundle->handle, $bundle->pipes);\n\n\t\t\t\t$bundle->exits[] = \"Timeout\";\n\t\t\t\t$bundle->out .= \"\\n--- TIMEOUT ---\";\n\t\t\t\t$bundle->outs[] = $bundle->out;\n\t\t\t\t$bundle->errs[] = $bundle->err;\n\t\t\t\t$this->async_timeout (\"Timeout\", $bundle);\n\n\t\t\t\tunset ($this->running_procs [$index]); // remove from the running list\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// let it keep running\n\t\t\t}\n\t\t}\n\t}",
"private function validateIfVipSmallQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n } catch (Exception $e) {\n throw $e;\n }\n }",
"function hasWatchdog()\n{\n return (3.2 <= _PGPOOL2_VERSION);\n}",
"protected function memory_exceeded() {\n\t\t$memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory\n\t\t$current_memory = memory_get_usage( true );\n\t\t$return = false;\n\n\t\tif ( $current_memory >= $memory_limit ) {\n\t\t\t$return = true;\n\t\t}\n\n\t\t/**\n\t\t * Filters whether the process did exceed the allowed memory limit or not.\n\t\t *\n\t\t * @since 4.9.5\n\t\t *\n\t\t * @param bool $return Whether the process did exceed the allowed memory limit or not.\n\t\t * @param static $this This process instance.\n\t\t */\n\t\treturn apply_filters( $this->identifier . '_memory_exceeded', $return, $this );\n\t}",
"function validate_options(array $commandLineOptions)\n{\n if (!array_key_exists('action', $commandLineOptions)) {\n throw new \\Exception(\"Please provide action for Robot.\");\n }\n if (!array_key_exists('floor', $commandLineOptions)) {\n throw new \\Exception(\"Please provide floor(hard/carpet) for Robot.\");\n }\n if (!array_key_exists('area', $commandLineOptions)) {\n throw new \\Exception(\"Please provide area in m**2 for cleaning.\");\n }\n if (strtoupper($commandLineOptions['action']) != \"CLEAN\") {\n throw new \\Exception(\"Only clean action is supported.\");\n }\n if (!in_array(strtoupper($commandLineOptions['floor']), array('HARD','CARPET'))) {\n throw new \\Exception(\"Only hard and carpet floor is supported.\");\n }\n if (!is_numeric($commandLineOptions['area'])) {\n throw new \\Exception(\"Please provide proper value for area.\");\n }\n if ($commandLineOptions['area']<10 or $commandLineOptions['area']>1000) {\n throw new \\Exception(\"Minimum area is 10m^2 and maximum is 1000m^2\");\n }\n return;\n}",
"public function validateMaxEntryPerUserRequirement()\n {\n $limit = $this->survey->limitPerParticipant();\n\n if ($limit === null) {\n return;\n }\n\n $count = static::where('participant_id', $this->participant_id)\n ->where('survey_id', $this->survey->id)\n ->count();\n\n if ($count >= $limit) {\n throw new MaxEntriesPerUserLimitExceeded();\n }\n }"
] | [
"0.59748405",
"0.53936756",
"0.5302641",
"0.51835966",
"0.5160242",
"0.5092199",
"0.5012037",
"0.50033337",
"0.4978398",
"0.4978398",
"0.49317512",
"0.48244044",
"0.48082936",
"0.4800662",
"0.47814626",
"0.4776897",
"0.47736603",
"0.47436562",
"0.47317266",
"0.47305042",
"0.47036403",
"0.46937534",
"0.46927026",
"0.46905124",
"0.46844196",
"0.46435344",
"0.4642356",
"0.4609285",
"0.45957145",
"0.45852825"
] | 0.7929216 | 0 |
Get the PV storage capacity. | public function getCapacity()
{
return $this->getSpec('resources.requests.storage', null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity()\n {\n return $this->capacity;\n }",
"public function getCapacity() {\n\t\treturn $this->capacity;\n\t}",
"public function getCapacity(): int\n {\n return $this->capacity;\n }",
"public function getTotalCapacity()\n {\n return $this->totalCapacity;\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getCapacityUnit()\n {\n return $this->get(self::CAPACITY_UNIT);\n }",
"public function getFreeCapacity() {\n\t\treturn $this->capacity - $this->totalWeight;\n\t}",
"public function getAvailableSpace();",
"public function getMinimumCapacity()\n {\n return $this->minimum_capacity;\n }",
"public function getCapacity(array $options = [])\n {\n $options += [\n 'human' => false,\n ];\n $total = $this->getTotalCapacity();\n $count = $this->getDriveCount();\n $result = $total === 0 ? $total : $total / 2;\n if ($options['human'] === true) {\n return Number::toReadableSize($result);\n }\n\n return $result;\n }",
"public function getStorageBytes()\n {\n return isset($this->storage_bytes) ? $this->storage_bytes : 0;\n }",
"public function getDiskSizeGb()\n {\n return isset($this->disk_size_gb) ? $this->disk_size_gb : 0;\n }",
"public function getCapacity(): ?int {\n $val = $this->getBackingStore()->get('capacity');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'capacity'\");\n }",
"public function getVehicleSeatingCapacity() {\n\t\treturn $this->vehicleSeatingCapacity;\n\t}",
"public function getReserveSpace() {\n return $this->reserveSpace;\n }",
"public function getSizeGb()\n {\n return $this->size_gb;\n }",
"public function raid_capacity_import()\n {\n return null;\n }",
"public function getAvailableStorage()\n {\n $globalConfig = $this->getServiceLocator()->get('config');\n $diskSize = null;\n $storageName = '';\n foreach ($globalConfig['storageSettings'] as $dir => $st) {\n if ($diskSize == null) {\n $diskSize = str_replace('M', '', exec('df -h -BM ' . $st['path'] . $dir . ' | awk \\'{print $4}\\''));\n $storageName = $dir;\n continue;\n }\n if ($diskSize > ($currentSire = str_replace('M', '', exec('df -h -BM ' . $st['path'] . $dir . ' | awk \\'{print $4}\\'')))) {\n $diskSize = $currentSire;\n $storageName = $dir;\n }\n }\n return $storageName;\n }",
"public function getQuota()\n {\n return $this->quota;\n }",
"public function diskCapacity($useBytes = false)\n {\n if (is_null($this->_diskCapacity)) {\n if ( ! function_exists('disk_total_space')) {\n $this->_diskCapacity = 0;\n return false;\n }\n\n $this->_diskCapacity = disk_total_space(base_path());\n\n if ($this->_diskCapacity === false)\n $this->_diskCapacity = 0;\n }\n\n if ($useBytes)\n return $this->_diskCapacity;\n\n $utility = $this->getKotakin()->getUtility();\n return $utility->humanReadableFileSize($this->_diskCapacity);\n }",
"public function getSize() {\n\t\treturn OMVModuleZFSUtil::SizeTobytes($this->properties[\"volsize\"][\"value\"]);\n\t}",
"public function quantity()\n {\n return $this->volume;\n }",
"public function getQuota();",
"public function getStorageUtilizationGibPerNode()\n {\n return $this->storage_utilization_gib_per_node;\n }",
"public function getTotalSpace()\n {\n $redis = $this->getRedisResource();\n try {\n $info = $redis->info();\n } catch (RedisResourceException $e) {\n throw new Exception\\RuntimeException($redis->getLastError(), $e->getCode(), $e);\n }\n\n return $info['used_memory'];\n }",
"public function getVolume()\n {\n return $this->volume;\n }",
"public function getVolume()\n {\n return $this->volume;\n }",
"public function getVolume()\n {\n return $this->volume;\n }"
] | [
"0.7424943",
"0.7424943",
"0.73856634",
"0.70968425",
"0.67030406",
"0.6657969",
"0.6657969",
"0.6657969",
"0.6472387",
"0.6395961",
"0.6242703",
"0.6237764",
"0.6047883",
"0.59680665",
"0.59068763",
"0.5821727",
"0.58075696",
"0.57851917",
"0.5680272",
"0.5675287",
"0.5671603",
"0.56125563",
"0.5607894",
"0.56024987",
"0.5567124",
"0.55470467",
"0.55443925",
"0.5502372",
"0.5502372",
"0.5502372"
] | 0.77284145 | 0 |
Set the override. It indicate if override files. | public function setOverride($override)
{
$this->override = (bool) $override;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setOverride(bool $override): self;",
"public function setAllowOverride($flag)\n {\n $this->allowOverride = (bool) $flag;\n }",
"public function setOverrides(array ...$overrides): void\n {\n $this->overrides = $overrides;\n }",
"public static function addOverridePath($origin, $override)\r\n\t{\r\n\t\tself::$overrides[$origin] = $override;\r\n\t}",
"function get_override() {\n\t\t\tif (SemisecureLoginReimagined::is_multisite() && SemisecureLoginReimagined::get_option('allow_overrides') != 'no' && SemisecureLoginReimagined::get_option('use_overrides', true) == 'yes')\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}",
"private function checkForOverride()\n\t{\n\t\t$overrideFilePath = $this->getOverridePath() . '.php';\n\t\tif(file_exists($overrideFilePath)) {\n\t\t\treturn $overrideFilePath;\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function overrideViews()\n {\n // add theme hints to existing namespaces\n foreach ($this->finder->getHints() as $namespace => $hints) {\n $this->finder->addNamespace($namespace, $this->activeThemePath() . '/views/' . $namespace, true);\n }\n\n // add theme views path\n $this->finder->prependLocation($this->activeThemePath() . '/views');\n }",
"protected function overrideFile()\n {\n if (!is_file($this->getControllerFile())) {\n return true;\n }\n\n $question = new ConfirmationQuestion(\n \"\\nThe file <comment>{$this->controllerFile}</comment> already \" .\n \"exists. Override it (y,N)? \",\n false,\n '/^(y|yes)/i'\n );\n return (boolean) $this->getQuestionHelper()->ask(\n $this->input,\n $this->output,\n $question\n );\n }",
"function overrideDefault($key, $value)\n\t{\n// echo \"Override: {$key} => {$value}<br />\";\n \tif (!isset($this->defaults[$key])) return FALSE;\n\t\t$this->defaults[$key] = $value;\n\t}",
"private function _overrideFiles() {\n\t\t$templateDir = dirname(dirname(dirname(__FILE__))).'/themes/'._THEME_NAME_;\n\t\t$headerTemplate \t= \t$templateDir .'/header.tpl';\n\t\t$headerTemplateBack = $templateDir . '/header.tpl.bak'; \n\t\t//if (!is_file($headerTemplate)) {\n\t\t//\t$this->_errors[] = Tools::displayError('Header template file is missing: ' . $headerTemplate);\n\t\t//\treturn false;\n\t\t//}\t\t\n\t}",
"protected function _setDefaultFile() {\n\t\t$this->_file = dirname(__FILE__) . \"/\" . $this->_type . \"/crosswalk\"; \n\t}",
"abstract public function overrideMe();",
"private function processOverrideYamlFiles($yamlFiles)\n {\n if (!$this->fs->exists('ezpublish_legacy/settings/override')) {\n $this->io->write(\n sprintf('<info>Creating the ezpublish_legacy/settings/override directory</info>')\n );\n $this->fs->mkdir('ezpublish_legacy/settings/override');\n }\n\n foreach ($yamlFiles as $key => $file) {\n $data = $this->transformYamlValuesToArray('override/' . $file);\n\n $file = 'ezpublish_legacy/settings/override/' . $file . '.ini.append.php';\n $fileExists = $this->fs->exists($file);\n $this->io->write(\n sprintf(\n '<info>%s the \"%s\" file</info>',\n $fileExists ? 'Updating' : 'Creating',\n $file\n )\n );\n\n $this->fs->dumpFile(\n $file,\n $this->buildContentsForData($data)\n );\n }\n }",
"public function getAllowOverride()\n {\n return $this->allowOverride;\n }",
"public function setDefaultConfigFile()\n {\n //Syntactic sugar function.\n $this->setConfigFile($this->mainConfigFile); \n }",
"private function setLanguageOverrides() {\n $this->negotiator->setCurrentUser($this->currentUser);\n if ($this->languageManager instanceof ConfigurableLanguageManagerInterface) {\n $this->languageManager->setNegotiator($this->negotiator);\n $this->languageManager->setConfigOverrideLanguage($this->languageManager->getCurrentLanguage());\n }\n // After the language manager has initialized, set the default langcode for\n // the string translations.\n $langcode = $this->languageManager->getCurrentLanguage()->getId();\n $this->translation->setDefaultLangcode($langcode);\n }",
"function options_page_overrides() {\n\t\t\t$this->load_textdomain();\n\t\t\trequire(dirname(dirname(__FILE__)).'/inc/options_page_overrides.inc.php');\n\t\t}",
"public function setOverwrite(bool $overwrite)\n {\n $this->overwrite = $overwrite;\n // cancel previous init\n $this->utmCookie = null;\n }",
"protected function setOverriddenData() {\n $this->overriddenData = $this->data;\n if (isset($this->moduleOverrides) && is_array($this->moduleOverrides)) {\n $this->overriddenData = NestedArray::mergeDeepArray([$this->overriddenData, $this->moduleOverrides], TRUE);\n }\n if (isset($this->settingsOverrides) && is_array($this->settingsOverrides)) {\n $this->overriddenData = NestedArray::mergeDeepArray([$this->overriddenData, $this->settingsOverrides], TRUE);\n }\n return $this;\n }",
"public function setOverwriteExisting($value){\n $this->overwriteExisting= $value;\n }",
"public function set($key, $value, $override = true);",
"public function __set($name, $value) {\n if ($name === 'file') {\n // @todo maybe set notification: file can not be changed manually\n return;\n }\n parent::__set($name, $value);\n }",
"function setAllowOverride($allow)\n {\n $this->allowOverride = (boolean) $allow;\n\n return $this;\n }",
"public function setOverwrite($on = true)\n\t{\n\t\t$this->overwriteValue = (bool) $on;\n\t}",
"public function add_override() {\n\t\treturn $this->add(new GradeOverride());\n\t}",
"public function setSettingsOverride(array $data) {\n $this->settingsOverrides = $data;\n $this->resetOverriddenData();\n return $this;\n }",
"#[@xmlmapping(element= '@overwrite')]\n public function setOverwrite($o) {\n $this->overwrite= ($o == 'true');\n }",
"public function overwrite($value) {\n $this->_overwrite = (bool) $value;\n }",
"public function testConfigOverride() {\n /** @var \\Drupal\\Core\\Config\\Entity\\ConfigEntityStorage $storage */\n $storage = \\Drupal::entityTypeManager()->getStorage($this->entityTypeId);\n // Prime the cache prior to adding a config override.\n $storage->load($this->entityId);\n\n // Add the config override, and ensure that what is loaded is correct\n // despite the prior cache priming.\n \\Drupal::configFactory()->addOverride(new ConfigOverrider());\n $entity_override = $storage->load($this->entityId);\n $this->assertSame('Overridden label', $entity_override->label);\n\n // Load override free to ensure that loading the config entity again does\n // not return the overridden value.\n $entity_no_override = $storage->loadOverrideFree($this->entityId);\n $this->assertNotSame('Overridden label', $entity_no_override->label);\n $this->assertNotSame($entity_override->_loadStamp, $entity_no_override->_loadStamp);\n\n // Reload the entity and ensure the cache is used.\n $this->assertSame($entity_no_override->_loadStamp, $storage->loadOverrideFree($this->entityId)->_loadStamp);\n\n // Enable overrides and reload the entity and ensure the cache is used.\n $this->assertSame($entity_override->_loadStamp, $storage->load($this->entityId)->_loadStamp);\n }",
"public function overwriteFile($overwrite = true){\n\t\tif (!is_bool($overwrite)){\n\t\t\t$this->overwriteFile = false;\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t$this->overwriteFile = $overwrite;\n\t\t}\n\t}"
] | [
"0.70306045",
"0.66141415",
"0.6208929",
"0.6176165",
"0.6127297",
"0.6099862",
"0.60822177",
"0.58906597",
"0.5795823",
"0.57511675",
"0.5725361",
"0.57201236",
"0.571767",
"0.56922835",
"0.5685843",
"0.5675998",
"0.5659053",
"0.56276894",
"0.56237143",
"0.5597649",
"0.5596515",
"0.5568702",
"0.55531114",
"0.5537089",
"0.5513145",
"0.5480385",
"0.5464333",
"0.54494524",
"0.5390829",
"0.53784555"
] | 0.66148454 | 1 |
Installs redis cache in Prestashop. | public function install()
{
if ($this->isAlreadyInstalled()) {
return true;
}
if (Rediscache\Utility::isDebugMode()) {
$this->_errors[] = $this->l('To install and rediscache module,
you need to disable "Debug mode" in Advanced Parameters > Performance.');
return false;
}
if (!RedisHelper::dependencyCheck($this)) {
$this->_errors[] = $this->l('To install rediscache module,
you need to install php-redis extension. For more information
see the INSTALL.txt file in this module.');
return false;
}
$this->extendAutoloader();
return (
parent::install()
&& $this->installDb()
&& $this->installHooks()
&& $this->installTab()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function startRedis()\n {\n if (isset($this->CNF['dbredis']) && $this->CNF['dbredis']['hosts'] != '') {\n\n $this->Redis = new \\Redis();\n $this->Redis->connect($this->CNF['dbredis']['hosts'], $this->CNF['dbredis']['port']);\n $this->Redis->auth($this->CNF['dbredis']['auth']);\n }\n }",
"public function install() {}",
"public static function install(){\n\t}",
"public function install() { }",
"public function install();",
"public function install();",
"public function install();",
"public function install();",
"function install() {}",
"public static function redis_init(&$cache)\n {\n if (empty($cache['link'])) {\n $cache['link'] = new \\Redis();\n $cache['link']->connect($cache['config']['hostname'], $cache['config']['port']);\n $cache['link']->setOption(\\Redis::OPT_SERIALIZER, \\Redis::SERIALIZER_PHP);\n }\n }",
"abstract public function install();",
"abstract public function install();",
"function install()\n {\n\n $this->CreateTable();\n\n //session its nothing at this point (starting stage)\n //$session = $this->getInstallSession();\n //$session->installation_type = 'fresh';\n\n\n $this->registry_id = 'install';\n $s = array('type' => 1, 'continue' => 0);\n $this->set('settings', $s);\n $this->save();\n\n //DIE(print_r($this->get('settings'),1));\n //get $db connection and $cron object - use get_common_vars.php to be forward compatible\n //see that file for documentation.\n $admin = true;\n include(GEO_BASE_DIR . 'get_common_vars.php');\n\n $this->common_tasks();\n\n //If it made it all the way, then the installation was a success...\n //no longer applicable? since it is now part of a process, they will be informed of this then.\n //$admin->userSuccess('NOTICE: Make sure you update your .htaccess file or you will have 404 pages!');\n return true;\n }",
"function install () {\t\n\t}",
"public static function install();",
"public function setup() {\r\n //sfContext::getInstance()->getLogger()->log('{sgMemcache} setup sgMemcache '); does not work if on cli\r\n try {\r\n // if (sfConfig::get('app_memcache_queries')\r\n // || sfConfig::get('app_memcache_results')\r\n // || sfConfig::get('app_memcache_objects')) {\r\n // //echo \"env:\".sfConfig::get('sf_environment');\r\n\r\n $this->cache = new sfMemcacheCache(sfConfig::get('sf_factory_view_cache_parameters', array (\r\n 'automatic_cleaning_factor' => 0,\r\n 'cache_dir' => sfConfig::get('sf_cache_dir'),\r\n 'lifetime' => 86400,\r\n 'prefix' => 'object_cache',\r\n 'servers' => array (\r\n 'default' => array (\r\n 'host' => sfConfig::get('app_memcache_server_ip'),\r\n 'port' => 11211,\r\n ),\r\n ),\r\n )));\n\n // for fixtures\n try {\r\n sfContext::getInstance()->getLogger()->log('{yiidMemCache} setup yiidMemCache '); //does not work if on cli\n } catch (Exception $e) {}\r\n // }\r\n }\r\n catch (Exception $e){\n // for fixtures\n try {\r\n sfContext::getInstance()->getLogger()->crit('{sgMemcache} memcache initialization failed: '.$e->getMessage());\n } catch (Exception $e) {}\r\n }\r\n }",
"private function initDataSourceRedisCacheConfig()\n {\n if (empty(self::$data_source_config)) {\n if (empty(AppKit::config('redis'))) {\n throw new RuntimeException(\"data source 'redis' field missing!\");\n } elseif (empty(AppKit::config(['redis', 'cache']))) {\n throw new RuntimeException(\"data source 'redis.cache' field missing!\");\n }\n self::$data_source_config = AppKit::config(['redis', 'cache']);\n }\n }",
"function install () {\r\n\r\n }",
"public function setUp() {\n\t\t$this->testRedisAvailable();\n\n\t\t$this->backend = t3lib_div::makeInstance(\n\t\t\t'tx_rediscache_cache_backend_RedisBackend',\n\t\t\tarray(\n\t\t\t\t'identifierPrefix' => 'typo3.local-enecacheanalytics%',\n\t\t\t\t'hostname' => 'self::redisHost',\n\t\t\t\t'port' => 'self::redisPort',\n\t\t\t)\n\t\t);\n\n\t\t$this->backend->setCache($this->getMockFrontend());\n\t}",
"public function install()\n\t{\n\t}",
"public function install()\n {\n // leave this empty\n }",
"public static function Install() \n\t{ \n\t\tself::setInstalled(true); \n\t}",
"abstract public static function install();",
"public function install() {\n \n }",
"public function installDb()\n {\n $return = true;\n $sql = array();\n\n include dirname(__FILE__) . '/sql_install.php';\n\n foreach ($sql as $s) {\n $return &= Db::getInstance()->execute($s);\n }\n\n $defaults = RedisHelper::getDefaultConfig();\n RedisHelper::saveMultipleConfigs($defaults);\n\n return $return;\n }",
"public static function run_install() {\n\n\t}",
"public function index(){\n\t//$redis->connect('127.0.0.1',6379);\n\t//$redis->set('test','hello redis');\n\t//echo $redis->get('test');\n\n \t//获取推荐商品\n \t$bestGoods = D('goods')->getBestGoods();\n \t$this->assign('bestGoods',$bestGoods);\n //获得热销商品\n $hotGoods = D('goods')->getHotGoods();\n $this->assign('hotGoods',$hotGoods);\n //获得新品\n $newGoods = D('goods')->getNewGoods();\n $this->assign('newGoods',$newGoods);\n //获得衣服\n $Clothes=D('goods')->getClothes();\n $this->assign('Clothes',$Clothes);\n /*\n 获取分类模块start\n */\n //获得女装分类信息\n $girlGoods=M('category')->where('parent_id=16')->limit(6)->select();\n //获取男装信息\n $boyGoods=M('category')->where('parent_id=15')->limit(6)->select();\n $this->assign('girlGoods',$girlGoods);\n $this->assign('boyGoods',$boyGoods);\n /*\n 获取分类模块end\n */\n /*根据商品点击数,画出商品拍行*/\n $goodsDesc=M('goods')->order('click_count desc')->limit(5)->select();\n $this->assign('goodsDesc',$goodsDesc);\n \n //判断是否为主页,默认设置为true\n \t$this->assign('index',true);\n \t$this->display();\n }",
"private function initialize()\n{ \n\n // Define the site path (root of Apex install)\n if (!defined('SITE_PATH')) { \n define('SITE_PATH', realpath(__DIR__ . '/../'));\n }\n\n // Load config, constants and global functions\n require_once(SITE_PATH . '/etc/config.php');\n require_once(SITE_PATH . '/etc/constants.php');\n require_once(SITE_PATH . '/src/app/sys/functions.php');\n\n // Set time zone\n date_default_timezone_set('UTC');\n\n // Set error reporting\n error_reporting(E_ALL);\n set_exception_handler('handle_exception');\n set_error_handler('\\error');\n\n // Set INI variables\n ini_set('pcre.backtrack_limit', '4M');\n ini_set('zlib.output_compression_level', '2');\n\n // Check if installed\n if (!defined('REDIS_HOST')) { \n\n // Build container\n self::$instance = null;\n\n // Run installer\n $installer = new \\apex\\app\\sys\\installer();\n $installer->run_wizard();\n }\n\n}",
"function install()\n {\n }",
"public function fetchCaches() {\n\n /* Apps and modules */\n $cache = array ( 'version' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/index/index.php',\n 'recache_class' => 'manage_core_index_index',\n 'recache_function' => 'recacheEdahaVersion' \n ),\n 'test' =>\n array(\n 'testing' => \n array(\n 'force_load' => 0,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/addons/addons.php',\n 'recache_class' => 'manage_core_addons_addons',\n 'recache_function' => 'recacheApplications' \n )\n ),\n 'addons' =>\n array(\n 'app_cache' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/addons/addons.php',\n 'recache_class' => 'manage_core_addons_addons',\n 'recache_function' => 'recacheApplications' \n ),\n 'app_menu' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/addons/addons.php',\n 'recache_class' => 'manage_core_addons_addons',\n 'recache_function' => 'recacheAppMenu' \n ),\n 'module_cache' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/addons/addons.php',\n 'recache_class' => 'manage_core_addons_addons',\n 'recache_function' => 'recacheModules' \n ),\n 'hooks_cache' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules/manage/addons/hooks.php',\n 'recache_class' => 'manage_core_addons_hooks',\n 'recache_function' => 'recacheHooks' \n )\n ),\n 'filters' => \n array(\n 'wordfilters' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules_admin/posts/filter.php',\n 'recache_class' => 'manage_board_posts_filter',\n 'recache_function' => 'recacheWordFilters'\n ),\n 'spamfilters' => \n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'core' ) . '/modules_admin/posts/filter.php',\n 'recache_class' => 'manage_board_posts_filter',\n 'recache_function' => 'recacheSpamFilters'\n )\n ),\n 'attachments' =>\n array(\n 'filetypes' =>\n array(\n 'force_load' => 0,\n 'recache_file' => kxFunc::getAppDir( 'board' ) . '/modules/manage/filetypes.php',\n 'recache_class' => 'manage_board_attachments_filetypes',\n 'recache_function' => 'recacheFiletypes'\n ),\n 'embeds' => \n array(\n 'force_load' => 0,\n 'recache_file' => kxFunc::getAppDir( 'board' ) . '/modules/manage/embeds.php',\n 'recache_class' => 'manage_board_attachments_embeds',\n 'recache_function' => 'recacheEmbeds'\n )\n )\n );\n if (isset(kxEnv::$request['board'])) {\n $cache['boardopts'] = array(\n kxEnv::$request['board'] =>\n array(\n 'force_load' => 1,\n 'recache_file' => kxFunc::getAppDir( 'board' ) . '/modules/manage/boardopts.php',\n 'recache_class' => 'manage_board_board_boardopts',\n 'recache_function' => 'recacheBoardOptions'\n )\n );\n \n }\n $load = array();\n \n return array( 'caches' => $cache,\n 'cachetoload' => $load );\n }"
] | [
"0.6394215",
"0.57068175",
"0.5686691",
"0.56817335",
"0.56702924",
"0.56702924",
"0.56702924",
"0.56702924",
"0.5610024",
"0.55955255",
"0.5591947",
"0.5591947",
"0.55911154",
"0.555682",
"0.55433935",
"0.55217606",
"0.5514709",
"0.5503438",
"0.5479705",
"0.54753184",
"0.54744613",
"0.5471566",
"0.5453424",
"0.5436309",
"0.54011494",
"0.538466",
"0.53647035",
"0.53586626",
"0.5355781",
"0.53398234"
] | 0.6484599 | 0 |
Uninstalls redis cache from Prestashop. | public function uninstall()
{
RedisHelper::overrideDefaultCaching(0);
return parent::uninstall()
&& $this->uninstallTab()
&& $this->uninstallHooks()
&& $this->uninstallDb()
&& $this->removeOverrides();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cleanupRedis()\n {\n $this->cleanup();\n }",
"public function uninstall() {}",
"abstract public function uninstall();",
"public function removeCache(): void;",
"public function removeCache(): void;",
"public function removeCache()\n\t{\t\n\t\t/* purge transients */\n\t\tglobal $wpdb;\n\t\t$expired = $wpdb->get_col( \"SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '_transient_loremblogum%';\" );\n\t\tforeach( $expired as $transient ) {\n\t\t\t$key = str_replace('_transient_', '', $transient);\n\t\t\tdelete_transient($key);\n\t\t}\n\t}",
"function uninstall() {\n\nSQLExec('DROP TABLE IF EXISTS espcounter_devices');\nSQLExec('DROP TABLE IF EXISTS espcounter_config');\nSQLExec('delete from settings where NAME like \"%APPESPCOUNTER%\"');\nSQLExec(\"delete from pvalues where property_id in (select id FROM properties where object_id in (select id from objects where class_id = (select id from classes where title = 'ESPCounter')))\");\nSQLExec(\"delete from properties where object_id in (select id from objects where class_id = (select id from classes where title = 'ESPCounter'))\");\nSQLExec(\"delete from objects where class_id = (select id from classes where title = 'ESPCounter')\");\nSQLExec(\"delete from classes where title = 'ESPCounter'\");\t \nunsubscribeFromEvent($this->name, 'HOURLY');\n parent::uninstall();\n\n }",
"function uninstall()\n\t{\n\t\tdelete_config_option('is_on_block_cache');\n\t\tdelete_config_option('is_on_template_cache');\n\t\tdelete_config_option('is_on_comcode_page_cache');\n\t\tdelete_config_option('is_on_lang_cache');\n\t}",
"public function removeCached();",
"public function uninstall() {\n \n }",
"public function uninstall() {\n \n }",
"public function uninstall() {\n\t\t$this->delete_plugin_data();\n\t\t$this->delete_cache_files();\n\t\t$this->delete_config_files();\n\t\t$this->drop_rucss_database_tables();\n\t}",
"public function remove(): void\n {\n apcu_delete($this->cacheKey);\n }",
"public function uninstall()\n\t{\n\t}",
"public function uninstall()\n\t{\n\t}",
"public function uninstall()\n {\n\n }",
"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('OptionList::fetchAll' . $this->attribute);\r\n\t\t$cache_data = $memcache->delete($key);\r\n\t}",
"function yab_shop_uninstall()\n{\n\t$queries = array();\n\n\tif (yab_shop_table_exist('yab_shop_prefs') === true)\n\t{\n\t\t$queries[] = 'DROP TABLE `'.PFX.'yab_shop_prefs`';\n\t}\n\n\tforeach ($queries as $query)\n\t{\n\t\t$result = safe_query($query);\n\t\tif (!$result)\n\t\t\treturn gTxt('yab_shop_tables_delete_error');\n\t}\n\treturn gTxt('yab_shop_tables_delete_success');\n}",
"function uninstall()\n {\n $query = new DB_Table_Delete(PromoCodes::getTables());\n global $application;\n $application->db->getDB_Result($query);\n }",
"function redisClearCache(): array\n{\n return RedisCache::clear();\n}",
"public function uninstall($data);",
"public function stopCaching();",
"function Uninstall()\r\n\t{\r\n\t\tglobal $gCms;\r\n\t\trequire \"method.uninstall.php\";\r\n\t}",
"public function uninstall ()\n\t{\n\t\t\n\t\t//get $db connection, $admin object (to display messages), and $cron object - use get_common_vars.php to be forward compatible\n\t\t//see that file for documentation.\n\t\t$admin = true;\n\t\t$db = true;\n\t\tinclude(GEO_BASE_DIR.'get_common_vars.php');\n\t\t\n\t\t$db->Execute(\"DROP TABLE `ps_metaGenerator_pages`\");\n\t\t$db->Execute(\"DROP TABLE `ps_metaGenerator_categories`\");\n\t\t$admin->userSuccess('Addon un-install script completed.');\n\t\treturn true;\n\t}",
"public static function uninstall()\n {\n (new static)->down();\n }",
"function uninstall() {\n\nSQLExec('DROP TABLE IF EXISTS mercury_devices');\nSQLExec('DROP TABLE IF EXISTS mercury_config');\nSQLExec('delete from settings where NAME like \"%APPMERCURY%\"');\nSQLExec(\"delete from pvalues where property_id in (select id FROM properties where object_id in (select id from objects where class_id = (select id from classes where title = 'Mercury')))\");\nSQLExec(\"delete from properties where object_id in (select id from objects where class_id = (select id from classes where title = 'Mercury'))\");\nSQLExec(\"delete from objects where class_id = (select id from classes where title = 'Mercury')\");\nSQLExec(\"delete from classes where title = 'Mercury'\");\t \n\n parent::uninstall();\n\n }",
"public function uninstall() {\n\t\tunlink(JET_APPLICATION_MODULES_TMP.\"module-install-test\");\n\t}",
"function uninstall()\n {\n $query = new DB_Table_Delete(Configuration::getTables());\n global $application;\n $application->db->getDB_Result($query);\n }",
"private function removeCacheActions()\n {\n remove_action( 'shutdown', [$this, 'updateCache'] );\n }",
"function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS snmpdevices');\r\n SQLExec('DROP TABLE IF EXISTS snmpproperties');\r\n parent::uninstall();\r\n }"
] | [
"0.6677479",
"0.6561523",
"0.64664245",
"0.6456061",
"0.6456061",
"0.6388942",
"0.63325506",
"0.6325749",
"0.6289602",
"0.62795866",
"0.62795866",
"0.6239048",
"0.6234708",
"0.6155124",
"0.6155124",
"0.6135625",
"0.61282384",
"0.6126685",
"0.6088524",
"0.6057123",
"0.6046005",
"0.60294396",
"0.6013954",
"0.60016733",
"0.5989138",
"0.5955145",
"0.59454507",
"0.59412247",
"0.5936618",
"0.59341985"
] | 0.6610217 | 1 |
Removes the override files. | protected function removeOverrides()
{
$override_files = array(
_PS_OVERRIDE_DIR_ . 'classes/cache/CacheRedis.php',
);
foreach ($override_files as $override_file) {
if (file_exists($override_file)) {
try {
unlink($override_file);
} catch (\Exception $e) {
return false;
}
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function removeDublicates()\n {\n foreach ($this->possibleHookDefs AS $defPath) {\n if ($defPath != $this->getMainDefFile()) {\n $this->unlink($defPath);\n }\n }\n }",
"public function unlinkUsedFiles()\n {\n if (file_exists($this->getTemporaryFile())) {\n unlink($this->getTemporaryFile());\n }\n if (file_exists($this->getNewFilePath())) {\n unlink($this->getNewFilePath());\n }\n }",
"private function clean()\r\n\t{\r\n\t\t//get original info\r\n\t\t$path = dirname($this->file);\r\n\t\t$file = basename($this->unaltered, self::BASE_EXTENSION);\r\n\t\t\r\n\t\t//build regular expressions based on what has been done to the file\r\n\t\t$regex = \"=\" . preg_replace(\"/\\./\",\"\\.\", $file . \".v\") . \".*\";\t\t\r\n\t\t$file .= \".v\" . $this->version;\r\n\t\t\r\n\t\tif($this->options['pack'])\r\n\t\t{\r\n\t\t\t$regex .= \"[^comb]\\.pack\";\r\n\t\t\t$file .= \".pack\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$regex .= \"[^comb][^pack]\";\r\n\t\t}\r\n\t\t\r\n\t\t$regex .= \"\\.js=\";\r\n\t\t$file .= \".js\";\r\n\t\t\t\t\r\n\t\t//iterate through the directory and search for possible matches to remove.\r\n\t\tforeach( new DirectoryIterator( $path ) as $f )\r\n\t\t{\r\n\t\t\t$fileDir = $f->getPath();\r\n\t\t\t$fileName = $f->getFilename();\t\t\t\r\n\t\t\tif( $f->isFile() ) \t\t\t\r\n\t\t\t{\r\n\t\t\t\t//check to see if the file is versioned and should be removed\r\n\t\t\t\tif(preg_match($regex,$fileName) > 0 && $fileName != $file && preg_match(\"/\".$this->version.\"/\", $fileName) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//remove any file that matches\r\n\t\t\t\t\t@unlink($fileDir . \"/\" . $fileName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}",
"private function removeFiles()\n {\n foreach ($this->filesToDelete as $fileToDel) {\n if (is_file($fileToDel)) {\n unlink($fileToDel);\n }\n }\n $this->filesToDelete = array();\n }",
"public function cleanUp() {\r\n\t\t$missingFiles = array();\r\n\t\tforeach($this->generator->files as $n => $file) {\r\n\t\t\tif (!file_exists($file)) {\r\n\t\t\t\t$missingFiles[] = $file;\r\n\t\t\t\tunset($this->generator->files[$n]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (count($missingFiles)) {\r\n\t\t\t$this->generator->set->save();\r\n\t\t\techo \"Removed \".count($missingFiles).\" from documentation set: $this->setName.\\n\";\r\n\t\t\tforeach($missingFiles as $file) {\r\n\t\t\t\techo \"\\t$file\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function file_remove_replace() {\n\n\t\t// remove the files\n\t\twp_deregister_style( 'open-sans' );\n\n\t\t// add a blank file to prevent dependency issues\n\t\twp_register_style( 'open-sans', plugins_url( '/lib/blank.css', __FILE__) );\n\n\t}",
"public function tearDown() {\n\t\tparent::tearDown();\n\n\t\tarray_map( 'unlink', glob( $this->theme_dir . 'material-design/*.*' ) );\n\t\tarray_map( 'unlink', glob( $this->theme_dir . 'custom-templates/*.*' ) );\n\n\t\trmdir( $this->theme_dir . 'material-design' ); //phpcs:ignore\n\t\trmdir( $this->theme_dir . 'custom-templates' ); //phpcs:ignore\n\t}",
"protected function removeCreatedFiles()\n {\n $files = [ 'codeception.yml', $this->envFileName ];\n $dirs = [ 'tests' ];\n foreach ($files as $file) {\n if (file_exists(getcwd() . '/' . $file)) {\n unlink(getcwd() . '/' . $file);\n }\n }\n foreach ($dirs as $dir) {\n if (file_exists(getcwd() . '/' . $dir)) {\n rrmdir(getcwd() . '/' . $dir);\n }\n }\n }",
"public function clear(): void\n {\n $finder = new Finder();\n $finder->files()->in($this->getLoggerDir())->name('*.php');\n\n foreach ($finder as $file) {\n if ($file instanceof SplFileInfo) {\n unlink((string) $file);\n }\n }\n }",
"public function clear(){\n\t\t$files = glob($this->dirname.'/*');\n\t\tforeach( $files as $file ) {\n\t\t\tunlink($file);\n\t\t}\n\t}",
"public static function reset(){\n\n\t\t\tspl_autoload_unregister( array( __CLASS__, 'autoload' ) );\n\n\t\t\tforeach( self::$include_pathes as $path )\n\t\t\t\tself::remove_includepath( $path );\n\n\t\t}",
"protected function _cleanup()\n {\n $modelFiles = Doctrine_Core::getLoadedModelFiles();\n $filesToClean = array_diff($modelFiles, $this->_startingModelFiles);\n\n foreach ($filesToClean as $file) {\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n // clean up tmp directories\n Doctrine_Lib::removeDirectories($this->_tmpPath . DIRECTORY_SEPARATOR . strtolower(self::$_fromPrefix) . '_doctrine_tmp_dirs');\n Doctrine_Lib::removeDirectories($this->_tmpPath . DIRECTORY_SEPARATOR . strtolower(self::$_toPrefix) . '_doctrine_tmp_dirs');\n }",
"public function cleanUp()\n\t{\n\t\t// Remove the update package\n\t\t$config = JFactory::getConfig();\n\t\t$tempdir = $config->get('tmp_path');\n\n\t\t$file = JFactory::getApplication()->getUserState('com_joomlaupdate.file', null);\n\t\t$target = $tempdir . '/' . $file;\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Remove the restoration.php file\n\t\t$target = JPATH_COMPONENT_ADMINISTRATOR . '/restoration.php';\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Remove joomla.xml from the site's root\n\t\t$target = JPATH_ROOT . '/joomla.xml';\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Unset the update filename from the session\n\t\tJFactory::getApplication()->setUserState('com_joomlaupdate.file', null);\n\t}",
"protected function removeBackupFiles ()\n {\n foreach ($this->tempFiles as $originalFile => $backupFile)\n {\n // previous version of file never existed\n if (null === $backupFile)\n {\n continue;\n }\n\n if (! unlink($backupFile))\n {\n $this->getLogger()->err(sprintf('%s: Failed to unlink backup file \"%s\"', __CLASS__, $backupFile));\n continue;\n }\n\n $this->getLogger()->debug(sprintf('%s: Removed backup file \"%s\"', __CLASS__, $backupFile));\n }\n }",
"public function removeWebPushFiles()\n {\n parent::removeFiles($this->fileNames, $this->getPubDirPath());\n }",
"public final function tearDown() {\n\t\t// Delete files that weren't deleted by testing (even though this is the same way deleteFiles() does it, so...)\n\t\t$files = glob(\"$this->filePath$this->fileName*$this->fileExtension\");\n\t\tforeach($files as $file) {\n\t\t\tunlink($file);\n\t\t}\n\t}",
"function delete_files () {\n\t\tunlink('app/controllers/'.$this->name['class'].'Controller.php');\n\t\tunlink('app/models/'.$this->name['class'].'.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_create.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_datatable.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_index.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_update.php');\n\t}",
"protected function cleanTempDir()\n {\n foreach ($this->filesToIgnore as $fileToIgnore) {\n $this->fileSystem->unlink($this->rubedoRootDir . '/' . $fileToIgnore);\n }\n\n foreach ($this->dirsToIgnore as $dirToIgnore) {\n $this->fileSystem->removeDirectoryPhp($this->rubedoRootDir . '/' . $dirToIgnore);\n }\n }",
"private function delete_config_files() {\n\t\t$this->delete( $this->config_path );\n\t}",
"protected function removeFile()\n {\n }",
"protected function deleteConfigFiles()\n\t{\n\t\t$aFiles = $this->getConfigFiles();\n\n\t\tforeach ($aFiles as $aFile)\n\t\t{\n\t\t\t# si le fichier cache existe on le supprime\n\t\t\tif (file_exists(OKT_CACHE_PATH.'/'.$aFile['filename'].'.php'))\n\t\t\t{\n\t\t\t\t$this->checklist->addItem(\n\t\t\t\t\t'cached_config_file_'.$aFile['basename'],\n\t\t\t\t\tunlink(OKT_CACHE_PATH.'/'.$aFile['filename'].'.php'),\n\t\t\t\t\t'Remove cached config file '.$aFile['filename'].'.php',\n\t\t\t\t\t'Cannot remove cached config file '.$aFile['filename'].'.php'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->checklist->addItem(\n\t\t\t\t\t'config_file_'.$aFile['basename'],\n\t\t\t\t\tnull,\n\t\t\t\t\t'Cached config file '.$aFile['filename'].' doesn\\'t exists',\n\t\t\t\t\t'Cached config file '.$aFile['filename'].' doesn\\'t exists'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t# si le fichier config existe on le supprime\n\t\t\tif (file_exists(OKT_CONFIG_PATH.'/'.$aFile['filename']))\n\t\t\t{\n\t\t\t\t$this->checklist->addItem(\n\t\t\t\t\t'config_file_'.$aFile['basename'],\n\t\t\t\t\tunlink(OKT_CONFIG_PATH.'/'.$aFile['filename']),\n\t\t\t\t\t'Remove config file '.$aFile['filename'],\n\t\t\t\t\t'Cannot remove config file '.$aFile['filename']\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->checklist->addItem(\n\t\t\t\t\t'config_file_'.$aFile['basename'],\n\t\t\t\t\tnull,\n\t\t\t\t\t'Config file '.$aFile['filename'].' doesn\\'t exists',\n\t\t\t\t\t'Config file '.$aFile['filename'].' doesn\\'t exists'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}",
"public static function removeOverridePath($path)\r\n\t{\r\n\t\tunset(self::$overrides[$path]);\r\n\t}",
"protected function tearDown()\n {\n foreach ($this->paths as $path) {\n if (file_exists($path)) {\n Utility::remove($path);\n }\n }\n }",
"protected function tearDown()\n {\n unlink(\"/tmp/testa.css\");\n unlink(\"/tmp/testb.css\");\n unlink(\"/tmp/testc.css\");\n $_FILES = array();\n $this->uploadService = null;\n parent::tearDown();\n }",
"public static function uninstall()\n {\n $scanFiles = scandir(self::getUploadDir());\n\n foreach ($scanFiles as $scanFile) {\n wp_delete_file($scanFile);\n }\n\n rmdir(self::getUploadDir());\n }",
"public function clearFiles()\n {\n $path = Yii::getAlias(self::TMP_DIR);\n if (is_dir($path)) {\n FileHelper::removeDirectory($path);\n }\n }",
"protected function uninstall()\r\n {\r\n foreach (array_reverse($this->installs) as $target) {\r\n if (is_file($target)) {\r\n @unlink($target);\r\n } elseif (is_dir($target)) {\r\n @rmdir($target);\r\n }\r\n }\r\n\r\n if (file_exists($this->tmpFile)) {\r\n @unlink($this->tmpFile);\r\n }\r\n }",
"public static function clearCacheFiles()\n {\n global $sugar_config;\n $importdir = self::getImportDir();\n if ( is_dir($importdir) ) {\n $files = dir($importdir);\n while (false !== ($file = $files->read())) {\n if ( !is_dir($file) && stristr($file,'.csv') )\n unlink(\"$importdir/$file\");\n }\n }\n }",
"public function unsetLocationOverrides(): void\n {\n $this->locationOverrides = [];\n }",
"function cleanUp() {\n\t\t$cache = $this->config['dirs']['tmp'] . '/articles';\n\t\tif (file_exists($cache)) {\n\t\t\t$outputDir = $this->config['dirs']['output'];\n\t\t\techo \"Removing old files\\n\";\n\t\t\t$old = unserialize(file_get_contents($cache));\n\t\t\tforeach($old as $file) {\n\t\t\t\t@unlink($outputDir . $file);\n\n\t\t\t\t$dir = dirname($file);\n\t\t\t\twhile ($dir != '' && is_dir($outputDir . $dir) && array_diff(scandir($outputDir . $dir), array('.','..')) == array()) {\n\n\t\t\t\t\tif (!rmdir($outputDir . $dir)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$dir = dirname($dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunlink ($cache);\n\t}"
] | [
"0.6585552",
"0.6489613",
"0.648774",
"0.6429435",
"0.64250106",
"0.64129925",
"0.63871384",
"0.6383482",
"0.63255864",
"0.6303819",
"0.6258744",
"0.62530017",
"0.62501293",
"0.6239747",
"0.62310284",
"0.62095296",
"0.6199844",
"0.6180038",
"0.6139749",
"0.6133947",
"0.6121236",
"0.6112785",
"0.60945123",
"0.6055631",
"0.6042815",
"0.60303086",
"0.60296243",
"0.60186183",
"0.6016668",
"0.60129887"
] | 0.7307562 | 0 |
Builds the caching system markup. | protected function getCachingSystemsMarkup()
{
$markup = array();
$markup['warning']['#prefix'] = '<div class="alert alert-warning" role="alert">';
$markup['warning']['#suffix'] = '</div>';
$markup['warning']['title'] = array(
'#prefix' => '<h3>',
'#suffix' => '</h3>',
'#markup' => $this->l('The caching system is overriden by Redis Cache module.'),
);
$markup['warning']['description'] = array(
'#prefix' => '<p class="alert-text">',
'#suffix' => '</p>',
'#markup' => $this->l("To re-enable the default cache management,
you need to uninstall or disable Redis Cache module."),
);
$markup['configuration']['#prefix'] = '<div class="alert alert-info" role="alert">';
$markup['configuration']['#suffix'] = '</div>';
$markup['configuration']['title'] = array(
'#prefix' => '<h3>',
'#suffix' => '</h3>',
'#markup' => $this->l('Cache Management'),
);
$markup['configuration']['description'] = array(
'#prefix' => '<p class="alert-text">',
'#suffix' => '</p>',
'#markup' => $this->l('Manage caching from the module configuration page.'),
);
$admin_link = $this->context->link->getAdminLink('AdminModules', false)
. '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules');
$markup['configuration']['cache_management'] = array(
'#prefix' => '<div style="text-align:center; margin: 30px;">',
'#suffix' => '</div>',
'#markup' => '<a class="btn btn-primary pointer" href="'
. $admin_link . '"><i class="material-icons">settings</i>'
. $this->l('Configure Redis Cache')
. '</a>',
);
return Rediscache\Utility::render($markup, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildCacheMenu() {\n\t\t$this->obj->setStatus ( 1 );\r\n\t\t$arrayTreeMenu = $this->filterMenu ( array ('status', 'isAdmin' => array (true, array (0, - 1 ) ) ), $this->arrayTreeMenu );\r\n\t\t$arrayMenu = $this->filterMenu ( array ('status', 'isAdmin' => array (true, array (0, - 1 ) ) ), $this->arrayMenu );\r\n\t\t$arrayCategory = $this->filterMenu ( array ('status', 'isAdmin' => array (true, array (0, - 1 ) ) ), $this->arrayCategory );\r\n\t\t\r\n\t\t$cache_content = \"<?php\\n\";\r\n\t\t$cache_content .= \"\\$arrayTreeMenu = \" . var_export ( $arrayTreeMenu, true ) . \";\\n\";\r\n\t\t$cache_content .= \"\\$arrayMenu = \" . var_export ( $arrayMenu, true ) . \";\\n\";\r\n\t\t$cache_content .= \"\\$arrayTreeCategory = \" . var_export ( $this->arrayTreeCategorys, true ) . \";\\n\";\r\n\t\t$cache_content .= \"\\$arrayCategory = \" . var_export ( $arrayCategory, true ) . \";\\n\";\r\n\t\t$cache_content .= \"?>\";\r\n\t\t$cache_path = CACHE_PATH . \"menus.cache\";\r\n\t\t$cache_content = preg_replace ( '/\\s\\s+/', '', $cache_content );\r\n\t\t$file = fopen ( $cache_path, \"w\" );\r\n\t\tfwrite ( $file, $cache_content );\r\n\t\tfclose ( $file );\r\n\t}",
"function buildCacheFile() {\n\tglobal $cache;\n\t$createdComment = sprintf ( CACHE_CREATED_COMMENT, date ( CACHE_DATE_FORMAT ) );\n\t$file = fopen ( CACHE_FILE_NAME, \"wb\" );\n\t// Writing file-header\n\t$success = fwrite ( $file, CACHE_PHP_OPEN_TAG . CACHE_NEW_LINE . CACHE_NEW_LINE );\n\tfwrite ( $file, CACHE_PHP_COMMENT_TAG . \" \" . CACHE_INIT_COMMENT . CACHE_NEW_LINE );\n\tfwrite ( $file, CACHE_PHP_COMMENT_TAG . \" \" . $createdComment . CACHE_NEW_LINE );\n\tfwrite ( $file, CACHE_NEW_LINE );\n\tfwrite ( $file, CACHE_TEMPLATE_START . CACHE_NEW_LINE );\n\n\t// Write $cache to the file\n\t$i = 0;\n\t$cacheSize = count ( $cache );\n\tif($cacheSize>0) // add by dennis 2008-02-04\n\t{\n\t\tforeach ( $cache as $classname => $filename ) {\n\t\t\tfwrite ( $file, \"\\t'\" . $classname . \"' => '\" . $filename . \"'\" );\n\t\t\t\t\n\t\t\tif ($i < $cacheSize - 1) {\n\t\t\t\tfwrite ( $file, ',' );\n\t\t\t}\n\t\t\tfwrite ( $file, CACHE_NEW_LINE );\n\t\t\t\t\n\t\t\t$i ++;\n\t\t}\n\t}\n\n\t// Writing file-footer\n\tfwrite ( $file, CACHE_TEMPLATE_END . CACHE_NEW_LINE . CACHE_NEW_LINE );\n\tfwrite ( $file, CACHE_PHP_CLOSE_TAG );\n\tfclose ( $file );\n}",
"function melodev_view_cache_page() {\n $output = '<p>Manage view cache.</p>';\n \n $views = views_get_all_views(true);\n \n $caches = array();\n foreach($views as $name => $view) {\n $displays = $view->display;\n foreach($displays as $dispname => $display) {\n $cachetxt = '';\n if(is_array($display->display_options['cache'])) {\n $cache = $display->display_options['cache'];\n if($cache['type'] == 'time') {\n $cachetxt .= 'Cache Type: <strong>Time</strong><br />';\n $cachetxt .= 'Results: <strong>'.$cache['results_lifespan'].'</strong><br />';\n $cachetxt .= 'Display: <strong>'.$cache['output_lifespan'].'</strong><br />';\n } else {\n $cachetxt .= '<pre>'.print_r($cache, true).'</pre>';\n }\n } else {\n $cachetxt .= '<em>No Cache</em>';\n }\n $caches[] = array($name, $dispname, $cachetxt);\n }\n }\n $output .= theme('table', array('View Name', 'Display Name', 'Cache'), $caches);\n \n /*\n $output .= print_r($views, true);\n $output .= '</pre>';\n */\n \n return $output;\n}",
"public function define_caching(){}",
"public function cacheKeys() {\n // Using keys to avoid bubbling up cache.\n $build = [\n 'permanent' => [\n '#markup' => $this->t('PERMANENT: Super cette formation. @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'max-age' => Cache::PERMANENT,\n 'keys' => ['d8_cache_permanent'],\n ],\n ],\n 'max-age' => [\n '#markup' => $this->t('MAX-AGE 10: Il est: @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'max-age' => 10,\n 'keys' => ['d8_cache_maxage'],\n ],\n ],\n 'context-url' => [\n '#markup' => $this->t('CONTEXT URL: Il est: @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'contexts' => ['url.query_args'],\n 'keys' => ['d8_cache_contexts'],\n ],\n ],\n\n ];\n // Return the render array.\n return $build;\n }",
"private function buildCacheContent(array $cacheData, string $flagpole): string\n {\n return \"<?php\n\n{$flagpole}\n\nreturn \" . var_export($cacheData, true) . \";\n\";\n }",
"public function cacheinfo()\n {\n // template needs to know where the directories are\n $this->view->assign('compiledir', $this->view->getCompileDir());\n $this->view->assign('cachedir', $this->view->getCacheDir());\n\n return $this->view->fetch('user/cachedemo/info.tpl');\n }",
"function melodev_block_cache_page() {\n \n $output = '<p>Manage block cache.</p>';\n \n // Fetch regions\n $block_regions = system_region_list('melo') + array(BLOCK_REGION_NONE => 'none');\n\n // Fetch and sort blocks\n $blocks = _block_rehash();\n usort($blocks, '_block_compare');\n $regions = array();\n foreach($blocks as $block) {\n $key = $block_regions[$block[region]];\n $regions[$key][] = $block;\n }\n\n // Blockcache options.\n $block_cache_options = array(\n BLOCK_NO_CACHE => t('Do not cache'),\n BLOCK_CACHE_GLOBAL => t('Cache once for everything (global)'),\n BLOCK_CACHE_PER_PAGE => t('Per page'),\n BLOCK_CACHE_PER_ROLE => t('Per role'),\n BLOCK_CACHE_PER_ROLE | BLOCK_CACHE_PER_PAGE => t('Per role per page'),\n BLOCK_CACHE_PER_USER => t('Per user'),\n BLOCK_CACHE_PER_USER | BLOCK_CACHE_PER_PAGE => t('Per user per page'),\n );\n \n // Display output\n foreach($regions as $key => $blocks) {\n if($key == 'none') {\n continue;\n }\n $rows = array();\n $head = array('Block Title', 'Pages', 'Cache', 'Edit');\n $output .= '<h1 class=\"title\">'.$key.'</h1>';\n foreach($blocks as $block) {\n $bcvar = $block['module'].'_'.$block['delta'];\n if(variable_get('bc_refresh_'.$bcvar, false) || variable_get('bc_life_'.$bcvar, false)) {\n $cache = '<strong>'.$block_cache_options[$block['cache']].'</strong>';\n } else {\n $cache = 'Permanent';\n }\n $row = array($block['info'], '<pre style=\"font-size:0.8em\">'.$block['pages'].'</pre>', $cache, \n l('edit', 'admin/build/block/configure/'.$block['module'].'/'.$block['delta'], array('query'=>'destination=admin/build/cache_browser/blocks')), \n );\n $rows[] = $row;\n }\n $output .= theme('table', $head, $rows);\n// $output .= '<pre>'.print_r($blocks, true).'</pre>';\n }\n \n return $output;\n}",
"function rebuild_templates_cache()\n\t{\n\t\t//-----------------------------------\n\t\t// Get ACP library\n\t\t//-----------------------------------\n\n\t\trequire_once( ROOT_PATH.'sources/lib/admin_cache_functions.php' );\n\t\t$acp = new admin_cache_functions();\n\t\t$acp->ipsclass =& $this->ipsclass;\n\n\t\t$row = $this->ipsclass->DB->simple_exec_query ( array ( 'select' => 'conf_value, conf_default', 'from' => 'conf_settings', 'where' => \"conf_key='ipb_img_url'\" ) );\n\t\t$this->ipsclass->vars['ipb_img_url'] = $row['conf_value'] != \"\" ? $row['conf_value'] : $row['conf_default'];\n\t\tif ( $this->ipsclass->vars['ipb_img_url'] == \"{blank}\" )\n\t\t{\n\t\t\t$this->ipsclass->vars['ipb_img_url'] = \"\";\n\t\t}\n\n\t\t$justdone = intval($this->ipsclass->input['justdone']);\n\t\t$justdone = $justdone ? $justdone : 1;\n\n\t\t//-----------------------------------\n\t\t// Get skins\n\t\t//-----------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'skin_sets',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'set_skin_set_id > '.$justdone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'set_skin_set_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0, 1 )\n\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t//-----------------------------------\n\t\t// Got a biggun?\n\t\t//-----------------------------------\n\n\t\t$r = $this->ipsclass->DB->fetch_row();\n\n\t\tif ( $r['set_skin_set_id'] )\n\t\t{\n\t\t\t$acp->_rebuild_all_caches( array($r['set_skin_set_id']) );\n\n\t\t\t$extra = implode( \"<br />\", $acp->messages );\n\n\t\t\t$this->redirect( \"index.php?act=templatescache&justdone={$r['set_skin_set_id']}&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}\", \"Rebuilt cache for skin set {$r['set_name']}<br />{$extra}<br />Proceeding to the next skin...\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->redirect( \"index.php?act=finish&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}\", \"No more skins to rebuild...\" );\n\t\t}\n\t}",
"public function build_html()\n {\n }",
"public function build()\n {\n $this->header->generate();\n $this->contents->generate();\n $this->footer->generate();\n }",
"private function generateCache()\r\n\t{\r\n\t\tif($this->getConnection())\r\n\t\t{\r\n\t\t\tif(!$this->generateDatabaseCache())\r\n\t\t\t{\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->generateQuickCache();\r\n\t}",
"public function build( )\n {\n\n $this->load();\n\n $this->html = $this->genTree();\n\n return $this->html;\n\n }",
"function setup_cache() {\n\t\tglobal $phpbb_seo;\n\t\t// For module inclusion in ACP : No cache\n\t\tif ( defined('ADMIN_START') ) {\n\t\t\treturn;\n\t\t}\n\t\t// build cache file name\n\t\t$ssl_bit = $phpbb_seo->ssl['use'] ? 'ssl_' : '';\n\t\t$file_name = ( !empty($this->options['module_sub']) ? $this->options['module_sub'] : '' ) . trim(str_replace(array('&', '/'), '-', $this->options['extra_params_full']),'-') . '-a' . $this->options['auth_param'];\n\t\tif ($this->gym_master->gym_config['gym_cript_cache']) {\n\t\t\t$file_name = md5( $file_name );\n\t\t}\n\t\t$file_name = $this->gym_master->actions['action_type'] . '_' . ( ( !empty($this->options['module_main']) ) ? $this->options['module_main'] . '_' : 'main_' ) . $ssl_bit . $file_name . $this->cache['cache_file_ext'];\n\t\t$this->cache['file'] = $this->gym_master->path_config['gym_path'] . 'cache/' . $file_name;\n\t\t// Output, first check cache\n\t\tif ($this->cache['do_cache'] && $this->check_cache($this->cache['file'])) {\n\t\t\t// Check expiration\n\t\t\t$this->cache['cache_born'] = filemtime($this->cache['file']);\n\t\t\t$this->cache['cache_too_old'] = ($this->cache['cache_born'] + $this->cache['cache_max_age']) <= $this->outputs['time'] ? true : false;\n\t\t\tif ($this->cache['cache_too_old'] && $this->cache['cache_auto_regen']) {\n\t\t\t\t@unlink($this->cache['file']);\n\t\t\t\t$this->cache['cached'] = false;\n\t\t\t}\n\t\t}\n\t\t// Expiration time & Etags\n\t\tif (!$this->cache['cached'] || !$this->cache['do_cache']) {\n\t\t\t// Take care about lastmod when not cached\n\t\t\tif (($this->outputs['last_mod_time'] + $this->cache['cache_max_age']) <= $this->outputs['time']) {\n\t\t\t\t$this->outputs['last_mod_time'] = $this->outputs['time'];\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t\t$this->update_lastmod();\n\t\t\t} else {\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t}\n\t\t\t$this->check_mod_since();\n\t\t} else {\n\t\t\t$this->outputs['last_mod_time'] = $this->cache['cache_born'];\n\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t$this->check_mod_since();\n\t\t\t$this->cache_output();\n\t\t}\n\n\t\treturn;\n\t}",
"private function renderCacheDirectoryInfo(): void\n {\n echo '<p>';\n echo \\sprintf(\n esc_html__('Cache data are stored in %s directory.', 'bc-cache'),\n '<code>' . Plugin::CACHE_DIR . '</code>'\n );\n echo '</p>';\n }",
"public function build()\n\t{\n\t\t$this->_prepare();\n\t\t$this->display();\n\t}",
"public function build( )\n {\n\n $id = $this->getId();\n $resizeable = $this->resizable\n ? ' resizable=\"resizable\" ' : '';\n $movable = $this->movable\n ? ' movable=\"movable\" ' : '';\n $planet = $this->planet\n ? ' planet=\"'.$this->planet.'\" ' : '';\n\n $editAble = $this->editAble\n ? '' : ' editable=\"false\" ';\n\n $title = $this->title\n ? '<title>'.$this->title.'</title>':'';\n $subtitle = $this->subtitle\n ? '<subtitle>'.$this->subtitle.'</subtitle>':'';\n $statusBar = $this->statusBar\n ? '<status>'.$this->statusBar.'</status>':'';\n\n $events = '';\n if( $this->events )\n {\n $events = '<events>';\n\n foreach( $this->events as $type => $subEvents )\n {\n foreach( $subEvents as $name => $code )\n {\n $events .= '<event type=\"'.$type.'\" name=\"'.$name.'\" ><![CDATA['.$code.']]></event>'.NL;\n }\n }\n\n $events .= '</events>';\n }\n\n $bookmark = $this->bookmark\n ? '<bookmark title=\"'.$this->bookmark['title'].'\" url=\"'.urlencode($this->bookmark['url']).'\" role=\"'.$this->bookmark['role'].'\" />'\n : '';\n\n\n\n $buttons = $this->buildButtons();\n $content = $this->includeTemplate( $this->template );\n\n $jsCode = '';\n if( $this->jsCode )\n {\n\n $this->assembledJsCode = '';\n\n foreach( $this->jsCode as $jsCode )\n {\n if( is_object($jsCode) )\n $this->assembledJsCode .= $jsCode->getJsCode();\n else\n $this->assembledJsCode .= $jsCode;\n }\n\n $jsCode = '<script><![CDATA['.NL.$this->assembledJsCode.']]></script>'.NL;\n }\n\n\n return <<<CODE\n\n <window $resizeable $movable id=\"{$id}\" {$planet} {$editAble} >\n <dimensions width=\"{$this->width}\" height=\"{$this->height}\" min-width=\"{$this->minWidth}\" min-height=\"{$this->minHeight}\" />\n {$title}\n {$subtitle}\n {$statusBar}\n {$buttons}\n {$bookmark}\n {$events}\n <content><![CDATA[{$content}]]></content>\n {$jsCode}\n </window>\n\nCODE;\n\n }",
"public function cacheMaxAge() {\n\n // Simulate a long process.\n $data = $this->getMyData(2, \"Max Age 10 seconds.\");\n\n // Build the render array with cache metadata.\n $build = [\n '#type' => 'markup',\n '#markup' => $data,\n '#cache' => [\n 'max-age' => 10,\n ],\n ];\n\n return $build;\n\n }",
"public function caching_environment()\n {\n $info = array();\n $info['cache_on'] = '((preg_match(\\'#<\\w+>#\\',array_key_exists(\\'filter\\',$map)?$map[\\'filter\\']:\\'\\'))!=0)?null:array(array_key_exists(\\'optimise\\',$map)?$map[\\'optimise\\']:\\'0\\',(array_key_exists(\\'pagination\\',$map)?$map[\\'pagination\\']:\\'0\\'==\\'1\\'),array_key_exists(\\'title\\',$map)?escape_html($map[\\'title\\']):\\'(default title)\\',array_key_exists(\\'as_guest\\',$map)?($map[\\'as_guest\\']==\\'1\\'):false,get_param_integer($block_id.\\'_start\\',array_key_exists(\\'start\\',$map)?intval($map[\\'start\\']):0),array_key_exists(\\'filter\\',$map)?$map[\\'filter\\']:\\'\\',array_key_exists(\\'show_in_full\\',$map)?$map[\\'show_in_full\\']:\\'0\\',array_key_exists(\\'render_if_empty\\',$map)?$map[\\'render_if_empty\\']:\\'0\\',((array_key_exists(\\'attach_to_url_filter\\',$map)?$map[\\'attach_to_url_filter\\']:\\'0\\')==\\'1\\'),array_key_exists(\\'no_links\\',$map)?$map[\\'no_links\\']:0,array_key_exists(\\'title\\',$map)?$map[\\'title\\']:\\'\\',array_key_exists(\\'member_based\\',$map)?$map[\\'member_based\\']:\\'0\\',array_key_exists(\\'blogs\\',$map)?$map[\\'blogs\\']:\\'-1\\',array_key_exists(\\'historic\\',$map)?$map[\\'historic\\']:\\'\\',array_key_exists(\\'param\\',$map)?intval($map[\\'param\\']):14,array_key_exists(\\'multiplier\\',$map)?floatval($map[\\'multiplier\\']):0.5,array_key_exists(\\'fallback_full\\',$map)?intval($map[\\'fallback_full\\']):3,array_key_exists(\\'fallback_archive\\',$map)?intval($map[\\'fallback_archive\\']):6,array_key_exists(\\'select\\',$map)?$map[\\'select\\']:\\'\\',array_key_exists(\\'zone\\',$map)?$map[\\'zone\\']:get_module_zone(\\'news\\'),array_key_exists(\\'select_and\\',$map)?$map[\\'select_and\\']:\\'\\')';\n $info['special_cache_flags'] = CACHE_AGAINST_DEFAULT | CACHE_AGAINST_PERMISSIVE_GROUPS;\n if (addon_installed('content_privacy')) {\n $info['special_cache_flags'] |= CACHE_AGAINST_MEMBER;\n }\n $info['ttl'] = (get_value('no_block_timeout') === '1') ? 60 * 60 * 24 * 365 * 5/*5 year timeout*/ : 60;\n return $info;\n }",
"function build() {\n $this->smarty->display($this->template);\n }",
"public function main() {\n\t\t$render = !Core::is(Request::data('render'), [false, 'false']);\n\t\t\n\t\t$this->sassCompiler = new Compiler();\n\t\t$this->sassCompiler->setFormatter('Leafo\\\\ScssPhp\\\\Formatter\\\\Crunched');\n\t\tif ($render) echo '<h3>Generating cache...</h3>';\n\t\t\n\t\t$this->createModuleMap();\n\t\t$this->compileSass();\n\t\t\n\t\t$moduleMap = ['apps' => $this->apps, 'modules' => $this->moduleMap];\n\t\tCore::writeFile(Core::join('resources', 'vessel-cache', 'module-map.json'), json_encode($moduleMap));\n\t\t\n\t\tif (!$render) Response::ok('Cache Successfully Generated.');\n\t\t?>\n\t\t<h3>Cache generated successfully.</h3>\n\t\t<h4>Apps found: <?= count($this->apps) ?></h4>\n\t\t<ul class=\"styled\"><li><?= implode('</li><li>', array_keys($this->apps)) ?></li></ul>\n\t\t<h4>Modules found: <?= count($this->moduleMap) ?></h4>\n\t\t<ul class=\"styled\"><li><?= implode('</li><li>', array_keys($this->moduleMap)) ?></li></ul>\n\t\t<h4>Sass files compiled: <?= count($this->toCompile) ?></h4>\n\t\t<ul class=\"styled\"><li><?= implode('</li><li>', array_keys($this->toCompile)) ?></li></ul>\n\t\t<?php\n\t}",
"function cache_output() {\n\t\tglobal $phpbb_seo, $db;\n\t\tif ($this->outputs['showstats']) {\n\t\t\t$this->outputs['gen_out'] = sprintf('%.5f', $phpbb_seo->microtime_float() - $this->outputs['microtime']);\n\t\t\t$genstats = sprintf($this->gym_master->style_config['stats_start'], $this->outputs['gen_out'], $db->sql_num_queries());\n\t\t} else {\n\t\t\t$genstats = '';\n\t\t}\n\t\tif ($this->gzip_config['gzip']) {\n\t\t\t$this->send_header();\n\t\t\treadfile($this->cache['file']);\n\t\t} else {\n\t\t\t$this->send_header();\n\t\t\tif ($this->cache['cache_force_gzip']) {\n\t\t\t\treadgzfile($this->cache['file']);\n\t\t\t\tif ($this->outputs['showstats']) {\n\t\t\t\t\t$this->outputs['gen_out'] = sprintf('%.5f', $phpbb_seo->microtime_float() - $this->outputs['microtime']);\n\t\t\t\t\t$genstat2 = sprintf($this->gym_master->style_config['stats_end'], $this->outputs['gen_out'], $db->sql_num_queries());\n\t\t\t\t\techo $genstats . $genstat2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treadfile($this->cache['file']);\n\t\t\t\tif ($this->outputs['showstats']) {\n\t\t\t\t\t$this->outputs['gen_out'] = sprintf('%.5f', $phpbb_seo->microtime_float() - $this->outputs['microtime']);\n\t\t\t\t\t$genstat2 = sprintf($this->gym_master->style_config['stats_end'], $this->outputs['gen_out'], $db->sql_num_queries());\n\t\t\t\t\techo $genstats . $genstat2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->gym_master->safe_exit();\n\t\treturn;\n\t}",
"public function display()\n\t{\t\t\n\t\t//var_dump($this->Controller);\n\t\t//If the cache type is null just return the template.\n\t\t//Or, if the cache_type is not one of the supported cache_types\n\t\tif($this->view_path === null || \n\t\t\t(!$this->Controller->pr_do_cache) ||\n\t\t (!$this->isValidCacheType())\n\t\t )\n\t\t{\n\t\t\treturn parent::display();\n\t\t}\n\t\t//If it is a valid cache type then call the method and return the template view.\n\t\t$cached = $this->Cache->isCached();\n\t\tif($cached !== false){\n\t\t\treturn $this->Cache->get();\n\t\t}\n\t\t//If it is not cached then display the non-cached version.\n\t\telse{\n\t\t\t$content = parent::display();\n\t\t\t$this->Cache->value = $content;\n\t\t\t$this->Cache->cache();\n\t\t\treturn $content;\n\t\t}\n\t}",
"public function cacheNoKeys() {\n\n $build = [\n 'permanent' => [\n '#markup' => $this->t('PERMANENT: Super cette formation. @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'max-age' => Cache::PERMANENT,\n\n ],\n ],\n 'max-age' => [\n '#markup' => $this->t('MAX-AGE 10: Il est: @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'max-age' => 10,\n ],\n ],\n 'context-url' => [\n '#markup' => $this->t('CONTEXT URL: Il est: @time <br />',\n ['@time' => date('H:i:s')]),\n '#cache' => [\n 'contexts' => ['url.query_args'],\n ],\n ],\n\n ];\n return $build;\n }",
"private function __construct( ){\n $this->generateCache( );\n }",
"private function __construct( ){\n $this->generateCache( );\n }",
"function bootstrapstyle_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $absolute = TRUE) {\n // Check is_null() so people can intentionally pass an empty array of\n // to override the defaults completely.\n if (is_null($attributes)) {\n $attributes = array('class' => 'imagecache imagecache-'. $presetname);\n if (substr($presetname, -7) == '_circle') { //if suffix is _circle\n $attributes['class'] .= ' img-circle';\n }\n if (substr($presetname, -8) == '_rounded') { //if suffix is _rounded\n $attributes['class'] .= ' img-rounded';\n }\n }\n \n $ours = array(\n 'src' => imagecache_create_url($presetname, $path, FALSE, $absolute),\n 'alt' => $alt,\n 'title' => $title,\n );\n if ($getsize && ($image = image_get_info(imagecache_create_path($presetname, $path)))) {\n $ours += array('width' => $image['width'], 'height' => $image['height']);\n }\n\n return '<img' . drupal_attributes($ours + $attributes) . '/>';\n}",
"public function cache();",
"function _getCacheFile() {\r\n\t\treturn $this->_HSTemplate->_options ['cache_path'] . DIRECTORY_SEPARATOR . $this->_name . DIRECTORY_SEPARATOR . md5 ( $this->_name . '#' . $this->_caching_id ) . '.html';\r\n\t}",
"function rebuild_caches()\n\t{\n\t\t//-------------------------------------------------------------\n\t\t// SETTINGS\n\t\t//-------------------------------------------------------------\n\n\t\t$this->ipsclass->cache['settings'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'where' => 'conf_add_cache=1' ) );\n\t\t$info = $this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row($info) )\n\t\t{\n\t\t\t$value = $r['conf_value'] != \"\" ? $r['conf_value'] : $r['conf_default'];\n\n\t\t\tif ( $value == '{blank}' )\n\t\t\t{\n\t\t\t\t$value = '';\n\t\t\t}\n\n\t\t\t$this->ipsclass->cache['settings'][ $r['conf_key'] ] = $this->ipsclass->txt_safeslashes($value);\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'settings', 'array' => 1, 'deletefirst' => 1 ) );\n\n\n\t\t//-------------------------------------------------------------\n\t\t// COMPONENTS\n\t\t//-------------------------------------------------------------\n\n\t\t$this->ipsclass->cache['components'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'com_enabled=1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['components'][] = $r;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );\n\t\t\n\t\t//-------------------------------------------------------------\n\t\t// Mime-Types\n\t\t//-------------------------------------------------------------\n\t\t\n\t\t$this->ipsclass->cache['idm_mimetypes'] = array();\n\t\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'mime_id,mime_extension,mime_mimetype,mime_file,mime_screenshot,mime_inline,mime_img', 'from' => 'downloads_mime', 'where' => \"mime_screenshot=1 OR mime_file=1\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['idm_mimetypes'][ $r['mime_extension'] ] = $r;\n\t\t}\n\t\t\n\t\t$this->ipsclass->update_cache( array( 'name' => 'idm_mimetypes', 'array' => 1, 'deletefirst' => 1 ) );\t\t\n\t\t\n\t\t//-----------------------------\n\t\t// IDM Stats\n\t\t//-----------------------------\n\t\t\n\t\t$this->ipsclass->cache['idm_stats'] = array();\n\t\t\n\t\t//-----------------------------\n\t\t// Get total file count\n\t\t//-----------------------------\n\t\t\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' \t=> 'COUNT(file_id) as files',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> 'downloads_files',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'file_open=1'\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t$filecnt = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t$this->ipsclass->cache['idm_stats']['total_files'] = $filecnt['files'];\n\t\t\n\t\t$this->ipsclass->DB->free_result();\n\t\t\n\t\t//-----------------------------\n\t\t// Get total category count\n\t\t//-----------------------------\n\t\t\n\t\t$cnt = $this->ipsclass->DB->simple_exec_query( array( 'select' \t=> 'COUNT(cid) as cats',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> 'downloads_categories',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'copen=1'\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t\n\t\t$this->ipsclass->cache['idm_stats']['total_categories'] = $cnt['cats'];\n\t\t\n\t\t//-----------------------------\n\t\t// Get total download count\n\t\t//-----------------------------\n\t\t\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' \t=> 'SUM(file_downloads) as dls',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> 'downloads_files',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'file_open=1'\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t$dlcnt = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t$this->ipsclass->cache['idm_stats']['total_downloads'] = $dlcnt['dls'];\n\t\t\n\t\t$this->ipsclass->DB->free_result();\t\t\n\t\t\n\t\t//-----------------------------\n\t\t// Get distinct author count\n\t\t//-----------------------------\t\t\n\t\t\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' \t=> 'COUNT(DISTINCT(file_submitter)) as authors',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> 'downloads_files',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'file_open=1'\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t$authors = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t$this->ipsclass->cache['idm_stats']['total_authors'] = $authors['authors'];\n\t\t\n\t\t$this->ipsclass->DB->free_result();\n\t\t\n\t\t//-----------------------------\n\t\t// Get latest file info\n\t\t//-----------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' \t=> 'f.file_id, f.file_name, f.file_submitter, f.file_submitted, m.members_display_name',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> 'downloads_files f LEFT JOIN ibf_members m ON (m.id=f.file_submitter)',\n\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'f.file_open=1',\n\t\t\t\t\t\t\t\t\t\t\t\t 'order'\t=> 'f.file_submitted DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t 'limit'\t=> array(0,1)\n\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\t$fileinfo = $this->ipsclass->DB->fetch_row();\n\t\t\n\t\t$this->ipsclass->cache['idm_stats']['latest_fid'] \t= $fileinfo['file_id'];\n\t\t$this->ipsclass->cache['idm_stats']['latest_fname'] = $fileinfo['file_name'];\n\t\t$this->ipsclass->cache['idm_stats']['latest_mid'] \t= $fileinfo['file_submitter'];\n\t\t$this->ipsclass->cache['idm_stats']['latest_mname'] = $fileinfo['members_display_name'];\n\t\t$this->ipsclass->cache['idm_stats']['latest_date'] \t= $fileinfo['file_submitted'];\n\t\t\n\t\t$this->ipsclass->update_cache( array( 'name' => 'idm_stats', 'array' => 1, 'deletefirst' => 1, 'donow' => 0 ) );\n\n\t\t$this->redirect( \"index.php?act=templates&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}\", \"Caches rebuilt, proceeding to rebuild templates...\" );\n\t}"
] | [
"0.6504262",
"0.61305064",
"0.60851145",
"0.5932135",
"0.5888146",
"0.58504725",
"0.56880766",
"0.56862485",
"0.5663898",
"0.5662119",
"0.5631623",
"0.56294507",
"0.5607928",
"0.56074876",
"0.5604038",
"0.5566606",
"0.55294603",
"0.55293924",
"0.5480877",
"0.5477214",
"0.54743403",
"0.5456767",
"0.5448015",
"0.5444764",
"0.5438754",
"0.5438754",
"0.5433966",
"0.5422024",
"0.5412301",
"0.5404184"
] | 0.676149 | 0 |
Extends the autoloader so new class can be added as an override. | protected function extendAutoloader()
{
PrestaShopAutoload::getInstance()->index['CacheRedis'] = array(
'path' => '',
'type' => 'class',
'override' => false,
);
PrestaShopAutoload::getInstance()->index['CacheRedisCore'] = array(
'path' => 'classes/cache/CacheRedis.php',
'type' => 'class',
'override' => false,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _initExtendAutoloader()\n {\n $this->getApplication()->getAutoloader()->setFallbackAutoloader(true);\n }",
"protected function registerAutoloader()\n {\n spl_autoload_register([$this, 'load'], true, true);\n }",
"public static function autoloader()\n {\n spl_autoload_register([__CLASS__, 'loader']);\n }",
"public function registerAutoloaders();",
"abstract protected function autoloadImplementation($class);",
"private function autoloader() {\n spl_autoload_register( function( $class ){\n // Register class auto loader\n // Custom modules1\n if(strpos($class, 'Cleantalk') !== false){\n $class = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n $class_file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php';\n if(file_exists($class_file)){\n require_once($class_file);\n }\n }\n });\n }",
"public function registerAutoloader()\n\t{\n\t\t$this->registerPassThroughAutoloader();\n\t}",
"private static function autoload()\n\t{\n\t\tspl_autoload_register([__CLASS__, 'load']);\n\t}",
"public function registerAutoloader()\n\t{\n\t\tspl_autoload_register(array($this,'load'));\n\t}",
"public static function loader()\n {\n spl_autoload_register('self::load');\n }",
"function __autoload($class_name)\n{\n\tAutoLoad_1::runLoad($class_name);\n}",
"function __autoload($class_name) {\r\n \r\n }",
"private function __autoload()\n {\n\n }",
"public function setAutoload(){\n\n require_once Mage::getBaseDir('lib') . DS . 'Zend' . DS . 'Loader.php';\n $autoLoader = Zend_Loader_Autoloader::getInstance();\n\n // get all Varien autoloaders and unregister them\n $autoloader_callbacks = spl_autoload_functions();\n $original_autoload = null;\n\n foreach($autoloader_callbacks as $callback) {\n if(is_array($callback) && $callback[0] instanceof Varien_Autoload) {\n $original_autoload = $callback;\n }\n }\n\n spl_autoload_unregister($original_autoload);\n\n // the faker autoloader\n function fakerLoader($className) {\n\n $className = ltrim($className, '\\\\');\n $fileName = '';\n\n if ($lastNsPos = strripos($className, '\\\\')) {\n $namespace = substr($className, 0, $lastNsPos);\n $className = substr($className, $lastNsPos + 1);\n $fileName = lcfirst(str_replace('\\\\', DS, $namespace) . DS);\n }\n\n $fileName = Mage::getBaseDir('lib') . DS . 'fzaninotto' . DS . $fileName . DS . $className . '.php';\n\n if (file_exists($fileName)) {\n require_once $fileName;\n\n return true;\n }\n\n return false;\n }\n\n $autoLoader->pushAutoloader('fakerLoader', 'Faker\\\\');\n\n // re-add the original autoloader\n $autoLoader->pushAutoloader($original_autoload);\n\n }",
"public function enregistrer()\n {\n spl_autoload_register(array($this, 'loadClass'));\n }",
"private static function setupClassLoading() {\n\t\tspl_autoload_register(array('Reggie', 'autoload'));\n\t}",
"public static function overrideLoader($name, $class)\n {\n $name = mb_strtolower($name);\n self::$LOADERS[$name] = $class;\n }",
"function autoloader ($classFile)\n{\n $classFile = str_replace('\\\\','/', $classFile);\n require_once(BASE_DIR . '/'. $classFile . \".php\");\n}",
"function baseAutoload($class)\n{\n require_once(strtolower(str_replace(\"\\\\\", \"/\", $class) . '.php'));\n}",
"protected function _registerAutoloaders()\n\t{\n require __REQUIRE_PATH__.\"loader.php\"; \n }",
"public static function registerClassAutoLoader()\n {\n foreach (spl_autoload_functions() as $registerFunction) {\n if (count($registerFunction) >= 2) {\n list($class, $function) = $registerFunction;\n if ($class === self::class && $function === 'loadClassForTesting') {\n return;\n }\n }\n }\n spl_autoload_register(array(self::class, 'loadClassForTesting'));\n }",
"protected function loadBase()\n\t\t{\n\t\t\tincluder(\n\t\t\t\tarray(\n\t\t\t\t\t\"class.mysqlconnection.php\",\n\t\t\t\t\t\"wrap.mysql.php\",\n\t\t\t\t\t\"class.localapi.php\"\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function autoload()\r\n\t{\r\n\t\t$this->loader = new UniversalClassLoader();\r\n\t\t$this->loader->registerNamespace('F2Dev\\InvoiceEngine', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');\r\n\t\t$this->loader->registerNamespace('Doctrine', __DIR__ . DIRECTORY_SEPARATOR . \"Vendors\" . DIRECTORY_SEPARATOR);\r\n\t\t$this->loader->register(true);\r\n\t}",
"function __autoload($class_name) {require_once \"$class_name.php\";}",
"protected function setClassLoader() {\n $this->classLoader = new \\Core\\ClassLoader(_BASE);\n $this->classLoader->register();\n }",
"function autoloader(){\n\tspl_autoload_register('myAutoloader');\n}",
"function class_autoloader($class)\n{\n require_once 'classes/' . $class . '.php';\n}",
"protected function prependToLoaderStack()\n {\n spl_autoload_register(array($this, 'load'), true, true);\n }",
"protected function registerCustomAutoloaders()\n {\n if (isset($this->config['autoloaders']) && is_array($this->config['autoloaders'])) {\n foreach ($this->config['autoloaders'] as $prefix => $path) {\n $this->autoloader->add($prefix, $path);\n }\n }\n\n if (isset($this->config['autoloaders_psr4']) && is_array($this->config['autoloaders_psr4'])) {\n foreach ($this->config['autoloaders_psr4'] as $prefix => $path) {\n $this->autoloader->addPsr4($prefix, $path);\n }\n }\n }",
"public function registerLoader()\n {\n $wrapper = new \\Yana\\Core\\Autoloaders\\Wrapper();\n $wrapper->registerAutoLoader($this->_getLoader());\n }"
] | [
"0.7415879",
"0.72993886",
"0.7247245",
"0.72167003",
"0.7101521",
"0.7097396",
"0.69439095",
"0.69426423",
"0.6930927",
"0.69097596",
"0.6885367",
"0.6882485",
"0.68813413",
"0.68472683",
"0.6844361",
"0.68264896",
"0.6822477",
"0.6782937",
"0.678",
"0.67775923",
"0.6756027",
"0.67254084",
"0.672176",
"0.67104375",
"0.670478",
"0.6687809",
"0.6682265",
"0.66789806",
"0.66674715",
"0.66620827"
] | 0.7908711 | 0 |
Whether the rate limit of request was exceeded or not | public function isExceeded(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function limit_reached($response);",
"public function checkRequestLimit()\n {\n $isLimitReached = false;\n $client = $this->getClient();\n \n if ( ! is_null($client)) {\n $currentTotalRequest = 1;\n $currentTime = time();\n $requestLimitUntil = $currentTime;\n \n $requestLimitUntil = strtotime($client->request_limit_until);\n if ($requestLimitUntil < 0) {\n $requestLimitUntil = $currentTime;\n }\n\n if ($currentTime <= $requestLimitUntil) {\n $currentTotalRequest = $client->current_total_request + 1;\n\n if ($currentTotalRequest > $client->request_limit) {\n $isLimitReached = true;\n }\n }\n\n if ($currentTime > $requestLimitUntil) {\n $dateTime = new DateTime('+1 hour');\n\n $requestLimitUntil = $dateTime->getTimestamp();\n\n unset($dateTime);\n }\n\n if ( ! $isLimitReached) {\n $dateTime = new DateTime();\n\n $client->current_total_request = $currentTotalRequest;\n $client->request_limit_until = $dateTime->setTimestamp($requestLimitUntil)->format('Y-m-d H:i:s');\n $client->last_request_at = $dateTime->setTimestamp($currentTime)->format('Y-m-d H:i:s');\n\n $client->save();\n\n unset($dateTime);\n }\n }\n\n unset($client);\n\n return $isLimitReached;\n }",
"protected function checkRateLimit()\n {\n // if no more remaing calls\n if ($this->getRemainingCalls() <= 0) {\n // throw error\n return new ApiProblemResponse(new ApiProblem(429, 'Too many requests please try again later'));\n }\n\n // create record for the current ip\n $this->storage->set($this->getKey(), $this->getPeriod(), 1);\n }",
"public function isLimitReached()\n {\n return $this->limitReached;\n }",
"public function getIsLimited()\n {\n return (int)$this->limit > 0;\n }",
"public function sizeLimitExceeded()\n {\n return $this->getErrorCode() == 4;\n }",
"function check_rate_limit_exceeded($user_guid) {\n\t// 5 failures in 5 minutes causes temporary block on logins\n\t$limit = 5;\n\t$user_guid = (int)$user_guid;\n\t$user = get_entity($user_guid);\n\n\tif (($user_guid) && ($user) && ($user instanceof ElggUser)) {\n\t\t$fails = (int)$user->getPrivateSetting(\"login_failures\");\n\t\tif ($fails >= $limit) {\n\t\t\t$cnt = 0;\n\t\t\t$time = time();\n\t\t\tfor ($n = $fails; $n > 0; $n--) {\n\t\t\t\t$f = $user->getPrivateSetting(\"login_failure_$n\");\n\t\t\t\tif ($f > $time - (60 * 5)) {\n\t\t\t\t\t$cnt++;\n\t\t\t\t}\n\n\t\t\t\tif ($cnt == $limit) {\n\t\t\t\t\t// Limit reached\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}",
"public function hasReachedThrottle()\n {\n $attempt_key = $this->getAttemptCacheName();\n $attempts = Cache::get($attempt_key, 0);\n\n return $attempts > $this->getCredential('throttle_limit', 15);\n }",
"public function isThrottling(): bool;",
"public function checkHourlyLimit()\n {\n if (strtotime('- '.$this->config->getHourlyLimit().' second') >= $this->data['period']['lastDate']) {\n return true;\n }\n if ($this->data['hourlyMaxRequest'] < 1) {\n $this->execBan('Hourly');\n return false;\n }\n return true;\n }",
"function rateLimited() {\n\t\tglobal $wgOut;\n\t\t$wgOut->disable();\n\t\twfHttpError( 500, 'Internal Server Error',\n\t\t\t'Sorry, the server has encountered an internal error. ' .\n\t\t\t'Please wait a moment and hit \"refresh\" to submit the request again.' );\n\t}",
"private static function isThrottledPerSecond() {\n\t\tif ( self::$maxRequestsPerSecond > 0 ) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public function isFailedRequest()\n {\n return $this->type === EntryType::REQUEST &&\n ($this->content['response_status'] ?? 200) >= 500;\n }",
"private function SMSVerificationAttemptLimitExceeded()\n {\n return $this->sms_verification_attempts > $this->sms_verification_attempt_limit;\n }",
"public function shouldThrottle(APIRequest $request): bool;",
"public function checkTotalLimit()\r\n {\r\n if ($this->total_limit === $this::ON) {\r\n\r\n $startTime = TimeHelper::startTime($this->total_limit_period);\r\n\r\n $submissions = FormSubmission::find()->select('id')->asArray()\r\n ->where(['form_id' => $this->id])\r\n ->andWhere(['between','created_at', $startTime, time()])->count();\r\n\r\n if ($this->total_limit_number <= $submissions) {\r\n /** @var \\yii\\web\\Response $response */\r\n $response = Yii::$app->getResponse();\r\n $response->format = Response::FORMAT_JSON;\r\n $response->data = array(\r\n 'action' => 'submit',\r\n 'success' => false,\r\n 'id' => 0,\r\n 'message' => Yii::t(\"app\", \"Sorry, the form does not accept more submissions per {period}.\", [\r\n 'period' => TimeHelper::getPeriodByCode($this->total_limit_period)]),\r\n );\r\n $response->send();\r\n\r\n exit;\r\n }\r\n }\r\n }",
"public function getRateLimitLimit(): int\n {\n return $this->httpClient->getRateLimitLimit();\n }",
"private static function isThrottledPerHour() {\n\t\tif ( self::$maxRequestsPerHour > 0 ) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public function assertTooManyRequests(): self\n {\n return $this->assertStatus(429);\n }",
"public function getExceededResource();",
"public function checkIntervalLimit()\n {\n if (strtotime('- '.$this->config->getIntervalLimit(). ' second') >= $this->data['period']['lastDate']) {\n return true;\n }\n if ($this->data['intervalMaxRequest'] < 1) {\n $this->execBan('Interval');\n return false;\n }\n return true;\n }",
"public function hasLimit();",
"private function checkLimitations()\n {\n// @todo : build this out into a service\n if ($this->checkLocomotion()) {\n return true;\n }\n return false;\n }",
"public function hasReachedLimit($identifier);",
"public function isRequestError()\n {\n return $this->getCode() >= 400 && $this->getCode() < 500;\n }",
"public function getLimit(): int {\n\t\treturn $this->rateLimitLimit;\n\t}",
"public function hasQuota(){\n return $this->_has(9);\n }",
"function isReachLimit() {\r\n\t\t$unwhiteDomainsCount = count($this->unwhiteDomains);\r\n\t\treturn $this->linkNumberLimit ? $unwhiteDomainsCount >= $this->linkNumberLimit : false;\r\n\t}",
"public function isRequestError() : bool {\n $status = $this->getStatus();\n return $status >= 400 && $status < 500;\n }",
"private function limit_check( $input = FALSE )\n {\n if ( $input != FALSE )\n {\n list( $this->config['API_Limit_current'], $this->config['API_Limit'] ) = explode( '/', $input );\n }\n else\n {\n // no input given, lets call the limit uri and get our current\n $data = curl('https://xboxapi.com/v1/limit/');\n\n if(strpos($data, '/') != FALSE)\n {\n list( $this->config['API_Limit_current'], $this->config['API_Limit'] ) = explode( '/', $data );\n }\n else\n {\n // set the error\n $this->config['error'] = 'Error retrieveing current limit from XboxAPI...';\n }\n }\n\n // lets do a check against the current data to see if we are over or under the limit\n if ( $this->config['API_Limit_current'] < $this->config['API_Limit'] )\n return TRUE;\n\n return FALSE;\n }"
] | [
"0.76201123",
"0.73804754",
"0.73753524",
"0.7303478",
"0.72632295",
"0.70994675",
"0.691553",
"0.68138313",
"0.67572075",
"0.67559797",
"0.6728121",
"0.66951036",
"0.6680219",
"0.6673679",
"0.6640803",
"0.6640795",
"0.6629153",
"0.66271406",
"0.66189474",
"0.661182",
"0.6546726",
"0.65341455",
"0.6533558",
"0.6524332",
"0.6524098",
"0.6492362",
"0.648341",
"0.64773303",
"0.64739066",
"0.6463487"
] | 0.7555941 | 1 |
/ Function Name: connect Arguments: none Purpose: Establishes a connection to the database. Returns: oci connection to the database (type == a connection resource with parameters of strings) | function connect()
{
include 'config.php';
return oci_connect($database_username, $database_password, $database_link);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function connect_db($user,$pass,$con_str,$character_set){\n $conn_id = oci_connect($user,$pass,$con_str,$character_set);\n if \t(!is_resource($conn_id)){\n $err = oci_error();\n throw new Exception($err['message']);\n }\n $conn_id = $conn_id;\n return $conn_id;\n}",
"function connect() {\n // import database connection variables\n $conn_string = \"DATABASE=\".DATABASE.\";HOSTNAME=\".HOST.\";PORT=\".PORT.\";PROTOCOL=TCPIP;UID=\".USER.\";PWD=\".PASSWORD.\";\";\n //$conn_string = \"DATABASE=INCPOWDB;HOSTNAME=9.7.69.58;PORT=60000;PROTOCOL=TCPIP;UID=IVANALF;PWD=uBzH7be1;\";\n\t\t$con = db2_connect($conn_string, '', '');\n // returing connection cursor\n return $con;\n }",
"public function connect() {\n\t\t$auth = $this->auth();\n\n\n\t\t//USE EXISTING CONNECTION IF AVAILABLE\n\t\tif (is_resource($auth['server'])) {\n\t\t\t$this->connection = $auth['server'];\n\n\n\t\t//ATTEMPT TO CREATE A PERSISTANT CONNECTION\n\t\t} else if ($auth['persistent']) {\n\t\t\t$this->connection = @odbc_pconnect(\n\t\t\t\t$auth['database'],\n\t\t\t\t$auth['username'],\n\t\t\t\t$auth['password']\n\t\t\t);\n\n\t\t//ATTEMPT TO CREATE A NON-PERSISTANT CONNECTION\n\t\t} else {\n\t\t\t$this->connection = @odbc_connect(\n\t\t\t\t$auth['database'],\n\t\t\t\t$auth['username'],\n\t\t\t\t$auth['password']\n\t\t\t);\n\t\t}\n\n\n\t\t//CANNOT CONNECT - ERROR OUT\n\t\tif (empty($this->connection)) {\n\t\t\tthrow new pudlConnectionException($this,\n\t\t\t\t'Unable to connect to ODBC database ' .\n\t\t\t\t'\"' . $auth['database'] . '\"' .\n\t\t\t\t' with the username ' .\n\t\t\t\t'\"' . $auth['username'] . '\"' .\n\t\t\t\t\"\\nError \" . $this->errno() .\n\t\t\t\t': ' . $this->error()\n\t\t\t);\n\t\t}\n\n\n\t\t// STORE WHICH SERVER WE'RE CONNECTED TO\n\t\tif (!empty($auth['server'])) {\n\t\t\t$this->connected = $auth['server'];\n\t\t}\n\t}",
"public function getConnection()\n {\n require $this->aIniArray[$this->sHost]['dbconnect'];\n $dbconn = @pg_connect($connect); //connect is set in the required file\n \n return $dbconn;\n }",
"public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n\n $config['charset'] = !empty($config['charset']) ? $config['charset'] : null;\n\n if (!$config['persistent']) {\n $this->connection = @ocilogon($config['username'], $config['password'], $config['database'], $config['charset']);\n } else {\n $this->connection = @ociplogon($config['username'], $config['password'], $config['database'], $config['charset']);\n }\n\n if ($this->connection) {\n $this->connected = true;\n if (!empty($config['nls_sort'])) {\n $this->query('ALTER SESSION SET NLS_SORT='.$config['nls_sort']);\n }\n\n if (!empty($config['nls_comp'])) {\n $this->query('ALTER SESSION SET NLS_COMP='.$config['nls_comp']);\n }\n $this->execute(\"ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'\");\n } else {\n $this->connected = false;\n $this->lastError();\n\n return false;\n }\n\n return $this->connection;\n }",
"public function connect() {\n\t\t$config = $this->config;\n\n\t\t$port = '';\n\t\tif ($config['port'] !== null) {\n\t\t\t$port = ':' . $config['port'];\n\t\t}\n\t\tif ($config['persistent']) {\n\t\t\t$this->connection = sybase_pconnect($config['host'] . $port, $config['login'], $config['password']);\n\t\t} else {\n\t\t\t$this->connection = sybase_connect($config['host'] . $port, $config['login'], $config['password'], true);\n\t\t}\n\t\t$this->connected = sybase_select_db($config['database'], $this->connection);\n\t\treturn $this->connected;\n\t}",
"function connect() {\n\t\t$config = $this->config;\n\t\t$this->connected = false;\n\t\t$config['charset'] = !empty($config['charset']) ? $config['charset'] : null;\n\n\t\tif (!$config['persistent']) {\n\t\t\t$this->connection = oci_connect($config['login'], $config['password'], $config['database'], $config['charset']);\n\t\t} else {\n\t\t\t$this->connection = oci_pconnect($config['login'], $config['password'], $config['database'], $config['charset']);\n\t\t}\n\n\t\tif ($this->connection) {\n\t\t\t$this->connected = true;\n\t\t\tif (!empty($config['nls_sort'])) {\n\t\t\t\t$this->execute('ALTER SESSION SET NLS_SORT='.$config['nls_sort']);\n\t\t\t}\n\n\t\t\tif (!empty($config['nls_comp'])) {\n\t\t\t\t$this->execute('ALTER SESSION SET NLS_COMP='.$config['nls_comp']);\n\t\t\t}\n\t\t\t$this->execute(\"ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'\");\n\t\t} else {\n\t\t\t$this->connected = false;\n\t\t\t$this->_setError();\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->connected;\n\t}",
"public function connect() {\n $this->connection = pg_connect($this->credentials);//or die(\"unableto open db\")\n return $this->connection;\n }",
"function connect() {\n\t\trequire '../config.php';\n\t\t$con = mysqli_connect($hostname, $dbusername, $dbpassword, $dbname);\n\t\treturn $con;\n\t}",
"function connect() {\n $ferror=null;\n $options = array();\n if (defined('DBSSLCA'))\n $options['ssl'] = array(\n 'ca' => DBSSLCA,\n 'cert' => DBSSLCERT,\n 'key' => DBSSLKEY\n );\n\n if (!db_connect(DBHOST, DBUSER, DBPASS, $options)) {\n $ferror=sprintf('Unable to connect to the database — %s',db_connect_error());\n }elseif(!db_select_database(DBNAME)) {\n $ferror=sprintf('Unknown or invalid database: %s',DBNAME);\n }\n\n if($ferror) //Fatal error\n self::croak($ferror);\n }",
"function connect() {\r\n\t\t// import database connection variables\r\n\t\trequire_once dirname(__FILE__).'/db_config.php';\r\n\t\t// Connecting to mysql database\r\n\t\t$this->conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE);\r\n\t\t// Check connection\r\n \t\tif (!$this->conn) {\r\n\t\t\tdie(\"Connection failed: \" . mysqli_connect_error());\r\n\t\t} \r\n\t\t// returing connection cursor\r\n\t\treturn $this->conn ;\r\n\t}",
"public function get_conexion()\n\t{\n\n\n\t\t//$conn=oci_connect('SYSTEM','aDm1n2020','localhost/orcl');\n // $conn=oci_connect('SYSTEM','Lalo1516','localhost/lalodatabase');\n $conn=oci_connect('RETYS2014','retys2014','10.10.124.12:1521/pdb1srv.edomex.gob.mx');\n\n\t\tIf (!$conn){\n\t \techo 'Error en la conexión a la Base de Datos...';\n \t\t$m = oci_error();\n \t\t\ttrigger_error(htmlentities($m['message']), E_USER_ERROR);\n\t\t\t}\n \t//else{\n //\t\techo 'CONECCION EXITOSA A Oracle LOCAL Mi File';\n \t//\t}\n\n\t\treturn $conn;\n\t}",
"function connect(){\r\n // import db connection variables\r\n require_once __DIR__.'/db_config.php';\r\n \r\n // connecting to mysql database\r\n $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\r\n \r\n // returning connection cursor\r\n return $con;\r\n }",
"function connect($connection=NULL,$name=NULL){\n $this->db = NULL;\n $this->dbname = NULL;\n $this->dbuser = NULL;\n\n // already a opc_instance\n if(is_object($connection) and ($connection instanceof opc_pg)){\n $this->phpenc = $connection->phpenc;\n return $this->int_settings($connection->db);\n }\n\n // connection is already a resource\n if(is_resource($connection)){\n if(get_resource_type($connection)!='pgsql link') return FALSE;\n return $this->int_settings($connection);\n } else if(!is_string($connection)) return(FALSE);\n\n // read connection from a file (singel string or name:connection)\n if(!preg_match('/dbname *=/i',$connection)){ // connection is a file name\n if(!file_exists($connection)) return(FALSE);\n $connection = file($connection);\n if(!is_null($name)){\n\t$connection = preg_grep('/^' . $name . ':/',$connection);\n\tif(!is_array($connection) or count($connection)!=1) return(FALSE); \n\t$connection = preg_replace('/^.*:/','',array_shift($connection));\n } else $connection = array_shift($connection);\n }\n // connect to the db\n $db = pg_connect($connection);\n if($db===FALSE) return FALSE;\n return $this->int_settings($db);\n }",
"function connect() {\r\n // import database connection variables\r\n require_once __DIR__ . '/include/db_info.php';\r\n \r\n global $g_link;\r\n global $CON;\r\n\r\n if( $g_link )\r\n return $this->CON;\r\n \r\n // Connecting to mysql database\r\n $this->CON = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD,DB_DATABASE) or die(mysqli_connect_error());\r\n //$CON = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\r\n //$db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());\r\n // Selecing database\r\n //$db = \r\n //mysqli_select_db(DB_DATABASE) or die(mysql_error());\r\n $g_link = true;\r\n // returing connection cursor\r\n return $this->CON;\r\n }",
"function connect ($config) {\n\t\tif($config) {\n\t\t\t$this->config = $config;\n\t\t\t$this->_conn = sqlite_open($config['host']);\n\t\t}\n\t\t$this->connected = $this->_conn ? true: false;\n\n\t\tif($this->connected==false)\n\t\t\tdie('Could not connect to DB.');\n\t\telse\n\t\t\treturn $this->_conn;\n\t}",
"public function dbconnect(ConnectionParameters $objParams);",
"public function connect() {\n \n //we return a connection and store it int the public field $connection\n \n return mysqli_connect(DATABASE_SERVER,\n DATABASE_USER,\n DATABASE_PASSWORD,\n DATABASE_NAME);\n }",
"public function connect()\r\n\t{\r\n\t\t$this->conn = pg_connect( $this->connstr );\r\n\t\tif( !$this->conn )\r\n\t\t\ttrigger_error(\"Unable to connect\", E_USER_ERROR);\r\n\t\t\r\n\t\t$ret = pg_query(\"SELECT version()\");\r\n\t\t$row = $this->fetch_numarray($ret);\r\n\t\tif( $row )\r\n\t\t{\r\n\t\t\tif(\tpreg_match(\"/^PostgreSQL\\s(\\d{1,2})\\./\", $row[0], $matches) )\r\n\t\t\t\t$this->postgreDbVersion = $matches[1];\r\n\t\t}\t\r\n\t\t\r\n\t\treturn $this->conn;\r\n\t}",
"public function connect($host, $port, $user, $password, $db, $new_link = false);",
"function retornarConexion() {\n\n $con=mysqli_connect(\"oracle.ilerna.com\",\"DAW2_GamifikG2\",\"aGamifikG21\",\"daw2_gamifikg2\");\n\n return $con;\n }",
"function connect() {\n // import database connectoin variables\n require_once __DIR__ . '/db_config.php';\n\n // Connecting to mysql database\n $con = mysqli_connect(DB_SERVER,DB_USER,DB_PASSWORD);\n // Selecting database\n $db = mysqli_select_db($con,DB_DATABASE) or die(mysqli_error($con)); // The error link\n\n // returning connection cursor\n return $con;\n }",
"function connect(){\r\n // Create connection\r\n $conn = Connexion::GetConnexion();\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n } \r\n return $conn;\r\n\t}",
"function connect_db(){\n\t\trequire_once '../../global/php/connect.php';\n\n\t\t// Check connection\n\t\tif ($conn->connect_error) \n\t\t die(\"Connection failed: \" . $conn->connect_error);\n\t\telse\n\t\t\treturn $conn;\n\t}",
"function connect() {\n // import database connection variables\n require_once __DIR__ . '/db_config.php';\n \n // Connecting to mysql database\n $con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD)) or die(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n \n // Selecing database\n $db = ((bool)mysqli_query($GLOBALS[\"___mysqli_ston\"], \"USE \" . constant('DB_DATABASE'))) or die(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))) or die(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n \n // returing connection cursor\n return $con;\n }",
"function connect() {\r\n // import database connection variables\r\n require_once __DIR__ . '/DB_settings.php';\r\n \r\n // Connecting to mysql database\r\n $con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\r\n \r\n // Selecing database\r\n $db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());\r\n \r\n // returing connection cursor\r\n return $con;\r\n }",
"function connect() {\n\t$host = \"insert_host_here\";\n\t$user = \"user\";\n\t$pass = \"password\";\n\t$db = \"database\";\n\n\t$connection = pg_connect(\"host=$host dbname=$db user=$user password=$pass\")\n\t or die (\"Could not connect to server\\n\");\n}",
"public function connect() {\n // Check that the PostgreSQL extension is installed.\n if (!is_callable('pg_connect')) {\n throw new Exceptions\\UnableToConnectException(\n 'PostgreSQL PHP extension is not available. It probably has not '.\n 'been installed. Please install and configure it in order to use '.\n 'PostgreSQL.'\n );\n }\n $connectionType = $this->config['PostgreSQL']['connection_type'];\n $host = $this->config['PostgreSQL']['host'];\n $port = $this->config['PostgreSQL']['port'];\n $user = $this->config['PostgreSQL']['user'];\n $password = $this->config['PostgreSQL']['password'];\n $database = $this->config['PostgreSQL']['database'];\n // Connecting, selecting database\n if (!$this->connected) {\n if ($connectionType === 'host') {\n $connectString = (\n 'host=\\''.addslashes($host).\n '\\' port=\\''.addslashes($port).\n '\\' dbname=\\''.addslashes($database).\n '\\' user=\\''.addslashes($user).\n '\\' password=\\''.addslashes($password).\n '\\' connect_timeout=5'\n );\n } else {\n $connectString = (\n 'dbname=\\''.addslashes($database).\n '\\' user=\\''.addslashes($user).\n '\\' password=\\''.addslashes($password).\n '\\' connect_timeout=5'\n );\n }\n if ($this->config['PostgreSQL']['allow_persistent']) {\n $this->link = pg_connect(\n $connectString.\n ' options=\\'-c enable_hashjoin=off -c enable_mergejoin=off\\''\n );\n } else {\n $this->link = pg_connect(\n $connectString.\n ' options=\\'-c enable_hashjoin=off -c enable_mergejoin=off\\'',\n PGSQL_CONNECT_FORCE_NEW\n );\n // Don't think this is necessary, but if put in options, will guarantee\n // connection is new. \" -c timezone='.round(rand(10001000, 10009999)).'\"\n }\n if ($this->link) {\n $this->connected = true;\n } else {\n $this->connected = false;\n if ($host === 'localhost'\n && $user === 'nymph'\n && $password === 'password'\n && $database === 'nymph'\n && $connectionType === 'host'\n ) {\n throw new Exceptions\\NotConfiguredException();\n } else {\n throw new Exceptions\\UnableToConnectException(\n 'Could not connect: '.\n pg_last_error()\n );\n }\n }\n }\n return $this->connected;\n }",
"function connect ()\n {\n $this->error = \"\"; //Set the errors to none\n if ($this->debug)\n {\n $this->debugmsg (\"Connecting to \".$this->dbtype.\" database....\", \"blue\");\n }\n \n switch ($this->dbtype)\n {\n /* Firebird Functionality */\n case \"firebird\" :\n ini_set(\"ibase.dateformat\", $this->dateformat);\n ini_set(\"ibase.timestampformat\", $this->datetimeformat); \n \n $this->dbh = ibase_connect ($this->dbpath, $this->username, $this->password);\n break;\n /* SQLite Functionality */\n case \"sqlite\" :\n\t\t define(\"CDE_ASSOC\", SQLITE_ASSOC);\n define(\"CDE_NUM\", SQLITE_NUM);\n define(\"CDE_BOTH\", SQLITE_BOTH); \n\t\t \t\t \n putenv(\"TMP=\".$this->tmppath);\n $this->dbh = sqlite_open ($this->dbpath);\n break;\n /* DBASE Functionality */\n case \"dbase\" :\n $this->dbh = dbase_open ($this->dbpath, 2);\n break;\n /* MYSQL Functionality */\n case \"mysql\" :\n\t\t //Set the constants\n\t\t define(\"CDE_ASSOC\", MYSQL_ASSOC);\n define(\"CDE_NUM\", MYSQL_NUM);\n define(\"CDE_BOTH\", MYSQL_BOTH);\n\t\t \n $connection = explode(\":\", $this->dbpath);\n $this->dbh = mysql_connect ($connection[0], $this->username, $this->password);\n mysql_select_db ($connection[1]);\n break;\n /* Oracle Functionality */\n case \"oracle\" :\n define(\"CDE_ASSOC\", OCI_ASSOC);\n define(\"CDE_NUM\", OCI_NUM);\n define(\"CDE_BOTH\", OCI_BOTH); \n $this->dbh = oci_connect ($this->username, $this->password, $this->dbpath);\n break;\n /* MSSQL Functionality */\n case \"mssql\" :\n define(\"CDE_ASSOC\", MSSQL_ASSOC);\n define(\"CDE_NUM\", MSSQL_NUM);\n define(\"CDE_BOTH\", MSSQL_BOTH); \n $connection = explode(\":\", $this->dbpath);\n $this->dbh = mssql_connect ($connection[0], $this->username, $this->password);\n mssql_select_db ($connection[1]);\n break;\t\t \n \t /* PGSQL Functionality */\n \t case \"pgsql\":\n define(\"CDE_ASSOC\", PGSQL_ASSOC);\n define(\"CDE_NUM\", PGSQL_NUM);\n define(\"CDE_BOTH\", PGSQL_BOTH); \n \t $connection = explode(\":\", $this->dbpath);\n \t \t $this->dbh = pg_connect(\"host=\".$connection[0].\" dbname=\".$connection[1].\" user=\".$this->username.\" password=\".$this->password.\"\");\n \t break;\n }\n \n //Define defaults for all databases that don't suport fetch_array\n define(\"CDE_ASSOC\", 1);\n define(\"CDE_NUM\", 2);\n define(\"CDE_BOTH\", 3);\n define(\"CDE_INSERT\", 0);\n define(\"CDE_UPDATE\", 1); \n define(\"CDE_DELETE\", 2);\n \n if ($this->debug)\n {\n if ($this->dbh) { $this->debugmsg (\"Connected to \".$this->dbtype.\" database....\", \"green\"); }\n else {$this->debugmsg (\"Failed to connect \".$this->dbtype.\" database....\", \"red\"); exit;} //if we can't connect don't go on.\n }\n }",
"public function connect()\n {\n $con=new mysqli(Constants::$DB_SERVER,Constants::$USERNAME,Constants::$PASSWORD,Constants::$DB_NAME);\n if($con->connect_error)\n {\n //echo \"Unable To Connect\";\n return null;\n }else\n {\n return $con;\n }\n }"
] | [
"0.72480273",
"0.72136396",
"0.68895566",
"0.68017805",
"0.6754038",
"0.6697076",
"0.66050684",
"0.65491176",
"0.6521589",
"0.6518955",
"0.65122074",
"0.6497746",
"0.64870596",
"0.6461958",
"0.6452282",
"0.6423027",
"0.64176923",
"0.64134264",
"0.640961",
"0.6393584",
"0.6388813",
"0.63767827",
"0.63417166",
"0.6309075",
"0.63050234",
"0.6303591",
"0.6289984",
"0.6283812",
"0.62821555",
"0.62470543"
] | 0.74536407 | 0 |
returns true if solr is configured currently, false otherwise | public function isConfigured()
{
if (!empty($this->urlParts) && isset($this->solrMap[$this->className])) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isEnabled()\n {\n // require_once (ROOT_PATH .\n // '/businessLogic/modules/SearchIndexAccess/Solr.php');\n require_once ('class.solr.php');\n $solr = new BpmnEngine_SearchIndexAccess_Solr ($this->_solrIsEnabled, $this->_solrHost);\n return $solr->isEnabled ();\n }",
"public function isSearchSmart(): bool {\n\t\treturn (bool)$this->_getConfig('search.smart');\n\t}",
"public function isConfigured();",
"public function shouldSearchOnOptions()\n {\n return Mage::getStoreConfigFlag('catalog/search/elasticsearch_enable_options_search');\n }",
"public function isConfigured() {\n $settings = $this->configFactory->get('gatsby.settings');\n $preview_url = $settings->get('preview_callback_url');\n $incrementalbuild_url = $settings->get('incrementalbuild_url');\n\n if ($preview_url || $incrementalbuild_url) {\n return TRUE;\n }\n\n return FALSE;\n }",
"function init()\n\t{\n\t\tglobal $db, $user, $config;\n\n\t\tif ($db->sql_layer != 'mysql' && $db->sql_layer != 'mysql4' && $db->sql_layer != 'mysqli')\n\t\t{\n\t\t\treturn $user->lang['FULLTEXT_SPHINX_WRONG_DATABASE'];\n\t\t}\n\n\t\tif ($error = $this->config_updated())\n\t\t{\n\t\t\treturn $error;\n\t\t}\n\n\t\t// move delta to main index each hour\n\t\tset_config('search_gc', 3600);\n\n\t\treturn false;\n\t}",
"public function quicksearch()\n {\n return (Settings::getInstance()->MODULES['REW_IDX_BUILDER'] && Settings::getInstance()->MODULES['REW_IDX_QUICKSEARCH'] &&\n $this->is_super_admin_as_admin()\n ) ? true : false;\n }",
"public function isCatalogSearch()\n {\n $pathInfo = $this->_getRequest()->getPathInfo();\n if (stripos($pathInfo, '/catalogsearch/result') !== false) {\n return true;\n }\n return false;\n }",
"public function isConfigured()\n {\n return (!$this->getConfig());\n }",
"public function is_search_active() {\n\t\treturn Jetpack::is_module_active( 'search' );\n\t}",
"public function isEnabled()\n {\n return (bool)Mage::getStoreConfig(self::XML_PATH_VOICE_SEARCH_ENABLED);\n }",
"public function is_system_configured() {\n return true;\n }",
"public function isSearchable(): bool\n {\n return $this->searchable;\n }",
"public function has_config() {\n return false;\n }",
"public function has_config()\n {\n return true;\n }",
"protected function _isEnabled()\n {\n return $this\n ->_getConfigService()\n ->getParameter('mysql.enabled');\n }",
"function current_search_config_exists($name) {\n $configs = ctools_export_crud_load_all('current_search');\n return isset($configs[$name]);\n}",
"function has_config() {return true;}",
"public function has_config() {\n return true;\n }",
"public function has_config() {\n return true;\n }",
"public function has_config() {\n return true;\n }",
"public function has_config() {\n return true;\n }",
"public function has_config() {\n return true;\n }",
"public function isSearchable()\n\t{\n\t\treturn $this->searchable;\n\t}",
"public function isQuickSearchEnabled() {\n\t\treturn true;\n\t}",
"public function isConfigured()\n {\n if ($this->_isConfigured === null) {\n if ($this->isEnabled()) {\n $this->_isConfigured = false;\n try {\n $this->getCdnAdapter();\n $this->_isConfigured = true;\n } catch (Exception $e) {}\n } else {\n $this->_isConfigured = false;\n }\n }\n\n return $this->_isConfigured;\n }",
"public function is_configured() {\n return (!empty($this->get('clientid')) && !empty($this->get('clientsecret')));\n }",
"protected function isConfigured() {\n return !empty($this->host) && $this->port >= 0 && $this->port <= 65535;\n }",
"public function shouldBeSearchable()\n {\n return $this->product && $this->shop;\n }",
"function searchd_running()\n\t{\n\t\tglobal $config;\n\n\t\t// if we cannot manipulate the service assume it is running\n\t\tif (!$config['fulltext_sphinx_autorun'])\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif (file_exists($config['fulltext_sphinx_data_path'] . 'searchd.pid'))\n\t\t{\n\t\t\t$pid = trim(file_get_contents($config['fulltext_sphinx_data_path'] . 'searchd.pid'));\n\n\t\t\tif ($pid)\n\t\t\t{\n\t\t\t\t$output = array();\n\t\t\t\t$pidof_command = 'pidof';\n\n\t\t\t\texec('whereis -b pidof', $output);\n\t\t\t\tif (sizeof($output) > 1)\n\t\t\t\t{\n\t\t\t\t\t$output = explode(' ', trim($output[0]));\n\t\t\t\t\t$pidof_command = $output[1]; // 0 is pidof:\n\t\t\t\t}\n\n\t\t\t\t$output = array();\n\t\t\t\texec($pidof_command . ' ' . SEARCHD_NAME, $output);\n\t\t\t\tif (sizeof($output) && (trim($output[0]) == $pid || trim($output[1]) == $pid))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// make sure it's really not running\n\t\t$this->shutdown_searchd();\n\n\t\treturn false;\n\t}"
] | [
"0.73240125",
"0.6672016",
"0.6552333",
"0.6354838",
"0.6349182",
"0.6277575",
"0.6241562",
"0.61551476",
"0.6110615",
"0.6108114",
"0.60827816",
"0.6081159",
"0.60798717",
"0.60648876",
"0.60388213",
"0.6028474",
"0.6019342",
"0.6007658",
"0.59968257",
"0.59968257",
"0.59968257",
"0.59968257",
"0.59968257",
"0.5962366",
"0.5961126",
"0.5958109",
"0.59524894",
"0.5952147",
"0.59487355",
"0.59404355"
] | 0.8065758 | 0 |
returns a single term how to search. here we can apply custom logic to the user input string | private function getSingleTerm($term)
{
// booleans
if ($term == 'true') {
return 'T';
} elseif ($term == 'false') {
return 'F';
}
// we don't modify numbers
if (ctype_digit($term)) {
return '"'.$term.'"';
}
// formatted number?
$formatted = str_replace(
[
'-',
'.'
],
'',
$term
);
if (ctype_digit($formatted)) {
return '"'.$term.'"';
}
// everything that is only numbers *and* characters and at least 3 long, we don't fuzzy/wildcard
// thanks to https://stackoverflow.com/a/7684859/3762521
$pattern = '/^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/';
if (strlen($term) > 3 && preg_match($pattern, $term, $matches) === 1) {
return '"'.$term.'"';
}
// is it a solr field query (like id:333)?
if (preg_match($this->fieldQueryPattern, $term) === 1) {
return $this->parseSolrFieldQuery($term);
}
// strings shorter then 5 chars (like hans) we wildcard, all others we make fuzzy
if (strlen($term) >= $this->solrFuzzyBridge) {
return $this->doAndNotPrefixSingleTerm($term, '~');
}
if (strlen($term) >= $this->solrWildcardBridge) {
return $this->doAndNotPrefixSingleTerm($term, '*');
}
return $term;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getRealTerm($term) {\r\n\t\treturn array_search(strtolower($term), $this->lowercaseTerms);\r\n\t}",
"private function addConditionForText() {\n if (substr(trim($this->input['text']), 0, 1) == '#') {\n \t // looking for an article uid?\n \t\t$uid = intval(substr(trim($this->input['text']), 1));\n \t\tif (trim($this->input['text']) == '#' . $uid) {\n \t\t\t// text contains a query like #[int], so search for this uid ONLY\n \t\t\t$this->table_references = array('tx_newspaper_article');\n \t\t\t$this->where = array('uid=' . $uid);\n return self::TEXT_SEARCH_FOR_UID;\n \t\t}\n \t}\n\n // Search for all terms divided by a space character\n // So \"demo example\" finds all articles with both the \"demo\" AND \"example\" somewhere in the article\n $wherePart = array();\n foreach(t3lib_div::trimExplode(' ', $this->input['text']) as $term) {\n $wherePart[] = '(' .\n 'title LIKE \"%' . addslashes($term) . '%\" OR ' .\n 'kicker LIKE \"%' . addslashes($term) . '%\" OR ' .\n 'teaser LIKE \"%' . addslashes($term) . '%\" OR ' .\n 'bodytext LIKE \"%' . addslashes($term) . '%\"' .\n ')';\n }\n\n $this->addWhere(implode(' AND ', $wherePart));\n return self::TEXT_SEARCH_FOR_TEXT;\n }",
"function get_phrase($term, $case=0) {\n return phrase($term, $case);\n}",
"protected abstract function get_search_string($search);",
"public function getSearchTerm() {\n\n\t\treturn $this->searchTerm;\n\t}",
"public function search() {\n \treturn $this->index(Input::get());\n }",
"public function getQueryPhraseTerm($phrase);",
"public function search( $str = null ) {\n\t\t// TODO: SELECT based on search string\n\t}",
"function _govcms_ui_kit_get_search_keyword() {\n $params = drupal_get_query_parameters();\n return !empty($params['search']) ? check_plain($params['search']) : '';\n}",
"function getSearchTerms();",
"function bbp_get_search_terms($passed_terms = '')\n{\n}",
"public function lookupTerm($value, $vid) {\n $search = $this->search[$vid];\n //$value = (string) $value;\n\n $checkValue = trim(strtolower($value), \". / ; , : = \\\\ \");\n \n foreach($search as $key => $arr){\n if($key == 'terms'){\n continue;\n }\n if($checkValue == $key){\n return $key;\n } \n \n if(in_array($checkValue, $search[$key]['matches'])){\n return $key;\n }\n if(isset($search[$key]['contains_all'])){\n foreach($search[$key]['contains_all'] as $contains){\n $set = TRUE;\n if(isset($contains['not'])){\n $set = FALSE;\n if((empty($contains['contains']) || strpos($checkValue, $contains['contains']) !== FALSE)){\n $set = TRUE;\n foreach($contains['not'] as $not){\n if(strpos($checkValue, $not) !== FALSE){\n $set = FALSE;\n break;\n }\n }\n }\n } else {\n foreach($contains as $c){\n if(strpos($checkValue, $c) === FALSE){\n $set = FALSE;\n break;\n }\n }\n }\n if($set === TRUE){\n return $key;\n }\n }\n }\n if(isset($search[$key]['starts'])){\n foreach($search[$key]['starts'] as $starting){\n if(substr($checkValue, 0, strlen($starting)) === $starting){\n return $key;\n }\n }\n }\n if(isset($search[$key]['ends'])){\n foreach($search[$key]['ends'] as $ending){\n if(strpos(strrev($checkValue), strrev($ending)) === 0){\n return $key;\n }\n } \n } \n foreach($search[$key]['contains'] as $partial){\n if(strpos($checkValue, $partial) !== FALSE){\n return $key;\n }\n }\n }\n return $checkValue;\n }",
"function getSearchString(){\n\t\t\treturn $this->searchString;\n\t\t}",
"public function search_box( $text, $input_id );",
"abstract public function searchByTerm($term, $page=1);",
"function bbc_get_search($array) {\n $result = false;\n $query = array(\n \"^as_(ep|o|e)?q=\",\n \"^q(_(a(ll|ny)|phrase|not)|s|t|u(ery)?)?=\",\n \"^s(u|2f|p\\-q|earch(_?for)?|tring|zukaj)?=\",\n \"^k(w|e(reses|y(word)?s?))=\",\n \"^b(egriff|uscar?)=\",\n \"^w(d|ords?)?=\",\n \"^te(rms?|xt)=\",\n \"^mi?t=\",\n \"^heureka=\",\n \"^p=\",\n \"^r(eq)?=\",\n \"/search/web/\",\n \"^userQuery=\",\n \"^v[aeop]=\"\n );\n\n foreach ($array as $string) {\n $string = rawurldecode($string);\n\n // skip empty GET variables\n if (substr($string, -1) == \"=\") continue;\n\n foreach ($query as $key) {\n preg_match(\"%$key%\", $string, $matches);\n if (empty($matches)) continue;\n\n $par = $matches[0];\n $pos = strpos($string, $par);\n $term = substr($string, ($pos + strlen($par)));\n\n if ((defined(\"_BBC_MBSTRING\") ? mb_strlen($term) : strlen($term)) < 2) {\n $matches = array();\n continue;\n }\n if (($par[0] == \"q\") || ($par[0] == \"s\")) return $term;\n }\n $result = isset($par) ? $term : $result;\n }\n return $result;\n}",
"public function applySearch();",
"public function testSearchStrExpl()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$obj = new CAntObject($dbh, \"activity\", null, $this->user);\r\n\t\t$index = $obj->getIndex();\r\n\r\n\t\t// Single email address\r\n\t\t$qstr = \"[email protected]\";\r\n\t\t$terms = $index->queryStringToTerms($qstr);\r\n\t\t$this->assertEquals($terms[0], \"[email protected]\");\r\n\r\n\t\t// terms and phrases\r\n\t\t$qstr = \"[email protected] \\\"in quotes\\\" single\";\r\n\t\t$terms = $index->queryStringToTerms($qstr);\r\n\t\t$this->assertEquals($terms[0], \"[email protected]\");\r\n\t\t$this->assertEquals($terms[1], \"\\\"in quotes\\\"\");\r\n\t\t$this->assertEquals($terms[2], \"single\");\r\n\t}",
"public function search();",
"public function getSearchTerm()\n {\n return isset($this->search_term) ? $this->search_term : null;\n }",
"public function action_search()\n\t{\n\t\tglobal $context, $txt;\n\n\t\t// If they provided some search parameters, we need to extract them\n\t\tif (isset($this->_req->post->params))\n\t\t{\n\t\t\t$context['search_params'] = $this->_searchParamsFromString();\n\t\t}\n\n\t\t// Set up the search criteria, type, what, age, etc\n\t\tif (isset($this->_req->post->search))\n\t\t{\n\t\t\t$context['search_params']['search'] = un_htmlspecialchars($this->_req->post->search);\n\t\t\t$context['search_params']['search'] = htmlspecialchars($context['search_params']['search'], ENT_COMPAT);\n\t\t}\n\n\t\tif (isset($context['search_params']['userspec']))\n\t\t{\n\t\t\t$context['search_params']['userspec'] = htmlspecialchars($context['search_params']['userspec'], ENT_COMPAT);\n\t\t}\n\n\t\t// 1 => 'allwords' / 2 => 'anywords'.\n\t\tif (!empty($context['search_params']['searchtype']))\n\t\t{\n\t\t\t$context['search_params']['searchtype'] = 2;\n\t\t}\n\n\t\t// Minimum and Maximum age of the message\n\t\tif (!empty($context['search_params']['minage']))\n\t\t{\n\t\t\t$context['search_params']['minage'] = (int) $context['search_params']['minage'];\n\t\t}\n\t\tif (!empty($context['search_params']['maxage']))\n\t\t{\n\t\t\t$context['search_params']['maxage'] = (int) $context['search_params']['maxage'];\n\t\t}\n\n\t\t$context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']);\n\t\t$context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']);\n\n\t\t// Create the array of labels to be searched.\n\t\t$context['search_labels'] = array();\n\t\t$searchedLabels = isset($context['search_params']['labels']) && $context['search_params']['labels'] != '' ? explode(',', $context['search_params']['labels']) : array();\n\t\tforeach ($context['labels'] as $label)\n\t\t{\n\t\t\t$context['search_labels'][] = array(\n\t\t\t\t'id' => $label['id'],\n\t\t\t\t'name' => $label['name'],\n\t\t\t\t'checked' => empty($searchedLabels) || in_array($label['id'], $searchedLabels),\n\t\t\t);\n\t\t}\n\n\t\t// Are all the labels checked?\n\t\t$context['check_all'] = empty($searchedLabels) || count($context['search_labels']) === count($searchedLabels);\n\n\t\t// Load the error text strings if there were errors in the search.\n\t\tif (!empty($context['search_errors']))\n\t\t{\n\t\t\tTxt::load('Errors');\n\t\t\t$context['search_errors']['messages'] = array();\n\t\t\tforeach ($context['search_errors'] as $search_error => $dummy)\n\t\t\t{\n\t\t\t\tif ($search_error === 'messages')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$context['search_errors']['messages'][] = $txt['error_' . $search_error];\n\t\t\t}\n\t\t}\n\n\t\t$context['page_title'] = $txt['pm_search_title'];\n\t\t$context['sub_template'] = 'search';\n\t\t$context['linktree'][] = array(\n\t\t\t'url' => getUrl('action', ['action' => 'pm', 'sa' => 'search']),\n\t\t\t'name' => $txt['pm_search_bar_title'],\n\t\t);\n\t}",
"public function search($kw);",
"public function search($string) \n\t{\n\n\t\t\t\t$output = '';\n\t\t\t\t$Model = new Model($this->config);\n\t\t\t\t$string = clean($string, 'txt');\n\t\t\t\t$data = $Model->search($string);\n\n\t\t\t\tif($data) \n\t\t\t\t{\n\t\t\t\t\t\t\t$output .= \"<div class='heading'>Search results for <strong>\" . $string . \"</strong></div>\";\n\t\n\t\t\t\t\t\t\tforeach($data as $article) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$output .= '<div class=\"small\"><a class=\"small\" href=\"index.php?view=article&urlid=' . $article['urlid'] . '\" >' . mb_convert_encoding($article['title'], 'UTF-8', 'WINDOWS-1252') . '</a></div>';\n\t\t\t\t\t\t\t}\n\t\t} else {\n\t\t\t\t\t\t\t$output .= 'No results found. Try again.';\n\t\t}\n\t\treturn $output;\n\t}",
"function process_search_term($search_term) {\n $terms = explode(\",\", $search_term);\n $result_string = '';\n foreach($terms as $term) {\n $result_string .= '\\\"' . \n mysql_real_escape_string($term) . '\\\" ';\n }\n return trim($result_string);\n}",
"function bbp_get_search_slug($default = 'search')\n{\n}",
"public static function search() {\n\n $string = Input::get('string');\n\n\n $results = Musician::Where('first_name', 'like', \"$string%\")\n ->orWhere('last_name', 'like', \"$string%\")\n ->orWhere('stagename', 'like', \"$string%\")->get();\n\n return ($results->toArray());\n }",
"static public function getSearch($string)\n\t{\n\t\t$mapowanie = self::getMapowanie();\n\n\t\tif( $mapowanie[$string] != '' )\n\t\t\treturn $mapowanie[$string];\n\t\telse\n\t\t\treturn $string;\n\n\t\treturn $string;\n\t}",
"public function advanced_custom_search($where, $wp_query)\n\t{\n\t\tif (empty($where)) {\n\t\t\treturn $where;\n\t\t}\n\n\t\t// Get search expression\n\t\tif (is_admin()) {\n\t\t\t$terms = $wp_query->query_vars['s'];\n\t\t} else {\n\t\t\t$terms = $keyword = filter_input(INPUT_GET, 'search', FILTER_SANITIZE_STRING);\n\t\t}\n\n\t\t// Explode search expression to get search terms\n\t\t$exploded = explode(' ', $terms);\n\t\tif ($exploded === FALSE || count($exploded) == 0)\n\t\t\t$exploded = array(0 => $terms);\n\n\t\t// Reset search in order to rebuilt it as we which\n\t\t$where = '';\n\n\t\t// Get searcheable_acf, a list of advanced custom fields to search content in\n\t\t$list_searcheable_acf = $this->list_searcheable_acf();\n\n\t\tforeach ($exploded as $tag) {\n\t\t\t$where .= \"\n AND (\n (post_title LIKE '%$tag%')\n OR (post_content LIKE '%$tag%')\";\n\n\t\t\tif (!empty($list_searcheable_acf)) {\n\t\t\t\t$where .= \" OR EXISTS (\n SELECT * FROM postmeta\n\t WHERE post_id = posts.ID\n\t AND (\";\n\n\t\t\t\tforeach ($list_searcheable_acf as $searcheable_acf) {\n\n\t\t\t\t\tif ($searcheable_acf == $list_searcheable_acf[0]) {\n\t\t\t\t\t\t$where .= \" (meta_key LIKE '%\" . $searcheable_acf . \"%' AND meta_value LIKE '%$tag%') \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$where .= \" OR (meta_key LIKE '%\" . $searcheable_acf . \"%' AND meta_value LIKE '%$tag%') \";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t$where .= \")\n )\";\n\t\t\t}\n\n\t\t\t$where .= \" )\";\n\t\t}\n\n\t\treturn $where;\n\t}",
"public function getTerm(): ?string\n {\n return $this->term;\n }",
"public static function search();"
] | [
"0.6414422",
"0.6292822",
"0.6239888",
"0.62164664",
"0.6214864",
"0.6193411",
"0.6166681",
"0.61573803",
"0.6148673",
"0.6097375",
"0.609065",
"0.6082308",
"0.6030609",
"0.6030099",
"0.6001833",
"0.6000445",
"0.59672284",
"0.5933787",
"0.59177345",
"0.589816",
"0.58979756",
"0.589475",
"0.58381027",
"0.5832956",
"0.5827034",
"0.5825697",
"0.5810585",
"0.57866746",
"0.5775816",
"0.57746834"
] | 0.63452834 | 1 |
Get all the artists | public function artists()
{
return $this->artists;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllArtists()\n {\n return Artist::getArtistsList();\n }",
"public function artists() {\n \t \t\n \t \t$args = explode(\"/\",\\Drupal::service('path.current')->getPath());\n \t \t$id_artista = array_pop($args);\n \t\t// Get Albunes Artista.\n \t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => \"https://api.spotify.com/v1/artists/\".$id_artista.\"/albums\",\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 30,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"authorization: Bearer \" . $this->getToken(),\n\t\t \"cache-control: no-cache\"\n\t\t ),\n\t\t));\n\n\t\t$data['storage'] = json_decode(curl_exec($curl));\n\t\t$artistas = $data['storage']->items;\n\n \t\t$curl_uid = curl_init();\n\t\tcurl_setopt_array($curl_uid, array(\n\t\t CURLOPT_URL => 'https://api.spotify.com/v1/artists/'.$id_artista,\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 30,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"authorization: Bearer \" . $this->getToken(),\n\t\t \"cache-control: no-cache\"\n\t\t ),\n\t\t));\n\n\t\t$data['profile'] = json_decode(curl_exec($curl_uid));\n\t\t$profile = $data['profile'];\n\n\t\treturn [\n \t'#theme' => 'artista_listing_display',\n \t'#artistas' => $artistas,\n \t'#profile' => $profile,\n ];\n }",
"public function getArtists()\n {\n $artists = Artist::with(['items', 'items.photos'])->orderBy('endorsed', 'DESC')->get();\n return response()->json($artists);\n }",
"public function getArtists() {\n $this->debug(\"mpd->getArtists()\");\n if ( is_null($resp = $this->sendCommand(self::CMD_TABLE, self::TBL_ARTIST))) return null;\n $arArray = array();\n\n $arLine = strtok($resp,\"\\n\");\n $arName = \"\";\n $arCounter = -1;\n while ( $arLine ) {\n list ( $element, $value ) = explode(\": \", $arLine);\n if ( $element == \"Artist\" ) {\n $arCounter++;\n $arName = $value;\n $arArray[$arCounter] = $arName;\n }\n\n $arLine = strtok(\"\\n\");\n }\n $this->debug(\"mpd->getArtists()\");\n return $arArray;\n }",
"public function fetchAllArtistsinfo()\n {\n $connection = $this->connection;\n $schema = $connection->schema();\n if (!$schema->tableExists('spotify_artist_info')) {\n return;\n }\n $query = $connection->select('spotify_artist_info', 'nid')\n ->fields('nid')\n ->execute()\n ->fetchAll();\n return $query;\n }",
"public function index()\n\t{\n\n\t\treturn Artist::all();\n\t}",
"function GetArtists() {\r\n addLog(\"mpd->GetArtists()\");\r\n if ( is_null($resp = $this->SendCommand(MPD_CMD_TABLE, MPD_TBL_ARTIST))) return NULL;\r\n $arArray = array();\r\n $arLine = strtok($resp,\"\\n\");\r\n $arName = \"\";\r\n $arCounter = -1;\r\n while ( $arLine ) {\r\n list ( $element, $value ) = explode(\": \",$arLine);\r\n if ( $element == \"Artist\" ) {\r\n $arCounter++;\r\n $arName = $value;\r\n $arArray[$arCounter] = $arName;\r\n }\r\n $arLine = strtok(\"\\n\");\r\n }\r\n addLog(\"mpd->GetArtists()\");\r\n return $arArray;\r\n }",
"public function index()\n {\n return Artist::all();\n }",
"public function artists()\n {\n return $this->hasMany('App\\Artist');\n }",
"public function artists()\n {\n return $this->belongsToMany('App\\Artist');\n }",
"protected function getArtistsNames() {\n\t\t$artists = array();\n\t\t$artistsQuery = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,name', 'tx_vcamillerntor_domain_model_kuenstler LEFT JOIN tx_vcamillerntor_ausstellung_kuenstler_mm as mm ON tx_vcamillerntor_domain_model_kuenstler.uid=mm.uid_foreign', 'tx_vcamillerntor_domain_model_kuenstler.deleted=0 AND tx_vcamillerntor_domain_model_kuenstler.sys_language_uid=0 AND mm.uid_local='.$this->configurationArray['ausstellungUid']);\n\t\t$artistsQuerySQL = $GLOBALS['TYPO3_DB']->SELECTquery('uid,name', 'tx_vcamillerntor_domain_model_kuenstler LEFT JOIN tx_vcamillerntor_ausstellung_kuenstler_mm as mm ON tx_vcamillerntor_domain_model_kuenstler.uid=mm.uid_foreign', 'tx_vcamillerntor_domain_model_kuenstler.deleted=0 AND tx_vcamillerntor_domain_model_kuenstler.sys_language_uid=0 AND mm.uid_local='.$this->configurationArray['ausstellungUid']);\n\t\t$this->messageArray[] = array(FlashMessage::OK, 'SQL: ', $artistsQuerySQL);\n\t\twhile ($artistRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($artistsQuery)) {\n\t\t\t$artists[$artistRow['uid']] = array('uid'=>$artistRow['uid'],'name'=>$artistRow['name'],'noblank'=>str_replace(array(' ','&','.','-'),array('','','',''),strtolower($artistRow['name'])));\n\t\t\t/*\t\t\t\n\t\t\t$message = 'Artist';\n\t\t\t$status = FlashMessage::INFO;\n\t\t\t$this->messageArray[] = array($status, $artistRow['name'], $message);\n\t\t\t*/\n\t\t}\t\n\t\treturn $artists;\n\t}",
"public function artists()\n {\n $responseArr = [\n 'artists' => \\App\\Artist::get(),\n 'artist_active' => 'menu-active',\n 'title' => 'Artists',\n ];\n return view('feature.artists')->with($responseArr);\n }",
"public function artistIndex()\n {\n return AlbumResource::collection(\\Auth::user()->artist->albums()->orderBy('created_at', 'desc')->get());\n }",
"function listadoArtistas() {\n global $db; # manejo la bases de datos dentro de la funcion\n # creo la consulta SQL\n $sql = \"SELECT artista.id_artista, artista.ar_nombre, artista.ar_apellido, artista.ar_dni, artista.ar_mail\n FROM artista\n ORDER BY artista.ar_apellido, artista.ar_nombre\";\n\n # la envio a la bases de datos, SELECT\n $resultado = $db->select($sql);\n\n # retorno la lista como resultado\n return $resultado;\n }",
"public function getArtistas()\n {\n return $this->hasMany(Artistas::className(), ['id' => 'artista_id'])->viaTable('artistas_temas', ['tema_id' => 'id']);\n }",
"public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }",
"public function getArtists($limit): array {\n return [];\n }",
"public function artists()\n {\n $response=array();\n $common_where=array( 'activation_status'=>1, );\n $artist_profilepic_folder= base_url().UPLOADS.'artist/profilepic/';\n $cols=\"id as id,name as name,email as email,mobile as mobile,city as city,address as address,CONCAT('\".$artist_profilepic_folder.\"',profile_picture) as profilepic\";\n $sql=$this->db->select($cols,false)->from('artist_tbl')->where($common_where)->order_by('name','asc')->get();\n $count=$sql->num_rows();\n $response[CODE]=($count > 0)?SUCCESS_CODE:FAIL_CODE;\n $response[MESSAGE]=($count > 0)?'Success':'Fail';\n $response[DESCRIPTION]=($count > 0)?$count.' results found':'No results found';\n $response['artist_list']=($count > 0)?$sql->result():array();\n return json_encode($response);\n }",
"function getLists(){\n\n\t\t$artist = new Artist;\n\n\t\t$page = Input::get('page');\n\n\t\t$limit = Config::get('cms_config.limit');\n\t\t$total = $artist->getArtistTotal();\n\n\t\t$num_pages = ceil( $total / $limit);\n\t\t\n\t\tif ($page > $num_pages && $total != 0) $page = $num_pages; \n\t\t\n\t\t$offset = $limit * $page - $limit;\n\n\t\t$artist = $artist->artistLists($offset);\n\n\t\t$select = array(\n\t\t\t\t\t'id',\n\t\t\t\t\t'name',\n\t\t\t\t\t'id'\n\t\t\t\t);\n\n\n\t\t$rows = ListsFormatter::_run( $artist, 'id', $select );\n\n\t\t$format = array(\n\t\t\t\t\t'page' => $page,\n\t\t\t\t\t'total' => $num_pages,\n\t\t\t\t\t'records' => $total,\n\t\t\t\t\t'rows' => $rows\n\t\t\t\t);\n\n\t\treturn Response::json($format);\n\n\t}",
"private function getAuthors(){\n\n $client = new Client();\n $url = 'https://smallgallery.net/';\n\n $cats = [\n //'grafika',\n //'tapyba',\n 'klasika',\n ];\n\n // Loop each cat, because each cat has its own authors\n foreach($cats as $cat){\n $crawler = $client->request('GET', $url.$cat);\n\n // Loop each author\n $author = $crawler->filter('.envira-gallery-item')->each(function($node){\n\n $name = $node->filter('.envira-album-title')->text();\n\n // Make surname from full name\n $split = explode(' ', $name);\n $surname = last($split);\n // Remove last name from array (which should have a - sign if double surname)\n array_pop($split);\n\n // Put name back together (double names should be separated by spaces)\n $name = implode(' ', $split);\n\n // Return it's info\n return [\n 'name' => $name,\n 'surname' => $surname,\n 'link' => $node->filter('a')->attr('href')\n ];\n\n });\n\n $authors[$cat] = $author;\n\n }\n\n return $authors;\n\n }",
"public function artistasAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $artistas = $em->getRepository('CategoriasGaleriaBundle:Categorias')\r\n ->getCategoriasPorTipoYActivas(Categorias::$GALERIA_ARTISTAS,false);\r\n \r\n return array(\r\n 'artistas' => $artistas,\r\n );\r\n }",
"public function allArtOrderedByName(){\n //findAllOrderedByName is a method of the repository class ArtRepository\n $em = $this->getDoctrine()->getEntityManager();\n $artWorks = $em->getRepository('ISpySiWelcomeBundle:Art')\n ->findAllOrderedByName();\n }",
"function getArtistnames() {\r\n\t\t$response = $this->sendCommand('list artist');\r\n\t\tif ($this->error) return NULL;\r\n\r\n\t\t$artists = explode('Artist: ', $response);\r\n\t\t\r\n\t\tfor ($i = 0; $i < count($artists); $i++) {\r\n\t\t\t$tempStr = $artists[$i];\r\n\t\t\t$tempStr = substr($tempStr, 0, -1);\r\n\r\n\t\t\t$artists[$i] = $tempStr;\r\n\t\t}\r\n\r\n\t\treturn $artists;\r\n\t}",
"public function getAuthors();",
"public function getAuthors();",
"public function getArtist($id): array {\n return [];\n }",
"public function index()\n {\n //\n $artists = artist::all();\n return view('artist.list', compact('artists','artists'));\n }",
"function getArtistsAlbums()\n {\n $db = DatabaseProvider::getInstance();\n $sql = \"select folder, artist, album from music_combine group by folder, artist, album order by folder, artist, album\";\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_NUM);\n $nodes = array();\n foreach($result as $row)\n {\n list($folder, $artist, $album) = $row;\n if(!isset($nodes[$folder]))\n {\n $nodes[$folder] = array();\n $nodes[$folder]['artists'] = array();\n $nodes[$folder]['albums'] = array();\n }\n $nodes[$folder]['artists'][] = $artist;\n $nodes[$folder]['albums'][] = $album;\n }\n $clean = array('folders' => array());\n foreach($nodes as $folder => $children)\n {\n $f = array(\n 'name' => $folder,\n 'artists' => array_values(array_unique($children['artists'])),\n 'albums' => array_values(array_unique($children['albums']))\n );\n $clean['folders'][] = $f;\n }\n return $clean;\n }",
"private function searchArtists($args)\n\t{\n\t\t$response = [\n\t\t\t\"index\" => intval($args->index ?? 0),\n\t\t\t\"count\" => 0,\n\t\t\t\"total\" => 0,\n\t\t\t\"mediaCollection\" => [],\n\t\t];\n\t\t\n\t\t$options = [\n\t\t\t\"query\" => $args->term ?? null,\n\t\t\t\"artistCount\" => $args->count,\n\t\t\t\"artistOffset\" => $args->index * $args->count,\n\t\t\t\"albumCount\" => 0,\n\t\t\t\"albumOffset\" => 0,\n\t\t\t\"songCount\" => 0,\n\t\t\t\"songOffset\" => 0,\n\t\t];\n\t\t\n\t\t$searchResults = $this->subsonic->search3($options);\n\t\t\n\t\tforeach($searchResults[\"artist\"] as $result)\n\t\t\t$response[\"mediaCollection\"][] = $this->getArtistMetadata($result[\"id\"]);\n\t\t\n\t\t$response[\"count\"] = count($response[\"mediaCollection\"]);\n\t\t$response[\"total\"] = ($response[\"count\"] == $args->count) ? $response[\"count\"] + 1 : $response[\"count\"];\n\t\t\n\t\treturn $response;\n\t}",
"public function index()\n {\n $artists = Artist::all();\n return view('artists.index', compact('artists'));\n }"
] | [
"0.86114746",
"0.7860636",
"0.78514373",
"0.75243354",
"0.74970526",
"0.7476759",
"0.7456045",
"0.73795485",
"0.73025155",
"0.714681",
"0.6995242",
"0.6950711",
"0.69364756",
"0.6935746",
"0.68929845",
"0.6746211",
"0.6732424",
"0.6727",
"0.66418236",
"0.6626474",
"0.6624335",
"0.655946",
"0.64654046",
"0.64244074",
"0.64244074",
"0.64159495",
"0.64016384",
"0.6384692",
"0.6342807",
"0.6321911"
] | 0.79074866 | 1 |
Show notice on Local. and Staging | function grg_env_notice() {
if (WP_ENV != 'production') {
echo '<p class="' . WP_ENV . ' env-notice">' . WP_ENV . '</p>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pjsp_admin_notice() { \n\t\n\tglobal $pagenow, $typenow, $current_user;\n\tif (($pagenow == 'post.php') && ($typenow == 'client_projects')) { \n\t\t\n\t\t$user_id = $current_user->ID;\n\t\tif(!get_user_meta($user_id,'pjsp_ignore_notice')) { \n\t\t\n\t?>\n\n\t<div class=\"updated\">\n\t \n\t <p>I work on this plugin for free. If you find it useful <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KEN9R2VBUSWVL\" target=\"_new\">please consider buying me a beer</a>. <strong>It will motivate me to update it more often</strong>. | <a href=\"?pjsp_nag_ignore=0\">Hide Notice</a></p>\n\n\t</div>\n\t\t<?php } \n\t\t} \n\t}",
"function bbp_admin_notices()\n{\n}",
"public function author_admin_notice()\n {\n global $pagenow;\n $url = esc_url(admin_url('/admin.php?page=mtii-utilities'));\n $mtii_is_live = get_option('mtii_is_live');\n $is_live = isset($mtii_is_live) ? $mtii_is_live : 'off';\n if (is_plugin_active(MTII_UTILITIES_PLUGIN_NAME.'/'.MTII_UTILITIES_PLUGIN_NAME.'.php')) {\n if ($pagenow == 'admin.php' || $pagenow == 'plugins.php') {\n if ($pagenow == 'admin.php') {\n $link_or_text = 'this Page';\n } else {\n $link_or_text = 'the <a href=\"'.$url.'\">Settings Page</a>';\n }\n if ($is_live==\"on\") {\n echo '<div class=\"notice notice-success is-dismissible\">\n <h1 style=\"font-weight: 700; line-height: 1.2;\">\n MTII Nasarawa Notification: You are presently in <span style=\"color: #04e604;\">LIVE MODE</span>\n </h1>\n </div>';\n } else {\n echo '<div class=\"notice notice-info is-dismissible\">\n <h1 style=\"font-weight: 700; line-height: 1.2;\">\n MTII Nasarawa Notification: You are presently in <span style=\"color: red;\">TEST MODE</span>\n </h1>\n <p style=\"font-size: 1.3em;\"><strong>Please Ensure you switch to Live Mode on\n '.$link_or_text.' once you are sure you want to go live!</strong>\n <p>\n </div>';\n }\n }\n }\n\n }",
"function buddyboss_print_sitewide_notices() {\n\n\t// Do not show notices if user is not logged in.\n\tif ( ! is_user_logged_in() )\n\t\treturn;\n\n\t// Add a class to determine if the admin bar is on or not.\n\t$class = did_action( 'admin_bar_menu' ) ? 'admin-bar-on' : 'admin-bar-off';\n\n\techo '<div id=\"sitewide-notice\" class=\"' . $class . '\">';\n\tbp_message_get_notices();\n\techo '</div>';\n}",
"function admin_notices() {\n\n\t\t$mpi_plugin_check = get_option( 'mpi_sync_timestamp' );\n\t\tif ( empty( $mpi_plugin_check ) ) {\n\t\t\t?>\n\t\t\t<div class=\"updated\">\n\t\t\t\t<p>In order to complete your More Plugin Info setup,\n\t\t\t\t\t<a href=\"plugins.php?mpi_sync\">please run the initial plugin sync</a>.<br />\n\t\t\t\t\tThis may take a couple of minutes.</p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}",
"function show_message() {\n\t\t\tglobal $wp;\n\n\t\t\tload_template( CATCHUPDATER_PATH . 'template/template-maintainance-message.php' );\n\n\t\t}",
"public function admin_notices() {\n\t\t\tsettings_errors();\n\t\t}",
"public function show_vc_missing_notice() {\n\t\t\t$plugin_data = get_plugin_data( __FILE__ );\n\t\t\techo '<div class=\"notice notice-warning\">\n\t\t\t\t<p>' . sprintf(\n\t\t\t\twp_kses_post( __( '<strong>%1$s</strong> requires <strong><a href=\"%2$s\" target=\"_blank\">%3$s</a></strong> and <strong><a href=\"%4$s\" target=\"_blank\">%5$s</a></strong> plugins to be installed and activated.', 'wolf-vc-content-block' ) ),\n\t\t\t\t$plugin_data['Name'],\n\t\t\t\t'https://wlfthm.es/wpbpb',\n\t\t\t\t'WPBakery Page Builder',\n\t\t\t\t'https://wolfthemes.ticksy.com/article/14866',\n\t\t\t\t'Wolf WPBakery Page Builder Extension'\n\t\t\t) . '</p>\n\t\t\t</div>';\n\t\t}",
"protected function developmentCheck()\n {\n if (!Version::isStable()) {\n $notice = json_encode([\n 'severity' => 1,\n 'notice' => 'This is a <strong>development version of Bolt</strong>, so it might contain bugs and unfinished features. Use at your own risk!',\n 'info' => \"For 'production' websites, we advise you to stick with the official stable releases.\",\n ]);\n $this->app['logger.flash']->configuration($notice);\n }\n }",
"public function output_notices()\n {\n }",
"protected function printWarning()\n {\n echo PHP_EOL . 'Warning: The CLI environment may be different from web environment' . PHP_EOL;\n }",
"function info() {\n\t\tif ( $this->Request->ServerIsLocal()) {\n\t\t\t$this->render([\n\t\t\t\t'title' => 'hello world',\n\t\t\t\t'primary' => 'info',\n\t\t\t\t'secondary' =>'blank'\n\t\t\t]);\n\n\t\t}\n\n\t}",
"function admin_notices() {\n\t\tif ( class_exists( 'Mai_Theme_Engine' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$notice = sprintf( '<strong>' . __( 'Please %s to complete the Mai Theme Engine installation.', 'mai-pro-engine' ) . '</strong>', '<a href=\"' . get_permalink() . '\">click here</a>' );\n\t\tprintf( '<div class=\"notice notice-error is-dismissible\"><p>%s</p></div>', $notice );\n\t\t// Remove \"Plugin activated\" notice.\n\t\tif ( isset( $_GET['activate'] ) ) {\n\t\t\tunset( $_GET['activate'] );\n\t\t}\n\t}",
"private function should_try_to_display_notice() {\n\t\t// Jetpack Scan is currently not supported on multisite.\n\t\tif ( is_multisite() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if VaultPress is active, the assumtion there is that VaultPress is working.\n\t\t// It has its own notice in the admin bar.\n\t\tif ( class_exists( 'VaultPress' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only show the notice to admins.\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function php_admin_notice() {\n\n\t\t// Output notice.\n\t\tprintf(\n\t\t\t'<div class=\"notice notice-error is-dismissible\"><p><strong>%s</strong></p></div>',\n\t\t\tesc_html( $this->get_min_php_message() )\n\t\t);\n\n\t\t// Make sure the plugin is deactivated.\n\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t}",
"public function admin_notice()\n {\n if (${plugin_name_singular.'_debug'}) { //debug is enabled. Check to make sure log file is writable\n $real_file = plugin_debug_log_path;\n if (!is_writeable($real_file)) {\n echo '<div class=\"updated\"><p>' . __(plugin_name. 'Debug log file is not writable. Please check to make sure that it has the correct file permission (ideally 644). Otherwise the plugin will not be able to write to the log file. The log file (log) can be found in the root directory of the plugin - ', plugin_name_singular) . '<code>' . plugin_path . '</code></p></div>';\n }\n }\n }",
"public function environment_notices() {\n\t\t$this->add_notice( 'requirements_php_56', array(\n\t\t\t'class' => 'notice-warning',\n\t\t\t'dismissible' => true,\n\t\t\t'message' => function() {\n\t\t\t\tob_start();\n\t\t\t\t?>\n\t\t\t\t<h3><?php printf( __( 'AffiliateWP has detected that your site is running on an insecure version of PHP (%s).', 'affiliate-wp' ), phpversion() ); ?></h3>\n\n\t\t\t\t<p><?php _e( '', 'affiliate-wp' ); ?></p>\n\n\t\t\t\t<h4><?php _e( 'What is PHP and how does it affect my site?' ); ?></h4>\n\t\t\t\t<p><?php _e( 'PHP is the programming language used to build and maintain WordPress and plugins like AffiliateWP. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance.', 'affiliate-wp' ); ?></p>\n\n\t\t\t\t<h4><?php _e( 'Why it matters for AffiliateWP', 'affiliate-wp' ); ?></h4>\n\t\t\t\t<p><?php _e( 'As we evolve over time, the ability to tap into more modern PHP features means we can continue to deliver a superior product to you.', 'affiliate-wp' ); ?></p>\n\t\t\t\t<p><?php _e( '<strong>Starting in February 2021, we’ll require PHP 5.6 or newer to use AffiliateWP.</strong>', 'affiliate-wp' ); ?></p>\n\n\t\t\t\t<p class=\"button-container\">\n\t\t\t\t\t<?php\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<a class=\"button button-primary\" href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s <span class=\"screen-reader-text\">%3$s</span><span aria-hidden=\"true\" class=\"dashicons dashicons-external\"></span></a>',\n\t\t\t\t\t\tesc_url( wp_get_update_php_url() ),\n\t\t\t\t\t\t__( 'Learn more about updating PHP' ),\n\t\t\t\t\t\t/* translators: Accessibility text. */\n\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t);\n\t\t\t\t\t?>\n\t\t\t\t</p>\n\t\t\t\t<?php\n\n\t\t\t\twp_update_php_annotation();\n\t\t\t\twp_direct_php_update_button();\n\n\t\t\t\treturn ob_get_clean();\n\t\t\t}\n\t\t) );\n\t}",
"public function admin_notices() {\n\t\tif ( current_user_can( 'manage_options' ) &&\n\t\t\t( '0' === get_option( 'blog_public' ) || 0 === get_option( 'blog_public' ) )\n\t\t\t) {\n\t\t\techo '<div class=\"error\"><p>Search engines are currently blocked.</p></div>';\n\t\t}\n\t}",
"function notice()\r\n {\r\n }",
"public function admin_notice() {\n\t\t$private_session = get_option(self::$option_name);\n\t\t$now = json_decode(get_option($private_session));\n\t\t?>\n\t\t<?php if( empty($now) ): ?>\n <div class=\"notice notice-error\">\n <p>\n\t\t\t\t\t<?php printf(__( 'To activating your %s please insert you license key', $this->text_domain ), $this->name); ?>\n <a href=\"<?php echo admin_url( 'admin.php?page='.$this->slug ); ?>\" class=\"button button-primary\"><?php _e('Register Now', $this->text_domain); ?></a>\n </p>\n </div>\n\t\t<?php elseif( $now->action != 1 ): ?>\n <div class=\"notice notice-error\">\n <p>\n\t\t\t\t\t<?php printf(__( 'There is something wrong with your %s license. please check it.', $this->text_domain ), $this->name); ?>\n <a href=\"<?php echo admin_url( 'admin.php?page='.$this->slug ); ?>\" class=\"button button-primary\"><?php _e('Check Now', $this->text_domain); ?></a>\n </p>\n </div>\n\t\t<?php endif; ?>\n\t\t<?php\n\t}",
"function show_admin_notice(){\r\n\r\n\t\t$class = 'notice notice-error is-dismissible';\r\n\t\t$buy_kallyas_url = 'https://themeforest.net/item/kallyas-responsive-multipurpose-wordpress-theme/4091658';\r\n\t\t$buy_link = sprintf( '<a class=\"button button button-primary\" href=\"%1$s\" target=\"_blank\">%2$s</a>', $buy_kallyas_url, __( 'Get Kallyas theme from here', 'znpb-posts-layouts' ) );\r\n\t\t$message = __( 'Kallyas theme is not installed! ZNPB Blog-Posts Layouts Element only works with Kallyas theme.', 'znpb-posts-layouts' );\r\n\r\n\t\tprintf( '<div class=\"%1$s\"><p>%2$s</p><p>%3$s</p></div>', $class, $message, $buy_link );\r\n\r\n\t}",
"private function logMessageAboutLowVersion()\n {\n if (ee('Filesystem')->isDir(PATH_THIRD . 'low_variables')) {\n if (!ee()->has('logger')) {\n ee()->load->library('logger');\n }\n ee()->logger->developer(lang('low_vars_in_third_party_folder_message'), true, 1209600);\n }\n }",
"public function plugin_admin_notice() {\n\n $whitelist_admin_pages = array( 'settings_page_admin-notices/plugin-options' );\n $admin_page = get_current_screen();\n\n if( in_array( $admin_page->base, $whitelist_admin_pages ) ) :\n ?>\n <div class=\"notice notice-info is-dismissible\"><p>Welcome to Wordpress Beirut Admin Notices plugin page!</p></div>\n <?php\n endif;\n }",
"function localhost_notify($title='', $show=''){\t\t\r\n\tif($_SERVER['SERVER_ADDR']=='127.0.0.1' && in_array($show, array('','name', 'blogname'))){\r\n\t\treturn \"local | \".$title;\r\n\t}\r\n\treturn $title;\r\n}",
"public function showFallbackWarning()\n\t{\n\t\tif (Input::get('act') != '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->import('Messages');\n\t\tMessage::addRaw($this->Messages->languageFallback());\n\t\tMessage::addRaw($this->Messages->topLevelRoot());\n\t}",
"final function print_wp_page_notice(): void {\r\n $mod = JKNAPI::module();\r\n $mod_name = $mod->name();\r\n $spage_url = $mod->settings_page()->url();\r\n \r\n $link = sprintf('<a href=\"%1$s\" title=\"%2$s\">%2$s</a>',\r\n $spage_url, sprintf('%s Scheduler', $mod_name));\r\n\r\n $msg = sprintf('This page is managed by %s. The page \"%s\"'\r\n . ' is set to generate and replace the content.'\r\n . ' Go to the %s to change this setting.',\r\n $mod_name, $this->name, $link);\r\n\r\n printf('<div class=\"notice notice-info\"><p>%s</p></div>', $msg);\r\n }",
"function lhv_admin_notice($type, $message)\n{\n // This filter allows hiding all admin notices\n if (!apply_filters('lhv/hire-purchase/show-admin-notices', true, $_REQUEST)) {\n return;\n }\n\n add_action('admin_notices', function () use ($type, $message) {\n include('templates/admin-notice.php');\n });\n}",
"public function setup_notices()\n {\n }",
"public function my_admin_notice()\n\t{\n\t\techo '<div class=\"updated\"><p>It is required to fill the API key, Secret key, Kayako URL ! There is an issue in establishing connection with kayako helpdesk, Please provide the full details !</p></div>';\n\t}",
"public function admin_notice() {\n\n\t\tif ( $this->hui_domains_url ) {\n\n\t\t\t$change_domain_link = sprintf(\n\t\t\t\t' <a href=\"%1$s\">%2$s<span class=\"dashicons dashicons-external\" style=\"width: 16px; height: 16px; margin: 1px 0 0 3px; font-size: 16px; text-decoration: none;\"></span></a>',\n\t\t\t\tesc_url( $this->hui_domains_url ),\n\t\t\t\tesc_html__( 'Change domain', 'mwp-system-plugin' )\n\t\t\t);\n\n\t\t}\n\n\t\tprintf(\n\t\t\t'<div class=\"notice notice-warning\">\n\t\t\t\t<p>%s</p>\n\t\t\t</div>',\n\t\t\twp_kses_post( sprintf(\n\t\t\t\t/* translators: 1. 'Note' wrapped in <strong> tags. 2. Link to external site where domain can be changed. */\n\t\t\t\t__( '%1$s Your site is still using a temporary domain: %2$s %3$s', 'mwp-system-plugin' ),\n\t\t\t\tsprintf( '<strong>%s</strong>', esc_html__( 'Note:', 'mwp-system-plugin' ) ),\n\t\t\t\tesc_url( Config::get( 'default_site_url' ) ),\n\t\t\t\t! empty( $change_domain_link ) ? $change_domain_link : ''\n\t\t\t) )\n\t\t);\n\n\t}"
] | [
"0.6556649",
"0.6356645",
"0.63460624",
"0.6343567",
"0.6268255",
"0.62597096",
"0.62246966",
"0.61934245",
"0.61723",
"0.6165963",
"0.6150971",
"0.61391103",
"0.6111475",
"0.6082716",
"0.6077123",
"0.6076852",
"0.60748976",
"0.60570616",
"0.6050374",
"0.60407573",
"0.6034017",
"0.6033402",
"0.6011147",
"0.60004514",
"0.59973836",
"0.59859365",
"0.5979753",
"0.5977438",
"0.5958611",
"0.5956653"
] | 0.70878553 | 0 |
Add excerpts to pages | function grg_add_excerpts_to_pages() {
add_post_type_support( 'page', 'excerpt' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function add_excerpts_to_pages() {\n add_post_type_support( 'page', 'excerpt' );\n}",
"function funky_add_excerpts_to_pages() {\r\n\tadd_post_type_support( 'page', 'excerpt' );\r\n}",
"function funky_add_excerpts_to_pages() {\r\n\tadd_post_type_support( 'page', 'excerpt' );\r\n}",
"function unamuno_page_excerpts() {\n add_post_type_support( 'page', array( 'excerpt' ) );\n }",
"function my_add_excerpts_to_pages() {\n add_post_type_support('page', 'excerpt');\n}",
"function add_excerpt_support_for_pages() {\r\n\tadd_post_type_support( 'page', 'excerpt' );\r\n}",
"function clea_add_excerpt_to_learndash() {\n\tadd_post_type_support( 'sfwd-courses', 'excerpt' );\n\tadd_post_type_support( 'sfwd-lessons', 'excerpt' );\n\tadd_post_type_support( 'sfwd-topic', 'excerpt' );\n}",
"public static function setExcerptLocation()\n {\n add_action('edit_form_after_title', function () {\n global $post, $wp_meta_boxes;\n // Output the `below_title` meta boxes:\n do_meta_boxes(get_current_screen(), 'after_title', $post);\n });\n }",
"function give_all_excerpts_more_link( $post_excerpt ) {\r\n\t\r\n\tif ( $post_excerpt != \"\" ) {\r\n\t\treturn '<p>'. $post_excerpt .' <a class=\"moretag\" href=\"'. get_permalink() . '\">→</a></p>';\r\n\t}\r\n\r\n}",
"function my_custom_init() {\n\t\tadd_post_type_support( 'page', 'excerpt' );\n\t}",
"function Explanation() {\t\t\n\t\t$this->ImportPageFromPDFFiles($this->SupplementaryPlanetTemplate);\n\t\t$this->ImportPageFromPDFFiles($this->SupplementarySignTemplate);\n\t\t$this->ImportPageFromPDFFiles($this->SupplementaryHouseTemplate);\n\t\t$this->ImportPageFromPDFFiles($this->SupplementaryAspectTemplate);\n\t}",
"function hkr_post_type_support() {\n add_post_type_support( 'page', 'excerpt' );\n}",
"function una_admin_excerpt_modify( $translation, $original ) {\n if ( 'Excerpt' == $original ) {\n return 'Description';\n }\n else {\n $pos = strpos($original, 'Excerpts are optional hand-crafted summaries of your');\n if ($pos !== false) {\n return '<p class=\"howto\">Brief description</p>';\n }\n}\nreturn $translation;\n}",
"function zues_content_excerpt() {\n\n\t\techo '<div '.zues_get_attr( 'entry-summary' ).'>'; // WPCS: XSS OK.\n\n\t\tthe_excerpt();\n\n\t\twp_link_pages(\n\t\t\tarray(\n\t\t\t'before' => '<div class=\"page-links\">' . __( 'Pages:', 'zues' ),\n\t\t\t'after' => '</div>',\n\t\t\t)\n\t\t);\n\n\t\techo '</div><!-- .entry-summary -->';\n\n\t}",
"public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"<h4>Overview</h4>\n\t\t<p>The pages module is a simple but powerful way to manage static content on your site.\n\t\tPage layouts can be managed and widgets embedded without ever editing the template files.</p>\n\t\t<h4>Managing Pages</h4><hr>\n\t\t<h6>Page Content</h6>\n\t\t<p>When choosing your page title remember that the default page layout will display the page title\n\t\tabove the page content. Now create your page content\n\t\tusing the WYSIWYG editor. When you are ready for the page to be visible to visitors set the\n\t\tstatus to Live and it will be accessible at the URL shown. <strong>You must also go to Design -> Navigation and create a new\n\t\tnavigation link if you want your page to show up in the menu.</strong></p>\n\t\t<h6>Meta data</h6>\n\t\t<p>The meta title is generally used as the title in search results and is believed to carry significant weight in page rank.<br />\n\t\tMeta keywords are words that describe your site content and are for the benefit of search engines only.<br />\n\t\tThe meta description is a short description of this page and may be used as the search snippet if the search engine deems it relevant to the search.</p>\n\t\t<h6>Design</h6>\n\t\t<p>The design tab allows you to select a custom page layout and optionally apply different css styles to it on this page only. Refer to the Page Layouts\n\t\tsection below for instructions on how to best use Page Layouts.</p>\n\t\t<h6>Script</h6>\n\t\t<p>You may place javascript here that you would like appended to the < head > of the page.</p>\n\t\t<h6>Options</h6>\n\t\t<p>Allows you to turn on comments and an rss feed for this page. If the rss feed is enabled a visitor can subscribe to this page and they\n\t\twill receive each child page in their rss reader.</p>\n\t\t<h6>Revisions</h6>\n\t\t<p>Revisions is a very powerful and handy feature for editing an existing page. Let's say a new employee really messes up a page edit. Just select a date that you would\n\t\tlike to revert the page to and click Save! You can even compare revisions to see what has changed.</p>\n\t\t<h4>Page Layouts</h4><hr>\n\t\t<p>Page layouts allows you to control the layout of the page without modifying the theme files. You can embed tags into the page layout\n\t\tinstead of placing them in every page. For example: If you have a twitter feed widget that you want to display at the bottom of every page you can just place\n\t\tthe widget tag in the page layout:\n<pre><code>\n{pyro:page:title}\n{pyro:page:body}\n\n< div class=\\\"my-twitter-widget\\\" >\n\t{pyro:widgets:instance id=\\\"1\\\"}\n< /div >\n</code></pre>\n\t\tNow you can apply css styling to the \\\"my-twitter-widget\\\" class in the CSS tab.</p>\";\n\t}",
"function partoo_all_excerpts_get_more_link($post_excerpt)\n\t{\n\t\tif (!is_admin()) {\n\t\t\t$post_excerpt = $post_excerpt . ' ... <p class=\"mb-0\"><a class=\"btn btn-primary view-article text-white\" href=\"' . esc_url(get_permalink(get_the_ID())) . '\">' . '阅读详情' . '</a></p>';\n\t\t}\n\t\treturn $post_excerpt;\n\t}",
"function make_the_about( $page_type = 'doc' ) {\n\t\n\tif ( $page_type === 'splash' ) {\n\t\t$direction = 'Click the arrow button on the main page.';\n\t} else {\n\t\t$direction = 'Select a new document [document icon] from the file menu at the top or the new page [plus button] that follows the editor box.';\n\t}\n\t\n$aboutPage = <<< EOD\n<aside id=\"aboutPage\" class=\"notVisible\">\n\t<header>\n\t\t<h1>About</h1>\n\t</header>\n\t<article>\n\t\t<h2>What is this?</h2>\n\t\t<p>This is a text editor web app can be used to create cut ups [see below] or new text documents. You can edit the document and save it to the cloud or download it as a .doc document. You can also lock the document so it can be publicly viewable but not editable.</p>\n\t</article>\n\t<article>\n\t\t<h2>What are cut ups?</h2>\n\t\t<p>The cut up technique is a chance-based literary technique in which a text is cut up and rearranged to create a new text. The concept can be traced to at least the Dadaists of the 1920s, but was popularized in the late 1950s and early 1960s by writer William S. Burroughs, and has since been used in a wide variety of contexts [<a href=\"https://en.wikipedia.org/wiki/Cut-up_technique\" target=\"_blank\">source</a>]. The texts used to make the cut on this site break each text down to separate lines of around 85 glyphs then folds the two sources together like shuffling a deck of cards. </p>\n\t</article>\n\t<article>\n\t\t<h2>How do I use this?</h2>\n\t\t<ol>\n\t\t\t<li>$direction</li>\n\t\t\t<li>Select your first source. This is optional. You can input text or select a source. Scroll down.</li>\n\t\t\t<li>Select your second source. This is optional. Scroll down.</li>\n\t\t\t<li>If you didn't select a source you'll get a blank document; if you selected one source the document will be just that; if you selected two different sources you'll get a cut up document.</li>\n\t\t\t<li>Select a name. Select a password if you'd like the document to be lockable. Click \"create document\".</li>\n\t\t\t<li>You will now see your new document.</li>\n\t\t\t<li>Copy the url to access it later on.</li>\n\t\t</ol>\n\t</article>\n\t<footer>\n\t\t<button type=\"button\" tabindex=\"-1\" class=\"textBtn closeAbout\">close</button>\n\t</footer>\n</aside>\n<button type=\"button\" tabindex=\"-1\" class=\"menuBtn ir closeAbout x\" id=\"aboutX\">close</button>\nEOD;\n\n\treturn $aboutPage;\n}",
"function new_excerpt_more($more) {\n global $post;\n\treturn '...';\n}",
"function new_excerpt_more( $more ) {\r\n\treturn '...';\r\n}",
"function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->IsLoggedIn());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->IsLoggedIn());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->IsLoggedIn());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->IsLoggedIn());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = TRUE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}",
"function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '… <p><a href=\"'. get_permalink($post->ID) . '\">' . 'Read More »' . '</a></p>';\n}",
"function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}",
"function new_excerpt_more( $more ) {\n\treturn \" ...\";\n}",
"function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\");\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\");\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\");\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\");\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}",
"function augusta_excerpt_more( $output ) {\r\n if ( has_excerpt() && !is_attachment() ) {\r\n $output .= augusta_continue_reading_link();\r\n }\r\n return $output;\r\n}",
"function new_excerpt_more($more){\n global $post;\n return ' ... ';\n}",
"function gcpta_intro() {\n\tglobal $post;\n\t\n\tif ( ! is_post_type_archive() || ! genesis_get_option( 'gcpta_intro_' . $post->post_type , 'gcpta-settings-' . $post->post_type ) ) {\n\t\treturn;\n\t}\n\t\n\t$pt = get_post_type_object( $post->post_type );\n\t\n\t$headline = genesis_get_option( 'gcpta_headline_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) ? genesis_get_option( 'gcpta_headline_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) : $pt->label . __( 'Archives' , GCPTA_DOMAIN );\n\t$headline = sprintf( '<h1>%s</h1>', esc_html( $headline ) );\n\t$archives_intro = apply_filters( 'the_content' , genesis_get_option( 'gcpta_intro_content_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) );\n\t\n\tif ( $headline || $archives_intro )\n\t\tprintf( '<div class=\"archives-intro\">%s</div>', $headline . $archives_intro );\n\t\n}",
"function new_excerpt_more($more) {\n \t global $post;\n\t return '...<br/><a href=\"'. get_permalink($post->ID) . '\">Read the full post</a>';\n }",
"function generateManualPage() {\n global $epass_home;\n include $epass_home . \"manual.html\";\n}",
"function new_excerpt_more($more) {\r\n\tglobal $post;\r\n\treturn ' ... <a href=\"'. get_permalink($post->ID) . '\">' . __( 'Read More »', 'planuswp' ) . '</a>';\r\n}"
] | [
"0.8003841",
"0.7627653",
"0.7627653",
"0.7507185",
"0.74649626",
"0.6304218",
"0.6183266",
"0.60759425",
"0.6028358",
"0.5836742",
"0.5739236",
"0.56137997",
"0.560797",
"0.55851614",
"0.5543361",
"0.55354905",
"0.54794127",
"0.5448519",
"0.54218745",
"0.54085904",
"0.54039013",
"0.5382184",
"0.53709555",
"0.5341428",
"0.53253573",
"0.5321114",
"0.5320342",
"0.5320285",
"0.5316096",
"0.5305737"
] | 0.81887776 | 0 |
Move excerpt box to top of post editor Removes the regular excerpt box. We're not getting rid of it, we're just moving it above the wysiwyg editor | function oz_remove_normal_excerpt() {
remove_meta_box( 'postexcerpt' , 'post' , 'normal' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function setExcerptLocation()\n {\n add_action('edit_form_after_title', function () {\n global $post, $wp_meta_boxes;\n // Output the `below_title` meta boxes:\n do_meta_boxes(get_current_screen(), 'after_title', $post);\n });\n }",
"function new_wp_trim_excerpt($text)\n{\n $raw_excerpt = $text;\n if ('' == $text) {\n $text = get_the_content('');\n\n $text = strip_shortcodes($text);\n\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n /*\n * Hi, future...\n *\n * Maybe I should not allow iframes... but I want the videos\n * to show in the excerpt too, maybe I will remove <iframe> from\n * here and add post custom field to add video right after the post content\n */\n $text = strip_tags($text, '<a><iframe><p><br><strong><ul><li>');\n $excerpt_length = apply_filters('excerpt_length', 55);\n $excerpt_length = 155;\n\n $excerpt_more = apply_filters('excerpt_more', ' '.'[...]');\n $words = preg_split('/(<a.*?a>)|\\n|\\r|\\t|\\s/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n if (count($words) > $excerpt_length) {\n array_pop($words);\n $text = implode(' ', $words);\n $text = $text.$excerpt_more;\n } else {\n $text = implode(' ', $words);\n }\n }\n\n return apply_filters('new_wp_trim_excerpt', $text, $raw_excerpt);\n}",
"function icopyright_trim_excerpt($text) {\r\n $raw_excerpt = $text;\r\n $isSingle = is_single();\r\n $isPage = is_page();\r\n if ($isSingle || $isPage) {\r\n return apply_filters('icopyright_trim_excerpt', $text, $raw_excerpt);\r\n }\r\n\r\n //if empty text\r\n if ('' == $text) {\r\n //if there is no excerpt crafted from add post admin\r\n //WordPress will use the_content instead.\r\n //therefore we need to remove tools filter in content,\r\n //so as not to cause duplicate,\r\n //anyway the strip_tags below will cause the tools bars to malfunction\r\n\t\tremove_filter('the_content', 'auto_add_icopyright_toolbars');\r\n\r\n //The following are default wp_trim_excerpt() behaviour, left for theme compatibility.\r\n //codes copy and paste from wp_trim_excerpt with added explanation.\r\n\r\n //if empty use content.\r\n $text = get_the_content('');\r\n \r\n //remove shortcodes\r\n $text = strip_shortcodes($text);\r\n //apply content filters\r\n $text = apply_filters('the_content', $text);\r\n \r\n //replace > with html character entity to prevent script executing.\r\n $text = str_replace(']]>', ']]>', $text);\r\n \r\n //excerpt_length filter, default 55 words\r\n $excerpt_length = apply_filters('excerpt_length', 55);\r\n //excerpt_more filter, default [...]\r\n $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\r\n // split the phrase by any number of commas or space characters,\r\n // which include \" \", \\r, \\t, \\n and \\f\r\n \r\n // code from wp_trim_words in formatting.php\r\n $text = preg_replace( '@<(script|style)[^>]*?>.*?</\\\\1>@si', '', $text );\r\n $text = strip_tags($text);\r\n \r\n $text = trim( $text); \r\n \r\n \r\n $words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);\r\n if (count($words) > $excerpt_length) {\r\n array_pop($words);\r\n $text = implode(' ', $words);\r\n $text = $text . $excerpt_more;\r\n } else {\r\n $text = implode(' ', $words);\r\n }\r\n }\r\n return apply_filters('icopyright_trim_excerpt', $text, $raw_excerpt);\r\n\r\n}",
"function tie_remove_excerpt( $more ) {\n\treturn ' ...';\n}",
"function cmsms_post_exc_cont($show = true) {\r\n\t$out = '';\r\n\t\r\n\t$post_excerpt = wpautop(theme_excerpt(20, false));\r\n\t\r\n\tif ($post_excerpt != '') {\r\n\t\t$out = cmsms_divpdel('<div class=\"cmsms_post_content entry-content\">' . \"\\n\" . \r\n\t\t\twpautop(theme_excerpt(20, false)) . \r\n\t\t'</div>' . \"\\n\");\r\n\t}\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}",
"function custom_trim_excerpt($text) {\n\n global $post;\n\n if ( '' == $text ) {\n\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n $text = strip_tags($text);\n $excerpt_length = 15;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words) > $excerpt_length) {\n array_pop($words);\n array_push($words, '...');\n $text = implode(' ', $words);\n }\n\n }\n\n return $text;\n}",
"function ncdt_archive_excerpt( $excerpt ) {\n\n\tglobal $post;\n\n\tif ( ! get_field( 'acf_ncdt_custom_excerpt', $post->id ) ) {\n\t\treturn $excerpt;\n\t} else {\n\t\t$text = get_field( 'acf_ncdt_custom_excerpt', $post->id );\n\t\t$excerpt = wp_strip_all_tags ( $text, false );\n\t}\n\n \treturn $excerpt;\n}",
"function mtws_custom_excerpt_inner_box( $post ) {\n\n // Use nonce for verification\n wp_nonce_field( plugin_basename( __FILE__ ), 'mtws_custom_excerpt_noncename' );\n\n // The actual fields for data entry\n // Use get_post_meta to retrieve an existing value from the database and use the value for the form\n $value = get_post_meta( $post->ID, '_mtws_custom_excerpt_meta_value_key', true );\n echo '<label for=\"mtws_custom_excerpt_textarea\">';\n //_e(\"Description for this field\", 'mtws_custom_excerpt_textdomain' );\n echo '</label> ';\n // Editor with image upload button\n //wp_editor( $value, 'mtws_custom_excerpt_textarea' );\n \n // Editor without image upload button\n wp_editor( $value, 'mtws_custom_excerpt_textarea', array('media_buttons'=>false, 'textarea_rows'=>3, 'teeny'=>true, 'editor_class'=>'mtws-custom-excerpt-editor') );\n \n //echo '<input type=\"text\" id=\"mtws_custom_excerpt_textarea\" name=\"mtws_custom_excerpt_textarea\" value=\"'.esc_attr($value).'\" size=\"25\" />';\n}",
"function improved_trim_excerpt($text) {\n\tglobal $ex_length, $ex_tags;\n\n\tif(pl_has_editor()){\n\t\t$allowed_tags = ( isset( $ex_tags ) && '' != $ex_tags ) ? $ex_tags : '';\n\t\t$excerpt_len = ( isset( $ex_length ) && '' != $ex_length ) ? $ex_length : 55;\n\t} else {\n\t\t$allowed_tags = (pl_setting('excerpt_tags')) ? pl_setting('excerpt_tags') : '';\n\t\t$excerpt_len = (pl_setting('excerpt_len')) ? pl_setting('excerpt_len') : 55;\n\t}\n\n\t$raw_excerpt = $text;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\n\t\t$text = strip_shortcodes( $text );\n\n\n\t\t$text = apply_filters('the_content', $text);\n\n\t\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text); // PageLines - Strip JS\n\n\t\t$text = str_replace(']]>', ']]>', $text);\n\n\t\t$text = strip_tags($text, $allowed_tags); // PageLines - allow more tags\n\n\n\t\t$excerpt_length = apply_filters('excerpt_length', $excerpt_len );\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\n\t\t$words = preg_split('/[\\n\\r\\t ]+/', $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);\n\n\t\tif ( count($words) > $excerpt_length ) {\n\t\t\tarray_pop($words);\n\t\t\t$text = implode(' ', $words);\n\t\t\t$text = $text . $excerpt_more;\n\t\t} else\n\t\t\t$text = implode(' ', $words);\n\n\t}\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}",
"function all_business_post_exc_cont($show = true) {\r\n\t$out = cmsmasters_divpdel('<div class=\"cmsmasters_post_content entry-content\">' . \"\\n\" . \r\n\t\twpautop(theme_excerpt(20, false)) . \r\n\t'</div>' . \"\\n\");\r\n\t\r\n\t\r\n\tif (theme_excerpt(20, false) != '') {\r\n\t\tif ($show) {\r\n\t\t\techo $out;\r\n\t\t} else {\r\n\t\t\treturn $out;\r\n\t\t}\r\n\t}\r\n}",
"function remove_automatic_excerpt($excerpt)\n{\n\treturn has_excerpt() ? $excerpt : '';\n}",
"function custom_trim_excerpt($text) { \n\tglobal $post;\n\tif ( '' == $text ) {\n\t\t$text = get_the_content('');\n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t$text = strip_tags($text);\n\t\t$excerpt_length = 800;\n\t\t$words = explode(' ', $text, $excerpt_length + 1);\n\t\tif (count($words) > $excerpt_length) {\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '...');\n\t\t\t$text = implode(' ', $words);\n\t\t}\n\t}\n\treturn $text;\n}",
"function dr_get_clean_excerpt( $excerpt ) {\n\n\t$excerpt = wpautop( wp_strip_all_tags( $excerpt ) );\n\n\treturn $excerpt;\n\n}",
"function oz_add_excerpt_meta_box( $post_type ) {\n\tif ( in_array( $post_type, array( 'post', 'recipe' ) ) ) {\n\t\tadd_meta_box(\n\t\t\t'oz_postexcerpt',\n\t\t\t__( 'Excerpt', 'thetab-theme' ),\n\t\t\t'sd_post_excerpt_meta_box',\n\t\t\t$post_type,\n\t\t\t'after_title',\n\t\t\t'high'\n\t\t);\n\t}\n}",
"function oz_add_excerpt_meta_box( $post_type ) {\n\tif ( in_array( $post_type, array( 'post', 'page' ) ) ) {\n\t\tadd_meta_box(\n\t\t\t'oz_postexcerpt',\n\t\t\t__( 'Excerpt', 'thetab-theme' ),\n\t\t\t'post_excerpt_meta_box',\n\t\t\t$post_type,\n\t\t\t'after_title',\n\t\t\t'high'\n\t\t);\n\t}\n}",
"function custom_wp_trim_excerpt($text, $allowed_tags = '<p>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<blockquote>,<pre>,<code>,<hr />,<br>,<br />', $excerpt_word_count = 60, $excerpt_end = '') {\n\t/* Set default value for excerpt_end */\n\tif($excerpt_end) $excerpt_end = '... <a href=\"'. get_permalink($post->ID) . '\">' . __(\"more\",\"scapegoat\") .' →</a>';\n\t$raw_excerpt = $text;\n\tif ( '' == $text ) {\n\t\t/* Retrieve the post content */\n\t\t$text = get_the_content('');\n \n\t\t/* Delete all shortcode tags from the content */\n\t\t$text = strip_shortcodes( $text );\n \n\t\t$text = apply_filters('the_content', $text);\n\t\t$text = str_replace(']]>', ']]>', $text);\n \n \t\t/* Add the allowed HTML tags separated by a comma */\n\t\t$text = strip_tags($text, $allowed_tags);\n \n \t\t/* Change the excerpt word count to any integer you like */\n\t\t$excerpt_length = apply_filters('excerpt_length', $excerpt_word_count);\n \n \t\t/* Change the excerpt endind to something else */\n\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . $excerpt_end);\n \n\t\t$words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);\n\t\tif ( count($words) > $excerpt_length ) {\n\t\t\tarray_pop($words);\n\t\t\t$text = implode(' ', $words);\n\t\t\t$text = $text . $excerpt_more;\n\t\t} else {\n\t\t\t$text = implode(' ', $words);\n\t\t}\n\t}\n\treturn apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}",
"function auxin_the_trim_excerpt( $post_id = null, $char_length = null, $exclude_strip_shortcode_tags = null, $skip_more_tag = false, $wrap_excerpt_with = '' ){\n echo auxin_get_the_trim_excerpt( $post_id, $char_length, $exclude_strip_shortcode_tags, $skip_more_tag, $wrap_excerpt_with );\n}",
"function axiom_get_the_trim_excerpt($text = '')\n{\n $raw_excerpt = $text;\n if ( '' == $text ) {\n $text = get_the_content('');\n \n //$text = strip_shortcodes( $text );\n \n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n $excerpt_length = apply_filters('excerpt_length', 55);\n $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n $text = mb_strimwidth( $text, 0, $excerpt_length, $excerpt_more );\n }\n return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}",
"function tempera_trim_excerpt($text) {\n global $tempera_excerptwords;\n global $tempera_excerptcont;\n global $tempera_excerptdots;\n $raw_excerpt = $text;\n if ( '' == $text ) {\n //Retrieve the post content.\n $text = get_the_content('');\n\n //Delete all shortcode tags from the content.\n $text = strip_shortcodes( $text );\n\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n\n $allowed_tags = '<a>,<img>,<b>,<strong>,<ul>,<li>,<i>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<pre>,<code>,<em>,<u>,<br>,<p>';\n $text = strip_tags($text, $allowed_tags);\n\n $words = preg_split(\"/[\\n\\r\\t ]+/\", $text, $tempera_excerptwords + 1, PREG_SPLIT_NO_EMPTY);\n if ( count($words) > $tempera_excerptwords ) {\n array_pop($words);\n $text = implode(' ', $words);\n $text = $text .' '.$tempera_excerptdots. ' <a class=\"continue-reading-link\" href=\"'. get_permalink() . '\">' .$tempera_excerptcont.' <span class=\"meta-nav\">→ </span>' . '</a>';\n } else {\n $text = implode(' ', $words);\n }\n }\n return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);\n}",
"function shariff3uu_excerpt( $content ) {\n\t// Get options.\n\t$shariff3uu = $GLOBALS['shariff3uu'];\n\t// Remove headline in post.\n\tif ( isset( $shariff3uu['headline'] ) ) {\n\t\t$content = str_replace( wp_strip_all_tags( $shariff3uu['headline'] ), ' ', $content );\n\t}\n\t// Add shariff before the excerpt, if option checked in the admin menu.\n\tif ( isset( $shariff3uu['add_before']['excerpt'] ) && 1 === $shariff3uu['add_before']['excerpt'] ) {\n\t\t$content = do_shortcode( '[shariff]' ) . $content;\n\t}\n\t// Add shariff after the excerpt, if option checked in the admin menu.\n\tif ( isset( $shariff3uu['add_after']['excerpt'] ) && 1 === $shariff3uu['add_after']['excerpt'] ) {\n\t\t$content .= do_shortcode( '[shariff]' );\n\t}\n\treturn $content;\n}",
"function excerpt() {\n\t\tif ( ! $this->_excerpt ) {\n\t\t\t$this->_excerpt = new PWCCRM_PostExcerpt( $this->_post );\n\t\t}\n\t\treturn $this->_excerpt;\n\t}",
"function disable_galleries_in_excerpts($excerpt)\n {\n if (class_exists('WPSEO_OpenGraph')) {\n M_Attach_To_Post::$substitute_placeholders = FALSE;\n }\n\n return $excerpt;\n }",
"function canino_the_excerpt() {\n\t$excerpt = apply_filters( 'the_excerpt', get_the_excerpt() );\n\tif ( empty( $excerpt ) ) {\n\t\tcanino_the_post_teaser();\n\t}\n\techo $excerpt;\n}",
"function excerpt_new($num){\n\n $excerpt = get_the_content();\n\n $excerpt = strip_shortcodes($excerpt);\n\n $excerpt = strip_tags($excerpt);\n\n $the_str = substr($excerpt, 0, $num);\n\n echo $the_str .\"...\";\n\n}",
"function custom_field_excerpt()\n{\n global $post;\n $text = get_field('description');\n if ('' != $text) {\n $text = strip_shortcodes($text);\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]>', $text);\n $excerpt_length = 20;\n $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n $text = wp_trim_words($text, $excerpt_length, $excerpt_more);\n }\n return apply_filters('the_excerpt', $text);\n}",
"public function wpi_editor_excerpt($excerpt)\n {\n // Polylang sets the 'from_post' parameter\n if (isset($_GET['from_post'])) {\n $my_post = get_post($_GET['from_post']);\n if ($my_post) {\n return $my_post->post_excerpt;\n }\n }\n return $excerpt;\n }",
"public static function remove_automatic_snippets( $excerpt ) {\n\t\tremove_filter( 'the_content', array( __CLASS__, 'automatically_add_recipe_snippets' ), 20 );\n\t\treturn $excerpt;\n\t}",
"function new_excerpt_more( $more ) {\n return '';\n}",
"public function getBeforeExcerptHtml()\n\t{\n\t\treturn $this->_getData('before_post');\n\t}",
"function get_the_box_excerpt(){\n\n$excerpt = get_the_content();\n\n$excerpt = strip_shortcodes($excerpt);\n\n$excerpt = strip_tags($excerpt);\n\n$the_str = substr($excerpt, 0, 98);\n\nreturn $the_str;\n\n}"
] | [
"0.650182",
"0.6112071",
"0.60696584",
"0.6043912",
"0.5948645",
"0.589284",
"0.5868588",
"0.5835682",
"0.5787492",
"0.57443887",
"0.5742517",
"0.57178956",
"0.5676219",
"0.5674004",
"0.56667113",
"0.5661126",
"0.5635866",
"0.5619108",
"0.56127703",
"0.5580541",
"0.5549836",
"0.55266064",
"0.54916316",
"0.5490145",
"0.54757935",
"0.54608995",
"0.5455368",
"0.5435693",
"0.5428851",
"0.5386151"
] | 0.73347753 | 1 |
You can't actually add meta boxes after the title by default in WP so we're being cheeky. We've registered our own meta box position `after_title` onto which we've regiestered our new meta boxes and are now calling them in the `edit_form_after_title` hook which is run after the post tile box is displayed. | function oz_run_after_title_meta_boxes() {
global $post, $wp_meta_boxes;
# Output the `below_title` meta boxes:
do_meta_boxes( get_current_screen(), 'after_title', $post );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function lowermedia_staff_title_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'lowermedia_add_staff_title_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'lowermedia_save_staff_title_link_meta', 10, 2 );\n}",
"function prfx_custom_meta() {\n add_meta_box( 'prfx_meta', __( 'Meta Box Title', 'prfx-textdomain' ), 'prfx_meta_callback', 'post' );\n}",
"function prfx_custom_meta() {\n\tadd_meta_box( 'prfx_meta', __( 'Meta Box Title', 'prfx-textdomain' ), 'prfx_meta_callback', 'post' );\n}",
"function lowermedia_add_staff_title_meta_boxes() {\n\n add_meta_box(\n 'lowermedia-staff-title', // Unique ID\n esc_html__( 'Staff Title', 'example' ), // Title\n 'lowermedia_staff_title_meta_box', // Callback function\n 'staff_members', // Admin page (or post type)\n 'side', // Context ('side', 'advanced', 'normal')\n 'high' // Priority ('high', 'core', 'default' or 'low')\n );\n}",
"function create_title_sub(){\r\n\tadd_meta_box('title-sub','Tạo tiêu đề phụ','title_sub', array ( 'post', 'page'));\r\n}",
"public function add_meta_box( $title, $callback, $context = 'normal', $priority = 'low' ) {\n\t\t$this->metaboxes[] = array(\n\t\t\t'title' => $title,\n\t\t\t'callback' => $callback,\n\t\t\t'context' => $context,\n\t\t\t'priority' => $priority,\n\t\t);\n\t}",
"function subtitle_meta_box_register_post_meta() {\n\treturn register_post_meta(\n\t\t'post',\n\t\t'subtitle',\n\t\tarray(\n\t\t\t'object_subtype' => 'post',\n\t\t\t'type' => 'string',\n\t\t\t'description' => __( 'The subhead, deck, subtitle, or lead is a preface shown on article pages below the main title.' , 'allonsy' ),\n\t\t\t'single' => true,\n\t\t\t'sanitize_callback' => 'sanitize_textarea_field',\n\t\t\t// 'auth_callback' => '',\n\t\t\t'show_in_rest' => true,\n\t\t),\n\t);\n}",
"function Page_heading_add_custom_box() {\n add_meta_box( 'wp_editor_left_box', 'Page Settings', 'wp_heading_meta_box', 'page', 'normal', 'default' );\n }",
"public function on_add_meta_boxes() {\n\t\t\t$screen = $this->cpt_key;\n\t\t\tadd_meta_box(\n\t\t\t\t\"{$this->slug_lc}_box_id\", // Unique ID.\n\t\t\t\t__( 'Apotheke info', 'adp-test-plugin' ), // Box title.\n\t\t\t\tarray( $this, 'html_meta_boxes' ), // Content callback, must be of type callable.\n\t\t\t\t$screen, // Post type.\n\t\t\t\t'side' // context.\n\t\t\t);\n\t\t}",
"function drlam_meta_box_init() {\n//add_meta_box('drlam-meta',__('Product Information','drlam-seo'), 'drlam_meta_box','post','side','default');\nadd_meta_box('drlam-meta',__('HTML Check','drlam-seo'), 'drlam_meta_box','post','normal','default');\n// hook to save our meta box data when the post is saved\n//add_action('save_post','drlam_save_meta_box');\n}",
"public function add_meta_box() {\n\t\tadd_meta_box( $this->id, $this->title, array($this, 'render'), $this->post_types, $this->context, $this->priority );\n\t}",
"function add_meta_box($title, $form_fields = array()){\n\t \t$post_type_name = $this->post_type_name;\n\t\n\t // end update_edit_form\n\t add_action('post_edit_form_tag', function(){\n\t echo 'enctype=\"multipart/form-data\"';\n\t });\n\t\n\t\n\t // At WordPress' admin_init action, add any applicable metaboxes.\n\t $this->admin_init(function() use($title, $form_fields, $post_type_name)\n\t {\n\t add_meta_box(\n\t strtolower(str_replace(' ', '_', $title)), // id\n\t $title, // title\n\t function($post, $data)\n\t { // function that displays the form fields\n\t global $post;\n\t\n\t wp_nonce_field(plugin_basename(__FILE__), 'docothemes_nonce');\n\t\n\t // List of all the specified form fields\n\t $inputs = $data['args'][0];\n\t\n\t // Get the saved field values\n\t $meta = get_post_custom($post->ID);\n\t\n\t // For each form field specified, we need to create the necessary markup\n\t // $name = Label, $type = the type of input to create\n\t foreach ($inputs as $name => $type) {\n\t #'Happiness Info' in 'Snippet Info' box becomes\n\t # snippet_info_happiness_level\n\t $id_name = $data['id'] . '_' . strtolower(str_replace(' ', '_', $name));\n\t\n\t if (is_array($inputs[$name])) {\n\t // then it must be a select or file upload\n\t // $inputs[$name][0] = type of input\n\t\n\t if (strtolower($inputs[$name][0]) === 'select') {\n\t // filter through them, and create options\n\t $select = \"<select name='$id_name' class='widefat'>\";\n\t foreach ($inputs[$name][1] as $option) {\n\t // if what's stored in the db is equal to the\n\t // current value in the foreach, that should\n\t // be the selected one\n\t\n\t if (isset($meta[$id_name]) && $meta[$id_name][0] == $option) {\n\t $set_selected = \"selected='selected'\";\n\t } else $set_selected = '';\n\t\n\t $select .= \"<option value='$option' $set_selected> $option </option>\";\n\t }\n\t $select .= \"</select>\";\n\t array_push($_SESSION['taxonomy_data'], $id_name);\n\t }\n\t }\n\t\n\t // Attempt to set the value of the input, based on what's saved in the db.\n\t $value = isset($meta[$id_name][0]) ? $meta[$id_name][0] : '';\n\t\n\t $checked = ($type == 'checkbox' && !empty($value) ? 'checked' : '');\n\t\n\t // Sorta sloppy. I need a way to access all these form fields later on.\n\t // I had trouble finding an easy way to pass these values around, so I'm\n\t // storing it in a session. Fix eventually.\n\t array_push($_SESSION['taxonomy_data'], $id_name);\n\t\n\t // TODO - Add the other input types.\n\t $lookup = array(\n\t \"text\" => \"<input type='text' name='$id_name' value='$value' class='widefat' />\",\n\t \"textarea\" => \"<textarea name='$id_name' class='widefat' rows='10'>$value</textarea>\",\n\t \"checkbox\" => \"<input type='checkbox' name='$id_name' value='$name' $checked />\",\n\t \"select\" => isset($select) ? $select : '',\n\t \"file\" => \"<input type='file' name='$id_name' id='$id_name' />\"\n\t );\n\t ?>\n\t\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<label><?php echo ucwords($name) . ':'; ?></label>\n\t\t\t\t\t\t\t\t<?php echo $lookup[is_array($type) ? $type[0] : $type]; ?>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<p>\n\t\n\t\t\t\t\t\t\t\t\t<?php\n\t // If a file was uploaded, display it below the input.\n\t $file = get_post_meta($post->ID, $id_name, true);\n\t if ( $type === 'file' ) {\n\t // display the image\n\t $file = get_post_meta($post->ID, $id_name, true);\n\t\n\t $file_type = wp_check_filetype($file);\n\t $image_types = array('jpeg', 'jpg', 'bmp', 'gif', 'png');\n\t if ( isset($file) ) {\n\t if ( in_array($file_type['ext'], $image_types) ) {\n\t echo \"<img src='$file' alt='' style='max-width: 400px;' />\";\n\t } else {\n\t echo \"<a href='$file'>$file</a>\";\n\t }\n\t }\n\t }\n\t ?>\n\t\t\t\t\t\t\t\t</p>\n\t\n\t\t\t\t\t\t\t\t<?php\n\t\n\t }\n\t },\n\t $post_type_name, // associated post type\n\t 'normal', // location/context. normal, side, etc.\n\t 'default', // priority level\n\t array($form_fields) // optional passed arguments.\n\t ); // end add_meta_box\n\t });\n\n\t\t}",
"function themetek_meta_box_pagetitle($post) {\n\t\t// Add an nonce field so we can check for it later\n\t\twp_nonce_field( 'themetek_meta_box_pagetitle', 'themetek_meta_box_pagetitle_nonce' );\n\t\t// Retrieve an existing value from the database and use the value for the form.\n\t\t$themetek_page_showhide_title = get_post_meta( $post->ID, '_themetek_page_showhide_title', true );\n\t\t$themetek_page_subtitle = get_post_meta( $post->ID, '_themetek_page_subtitle', true );\n\t\t$themetek_page_title_color = get_post_meta( $post->ID, '_themetek_page_title_color', true );\n\n\n\t\t// Show/hide title on pages\n\t\techo '<div class=\"kd_meta_block_prim meta_block_top\">';\n\t\t\techo '<label for=\"page_showhide_title\">';\n\t\t\t\tesc_html_e( 'Hide page title', 'incubator' );\n\t\t\techo '</label>';\n\t\t\t$page_showhide_title_checked = '';\n\t\t\tif ($themetek_page_showhide_title == \"yes\") {\n\t\t\t\t$page_showhide_title_checked = 'checked=\"checked\"';\n\t\t\t}\n\t\t\techo '<input type=\"checkbox\" id=\"page_showhide_title\" name=\"page_showhide_title\" value=\"yes\" ' . esc_attr($page_showhide_title_checked) . ' />';\n\t\t\techo '<span class=\"kd-meta-desc\">';\n\t\t\t\tesc_html_e( 'If checked, title will be hidden.', 'incubator' );\n\t\t\techo '</span>';\n\t\techo '</div>';\n\t\t// Page subtitle text\n\t\techo '<div class=\"kd_meta_block_prim\">';\n\t\t\techo '<label for=\"page_subtitle\">';\n\t\t\t\tesc_html_e( 'Page subtitle', 'incubator' );\n\t\t\techo '</label>';\n\t\t\techo '<input type=\"text\" class=\"page_subtitle_box\" id=\"page_subtitle\" name=\"page_subtitle\" value=\"' . esc_attr( $themetek_page_subtitle ) . '\"/>';\n\t\t\techo '<span class=\"kd-meta-desc\">';\n\t\t\t\tesc_html_e( 'Write the section subtitle. Displayed under the main page title.', 'incubator' );\n\t\t\techo '</span>';\n\t\techo '</div>';\n\t\t// Page title and subtitle text color\n\t\techo '<div class=\"kd_meta_block_prim meta_block_bottom\">';\n\t\t\techo '<label for=\"page_title_color\">';\n\t\t\t\tesc_html_e( 'Title and subtitle color', 'incubator' );\n\t\t\techo '</label>';\n\t\t\techo '<input type=\"text\" class=\"page_title_color_box\" id=\"page_title_color\" name=\"page_title_color\" value=\"' . esc_attr( $themetek_page_title_color ) . '\"/>';\n\t\t\techo '<span class=\"kd-meta-desc\">';\n\t\t\t\tesc_html_e( 'Specify the page title and subtitle color. Eg. #FFFFFF', 'incubator' );\n\t\t\techo '</span>';\n\t\techo '</div>';\n\t}",
"public function action_edit_form_after_title( $post ) {\n\t\tglobal $pagenow;\n\n\t\tif ( 'ccf_form' != get_post_type() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$title = get_the_title();\n\n\t\t?>\n\t\t<div class=\"ccf-title\">\n\t\t\t<h1>\n\t\t\t\t<span class=\"ccf-form-cpt-title\">\n\t\t\t\t\t<?php if ( ! empty( $title ) ) : ?>\n\t\t\t\t\t\t<?php echo esc_html( $title ); ?>\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t<?php esc_html_e( '(No title)', 'custom-contact-forms' ); ?>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</span>\n\n\t\t\t\t<a class=\"button button-primary ccf-open-form-manager\" <?php if ( 'post.php' === $pagenow ) : ?>data-form-id=\"<?php the_ID(); ?>\"<?php endif; ?>>\n\t\t\t\t\t<?php esc_html_e( 'Manage Form', 'custom-contact-forms' ); ?>\n\t\t\t\t</a>\n\t\t\t</h1>\n\t\t</div>\n\t\t<?php\n\t}",
"function add_meta_boxes() {\n\tadd_meta_box(\n\t\t'schemify',\n\t\t_x( 'Structured Data', 'meta box title', 'schemify' ),\n\t\t__NAMESPACE__ . '\\meta_box_cb',\n\t\t'post'\n\t);\n}",
"function admin_footer() {\n\t\t\n\t\t// edit_form_after_title is not run due to missing action, call this manually\n\t\t?>\n\t\t<div id=\"acf-form-after-title\">\n\t\t\t<?php acf_get_instance('ACF_Form_Post')->edit_form_after_title(); ?>\n\t\t</div>\n\t\t<?php\n\t\t\n\t\t\n\t\t// move #acf-form-after-title\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\t$('#normal-sortables').before( $('#acf-form-after-title') );\n\t\t</script>\n\t\t<?php\n\t}",
"function pmg_comment_tut_add_meta_box()\n{\n add_meta_box( 'pmg-comment-title', __( 'Diagnosa dan Tarif' ), 'pmg_comment_tut_meta_box_cb', 'comment', 'normal', 'high' );\n}",
"function addMetaBoxe(){\n global $post;\n $template_file = get_post_meta($post->ID,'_wp_page_template',TRUE);\n if ($template_file == $this->templateName) {\n $id = \"metaPage\" . $this->name;\n $title = $this->title;\n add_meta_box($id, $title, array( $this, 'displayMetaBoxe' ), \"page\");\n } \n }",
"function add_meta_box( array $args, string $title, ?string $screen = null, string $context = 'side', string $priority = 'default' ): void {\n\t$args = _set_default_args( $args );\n\t\\add_meta_box(\n\t\t\"{$args['key']}_mb\",\n\t\t$title,\n\t\tfunction ( \\WP_Post $post ) use ( $args ) {\n\t\t\t_cb_output_html( $args, $post );\n\t\t},\n\t\t$screen,\n\t\t$context,\n\t\t$priority\n\t);\n}",
"function add_post_meta_boxes() {\n add_meta_box(\n \"post_metadata_events_post\", // div id containing rendered fields\n \"Event Date\", // section heading displayed as text\n \"post_meta_box_events_post\", // callback function to render fields\n \"event\", // name of post type on which to render fields\n \"side\", // location on the screen\n \"low\" // placement priority\n );\n}",
"function add_cpt_meta_box(){\r\n\r\n add_meta_box(\"cpt_meta_basic\", \"Custom Post Type Information\", \"cpt_basic_meta\", \"my_custom_post\", \"normal\", \"high\");\r\n\r\n}",
"public function add_sidebar_meta_box( $title, $callback, $priority = 'low' ) {\n\t\t$this->add_meta_box( $title, $callback, 'side', $priority );\n\t}",
"function phillip_meta_boxes_setup() {\n\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'phillip_add_event_meta_boxes' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'phillip_save_meta', 10, 2 );\n \n}",
"function wic_meta_boxes_setup() {\n\t/* Add meta box on the 'add_meta_boxes' hooks. */\n\tadd_action( 'add_meta_boxes', 'wic_add_layout_type_box' );\n\tadd_action( 'add_meta_boxes', 'wic_add_article_summary_box' );\n\t\n\t/* Save post meta on the 'save_post' hook. */\n\tadd_action( 'save_post', 'wic_save_layout_type_meta', 10, 2 );\n\tadd_action( 'save_post', 'wic_save_article_summary_meta', 10, 2 );\n}",
"function wpi_postform_metatitle(){\n\t\techo '<p>'.PHP_EOL;\n\t\twpi_postmeta_label('maintitle',__('Title: ',WPI_META));\n\t\twpi_postmeta_input('maintitle');\n\t\techo '</p>'; ?>\n\t<p><?php _e('<strong>Tips: </strong> Try keep the title tag as unique as possible and make sure the title is relevant to the content on the page. Avoid repeated keywords phrases in title tag.',WPI_META);?></p>\n<?php\t\n}",
"function vi_content_add_custom_box() {\n\tglobal $post;\n add_meta_box( 'vi_content_contentintro', __( 'Summary', 'vi_content_contentintro_text' ),'vi_content_inner_custom_box_contentintro', 'content', 'normal', 'high');\t\n add_meta_box( 'vi_content_displaycontent', __( 'Display?', 'vi_content_displaycontent_text' ),'vi_content_inner_custom_box_displaycontent', 'content', 'side', 'high');\t\n add_meta_box( 'vi_content_displayorder', __( 'Display Order', 'vi_content_displayorder_text' ),'vi_content_inner_custom_box_displayorder', 'content', 'side', 'core');\n add_meta_box( 'vi_content_exturl', __( 'Link URL', 'vi_content_exturl_text' ),'vi_content_inner_custom_box_exturl', 'content', 'side', 'core');\n\n \t// check for a template type and post new meta box\n\t$template_file = get_post_meta($post->ID,'_wp_page_template',TRUE);\n \tif ($template_file == 'capabilities.php' || $template_file == 'common_content.php' || $template_file == 'insf_product.php' || $template_file == 'order_summary.php')\n\t{\t\n\t\tadd_meta_box( 'vi_pageoptions', __( 'Page Content Options', 'vi_add_content_page_content_to_pages_text' ), 'vi_add_content_page_content_to_pages', 'page', 'side', 'default');\t\t\n\t}\n\n}",
"public static function _prepare_meta_box( $post_type ) {\n\n\t\t$tsf = \\the_seo_framework();\n\n\t\t$label = $tsf->get_post_type_label( $post_type );\n\n\t\t/**\n\t\t * @since 2.9.0\n\t\t * @param string $context Accepts 'normal', 'side', and 'advanced'.\n\t\t */\n\t\t$context = (string) \\apply_filters( 'the_seo_framework_metabox_context', 'normal' );\n\n\t\t/**\n\t\t * @since 2.6.0\n\t\t * @param string $default Accepts 'high', 'default', 'low'\n\t\t * Defaults to high, this box is seen right below the post/page edit screen.\n\t\t */\n\t\t$priority = (string) \\apply_filters( 'the_seo_framework_metabox_priority', 'high' );\n\n\t\tif ( $tsf->is_front_page_by_id( $tsf->get_the_real_ID() ) ) {\n\t\t\tif ( $tsf->can_access_settings() ) {\n\t\t\t\t$schema = \\is_rtl() ? '%2$s - %1$s' : '%1$s - %2$s';\n\t\t\t\t$title = sprintf(\n\t\t\t\t\t$schema,\n\t\t\t\t\t\\esc_html__( 'Homepage SEO Settings', 'autodescription' ),\n\t\t\t\t\t$tsf->make_info(\n\t\t\t\t\t\t\\__( 'The SEO Settings may take precedence over these settings.', 'autodescription' ),\n\t\t\t\t\t\t$tsf->seo_settings_page_url(),\n\t\t\t\t\t\tfalse\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$title = \\esc_html__( 'Homepage SEO Settings', 'autodescription' );\n\t\t\t}\n\t\t} else {\n\t\t\t/* translators: %s = Post Type label */\n\t\t\t$title = sprintf( \\esc_html__( '%s SEO Settings', 'autodescription' ), $label );\n\t\t}\n\n\t\t$box_id = 'tsf-inpost-box';\n\t\t// Implies `\\get_current_screen()->id`. Is always 'post'.\n\t\t$screen_id = 'post';\n\n\t\t\\add_meta_box( $box_id, $title, __CLASS__ . '::_meta_box', $post_type, $context, $priority, [] );\n\t\t\\add_filter( \"postbox_classes_{$screen_id}_{$box_id}\", __CLASS__ . '::_add_postbox_class' );\n\t}",
"function wpi_postform_metasubtitle(){\n\t\techo '<p>'.PHP_EOL;\n\t\twpi_postmeta_label('subtitle',__('Sub title',WPI_META));\n\t\twpi_postmeta_input('subtitle');\n\t\techo '</p>'; ?>\n\t<p><?php _e('<strong>Note: </strong> Entry sub title will be added as meta-abstract.',WPI_META);?></p>\n<?php\t\n}",
"function ait_add_custom_meta_boxes_to_antique_detail(){\n\tadd_meta_box('antique_post_detail_syne_meta_box', 'Language Versions', 'display_antique_lang_versions_meta_box', 'antique', 'side', 'high');\t\n\tadd_meta_box('antique_post_detail_headline_image_meta_box', 'Headline Image', 'display_antique_headline_image_meta_box', 'antique', 'side', 'default');\n\tadd_meta_box('antique_post_detail_promotion_image_meta_box', 'Promote Image', 'display_antique_promotion_image_meta_box', 'antique', 'side', 'default');\n}",
"public static function setExcerptLocation()\n {\n add_action('edit_form_after_title', function () {\n global $post, $wp_meta_boxes;\n // Output the `below_title` meta boxes:\n do_meta_boxes(get_current_screen(), 'after_title', $post);\n });\n }"
] | [
"0.74565315",
"0.71801114",
"0.71477395",
"0.7115218",
"0.71044415",
"0.7007449",
"0.69387335",
"0.6911339",
"0.6907385",
"0.6896631",
"0.68932444",
"0.68692356",
"0.6815288",
"0.6791116",
"0.67726314",
"0.67383075",
"0.67054474",
"0.668396",
"0.6676286",
"0.6657191",
"0.6653388",
"0.6640583",
"0.66238344",
"0.6620839",
"0.6590692",
"0.65729403",
"0.65561897",
"0.6549291",
"0.6547161",
"0.6527824"
] | 0.83807564 | 1 |
Set the name of the default transaction profile to use | public function defaultProfile(string $name): static
{
$this->defaultProfile = $name;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultProfile();",
"public function getDefaultProfile()\n {\n return $this->default;\n }",
"function get_default_name()\n\t{\n\t\treturn 'Stain Skin';\n\t}",
"public function resetProfile()\n {\n $this->currentProfile = $this->generalProfile;\n }",
"private function setProfile()\n\t{\n\t\t// Set profile\n\t\t$profile = $this->input->get('profile', 1, 'int');\n\n\t\tif (empty($profile))\n\t\t{\n\t\t\t$profile = 1;\n\t\t}\n\n\t\t$session = Application::getInstance()->getContainer()->segment;\n\t\t$session->profile = $profile;\n\n\t\t/**\n\t\t * DO NOT REMOVE!\n\t\t *\n\t\t * The Model will only try to load the configuration after nuking the factory. This causes Profile 1 to be\n\t\t * loaded first. Then it figures out it needs to load a different profile and it does – but the protected keys\n\t\t * are NOT replaced, meaning that certain configuration parameters are not replaced. Most notably, the chain.\n\t\t * This causes backups to behave weirdly. So, DON'T REMOVE THIS UNLESS WE REFACTOR THE MODEL.\n\t\t */\n\t\tPlatform::getInstance()->load_configuration($profile);\n\t}",
"public function getDefaultImageProfile(){\n $id = $this->getItemId(Mage::getStoreConfig('web2print/profiles/default'));\n return $id;\n }",
"public function getName()\r\n {\r\n return 'dancer_profile';\r\n }",
"public function getName()\n {\n return 'default';\n }",
"public function getName()\n {\n return 'default';\n }",
"public function getProfileName(): string {\n\t\treturn($this->profileName);\n\t}",
"public function setTransactionName($name)\n {\n $this->logger->{$this->logLevel}('Log Metric Provider: setTransactionName with \"' . $name . '\" is called');\n }",
"function set_base_name($name) {\r\n\t\t$this->base_name = $name;\r\n\t}",
"public function setImageProfile ($name, $profile) {}",
"public function getDefaultManagerName();",
"public function setProfile(Profile $profile)\n\t{\n\t\t$this->addKeyValue('profile', $profile); \n\n\t}",
"public function setImageProfile($name, $profile) {\n\t}",
"function set_name($name)\r\n {\r\n $this->set_default_property(self :: PROPERTY_NAME, $name);\r\n }",
"function set_name($name)\r\n {\r\n $this->set_default_property(self :: PROPERTY_NAME, $name);\r\n }",
"protected function getConfigurationName(): string\n {\n return 'default';\n }",
"function set_name($name)\n {\n $this->set_default_property(self::PROPERTY_NAME, $name);\n }",
"function Profile()\n {\n $profile=$this->ApplicationObj()->Profile;\n\n if (empty($profile)) { $profile=\"Public\"; }\n\n return $profile;\n }",
"public function getDefaultName(): string {\n return self::$DEFAULT_NAME;\n }",
"public function getTableName() {\n\t\treturn 'profiles';\n\t}",
"public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }",
"public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }",
"public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }",
"public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }",
"public function __setCurrentTemplateName($name) {\n\t\t$this->current_template_name = $name;\n\t}",
"public function stopProfile($name=null){ }",
"public function default_name($name)\n\t{\n\t\treturn sprintf($this->prefix(), $name);\n\t}"
] | [
"0.6666888",
"0.6113772",
"0.59601384",
"0.5756714",
"0.57529116",
"0.5534406",
"0.55161",
"0.54635715",
"0.54635715",
"0.5406401",
"0.53636694",
"0.52684593",
"0.52609843",
"0.5233713",
"0.5216301",
"0.52064097",
"0.5159831",
"0.5159831",
"0.51584816",
"0.5138914",
"0.51240474",
"0.51205015",
"0.5028377",
"0.5024619",
"0.5024619",
"0.5024619",
"0.5024619",
"0.501844",
"0.5016336",
"0.5003918"
] | 0.6182264 | 1 |
Internals Creates fallback profiles | protected function makeFallbackProfiles(): array
{
return [
'default' => [
'driver' => CopyWriteReplaceDriver::class,
'options' => [
'maxMemory' => 5 * BufferSizes::BUFFER_1MB,
'lock' => [
'enabled' => true,
'profile' => 'default',
'type' => LockTypes::EXCLUSIVE,
'timeout' => 0.5,
],
'backup' => [
'enabled' => false,
'directory' => getcwd() . DIRECTORY_SEPARATOR . 'backup',
'remove_after_commit' => false,
],
]
]
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultProfile();",
"public function testPredefinedProfilesWritePredefinedProfile()\n {\n }",
"public function testPredefinedProfilesClone()\n {\n }",
"private function loadProfiles() {\n switch(D3P_STORAGE) {\n\t case 'file':\n\t $this->loadProfilesFromFile();\n\t break;\n }\n\t}",
"public function testPredefinedProfilesGetNew()\n {\n }",
"public function testPredefinedProfilesUpdatePredefinedProfile()\n {\n }",
"public function testPredefinedProfilesGet()\n {\n }",
"public function __construct(\n protected array $profiles = [],\n protected string $defaultProfile = 'default'\n ) {\n $this->fallbackProfiles = $this->makeFallbackProfiles();\n\n // Set fallback profiles, when none available\n if (empty($this->profiles)) {\n $this->usingProfiles($this->fallbackProfiles);\n }\n }",
"private function get_profiles() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 12.5' );\n\t}",
"protected function registerProfiles() {\n // Generate Variable Profiles \n\t\t \n\t \t//--- Boolean (Type 0)\n\t\t \n\t \t//--- Integer (Type 1)\n if ( !IPS_VariableProfileExists('RCTPOWER_Ampere') ) {\n IPS_CreateVariableProfile('RCTPOWER_Ampere', 1 );\n \tIPS_SetVariableProfileDigits('RCTPOWER_Ampere', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Ampere', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Ampere', \"\", \" A\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Voltage') ) {\n IPS_CreateVariableProfile('RCTPOWER_Voltage', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Voltage', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Voltage', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Voltage', \"\", \" V\" );\n } \n \n if ( !IPS_VariableProfileExists('RCTPOWER_Power') ) {\n IPS_CreateVariableProfile('RCTPOWER_Power', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Power', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Power', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Power', \"\", \" W\" );\n } \n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Energy') ) {\n IPS_CreateVariableProfile('RCTPOWER_Energy', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Energy', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Energy', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Energy', \"\", \" Wh\" );\n } \n\t\t \n //--- Float (Type 2)\n if ( !IPS_VariableProfileExists('RCTPOWER_Capacity.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_Capacity.2', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_Capacity.2', \"\", \" kWh\" );\n }\n \n if ( !IPS_VariableProfileExists('RCTPOWER_SoC.1') ) {\n IPS_CreateVariableProfile('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_SoC.1', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_SoC.1', \"\", \" %\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_PVPower.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_PVPower.2', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_PVPower.2', \"\", \" kWp\" );\n }\n\t\t \n\t \t\t//--- String (Type 3)\n\t\t \n }",
"public function __construct($profile) {\r\n $this->_load_profile($profile);\r\n }",
"function Profiles() {\n parent::__construct();\n }",
"function lingotek_load_profile_defaults($entity_type) {\n $profile_defaults = lingotek_get_profiles(FALSE);\n $entity_profile_defaults = variable_get('lingotek_entity_profiles', array());\n $profile_map = array();\n if (array_key_exists($entity_type, $entity_profile_defaults)) {\n foreach ($entity_profile_defaults[$entity_type] as $k => $v) {\n $profile_map[$k] = is_numeric($v) && !empty($profile_defaults[$v]) ? $profile_defaults[$v] : array();\n $profile_map[$k]['profile'] = $v;\n unset($profile_map[$k]['name']);\n }\n return $profile_map;\n }\n return array();\n}",
"function profiles_funcs() {\r\n\t\t$this->profiles();\r\n\t}",
"public function profiles();",
"protected function initUserProfiles()\n {\n $bFirst = false;\n $this->arResult['USER_PROFILES'] = [];\n $dbUserProfiles = CSaleOrderUserProps::GetList(\n array('DATE_UPDATE' => 'DESC'),\n array(\n 'PERSON_TYPE_ID' => $this->order->getPersonTypeId(),\n 'USER_ID' => $this->userId\n )\n );\n while ($arUserProfiles = $dbUserProfiles->GetNext())\n {\n $this->arResult['USER_PROFILES'][$arUserProfiles['ID']] = $arUserProfiles;\n }\n }",
"public function getProfiles() {}",
"private function loadProfilesFromFile() {\n $this->profiles = json_decode(file_get_contents(D3P_DATAFILE));\n\t}",
"private function setProfile()\n\t{\n\t\t// Set profile\n\t\t$profile = $this->input->get('profile', 1, 'int');\n\n\t\tif (empty($profile))\n\t\t{\n\t\t\t$profile = 1;\n\t\t}\n\n\t\t$session = Application::getInstance()->getContainer()->segment;\n\t\t$session->profile = $profile;\n\n\t\t/**\n\t\t * DO NOT REMOVE!\n\t\t *\n\t\t * The Model will only try to load the configuration after nuking the factory. This causes Profile 1 to be\n\t\t * loaded first. Then it figures out it needs to load a different profile and it does – but the protected keys\n\t\t * are NOT replaced, meaning that certain configuration parameters are not replaced. Most notably, the chain.\n\t\t * This causes backups to behave weirdly. So, DON'T REMOVE THIS UNLESS WE REFACTOR THE MODEL.\n\t\t */\n\t\tPlatform::getInstance()->load_configuration($profile);\n\t}",
"public function testPredefinedProfilesGetById()\n {\n }",
"public function getProfiles(){ }",
"public function testPredefinedProfilesGetProfileSchemaByPredefinedProfileId()\n {\n }",
"private function _load_profile($profile,$namespace='') {\r\n\t\t$this->profile = new FileSystem_File(\r\n\t\t\tROOT_BACK.MODELS_DIRECTORY.DS.'Filesystem'.DS.'Filter'.DS.'settings',\r\n\t\t\t$profile.'.xml'\r\n\t\t);\r\n\t\t$this->profile->open('read','settings');\r\n }",
"public function testPredefinedProfilesDeletePredefinedProfile()\n {\n }",
"public static function createProfiles(&$profiles, &$team, $teamInfo) {\r\n global $BE_USER, $LANG;\r\n\r\n $maxCoaches = $teamInfo->get('maxCoaches');\r\n $maxPlayers = $teamInfo->get('maxPlayers');\r\n $profiles = $profiles['tx_cfcleague_profiles'];\r\n $content = '';\r\n\r\n $playerIds = array(); // Sammelt die UIDs der neuen Spieler\r\n $coachIds = array(); // Sammelt die UIDs der neuen Trainer\r\n $supportIds = array(); // Sammelt die UIDs der neuen Betreuer\r\n $warnings = array(); // Sammelt Profile die nicht angelegt werden konnten\r\n\r\n $data = array();\r\n foreach($profiles As $uid => $profile){\r\n // Zuerst Leerzeichen entfernen\r\n $profile['last_name'] = trim($profile['last_name']);\r\n $profile['first_name'] = trim($profile['first_name']);\r\n\r\n if(strlen($profile['last_name']) > 0) // Nachname ist Pflichtfeld\r\n {\r\n $type = $profile['type'];\r\n unset($profile['type']);\r\n // Darf dieses Profil noch angelegt werden?\r\n if($type == '1' && (($team->getPlayerSize() + count($playerIds)) >= $maxPlayers)) { // Spieler\r\n $warnings[] = $profile['last_name'] . ', ' . $profile['first_name'];\r\n }\r\n elseif($type == '2' && (($team->getCoachSize() + count($coachIds)) >= $maxCoaches)) { // Trainer\r\n $warnings[] = $profile['last_name'] . ', ' . $profile['first_name'];\r\n }\r\n else {\r\n\r\n // Jetzt das Array vorbereiten\r\n $data['tx_cfcleague_profiles'][$uid] = $profile;\r\n\r\n if($type == '1') {\r\n $playerIds[] = $uid;\r\n }\r\n elseif($type == '2') {\r\n $coachIds[] = $uid;\r\n }\r\n else {\r\n $supportIds[] = $uid;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\t\ttx_rnbase::load('tx_cfcleague_util_Misc');\r\n // Die IDs der Trainer, Spieler und Betreuer mergen\r\n if(count($coachIds)) {\r\n $data['tx_cfcleague_teams'][$team->record['uid']]['coaches'] = implode(',', tx_cfcleague_util_Misc::mergeArrays(tx_rnbase_util_Strings::intExplode(',', $team->record['coaches']), $coachIds));\r\n }\r\n if(count($playerIds)) {\r\n $data['tx_cfcleague_teams'][$team->record['uid']]['players'] = implode(',', tx_cfcleague_util_Misc::mergeArrays(tx_rnbase_util_Strings::intExplode(',', $team->record['players']), $playerIds));\r\n }\r\n if(count($supportIds)) {\r\n $data['tx_cfcleague_teams'][$team->record['uid']]['supporters'] = implode(',', tx_cfcleague_util_Misc::mergeArrays(tx_rnbase_util_Strings::intExplode(',', $team->record['supporters']), $supportIds));\r\n }\r\n\r\n if(count($data)) {\r\n reset($data);\r\n $tce =& tx_cfcleague_db::getTCEmain($data);\r\n $tce->process_datamap();\r\n $content .= count($tce->errorLog) ? $LANG->getLL('msg_tce_errors') : $LANG->getLL('msg_profiles_created');\r\n $content .= '<br /><br />';\r\n }\r\n else\r\n $content .= $LANG->getLL('msg_no_person_found'). '<br /><br />';\r\n\r\n if($warnings) {\r\n $content .= '<b>'. $LANG->getLL('msg_profiles_warnings'). '</b><br><ul><li>';\r\n $content .= implode('<li>', $warnings);\r\n $content .= '</ul>';\r\n }\r\n return $content;\r\n }",
"function fillProfiles()\n {\n $db = &atkGetDb();\n $this->profileId = $this->getProfile();\n $profiles = atkGetNode('competency.competencyprofile')->select()->includes(array('name','id'))->allRows();\n $this->listprofiles = $profiles;\n }",
"public function initProfilesWishlistss()\n\t{\n\t\t$this->collProfilesWishlistss = array();\n\t}",
"public function createImageFromProfile()\n {\n $this->assertSame($this->image, $this->imageCache->get('test', $this->image));\n $this->assertEquals('jpg', $this->image->getExtension());\n /** @var Image $image */\n $image = $this->imageCache->get('thumb', $this->image);\n $this->assertEquals('jpg', $image->getExtension());\n $this->assertEquals('image/png', $image->getContentType());\n $box = $image->getResourceImage()->getSize();\n $this->assertEquals(32, $box->getHeight());\n $this->assertEquals(32, $box->getWidth());\n $this->codeGuy->seeFileFound('portrait.png', dirname(__DIR__).'/_data/thumb');\n $this->codeGuy->deleteDir(dirname(__DIR__).'/_data/thumb');\n }",
"function profile() {\n\t\t\n\t}",
"public function getDefaultProfile()\n {\n return $this->default;\n }"
] | [
"0.6556477",
"0.6507393",
"0.6412803",
"0.62216234",
"0.6138661",
"0.6095559",
"0.5951493",
"0.57850444",
"0.5697024",
"0.56287473",
"0.5614449",
"0.5603919",
"0.557311",
"0.55563825",
"0.5531337",
"0.55209565",
"0.5462052",
"0.54568505",
"0.541829",
"0.53706425",
"0.53568417",
"0.53511643",
"0.5336254",
"0.5320739",
"0.53072554",
"0.5297282",
"0.52783406",
"0.5277886",
"0.52596986",
"0.5258518"
] | 0.65228325 | 1 |
Update the forecasts of all the cities. | public function updateAllCitiesForecast($unit = 'c')
{
$cities = $this->getCityRepository()->findAll();
foreach ($cities as $city) {
$datas = $this->downloadForecast($city, $unit);
return $this->updateForecast($city, $datas, $unit);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update_forecasts()\n\t{\n\t $time = microtime(true);\n \n foreach ($this->airports as $key => $values) {\n \n $airportCode = $values['airport_code'];\n \n $rawWeatherData = $this->get_weather_forecast($airportCode);\n $preparedWeatherData = $this->parse_weather_forecast($rawWeatherData);\n $this->update_database($airportCode, $preparedWeatherData ); \n }\n \n $timeNow = (microtime(true));\n $timePassed = $timeNow - $time;\n echo \"finished weather update in: \".$timePassed.' seconds'; \n\t}",
"public function getCitiesWithForecast(): iterable\n\t{\n\t\t$forecast = new stdClass();\n\t\tforeach ($this->cities as $city) {\n\t\t\t$forecast->forecast = $this->makeApiRequestForCity($city)\n\t\t\t\t->readForecastFromApiRequest();\n\t\t\t$forecast->name = $city->name;\n\n\t\t\tyield $forecast;\n\t\t}\n\t}",
"public function run(): void\n {\n $cities = $this->museumClient->getAllCities();\n\n foreach ($cities as $city) {\n if (isset($city['name']) && isset($city['latitude']) && isset($city['longitude'])) {\n $cond = $this->ovhClient->getForecastFromLatLon($city['latitude'], $city['longitude']);\n if (isset($cond[0]) && isset($cond[1])) {\n $this->output->info(\"Processed city \" . $city['name'] . \" | \" . $cond[0] . \" - \" . $cond[1]);\n }\n }\n }\n }",
"public function run()\n {\n foreach ($this->items() as $item) {\n Province::query()->updateOrCreate($item);\n }\n }",
"public function update(Request $request, Cities $cities)\n {\n //\n }",
"public function run()\n {\n foreach (self::$cities as $city) {\n DB::table('cities')->insert(\n [\n 'name' => $city,\n 'created_at' => date('Y-m-d H:i:s'),\n ]\n );\n }\n }",
"public function updateMetars()\n {\n $airports = \\Config::get('zbw.metar_airports');\n $url = \\Datafeed::where('key', 'metar')->first();\n foreach($airports as $airport)\n {\n $this->curl->get($url->value, ['id' => $airport]);\n $parser = new MetarParser($this->curl->response);\n /*$lastMetar = \\Metar::where('facility', $airport)->latest()->first();\n $response = $this->curl->response;*/\n /*if(empty($response) || empty($lastMetar->raw)) { continue; }\n if($lastMetar->raw != $response) {*/\n $this->createMetar($airport, $parser);\n //}\n }\n }",
"public function index(MusementCityService $musementCityService)\n {\n foreach ($musementCityService->list() as $city) {\n try {\n $city = $musementCityService->addForecastForCity($city);\n echo \"Processed city {$city['name']} | {$city['forecast'][0]} {$city['forecast'][1]}\".\"<br>\";\n } catch (GuzzleException $exception) {\n continue;\n }\n }\n }",
"public function run()\n {\n\n DB::table('locations')->truncate();\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 1,\n 'country_id' => 1\n ]\n\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 2,\n 'country_id' => 1\n ]\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 3,\n 'country_id' => 1\n ]\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 4,\n 'country_id' => 2\n ]\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 5,\n 'country_id' => 2\n ]\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 6,\n 'country_id' => 3\n ]\n );\n\n \\App\\Models\\Location::updateOrCreate(\n [\n 'city_id' => 7,\n 'country_id' => 3\n ]\n );\n\n }",
"public function run()\n {\n $citiesUsed = [\n 'Sofia', 'Varna', 'London', 'Paris', 'Berlin',\n ];\n\n foreach ($citiesUsed as $city) {\n City::firstOrCreate(['name' => $city]);\n }\n }",
"public function run()\n {\n\n $getJson = File::get(\"database/data/cities.json\");\n $decodedCities = json_decode($getJson);\n\n foreach ($decodedCities as $dataCities){\n $city = new City();\n $city->name = $dataCities->name;\n $city->zipcode = $dataCities->code;\n $city->picture = $dataCities->picture;\n $city->slug = Str::slug($dataCities->name);\n $city->save();\n }\n }",
"public function run()\n {\n $cities = ['London'=>1, 'Cardiff'=>1, 'Dublin'=>2, 'Amsterdam'=>3, 'Brussels'=>4, 'Berlin'=>5];\n foreach ($cities as $name => $country_id) {\n \t$city = new City;\n \t$city->name = $name;\n \t$city->country_id = $country_id;\n \t$city->save();\n }\n }",
"protected function syncCities(){\n $citiesApiJson = $this->_getCitiesFromServer();\n $citiesApi = json_decode($citiesApiJson);\n if (property_exists($citiesApi, 'success') && $citiesApi->success === true) {\n $this->_syncWithDb($citiesApi->data);\n $this->messageManager->addSuccess(\n __('Synchronized successfully')\n );\n $this->_redirect('novaposhta/city/index');\n } else {\n $this->messageManager->addError(\n __('Newpost is not responding or responding incorrectly')\n );\n $this->messageManager->addError($citiesApi->message);\n $this->_redirect('novaposhta/city/index');\n }\n }",
"public function updateAll()\n\t{\n\t\tif (empty($this->locales)) {\n\t\t\tforeach ($this->getProjectLanguages()->list as $language) {\n // en => en-us\n\t\t\t\t$this->locales[$this->getLocaleName($language->code)] = $language->code;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->locales as $locale => $country) {\n\t\t\t$this->updateLocale($locale);\n\t\t}\n\t}",
"function updateAll($forceRefresh=0) {\n\t \tif ( !is_file( $this->getIGCFilename(1) ) || $forceRefresh ) {\n\t\t\tif (! $this->getFlightFromIGC($this->getIGCFilename(0) ) ) {\n\t\t\t\t$this->getFlightFromDB($this->flightID,0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n \t if ( !is_file( $this->getMapFilename() ) || $forceRefresh ) {\n\t\t\t $this->getMapFromServer();\n\t }\n\n\t $this->updateCharts($forceRefresh);\n \t $this->updateCharts($forceRefresh,1);\n\t}",
"private function _syncWithDb($citiesApi)\n {\n for($i=0; $i<count($citiesApi); $i++) {\n $city = $this->getModel();\n $city->setData(\"city_name\", $citiesApi[$i]->Description);\n $city->setData(\"ref\", $citiesApi[$i]->Ref);\n $city->setData(\"original_id\", $citiesApi[$i]->CityID);\n\n $this->cityRepository->save($city);\n\n $city->setData(\"city_id\", null);\n }\n }",
"private function updateCountries()\n\t{\n $countries = \\Countries::getList();\n foreach ($countries as $countryId => $country){\n \\DB::table('countries')->insert(array(\n 'id' => $countryId,\n 'country_code' => $country['country-code'],\n 'currency' => ((isset($country['currency'])) ? $country['currency'] : null),\n 'currency_code' => ((isset($country['currency_code'])) ? $country['currency_code'] : null),\n 'full_name' => ((isset($country['full_name'])) ? $country['full_name'] : null),\n 'iso_3166_2' => $country['iso_3166_2'],\n 'iso_3166_3' => $country['iso_3166_3'],\n 'name' => $country['name'],\n 'calling_code' => $country['calling_code'],\n 'currency_symbol' => ((isset($country['currency_symbol'])) ? $country['currency_symbol'] : null),\n 'flag' =>((isset($country['flag'])) ? $country['flag'] : null),\n ));\n }\n\t}",
"public function run()\n {\n $estados = collect([\n [\n 'uf' => 'AM',\n 'nome' => 'Amazonas',\n ],\n ]);\n\n $estados->each(fn($estado) => Estado::updateOrCreate($estado));\n }",
"public function run()\n {\n foreach (Country::all() as $country) {\n City::factory(10)->create([\n 'country_id' => $country->id,\n ]);\n }\n }",
"public function forecastByCityKey(string $cityKey): Collection\n {\n $city = $this->cityRepository->findByKey($cityKey);\n\n if (!$city) {\n throw new \\Exception(\"City with key '$cityKey' does not exist.\");\n }\n\n return $this->forecastByCoordinates($city['coordinates'][0], $city['coordinates'][1]);\n }",
"public function run()\n {\n $cities = [\n ['state_id' => '1', 'name' => 'São Paulo'],\n ['state_id' => '1', 'name' => 'Guarulhos'],\n ['state_id' => '1', 'name' => 'Campinas'],\n ['state_id' => '1', 'name' => 'São bernando do Campo'],\n ['state_id' => '1', 'name' => 'Osasco'],\n\n ];\n\n foreach($cities as $city){\n City::create($city);\n }\n }",
"private function updateLocationCircuits()\n {\n $location = $this->location_model->get();\n foreach( $location as $key => $value ) {\n $data = self::calcRadius( array( $value->lat, $value->lng ), 50 );\n $this->location_model->save( $data, $id = $value->id );\n }\n }",
"public function run()\n {\n $cities = [\n [\n 'name' => 'София',\n 'counts' => 0\n ],\n [\n 'name' => 'Пловдив',\n 'counts' => 0\n ],\n [\n 'name' => 'Бургас',\n 'counts' => 0\n ],\n [\n 'name' => 'Варна',\n 'counts' => 0\n ],\n ];\n\n // $this->truncate('city');\n\n foreach ($cities as $city) {\n\n City::create([\n 'name' => $city['name'],\n 'counts' => $city['counts']\n ]);\n }\n }",
"public function updateAll() {\n return $this->_update();\n }",
"public function run()\n {\n try {\n $json = Storage::disk('public')->get('json/city.list.json');\n $data = json_decode($json);\n\n foreach ($data as $obj) {\n City::create([\n 'id' => $obj->id,\n 'name' => $obj->name,\n 'state' => $obj->state,\n 'country' => $obj->country,\n 'lon' => $obj->coord->lon,\n 'lat' => $obj->coord->lat\n ]);\n }\n } catch (\\Exception $e) {\n dd($e->getMessage());\n }\n }",
"public function update(CitiesRequest $request, $id)\n {\n try{\n $city = City::findOrFail($id);\n $city->update($request->all());\n\n session()->flash('success', 'تمت تعديل التصنيف بنجاح');\n return redirect()->back();\n\n }catch (\\Exception $exception){\n session()->flash('error' ,'لقد حدث خطأ ما');\n return redirect()->back();\n }\n }",
"public function forecastByCityName(string $cityName): Collection\n {\n $city = $this->cityRepository->findByName($cityName);\n\n if (!$city) {\n throw new \\Exception(\"City with name '$cityName' does not exist.\");\n }\n\n return $this->forecastByCoordinates($city['coordinates'][0], $city['coordinates'][1]);\n }",
"public function run()\n {\n DB::table('cities')->delete();\n $json = File::get(\"database/data/municipios.json\");\n $data = json_decode($json);\n foreach ($data as $obj) {\n City::create(array(\n 'id' => $obj->CodMunicipio,\n 'name' => $obj->NomMunicipio,\n 'state_id' => $obj->CodDepartamento\n ));\n }\n }",
"public function updateAllFiles()\n {\n foreach (File::get() as $f) {\n $f->updateCloudStatus();\n }\n }",
"private function resetForecasting() {\n $db = DBManagerFactory::getInstance();\n $db->query(\"UPDATE config SET value = 0 WHERE name = 'is_setup'\");\n $db->query(\"UPDATE config SET value = 0 WHERE name = 'has_commits'\");\n }"
] | [
"0.7410777",
"0.6293088",
"0.6097834",
"0.5907515",
"0.5862174",
"0.5628007",
"0.5541746",
"0.55263996",
"0.54238445",
"0.54204994",
"0.5385081",
"0.53426313",
"0.5313892",
"0.529924",
"0.52970845",
"0.52912796",
"0.52910656",
"0.5283603",
"0.526028",
"0.5259501",
"0.5210432",
"0.51800513",
"0.51724917",
"0.51640314",
"0.5153806",
"0.5133807",
"0.5124885",
"0.5099323",
"0.5082136",
"0.5063466"
] | 0.7267545 | 1 |
Prepare edit form for translation | public function term_edit_form ( ) {
if ( !isset( $_GET[ 'wpr_edit_term_id' ] ) || $_GET[ 'wpr_edit_term_id' ] < 1 ) {
return;
}
$term_id = sanitize_key ( $_GET[ 'wpr_edit_term_id' ] );
$term_name = get_term( $term_id )->name;
$langs = $this->term_edit_form_langs();
$term_meta = $this->get_meta_translation( $term_id, $langs );
require (ALWPR_TRANSLATE_DIR . '/admin/templates/term_form.php');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function editTranslation()\n\t{\n\t\t// Get Hash of the translation\n\t\t$string = $this->get('PARAMS.hash');\n $lang = $this->get('PARAMS.lang');\n\n\t\t// Load it from database\n\t\t$translation = new \\model\\translations;\n\t\t$translation->load( array('string = :string AND language = :lang', \n array(':string' => $string, ':lang' => $lang)));\n\n\t\t// Change the attributes\n $translation->hash = $translation->hash ? $translation->hash : \\controller\\helper::randStr();\n $translation->string = $string;\n\t\t$translation->translation = trim($this->get('POST.translation'));\n\t\t$translation->language = $lang;\n\n\t\t// Save it!\n\t\t$translation->save();\n\t}",
"private function edit()\n\t\t{\n\t\t\t$id = (int)$_REQUEST['id'];\n\t\t\t$row = DB::selectRow(\"content\", \"*\", \"WHERE id=$id\");\n\t\t\t$name = $row->name;\n\t\t\t$language = $row->language;\n\t\t\t$note = htmlentities(stripslashes($row->note));\n\t\t\t$value = stripslashes($row->value);\n\t\t\t$langcode = DB::selectValue(\"language\", \"code\", \"WHERE id=$language\");\n\t\t\t// Check if a parameter was passed.\n\t\t\tif (isset($_REQUEST['template']))\n\t\t\t{\n\t\t\t\t$template = (int)$_REQUEST['template'];\n\t\t\t}\n\t\t\telse $template = $row->template;\n\t\t\t$session = FN::getProperty(\"session\");\n\t\t\tif (!$template) $template = FN::getSessionValue(\"template\");\n\t\t\t\n\t\t\t// Get the template selector.\n\t\t\t$tselect = new SELECT(\"template\", NULL, \"template\");\n\t\t\t$list = array();\n\t\t\t$result = DB::select(\"template\", array(\"id\", \"name\"));\n\t\t\twhile ($row = DB::fetchRow($result)) $list[$row->name] = $row->id;\n\t\t\tDB::freeResult($result);\n\t\t\tksort($list);\n\t\t\tforeach ($list as $tname=>$tid)\n\t\t\t\t$tselect->add(new OPTION(NULL, NULL, $tid, $tname, $tid == $template));\n\n\t\t\t// Get the language selector.\n\t\t\t$lselect = new SELECT(NULL, NULL, \"language\");\n\t\t\t$list = array();\n\t\t\t$result = DB::select(\"language\", array(\"id\", \"code\"));\n\t\t\twhile ($row = DB::fetchRow($result)) $list[$row->code] = $row->id;\n\t\t\tDB::freeResult($result);\n\t\t\tksort($list);\n\t\t\tforeach ($list as $lname=>$lid)\n\t\t\t\t$lselect->add(new OPTION(NULL, NULL, $lid, $lname, $lid == $language));\n\n\t\t\t$form = new FORM(\"editContent\");\n\t\t\t$form->add(new H1(NULL, NULL, \"Text editor\"));\n\t\t\t$form->add($table = new TABLE());\n\n\t\t\t$table->addRow($tr = new TR());\n\t\t\t$tr->addCell(new TD(NULL, \"label\",\n\t\t\t\tnew LABEL(NULL, NULL, \"Template:\", \"template\")));\n\t\t\t$tr->addCell($td = new TD(NULL, \"tatd\", $tselect));\n\n\t\t\t$td->add(new LABEL(NULL, NULL, \"Language:\", \"language\"));\n\t\t\t$td->add($lselect);\n\n\t\t\t$table->addRow($tr = new TR());\n\t\t\t$tr->addCell(new TD(NULL, \"label\",\n\t\t\t\tnew LABEL(NULL, NULL, \"Name:\", \"name\")));\n\t\t\t$tr->addCell(new TD(NULL, \"tatd\",\n\t\t\t\tnew TEXT(NULL, NULL, \"name\", $name)));\n\n\t\t\t$table->addRow($tr = new TR());\n\t\t\t$tr->addCell(new TD(NULL, \"label\",\n\t\t\t\tnew LABEL(NULL, NULL, \"Note:\", \"note\")));\n\t\t\t$tr->addCell(new TD(NULL, \"tatd\",\n\t\t\t\tnew TEXT(NULL, NULL, \"note\", $note)));\n\n\t\t\t$table->addRow($tr = new TR());\n\t\t\t$tr->addCell(new TD(NULL, \"label\", new LABEL(NULL, NULL,\n\t\t\t\t\"Value:\", \"Value\")));\n\t\t\t$tr->addCell($td = new TD(NULL, \"tatd\",\n\t\t\t\tnew TEXTAREA(NULL, NULL, \"value\", $value)));\n\t\t\t$td->add(new SCRIPT(NULL, \"CKEDITOR.replace('value')\"));\n\t\t\t\n\t\t\t$table->addRow($tr = new TR());\n\t\t\t$tr->addCell();\n\t\t\t$tr->addCell($td = new TD());\n\t\t\t$td->add(new HIDDEN(\"admin\", 1));\n\t\t\t$td->add(new HIDDEN(\"text\", 1));\n\t\t\t$td->add(new HIDDEN(\"section\", \"content\"));\n\t\t\t$td->add(new HIDDEN(\"id\", $id));\n\t\t\t$td->add(new SUBMIT(NULL, NULL, \"action\", \"Save text\"));\n\t\t\t$td->add(new SUBMIT(NULL, NULL, \"action\", \"OK\"));\n\n\t\t\treturn $form;\n\t\t}",
"public function initEditForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTarget(\"_top\");\n\t\t$form->setFormAction($ilCtrl->getFormAction($this, \"update\"));\t \n\t\t$form->setTitle($lng->txt(\"edit\"));\n\t\n\t\t// title\n\t\t$ti = new ilTextInputGUI($lng->txt(\"title\"), \"title\");\n\t\t$ti->setSize(min(40, ilObject::TITLE_LENGTH));\n\t\t$ti->setMaxLength(ilObject::TITLE_LENGTH);\n\t\t$ti->setRequired(true);\n\t\t$form->addItem($ti);\n\t\t\n\t\t// description\n\t\t$ta = new ilTextAreaInputGUI($lng->txt(\"description\"), \"desc\");\n\t\t$ta->setCols(40);\n\t\t$ta->setRows(2);\n\t\t$form->addItem($ta);\n\t\n\t\t$form->addCommandButton(\"update\", $lng->txt(\"save\"));\n\t\t// $this->form->addCommandButton(\"cancelUpdate\", $lng->txt(\"cancel\"));\t \n\t\t\n\t\treturn $form;\n\t}",
"function add_edit(){\r\n\t\tglobal $__in, $__out, $arr_AVAILABLE_LANGUAGES;\r\n\t\t$__out['available_languages'] = $arr_AVAILABLE_LANGUAGES;\r\n\t\t$translation = new translation();\r\n\t\tif ($__in['__is_form_submitted']) {\t\t// if form is submitted\r\n\t\t\tif ($translation->save($__in['translation']['key'], $__in['translation']['text'])) {\r\n\t\t\t\treturn dispatcher::redirect(array(\"action\"=>\"getall\"), \"added_successfully\");\r\n\t\t\t} else {\r\n\t\t\t\t$__out['translation'] = $__in['translation'];\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($__in['key']) {\t// edit or prepared key\r\n\t\t\t\t$__out['translation']['key'] = $__in['key'];\r\n\t\t\t\t$__out['translation']['text'] = $translation->get_one_by_key($__in['key']);\r\n\t\t\t} else {\t// add new empty\r\n\t\t\t\t$__out['translation'] = array();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t// Объект вкладки 'Атрибуты документа'\n\t\t$oAttrTab = Admin_Form_Entity::factory('Tab')\n\t\t\t->caption(Core::_('Document.tab_1'))\n\t\t\t->name('tab_1');\n\n\t\t$this->addTabAfter($oAttrTab, $oMainTab);\n\n\t\t$title = $this->_object->id\n\t\t\t? Core::_('Document_Version.edit')\n\t\t\t: Core::_('Document_Version.add');\n\n\t\t$oMainTab\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$oDocument_Name = Admin_Form_Entity::factory('Input')\n\t\t\t->value(\n\t\t\t\t$this->_object->Document->Name\n\t\t\t)\n\t\t\t->caption(Core::_('Document.name'))\n\t\t\t->name('name')\n\t\t\t->class('form-control input-lg');\n\n\t\t$oMainRow1->add($oDocument_Name);\n\n\t\t$oTextarea_Document = Admin_Form_Entity::factory('Textarea')\n\t\t\t->value(\n\t\t\t\t!is_null($this->_object->id) ? $this->_object->loadFile() : ''\n\t\t\t)\n\t\t\t->rows(15)\n\t\t\t->caption(Core::_('Document_Version.text'))\n\t\t\t->name('text')\n\t\t\t->wysiwyg(TRUE)\n\t\t\t->template_id($this->_object->template_id);\n\n\t\t$oMainRow2->add($oTextarea_Document);\n\n\t\tif (Core::moduleIsActive('typograph'))\n\t\t{\n\t\t\t$oTextarea_Document->value(\n\t\t\t\tTypograph_Controller::instance()->eraseOpticalAlignment($oTextarea_Document->value)\n\t\t\t);\n\n\t\t\t$oUseTypograph = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t->name(\"use_typograph\")\n\t\t\t\t->caption(Core::_('Document.use_typograph'))\n\t\t\t\t->value(1)\n\t\t\t\t->divAttr(array('class' => 'form-group col-sm-12 col-md-6 col-lg-6'));\n\n\t\t\t$oUseTrailingPunctuation = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t->name(\"use_trailing_punctuation\")\n\t\t\t\t->caption(Core::_('Document.use_trailing_punctuation'))\n\t\t\t\t->value(1)\n\t\t\t\t->divAttr(array('class' => 'form-group col-sm-12 col-md-6 col-lg-6'));\n\n\t\t\t$oMainTab\n\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t$oMainRow3\n\t\t\t\t->add($oUseTypograph)\n\t\t\t\t->add($oUseTrailingPunctuation);\n\t\t}\n\n\t\t$oAttrTab\n\t\t\t->add($oAttrRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oAttrRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oAttrRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t// Выбор макета\n\t\t$oAdditionalTab->delete($this->getField('template_id'));\n\t\t$Template_Controller_Edit = new Template_Controller_Edit($this->_Admin_Form_Action);\n\n\t\t$aTemplateOptions = $Template_Controller_Edit->fillTemplateList($this->_object->Document->site_id);\n\n\t\t$oSelect_Template_Id = Admin_Form_Entity::factory('Select')\n\t\t\t->options(\n\t\t\t\tcount($aTemplateOptions) ? $aTemplateOptions : array(' … ')\n\t\t\t)\n\t\t\t->name('template_id')\n\t\t\t->value(\n\t\t\t\t!is_null($this->_object->id)\n\t\t\t\t? $this->_object->template_id\n\t\t\t\t: 0\n\t\t\t)\n\t\t\t->caption(Core::_('Document_Version.template_id'));\n\n\t\t$oAttrRow1->add($oSelect_Template_Id);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('current'), $oAttrRow2)\n\t\t\t->move($this->getField('description'), $oAttrRow3);\n\n\t\t$this->title($title);\n\n\t\treturn $this;\n\t}",
"public function _editActionView() {\n\t\tbfLoad ( 'bfSmarty' );\n\t\t\n\t\t$tmp = bfSmarty::getInstance ( 'com_form' );\n\t\t$tmp->caching = false;\n\t\t$tmp->assignFromArray ( $this->_config );\n\t\t\n\t\t$tmp->assign ( 'CONFIG', $this->_config );\n\t\t\n\t\t$disabled = bfHTML::yesnoRadioList ( 'published', '', $this->_config ['published'] );\n\t\t$tmp->assign ( 'PUBLISHED', $disabled );\n\t\t\n\t\t$CUSTOM6 = bfHTML::yesnoRadioList ( 'custom6', '', $this->_config ['custom6'] );\n\t\t$tmp->assign ( 'CUSTOM6', $CUSTOM6 );\n\t\t\n\t\t$OPTIONS = array (bfHTML::makeOption ( '0', 'Public' ), bfHTML::makeOption ( '1', 'Registered' ), bfHTML::makeOption ( '2', 'Special' ) );\n\t\t\n\t\t$access = bfHTML::selectList2 ( $OPTIONS, 'access', '', 'value', 'text', $this->_config ['access'] );\n\t\t$tmp->assign ( 'ACCESS', $access );\n\t\t\n\t\t$OPTIONS = array (bfHTML::makeOption ( 'POST', 'POST' ), bfHTML::makeOption ( 'GET', 'GET' ) );\n\t\t$custom4 = bfHTML::selectList2 ( $OPTIONS, 'custom4', '', 'value', 'text', $this->_config ['custom4'] );\n\t\t$tmp->assign ( 'CUSTOM4', $custom4 );\n\t\t\n\t\t$tmp->display ( dirname ( __FILE__ ) . DS . 'editView.tpl' );\n\t\n\t}",
"public function editForm()\n {\n }",
"protected function makeEditForm()\t{\n\t\tglobal $BE_USER,$LANG,$TCA;\n\n\t\t// Initialize variables:\n\t\t$this->elementsData=array();\n\t\t$this->errorC=0;\n\t\t$this->newC=0;\n\t\t$thePrevUid='';\n\t\t$editForm='';\n\t\t$trData = NULL;\n\t\t\n\t\t// Traverse the GPvar edit array\n\t\tforeach($this->editconf as $table => $conf)\t{\t// Tables:\n\t\t\t\n\t\t\tif (is_array($conf) && $TCA[$table] && $BE_USER->check('tables_modify',$table))\t{\n\n\t\t\t\t\t// Traverse the keys/comments of each table (keys can be a commalist of uids)\n\t\t\t\tforeach($conf as $cKey => $cmd)\t{\n\t\t\t\t\tif ($cmd=='edit' || $cmd=='new')\t{\n\n\t\t\t\t\t\t\t// Get the ids:\n\t\t\t\t\t\t$ids = t3lib_div::trimExplode(',',$cKey,1);\n\n\n\t\t\t\t\t\t// Traverse the ids:\n\t\t\t\t\t\tforeach($ids as $theUid)\t{\n\n\t\t\t\t\t\t\t\t// Checking if the user has permissions? (Only working as a precaution, because the final permission check is always down in TCE. But it's good to notify the user on beforehand...)\n\t\t\t\t\t\t\t\t// First, resetting flags.\n\t\t\t\t\t\t\t$hasAccess = 1;\n\t\t\t\t\t\t\t$deniedAccessReason = '';\n\t\t\t\t\t\t\t$deleteAccess = 0;\n\t\t\t\t\t\t\t$this->viewId = 0;\n\n\t\t\t\t\t\t\t\t// If the command is to create a NEW record...:\n\t\t\t\t\t\t\tif ($cmd=='new')\t{\n\t\t\t\t\t\t\t\tif (intval($theUid))\t{\t\t// NOTICE: the id values in this case points to the page uid onto which the record should be create OR (if the id is negativ) to a record from the same table AFTER which to create the record.\n\n\t\t\t\t\t\t\t\t\t\t// Find parent page on which the new record reside\n\t\t\t\t\t\t\t\t\tif ($theUid<0)\t{\t// Less than zero - find parent page\n\t\t\t\t\t\t\t\t\t\t$calcPRec=t3lib_BEfunc::getRecord($table,abs($theUid));\n\t\t\t\t\t\t\t\t\t\t$calcPRec=t3lib_BEfunc::getRecord('pages',$calcPRec['pid']);\n\t\t\t\t\t\t\t\t\t} else {\t// always a page\n\t\t\t\t\t\t\t\t\t\t$calcPRec=t3lib_BEfunc::getRecord('pages',abs($theUid));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Now, calculate whether the user has access to creating new records on this position:\n\t\t\t\t\t\t\t\t\tif (is_array($calcPRec))\t{\n\t\t\t\t\t\t\t\t\t\t$CALC_PERMS = $BE_USER->calcPerms($calcPRec);\t// Permissions for the parent page\n\t\t\t\t\t\t\t\t\t\tif ($table=='pages')\t{\t// If pages:\n\t\t\t\t\t\t\t\t\t\t\t$hasAccess = $CALC_PERMS&8 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t\t#$this->viewId = $calcPRec['pid'];\n\t\t\t\t\t\t\t\t\t\t\t$this->viewId = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$hasAccess = $CALC_PERMS&16 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t\t$this->viewId = $calcPRec['uid'];\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$this->dontStoreDocumentRef=1;\t\t// Don't save this document title in the document selector if the document is new.\n\t\t\t\t\t\t\t} else {\t// Edit:\n\t\t\t\t\t\t\t\t$calcPRec = t3lib_BEfunc::getRecord($table,$theUid);\n\t\t\t\t\t\t\t\tt3lib_BEfunc::fixVersioningPid($table,$calcPRec);\n\t\t\t\t\t\t\t\tif (is_array($calcPRec))\t{\n\t\t\t\t\t\t\t\t\tif ($table=='pages')\t{\t// If pages:\n\t\t\t\t\t\t\t\t\t\t$CALC_PERMS = $BE_USER->calcPerms($calcPRec);\n\t\t\t\t\t\t\t\t\t\t$hasAccess = $CALC_PERMS&2 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t$deleteAccess = $CALC_PERMS&4 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t$this->viewId = $calcPRec['uid'];\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$CALC_PERMS = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages',$calcPRec['pid']));\t// Fetching pid-record first.\n\t\t\t\t\t\t\t\t\t\t$hasAccess = $CALC_PERMS&16 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t$deleteAccess = $CALC_PERMS&16 ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t$this->viewId = $calcPRec['pid'];\n\n\t\t\t\t\t\t\t\t\t\t\t// Adding \"&L=xx\" if the record being edited has a languageField with a value larger than zero!\n\t\t\t\t\t\t\t\t\t\tif ($TCA[$table]['ctrl']['languageField'] && $calcPRec[$TCA[$table]['ctrl']['languageField']]>0)\t{\n\t\t\t\t\t\t\t\t\t\t\t$this->viewId_addParams = '&L='.$calcPRec[$TCA[$table]['ctrl']['languageField']];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Check internals regarding access:\n\t\t\t\t\t\t\t\t\tif ($hasAccess)\t{\n\t\t\t\t\t\t\t\t\t\t$hasAccess = $BE_USER->recordEditAccessInternals($table, $calcPRec);\n\t\t\t\t\t\t\t\t\t\t$deniedAccessReason = $BE_USER->errorMsg;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else $hasAccess = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']))\t{\n\t\t\t\t\t\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'] as $_funcRef)\t{\n\t\t\t\t\t\t\t\t\t$_params = array(\n\t\t\t\t\t\t\t\t\t\t'table' \t=>\t$table,\n\t\t\t\t\t\t\t\t\t\t'uid' \t\t=> \t$theUid,\n\t\t\t\t\t\t\t\t\t\t'cmd' \t\t=> \t$cmd,\n\t\t\t\t\t\t\t\t\t\t'hasAccess' => $hasAccess\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t$hasAccess = t3lib_div::callUserFunction($_funcRef, $_params, $this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// AT THIS POINT we have checked the access status of the editing/creation of records and we can now proceed with creating the form elements:\n\n\t\t\t\t\t\t\tif ($hasAccess)\t{\n\t\t\t\t\t\t\t\t$prevPageID = is_object($trData)?$trData->prevPageID:'';\n\t\t\t\t\t\t\t\t$trData = t3lib_div::makeInstance('t3lib_transferData');\n\t\t\t\t\t\t\t\t$trData->addRawData = TRUE;\n\t\t\t\t\t\t\t\t$trData->defVals = $this->defVals;\n\t\t\t\t\t\t\t\t$trData->lockRecords=1;\n\t\t\t\t\t\t\t\t$trData->disableRTE = !$BE_USER->isRTE();\n\t\t\t\t\t\t\t\t$trData->prevPageID = $prevPageID;\n\t\t\t\t\t\t\t\t$trData->fetchRecord($table,$theUid,$cmd=='new'?'new':'');\t// 'new'\n\t\t\t\t\t\t\t\treset($trData->regTableItems_data);\n\t\t\t\t\t\t\t\t$rec = current($trData->regTableItems_data);\n\t\t\t\t\t\t\t\t$rec['uid'] = $cmd=='new' ? uniqid('NEW') : $theUid;\n\t\t\t\t\t\t\t\tif ($cmd=='new')\t{\n\t\t\t\t\t\t\t\t\t$rec['pid'] = $theUid=='prev'?$thePrevUid:$theUid;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->elementsData[]=array(\n\t\t\t\t\t\t\t\t\t'table' => $table,\n\t\t\t\t\t\t\t\t\t'uid' => $rec['uid'],\n\t\t\t\t\t\t\t\t\t'pid' => $rec['pid'],\n\t\t\t\t\t\t\t\t\t'cmd' => $cmd,\n\t\t\t\t\t\t\t\t\t'deleteAccess' => $deleteAccess\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t// Now, render the form:\n\t\t\t\t\t\t\t\tif (is_array($rec))\t{\n\n\t\t\t\t\t\t\t\t\t\t// Setting visual path / title of form:\n\t\t\t\t\t\t\t\t\t$this->generalPathOfForm = $this->tceforms->getRecordPath($table,$rec);\n\t\t\t\t\t\t\t\t\tif (!$this->storeTitle)\t{\n\t\t\t\t\t\t\t\t\t\t$this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : t3lib_BEfunc::getRecordTitle($table,$rec,TRUE);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Setting variables in TCEforms object:\n\t\t\t\t\t\t\t\t\t$this->tceforms->hiddenFieldList = '';\n\t\t\t\t\t\t\t\t\t$this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;\n\t\t\t\t\t\t\t\t\tif (is_array($this->overrideVals[$table]))\t{\n\t\t\t\t\t\t\t\t\t\t$this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Register default language labels, if any:\n\t\t\t\t\t\t\t\t\t$this->tceforms->registerDefaultLanguageData($table,$rec);\n\n\t\t\t\t\t\t\t\t\t\t// Create form for the record (either specific list of fields or the whole record):\n\t\t\t\t\t\t\t\t\t$panel = '';\n\t\t\t\t\t\t\t\t\tif ($this->columnsOnly)\t{\n\t\t\t\t\t\t\t\t\t\tif(is_array($this->columnsOnly)){\n\t\t\t\t\t\t\t\t\t\t\t$panel.= $this->tceforms->getListedFields($table,$rec,$this->columnsOnly[$table]);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$panel.= $this->tceforms->getListedFields($table,$rec,$this->columnsOnly);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$panel.= $this->tceforms->getMainFields($table,$rec);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$panel = $this->tceforms->wrapTotal($panel,$rec,$table);\n\n\t\t\t\t\t\t\t\t\t\t// Setting the pid value for new records:\n\t\t\t\t\t\t\t\t\tif ($cmd=='new')\t{\n\t\t\t\t\t\t\t\t\t\t$panel.= '<input type=\"hidden\" name=\"data['.$table.']['.$rec['uid'].'][pid]\" value=\"'.$rec['pid'].'\" />';\n\t\t\t\t\t\t\t\t\t\t$this->newC++;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Display \"is-locked\" message:\n\t\t\t\t\t\t\t\t\tif ($lockInfo = t3lib_BEfunc::isRecordLocked($table, $rec['uid'])) {\n\t\t\t\t\t\t\t\t\t\t$lockedMessage = t3lib_div::makeInstance(\n\t\t\t\t\t\t\t\t\t\t\t't3lib_FlashMessage',\n\t\t\t\t\t\t\t\t\t\t\thtmlspecialchars($lockInfo['msg']),\n\t\t\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t\t\tt3lib_FlashMessage::WARNING\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tt3lib_FlashMessageQueue::addMessage($lockedMessage);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Combine it all:\n\t\t\t\t\t\t\t\t\t$editForm .= $panel;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$thePrevUid = $rec['uid'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->errorC++;\n\t\t\t\t\t\t\t\t$editForm.=$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission',1).'<br /><br />'.\n\t\t\t\t\t\t\t\t\t($deniedAccessReason ? 'Reason: ' . htmlspecialchars($deniedAccessReason) . '<br /><br />' : '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $editForm;\n\t}",
"function formEdit($to_clean, $required, $dbwhere, $id, $fieldType=null){\n\t$dir = dirname(dirname(__FILE__));\n\n\trequire $dir.'/lang/'.LANGUAGE.'.php';\n\n\t$msg = 'Editing !!';\n\t$msge = '';\n\t$sql = '';\n\t$df = 0;\n\n\t$clean = array();\n\t$clean = sanitiseInput($_POST, $to_clean, $required);\n\n\tif($clean[0]==false){\n\n // injecting formated date based on unix timestamp from database if field == date\n\t\t$ftlen = count($fieldType);\n\t\tif($fieldType != null){\n\t\t\tfor($i=0;$i<$ftlen;$i++){\n\t\t\t\tif($fieldType[$i] == 2) {\n\t\t\t\t\t$df = $to_clean[$i+1];\n\t\t\t\t\t$_POST[$df] = myTime::getMyTime(3,$_POST[$df]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$msg .= \"clean !!! \";\n\t\t$h_id = $_POST[$id];\n\t\tunset($_POST[$id]);\n\t\tunset($_POST['edit']);\n\n\t\t$sql = 'update '.$dbwhere.' set ';\n\t\tforeach($_POST as $key => $val){\n\t\t\t$sql .= $key.'=\"'.$val.'\", ';\n\t\t}\n\t\t$sql = rtrim($sql, ', ');\n\t\t$sql .= \" where $id=\".$h_id;\n\n\t\t$msg .= '<br/>'.$sql;\n\n\t\t// $msg .= $db->myQuery($sql);\n\t\t$msg .= $clean[1];\n\t\t$_POST[$id] = $h_id;\n\t}else {\n\t\t$msg .= 'not clean !!!!<br/>';\n\t\t$msg .= $clean[0];\n\t\t$msg .= $lang[$clean[0]];\n\t\t$msge .= $lang[$clean[0]];\n\t\t$msg .= $clean[1];\n\t}\n\treturn array($msg, $msge, $sql);\n}",
"protected function createComponentAddTranslationForm() {\n $form = new Form;\n\n $string = $this->dbStorage->getStringsBID($this->translationbase_id);\n $this->plural = $this->stringStorage->isPlural($string->retezec);\n\n $pluralForms = $this->stringStorage->getPluralVariants();\n $container = $form->addContainer('text');\n\n if ($this->authorization->isAllowed('unclassified')) {\n $form->addSelect('category_id', 'Select category', $this->dbStorage->getCategories())\n ->setRequired('This item must be filled.');\n }\n\n for ($i = 1; $i <= ($this->plural ? $this->stringStorage->getNPlurals() : 1); $i++) {\n $label = 'Shape: ' . $pluralForms[$i - 1] . (isset($pluralForms[$i]) ? (' - ' . ($pluralForms[$i] - 1)) : ' and more');\n $container->addTextArea($i, $label, 20, 2)\n ->setRequired('This item must be filled.');\n if ($this->plural) {\n $container[$i]->addRule(Form::PATTERN, 'The string must contain the sign for number.', '.*(%s).*|.*(%d).*');\n }\n }\n\n $form->addHidden('page', array_search(TRUE, $this->pages));\n $form->addSubmit('save', 'Save translation');\n\n $form->onSuccess[] = callback($this, 'addTranslationFormSubmitted');\n return $form;\n }",
"public function editarAction()\n {\n // action body\n $form = new Admin_Form_Template($this->_session->empresa->id_empresa);\n\n if ($this->_getParam('id')) {\n $template = new Template();\n $busca = $template->find($this->_getParam('id'))\n ->current()\n ->toArray();\n\n $form->populate($busca);\n }\n\n if ($this->_request->isPost()) {\n $data = $this->_request->getPost();\n\n if ($form->isValid($data)) {\n $obj_template = new stdClass();\n $obj_template->id = (!empty($data['id_template']) ? $data['id_template'] : null);\n $obj_template->empresa = $this->_session->empresa->id_empresa;\n $obj_template->titulo = $data['str_titulo'];\n $obj_template->nome = $data['str_nome'];\n $obj_template->corpo = $data['str_corpo'];\n\n $template = new Template();\n $template->salva($obj_template);\n\n $mensagem = array('success' => 'Template salvo.');\n $this->_helper\n ->flashMessenger($mensagem);\n\n $this->_redirect('/admin/templates');\n } else {\n $this->_helper\n ->flashMessenger(array('error', $form->getErrors()));\n }\n }\n\n $this->view->form = $form;\n }",
"public function editomform() // Edit om form\n\t{\n\t\t$this->setMethod('post');\n\t\t\n\t\t// title\n\t\t$this->addElement('text', 'title', array( \t\t\t\n\t\t\t'required' => true,\n\t\t\t'class' => 'form-control',\n\t\t\t'filters' => array('StringTrim'),\n\t\t\t'maxlength' => '100',\n\t\t\t'decorators'=>Array('ViewHelper','Errors'),\n\t\t\t'validators' => array(\n\t\t\t\tarray('notEmpty', true, array(\n\t\t\t\t\t'messages' => array('isEmpty' => 'Title '.CANTEMPTY)\n\t\t\t\t)),\n\t\t\t\tarray('Regex',\n\t\t\t\t\tfalse,\n\t\t\t\t\tarray('/^[a-z][a-z0-9., \\'-]{0,}$/i', 'messages'=>array('regexNotMatch'=>'Title '.ALPHABETSVALIDATION)))\n\t\t\t),\n\t\t\t));\n\t\t\n\t\t//file number\t\n\t\t$this->addElement('text', 'filenumber', array( \t\t\t\n\t\t\t'required' => false,\n\t\t\t'class' => 'form-control',\n\t\t\t'filters' => array('StringTrim'),\n\t\t\t'maxlength' => '100',\n\t\t\t'decorators'=>Array('ViewHelper','Errors')\n\t\t));\n\n\t\t$this->addElement('file', 'uploadfile', array( \n\t\t\t'class' => 'form-control',\n\t\t\t'label' => '',\n\t\t\t'required' => false,\n\t\t\t'id' => 'uploadfile',\n\t\t\t'validators' => array(\n\t\t\tarray('notEmpty', true, array('messages' => array('isEmpty' => 'Upload image '.CANTEMPTY)))\n\t\t\t),\n\t\t));\n\t\t\n\t\t//sort order\t\n\t\t$this->addElement('text', 'sort_order', array( \t\t\t\n\t\t\t'required' => false,\n\t\t\t'class' => 'form-control',\n\t\t\t'filters' => array('StringTrim'),\n\t\t\t'maxlength' => '3',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t\t),\n\t\t\t'validators' => array(\n\t\t\tarray('Regex',\n\t\t\tfalse,\n\t\t\tarray('/^[0-9]*$/', 'messages'=>array('regexNotMatch'=>'Sort Order field will only accept numeric value.')))\n\t\t\t),\n\t\t));\n\t\t\t\n\t\t//language\n\t\t$language = new Zend_Form_Element_Select('language',array( \n\t\t\t'label' => '',\n\t\t\t'required' => true,\n\t\t\t'class' => 'form-control',\n\t\t\t'multiOptions' => array(\n\t\t\t'2' => 'English',\n\t\t\t'1' => 'Hindi',\n\t\t\t),\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t\t),\n\t\t));\n\t\t\n\t\t$required = new Zend_Validate_NotEmpty ();\n\t\t$required->setType ($required->getType() | Zend_Validate_NotEmpty::INTEGER | Zend_Validate_NotEmpty::ZERO);\n\t\t$language->addValidators (array($required));\n\t\t$this->addElement($language);\n\n\t\t// Category drop down\n\t\t$cat_select = new Zend_Form_Element_Select('category',array( \n\t\t\t'label' => '',\n\t\t\t'required' => true,\n\t\t\t'class' => 'form-control',\n\t\t\t'multiOptions' => array(\n\t\t\t'0' => 'Select Category'\n\t\t\t),\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t\t),\n\t\t));\n\t\t\t\n\t\t$content_cat = new Application_Model_Contentmanagement; \n\t\t$get_om_category = $content_cat->get_om_category();\n\n\t\tforeach($get_om_category as $key => $value){ \n\t\t$catval = $value['title']; \n\t\t$cat_select->addMultiOption($value['id'], $catval); \n\t\t}\n\n\t\t$required = new Zend_Validate_NotEmpty ();\n\t\t$required->setType ($required->getType() | Zend_Validate_NotEmpty::INTEGER | Zend_Validate_NotEmpty::ZERO);\n\t\t$cat_select->addValidators (array($required));\n\t\t$this->addElement($cat_select);\n\t\t\t\n\t\t\n\t\t//Sub Category Dropdown\n\t\t$subcat_select = new Zend_Form_Element_Select('sub_category',array( \n\t\t\t'label' => '',\n\t\t\t'required' => false,\n\t\t\t'class' => 'form-control',\n\t\t\t'multiOptions' => array(\n\t\t\t'0' => 'Select Sub Category'\n\t\t\t),\n\t\t\t'RegisterInArrayValidator' => false,\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t\t),\n\t\t));\n\t\t\t\n\t\t$this->addElement($subcat_select);\n\t\t$content_cat1 = new Application_Model_Contentmanagement; \n\t\t$get_om_category1 = $content_cat1->omgetsubcatdata(trim($_GET['id']));\n\n\t\tforeach($get_om_category1 as $key => $value){ \n\t\t$catval = $value['title']; \n\t\t$subcat_select->addMultiOption($value['id'], $catval); \n\t\t}\n\t\t$this->addElement($subcat_select);\n\t\t\n\t\t//file date\t\t\n\t\t$this->addElement('text', 'filedate', array( \t\t\t\n\t\t\t'required' => false,\n\t\t\t'class' => 'form-control',\n\t\t\t'filters' => array('StringTrim'),\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t\t),\n\t\t\t'validators' => array(\n\t\t\tarray('Regex',\n\t\t\tfalse,\n\t\t\tarray('/^\\d{2}\\/\\d{2}\\/\\d{4}$/', 'messages'=>array('regexNotMatch'=>'Date is not valid')))\n\t\t\t),\n\t\t));\n\t\t\t\n\t\t// Add a captcha\n\t\t$this->addElement('text', 'vercode', array(\n\t\t\t//'label' => 'Please enter the 5 letters displayed below:',\n\t\t\t'required' => true,\n\t\t\t'class' => 'form-control captchain',\n\t\t\t'placeholder' => 'Captcha',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper',\n\t\t\t'Errors',\n\t\t\t),\n\t\t\t'validators' => array(\n\t\t\t\tarray('validator' => 'StringLength', 'options' => array(0, 20))\n\t\t\t\t)\n\t\t));\n\t\t\t\t\n\t\t// Add the submit button\n\t\t$this->addElement('submit', 'submit', array(\n\t\t\t'ignore' => true,\n\t\t\t'label' => 'Submit',\n\t\t));\n\n\t\t// And finally add some CSRF protection\n\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t'ignore' => true,\n\t\t));\n\n\t\t\t\n\t}",
"public function action_edit()\n\t {\n\t\t//initialize data\n\t\t$data = array(\n\t\t\t'id'=>'0',\n\t\t\t'title'=>'',\n\t\t\t'description'=>'',\n\t\t\t'description_reader'=>'',\n\t\t\t'category_id'=>null,\n\t\t\t'order'=>null,\n\t\t\t'show_location'=>'1',\n\t\t\t'location_name'=>'',\n\t\t\t'show_pictures'=>'1',\t\t\t\n\t\t\t'pictures_name'=>'',\n\t\t\t'show_files'=>'1',\n\t\t\t'files_name'=>'',\n\t\t\t'more_than_one'=>1,\n\t\t\t'default_image'=>null,\n\t\t\t'allow_user_default_image'=>0\n\t\t);\n\t\t\t\n\t\t\n\t\t\n\t\t \n\t\t/*** Make sure we have the right form ***/\t\t\n\t\t//first order of business, get that id, if there is one\n\t\t$id = isset($_GET['id']) ? intval($_GET['id']) : 0;\n\n\t\t//if it's 0 then we're adding a form\n\t\tif($id == 0)\n\t\t{\n\t\t\t$form = null;\n\t\t\t$is_add = \"true\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$is_add = \"false\";\n\t\t\t//get the form\n\t\t\t$form = ORM::factory('form', $id);\n\n\t\t\t//does the form exist?\n\t\t\tif(!$form->loaded())\n\t\t\t{\n\t\t\t $this->request->redirect('admin/forms');\n\t\t\t}\n\t\t\t$data['id'] = $form->id;\n\t\t\t$data['title'] = $form->title;\n\t\t\t$data['description'] = $form->description;\n\t\t\t$data['description_reader'] = $form->description_reader;\n\t\t\t$data['category_id'] = $form->category_id;\n\t\t\t$data['order'] = $form->order;\n\t\t\t$data['more_than_one'] = $form->more_than_one;\n\t\t\t$data['show_location']=$form->show_location;\r\n\t\t\t$data['location_name']=$form->location_name;\r\n\t\t\t$data['show_pictures']=$form->show_pictures;\r\n\t\t\t$data['pictures_name']=$form->pictures_name;\r\n\t\t\t$data['show_files']=$form->show_files;\r\n\t\t\t$data['files_name']=$form->files_name;\n\t\t\t$data['default_image']=$form->default_image;\n\t\t\t$data['allow_user_default_image']=$form->allow_user_default_image;\n\t\t}\n\t\t\n\t\t/***Now that we have the form, lets initialize the UI***/\n\t\t//The title to show on the browser\n\t\t$header = $form ? __(\"edit form\") . ' :: '. $form->title : __(\"add form\") ;\n\t\t$this->template->html_head->title = $header;\t\t\n\t\t//make messages roll up when done\n\t\t$this->template->html_head->messages_roll_up = true;\n\t\t//the name in the menu\n\t\t$this->template->header->menu_page = \"forms\";\n\t\t$this->template->content = view::factory(\"admin/form_edit\");\n\t\t$this->template->content->errors = array();\n\t\t$this->template->content->messages = array();\n\t\t$this->template->content->header = $header;\n\t\t//set the JS\n\t\t$js = view::factory('admin/form_edit_js');\n\t\t$js->is_add = $is_add;\n\t\t$this->template->html_head->script_views[] = $js;\n\t\t$this->template->html_head->script_views[] = view::factory('js/messages');\n\t\t\n\t\t//get the status\n\t\t$status = isset($_GET['status']) ? $_GET['status'] : null;\n\t\tif($status == 'saved')\n\t\t{\n\t\t\t\t$this->template->content->messages[] = __('changes saved');\n\t\t}\n\t\t\n\t\t/******* Handle incoming data*****/\n\t\tif(!empty($_POST)) // They've submitted the form to update his/her wish\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//if we're editing things\n\t\t\t\tif($_POST['action'] == 'edit')\n\t\t\t\t{\n\t\t\t\t\t//new cat or existing cat?\n\t\t\t\t\tif($id == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$form = ORM::factory('form');\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$form = ORM::factory('form', $id);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$form->update_form($_POST);\n\n\t\t\t\t\tif (isset($_FILES['default_image']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filename = $this->_save_image($_FILES['default_image'], $id);\n\t\t\t\t\t\tif($filename){\n\t\t\t\t\t\t\t$form->default_image = $filename;\n\t\t\t\t\t\t\t$form->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($_POST['action'] == 'delete')\n\t\t\t\t{\n\t\t\t\t\tModel_Form::delete_form($_POST['form_id']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($_POST['action'] == 'delete_field')\n\t\t\t\t{\n\t\t\t\t\tModel_Formfields::delete_formfield($_POST['form_id']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->request->redirect('admin/forms/edit?id='.$form->id.'&status=saved');\n\t\t\t}\n\t\t\tcatch (ORM_Validation_Exception $e)\n\t\t\t{\n\t\t\t\t$errors_temp = $e->errors('register');\n\t\t\t\tif(isset($errors_temp[\"_external\"]))\n\t\t\t\t{\n\t\t\t\t\t$this->template->content->errors = array_merge($errors_temp[\"_external\"], $this->template->content->errors);\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tforeach($errors_temp as $error)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_string($error))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->template->content->errors[] = $error;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/**** Finish setting things up ****/\n\t\t//categories\n\t\t$cats = ORM::factory('category')->find_all();\n\t\t$category = array();\n\t\tforeach($cats as $cat)\n\t\t{\n\t\t\t$category[$cat->id] = $cat;\n\t\t}\n\t\t$category = Model_Category::get_categories_dropdown_array(Model_Category::get_all_categories());\n\t\t$this->template->content->categories = $category;\n\t\t\n\t\t//form fields\n\t\t$formfields = ORM::factory('formfields')->\n\t\t\twhere('form_id', '=', $id)->\n\t\t\torder_by('order')->\n\t\t\tfind_all();\n\t\t$this->template->content->formfields = $formfields;\n\t\t\n\t\tif($id == 0)\n\t\t{\n\t\t\t$js->current_cat_id = 0;\n\t\t\t$js->current_order = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$js->current_cat_id = $form->category_id;\n\t\t\t$js->current_order = $form->order;\n\t\t}\n\t\t\n\t\t//get the number of items per category\n\t\t$forms = ORM::factory('form')\n\t\t\t->order_by('category_id')\n\t\t\t->find_all();\n\t\t$cat_counts = array();\n\t\t$current_count = 0;\n\t\t$current_cat_id = 0;\n\t\tforeach($forms as $form)\n\t\t{\n\t\t\tif($current_cat_id == 0)\n\t\t\t{\n\t\t\t\t$current_cat_id = $form->category_id;\n\t\t\t}\n\t\t\t\n\t\t\tif( $current_cat_id != $form->category_id)\n\t\t\t{\n\t\t\t\t$cat_counts[$current_cat_id] = $current_count;\n\t\t\t\t$current_count = 0;\n\t\t\t\t$current_cat_id = $form->category_id;\n\t\t\t}\n\t\t\t$current_count++;\n\t\t}\n\t\t//catch the last category group\n\t\tif($current_cat_id != 0)\n\t\t{\n\t\t\t$cat_counts[$current_cat_id] = $current_count;\n\t\t}\n\t\t\n\t\t$js->cat_counts = json_encode($cat_counts);\n\t\t\n\t\t$this->template->content->data = $data;\n\t\t\n\t\t \n\t }",
"public function renderEditForm()\n {\n $content = '';\n $markerArray = array();\n $markerArray['###INFOS###'] = '';\n $markerArray['###ERRORS###'] = '';\n\n // init\n if ($this->uid == 0) {\n // insert mode\n $record = $this->getEmptyRecord($this->fields);\n // generate ts additionnal markers for display only\n $markerArray = array_merge($markerArray, tx_t3devapi_miscellaneous::convertToMarkerArray($this->checkMappingValues(array(), $this->pObj->conf['insertMappingMarkers'])));\n } else {\n // edit mode\n $whereCondition = '';\n if (!empty($this->pObj->conf['whereEdit'])) {\n $whereCondition = ' ' . str_replace(array_keys($this->pObj->feuserMarkers), array_values($this->pObj->feuserMarkers), $this->pObj->conf['whereEdit']);\n }\n $record = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord($this->table, $this->uid, $this->fields, $whereCondition);\n $this->currentRecord = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord($this->table, $this->uid, '*');\n if ($record === null) {\n return null;\n }\n // generate ts additionnal markers for display only\n $markerArray = array_merge($markerArray, tx_t3devapi_miscellaneous::convertToMarkerArray($this->checkMappingValues(array(), $this->pObj->conf['editMappingMarkers'])));\n }\n\n // if submit\n if (!empty($this->piVars['submit'])) {\n $datas = $this->getAllFormValues();\n // if no errors\n if (count($this->validation->getErrors()) === 0) {\n $datas = $this->formatAllFormValues($datas);\n if ($this->uid == 0) {\n $this->insertRecord($datas);\n } else {\n $this->updateRecord($datas);\n $record = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord($this->table, $this->uid, $this->fields);\n }\n } else {\n // TODO: remettre les files\n // fill all the fields with the current piVars\n $record = $this->getPiVarsRecord($this->fields);\n $record = $this->formatAllFormValues($record);\n }\n }\n\n // group fields by fieldset (--div--)\n if (!empty($this->pObj->conf['enableFieldset'])) {\n // get first tca types\n $tcaTypesFirst = each($this->tca['types']);\n $allFieldsWithFieldset = preg_split('/,\\s*(--div--\\s*;.*?),/', $tcaTypesFirst['value']['showitem'], 0, PREG_SPLIT_DELIM_CAPTURE);\n $recordWithFieldset = array();\n // generate all fields with fieldset\n $div = 'LLL:EXT:lang/locallang_core.php:labels.generalTab';\n foreach ($allFieldsWithFieldset as $fieldsWithFieldset) {\n if (stristr($fieldsWithFieldset, '--div--')) {\n $divLabel = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::trimExplode(';', $fieldsWithFieldset);\n $div = $divLabel[1];\n } else {\n $fields = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::trimExplode(',', $fieldsWithFieldset);\n foreach ($fields as $field) {\n if (array_key_exists($field, $record)) {\n $field = preg_replace('/;.*/', '', $field);\n $recordWithFieldset[$div][] = $field;\n }\n }\n }\n }\n foreach ($recordWithFieldset as $fieldset => $fields) {\n $content .= '<fieldset><legend>' . $GLOBALS['LANG']->sL($fieldset) . '</legend>';\n foreach ($fields as $field) {\n $val = $this->formatSpecialValueBeforeDisplay($field, $record[$field]);\n $content .= $this->getFieldFromTca($field, $val);\n $markerArray['###' . strtoupper($field) . '_VAL###'] = $val;\n }\n $content .= '</fieldset>';\n }\n } else {\n // classic rendering - generate all fields\n foreach ($record as $field => $val) {\n $val = $this->formatSpecialValueBeforeDisplay($field, $val);\n $content .= $this->getFieldFromTca($field, $val);\n $markerArray['###' . strtoupper($field) . '_VAL###'] = $val;\n }\n }\n\n // submit button\n $submit = tx_t3devapi_html::renderSubmit($this->getPrefix('submit'), $this->getLabel('submit'));\n $content .= tx_t3devapi_html::renderDiv($this->extKey . '_' . $this->pObj->cObj->data['uid'] . '_submit', $submit);\n\n // form wrap\n $content = tx_t3devapi_html::renderForm($this->formName, $content, array('action' => $this->actionUrl, 'enctype' => 'multipart/form-data', 'onsubmit' => $this->formName . 'Submit();'));\n\n // on submit JS (required for rtehtmlarea)\n $content = tx_t3devapi_html::renderScriptJs('function ' . $this->formName . 'Submit() { ' . $this->onSubmit . '}') . $content;\n\n if (!empty($this->piVars['submit'])) {\n if (count($this->validation->getErrors()) > 0) {\n // display errors\n $errorsList = $this->validation->getErrors();\n $errorsContent = '';\n $errorsContent .= '<div class=\"alert alert-error\">' . $this->getLabel('errors') . '<ul>';\n foreach ($errorsList as $error) {\n $errorsContent .= '<li>' . $error . '</li>';\n }\n $errorsContent .= '</ul></div>';\n $markerArray['###ERRORS###'] = $errorsContent;\n } else {\n // display infos\n $infosContent = '<div class=\"alert alert-success\">' . $this->getLabel('updateok') . '</div>';\n $markerArray['###INFOS###'] = $infosContent;\n }\n }\n if (!empty($this->piVars['insertok'])) {\n $infosContent = '<div class=\"alert alert-success\">' . $this->getLabel('updateok') . '</div>';\n $markerArray['###INFOS###'] = $infosContent;\n }\n\n // add js if needed\n $content .= $this->getAddjs();\n\n $markerArray['###FORM###'] = $content;\n\n return $markerArray;\n }",
"function createEditFormFields()\n\t{\n\t $insertValues = \"\";\n\t $table = Doctrine_Core::getTable($this->tableName)->getColumns();\n\t \n\t $output = '';\n\t foreach ($table as $fielname => $info)\n\t {\n\t if (strtolower($fielname) != 'id' && strtolower($fielname) != 'created_at' && strtolower($fielname) != 'updated_at')\n\t {\n\t $output .= \"<tr>\n\t <td width=\\\"100px\\\"><label>\".ucwords(str_replace('_',' ', $fielname)).\":</label></td>\n\t <td>\";\n\t if (strtolower($info['type']) == 'enum') {\n\t \t$varr = array();\n\t \tforeach ($info['values'] as $iv) {\n\t \t\t$varr[] = \"'\".$iv.\"' => '\".$iv.\"'\";\n\t \t}\n\t $output .=\"<?php echo \\$this->formSelect(\\\"\".$this->moduleNameVar.\"[\".$fielname.\"]\\\", \\$this->\".$this->moduleNameVar.\"['\".$fielname.\"'], array(), array(''=>'', \".implode(',', $varr).\")); ?>\";\n\t }else{\n\t $output .=\"<?php echo \\$this->formText(\\\"\".$this->moduleNameVar.\"[\".$fielname.\"]\\\", \\$this->\".$this->moduleNameVar.\"['\".$fielname.\"']); ?>\";\t\n\t }\n\t $output .=\"</td>\n\t </tr>\\r\\n\";\n\t }\n\t }\n\t \n\t $this->edit_form_fields = $output;\n\t}",
"function wpbs_action_edit_form()\n{\n // Verify for nonce\n if (empty($_POST['wpbs_token']) || !wp_verify_nonce($_POST['wpbs_token'], 'wpbs_edit_form')) {\n return;\n }\n\n $_POST = stripslashes_deep($_POST);\n\n if (empty($_POST['form_id'])) {\n\n wpbs_admin_notices()->register_notice('form_update_failed', '<p>' . __('Something went wrong. Could not update the form.', 'wp-booking-system') . '</p>', 'error');\n wpbs_admin_notices()->display_notice('form_update_failed');\n\n return;\n\n }\n\n $settings = get_option('wpbs_settings', array());\n $active_languages = (!empty($settings['active_languages']) ? $settings['active_languages'] : array());\n\n /**\n * Prepare variables\n *\n */\n $form_id = absint($_POST['form_id']);\n $form_name = sanitize_text_field($_POST['form_name']);\n\n \n\n if (!empty($_POST['form_fields'])) {\n $form_fields = $_POST['form_fields'];\n $form_fields = stripslashes_deep($form_fields);\n\n foreach ($form_fields as &$form_field) {\n if ($form_field['type'] == 'html') {\n $form_field = _wpbs_array_wp_kses_post($form_field);\n $form_field = _wpbs_array_esc_attr_textarea_field($form_field);\n } else {\n $form_field = _wpbs_array_sanitize_text_field($form_field);\n $form_field = _wpbs_array_esc_attr_text_field($form_field);\n }\n }\n\n $form_fields = array_values($form_fields);\n\n } else {\n $form_fields = array();\n }\n\n /**\n * Handle form object data\n *\n */\n\n // Get form\n $form = wpbs_get_form($form_id);\n\n // Update form\n $update_data = array(\n 'name' => (!empty($form_name) ? $form_name : $form->get('name')),\n 'date_modified' => current_time('Y-m-d H:i:s'),\n 'fields' => $form_fields,\n );\n\n wpbs_update_form($form_id, $update_data);\n\n /**\n * Handle form meta\n *\n */\n\n // Form Fields ID Index\n wpbs_update_form_meta($form_id, 'wpbs_form_field_id_index', absint($_POST['wpbs_form_field_id_index']));\n\n // Form Meta Fields\n $meta_fields = array(\n // Form Options\n 'submit_button_label' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n 'tracking_script' => array('translations' => false, 'sanitization' => 'sanitize_textarea_field'),\n 'autofill_event_description' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'autofill_event_tooltip' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n\n // Payment Options\n 'multiplication_field' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'product_name' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n 'bt_instructions' => array('translations' => true, 'sanitization' => 'wp_kses_post'),\n \n // Admin Notification\n 'admin_notification_enable' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_send_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_send_to_cc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_send_to_bcc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_from_name' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_from_email' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_reply_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_subject' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'admin_notification_message' => array('translations' => false, 'sanitization' => 'wp_kses_post'),\n \n // User Notification\n 'user_notification_enable' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_send_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_send_to_cc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_send_to_bcc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_from_name' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_from_email' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_reply_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_subject' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n 'user_notification_message' => array('translations' => true, 'sanitization' => 'wp_kses_post'),\n \n // Payment Reminder Notification\n 'payment_notification_enable' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_when_to_send' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_send_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_send_to_cc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_send_to_bcc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_from_name' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_from_email' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_reply_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_subject' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n 'payment_notification_message' => array('translations' => true, 'sanitization' => 'wp_kses_post'),\n\n // Payment Success Notification\n 'payment_success_notification_enable' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_send_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_send_to_cc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_send_to_bcc' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_from_name' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_from_email' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_reply_to' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_subject' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n 'payment_success_notification_message' => array('translations' => true, 'sanitization' => 'wp_kses_post'),\n\n // Form Confirmation\n 'form_confirmation_type' => array('translations' => false, 'sanitization' => 'sanitize_text_field'),\n 'form_confirmation_message' => array('translations' => true, 'sanitization' => 'wp_kses_post'),\n 'form_confirmation_redirect_url' => array('translations' => true, 'sanitization' => 'sanitize_text_field'),\n );\n\n $meta_fields = apply_filters('wpbs_edit_forms_meta_fields', $meta_fields);\n\n // Add in strings\n foreach(wpbs_form_default_strings() as $key => $default){\n $meta_fields['form_strings_' . $key] = array('translations' => true, 'sanitization' => 'sanitize_text_field');\n }\n\n foreach ($meta_fields as $meta_field => $options) {\n if (!empty($_POST[$meta_field])) {\n wpbs_update_form_meta($form_id, $meta_field, $options['sanitization']($_POST[$meta_field]));\n } else {\n wpbs_delete_form_meta($form_id, $meta_field);\n }\n\n if ($options['translations'] == true) {\n foreach ($active_languages as $code) {\n\n if (!empty($_POST[$meta_field . '_translation_' . $code])) {\n wpbs_update_form_meta($form_id, $meta_field . '_translation_' . $code, $options['sanitization']($_POST[$meta_field . '_translation_' . $code]));\n } else {\n wpbs_delete_form_meta($form_id, $meta_field . '_translation_' . $code);\n }\n\n }\n }\n }\n\n /**\n * Action hook to save extra form form data\n *\n * @param array $_POST\n *\n */\n do_action('wpbs_save_form_data', $_POST);\n\n /**\n * Success redirect\n *\n */\n if(isset($_POST['_wp_http_referer'])){\n wp_redirect( add_query_arg(array('wpbs_message' => 'form_edit_success'), $_POST['_wp_http_referer']) );\n exit;\n }\n \n wp_redirect(add_query_arg(array('page' => 'wpbs-forms', 'subpage' => 'edit-form', 'form_id' => $form_id, 'wpbs_message' => 'form_edit_success'), admin_url('admin.php')));\n exit;\n\n}",
"private function modify() {\r\n\t\t$this->verifyAction('modify');\r\n\t\t$id=$this->getId();\r\n\t\tglobal $db;\r\n\t\t$viewSql='select * from '.$this->tableName.' where '.$this->idField.' = ?';\r\n\t\terror($row = $db->getRow($viewSql,array($id),DB_FETCHMODE_ASSOC));\r\n//\t\t\t\tdebug($row);\r\n\t\techo '<a href=\"?do=show\">返回</a> ';\r\n\t\techo '<a href=\"?do=view&'.$this->idField.'='.$id.'\">取消</a>';\r\n\t\techo '<form method=\"post\" enctype=\"multipart/form-data\" action=\"?do=update&'.$this->idField.'='.$id.'\" onsubmit=\"return checkForm(this);\"><table class=\"grid\"><tr><th><nobr>域名</nobr></th><th><nobr>域值</nobr></th></tr>';\r\n\t\t//\t\tdebug($this->insertFields);\r\n\t\t//\t\tdebug($this->areaFields);\r\n\t\techo '<tr><td>'.$this->getFieldTitle($this->idField).'</td><td>'.$id.'</td></tr>';\r\n\t\tforeach($this->updateFields as $fieldName) {\r\n\t\t\tif ($fieldName==$this->idField) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\techo '<tr><td><nobr>'.$this->getFieldTitle($fieldName);\r\n\t\t\tif (in_array($fieldName,$this->notNullFields)&&(!array_key_exists($fieldName,$this->imageFields))) {\r\n\t\t\t\techo '<span style=\"color:red\">*</span></nobr>';\r\n\t\t\t}\r\n\t\t\techo '</td><td>';\r\n\t\t\tif (in_array($fieldName, $this->richFields)) {\r\n\t\t\t\t// 处理富文本类型域,使用FCKEditor,因为global.php中decode,需要decode\r\n\t\t\t\techo '<textarea name=\"'.$fieldName.'\">'.$row[$fieldName].'</textarea>';\r\n\t\t\t\techo<<<EOT\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t$(document).ready(function () {\r\n\t\t\t\t\t\t\tvar oFCKeditor = new FCKeditor(\"$fieldName\");\r\n\t\t\t\t\t\t\toFCKeditor.ToolbarSet = 'Simple';\r\n\t\t\t\t\t\t\toFCKeditor.BasePath = \"/admin/fckeditor/\";\r\n\t\t\t\t\t\t\toFCKeditor.Height = \"330\";\r\n\t\t\t\t\t\t\toFCKeditor.ReplaceTextarea();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t</script>\r\n\t\t\t\t\t\r\nEOT;\r\n\t\t\t} else if (in_array($fieldName, $this->areaFields)) {\r\n\t\t\t\t// 处理textarea类型域\r\n\t\t\t\techo '<textarea name=\"'.$fieldName.'\"';\r\n\t\t\t\tif (in_array($fieldName, $this->readonlyFields)) {\r\n\t\t\t\t\techo ' readonly';\r\n\t\t\t\t}\r\n\t\t\t\techo '>'.$row[$fieldName].'</textarea>';\r\n\t\t\t} else if (array_key_exists($fieldName, $this->listFields)) {\r\n\t\t\t\t// 处理列表类型域\r\n\t\t\t\tif (in_array($fieldName, $this->readonlyFields)) {\r\n\t\t\t\t\t$listField=$this->listFields[$fieldName];\r\n\t\t\t\t\techo $listField[$row[$fieldName]];\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo '<select name=\"'.$fieldName.'\">';\r\n\t\t\t\t\techo '<option value=\"\">请选择</option>';\r\n\t\t\t\t\tforeach ($this->listFields[$fieldName] as $key=>$value) {\r\n\t\t\t\t\t\techo '<option value=\"'.$key.'\"';\r\n\t\t\t\t\t\tif ($key==$row[$fieldName]) {\r\n\t\t\t\t\t\t\techo ' selected';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\techo '>'.$this->listFields[$fieldName][$key].'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\techo '</select>';\r\n\t\t\t\t}\r\n\t\t\t} else if (array_key_exists($fieldName, $this->refFields)) {\r\n\t\t\t\t// 处理外键类型域\r\n\t\t\t\terror($refRs=$db->getAssoc($this->refFields[$fieldName]));\r\n\t\t\t\tif (in_array($fieldName, $this->readonlyFields)) {\r\n\t\t\t\t\techo $refRs[$row[$fieldName]];\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo '<select name=\"'.$fieldName.'\">';\r\n\t\t\t\t\tforeach($refRs as $key=>$value) {\r\n\t\t\t\t\t\techo '<option value=\"'.$key.'\"';\r\n\t\t\t\t\t\tif ($key==$row[$fieldName]) {\r\n\t\t\t\t\t\t\techo ' selected';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\techo '>'.$value.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\techo '</select>';\r\n\t\t\t\t}\r\n\t\t\t} else if (array_key_exists($fieldName, $this->imageFields)) {\r\n\t\t\t\t// 处理图形类型域\r\n\t\t\t\tif (!in_array($fieldName, $this->readonlyFields)) {\r\n\t\t\t\t\techo '<input name=\"'.$fieldName.'\" type=\"file\" size=\"62\">';\r\n\t\t\t\t}\r\n\t\t\t\t$value=$row[$fieldName];\r\n\t\t\t\tif (!empty($value)){\r\n\t\t\t\t\t$imageField = $this->imageFields[$fieldName];\r\n\t\t\t\t\techo '<br><img src=\"/upload/'.$imageField['upload'].'/full/'.$value.'\">';\r\n\t\t\t\t}\r\n\t\t\t} else if (array_key_exists($fieldName, $this->multiChoiceFields)) {\r\n\t\t\t\t// 处理多选域\r\n\t\t\t\t$choices=explode(',',$row[$fieldName]);\r\n\t\t\t\tforeach($this->multiChoiceFields[$fieldName] as $key=>$value) {\r\n\t\t\t\t\techo '<input id=\"'.$fieldName.'_'.$key.'\" type=\"checkbox\" name=\"'.$fieldName.'[]\" value=\"'.$key.'\"';\r\n\t\t\t\t\tif (in_array($key, $choices)) {\r\n\t\t\t\t\t\techo ' checked';\r\n\t\t\t\t\t}\r\n\t\t\t\t\techo '>';\r\n\t\t\t\t\techo '<label for=\"'.$fieldName.'_'.$key.'\">'.$value.'</label> ';\r\n\t\t\t\t}\r\n\t\t\t} else if (array_key_exists($fieldName, $this->pwdFields)) {\r\n\t\t\t\t// 处理密码域\r\n\t\t\t\techo '新 密 码:<input name=\"'.$fieldName.'\" type=\"password\"><br />';\r\n\t\t\t\techo '重复新密码:<input name=\"'.$fieldName.'_repeat\" type=\"password\">';\r\n\t\t\t} else {\r\n//\t\t\t\tdebug($row);\r\n\t\t\t\techo '<input name=\"'.$fieldName.'\" value=\"'.$row[$fieldName].'\"';\r\n\t\t\t\tif (in_array($fieldName, $this->readonlyFields)) {\r\n\t\t\t\t\techo ' readonly';\r\n\t\t\t\t}\r\n\t\t\t\tif (array_key_exists($fieldName,$this->fieldLens)) {\r\n\t\t\t\t\techo 'maxlength='.$this->fieldLens[$fieldName];\r\n\t\t\t\t}\r\n\t\t\t\tif (in_array($fieldName, $this->dateFields)) {\r\n\t\t\t\t\techo ' readonly class=\"inputdate\"';\r\n\t\t\t\t}\r\n\t\t\t\techo '>';\r\n\t\t\t}\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\techo '</table>';\r\n\t\techo '<input type=\"submit\" value=\"更新记录\" name=\"submit\"></form>';\r\n\t\techo '</form>';\r\n\t\t$this->echoValidateJs($this->updateFields);\r\n\t}",
"protected function _prepareForm()\n {\n $helper = Mage::helper('oggetto_faq');\n $model = $this->getCurrentQuestionsModel();\n\n $form = new Varien_Data_Form([\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', [\n 'id' => $this->getRequest()->getParam('id')\n ]),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ]);\n\n $this->setForm($form);\n\n\n $fieldset = $form->addFieldset('edit_form', ['legend' => $helper->__('Questions Information')]);\n\n $fieldset->addField('name', 'label', [\n 'label' => $helper->__('User name'),\n 'name' => 'name',\n ]);\n $fieldset->addField('email', 'label', [\n 'label' => $helper->__('User email'),\n 'name' => 'email',\n ]);\n $fieldset->addField('question_text', 'editor', [\n 'label' => $helper->__('Question text'),\n 'name' => 'question_text',\n ]);\n $fieldset->addField('answer_text', 'editor', [\n 'label' => $helper->__('Answer text'),\n 'name' => 'answer_text',\n ]);\n $fieldset->addField('created_at', 'label', [\n 'label' => $helper->__('Created'),\n 'name' => 'created_at',\n ]);\n $fieldset->addField('with_feedback', 'label', [\n 'label' => $helper->__('With feedback'),\n 'name' => 'with_feedback',\n ]);\n $fieldset->addField('was_notified', 'label', [\n 'label' => $helper->__('Was notified to user'),\n 'name' => 'was_notified',\n ]);\n\n $form->setUseContainer(true);\n\n $form->setValues($model->getData());\n\n return parent::_prepareForm();\n }",
"protected function createComponentEditArticleForm() {\n\t\t$article = $this->article;\n\n\t\t$form = new Form;\n\t\t$form->addText(\"title\", \"Název článku\", 50)\n\t\t\t->setRequired(\"Vložte prosím název článku.\")\n\t\t\t->addRule(Form::MAX_LENGTH, \"Název článku je příliš dlouhý. Maximální délka je %d znaků.\", 50)\n\t\t\t->setValue($article->title);\n\n\t\t$form->addTextArea(\"perex\", \"Perex\")\n\t\t\t->setRequired(\"Vložte prosím perex.\")\n\t\t\t->addRule(Form::MAX_LENGTH, \"Perex je příliš dlouhý. Maximální délka je %d znaků.\", 500)\n\t\t\t->setAttribute(\"cols\", self::PEREX_TEXTAREA_COLS)\n\t\t\t->setAttribute(\"rows\", self::PEREX_TEXTAREA_ROWS)\n\t\t\t->setValue($article->perex);\n\n\t\t$form->addCheckBox(\"social\", \"Zobrazit u tohoto článku tlačítka sociálních sítí\")\n\t\t\t->setValue($article->social);\n\n\t\t$form->addCheckBox(\"comments\", \"Povolit u tohoto článku zobrazení starých a přidávání nových komentářů\")\n\t\t\t->setValue($article->comments);\n\n\t\t$form->addSelect(\"poll\", \"Anketa\", $this->polls->findAllPollsAsArray())\n\t\t\t->setPrompt(\"Vyberte anketu\")\n\t\t\t->setValue($article->id_poll);\n\n\t\t$form->addTextArea(\"text\")\n\t\t\t->setRequired(false)\n\t\t\t->addRule(Form::MAX_LENGTH, \"Text je příliš dlouhý. Maximální délka je 20 000 znaků.\", 20000)\n\t\t\t->setAttribute(\"cols\", self::TEXT_TEXTAREA_COLS)\n\t\t\t->setAttribute(\"rows\", self::TEXT_TEXTAREA_ROWS)\n\t\t\t->setAttribute(\"class\", \"tinymce\")\n\t\t\t->setValue($article->text);\n\n\t\t$this->formUtils->recoverData($form);\n\t\t$this->formUtils->manageUidToken($form, $this->editTokenName);\n\n\t\tif ($article->draft == 1) {\n\t\t\t$form->addSubmit(\"publish_now\", \"Hned zveřejnit\")\n\t\t\t\t->onClick[] = [$this, \"saveAndPublishDraft\"];\n\n\t\t\t$form->addSubmit(\"save_on_time\", \"Určit datum vydání\")\n\t\t\t\t->onClick[] = [$this, \"saveArticleWithTime\"];\n\n\t\t\t$form->addSubmit(\"save_draft\", \"Uložit do rozepsaných\")\n\t\t\t\t->onClick[] = [$this, \"saveDraft\"];\n\n\t\t\t$form->addSubmit(\"save_n_continue\", \"Uložit a psát dál\")\n\t\t\t\t->setAttribute(\"class\", \"ajax\")\n\t\t\t\t->onClick[] = [$this, \"saveAndContinue\"];\n\t\t} else {\n\t\t\t$form->addSubmit(\"save\", \"Uložit\")\n\t\t\t\t->onClick[] = [$this, \"saveArticle\"];\n\n\t\t\t$form->addSubmit(\"save_n_continue\", \"Uložit a psát dál\")\n\t\t\t\t->setAttribute(\"class\", \"ajax\")\n\t\t\t\t->onClick[] = [$this, \"saveAndContinue\"];\n\t\t}\n\n\t\t$this->formUtils->addFormProtection($form);\n\t\t$this->formUtils->makeBootstrapForm($form);\n\t\treturn $form;\n\t}",
"protected function createComponentTaskEditForm()\n\t{\n\t\t// $projects = $this->projectRepository->findAll()->fetchPairs('id', 'text');\n\n\t\t$form = new Form();\n\t\t$form->addHidden('id');\n\t\t$form->addText('text', 'Názov úlohy:', 30, 20)\n\t\t\t->addRule(Form::FILLED, 'Je nutné zadať názov úlohy.');\n\t\t$form->addTextArea('desc', 'Popis úlohy:', 75, 13)\n\t\t\t->addRule(Form::FILLED, 'Je nutné zadať názov úlohy.');\n\t\t/* $form->addSelect('project', 'Projekt: ', $projects)\n\t\t ->setPrompt('Zvolte projekt')\n\t\t ->addRule(Form::FILLED, 'Musite zadat projekt.'); */\n\t\t/* $form->addSelect('solver', 'Riešiteľ: ', $users)\n\t\t\t\t\t->setPrompt('Zvolte riešiteľa')\n\t\t\t\t\t->addRule(Form::FILLED, 'Musíte zadať riešiteľa.');*/\n\t\t$form->addDatePicker('created', 'Riešenie od:')\n\t\t\t->setAttribute('class', 'created')\n\t\t\t->addRule(Form::VALID, 'Vložený dátum je neplatný!');\n\t\t$form->addDatePicker('submitted', 'Riešenie do:')\n\t\t\t->setAttribute('class', 'submitted')\n\t\t\t->addRule(Form::VALID, 'Vložený dátum je neplatný!');\n\t\t$form->addText('numfiles', 'Počet výstupov:')\n\t\t\t->setType('number')\n\t\t\t->addRule(Form::RANGE, 'Počet musí byť od %d do %d', array(0, 10))\n\t\t\t->addRule(Form::FILLED, 'Je nutné zadať počet výstupov.');\n\t\t$form->addSubmit('set', 'Upraviť');\n\t\t$form->onSuccess[] = $this->TaskEditFormSubmitted;\n\n\t\treturn $form;\n\t}",
"public function edit() {\n\t\tif (! $this->table_id) {\n\t\t\t$this->ctrl->redirectByClass(\"ildatacollectionfieldeditgui\", \"listFields\");\n\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->table = ilDataCollectionCache::getTableCache($this->table_id);\n\t\t}\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t}",
"public function injectTranslationForForm()\n {\n // Make all translations available for our form\n $trans = [];\n foreach ($this->getUsedLocales() as $locale) {\n $trans[$locale] = $this->getTranslation($locale)->toArray();\n }\n $this->trans = $trans;\n }",
"function _edit($options = array()){\n\t\t$options += array(\n\t\t\t\"page_title\" => \"\",\n\t\t\t\"object\" => null,\n\t\t\t\"flash_message\" => _(\"Změny byly uloženy\"),\n\t\t\t\"redirect_to\" => null,\n\t\t\t\"has_iobjects\" => false,\n\t\t\t\"has_image_gallery\" => false,\n\t\t\t\"has_attachments\" => false,\n\t\t\t\"set_initial_closure\" => null, // function($form,$object){...}\n\t\t\t\"update_closure\" => null, // function($object,$d)\n\t\t\t\"skip_update_when_no_data_changes\" => false,\n\t\t\t\"skip_is_editable_check\" => false,\n\n\t\t\t\"flash_on_update_closure\" => null, // function($flash){ $flash->success(\"Changes have been saved!\"); }\n\t\t\t\"flash_on_no_data_changes_closure\" => null, // function($flash->notice(\"Nothing needs to be saved.\"); )\n\n\t\t\t\"show_flash_notice_when_no_data_changes\" => true,\n\t\t);\n\n\t\t$options += array(\n\t\t\t\"save_return_uri\" => !$options[\"redirect_to\"]\n\t\t);\n\n\t\t$object = $options[\"object\"];\n\t\tif(!$this->__prepare_object_for_action($object)){\n\t\t\treturn;\n\t\t}\n\n\t\tif(!$options[\"skip_is_editable_check\"] && method_exists($object,\"isEditable\") && !$object->isEditable()){\n\t\t\treturn $this->_execute_action(\"error404\");\n\t\t}\n\n\t\t$this->tpl_data[\"object\"] = $object;\n\t\t$this->tpl_data[\"has_iobjects\"] = $options[\"has_iobjects\"];\n\t\t$this->tpl_data[\"has_image_gallery\"] = $options[\"has_image_gallery\"];\n\t\t$this->tpl_data[\"has_attachments\"] = $options[\"has_attachments\"];\n\n\t\tif(!$options[\"page_title\"]){\n\t\t\t$options[\"page_title\"] = sprintf(_(\"Editace objektu typu %s\"),get_class($object));\n\t\t}\n\n\t\t$this->page_title = $options[\"page_title\"];\n\n\t\t$this->__set_template_name_for_action();\n\n\t\tif($options[\"set_initial_closure\"]){\n\t\t\t$fn = $options[\"set_initial_closure\"];\n\t\t\t$fn($this->form,$object);\n\t\t}else{\n\t\t\t$this->form->set_initial($object);\n\t\t}\n\t\t$options[\"save_return_uri\"] && $this->_save_return_uri();\n\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\t$skip_update = false;\n\n\t\t\tif($options[\"skip_update_when_no_data_changes\"]){\n\t\t\t\t$deobjectivice = function($ary){\n\t\t\t\t\treturn array_map(function($item){\n\t\t\t\t\t\tif(is_object($item)){\n\t\t\t\t\t\t\t$item = method_exists($item,\"getId\") ? $item->getId() : (string)$item;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $item;\n\t\t\t\t\t},$ary);\n\t\t\t\t};\n\t\t\t\tif($deobjectivice($d)==$deobjectivice($this->form->get_initial())){\n\t\t\t\t\t$skip_update = true;\n\n\t\t\t\t\tif(is_callable($options[\"flash_on_no_data_changes_closure\"])){\n\t\t\t\t\t\t$fn = $options[\"flash_on_no_data_changes_closure\"];\n\t\t\t\t\t\t$fn($this->flash);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->flash->notice(_(\"Ve formuláři nebylo nic změněno\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!$skip_update){\n\t\t\t\tif($options[\"update_closure\"]){\n\t\t\t\t\t$fn = $options[\"update_closure\"];\n\t\t\t\t\t$fn($object,$d);\n\t\t\t\t}else{\n\t\t\t\t\t$object->s($d);\n\t\t\t\t}\n\n\t\t\t\tif($this->form->has_errors()){\n\t\t\t\t\t// chyba muze byt nastavena v $options[\"update_closure\"]\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif(is_callable($options[\"flash_on_update_closure\"])){\n\t\t\t\t\t$fn = $options[\"flash_on_update_closure\"];\n\t\t\t\t\t$fn($this->flash);\n\t\t\t\t}else{\n\t\t\t\t\t$this->flash->success($options[\"flash_message\"]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($options[\"redirect_to\"]){\n\t\t\t\tif(is_callable($options[\"redirect_to\"])){\n\t\t\t\t\t$fn = $options[\"redirect_to\"];\n\t\t\t\t\t$options[\"redirect_to\"] = $fn($object);\n\t\t\t\t}\n\t\t\t\t$this->_redirect_to($options[\"redirect_to\"]);\n\t\t\t}else{\n\t\t\t\t$this->_redirect_back();\n\t\t\t}\n\t\t}\n\t}",
"public function loadEditFormAction()\r\n {\r\n $this->init();\r\n $block = $this->getBlockDataById();\r\n if (!$block || !$this->order) {\r\n return $this;\r\n }\r\n\r\n if (empty($this->pendingChanges)) {\r\n if (Mage::getModel('tax/config')->shippingPriceIncludesTax()) {\r\n Mage::getSingleton('adminhtml/session_quote')\r\n ->setData('base_shipping_custom_price', $this->order->getBaseShippingInclTax());\r\n } else {\r\n Mage::getSingleton('adminhtml/session_quote')\r\n ->setData('base_shipping_custom_price', $this->order->getBaseShippingAmount());\r\n }\r\n $this->removeTempQuoteItems();\r\n }\r\n\r\n /** @var Mage_Core_Block_Abstract $form */\r\n $form = $this->getLayout()->createBlock($block['block']);\r\n $form->addData(array('quote' => $this->quote, 'order' => $this->order));\r\n\r\n $buttons = $this->getLayout()->createBlock('core/template')\r\n ->setTemplate('mageworx/ordersedit/edit/buttons.phtml');\r\n\r\n // Render messages block\r\n $errors = $this->getLayout()->createBlock('adminhtml/messages')\r\n ->setMessages(Mage::getSingleton('adminhtml/session')->getMessages(true))\r\n ->getGroupedHtml();\r\n $html = $errors . $form->toHtml() . $buttons->toHtml();\r\n $html = str_replace('var VatParameters', 'VatParameters', $html);\r\n $this->getResponse()->setBody($html);\r\n\r\n return $this;\r\n }",
"function getEditFormAdmin()\n {\n \t$elements = array();\n \t$dirname = basename(dirname(__DIR__));\n \trequire_once dirname(__DIR__) . DIRECTORY_SEPERATOR . 'include' . DIRECTORY_SEPERATOR . 'formloader.php';\n \t \n \t$elements['code'] = new XoopsFormText(_AM_PLEASE_EDITFORM_DEPARTMENT_CODE_TITLE, 'code', 4, 3, $this->getVar('code'));\n \t$elements['code']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_CODE_DESC);\n \t$elements['name'] = new XoopsFormText(_AM_PLEASE_EDITFORM_DEPARTMENT_NAME_TITLE, 'name', 28, 128, $this->getVar('name'));\n \t$elements['name']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_NAME_DESC);\n \t$elements['description'] = new XoopsFormTextArea(_AM_PLEASE_EDITFORM_DEPARTMENT_DESCRIPTION_TITLE, 'description', $this->getVar('description'), 28, 8);\n \t$elements['description']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_DESCRIPTION_DESC);\n \t$elements['mantis'] = new PleaseFormSelectEnumerator(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTIS_TITLE, 'mantis', basename(__FILE__), 'mantis', (string)$this->getVar('mantis'));\n \t$elements['mantis']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTIS_DESC);\n \t$elements['mantis-uri'] = new XoopsFormText(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISURI_TITLE, 'mantis-uri', 28, 350, $this->getVar('mantis-uri'));\n \t$elements['mantis-uri']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISURI_DESC);\n \t$elements['mantis-username'] = new XoopsFormText(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISUSERNAME_TITLE, 'mantis-username', 28, 45, $this->getVar('mantis-username'));\n \t$elements['mantis-username']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISUSERNAME_DESC);\n \t$elements['mantis-password'] = new XoopsFormPassword(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISPASSWORD_TITLE, 'mantis-password', 28, 198, $this->getVar('mantis-password'));\n \t$elements['mantis-password']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANTISPASSWORD_DESC);\n \t$elements['signature'] = new XoopsFormDhtmlTextArea(_AM_PLEASE_EDITFORM_DEPARTMENT_SIGNATURE_TITLE, 'signature', $this->getVar('signature'), 28, 8);\n \t$elements['signature']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_SIGNATURE_DESC);\n \t$elements['manager-uid'] = new XoopsFormSelectUser(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERUID_TITLE, 'manager-uid', true, $this->getVar('manager-uid'));\n \t$elements['manager-uid']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERUID_DESC);\n \t$elements['manager-bcc'] = new PleaseFormSelectEnumerator(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERBCC_TITLE, 'mantis', basename(__FILE__), 'manager-bcc', (string)$this->getVar('manager-bcc'));\n \t$elements['manager-bcc']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERBCC_DESC);\n \t$elements['manager-mantis-username'] = new XoopsFormText(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERMANTISUSERNAME_TITLE, 'mantis-username', 28, 45, $this->getVar('manager-mantis-username'));\n \t$elements['manager-mantis-username']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERMANTISUSERNAME_DESC);\n \t$elements['manager-mantis-password'] = new XoopsFormPassword(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERMANTISPASSWORD_TITLE, 'mantis-password', 28, 198, $this->getVar('manager-mantis-password'));\n \t$elements['manager-mantis-password']->setDescription(_AM_PLEASE_EDITFORM_DEPARTMENT_MANAGERMANTISPASSWORD_DESC);\n \t$elements['id'] = new XoopsFormHidden('id', $this->getMD5('id'));\n \t$elements['submit'] = new XoopsFormButton('', 'submit', _SUBMIT);\n \n \t \n \t$form = new XoopsThemeForm(_AM_PLEASE_ADMIN_DEPARTMENTS_EDITFORM_TITLE, 'edit-department', XOOPS_URL . '/modules/' . $dirname . '/admin/post.php?op=edit-department', 'post', true);\n \tforeach($elements as $key => $obj)\n \t{\n \t\tif (in_array($key, array('code', 'name', 'description')))\n \t\t\t$form->addElement($elements[$key], true);\n \t\telse\n \t\t\t$form->addElement($elements[$key], false);\n \t}\n \t \n \treturn $form->render();\n }",
"public function editTextAction() {\n $aGetData = $this->getRequest()->getQuery();\n $id = $aGetData['id'];\n\n /*\n * Verifico si me llega un ID por POST\n */\n if (!$id) {\n $aPostData = $this->getRequest()->getPost();\n $id = $aPostData['id'];\n }\n\n /*\n * En el caso de que este el ID, busco el registro en la DB\n * En el caso que ID este null, creo un nuevo objeto\n */\n if ($id) {\n $object = $this->getEntityManager()->getRepository('Iem\\Entity\\Text')->find($id);\n $new = false;\n } else {\n $object = new \\Iem\\Entity\\Text();\n $new = true;\n }\n\n /*\n * Declar el Formulario\n * Defino el Hidratador de Doctrine\n * Hago el Bind entre el Formulario y el objeto\n */\n $form = new \\Iem\\Form\\Text($this->getEntityManager());\n $form->setHydrator(new \\DoctrineModule\\Stdlib\\Hydrator\\DoctrineObject($this->getEntityManager()));\n $form->bind($object);\n\n /*\n * Verifico el Post, valido formulario y persisto en caso positivo\n */\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n\n $form->setInputFilter($object->getInputFilter());\n if ($form->isValid()) {\n\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n $user = $this->zfcUserAuthentication()->getIdentity();\n }\n\n if ($new) {\n $object->setCreatedBy($user);\n $object->setLastUpdatedBy($user);\n } else {\n $object->setLastUpdatedBy($user);\n }\n\n\n $this->getEntityManager()->persist($object);\n $this->getEntityManager()->flush();\n $form->bind($object);\n $persist = true;\n } else {\n $persist = false;\n }\n }\n\n /*\n * Paso la variable persist a la view\n * Defino terminal true para no renderizar el layout (ajax)\n */\n $view = new ViewModel(array('form' => $form,\n 'persist' => $persist));\n $view->setTerminal(true);\n return $view;\n }",
"public function edit($id = NULL){\n\t if($id)\n {\n $this->data['news'] = $this->static_text_model->get_lang($id, FALSE, $this->data['content_language_id']);\n\t\t\t$this->data['title'] = 'Edit | '.$this->data['settings']['site_name'];\n\t\t\t$this->data['name'] = 'Edit \"'.$this->data['news']->name.'\"';\n count($this->data['news']) || $this->data['errors'][] = 'User could not be found'; \n/*\t\t\techo '<pre>';\n\t\t\tprint_r($this->data['news']);\n\t\t\tdie;*/\n }\n else{\n $this->data['news'] = $this->static_text_model->get_new();\n\t\t\t//redirect($this->data['admin_link'].$this->_redirect);\n }\n \n\n \n\t\t// Pages for dropdown\n $this->data['page_languages'] = $this->language_model->get_form_dropdown('language');\n $this->data['templates_page'] = $this->static_text_model->get_templates('page_');\n \n // Fetch all files by repository_id\n // Set up the form\n $rules = $this->static_text_model->rules;\n $this->form_validation->set_rules($this->static_text_model->get_all_rules());\n\n // Process the form\n if($this->form_validation->run() == TRUE){ \n if($id == NULL)$data['order'] = $this->static_text_model->max_order()+1;\n $data_lang = $this->static_text_model->array_from_post($this->static_text_model->get_lang_post_fields());\n if($id == NULL){\n $data['created'] = time();\n $data['modified'] = time();\n\t\t\t}\n\t\t\telse{\n $data['modified'] = time();\n\t\t\t}\n\n $id = $this->static_text_model->save_with_lang($data, $data_lang, $id);\n redirect($this->data['admin_link'].$this->_redirect.'/edit/'.$id);\n // redirect($this->_redirect.'/edit/');\n }\n \n // Load the view\n\t\t$this->data['subview'] = $this->_subView.'edit';\n $this->load->view('admin/_layout_main', $this->data);\n\t}",
"function argentinagobar_bloques_campo_edit_form($form, &$form_state) {\n\n $form['campo'] = array(\n '#type' => 'select',\n '#title' => t('Campo'),\n '#required' => TRUE,\n '#options' => array(\n 'costo' => t('Costo de trámite'),\n 'requisitos' => t('Requisitos de trámite'),\n 'tipo_tramite' => t('Tipo de trámite'),\n 'categoria_noticia' => t('Categoría de noticia'),\n 'siglas_area' => t('Siglas de Área'),\n 'tags' => t('Tags'),\n 'links_relacionados' => t('Links relacionados'),\n 'paginas_relacionadas' => t('Páginas relacionadas'),\n 'archivos' => t('Archivos'),\n 'creditos' => t('Créditos'),\n 'download' => t('Descarga'),\n 'store' => t('Descarga de aplicaciones'),\n 'audio' => t('Audios'),\n 'vigencia' => t('Vigencia'),\n 'acciones' => t('Acciones'),\n 'servicios_relacionados' => t('Servicios Relacionados')\n ),\n '#default_value' => $form_state['conf']['campo'],\n '#description' => t('Campo a mostrar'),\n );\n \n return $form;\n}",
"function initializeQuestionEditForm() {\n if (!(isset($this->dialogQuestion) && is_object($this->dialogQuestion))) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n if (@$this->params['cmd'] != 'add_question') {\n $data = $this->question;\n $hidden = array(\n 'cmd' => 'edit_question',\n 'save' => 1,\n 'group_id' => $this->params['group_id'],\n 'question_id' => $this->params['question_id']\n );\n $btnCaption = 'Edit';\n } else {\n $data = array();\n $hidden = array(\n 'cmd' => 'create_question',\n 'save' => 1,\n 'group_id' => $this->params['group_id']\n );\n $btnCaption = 'Save';\n }\n $fields = array(\n 'question_title' => array('Title', 'isNoHTML', TRUE, 'input', 250),\n 'question_text' => array('Text', 'isSomeText', FALSE, 'simplerichtext', 12),\n 'question_link' => array('Link', 'isSomeText', FALSE, 'simplerichtext', 4)\n );\n $this->dialogQuestion = new base_dialog(\n $this, $this->paramName, $fields, $data, $hidden\n );\n $this->dialogQuestion->msgs = &$this->msgs;\n $this->dialogQuestion->loadParams();\n $this->dialogQuestion->baseLink = $this->baseLink;\n $this->dialogQuestion->dialogTitle =\n papaya_strings::escapeHtmlChars($this->_gt('Properties'));\n $this->dialogQuestion->buttonTitle = $btnCaption;\n $this->dialogQuestion->dialogDoubleButtons = FALSE;\n }\n }",
"public function editForm() {\n $html = '<input class=\"form-control\" name=\"'.$this->name.'\" value=\"'.$this->field_data->string_data.'\" />';\n\n if ($this->help)\n $html .= '<p class=\"help-block\">'.$this->help.'</p>';\n\n return $html;\n }"
] | [
"0.6875092",
"0.67507976",
"0.6601787",
"0.6566111",
"0.64856964",
"0.6472991",
"0.64096475",
"0.6363698",
"0.6355338",
"0.63030833",
"0.6270951",
"0.6247698",
"0.62334275",
"0.6205723",
"0.61830616",
"0.61488056",
"0.61487156",
"0.6147019",
"0.6144146",
"0.6109231",
"0.60457593",
"0.6037663",
"0.6037086",
"0.6033281",
"0.60289234",
"0.6009274",
"0.6003864",
"0.600037",
"0.59912664",
"0.5983683"
] | 0.6893133 | 0 |
Get term ID by name | public function get_term_id ( $name ) {
global $wpdb;
$id = $wpdb->get_row( "SELECT term_id FROM $wpdb->terms WHERE name = '" . $name . "'" );
return $id->term_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTermId($term){\n\t\tglobal $potodb;\n\t\t$term = strtolower($term);\n\t\t$row = $potodb->get_row(\"select ID from terms where name=\\\"$term\\\";\");\n\t\tif($row === false){\n\t\t\treturn false;\n\t\t}\n\t\tif(!empty($row[\"ID\"])){\n\t\t\treturn 0+$row[\"ID\"];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function aaiGetTermID($term_name, $vocab_name) {\n $vocab_det = array('vid', 'machine_name');\n $vocab_det_ary = $this->aaiGetVocabDetailByName($vocab_name, $vocab_det);\n $vocab_mac_name = $vocab_det_ary['machine_name'];\n $tid_ary = $this->aaiGetTermIdFromName($term_name, $vocab_mac_name);\n return $tid_ary[0];\n }",
"public function aaiGetTermIdFromName($term_name = NULL, $vocab_name = NULL) {\n if(is_null($term_name)) {\n return 0;\n }\n return array_keys(taxonomy_get_term_by_name($term_name, $vocab_name));\n }",
"function get_term_tid($name,$voc_name){\n\t$vocabulary = taxonomy_vocabulary_machine_name_load($voc_name);\n\t$vid = $vocabulary->vid;\n\t$tree = taxonomy_get_tree($vid);\n\tforeach($tree as $term){\n\t if ($term->name==$name) {\n\t return $term->tid;\n\t }\n\t}\n\techo \"Error Wrong vocabulary term name\";\n\treturn -1;\n}",
"public function getId() {\n return $this->getTermId();\n }",
"public function getTermId() {\n\t\t$val = $this->cacheGetObj('term_id');\n \tif (is_null($val))\n \t\treturn $this->cacheSetObj('term_id', $this->getOffering()->getTermId());\n \telse\n \t\treturn $val;\n\t}",
"public function getId() {\n\t\treturn $this->term_id;\n\t}",
"function getTermId()\n\t{\n\t\treturn $this->term_id;\n\t}",
"protected function idForTerm($term) {\n\n if (empty($term) OR ! is_string($term)) {\n\n return false;\n }\n else {\n\n $rs = $this->id_for_term_statement->execute(array(':name' => $term));\n\n if ($rs !== true) {\n\n $this->handleError('error executing \"id_for_term_statement\" with name = \"' . $term . '\"', $this->id_for_term_statement);\n }\n else {\n\n while ($row = $this->id_for_term_statement->fetch(PDO::FETCH_OBJ)) {\n\n if ( ! empty($row->id)) {\n\n return $row->id;\n }\n }\n\n // If we've gotten this far, it means that there is not currently a term\n // in the database with this name, so we need to create one\n $insert_values = array(\n ':name' => $term,\n ':slug' => str_replace(' ', '-', strtolower(mb_convert_encoding($term, 'ASCII'))),\n );\n\n $rs2 = $this->create_term_with_name_statement->execute($insert_values);\n\n if ($rs2 !== true) {\n\n $this->handleError('error executing \"create_term_with_name_statement\" with name = \"' . $term . '\" and slug = \"' . $insert_values[':slug'] . '\"', $this->create_term_with_name_statement);\n }\n else {\n\n $term_id = $this->pdo->lastInsertId();\n\n $rs3 = $this->add_term_to_taxonomy_statement->execute(array(':term_id' => $term_id));\n\n if ($rs3 !== true) {\n\n $this->handleError('error executing \"add_term_to_taxonomy_statement\" with term_id = \"' . $term_id . '\"', $this->add_term_to_taxonomy_statement);\n }\n else {\n\n return $this->pdo->lastInsertId();\n }\n }\n }\n }\n }",
"public function getSecTermId($term_name){\n $category = Category::model()->findByAttributes(array('level'=>2,'name'=>$term_name));\n $category=Category::model()->findByPk($category->id);\n $descendants=$category->children()->findAll();\n $allterms = array();\n foreach ($descendants as $value) {\n $allterms[$value->id] = $value->name;\n }\n return $allterms;\n }",
"function chipmunk_map_terms( $term ) {\n\treturn $term->term_id;\n}",
"public static function getCurrentTermId()\n {\n $term_id = '';\n $taxonomy = 'knb-categories';\n $get_current_term = '';\n if (!empty(get_queried_object()->term_id)) {\n $get_current_term = get_queried_object()->term_id;\n }\n\n $get_current_term_id = get_term($get_current_term, $taxonomy);\n\n foreach ($get_current_term_id as $key => $value) {\n $$key = $value;\n }\n return absint($term_id);\n }",
"public function id()\n {\n return $this->category->term_id;\n }",
"function getKeywordId($name)\n\t{\n\t\t$query = \"SELECT `id` FROM `keywords` WHERE `name` = :name\";\n\t\t$param = array(':name' => $name);\n\t\t$data = myQuery($query, 'select', $param, 'assoc');\n\n\t\treturn ($data['id']);\n\t}",
"public function setId($val){\n return $this->setTermId($val);\n }",
"public function getTermByID($id, $type);",
"public function getIdByName($name){\n foreach ($this->reprocessingValues as $id => $ore) {\n if (strtolower($ore->name) == strtolower($name)) {\n return $id;\n }\n }\n return null;\n }",
"function insertTerm($term){\n\t\tglobal $potodb;\n\t\t$term = strtolower($term);\n\t\t$term_id = getTermId($term);\n\t\tif($term_id === false){\n\t\t\t// New term insertion\n\t\t\treturn $potodb->insertValue(\"terms\",[\n\t\t\t\t\"name\" => $term\n\t\t\t]);\n\n\t\t}\n\t\telse{\n\t\t\t// Return the already present term_id\n\t\t\treturn $term_id;\n\t\t}\n\t}",
"public function getTerm(): int;",
"protected function get_id_for_acf(): string {\n\t\treturn 'term_' . $this->get_id();\n\t}",
"public static function getTerm($id){\n\t\tglobal $wpdb;\n\t\t$result = null;\n\t\t$dbdata = $wpdb->get_results(\n\t\t\t'SELECT * FROM ' . $wpdb->prefix . 'terms as term JOIN ' . $wpdb->prefix . 'term_taxonomy as tax WHERE term.term_id = tax.term_id AND term.term_id = '.$id\n\t\t);\n\n\t\tif(is_array($dbdata) && !empty($dbdata)){\n\t\t\t$result = reset($dbdata);\n\t\t}\n\n\t\treturn $result;\n\t}",
"private function loadTermIdByIdField(string $id): int {\n $tid = 0;\n $query = \\Drupal::entityQuery('taxonomy_term')\n ->accessCheck(TRUE)\n ->condition('field_subject_id', $id);\n $tids = $query->execute();\n if ($tids) {\n $tid = reset($tids);\n }\n return $tid;\n }",
"private function loadTermIdByIdField(string $id): int {\n $tid = 0;\n $query = \\Drupal::entityQuery('taxonomy_term')\n ->accessCheck(TRUE)\n ->condition('field_subject_id', $id);\n $tids = $query->execute();\n if ($tids) {\n $tid = reset($tids);\n }\n return $tid;\n }",
"function get_term_name_by_id( $term_id ) {\n\t\t\tglobal $wpdb;\n\n\t\t\treturn $wpdb->get_var(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT `name` from {$wpdb->terms} WHERE `term_id` = %d\",\n\t\t\t\t\t$term_id\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"protected function createActivityTermId($term_name) {\n // Create the term.\n $term = Term::create([\n 'uid' => 1,\n 'vid' => 'activity',\n 'name' => $term_name,\n ]);\n $term->save();\n\n return $term->id();\n }",
"private function findExistingTerm($term, $currentTerms)\n {\n foreach ($currentTerms as $currentTerm) {\n if ($currentTerm->slug == $term->term['slug']) {\n return $currentTerm->term_id;\n }\n }\n\n return 0;\n }",
"abstract protected function getTermForSingleResource($id);",
"public function get_table_field_name() {\n\t\treturn 'term_id';\n\t}",
"public function findIdByName($name);",
"protected function getJobTitleIdByName($name) {\n $terms = taxonomy_term_load_multiple_by_name($name, 'job_title');\n $term = reset($terms);\n return !empty($term) ? $term: '_none';\n }"
] | [
"0.77734214",
"0.7262504",
"0.72554487",
"0.72160244",
"0.7199631",
"0.711564",
"0.7109348",
"0.7081193",
"0.69805837",
"0.6784218",
"0.66453815",
"0.66326946",
"0.66077137",
"0.6598906",
"0.6450964",
"0.6403695",
"0.6369085",
"0.63139695",
"0.62604296",
"0.62466407",
"0.62386906",
"0.6228398",
"0.6228398",
"0.62097937",
"0.6169578",
"0.6166065",
"0.61518824",
"0.6120086",
"0.6076929",
"0.6032497"
] | 0.8066345 | 0 |
Get term translate from DB | public function get_term_translate_from_DB ( $id ) {
return get_term_meta( $id, 'translate-' . $this->translate_lang , true );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTranslator();",
"public function getTranslator();",
"public function translate()\n {\n $content = \\request('content') . \\request('lastHit');\n return $this->translator->translate(\\request('language'), $content);\n }",
"public function get ($term, $lang = null) {\n\n // If we don't receive a language key, use the default\n $lang = isset($lang)? $lang : $this->lang;\n\n // Load the language terms\n if (!isset($this->languages[$lang])) {\n $this->load($lang);\n }\n\n // Return the translated term\n return isset($this->languages[$lang][$term])? $this->languages[$lang][$term] : $term;\n }",
"function getTransLang();",
"final public function translate()\n {\n return static::translations()[$this->name()];\n }",
"abstract public function getTranslationIn(string $locale);",
"public function loadTranslate()\n {\n if ($this->translate !== false) {\n return $this->translate;\n }\n\n $this->translate = new TranslateMysql(ID_VERSION, ID_API, Registry::get('db'));\n $this->translate->addTranslation();\n\n return $this->translate;\n }",
"function get_phrase($name,$lang_code=NULL)\r\n\t{\r\n\t\tglobal $db;\r\n\r\n\t\t$lang_query = '';\r\n\t\tif($lang_code!='')\r\n\t\t{\r\n\t\t\t$lang_query = \"AND lang_iso = '\".mysql_clean($lang_code).\"'\";\r\n\t\t}\r\n\t\t\r\n\t\t$results = $db->select(tbl(\"phrases\"),'*',\" id = '\".mysql_clean($name).\"' OR varname = '\".mysql_clean($name).\"' $lang_query \");\r\n\t\tif(count($results) > 0 )\r\n\t\t\treturn $results[0];\r\n\t\treturn false;\r\n\t}",
"function translate($text) {\n return model\\translate($text);\n}",
"public function loadTranslate()\n {\n if ($this->translate !== false) {\n return $this->translate;\n }\n\n $this->translate = new TranslateMysql(ID_VERSION, ID_API, Registry::get('db'));\n $this->translate->addTranslation();\n Registry::set('translator', $this->translate);\n\n return $this->translate;\n }",
"function translate() {}",
"public function translateDb($id)\n\t{\n\t\tif(strpos($id,'#T') == 0)\n\t\t{\n\t\t\tsimtoDbaser::getInst()->select($this->dic_table,'t_id,string,lang',array('where' => 't_id = \"'.$id.'\"'));\n\t\n\t\t\tif(simtoDbaser::getInst()->numOut() > 0)\n\t\t\t{\n\t\t\t\t$rows = simtoDbaser::getInst()->resOut();\n\t\t\t\tforeach($rows as $row)\n\t\t\t\t\tif($row['lang'] == $this->active_lang)\n\t\t\t\t\t\t$aclang = $row['string'];\n\t\t\t\t\telseif($row['lang'] == PR_LANG)\n\t\t\t\t\t\t$deflang = $row['string'];\n\t\t\t\t\telseif($row['lang'] == 'simto')\n\t\t\t\t\t\t$simlang = $row['string'];\n\t\t\t\t\telse \n\t\t\t\t\t\t$lastlang = $row['string'];\n\t\t\t\t\t\n\t\t\t\tif(isset($aclang) && !empty($aclang))\n\t\t\t\t\treturn $aclang;\n\t\t\t\telseif(isset($deflang) && !empty($deflang))\n\t\t\t\t\treturn $deflang;\n\t\t\t\telseif(isset($simlang) && !empty($simlang))\n\t\t\t\t\treturn $simlang;\n\t\t\t\telseif(isset($lastlang) && !empty($lastlang))\n\t\t\t\t\t//TODO: exception about missing simto string\n\t\t\t\t\treturn $lastlang;\n\t\t\t\telse \n\t\t\t\t\t//TODO: exception\n\t\t\t\t\treturn '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//TODO: exception\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\treturn $id;\n\t}",
"public function retrieveTranslation($id, $lang)\n\t{\n $em = $this->getReader()->getEntityManager();\n \n $dql = \"SELECT e FROM \".TRANSLATION_ENTITY.\" e WHERE e.entity_id=?1 AND e.lang=?2\";\n \n $query = $em->createQuery($dql);\n $query->setParameter(1, $id);\n $query->setParameter(2, $lang);\n \n $records = $query->getResult();\n return $records;\n\t}",
"private function language(){\r\n\t\t$em = $this->container->get('doctrine')->getManager();\t\r\n\t\t$query = $em->createQuery(\"SELECT p FROM MytripAdminBundle:Language p\");\t\t\t\r\n\t\treturn $query->getArrayResult();\r\n\t}",
"private function getTranslations()\n\t{\n\t\t$this->translations = $this->wpml->getAllTranslations($this->data['post_id']);\n\t}",
"public function translate($data){ /* TODO: Build translate */ }",
"public function getTranslate() {\n return $this->translate;\n }",
"public function auto_translate($siteId, $locale, $tt) {\r\n $baseStringsWithParametersQuery = null;\r\n foreach ($tt as $t) {\r\n //first of all, search plain text in db\r\n $query = $this->db->query(\"SELECT B.TYPE AS TYPE, B.TEXT AS BASESTRING, T.TEXT AS TARGETSTRING\r\n FROM BASESTRINGS B INNER JOIN TARGETSTRINGS T ON T.BASEID = B.ID \r\nWHERE B.SITEID = ? AND T.LOCALE = ? AND B.PAGEID IS NULL AND B.TEXT = ?\", array($siteId, $locale, $t->baseString));\r\n if ($query) {\r\n\r\n //loop on results because query is case insensitive\r\n foreach ($query->result() as $row) {\r\n if ($row->BASESTRING === $t->baseString) {\r\n $t->targetString = $row->TARGETSTRING;\r\n $t->type = $row->TYPE;\r\n continue 2; //next translation to find\r\n }\r\n }\r\n }\r\n\r\n //if plain text is not found, search strings with parameters\r\n //I have to select all strings with parameters and then find which one\r\n //applies to mine\r\n //strings with parameters contain at least %1% character\r\n if ($baseStringsWithParametersQuery === null) {\r\n $baseStringsWithParametersQuery = $this->db->query(\"SELECT B.TYPE AS TYPE, B.TEXT AS BASESTRING, T.TEXT AS TARGETSTRING\r\n FROM BASESTRINGS B INNER JOIN TARGETSTRINGS T ON T.BASEID = B.ID \r\nWHERE B.SITEID = ? AND T.LOCALE = ? AND B.PAGEID IS NULL AND B.TEXT LIKE '%\\%1\\%%'\", array($siteId, $locale));\r\n }\r\n if ($baseStringsWithParametersQuery) {\r\n //loop on results and try to match parameterized strings\r\n foreach ($baseStringsWithParametersQuery->result() as $row) {\r\n if (match_base_string($row->BASESTRING, $t->baseString)) {\r\n $t->baseString = $row->BASESTRING; //replace constant value with parameterized one\r\n $t->targetString = $row->TARGETSTRING;\r\n $t->type = $row->TYPE;\r\n continue 2; //next translation to find\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static function getTranslate()\n {\n return self::$translate;\n }",
"function t($text) {\r\n\treturn $text;\r\n\t//return Model_Content::getInstance()->translate($text);\r\n}",
"public function get_meta_translation ( $term_id, $langs ) {\n\n $term_meta = array();\n\n foreach ( $langs as $key=>$value ) {\n\n $term_meta[ 'translate-' . $key ] = get_term_meta( $term_id, 'translate-' . $key , true );\n\n }\n\n return $term_meta;\n\n }",
"public function getTranslation($for, $language) {\n\t\tif ( empty($this->_preparedGetFor[$language]) ) {\n\t\t\t$this->_preparedGetFor[$language] = $this->_pdo->prepare('SELECT * FROM translations WHERE `' . $language . '`=:for LIMIT 1');\n\t\t}\n\t\t$stmt = $this->_preparedGetFor[$language];\n\t\t$stmt->bindValue('for', $for);\n\t\t$stmt->execute();\n\t\treturn $stmt->fetch(PDO::FETCH_OBJ);\n\t}",
"public function getTranslationByWordId($wordId)\r\n {\r\n return $this->getEntityManager()\r\n ->createQuery(\r\n 'SELECT w FROM WordsQuizBundle:Word w \r\n INNER JOIN WordsQuizBundle:Translation t WITH w = t.translation\r\n WHERE t.word = :wordId\r\n '\r\n )\r\n ->setParameter('wordId', $wordId)\r\n ->getOneOrNullResult();\r\n }",
"public function get()\n {\n return $this->translation;\n }",
"function getTerm($class, $db) {\n\t\t$sql = \"SELECT term FROM CourseInfo WHERE courseTitle LIKE '%\" . $class . \"%' AND SI = '\" .$this->SI. \"'\"; // // add SI\n\t\t$result = mysqli_query ( $db, $sql );\n\t\t$term = mysqli_fetch_assoc ( $result );\n\t\t$rows = mysqli_num_rows ( $result );\n\t\t\n\t\tif ($rows == 1) {\n\t\t\treturn (intval ( $term ['term'] ));\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"function getTranslated() {\n\t\treturn $this->_translated;\n\t}",
"function getTranslation($id, $field, $language_id = null)\n {\n if($language_id==null)\n $language_id = $this->language['language_id'];\n $this->db->select(\"*\");\n $this->db->from('translations');\n $this->db->where(\"table_id\", $id);\n $this->db->where(\"table_name\", $this->table_name);\n $this->db->where(\"field_name\", $field);\n $this->db->where(\"language_id\", $language_id);\n $query = $this->db->get();\n return $query->row_array();\n }",
"function unlocalize($text,$fromlan,$tolan,$like=0) {\n $db = GetGlobal('db');\n\n if ((!paramload('SHELL','langdb')) || (!$db)) { //text file\n //not supported....\n\t return ($text);\n }\n else { //dbase table\n \n $clan = $fromlan+1;\n\t $tlan = $tolan+1;\n \n //echo \"SQL--->$codename>\";\n $sSQL = \"select * from locale WHERE \";\n\t $fld1 = \"lan\".$clan;\n\t if ($like)\n\t $sSQL .= \"$fld1 like \" . $db->qstr(\"%\".$text.\"%\");\n\t else\n\t $sSQL .= \"$fld1=\" . $db->qstr($text);\n\t //echo $sSQL;\t \t \n\n $result = $db->Execute($sSQL,null,1); \n\n if ($result) {\t\n\t \t \n\t\t\t $fld2 = \"lan\".$tlan; //print $fld;\n\n\t\t if ($db->model=='ADODB') {\t\t\t \n\t\t\t $ret = $result->fields[$fld2];\n\t\t\t }\n\t\t\t else {\n\t\t\t //$res = $db->fetch_array($result); \n\t\t\t $ret = $result[$fld2];\n\t\t\t }\n\t\t\t //echo '>>>>>>>>>>>>>>>>>>>'.$ret.'<br>';\n\t\t\t return ($ret);\n\t\t\t \n /*if ($result->fields[$fld]) \n\t\t\t\t return (trim($result->fields[$fld]));\t */\n\t }\t \n }\n\n return ($text);\n}",
"public function getTranslatable();"
] | [
"0.66087395",
"0.66087395",
"0.6587852",
"0.62721074",
"0.61830366",
"0.6093395",
"0.6089245",
"0.605682",
"0.60027695",
"0.60014784",
"0.59787846",
"0.5970942",
"0.59697974",
"0.5954155",
"0.593893",
"0.5934718",
"0.5934008",
"0.59320676",
"0.5931979",
"0.59171027",
"0.5911785",
"0.586911",
"0.58254594",
"0.58132964",
"0.58084416",
"0.5805208",
"0.5798151",
"0.57944596",
"0.57837325",
"0.5759002"
] | 0.744442 | 0 |
Check the plugins directory and retrieve all plugin files with plugin data. WordPress only supports plugin files in the base plugins directory (wpcontent/plugins) and in one directory above the plugins directory (wpcontent/plugins/myplugin). The file it looks for has the plugin data and must be found in those two locations. It is recommended that do keep your plugin files in directories. The file with the plugin data is the file that will be included and therefore needs to have the main execution for the plugin. This does not mean everything must be contained in the file and it is recommended that the file be split for maintainability. Keep everything in one file for extreme optimization purposes. | public function get_plugins() {
if ( false === ( $wp_plugins = wp_cache_get( 'plugins', $this->id ) ) ) {
$wp_plugins = array();
$plugin_files = array();
$plugins_dir = @ opendir( $this->path );
if ( $plugins_dir ) {
while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
if ( substr( $file, 0, 1 ) == '.' ) {
continue;
}
if ( is_dir( $this->path . '/' . $file ) ) {
$plugins_subdir = @ opendir( $this->path . '/' . $file );
if ( $plugins_subdir ) {
while ( ( $subfile = readdir( $plugins_subdir ) ) !== false ) {
if ( substr( $subfile, 0, 1 ) == '.' ) {
continue;
}
if ( substr( $subfile, -4 ) == '.php' ) {
$plugin_files[] = "$file/$subfile";
}
}
closedir( $plugins_subdir );
}
}
else {
if ( substr( $file, -4 ) == '.php' ) {
$plugin_files[] = $file;
}
}
}
closedir( $plugins_dir );
}
if ( empty( $plugin_files ) ) {
return $wp_plugins;
}
foreach ( $plugin_files as $plugin_file ) {
if ( ! is_readable( "$this->path/$plugin_file" ) ) {
continue;
}
$plugin_data = $this->get_plugin_data( "$this->path/$plugin_file" );
if ( empty ( $plugin_data['Name'] ) ) {
continue;
}
if ( $this->only_with_textdomain && empty ( $plugin_data['TextDomain'] ) ) {
continue;
}
$plugin_data['Slug'] = dirname( $plugin_file );
$wp_plugins[ $this->plugin_basename( $plugin_file ) ] = $plugin_data;
}
uasort( $wp_plugins, array( $this, 'sort_uname_callback' ) );
wp_cache_set( 'plugins', $wp_plugins, $this->id, 3600 * 24 ); // Cache it for 24 hours
}
return $wp_plugins;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_pluginsused() {\r\n\tglobal $wp_plugins;\r\n\tif (isset($wp_plugins)) {\r\n\t\treturn $wp_plugins;\r\n\t}\r\n\t$wp_plugins = array();\r\n\t$plugin_root = WP_PLUGIN_DIR;\r\n\t$plugins_dir = @ dir($plugin_root);\r\n\tif($plugins_dir) {\r\n\t\twhile(($file = $plugins_dir->read()) !== false) {\r\n\t\t\tif (substr($file, 0, 1) == '.') {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (is_dir($plugin_root.'/'.$file)) {\r\n\t\t\t\t$plugins_subdir = @ dir($plugin_root.'/'.$file);\r\n\t\t\t\tif ($plugins_subdir) {\r\n\t\t\t\t\twhile (($subfile = $plugins_subdir->read()) !== false) {\r\n\t\t\t\t\t\tif (substr($subfile, 0, 1) == '.') {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (substr($subfile, -4) == '.php') {\r\n\t\t\t\t\t\t\t$plugin_files[] = \"$file/$subfile\";\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} else {\r\n\t\t\t\tif (substr($file, -4) == '.php') {\r\n\t\t\t\t\t$plugin_files[] = $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif (!$plugins_dir || !$plugin_files) {\r\n\t\treturn $wp_plugins;\r\n\t}\r\n\tforeach ($plugin_files as $plugin_file) {\r\n\t\tif (!is_readable(\"$plugin_root/$plugin_file\")) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$plugin_data = get_pluginsused_data(\"$plugin_root/$plugin_file\");\r\n\t\tif (empty($plugin_data['Plugin_Name'])) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$wp_plugins[plugin_basename($plugin_file)] = $plugin_data;\r\n\t}\r\n\tuasort($wp_plugins, create_function('$a, $b', 'return strnatcasecmp($a[\"Plugin_Name\"], $b[\"Plugin_Name\"]);'));\r\n\treturn $wp_plugins;\r\n}",
"function sd_load_plugins() {\n\t$plugins = array();\n\t$plugin_dir = trailingslashit( STYLESHEETPATH ) . 'plugins';\n\t\n\tif ( !is_dir( $plugin_dir ) )\n\t\treturn $plugins;\n\tif ( ! $dh = opendir( $plugin_dir ) )\n\t\treturn $plugins;\n\twhile ( ( $plugin = readdir( $dh ) ) !== false ) {\n\t\tif ( substr( $plugin, -4 ) == '.php' )\n\t\t\t$plugins[] = $plugin_dir . '/' . $plugin;\n\t}\n\tclosedir( $dh );\n\tsort( $plugins );\n\n\treturn $plugins;\n}",
"public static function get_plugins() { \n\n\t\t$results = array(); \n\n\t\t// Open up the plugin dir\n\t\t$handle = opendir(Config::get('prefix') . '/modules/plugins'); \n\n\t\tif (!is_resource($handle)) { \n\t\t\tdebug_event('Plugins','Unable to read plugins directory','1'); \n\t\t} \n\n\t\t// Recurse the directory\n\t\twhile ($file = readdir($handle)) { \n\t\t\t// Ignore non-plugin files\n\t\t\tif (substr($file,-10,10) != 'plugin.php') { continue; } \n\t\t\tif (is_dir($file)) { continue; } \n\n\t\t\t// It's a plugin record it\n\t\t\t$plugin_name = basename($file,'.plugin.php'); \n\t\t\t$results[$plugin_name] = $plugin_name; \n\n\t\t} // end while\n\n\t\t// Little stupid but hey\n\t\tksort($results); \n\n\t\treturn $results; \n\n\t}",
"private function _get_installed_plugins()\n\t{\n\t\t$this->EE->load->helper('file');\n\n\t\t$ext_len = strlen('.php');\n\n\t\t$plugin_files = array();\n\t\t$plugins = array();\n\n\t\t// Get a list of all plugins\n\t\t// first party first!\n\t\tif (($list = get_filenames(PATH_PI)) !== FALSE)\n\t\t{\n\t\t\tforeach ($list as $file)\n\t\t\t{\n\t\t\t\tif (strncasecmp($file, 'pi.', 3) == 0 &&\n\t\t\t\t\tsubstr($file, -$ext_len) == '.php' &&\n\t\t\t\t\tstrlen($file) > 7 &&\n\t\t\t\t\tin_array(substr($file, 3, -$ext_len), $this->core->native_plugins))\n\t\t\t\t{\n\t\t\t\t\t$plugin_files[$file] = PATH_PI.$file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// third party, in packages\n\t\tif (($map = directory_map(PATH_THIRD, 2)) !== FALSE)\n\t\t{\n\t\t\tforeach ($map as $pkg_name => $files)\n\t\t\t{\n\t\t\t\tif ( ! is_array($files))\n\t\t\t\t{\n\t\t\t\t\t$files = array($files);\n\t\t\t\t}\n\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\tif (is_array($file))\n\t\t\t\t\t{\n\t\t\t\t\t\t// we're only interested in the top level files for the addon\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// we gots a plugin?\n\t\t\t\t\tif (strncasecmp($file, 'pi.', 3) == 0 &&\n\t\t\t\t\t\tsubstr($file, -$ext_len) == '.php' &&\n\t\t\t\t\t\tstrlen($file) > strlen('pi.'.'.php'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (substr($file, 3, -$ext_len) == $pkg_name)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$plugin_files[$file] = PATH_THIRD.$pkg_name.'/'.$file;\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\tksort($plugin_files);\n\n\t\t// Grab the plugin data\n\t\tforeach ($plugin_files as $file => $path)\n\t\t{\n\t\t\t// Used as a fallback name and url identifier\n\t\t\t$filename = substr($file, 3, -$ext_len);\n\n\t\t\t// Magpie maight already be in use for an accessory or other function\n\t\t\t// If so, we still need the $plugin_info, so we'll open it up and\n\t\t\t// harvest what we need. This is a special exception for Magpie.\n\t\t\tif ($file == 'pi.magpie.php' &&\n\t\t\t\tin_array($path, get_included_files()) &&\n\t\t\t\tclass_exists('Magpie'))\n\t\t\t{\n\t\t\t\t$contents = file_get_contents($path);\n\t\t\t\t$start = strpos($contents, '$plugin_info');\n\t\t\t\t$length = strpos($contents, 'Class Magpie') - $start;\n\t\t\t\teval(substr($contents, $start, $length));\n\t\t\t}\n\n\t\t\t@include_once($path);\n\n\t\t\tif (isset($plugin_info) && is_array($plugin_info))\n\t\t\t{\n\t\t\t\t// Third party?\n\t\t\t\t$plugin_info['installed_path'] = $path;\n\n\t\t\t\t// fallback on the filename if no name is given\n\t\t\t\tif ( ! isset($plugin_info['pi_name']) OR $plugin_info['pi_name'] == '')\n\t\t\t\t{\n\t\t\t\t\t$plugin_info['pi_name'] = $filename;\n\t\t\t\t}\n\n\t\t\t\tif ( ! isset($plugin_info['pi_version']))\n\t\t\t\t{\n\t\t\t\t\t$plugin_info['pi_version'] = '--';\n\t\t\t\t}\n\t\t\t\t$plugins[$filename] = $plugin_info;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//log_message('error', \"Invalid Plugin Data: {$filename}\");\n\t\t\t}\n\n\t\t\tunset($plugin_info);\n\t\t}\n\n\t\treturn $plugins;\n\t}",
"public function get_plugins($plugin_folder = '') {\n\t\t$wp_plugins = array ();\n\t\t$plugin_root = PLUGIN_ADDON;\n\t\tif ( !empty($plugin_folder) ){ $plugin_root = $plugin_folder;}\n\t\t$plugins_dir = @ opendir( $plugin_root);\n\t\t$plugin_files = array();\n\n\t\tif ( $plugins_dir ) {\n\t\t\twhile (($file = readdir( $plugins_dir ) ) !== false ) {\n\t\t\t\tif ( substr($file, 0, 1) == '.' ) {\tcontinue;}\n\t\t\t\tif ( is_dir( $plugin_root.'/'.$file ) ) {\n\t\t\t\t\t$plugins_subdir = @ opendir( $plugin_root.'/'.$file );\n\t\t\t\t\tif ( $plugins_subdir ) {\n\t\t\t\t\t\twhile (($subfile = readdir( $plugins_subdir ) ) !== false ) {\n\t\t\t\t\t\t\tif ( substr($subfile, 0, 1) == '.' ) {continue;}\n\t\t\t\t\t\t\tif ( substr($subfile, -4) == '.php' ) {$plugin_files[] = \"$file/$subfile\";}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosedir( $plugins_subdir );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( substr($file, -4) == '.php' ) {$plugin_files[] = $file;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir( $plugins_dir );\n\t\t}\n\n\t\tif ( empty($plugin_files) ) {return $wp_plugins;}\n\t\tforeach ( $plugin_files as $plugin_file ) { \n\t\t\tif ( !is_readable( \"$plugin_root/$plugin_file\" ) ) {continue;}\n\t\t\t$plugin_data = $this->get_plugin_data( \"$plugin_root/$plugin_file\", false, true ); \n\t\t\tif ( empty ( $plugin_data['Name'] ) ) { continue;} \n $is_active = wc_pbp_check_active_addon(\"$plugin_file\");\n \n\t\t\t$plugin_data[\"addon_root\"] = $plugin_root.dirname($plugin_file).'/';\n\t\t\t$plugin_data[\"addon_slug\"] = sanitize_title(dirname($plugin_file));\n\t\t\t$plugin_data[\"addon_folder\"] = dirname($plugin_file).'/';\n $plugin_data[\"is_active\"] = $is_active;\n $plugin_data[\"installed\"] = true;\n \n\t\t\t$wp_plugins[plugin_basename( $plugin_file )] = $plugin_data;\n\t\t}\n\t\t\n\t\treturn $wp_plugins;\n\t}",
"function get_pluginsused_data($plugin_file) {\r\n\t$plugin_data = implode('', file($plugin_file));\r\n\tpreg_match(\"|Plugin Name:(.*)|i\", $plugin_data, $plugin_name);\r\n\tpreg_match(\"|Plugin URI:(.*)|i\", $plugin_data, $plugin_uri);\r\n\tpreg_match(\"|Description:(.*)|i\", $plugin_data, $description);\r\n\tpreg_match(\"|Author:(.*)|i\", $plugin_data, $author_name);\r\n\tpreg_match(\"|Author URI:(.*)|i\", $plugin_data, $author_uri);\r\n\tif (preg_match(\"|Version:(.*)|i\", $plugin_data, $version)) {\r\n\t\t$version = trim($version[1]);\r\n\t} else {\r\n\t\t$version = '';\r\n\t}\r\n\t$plugin_name = trim($plugin_name[1]);\r\n\t$plugin_uri = trim($plugin_uri[1]);\r\n\t$description = wptexturize(trim($description[1]));\r\n\t$author = trim($author_name[1]);\r\n\t$author_uri = trim($author_uri[1]);\r\n\treturn array('Plugin_Name' => $plugin_name, 'Plugin_URI' => $plugin_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => $version);\r\n}",
"public static function get_plugins_dir()\n {\n if ( ! defined('WP_PLUGIN_DIR')) {\n return \\WP_CLI_FileSystem::path_join(getcwd(), 'wp-content/plugins');\n } else {\n return \\WP_CLI_FileSystem::normalize_path(WP_PLUGIN_DIR);\n }\n }",
"public function get_plugins_config() {\n\n\t\t$active_plugins = get_option( 'active_plugins' );\n\t\t$all_plugins = get_plugins();\n\t\t$result = array();\n\n\t\tforeach ( $active_plugins as $plugin_file ) {\n\n\t\t\tif ( ! isset( $all_plugins[ $plugin_file ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$slug = dirname( $plugin_file );\n\n\t\t\tif ( 'crocoblock-wizard' === $slug ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$plugin = array();\n\t\t\t$data = $all_plugins[ $plugin_file ];\n\t\t\t$plugin['slug'] = $slug;\n\t\t\t$plugin['name'] = $data['Name'];\n\t\t\t$plugin['description'] = $data['Description'];\n\t\t\t$result[] = $plugin;\n\t\t}\n\n\t\treturn $result;\n\n\t}",
"function sister_plugins() {\n\trequire_once \\trailingslashit(\\ABSPATH) . 'wp-admin/includes/plugin.php';\n\trequire_once \\trailingslashit(\\ABSPATH) . 'wp-admin/includes/plugin-install.php';\n\t$response = \\plugins_api(\n\t\t'query_plugins',\n\t\tarray(\n\t\t\t'author'=>'blobfolio',\n\t\t\t'per_page'=>20,\n\t\t)\n\t);\n\n\tif (! isset($response->plugins) || ! \\is_array($response->plugins)) {\n\t\treturn array();\n\t}\n\n\t// We want to know whether a plugin is on the system, not\n\t// necessarily whether it is active.\n\t$plugin_base = \\trailingslashit(\\WP_PLUGIN_DIR);\n\t$mu_base = \\defined('WPMU_PLUGIN_DIR') ? \\trailingslashit(\\WPMU_PLUGIN_DIR) : false;\n\n\t$plugins = array();\n\tforeach ($response->plugins as $p) {\n\t\t// WordPress changed the formatting; let's make sure we always\n\t\t// have an array.\n\t\tif (! \\is_array($p)) {\n\t\t\t$p = (array) $p;\n\t\t}\n\n\t\tif (\n\t\t\t! isset($p['slug']) ||\n\t\t\t('blob-common' === $p['slug']) ||\n\t\t\t\\file_exists(\"{$plugin_base}{$p['slug']}\") ||\n\t\t\t($mu_base && \\file_exists(\"{$mu_base}{$p['slug']}\"))\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$plugins[] = array(\n\t\t\t'name'=>$p['name'],\n\t\t\t'slug'=>$p['slug'],\n\t\t\t'description'=>$p['short_description'],\n\t\t\t'url'=>$p['homepage'],\n\t\t\t'version'=>$p['version'],\n\t\t);\n\t}\n\n\t\\usort(\n\t\t$plugins,\n\t\tfunction($a, $b) {\n\t\t\tif ($a['name'] === $b['name']) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\treturn $a['name'] > $b['name'] ? 1 : -1;\n\t\t}\n\t);\n\n\treturn $plugins;\n}",
"function ig_mu_plugins_loader() {\n\tif( ! defined( 'WPMU_PLUGIN_DIR' ) ) {\n\t\treturn;\n\t}\n\n\t$mu_plugins_dirs = array_filter( scandir( WPMU_PLUGIN_DIR ) );\n\n\t$non_dirs = array(\n\t\t'.',\n\t\t'..',\n\t\t'.DS_Store',\n\t);\n\n\t//strip out non-dirs\n\tfor( $i = 0; $i < count( $non_dirs ); $i++ ) {\n\t\t$not_dir_key = array_search( $non_dirs[ $i ], $mu_plugins_dirs );\n\n\t\tif( $not_dir_key !== false ) {\n\t\t\tunset( $mu_plugins_dirs[ $not_dir_key ] );\n\t\t}\n\n\t\tunset( $not_dir_key );\n\t}\n\n\tunset( $non_dirs );\n\n\tif( empty( $mu_plugins_dirs ) ) {\n\t\treturn;\n\t}\n\n\tsort( $mu_plugins_dirs );\n\n\t//load up mu-plugins from each valid directory\n\tforeach( $mu_plugins_dirs as $dir ) {\n\t\t$plugin_dir = trailingslashit( WPMU_PLUGIN_DIR ) . $dir;\n\t\t$plugin_file = trailingslashit( $plugin_dir ) . $dir . '.php';\n\n\t\tif( is_dir( $plugin_dir ) && file_exists( $plugin_file ) ) {\n\t\t\trequire_once( $plugin_file );\n\t\t}\n\n\t\tunset( $plugin_file, $plugin_dir );\n\t}\n}",
"private function load_plugins() {\r\n\t\t$base = realpath(dirname(__FILE__)) . \"/plugins\";\r\n\t\t$this->plugins = glob($base . \"/*.php\");\r\n\t\tforeach($this->plugins as $plugin) {\r\n\t\t\t//include the plugin php file and define the class name\r\n\t\t\t\tinclude_once $plugin;\r\n\t\t\t\t$plugin_name = basename($plugin, \".php\");\r\n\t\t\t\t$class_name = \"plugin_\".$plugin_name;\r\n\r\n\t\t\t//create the plugin object so that it can be stored and called later\r\n\t\t\t\t$obj = new $class_name();\r\n\t\t\t\t$this->plugins[$plugin_name] = $obj;\r\n\r\n\t\t\t//store all methods found in the plugin\r\n\t\t\t\tforeach (get_class_methods($obj) as $method ) {\r\n\t\t\t\t\t$this->methods[$method] = $plugin_name;\r\n\t\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"function loadPluginFiles( $path ) {\n\t\t// Get a directory listing from plugins/core and include each plugin.\n\t\tif( !is_dir( $path ) ) return NULL;\n\t\tlogMsg( sprintf( \"Using plugin path '%s'\", $path ), MM_INFO );\n\t\tif( $handle = opendir( $path ) ) {\n\t\t\twhile( false !== ( $file = readdir( $handle ) ) ) {\n\t\t\t\tif( preg_match( '/^ *plugin_.*.inc */', $file ) ) {\n\t\t\t\t\tlogMsg( sprintf( \"Loading plugin file '%s'\", $file ), MM_INFO );\n\t\t\t\t\tinclude_once( \"$path/$file\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir( $handle );\n\t\t}\n\t}",
"function load_plugins(){\n\t\n\t\t$plugins = $this->get_latest_cached( 'plugins' );\n\n\t\tif ( !is_object($plugins) ) \n\t\t\treturn $plugins;\n\n\t\t$output = '';\n\n\t\t$plugins = pagelines_store_object_sort( $plugins );\n\n\t\t$plugins = json_decode(json_encode($plugins), true); // convert objects to arrays\n\t\t\n\t\t$plugins = self::external_plugins( $plugins );\n\t\t\n\t\tforeach( $plugins as $key => $plugin )\n\t\t\t$plugins[$key]['file'] = sprintf('/%1$s/%1$s.php', $key);\n\n\n\t\t\n\t\t// get status of each plugin\n\t\tforeach( $plugins as $key => $ext ) {\n\t\t\t$plugins[$key]['status'] = $this->plugin_check_status( WP_PLUGIN_DIR . $ext['file'] );\n\t\t\t$plugins[$key]['name'] = ( $plugins[$key]['status']['data']['Name'] ) ? $plugins[$key]['status']['data']['Name'] : $plugins[$key]['name'];\n\t\t}\n\n\t\t// reset array keys ( sort functions reset keys to int )\n\t\tforeach( $plugins as $key => $ext ) {\n\n\t\t\tunset( $plugins[$key] );\n\t\t\t$key = str_replace( '.php', '', basename( $ext['file'] ) );\n\t\t\t$plugins[$key] = $ext;\n\t\t}\n\t\treturn $plugins;\n\t}",
"function load_plugins()\n{\n global $conf, $pwg_loaded_plugins;\n $pwg_loaded_plugins = array();\n if ($conf['enable_plugins'])\n {\n $plugins = get_db_plugins('active');\n foreach( $plugins as $plugin)\n {// include main from a function to avoid using same function context\n load_plugin($plugin);\n }\n trigger_notify('plugins_loaded');\n }\n}",
"private function loadPlugins()\n\t\t{\n\t\t\tif(file_exists($this -> plugins.'plugins.php'))\n\t\t\t{\n\t\t\t\t// Load precompiled plugin database\n\t\t\t\tinclude($this -> plugins.'plugins.php');\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Compile plugin database\n\t\t\t\tif(!is_dir($this -> plugins))\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\t$code = '';\n\t\t\t\t$file = '';\n\t\t\t\t$dir = opendir($this -> plugins);\n\t\t\t\twhile($file = readdir($dir))\n\t\t\t\t{\n\t\t\t\t\tif(preg_match('/(component|instruction|function|prefilter|postfilter|outputfilter|resource)\\.([a-zA-Z0-9\\_]+)\\.php/', $file, $matches))\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch($matches[1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t# COMPONENTS\n\t\t\t\t\t\t\tcase 'component':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->components['\".$matches[2].\"'] = 1;\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t# /COMPONENTS\n\t\t\t\t\t\t\tcase 'instruction':\n\t\t\t\t\t\t\t\t$this -> compileCode .= \"\\trequire(\\$this -> tpl-> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$this -> compileCode .= \"\\t\\$this->tpl->control[] = '\".$matches[2].\"';\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'function':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->functions['\".$matches[2].\"'] = '\".$matches[2].\"';\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'prefilter':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->codeFilters['pre'][] = 'optPrefilter\".$matches[2].\"';\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'postfilter':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->codeFilters['post'][] = 'optPostfilter\".$matches[2].\"';\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'outputfilter':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->codeFilters['output'][] = 'optOutputfilter\".$matches[2].\"';\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\t\t\t$code .= \"\\trequire(\\$this -> plugins.'\".$file.\"');\\n\";\n\t\t\t\t\t\t\t\t$code .= \"\\t\\$this->resources[\".$matches[2].\"] = new \\$\".$matches[4].\"(\\$this);\\n\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dir);\n\t\t\t\tfile_put_contents($this -> plugins.'plugins.php', \"<?php\\n\".$code.\"?>\");\n\t\t\t\tfile_put_contents($this -> plugins.'compile.php', \"<?php\\n\".$this -> compileCode.\"?>\");\n\t\t\t\teval($code);\n\t\t\t}\n\t\t\treturn 1;\n\t\t}",
"protected function get_data() {\n\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\n\t\tif ( null === $this->data ) {\n\t\t\t$this->data = get_plugin_data( $this->get_file(), false, false );\n\t\t}\n\n\t\treturn $this->data;\n\t}",
"private static function get_plugin_data( $plugin_folder ) {\n\t\t// site, since it is in a file that is normally only loaded in the admin.\n\t\tif ( ! function_exists( 'get_plugins' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t}\n\n\t\t$plugins_data = get_plugins( '/' . $plugin_folder );\n\t\t$plugin_data = reset( $plugins_data );\n\t\treturn $plugin_data;\n\t}",
"public function includes()\n {\n /*\n * autoload plugin files\n */\n include_once dirname(__FILE__) . '/plugin/i18n.php';\n include_once dirname(__FILE__) . '/plugin/install.php';\n include_once dirname(__FILE__) . '/plugin/uninstall.php';\n\n /**\n * Load Plugin Files\n */\n add_action('plugins_loaded', array($this, 'load_php_file'), 10);\n }",
"function external_plugins( $plugins ) {\n\t\t\n\t\t$default_headers = array(\n\t\t\t'Demo'\t\t=> 'Demo',\n\t\t\t'External'\t=> 'External',\n\t\t\t'Long'\t\t=> 'Long',\n\t\t\t'PageLines'\t=> 'PageLines',\n\t\t\t'Depends'\t=> 'Depends'\n\t\t\t);\n\n\t\tif ( is_multisite() )\n\t\t\treturn $plugins;\n\t\t\t\n\t\t$ext_plugins = (array) get_plugins();\n\t\t\n\t\tforeach( $ext_plugins as $ext => $data ) {\n\t\t\t\n\t\t\t$new_key = rtrim( str_replace( basename( $ext ), '', $ext ), '/' );\n\t\t\tunset( $ext_plugins[$ext] );\n\n\t\t\tif ( !array_key_exists( $new_key, $plugins ) ) {\n\t\n\t\t\t\t$a = get_file_data( WP_PLUGIN_DIR . '/' . $ext, $default_headers );\n\t\t\t\tif ( !empty( $a['PageLines'] ) && !empty( $new_key ) ) {\n\n\t\t\t\t\t$plugins[$new_key]['name'] = $data['Name']; \n\t\t\t\t\t$plugins[$new_key]['slug'] = $new_key;\n\t\t\t\t\t$plugins[$new_key]['text'] = $data['Description'];\n\t\t\t\t\t$plugins[$new_key]['version'] = $data['Version'];\n\t\t\t\t\t$plugins[$new_key]['author_url'] = $data['AuthorURI'];\n\t\t\t\t\t$plugins[$new_key]['author'] = $data['Author'];\n\t\t\t\t\t$plugins[$new_key]['count'] = 0;\n\t\t\t\t\t$plugins[$new_key]['screen'] = false;\n\t\t\t\t\t$plugins[$new_key]['extended'] = false;\n\t\t\t\t\t$plugins[$new_key]['demo'] = $a['Demo'];\n\t\t\t\t\t$plugins[$new_key]['external'] = $a['External'];\n\t\t\t\t\t$plugins[$new_key]['long'] = $a['Long'];\n\t\t\t\t\t$plugins[$new_key]['depends'] = $a['Depends'];\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn $plugins;\n\t}",
"function dev_plugins() {\n\treturn wp_content_dir_list( 'plugins' );\n}",
"private function loadPlugins() {\n\t\tforeach ($this->cache['plugins'] as $filename => $info) {\n\t\t\t$this->autoloadPlugin($filename, $info);\n\t\t\t$this->includePlugin($filename);\n\t\t}\n\t}",
"public function scan()\n {\n if (file_exists(PLUGINS_DIR)) {\n $loader = new ClassLoader();\n $loader->addPsr4('Kanboard\\Plugin\\\\', PLUGINS_DIR);\n $loader->register();\n\n $dir = new DirectoryIterator(PLUGINS_DIR);\n\n foreach ($dir as $fileInfo) {\n if ($fileInfo->isDir() && substr($fileInfo->getFilename(), 0, 1) !== '.') {\n $pluginName = $fileInfo->getFilename();\n $this->initializePlugin($pluginName);\n }\n }\n }\n }",
"private function loadPlugins() {\n\n\t\t\t/* include all elements */\n\t\t\t$plugins = glob(Application::path('plugins') . '*' , GLOB_ONLYDIR);\n\n\t\t\tforeach($plugins as $plugin) {\n\t\t\t\t/* read metadata */\n\n\t\t\t\t$meta = json_decode(file_get_contents($plugin . '/metadata.json'));\n\n\t\t\t\t/* set view path to include plugin */\n\t\t\t\tTemplate::addPath($plugin . '/views/');\n\n\n\t\t\t\t/* include all config, controllers, language(?), models and set view path to include plugin */\n\t\t\t\tinclude($plugin . '/desmonds.php');\n\t\t\t\t\n\t\t\t\t/* include all config files */\n\n\t\t\t\t$configs = glob($plugin . '/config/*');\n\n\t\t\t\tforeach($configs as $config) {\n\n\t\t\t\t\t\tif(basename($config) != 'config') {\n\n\t\t\t\t\t\t\tif(strstr($config, 'App.php')) {\n\t\t\t\t\t\t\t\t$this->settings['app'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Auth.php')) {\n\t\t\t\t\t\t\t\t$this->settings['auth'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Session.php')) {\n\t\t\t\t\t\t\t\t$this->settings['session'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Datastores.php')) {\n\t\t\t\t\t\t\t\t$this->settings['datastores'] += include($config);\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Mail.php')) {\n\t\t\t\t\t\t\t\t$this->settings['mail'] += include($config);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t/* custom config file - decide on this later */\n\t\t\t\t\t\t\t\t//$this->settings[];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinclude($config);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\n\t\t\t\t/* include all controllers */\n\t\t\t\t$controllers = glob($plugin . '/controllers/*');\n\n\t\t\t\tforeach($controllers as $controller) {\n\t\t\t\t\tif(basename($controller) != 'controllers') {\n\n\n\t\t\t\t\t\tinclude($controller);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t/* include all modals */\n\t\t\t\t$models = glob($plugin . '/models/*');\n\n\t\t\t\tforeach($models as $model) {\n\n\t\t\t\t\t\n\t\t\t\t\tif(basename($model) != 'models') {\n\t\t\t\t\t\tinclude($model);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* include routes */\n\t\t\t\tinclude($plugin . '/routes.php');\n\n\n\t\t\t\t/* start the plugin */\n\t\t\t\tinclude($plugin . '/start.php');\n\n\t\t\t\t/* create class */\n\t\t\t\t$plugin_class_name = 'plugin_' . $meta->name;\n\n\t\t\t\t$plugin_obj = new $plugin_class_name();\n\t\t\t\t$plugin_obj->Start();\n\n\n\t\t\t}\n\n\t}",
"protected function pluginsLoader(): array\n {\n $root = $this->root('plugins');\n $loaded = [];\n\n foreach (Dir::read($root) as $dirname) {\n if (in_array(substr($dirname, 0, 1), ['.', '_']) === true) {\n continue;\n }\n\n $dir = $root . '/' . $dirname;\n $entry = $dir . '/index.php';\n\n if (is_dir($dir) !== true || is_file($entry) !== true) {\n continue;\n }\n\n F::loadOnce($entry);\n\n $loaded[] = $dir;\n }\n\n return $loaded;\n }",
"private function initPluginData()\n {\n \t\t$this->slug = plugin_basename( $this->pluginFile );\n \t\t$this->pluginData = get_plugin_data( $this->pluginFile );\n }",
"function includes() {\n if ( !$this->is_plugin_installed() ) {\n return;\n }\n\n if ( !is_admin() ) {\n require_once $this->parent_path . '/includes/functions.php';\n require_once $this->parent_path . '/includes/urls.php';\n require_once $this->parent_path . '/includes/html.php';\n require_once $this->parent_path . '/includes/shortcodes.php';\n }\n\n // load url filters\n require_once dirname( __FILE__) . '/urls.php';\n }",
"protected static function plugins()\n {\n if (self::$plugins) {\n return self::$plugins;\n }\n\n $path = self::basePath(self::PLUGINS_JSON);\n\n if (!file_exists($path)) {\n return self::$plugins = [];\n }\n\n self::$plugins = json_decode(file_get_contents($path));\n\n if (!self::$plugins) {\n return self::$plugins = [];\n }\n\n return self::$plugins;\n }",
"protected function _collector(){\n\t\t\n\t\t\t$default_headers = array(\n\t\t\t\t'Name' => 'Plugin Name',\n\t\t\t\t'PluginURI' => 'Plugin URI',\n\t\t\t\t'Version' => 'Version',\n\t\t\t\t'Description' => 'Description',\n\t\t\t\t'Author' => 'Author',\n\t\t\t\t'AuthorURI' => 'Author URI',\n\t\t\t\t'TextDomain' => 'Text Domain',\n\t\t\t\t'DomainPath' => 'Domain Path',\n\t\t\t\t'Network' => 'Network',\n\t\t\t\t// Site Wide Only is deprecated in favor of Network.\n\t\t\t\t'_sitewide' => 'Site Wide Only',\n\t\t\t);\t\t\t\n\t\t\t\n\t\t\t$this->plugin_data = get_file_data( $this->_parent, $default_headers, 'plugin' );\n\t\t }",
"function get_plugins( $host, $path = '' ) {\n\t$cache = new vvv_dash_cache();\n\n\tif ( ( $plugins = $cache->get( $host . '-plugins', VVV_DASH_PLUGINS_TTL ) ) == false ) {\n\n\t\t$plugins = shell_exec( 'wp plugin list --path=' . VVV_WEB_ROOT . '/' . $host . $path . ' --format=csv --debug ' );\n\n\t\t// Don't save unless we have data\n\t\tif ( $plugins ) {\n\t\t\t$status = $cache->set( $host . '-plugins', $plugins );\n\t\t}\n\t}\n\n\treturn $plugins;\n}",
"public static function get_plugin_dir()\n {\n return (plugin_dir_path(__FILE__));\n }"
] | [
"0.71637315",
"0.69970286",
"0.69453627",
"0.69432074",
"0.68925065",
"0.6767164",
"0.6621809",
"0.66191554",
"0.66124725",
"0.6609422",
"0.6607413",
"0.65410477",
"0.65385264",
"0.6522667",
"0.64869344",
"0.6451522",
"0.6379029",
"0.63550174",
"0.6347033",
"0.63332826",
"0.6300311",
"0.6274179",
"0.6256661",
"0.6211076",
"0.61779743",
"0.6042092",
"0.60374975",
"0.6036535",
"0.60296124",
"0.6026982"
] | 0.7633232 | 0 |
Some utility functions extracted out of Schedule.php that are shared with Thursday.php. / write_hour Helper function to write the table cell containing the start and stop time for the hour displayed in the first column of the schedule table | function write_hour ($tHour)
{
$hour_start = strftime ('%H:%M', $tHour);
$hour_end = strftime ('%H:%M', $tHour + (60 * 60));
$txt = $hour_start . '<BR>--<BR>' . $hour_end;
write_cell ('TH', $txt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function write_24_hour ($hour)\n{\n $hour_start = start_hour_to_12_hour ($hour);\n $hour_end = start_hour_to_12_hour ($hour + 1);\n $txt = \"<b>\" . $hour_start . \"</b>\";\n write_centering_table($txt);\n}",
"function buildTimeTable() {\r\n\r\n\t\tif($this->internal['currentRow']['program']) {\r\n\t\t\t\t# Uhr auf 0 Uhr stellen!\r\n\t\t\t\t# Erster Programmtag\r\n\t\t\t$theDay = $this->internal['currentRow']['date'];\r\n\t\t\t$theDay = mktime ( 0, 0, 0, strftime(\"%m\", $theDay),strftime(\"%d\", $theDay), strftime(\"%Y\", $theDay));\r\n\r\n\t\t\tif( (time() > $theDay ) && \t( time() < mktime(0, 0, 0, strftime(\"%m\", $theDay),strftime(\"%d\", $theDay)+7, strftime(\"%Y\", $theDay)) ) ) {\r\n\t\t\t\t$todaysNr = strftime(\"%u\", time()) + 3; # Do!!\r\n\t\t\t\tif($todaysNr > 6) $todaysNr = $todaysNr%7;\r\n\t\t\t} else {\r\n\t\t\t\t$todaysNr = -1;\r\n\t\t\t}\r\n\r\n\t\t\t\t# tHead\r\n\t\t\t$head = '<thead><tr>';\r\n\t\t\tfor($i=0; $i<7; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\", $theDay), date(\"d\", $theDay)+1*$i, date(\"Y\",$theDay));\r\n\r\n\t\t\t\tif($i == $todaysNr) {\r\n\t\t\t\t\t$head .= '<th style=\"background-color:'.$this->conf['todaysColor'].';\">';\r\n\r\n\t\t\t\t\tif(date(\"d\", $time[$i]) == date(\"d\", time()) && $this->conf['todayStyle'] == 'today') {\r\n\t\t\t\t\t\t$head .= $this->cObj->wrap($this->pi_getLL(\"today\"), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$head .= $this->cObj->wrap(strftime($this->conf['tableTime'], $time[$i]), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$head .= '</th>';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$head .= '<th align=\"center\">';\r\n\t\t\t\t\t$head .= $this->cObj->wrap(strftime($this->conf['tableTime'], $time[$i]), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t$head .= '</th>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$head .= '</tr></thead>';\r\n\r\n\t\t\t\t# tBody\r\n\t\t\t$temp = $this->internal['currentRow']['program'];\r\n\t\t\t$temp = explode(\"\\n\", trim($temp));\r\n\r\n\t\t\t# Mit Zeit verlinken\r\n\t\t\t$i=0; $n =0;\r\n\t\t\tforeach($temp as $row => $val) {\r\n\t\t\t\t$temp[$i] = explode(\"|\", $val);\r\n\r\n\t\t\t\tforeach($temp[$i] as $key1 => $timeString) {\r\n\t\t\t\t\t$timeString = trim($timeString); # Zeilenende bereinigen\r\n\r\n\t\t\t\t\tif(preg_match( '/[0-9]?[0-9]:[0-9][0-9]/m', $timeString)) { /* Exakte Uhrzeit */ \r\n\t\t\t\t\t\tlist($theHour, $theMinute) = explode(\":\",$timeString);\r\n\r\n\t\t\t\t\t\t$theTime = mktime((int)$theHour, (int)$theMinute, 0, strftime(\"%m\", $time[$n]), strftime(\"%d\", $time[$n]), strftime(\"%Y\", $time[$n]));\r\n\r\n\t\t\t\t\t\t$linkconf = array(\r\n\t\t\t\t \t\t \"title\" => $this->pi_getLL(\"howtoBook\"),\r\n\t\t\t\t\t\t \"parameter\" => $this->conf['pageBooking'],\r\n\t\t\t\t\t\t );\r\n\r\n\t\t\t\t\t\tif($this->conf['cryptTime'] == 1) {\r\n\t\t\t\t\t\t\t$linkconf[\"additionalParams\"] = \"&\".$this->prefixId.\"[crypt]=\".$this->encrypt($theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema']);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$linkconf[\"additionalParams\"] = \"&\".$this->prefixId.\"[show]=\".$theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema'];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->ff['disallowBooking'] == 'pageLinkOnly') unset($linkconf['additionalParams']);\r\n\r\n\t\t\t\t\t\tif($this->ff['disallowBooking'] == 'ticket') {\r\n\t\t\t\t\t\t\t$linkconf = $this->ticketLink($theTime);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t# Reservierungsschluss?\r\n\t\t\t\t\t\t\t# z.B. 5 Stunden vorher = t-60*60*5\r\n\t\t\t\t\t\tif(\t(time() > $theTime-60*60*$this->conf['resLimit']) ||\r\n\t\t\t\t\t\t\t$this->ff['disallowBooking'] ||\r\n\t\t\t\t\t\t\t$this->internal['currentRow']['nores'] ||\r\n\t\t\t\t\t\t\t$this->ff['mode'] == 'tipAFriend'\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$temp[$i][$key1] = $timeString; \r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$temp[$i][$key1] = $this->cObj->typoLink($timeString, $linkconf);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Tip A Friend */\r\n\t\t\t\t\t\tif($this->ff['mode'] == 'tipAFriendView' && (time() < $theTime-60*60*$this->conf['resLimit'])) {\r\n\t\t\t\t\t\t\t$value = $theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema'];\r\n\t\t\t\t\t\t\t$value = $this->encrypt($value);\r\n\t\t\t\t\t\t\tif($this->piVars['tipDate'] == $value) {\r\n\t\t\t\t\t\t\t\t$temp[$i][$key1] = '<input class=\"tipaf-select\" type=\"radio\" name=\"tx_tmdcinema_pi1[tipDate]\" value=\"'.$value.'\" checked=\"checked\" ><br />'.$temp[$i][$key1];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$temp[$i][$key1] = '<input class=\"tipaf-select\" type=\"radio\" name=\"tx_tmdcinema_pi1[tipDate]\" value=\"'.$value.'\"><br />'.$temp[$i][$key1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t} elseif(preg_match( '/[0-9]?[0-9]\\.[0-9][0-9]/m', $timeString)) { # keine Reservierung\r\n\t\t\t\t\t\t$temp[$i][$key1] = str_replace(\".\", \":\", $temp[$i][$key1]);\r\n\t\t\t\t\t} else { # leere Zelle\r\n\t\t\t\t\t\t$temp[$i][$key1] = $this->conf['emptyTable'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$n++;\r\n\t\t\t\t}\r\n\t\t\t$i++;\r\n\t\t\t$n = 0;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t# Tabellenzeilen zusammenbauen\r\n\t\t\t$i=0;\r\n\t\t\tforeach($temp as $key => $val) {\r\n\t\t\t\t$tmp[$i] = \"<tr>\";\r\n\t\t\t\tforeach($val as $key1 => $val1) {\r\n\t\t\t\t\t$val1 = $this->cObj->wrap($val1, $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD']);\r\n\t\t\t\t\tif($key1 == $todaysNr) {# Heute!\r\n\t\t\t\t\t\tif(isset($this->conf['todaysColor'])) { # eigene Hintergundfarbe\r\n\t\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].' background-color: '.$this->conf['todaysColor'].';\">'.$val1.'</td>';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].';\">'.$val1.'</td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].'\">'.$val1.'</td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$tmp[$i] .= \"</tr>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\r\n\t\t\t$temp = '<table class=\"program\" style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_STYLE'].'\">'.$head.\"<tbody>\".implode(chr(10),$tmp).'</tbody></table>';\r\n\t\t} else { # Spielplan nicht bekannt\r\n\t\t\t$temp = \"<br /><b>\";\r\n\t\t\tif($this->internal['currentRow']['date'] > mktime()) {\r\n\t\t\t\t$temp .= 'Ab '.$this->getFieldContent('date').'<br />';\r\n\t\t\t}\r\n\t\t\t$temp .= $this->pi_getLL('timeNN');\r\n\t\t\t$temp .= '</b>';\r\n\t\t}\r\n\r\n\treturn $temp;\r\n\t}",
"function writeHours($data){\n\t\tif($this->isAdmin()){\n\t\t\t$string = nl2br($data);\n\t\t\t$file = $this->tpl->template_dir.\"/hourData.tpl\";\n\t\t\tif(is_writable($file)){\n\t\t\t\tfile_put_contents($file, $string);\t\n\t\t\t}\n\t\t}\n\t}",
"public static function hoursTables(){\n global $days;\n //create db connection\n $instance = ConnectDb::getInstance();\n $pdo = $instance->getConnection();\n\n $daysInfo = $days;\n //set to false the hours that are already registered in the database\n $stmt = $pdo->query('SELECT giorno, orario FROM iscrizione limit 200');\n while ($row = $stmt->fetch())\n {\n $daysInfo[$row['giorno']][$row['orario']] = false;\n }\n\n //create the html to display the days\n $output = \"\";\n $isFirstKey = true;\n foreach($daysInfo as $day => $hours)\n {\n $hidden = \"hidden\";\n if($isFirstKey){\n $isFirstKey = false;\n $hidden = \"\";\n }\n $output .= <<<HTML\n <table data-day=\"$day\" class=\" $hidden hours-container half right-big\">\nHTML;\n foreach($hours as $hour => $free)\n {\n $class = $free ? \"free\" : \"taken\";\n $button = $free ? \"<button>prenota</button>\" : \"\";\n $output .= <<<HTML\n <tr class=\"$class\">\n <td>$hour</td>\n <td>$button</td> \n </tr>\nHTML;\n }\n $output .= '</table>';\n }\n return $output;\n }",
"function conversorSegundosHorasExcel($tiempo_en_segundos) {\n\n $horas = floor($tiempo_en_segundos / 3600);\n $minutos = floor(($tiempo_en_segundos - ($horas * 3600)) / 60);\n $segundos = $tiempo_en_segundos - ($horas * 3600) - ($minutos * 60);\n \n $hora_texto = \"\";\n // if ($horas > 0 ) {\n\n $hora_texto .= str_pad($horas, 2, \"0\", STR_PAD_LEFT) . \":\".str_pad($minutos, 2, \"0\", STR_PAD_LEFT);\n\n\n // }\n /*\n if ($minutos > 0 ) {\n\n $hora_texto .= . \":\";\n }\n \n if ($segundos > 0 ) {\n $hora_texto .= str_pad($segundos, 2, \"0\", STR_PAD_LEFT) . \":\";\n }*/\n \n return $hora_texto;\n}",
"function theme_office_hours_week($variables) {\n $element = $variables['element'];\n $output = '';\n $table_id = drupal_html_id($element['#field_name'] . '_values');\n $required = !empty($element['#required']) ? theme('form_required_marker', $variables) : '';\n\n $header = array(\n array(\n 'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . \"</label>\",\n 'class' => array('field-label'),\n ),\n );\n\n $rows = array();\n foreach (element_children($element) as $key) {\n $rows[] = array(\n drupal_render($element[$key]),\n );\n }\n\n $output = '<div class=\"form-item\">';\n $output .= theme('table',\n array(\n 'header' => $header,\n 'rows' => $rows,\n 'attributes' => array(\n 'id' => $table_id,\n 'class' => array('field-multiple-table'),\n ),\n )\n );\n $output .= $element['#description'] ? '<div class=\"description\">' . $element['#description'] . '</div>' : '';\n $output .= '</div>';\n\n return $output;\n}",
"public function volunteer_hour_row( $hour, $alternate='' ) {\n\t $hour_post = $hour['WP_Post'];\n\t $hour_meta = $hour['postmeta'];\n\t $event = $hour['event'];\n\t $event_data = $this->get_event_data( $event->ID );\n\t $event_manage_participation_href = admin_url('admin.php');\n\t $event_manage_participation_href = add_query_arg( array(\n\t 'page' => 'vmat_admin_volunteer_participation',\n\t 'event_id' => $event->ID,\n\t ),\n\t $event_manage_participation_href\n\t );\n\t $output = '<tr class=\"' . $alternate . '\" id=\"hour_' . $hour_post->ID . '\">';\n\t $output .= '<th class=\"check-column\">';\n\t $output .= '<input type=\"checkbox\" id=\"vmat_hour_cb_' . $hour_post->ID . '\" name=\"hours_checked[]\">';\n\t $output .= '</th>';\n\t $output .= '<td>';\n\t $output .= '<strong>';\n\t $output .= $event->post_title;\n\t $output .= '</strong>';\n\t $output .= '<div class=\"row-actions\">';\n\t $output .= '<span class=\"vmat-link vmat-quick-link\" data_action=\"remove\" hour_id=\"' . $hour_post->ID . \n\t \t '\" volunteer_id=\"' . $hour_post->post_author . '\" id=\"vmat_selected_hour_remove_' . $hour_post->ID . \n\t '\" title=\"Remove hours\" data_action=\"remove\">' . __(' Remove', 'vmattd') . '</span>';\n \t $output .= ' | ';\n \t $output .= '<span class=\"vmat-link vmat-quick-link\" data_action=\"save\" hour_id=\"' . $hour_post->ID . \n \t \t '\" volunteer_id=\"' . $hour_post->post_author . '\" id=\"vmat_selected_hour_save_' . $hour_post->ID . \n \t '\" title=\"Save volunteer hours\" data_action=\"save\">' . __('Save', 'vmattd') . '</span>';\n \t $output .= '</span>';\n \t $output .= ' | ';\n \t $output .= '<a id=\"vmat_hour_' . $hour_post->ID . '\" href=\"' . $event_manage_participation_href . \n \t '\"><span class=\"vmat-quick-link\">' . __('Manage Particip.', 'vmattd') . '</span></a>';\n \t $output .= '</span>';\n \t $output .= '</div>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"hours_per_day\" type=\"number\" size=\"3\" min=\"0\" max=\"24\" id=\"vmat_hours_per_day_' . $hour_post->post_author . '_' .\n \t $hour_post->ID . '\" value=\"' . $hour_meta['_hours_per_day'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"volunteer_start_date\" min=\"' . $event_data['iso_start_date'] .\n \t '\" max=\"' . $event_data['iso_end_date'] . '\" type=\"text\" size=\"8\" placeholder=\"yyyy-mm-dd\" id=\"vmat_start_date_' .\n \t $hour_post->post_author . '_' . $hour_post->ID . '\" value=\"' . $hour_meta['_volunteer_start_date'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"volunteer_days\" type=\"number\" size=\"3\" min=\"0\" max=\"' . $event_data['days'] . \n \t \t '\" id=\"vmat_days_' . $hour_post->post_author . '_' . $hour_post->ID . '\" value=\"' . $hour_meta['_volunteer_num_days'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td class=\"vmat-check-column\">';\n \t $checked = '';\n \t if ( $hour_meta['_approved'] ) {\n \t $checked = 'checked';\n \t }\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"approved\" ' .\n \t \t 'id=\"vmat_hour_approved_' . $hour_post->post_author . '_' . $hour_post->ID . '\" type=\"checkbox\" ' . $checked . '/>';\n \t $output .= '</td>';\n \t return $output;\n\t}",
"public static function format_hours (Environment $twig) : void {\n $twig->addFunction(new TwigFunction(\"format_hours\", function (array $days, array $opening_hours) {\n $output = '';\n\n foreach ($days as $d_key => $day) {\n foreach ($opening_hours as $h_key => $hour) {\n if ($h_key === $d_key) {\n $output .= '<p><span>' . $day . '</span> : ' . $hour . '</p>';\n }\n }\n }\n\n return $output;\n }));\n }",
"function hours_report($gid,$uid,$sd,$ed) {\n\t$gid = mysql_real_escape_string($gid);\n\t$uid = mysql_real_escape_string($uid);\n\t$sd = mysql_real_escape_string($sd);\n\t$ed = mysql_real_escape_string($ed);\n\t$report_results = doreport($gid,$uid,$sd,$ed);\n\t\n\t$index = 0;\n\t$group_last = 0;\n\t$user_last = 0;\t\n\t$group = \"\";\n\t$user = \"\";\n\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t$total_hours = 0;\n\t$last_group_hours = 0;\n\t$last_user_hours = 0;\n\t$index = 0;\n \t$o = \"<table style='text-align: right;'>\";\n\twhile ($row = mysql_fetch_array($report_results))\n\t{\n\t\tif ($gid > 0){ \n\t\t\t$group_id = $row['work_id'];\n\t\t\t$group_name = $row['group_name'].\" - \".$row['work_name'];\n\t\t}\n\t\telse {\n\t\t\t$group_id = $row['group_id'];\n\t\t\t$group_name = $row['group_name'];\n\t\t}\n\n\t\tif ($group_id != $group_last)\n\t\t{ \n\t\t\tif ($group_last) \n\t\t\t{ \n\t\t\t\t$index++;\n\t\t\t\t$group .= \"<td>\".$last_group_hours.\"</td></tr>\";\n\t\t\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t\t\t\n\t\t\t\t$o .= $group;\n\t\t\t\n\t\t\t\t$user_detail .= \"</table></td></tr>\";\n\t\t\t\t$user .= $user_detail;\n\t\t\t\t$o .= $user;\n\t\t\t\t$user = \"\";\n\t\t\t\t$group = \"\";\n\t\t\t\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t\t\t\t\n\t\t\t\t$user_last = 0;\t\n\t\t\t\t$last_user_hours = 0;\n\t\t\t\t$last_group_hours = 0;\n\t\t\t}\n\t\t\t$group = \"<tr class='heading'><td colspan=2 style='text-align: left;'>$group_name</td>\";\n\t\t\t$group_last = $group_id;\n\t\t}\n\t\tif ($row['user_id'] != $user_last)\n\t\t{\n\t\t\tif ($user_last) \n\t\t\t{ \n\t\t\t\t$index++;\n\t\t\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t\t\t$user_detail .= \"</table></td></tr>\";\n\t\t\t\t$user .= $user_detail;\n\t\t\t\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t\t\t\t$last_user_hours = 0;\n\t\t\t}\n\t\t\t$user_last = $row['user_id'];\n//\t\t\t$color = get_user_color($row['user_id']);\n\t\t\t$color = \"#000000\";\n\t\t\t$user .= \"<tr style='color: $color;'><td style='width: 12%; text-align: center;'><a href=\\\"javascript:toggle_vis('detail_$index');\\\" class='plus'>+</a></td><td style=\\\"text-align: left;\\\">\" . $row['lname'] . \", \" . $row['fname'].\"</td>\";\n\t\t}\n\t\t$user_detail .= \"<tr><td style='text-align: left; width: 80px;'>\".date(\"m/d/y\",strtotime($row['datestamp'])).\"</td>\";\n\t\t$user_detail .= \"<td style='text-align: left; width: 160px;'>\".$row['work_name'].\"</td>\";\n\t\t$user_detail .= \"<td style='text-align: right; width: 40px;'>\".$row['hours'].\"</td></tr>\";\n\t\t$total_hours += $row['hours'];\n\t\t$last_group_hours += $row['hours'];\n\t\t$last_user_hours += $row['hours'];\n\t}\n\tif (!$total_hours) \n\t{ \n\t\t$o .= \"<tr><td>There are no recorded hours that meet your search criteria.<BR> Please be sure the dates are correct.<BR>\";\n\t\tif (check_supervisor() && $uid != '' && $gid != '')\n\t\t{ \n\t\t\t$o .= \"<BR> Also, make sure that the user selected belongs to the group specified.\"; \n\t\t}\n\t\t$o .= \"</td></tr>\";\n\t}\n\telse \n\t{\n\t\t$group .= \"<td>\".$last_group_hours.\"</td></tr>\";\n\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t$o .= $group;\n\t\t$user_detail .= \"</table></td></tr>\";\n\t\t$user .= $user_detail;\n\t\t$o .= $user;\n\t\t$o .= \"<tr class='heading'><td colspan=2>Total:</td><td>\".$total_hours.\"</td></tr>\";\n\t}\n\t$o .= \"</table>\";\n\treturn $o;\n\n}",
"public function output()\r\n\t{\r\n\t\t//Putting together the table\r\n\t\t$output = '<table summary=\"Calender Table\">';\r\n\t\t$output .= \\generateTableHead(['Mon', 'Tues', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']);\r\n\t\t//Defining the start day of the calendar\r\n\t\t$offset = ($this->getWeekday($this->firstOfMonth) * Calendar::$oneDayInSec) % (7 * Calendar::$oneDayInSec);\r\n\t\t$startday = $this->firstOfMonth - $offset;\r\n\t\t//Peparing for loop!\r\n\t\t$moreRows = true;\r\n\t\tfor ($rowNum = 0; $moreRows && $rowNum < 100; $rowNum++) {\r\n\t\t\t$output .= $this->outputRow($startday, $rowNum, $moreRows);\r\n\t\t}\r\n\t\t$output .= '</table>';\r\n\t\treturn $output;\r\n\t}",
"function getHours();",
"public function outputHtmlTable()\n {\n $daysArray = $this->generateCalendar();\n $output = \"<div class=\\\"calendar-image\\\"><img src=\\\"image/calendar/\" . $this->month . \".jpg?w=640\\\"></div>\";\n $output .= \"<div class=\\\"calendar\\\"><table class=\\\"calendar-table\\\"><tr>\";\n $output .= \"<th class=\\\"week\\\">Vecka</th>\";\n for ($x = 0; $x < count($this->weekDays); $x++) {\n $output .= \"<th>\" . $this->weekDays[$x] . \"</th>\";\n }\n $output .= \"</tr>\";\n $counter = 0;\n $parentMonth = 1; // Startnr for parent month.\n $weekNr = $this->monthObj->firstWeekNr;\n $checkLoop = true; // Used to stop adding weeks.\n while ($checkLoop) {\n $output .= \"<tr><td class=\\\"calendar-week\\\">\" . (int)$weekNr . \"</td>\";\n for ($i = 0; $i < 7; $i++) {\n if ($counter < count($daysArray)) {\n $dayNr = $daysArray[$counter];\n } else {\n $dayNr = \"<td class=\\\"grey\\\">\" . $parentMonth . \"</td>\";\n $parentMonth++;\n }\n if ($i === 6) {\n $redDay = str_replace(\"<td>\", \"<td class=\\\"red\\\">\", $dayNr);\n $output .= $redDay;\n } else {\n $output .= $dayNr;\n }\n\n $counter++;\n // Stop generating weeks when array is done.\n if ($counter == count($daysArray)) {\n $checkLoop = false;\n }\n }\n $weekNr++;\n $weekNr = $weekNr == 53 ? 1 : $weekNr;\n $output .= \"</tr>\";\n }\n $output .= \"</table></div>\";\n return $output;\n }",
"public function reportHours()\r\n {\r\n return;\r\n }",
"function display_event ($hour,\t$row, $dimensions, $signed_up_runs, $signup_counts)\n{\n $bgcolor = \"#FFFFFF\";\n $game_full = false;\n $males = $signup_counts[\"Male\"];\n $females = $signup_counts[\"Female\"];\n\n $game_max = $row->MaxPlayersNeutral;\n $game_full = $males >= $game_max;\n\n if (array_key_exists ($row->RunId, $signed_up_runs))\n {\n if ('Confirmed' == $signed_up_runs[$row->RunId])\n $bgcolor = get_bgcolor_hex ('Confirmed');\n elseif ('Waitlisted' == $signed_up_runs[$row->RunId])\n $bgcolor = get_bgcolor_hex ('Waitlisted');\n }\n elseif ($game_full)\n $bgcolor = get_bgcolor_hex ('Full');\n elseif ('Y' == $row->CanPlayConcurrently)\n $bgcolor = get_bgcolor_hex ('CanPlayConcurrently');\n \n\n // Add the game title (and run suffix) with a link to the game page\n\n $text = sprintf ('<a href=\"Schedule.php?action=%d&EventId=%d&RunId=%d\">',\n\t\t SCHEDULE_SHOW_GAME,\n\t\t $row->EventId,\n\t\t $row->RunId);\n $text .= $row->Title;\n if ('' != $row->TitleSuffix)\n $text .= \"<p>$row->TitleSuffix\";\n $text .= '</a>';\n if ('' != $row->ScheduleNote)\n $text .= \"<P>$row->ScheduleNote\";\n if ('' != $row->Rooms)\n $text .= '<br>' . pretty_rooms($row->Rooms) . \"\\n\";\n\n \n echo \"<div class=\\\"class12\\\" style=\\\"\".$dimensions->getCSS().\"\\\">\";\n write_centering_table($text, $bgcolor);\n echo \"</div>\\n\";\n}",
"public function output_times($timebegin) {\n global $PAGE;\n\n $link = clone($PAGE->url);\n\n // The current range of time we're looking at.\n $rangebegin = local_mediaserver_time_round($timebegin);\n $range = range($rangebegin, $rangebegin + (HOURSECS * 3), HOURSECS);\n\n // Loop through each hour, starting from beginning of day.\n $hourbegin = local_mediaserver_time_round($rangebegin, true);\n for ($hour = 0; $hour < 24; $hour++, $hourbegin += HOURSECS) {\n $link->param('t', $hourbegin);\n\n $hourlabel = local_mediaserver_local_time($hourbegin, '%H');\n $class = (in_array($hourbegin, $range) ? 'hour-selected' : '');\n\n $list[] = html_writer::link($link, $hourlabel, array('class' => $class));\n }\n\n return html_writer::alist($list, array('class' => 'small-text guide-row guide-time'));\n }",
"private function getHourString(): string\n {\n $hour = $this->time->format('H');\n if ($hour == '23') {\n $hour = '00';\n } elseif ($this->time->format('i') > '30') {\n $hour++;\n $hour = str_pad($hour, 2, '0', STR_PAD_LEFT);\n }\n\n return $this->language->getHourString($hour);\n }",
"public function printDurationInHour(){\r\n\t\tglobal $_LANG;\r\n\t\t$ret= \"\";\r\n\t\t$hour = floor(($this->enddate - $this->startdate) / (60 * 60));\r\n\t\t$minutes = (int) ceil((($this->enddate - $this->startdate) % (60 * 60)) / 60);\r\n\t\tif($hour > 0){\r\n\t\t\t$ret .= $hour.\" \".$_LANG->get('Std').\". \";\r\n\t\t}\r\n\t\tif($minutes > 0){\r\n\t\t\t$ret .= $minutes.\" \".$_LANG->get('Min').\".\";\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"function displayTimetable($login){\n\t$this->tpl->assign('login', $_SESSION['zalogowany']);\t\n \t$classId=$this->db->getClassId($login); \n \t$className=$this->db->getClassName($classId);\n\t$monday=$this->db->getTimetable($classId, 1);\n\t$tuesday=$this->db->getTimetable($classId, 2);\n\t$wednesday=$this->db->getTimetable($classId, 3);\n\t$thursday=$this->db->getTimetable($classId, 4);\n\t$friday=$this->db->getTimetable($classId, 5);\n\t$number=array( 1,2,3,4,5,6,7,8);\n\t$time= array('8:00-8:45', '8:50-8:35', '9:45-10:30', '10:45-11:30', '11:40-12:25', '12:30-13:15', '13:30-14:15', '14:20-15:05');\n\t\n\t$this->tpl->assign('number', $number);\n\t$this->tpl->assign('time', $time);\n\t$this->tpl->assign('class', $className);\n\t$this->tpl->assign('monday', $monday);\n\t$this->tpl->assign('tuesday', $tuesday);\n\t$this->tpl->assign('wednesday', $wednesday);\n\t$this->tpl->assign('thursday', $thursday);\n\t$this->tpl->assign('friday', $friday);\n\t\n\t$this->tpl->display('timetable.tpl');\n\t}",
"function format_timesheets_portal( $arr )\r\n{\r\n\t$out = '<table id=\"time_sheet_portal_table\">';\r\n\t$out .= '<tr class=\"header\"><th>Date Sent</th><th>Amount</th><th>Date Paid</th></tr>';\r\n// <tr><td><a href=\"timesheet_detail.php?sheet=6459\">4/2/12</a></td><td>440.00</td><td>4/13/12</td></tr>\r\n\tforeach( $arr as $sheet )\r\n\t{\r\n\t\t$out .= '<tr>';\r\n\r\n\t\t$out .= '<td><a href=\"timesheet_detail.php?sheet='.$sheet['id'].'\">';\r\n\t\tif( strlen( $sheet['date_sent'] >0 ) )\r\n\t\t{\r\n\t\t\t$out .= format_date_short( $sheet['date_sent'] );\r\n\t\t} else {\r\n\t\t\t$out .= ( $sheet['date_sent'] );\r\n\t\t}\r\n\t\t$out .= '</a></td>';\r\n\r\n\t\t$out .= '<td>'.(money_formatalt( $sheet['amount'], '$' ) ).'</td>';\r\n\r\n\t\tif( strlen( $sheet['date_paid'] >0 ) )\r\n\t\t{\r\n\t\t\t$out .= '<td>'.format_date_short( $sheet['date_paid'] ).'</td>';\r\n\t\t} else {\r\n\t\t\t$out .= '<td>'.( $sheet['date_paid'] ).'</td>';\r\n\t\t}\r\n\t\t$out .= '</tr>';\r\n\t}\r\n\t$out .= '</table>';\r\n\r\n\treturn $out;\r\n}",
"function write_time_block($time_in_blocks, $format = \"h:i A\")\n{\n write_centering_table(blocktime_to_string($time_in_blocks, $format)); \n}",
"function writeNodesTable($hostName, $ip, $time, $status, $group) {\n\n $out = \"\";\n $statusClass = ($status == 0 ? \"Dead\" : \"Ready\");\n $statusText = ($status == 0 ? \"Offline\" : \"Online\");\n\n $td = (time() - $time);\n $timeDiff = getElapsedTime($td);\n\n $out .= \"<tr data-refreshString=\".$ip . \",\" . $hostName . \",\" . $group .\">\";\n $out .= \"<td>\". $hostName .\"</td>\";\n $out .= \"<td>192.168.\". $ip . \"</td>\";\n $out .= \"<td class=\". $statusClass . \">\". $statusText . \"</td>\";\n $out .= \"<td>\". $timeDiff .\"</td>\";\n $out .= \"<td>\". $group .\"</td>\";\n $out .= \"</tr>\";\n return $out;\n }",
"function format_table_cell($val,$data,&$align,&$comment,&$class) {\n\t$dval = array_key_exists($val,$data) ? str_replace(\"\\r\",\"\",$data[$val]) : \"\";\n\tif ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $dval, $regs))) {\n\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t$comment = substr($dval,11,10);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}).([0-9]{3})Z/\", $dval, $regs))) {\n\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/\", $dval, $regs))) {\n\t if (date(\"Y-m-d\") == substr($dval,0,10)) {\n\t\t// Date Field (Today)\n \t\t$output = substr($dval,11,10);\n\t } else {\n\t\t// Date Field (Not Today)\n\t\tswitch ($val) {\n\t\t\tcase \"EventTime\":\n\t\t\tcase \"Updated\":\n\t\t\tcase \"allocated\":\n\t\t\tcase \"AcctStartTime\":\n\t\t\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t\t\t\tbreak;\n\t\t\tcase \"released\":\n\t\t\tcase \"AcctStopTime\":\n\t\t\t\t$output = substr($dval,11,5);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t// $output = substr($dval,0,10); /* YYYY-MM-DD */\n\t\t\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t\t\t$comment = substr($dval,11,10);\n\t\t}\n\t }\n\t $this->total[$val]=0;\n\t} else if ((!empty($dval)) and (preg_match(\"/([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}/\",$dval, $regs))) {\n\t\t// IPv4 Address\n\t\t$align=\"center\";\n\t\t$output = $dval;\n\t} else if ((isset($dval)) and ($dval<>\".\") and ($dval<>\",\") and (preg_match(\"/(^[$|-]*[0-9|,|.]+$)/\",$dval, $regs))) {\n\t\t// Numeric Field\n\t\tif (!isset($this->total[$val])) $this->total[$val]=0;\n\t\t$number = str_replace(\",\",\"\",str_replace(\"$\",\"\",$dval));\n\t\t$this->total[$val] += $number;\n\t\tswitch ($val) {\n\t\t\tcase \"AcctSessionTime\":\n\t\t\t\t$align = \"right\";\n\t\t\t\t$output=TimeStr($dval);\n\t\t\t\tbreak;\n\t\t\tcase \"AcctOutputOctets\":\n\t\t\tcase \"AcctInputOctets\":\n\t\t\t\t$output=ByteStr($dval);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t$align=\"right\";\n\t\t\t\tif (array_key_exists($val,$this->format)) {\n\t\t\t\t\tif ($fmat=$this->format[$val]) $output = money_fmat($fmat,$number);\n\t\t\t\t\telse $output=$dval;\n\t\t\t\t} else {\t\n\t\t\t\t\tif (strpos($number,\".\")) $output = number_format($number,2);\n\t\t\t\t\telse switch($val) {\n\t\t\t\t\t\tcase \"MerchantID\":\n\t\t\t\t\t\tcase \"Mobile\":\n\t\t\t\t\t\tcase \"WorkPhone\":\n\t\t\t\t\t\tcase \"HomePhone\":\n\t\t\t\t\t\tcase \"Fax\":\n\t\t\t\t\t\tcase \"PostCode\":\t// don't format these columns\n\t\t\t\t\t\t\t$output=$dval;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$output = number_format(floatval($number));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$vval = \" $val\";\n\t\t\t\tif (strpos($vval,\"time\") or strpos($vval,\"date\")) $comment = @date(\"Y-m-d H:i:s\",$number);\n\t\t}\n\t} else { \n\t\t// Normal Field\n\t\t$output = $dval;\n\t}\n\n\t$output = str_replace(\"(TEST TRANSACTION ONLY)\",\"<b>(TEST)</b>\",$output);\n\n\treturn $output;\n }",
"private function DebugDrawTT($user_id) {\n\t\t$c=\"<table border=1 cellpadding=5>\\n\";\n\t\tforeach ($this->config_working_week_days as $dow) {\n\t\t\t$c.=\"<tr>\\n\";\n\t\t\t//echo $dow.\"<br>\";\n\t\t\t//echo $this->config_start_time.\"<br>\";\n\t\t\t//echo $this->config_end_time.\"<br>\";\n\t\t\t//echo $this->config_interval.\"<br>\";\n\t\t\tfor ($i=$this->config_start_time;$i<$this->config_end_time;$i+=$this->config_interval) {\n\t\t\t\t//echo $i.\"<br />\";\n\t\t\t\t$c.=\"<td>\".$this->arr_lecturer_free_slots[$user_id][$dow][$i].\"</td>\\n\";\n\t\t\t}\n\t\t\t$c.=\"</tr>\\n\";\n\t\t}\n\t\t$c.=\"</table>\\n\";\n\t\treturn $c;\n\t}",
"function theme_time_tracker_comment($variables) {\n $time_entry = $variables['data'];\n if ($time_entry) {\n $rows = array();\n $time = '';\n\n $activity = _time_tracker_get_activity_name($time_entry->activity);\n if ($activity) {\n $activity = '(' . $activity . ') ';\n }\n\n // If there is a time start and end, it's a time entry that was logged as an interval\n if ($time_entry->start && $time_entry->end) {\n //Setting up the table headers\n $header[] = array('data' => t('Duration'));\n if (variable_get('enable_deductions_field', 0)) {\n $header[] = array('data' => t('Deductions'));\n $header[] = array('data' => t('Total'));\n }\n $header[] = array('data' => t('Activity'));\n $header[] = array('data' => t('Start'));\n $header[] = array('data' => t('End'));\n if (variable_get('enable_billable_field', 0)) {\n $header[] = array('data' => t('Billable'));\n }\n if (variable_get('enable_billed_field', 0)) {\n $header[] = array('data' => t('Billed'));\n }\n\n $row = array(//row\n 'data' => array( //row data\n array( //Cell3\n 'data' => _time_tracker_format_hours_to_hours_and_minutes($time_entry->duration),\n 'class' => 'time_entry_duration',\n ),\n ),\n 'class' => '', //row class\n );//endrow\n if (variable_get('enable_deductions_field', 0)) {\n $row['data'][] = array(\n 'data' => _time_tracker_format_hours_to_hours_and_minutes($time_entry->deductions),\n 'class' => 'time_entry_deductions',\n );\n $row['data'][] = array(\n 'data' => _time_tracker_format_hours_to_hours_and_minutes($time_entry->duration - $time_entry->deductions),\n 'class' => 'time_entry_total',\n );\n }\n $row['data'][] = array(\n 'data' => _time_tracker_get_activity_name($time_entry->activity),\n 'class' => 'time_entry_activity',\n );\n $row['data'][] = array(\n 'data' => format_date($time_entry->start, 'custom', variable_get('time_interval_date_format', 'h:i A - M d, Y')),\n 'class' => 'time_entry_start',\n );\n $row['data'][] = array(\n 'data' => format_date($time_entry->end, 'custom', variable_get('time_interval_date_format', 'h:i A - M d, Y')),\n 'class' => 'time_entry_end',\n );\n if (variable_get('enable_billable_field', 0)) {\n $row['data'][] = array( //Cell6\n 'data' => $time_entry->billable ? t('Yes') : t('No'),\n 'class' => 'time_entry_billable',\n );\n }\n if (variable_get('enable_billed_field', 0)) {\n $row['data'][] = array( //Cell6\n 'data' => $time_entry->billed ? t('Yes') : t('No'),\n 'class' => 'time_entry_billed',\n );\n }\n $rows[] = $row;\n $table = array(\n 'header' => $header,\n 'rows' => $rows,\n 'attributes' => array('class' => array('time_tracker_entry_comment')),\n );\n return theme('table', $table);\n }\n else {\n $time_string = array();\n $time_string['total'] = _time_tracker_format_hours_to_hours_and_minutes($time_entry->duration - $time_entry->deductions);\n if (variable_get('enable_deductions_field', 0)) {\n $time_string['total_details'] = '(' . _time_tracker_format_hours_to_hours_and_minutes($time_entry->duration) . ' - ' . _time_tracker_format_hours_to_hours_and_minutes($time_entry->deductions) . ')';\n }\n $time_string['activity'] = $activity;\n $time_string['on'] = t('on');\n $time_string['time'] = format_date($time_entry->timestamp, 'custom', variable_get('timestamp_date_format', 'F d, Y'));\n if (variable_get('enable_billable_field', 0)) {\n $time_string['billable'] = $time_entry->billable ? t('Billable: Yes.') : t('Billable: No.');\n }\n if (variable_get('enable_billed_field', 0)) {\n $time_string['billed'] = $time_entry->billed ? t('Billed: Yes.') : t('Billed: No.');\n }\n\n $rows[] = array(t('Time') . ': ' . implode(' ', $time_string));\n\n $table = array(\n 'rows' => $rows,\n 'attributes' => array('class' => array('time_tracker_entry_comment')),\n );\n\n return theme('table', $table);\n }\n }\n}",
"function theme_office_hours_time_range($vars = array()) {\n // Add default values to $vars if not set already.\n $vars += array(\n 'times' => array(\n 'start' => '',\n 'end' => '',\n ),\n 'format' => 'G:i',\n 'separator' => ' - ',\n );\n\n $starttime = _office_hours_time_format($vars['times']['start'], $vars['format']);\n $endtime = _office_hours_time_format($vars['times']['end'], $vars['format']);\n if ($endtime == '0:00' || $endtime == '00:00') {\n $endtime = '24:00';\n }\n $result = $starttime . $vars['separator'] . $endtime;\n return $result;\n}",
"protected function _addColumnsPerHour() {\n $this->addColumn('total_order_per_hour', array(\n 'header' => Mage::helper('inventoryreports')->__('Avg. Order/Hour'),\n 'align' => 'right',\n 'index' => 'total_order_per_hour',\n 'type' => 'number',\n 'width' => '30px',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n ));\n\n $this->addColumn('qty_ordered_per_hour', array(\n 'header' => Mage::helper('inventoryreports')->__('Avg. Qty/Hour'),\n 'align' => 'right',\n 'index' => 'qty_ordered_per_hour',\n 'type' => 'number',\n 'width' => '30px',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n ));\n\n $this->addColumn('base_grand_total_per_hour', array(\n 'header' => Mage::helper('inventoryreports')->__('Avg. Grand Total/Hour'),\n 'align' => 'right',\n 'index' => 'base_grand_total_per_hour',\n 'type' => 'currency',\n 'currency' => 'base_currency_code',\n 'width' => '30px',\n 'filter_condition_callback' => array($this, '_filterNumberCallback'),\n ));\n }",
"function fix_schedule_hours($time_out,$time_in,$break_start,$break_end){\n\t$break = $break_end - $break_start;\n\t$time = $time_out - $time_in;\n\t$fsh = $time - $break;\n\n\treturn $fsh;\n}",
"public function getHours()\n {\n $timeframes = (array) $this->getValue('hours.timeframes');\n $hours = array();\n\n foreach($timeframes AS $timeframe){\n\n $open = isset($timeframe['open']) ? $timeframe['open'] : null;\n if(!$open || !is_array($open)) continue;\n\n //Convert days to 0-6\n $days = array_map(function($day){\n\n $days = array('mon','tue','wed','thur','fri','sat','sun');\n return array_search(strtolower(trim($day)), $days);\n\n }, preg_split('#[^A-Za-z\\s]+#', $timeframe['days']));\n\n $days = array_filter($days, function($a){\n return $a !== false;\n });\n\n if(empty($days)){\n continue;\n }\n\n //Format hours\n $open = array_map(function($hour){\n if(!isset($hour['renderedTime'])){\n return null;\n }\n\n //Convert foursquare format to HH:mm format\n $hour['renderedTime'] = str_replace('Noon','12:00 PM', $hour['renderedTime']);\n $hour['renderedTime'] = str_replace('Midnight','00:00 AM', $hour['renderedTime']);\n\n //Split format\n $parts = preg_split('#[^0-9:\\sA-Z]+#', $hour['renderedTime']);\n\n try{\n $open = new \\DateTime($parts[0]);\n $close = new \\DateTime($parts[1]);\n }catch(\\Exception $e){\n return null;\n }\n\n return array('open' => $open->format('H:i'), 'close' => $close->format('H:i'));\n }, $open);\n\n $open = array_filter($open);\n if(empty($open)){\n continue;\n }\n\n $hours[] = array(\n 'days' => array_values($days),\n 'hours' => $open\n );\n }\n\n return $hours;\n }",
"function formataHora($hrEntrada, $mnEntrada) {\n $hrSaida;\n $mnSaida;\n\n switch ($hrEntrada) {\n case \"0\": $hrSaida = \"00\";\n break;\n case \"1\": $hrSaida = \"01\";\n break;\n case \"2\": $hrSaida = \"02\";\n break;\n case \"3\": $hrSaida = \"03\";\n break;\n case \"4\": $hrSaida = \"04\";\n break;\n case \"5\": $hrSaida = \"05\";\n break;\n case \"6\": $hrSaida = \"06\";\n break;\n case \"7\": $hrSaida = \"07\";\n break;\n case \"8\": $hrSaida = \"08\";\n break;\n case \"9\": $hrSaida = \"09\";\n break;\n case \"10\": $hrSaida = \"10\";\n break;\n case \"11\": $hrSaida = \"11\";\n break;\n case \"12\": $hrSaida = \"12\";\n break;\n case \"13\": $hrSaida = \"13\";\n break;\n case \"14\": $hrSaida = \"14\";\n break;\n case \"15\": $hrSaida = \"15\";\n break;\n case \"16\": $hrSaida = \"16\";\n break;\n case \"17\": $hrSaida = \"17\";\n break;\n case \"18\": $hrSaida = \"18\";\n break;\n case \"19\": $hrSaida = \"19\";\n break;\n case \"20\": $hrSaida = \"20\";\n break;\n case \"21\": $hrSaida = \"21\";\n break;\n case \"22\": $hrSaida = \"22\";\n break;\n case \"23\": $hrSaida = \"23\";\n break;\n }\n\n switch ($mnEntrada) {\n case \"00\": $mnSaida = \":00:00\";\n break;\n case \"10\": $mnSaida = \":10:00\";\n break;\n case \"15\": $mnSaida = \":15:00\";\n break;\n case \"20\": $mnSaida = \":20:00\";\n break;\n case \"25\": $mnSaida = \":25:00\";\n break;\n case \"30\": $mnSaida = \":30:00\";\n break;\n case \"35\": $mnSaida = \":35:00\";\n break;\n case \"40\": $mnSaida = \":40:00\";\n break;\n case \"45\": $mnSaida = \":45:00\";\n break;\n case \"50\": $mnSaida = \":50:00\";\n break;\n case \"55\": $mnSaida = \":55:00\";\n break;\n case \"59\": $mnSaida = \":59:59\";\n break;\n }\n\n\n return $hrSaida . $mnSaida;\n }",
"public function createOpeningHoursTable(SchemaSetupInterface $setup)\n {\n $table = $setup->getConnection()\n ->newTable($setup->getTable(\"smile_retailer_time_slots\"))\n ->addColumn(\n \"retailer_id\",\n Table::TYPE_INTEGER,\n null,\n ['unsigned' => true, 'nullable' => false],\n 'Retailer Id'\n )->addColumn(\n \"attribute_code\",\n Table::TYPE_TEXT,\n 25,\n ['nullable' => false],\n 'Retailer Id'\n )->addColumn(\n \"day_of_week\",\n Table::TYPE_SMALLINT,\n null,\n ['unsigned' => true, 'nullable' => true, 'default' => null],\n 'Day Of Week'\n )->addColumn(\n \"date\",\n Table::TYPE_DATE,\n null,\n ['nullable' => true, 'default' => null],\n 'Opening Date, if any'\n )->addColumn(\n \"start_time\",\n /**\n * Hack : Magento does not support TIME column on its DDL.\n * This column will contain full datetime but work only with hours.\n */\n Table::TYPE_DATETIME,\n null,\n [\n 'nullable' => true,\n 'default' => null\n ],\n 'Start Time'\n )->addColumn(\n \"end_time\",\n /**\n * Hack : Magento does not support TIME column on its DDL.\n * This column will contain full datetime but work only with hours.\n */\n Table::TYPE_DATETIME,\n null,\n [\n 'nullable' => true,\n 'default' => null\n ],\n 'End Time'\n )->addForeignKey(\n $setup->getFkName(\n 'smile_retailer_time_slots',\n 'retailer_id',\n 'smile_seller_entity',\n 'entity_id'\n ),\n 'retailer_id',\n $setup->getTable('smile_seller_entity'),\n 'entity_id',\n Table::ACTION_CASCADE\n )\n ->setComment('Smile Retailer Opening Hours Table');\n $setup->getConnection()->createTable($table);\n }"
] | [
"0.7669049",
"0.67845833",
"0.63482624",
"0.6324425",
"0.6137726",
"0.61256343",
"0.610453",
"0.6069751",
"0.6050678",
"0.60239565",
"0.5997909",
"0.590214",
"0.58610445",
"0.5840839",
"0.58202416",
"0.57884866",
"0.57820517",
"0.57772774",
"0.57363653",
"0.57158613",
"0.5697166",
"0.56912667",
"0.5633542",
"0.56239134",
"0.5619838",
"0.56096506",
"0.55992573",
"0.5596446",
"0.5565018",
"0.55407363"
] | 0.8219968 | 0 |
/ write_24_hour Helper function to write the table cell containing the start and stop time for the hour displayed in the first column of the schedule table | function write_24_hour ($hour)
{
$hour_start = start_hour_to_12_hour ($hour);
$hour_end = start_hour_to_12_hour ($hour + 1);
$txt = "<b>" . $hour_start . "</b>";
write_centering_table($txt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function write_hour ($tHour)\n{\n $hour_start = strftime ('%H:%M', $tHour);\n $hour_end = strftime ('%H:%M', $tHour + (60 * 60));\n $txt = $hour_start . '<BR>--<BR>' . $hour_end;\n write_cell ('TH', $txt);\n}",
"function start_hour_to_24_hour ($t)\n{\n return sprintf ('%02d:00', $t % 24);\n}",
"public function c_24_hour_format($time)\n\t{\n\t return date(\"H:i:s\", strtotime($time));\n\t}",
"function to24hour($hour2){\n\t\treturn DATE(\"H:i\", STRTOTIME($hour2));\n\t}",
"function writeHours($data){\n\t\tif($this->isAdmin()){\n\t\t\t$string = nl2br($data);\n\t\t\t$file = $this->tpl->template_dir.\"/hourData.tpl\";\n\t\t\tif(is_writable($file)){\n\t\t\t\tfile_put_contents($file, $string);\t\n\t\t\t}\n\t\t}\n\t}",
"public function volunteer_hour_row( $hour, $alternate='' ) {\n\t $hour_post = $hour['WP_Post'];\n\t $hour_meta = $hour['postmeta'];\n\t $event = $hour['event'];\n\t $event_data = $this->get_event_data( $event->ID );\n\t $event_manage_participation_href = admin_url('admin.php');\n\t $event_manage_participation_href = add_query_arg( array(\n\t 'page' => 'vmat_admin_volunteer_participation',\n\t 'event_id' => $event->ID,\n\t ),\n\t $event_manage_participation_href\n\t );\n\t $output = '<tr class=\"' . $alternate . '\" id=\"hour_' . $hour_post->ID . '\">';\n\t $output .= '<th class=\"check-column\">';\n\t $output .= '<input type=\"checkbox\" id=\"vmat_hour_cb_' . $hour_post->ID . '\" name=\"hours_checked[]\">';\n\t $output .= '</th>';\n\t $output .= '<td>';\n\t $output .= '<strong>';\n\t $output .= $event->post_title;\n\t $output .= '</strong>';\n\t $output .= '<div class=\"row-actions\">';\n\t $output .= '<span class=\"vmat-link vmat-quick-link\" data_action=\"remove\" hour_id=\"' . $hour_post->ID . \n\t \t '\" volunteer_id=\"' . $hour_post->post_author . '\" id=\"vmat_selected_hour_remove_' . $hour_post->ID . \n\t '\" title=\"Remove hours\" data_action=\"remove\">' . __(' Remove', 'vmattd') . '</span>';\n \t $output .= ' | ';\n \t $output .= '<span class=\"vmat-link vmat-quick-link\" data_action=\"save\" hour_id=\"' . $hour_post->ID . \n \t \t '\" volunteer_id=\"' . $hour_post->post_author . '\" id=\"vmat_selected_hour_save_' . $hour_post->ID . \n \t '\" title=\"Save volunteer hours\" data_action=\"save\">' . __('Save', 'vmattd') . '</span>';\n \t $output .= '</span>';\n \t $output .= ' | ';\n \t $output .= '<a id=\"vmat_hour_' . $hour_post->ID . '\" href=\"' . $event_manage_participation_href . \n \t '\"><span class=\"vmat-quick-link\">' . __('Manage Particip.', 'vmattd') . '</span></a>';\n \t $output .= '</span>';\n \t $output .= '</div>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"hours_per_day\" type=\"number\" size=\"3\" min=\"0\" max=\"24\" id=\"vmat_hours_per_day_' . $hour_post->post_author . '_' .\n \t $hour_post->ID . '\" value=\"' . $hour_meta['_hours_per_day'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"volunteer_start_date\" min=\"' . $event_data['iso_start_date'] .\n \t '\" max=\"' . $event_data['iso_end_date'] . '\" type=\"text\" size=\"8\" placeholder=\"yyyy-mm-dd\" id=\"vmat_start_date_' .\n \t $hour_post->post_author . '_' . $hour_post->ID . '\" value=\"' . $hour_meta['_volunteer_start_date'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td>';\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"volunteer_days\" type=\"number\" size=\"3\" min=\"0\" max=\"' . $event_data['days'] . \n \t \t '\" id=\"vmat_days_' . $hour_post->post_author . '_' . $hour_post->ID . '\" value=\"' . $hour_meta['_volunteer_num_days'] . '\" required>';\n \t $output .= '</td>';\n \t $output .= '<td class=\"vmat-check-column\">';\n \t $checked = '';\n \t if ( $hour_meta['_approved'] ) {\n \t $checked = 'checked';\n \t }\n \t $output .= '<input class=\"vmat-check-before-save\" data_name=\"approved\" ' .\n \t \t 'id=\"vmat_hour_approved_' . $hour_post->post_author . '_' . $hour_post->ID . '\" type=\"checkbox\" ' . $checked . '/>';\n \t $output .= '</td>';\n \t return $output;\n\t}",
"function buildTimeTable() {\r\n\r\n\t\tif($this->internal['currentRow']['program']) {\r\n\t\t\t\t# Uhr auf 0 Uhr stellen!\r\n\t\t\t\t# Erster Programmtag\r\n\t\t\t$theDay = $this->internal['currentRow']['date'];\r\n\t\t\t$theDay = mktime ( 0, 0, 0, strftime(\"%m\", $theDay),strftime(\"%d\", $theDay), strftime(\"%Y\", $theDay));\r\n\r\n\t\t\tif( (time() > $theDay ) && \t( time() < mktime(0, 0, 0, strftime(\"%m\", $theDay),strftime(\"%d\", $theDay)+7, strftime(\"%Y\", $theDay)) ) ) {\r\n\t\t\t\t$todaysNr = strftime(\"%u\", time()) + 3; # Do!!\r\n\t\t\t\tif($todaysNr > 6) $todaysNr = $todaysNr%7;\r\n\t\t\t} else {\r\n\t\t\t\t$todaysNr = -1;\r\n\t\t\t}\r\n\r\n\t\t\t\t# tHead\r\n\t\t\t$head = '<thead><tr>';\r\n\t\t\tfor($i=0; $i<7; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t$time[$i] = mktime(0, 0, 0, date(\"m\", $theDay), date(\"d\", $theDay)+1*$i, date(\"Y\",$theDay));\r\n\r\n\t\t\t\tif($i == $todaysNr) {\r\n\t\t\t\t\t$head .= '<th style=\"background-color:'.$this->conf['todaysColor'].';\">';\r\n\r\n\t\t\t\t\tif(date(\"d\", $time[$i]) == date(\"d\", time()) && $this->conf['todayStyle'] == 'today') {\r\n\t\t\t\t\t\t$head .= $this->cObj->wrap($this->pi_getLL(\"today\"), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$head .= $this->cObj->wrap(strftime($this->conf['tableTime'], $time[$i]), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$head .= '</th>';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$head .= '<th align=\"center\">';\r\n\t\t\t\t\t$head .= $this->cObj->wrap(strftime($this->conf['tableTime'], $time[$i]), $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TH']);\r\n\t\t\t\t\t$head .= '</th>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$head .= '</tr></thead>';\r\n\r\n\t\t\t\t# tBody\r\n\t\t\t$temp = $this->internal['currentRow']['program'];\r\n\t\t\t$temp = explode(\"\\n\", trim($temp));\r\n\r\n\t\t\t# Mit Zeit verlinken\r\n\t\t\t$i=0; $n =0;\r\n\t\t\tforeach($temp as $row => $val) {\r\n\t\t\t\t$temp[$i] = explode(\"|\", $val);\r\n\r\n\t\t\t\tforeach($temp[$i] as $key1 => $timeString) {\r\n\t\t\t\t\t$timeString = trim($timeString); # Zeilenende bereinigen\r\n\r\n\t\t\t\t\tif(preg_match( '/[0-9]?[0-9]:[0-9][0-9]/m', $timeString)) { /* Exakte Uhrzeit */ \r\n\t\t\t\t\t\tlist($theHour, $theMinute) = explode(\":\",$timeString);\r\n\r\n\t\t\t\t\t\t$theTime = mktime((int)$theHour, (int)$theMinute, 0, strftime(\"%m\", $time[$n]), strftime(\"%d\", $time[$n]), strftime(\"%Y\", $time[$n]));\r\n\r\n\t\t\t\t\t\t$linkconf = array(\r\n\t\t\t\t \t\t \"title\" => $this->pi_getLL(\"howtoBook\"),\r\n\t\t\t\t\t\t \"parameter\" => $this->conf['pageBooking'],\r\n\t\t\t\t\t\t );\r\n\r\n\t\t\t\t\t\tif($this->conf['cryptTime'] == 1) {\r\n\t\t\t\t\t\t\t$linkconf[\"additionalParams\"] = \"&\".$this->prefixId.\"[crypt]=\".$this->encrypt($theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema']);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$linkconf[\"additionalParams\"] = \"&\".$this->prefixId.\"[show]=\".$theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema'];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif($this->ff['disallowBooking'] == 'pageLinkOnly') unset($linkconf['additionalParams']);\r\n\r\n\t\t\t\t\t\tif($this->ff['disallowBooking'] == 'ticket') {\r\n\t\t\t\t\t\t\t$linkconf = $this->ticketLink($theTime);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t# Reservierungsschluss?\r\n\t\t\t\t\t\t\t# z.B. 5 Stunden vorher = t-60*60*5\r\n\t\t\t\t\t\tif(\t(time() > $theTime-60*60*$this->conf['resLimit']) ||\r\n\t\t\t\t\t\t\t$this->ff['disallowBooking'] ||\r\n\t\t\t\t\t\t\t$this->internal['currentRow']['nores'] ||\r\n\t\t\t\t\t\t\t$this->ff['mode'] == 'tipAFriend'\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t$temp[$i][$key1] = $timeString; \r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$temp[$i][$key1] = $this->cObj->typoLink($timeString, $linkconf);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Tip A Friend */\r\n\t\t\t\t\t\tif($this->ff['mode'] == 'tipAFriendView' && (time() < $theTime-60*60*$this->conf['resLimit'])) {\r\n\t\t\t\t\t\t\t$value = $theTime.\"-\".$this->internal['currentRow']['movie'].\"-\".$this->internal['currentRow']['cinema'];\r\n\t\t\t\t\t\t\t$value = $this->encrypt($value);\r\n\t\t\t\t\t\t\tif($this->piVars['tipDate'] == $value) {\r\n\t\t\t\t\t\t\t\t$temp[$i][$key1] = '<input class=\"tipaf-select\" type=\"radio\" name=\"tx_tmdcinema_pi1[tipDate]\" value=\"'.$value.'\" checked=\"checked\" ><br />'.$temp[$i][$key1];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$temp[$i][$key1] = '<input class=\"tipaf-select\" type=\"radio\" name=\"tx_tmdcinema_pi1[tipDate]\" value=\"'.$value.'\"><br />'.$temp[$i][$key1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t} elseif(preg_match( '/[0-9]?[0-9]\\.[0-9][0-9]/m', $timeString)) { # keine Reservierung\r\n\t\t\t\t\t\t$temp[$i][$key1] = str_replace(\".\", \":\", $temp[$i][$key1]);\r\n\t\t\t\t\t} else { # leere Zelle\r\n\t\t\t\t\t\t$temp[$i][$key1] = $this->conf['emptyTable'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$n++;\r\n\t\t\t\t}\r\n\t\t\t$i++;\r\n\t\t\t$n = 0;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t# Tabellenzeilen zusammenbauen\r\n\t\t\t$i=0;\r\n\t\t\tforeach($temp as $key => $val) {\r\n\t\t\t\t$tmp[$i] = \"<tr>\";\r\n\t\t\t\tforeach($val as $key1 => $val1) {\r\n\t\t\t\t\t$val1 = $this->cObj->wrap($val1, $this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD']);\r\n\t\t\t\t\tif($key1 == $todaysNr) {# Heute!\r\n\t\t\t\t\t\tif(isset($this->conf['todaysColor'])) { # eigene Hintergundfarbe\r\n\t\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].' background-color: '.$this->conf['todaysColor'].';\">'.$val1.'</td>';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].';\">'.$val1.'</td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$tmp[$i] .= '<td style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_TD_STYLE'].'\">'.$val1.'</td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$tmp[$i] .= \"</tr>\";\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\r\n\t\t\t$temp = '<table class=\"program\" style=\"'.$this->conf['wrap.'][$this->ff['mode'].'.']['PRG_TIMETABLE_STYLE'].'\">'.$head.\"<tbody>\".implode(chr(10),$tmp).'</tbody></table>';\r\n\t\t} else { # Spielplan nicht bekannt\r\n\t\t\t$temp = \"<br /><b>\";\r\n\t\t\tif($this->internal['currentRow']['date'] > mktime()) {\r\n\t\t\t\t$temp .= 'Ab '.$this->getFieldContent('date').'<br />';\r\n\t\t\t}\r\n\t\t\t$temp .= $this->pi_getLL('timeNN');\r\n\t\t\t$temp .= '</b>';\r\n\t\t}\r\n\r\n\treturn $temp;\r\n\t}",
"public function Nice24() {\n\t\tif($this->value) return date('H:i', strtotime($this->value));\n\t}",
"function station_convert_schedule_to_24hour($sched = array()) {\r\n\tif(empty($sched)) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif($sched['start_meridian'] == 'pm' && $sched['start_hour'] != 12) {\r\n\t\t$sched['start_hour'] = $sched['start_hour'] + 12;\r\n\t}\r\n\tif($sched['start_meridian'] == 'am' && $sched['start_hour'] < 10) {\r\n\t\t$sched['start_hour'] = \"0\".$sched['start_hour'];\r\n\t}\r\n\tif($sched['start_meridian'] == 'am' && $sched['start_hour'] == 12) {\r\n\t\t$sched['start_hour'] = '00';\r\n\t}\r\n\t\r\n\tif($sched['end_meridian'] == 'pm' && $sched['end_hour'] != 12) {\r\n\t\t$sched['end_hour'] = $sched['end_hour'] + 12;\r\n\t}\r\n\tif($sched['end_meridian'] == 'am' && $sched['end_hour'] < 10) {\r\n\t\t$sched['end_hour'] = \"0\".$sched['end_hour'];\r\n\t}\r\n\tif($sched['end_meridian'] == 'am' && $sched['end_hour'] == 12) {\r\n\t\t$sched['end_hour'] = '00';\r\n\t}\r\n\t\r\n\treturn $sched;\r\n}",
"function ui_time($time24hour){\n\ttry\n\t{\n\t$time=new DateTime($time24hour);\n\t}\n\tcatch (Exception $e)\n\t{\n\t\t$time=\"00:00\";\n\t}\n\treturn $time->format(\"h:i a\");\n}",
"function write_time_block($time_in_blocks, $format = \"h:i A\")\n{\n write_centering_table(blocktime_to_string($time_in_blocks, $format)); \n}",
"public static function hoursTables(){\n global $days;\n //create db connection\n $instance = ConnectDb::getInstance();\n $pdo = $instance->getConnection();\n\n $daysInfo = $days;\n //set to false the hours that are already registered in the database\n $stmt = $pdo->query('SELECT giorno, orario FROM iscrizione limit 200');\n while ($row = $stmt->fetch())\n {\n $daysInfo[$row['giorno']][$row['orario']] = false;\n }\n\n //create the html to display the days\n $output = \"\";\n $isFirstKey = true;\n foreach($daysInfo as $day => $hours)\n {\n $hidden = \"hidden\";\n if($isFirstKey){\n $isFirstKey = false;\n $hidden = \"\";\n }\n $output .= <<<HTML\n <table data-day=\"$day\" class=\" $hidden hours-container half right-big\">\nHTML;\n foreach($hours as $hour => $free)\n {\n $class = $free ? \"free\" : \"taken\";\n $button = $free ? \"<button>prenota</button>\" : \"\";\n $output .= <<<HTML\n <tr class=\"$class\">\n <td>$hour</td>\n <td>$button</td> \n </tr>\nHTML;\n }\n $output .= '</table>';\n }\n return $output;\n }",
"public static function format_hours (Environment $twig) : void {\n $twig->addFunction(new TwigFunction(\"format_hours\", function (array $days, array $opening_hours) {\n $output = '';\n\n foreach ($days as $d_key => $day) {\n foreach ($opening_hours as $h_key => $hour) {\n if ($h_key === $d_key) {\n $output .= '<p><span>' . $day . '</span> : ' . $hour . '</p>';\n }\n }\n }\n\n return $output;\n }));\n }",
"function conversorSegundosHorasExcel($tiempo_en_segundos) {\n\n $horas = floor($tiempo_en_segundos / 3600);\n $minutos = floor(($tiempo_en_segundos - ($horas * 3600)) / 60);\n $segundos = $tiempo_en_segundos - ($horas * 3600) - ($minutos * 60);\n \n $hora_texto = \"\";\n // if ($horas > 0 ) {\n\n $hora_texto .= str_pad($horas, 2, \"0\", STR_PAD_LEFT) . \":\".str_pad($minutos, 2, \"0\", STR_PAD_LEFT);\n\n\n // }\n /*\n if ($minutos > 0 ) {\n\n $hora_texto .= . \":\";\n }\n \n if ($segundos > 0 ) {\n $hora_texto .= str_pad($segundos, 2, \"0\", STR_PAD_LEFT) . \":\";\n }*/\n \n return $hora_texto;\n}",
"function writeNodesTable($hostName, $ip, $time, $status, $group) {\n\n $out = \"\";\n $statusClass = ($status == 0 ? \"Dead\" : \"Ready\");\n $statusText = ($status == 0 ? \"Offline\" : \"Online\");\n\n $td = (time() - $time);\n $timeDiff = getElapsedTime($td);\n\n $out .= \"<tr data-refreshString=\".$ip . \",\" . $hostName . \",\" . $group .\">\";\n $out .= \"<td>\". $hostName .\"</td>\";\n $out .= \"<td>192.168.\". $ip . \"</td>\";\n $out .= \"<td class=\". $statusClass . \">\". $statusText . \"</td>\";\n $out .= \"<td>\". $timeDiff .\"</td>\";\n $out .= \"<td>\". $group .\"</td>\";\n $out .= \"</tr>\";\n return $out;\n }",
"private function getHourString(): string\n {\n $hour = $this->time->format('H');\n if ($hour == '23') {\n $hour = '00';\n } elseif ($this->time->format('i') > '30') {\n $hour++;\n $hour = str_pad($hour, 2, '0', STR_PAD_LEFT);\n }\n\n return $this->language->getHourString($hour);\n }",
"function format_timesheets_portal( $arr )\r\n{\r\n\t$out = '<table id=\"time_sheet_portal_table\">';\r\n\t$out .= '<tr class=\"header\"><th>Date Sent</th><th>Amount</th><th>Date Paid</th></tr>';\r\n// <tr><td><a href=\"timesheet_detail.php?sheet=6459\">4/2/12</a></td><td>440.00</td><td>4/13/12</td></tr>\r\n\tforeach( $arr as $sheet )\r\n\t{\r\n\t\t$out .= '<tr>';\r\n\r\n\t\t$out .= '<td><a href=\"timesheet_detail.php?sheet='.$sheet['id'].'\">';\r\n\t\tif( strlen( $sheet['date_sent'] >0 ) )\r\n\t\t{\r\n\t\t\t$out .= format_date_short( $sheet['date_sent'] );\r\n\t\t} else {\r\n\t\t\t$out .= ( $sheet['date_sent'] );\r\n\t\t}\r\n\t\t$out .= '</a></td>';\r\n\r\n\t\t$out .= '<td>'.(money_formatalt( $sheet['amount'], '$' ) ).'</td>';\r\n\r\n\t\tif( strlen( $sheet['date_paid'] >0 ) )\r\n\t\t{\r\n\t\t\t$out .= '<td>'.format_date_short( $sheet['date_paid'] ).'</td>';\r\n\t\t} else {\r\n\t\t\t$out .= '<td>'.( $sheet['date_paid'] ).'</td>';\r\n\t\t}\r\n\t\t$out .= '</tr>';\r\n\t}\r\n\t$out .= '</table>';\r\n\r\n\treturn $out;\r\n}",
"protected function formatHour24($pattern,$date)\n\t{\n\t\t$hour=$date['hours'];\n\t\tif($pattern==='H')\n\t\t\treturn $hour;\n\t\telseif($pattern==='HH')\n\t\t\treturn str_pad($hour,2,'0',STR_PAD_LEFT);\n\t\telse\n\t\t\tthrow new CException(Yii::t('yii','The pattern for 24 hour format must be \"H\" or \"HH\".'));\n\t}",
"function to24hours($time, $s = 0) {\r\n if (strlen($time) == 6) $time = '0' . $time;\r\n if (!($time = preg_replace('/\\s*/', '', xpAS::preg_get($time, '/[1|0][0-9](\\:[0-5][0-9]){1,2}\\s*([a|p]m)?/i')))) return $s ? '00:00:00' : '00:00';\r\n $ap = strtolower(xpAS::preg_get($time, '/[a|p]m/i'));\r\n $hr = xpAS::preg_get($time, '/\\d\\d/');\r\n //_debug($hr,$ap);\r\n if ($ap == 'pm' && $hr != 12) $hr+= 12;\r\n $hr = sprintf(\"%02d\", ($hr % 24));\r\n $time = $hr . substr(preg_replace('/[a|p]m/i', ' ', $time), 2);\r\n return $s ? $time : substr($time, 0, 5);\r\n }",
"function hours_report($gid,$uid,$sd,$ed) {\n\t$gid = mysql_real_escape_string($gid);\n\t$uid = mysql_real_escape_string($uid);\n\t$sd = mysql_real_escape_string($sd);\n\t$ed = mysql_real_escape_string($ed);\n\t$report_results = doreport($gid,$uid,$sd,$ed);\n\t\n\t$index = 0;\n\t$group_last = 0;\n\t$user_last = 0;\t\n\t$group = \"\";\n\t$user = \"\";\n\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t$total_hours = 0;\n\t$last_group_hours = 0;\n\t$last_user_hours = 0;\n\t$index = 0;\n \t$o = \"<table style='text-align: right;'>\";\n\twhile ($row = mysql_fetch_array($report_results))\n\t{\n\t\tif ($gid > 0){ \n\t\t\t$group_id = $row['work_id'];\n\t\t\t$group_name = $row['group_name'].\" - \".$row['work_name'];\n\t\t}\n\t\telse {\n\t\t\t$group_id = $row['group_id'];\n\t\t\t$group_name = $row['group_name'];\n\t\t}\n\n\t\tif ($group_id != $group_last)\n\t\t{ \n\t\t\tif ($group_last) \n\t\t\t{ \n\t\t\t\t$index++;\n\t\t\t\t$group .= \"<td>\".$last_group_hours.\"</td></tr>\";\n\t\t\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t\t\t\n\t\t\t\t$o .= $group;\n\t\t\t\n\t\t\t\t$user_detail .= \"</table></td></tr>\";\n\t\t\t\t$user .= $user_detail;\n\t\t\t\t$o .= $user;\n\t\t\t\t$user = \"\";\n\t\t\t\t$group = \"\";\n\t\t\t\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t\t\t\t\n\t\t\t\t$user_last = 0;\t\n\t\t\t\t$last_user_hours = 0;\n\t\t\t\t$last_group_hours = 0;\n\t\t\t}\n\t\t\t$group = \"<tr class='heading'><td colspan=2 style='text-align: left;'>$group_name</td>\";\n\t\t\t$group_last = $group_id;\n\t\t}\n\t\tif ($row['user_id'] != $user_last)\n\t\t{\n\t\t\tif ($user_last) \n\t\t\t{ \n\t\t\t\t$index++;\n\t\t\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t\t\t$user_detail .= \"</table></td></tr>\";\n\t\t\t\t$user .= $user_detail;\n\t\t\t\t$user_detail = \"<tr><td colspan=3><table class='user_detail' id='detail_$index'>\";\n\t\t\t\t$last_user_hours = 0;\n\t\t\t}\n\t\t\t$user_last = $row['user_id'];\n//\t\t\t$color = get_user_color($row['user_id']);\n\t\t\t$color = \"#000000\";\n\t\t\t$user .= \"<tr style='color: $color;'><td style='width: 12%; text-align: center;'><a href=\\\"javascript:toggle_vis('detail_$index');\\\" class='plus'>+</a></td><td style=\\\"text-align: left;\\\">\" . $row['lname'] . \", \" . $row['fname'].\"</td>\";\n\t\t}\n\t\t$user_detail .= \"<tr><td style='text-align: left; width: 80px;'>\".date(\"m/d/y\",strtotime($row['datestamp'])).\"</td>\";\n\t\t$user_detail .= \"<td style='text-align: left; width: 160px;'>\".$row['work_name'].\"</td>\";\n\t\t$user_detail .= \"<td style='text-align: right; width: 40px;'>\".$row['hours'].\"</td></tr>\";\n\t\t$total_hours += $row['hours'];\n\t\t$last_group_hours += $row['hours'];\n\t\t$last_user_hours += $row['hours'];\n\t}\n\tif (!$total_hours) \n\t{ \n\t\t$o .= \"<tr><td>There are no recorded hours that meet your search criteria.<BR> Please be sure the dates are correct.<BR>\";\n\t\tif (check_supervisor() && $uid != '' && $gid != '')\n\t\t{ \n\t\t\t$o .= \"<BR> Also, make sure that the user selected belongs to the group specified.\"; \n\t\t}\n\t\t$o .= \"</td></tr>\";\n\t}\n\telse \n\t{\n\t\t$group .= \"<td>\".$last_group_hours.\"</td></tr>\";\n\t\t$user .= \"<td>\".$last_user_hours.\"</td></tr>\";\n\t\t$o .= $group;\n\t\t$user_detail .= \"</table></td></tr>\";\n\t\t$user .= $user_detail;\n\t\t$o .= $user;\n\t\t$o .= \"<tr class='heading'><td colspan=2>Total:</td><td>\".$total_hours.\"</td></tr>\";\n\t}\n\t$o .= \"</table>\";\n\treturn $o;\n\n}",
"function convert24Time($time24){\r\n\t$pTime = DateTime::createFromFormat('H', $time24 );\r\n\treturn $pTime->format('h A');\r\n}",
"function displayTimetable($login){\n\t$this->tpl->assign('login', $_SESSION['zalogowany']);\t\n \t$classId=$this->db->getClassId($login); \n \t$className=$this->db->getClassName($classId);\n\t$monday=$this->db->getTimetable($classId, 1);\n\t$tuesday=$this->db->getTimetable($classId, 2);\n\t$wednesday=$this->db->getTimetable($classId, 3);\n\t$thursday=$this->db->getTimetable($classId, 4);\n\t$friday=$this->db->getTimetable($classId, 5);\n\t$number=array( 1,2,3,4,5,6,7,8);\n\t$time= array('8:00-8:45', '8:50-8:35', '9:45-10:30', '10:45-11:30', '11:40-12:25', '12:30-13:15', '13:30-14:15', '14:20-15:05');\n\t\n\t$this->tpl->assign('number', $number);\n\t$this->tpl->assign('time', $time);\n\t$this->tpl->assign('class', $className);\n\t$this->tpl->assign('monday', $monday);\n\t$this->tpl->assign('tuesday', $tuesday);\n\t$this->tpl->assign('wednesday', $wednesday);\n\t$this->tpl->assign('thursday', $thursday);\n\t$this->tpl->assign('friday', $friday);\n\t\n\t$this->tpl->display('timetable.tpl');\n\t}",
"function las24hours_display()\n{\n global $last24cache, $last24record, $lang;\n\n $_last24 = (file_exists($last24cache) ? unserialize(file_get_contents($last24cache)) : array());\n $_last24record = (file_exists($last24record) ? unserialize(file_get_contents($last24record)) : array('num' => 0,\n 'date' => 0));\n $txt = '';\n\n $str = file_get_contents(CACHE_DIR . 'last24/' . date('dmY') . '.txt');\n //$_matches = preg_match_all('/a:2/', $str, $dummy);\n\n if (!is_array($_last24))\n {\n $txt = \"{$lang['text_no_record']}\";\n }\n else\n {\n //$txt .= '<h2>Active Users in the Last 24hrs - ('.$_matches.') </h2>'\n $txt .= \"<h2>{$lang['text_active_24']}</h2><table border='1' width='100%' cellpadding='10' cellspacing='0'><tr class='table'><td class='text'><span>\";\n\n $c = count($_last24);\n $i = 0;\n\n foreach ($_last24\n AS\n $id => $username)\n {\n\n $txt .= \"<a class='altlink_user' href='userdetails.php?id=$id'><span style='font-weight : bold; color : #\" . get_user_class_color($username['1']) . \"'>\" . security::html_safe($username[0]) . \"</span></a>\" . (($c - 1) == $i ? '' : ',') . \"\\n\";\n\n $i++;\n }\n\n $txt .= \"</span></td></tr>\";\n $txt .= \"<tr class='table'><td class='rowhead' align='center'><span>{$lang['text_most_visited']}{$_last24record['num']}{$lang['text_members']}\" . get_date_time($_last24record['date'], 'DATE') . \"</span></td></tr></table><br />\";\n }\n return $txt;\n}",
"function format_table_cell($val,$data,&$align,&$comment,&$class) {\n\t$dval = array_key_exists($val,$data) ? str_replace(\"\\r\",\"\",$data[$val]) : \"\";\n\tif ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $dval, $regs))) {\n\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t$comment = substr($dval,11,10);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}).([0-9]{3})Z/\", $dval, $regs))) {\n\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t} else if ((!empty($dval)) and (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})/\", $dval, $regs))) {\n\t if (date(\"Y-m-d\") == substr($dval,0,10)) {\n\t\t// Date Field (Today)\n \t\t$output = substr($dval,11,10);\n\t } else {\n\t\t// Date Field (Not Today)\n\t\tswitch ($val) {\n\t\t\tcase \"EventTime\":\n\t\t\tcase \"Updated\":\n\t\t\tcase \"allocated\":\n\t\t\tcase \"AcctStartTime\":\n\t\t\t\t$output = sprintf(\"%s/%s %s:%s\",$regs[3],$regs[2],$regs[4],$regs[5],$regs[6]);\n\t\t\t\tbreak;\n\t\t\tcase \"released\":\n\t\t\tcase \"AcctStopTime\":\n\t\t\t\t$output = substr($dval,11,5);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t// $output = substr($dval,0,10); /* YYYY-MM-DD */\n\t\t\t\t$output = date(\"d M Y\",strtotime($dval)); /* DD Mmm YYYY */\n\t\t\t\t$comment = substr($dval,11,10);\n\t\t}\n\t }\n\t $this->total[$val]=0;\n\t} else if ((!empty($dval)) and (preg_match(\"/([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}/\",$dval, $regs))) {\n\t\t// IPv4 Address\n\t\t$align=\"center\";\n\t\t$output = $dval;\n\t} else if ((isset($dval)) and ($dval<>\".\") and ($dval<>\",\") and (preg_match(\"/(^[$|-]*[0-9|,|.]+$)/\",$dval, $regs))) {\n\t\t// Numeric Field\n\t\tif (!isset($this->total[$val])) $this->total[$val]=0;\n\t\t$number = str_replace(\",\",\"\",str_replace(\"$\",\"\",$dval));\n\t\t$this->total[$val] += $number;\n\t\tswitch ($val) {\n\t\t\tcase \"AcctSessionTime\":\n\t\t\t\t$align = \"right\";\n\t\t\t\t$output=TimeStr($dval);\n\t\t\t\tbreak;\n\t\t\tcase \"AcctOutputOctets\":\n\t\t\tcase \"AcctInputOctets\":\n\t\t\t\t$output=ByteStr($dval);\n\t\t\t\tbreak;\n \t\t\tdefault: \n\t\t\t\t$align=\"right\";\n\t\t\t\tif (array_key_exists($val,$this->format)) {\n\t\t\t\t\tif ($fmat=$this->format[$val]) $output = money_fmat($fmat,$number);\n\t\t\t\t\telse $output=$dval;\n\t\t\t\t} else {\t\n\t\t\t\t\tif (strpos($number,\".\")) $output = number_format($number,2);\n\t\t\t\t\telse switch($val) {\n\t\t\t\t\t\tcase \"MerchantID\":\n\t\t\t\t\t\tcase \"Mobile\":\n\t\t\t\t\t\tcase \"WorkPhone\":\n\t\t\t\t\t\tcase \"HomePhone\":\n\t\t\t\t\t\tcase \"Fax\":\n\t\t\t\t\t\tcase \"PostCode\":\t// don't format these columns\n\t\t\t\t\t\t\t$output=$dval;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$output = number_format(floatval($number));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$vval = \" $val\";\n\t\t\t\tif (strpos($vval,\"time\") or strpos($vval,\"date\")) $comment = @date(\"Y-m-d H:i:s\",$number);\n\t\t}\n\t} else { \n\t\t// Normal Field\n\t\t$output = $dval;\n\t}\n\n\t$output = str_replace(\"(TEST TRANSACTION ONLY)\",\"<b>(TEST)</b>\",$output);\n\n\treturn $output;\n }",
"function hour_ed ($hour)\n {\n $hour = $this->ceros ($hour, 4, 0);\n $h = substr ($hour, 0, 2); // hour\n $m = substr ($hour, 2); // Minuto\n if ($h == 24) $h = \"0\";\n return $h.\":\".$m;\n }",
"function mysql_time($time12hour){\n\ttry\n\t{\n\t$time=new DateTime($time24hour);\n\t}\n\tcatch (Exception $e)\n\t{\n\t\t$time=\"00:00:00\";\n\t}\n\treturn $time->format(\"H:i:s\");\n}",
"public function format_hour ( $time , $seconds = FALSE )\n\t{\n\t\tdate_default_timezone_set ( 'America/Buenos_Aires' );\n\n\t\tif ( $seconds )\n\t\t{\n\t\t\treturn date ( 'd/m/Y H:i:s' , $time );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn date ( 'd/m/y H:i' , $time );\n\t\t}\n\n\t}",
"public function reportHours()\r\n {\r\n return;\r\n }",
"function to12hour($hour1){\n\t\treturn DATE(\"g:i a\", STRTOTIME($hour1));\n\t}",
"function format_ts_excel($val) {\r\n\treturn ($val == \"\") ? \"\" : substr($val, 0, 4) . \"-\" . substr($val, 4, 2) . \"-\" . substr($val, 6, 2) . \" \" . substr($val, 8, 2) . \":\" . substr($val, 10, 2);\r\n}"
] | [
"0.7666125",
"0.61839414",
"0.595183",
"0.59079945",
"0.5890378",
"0.58902174",
"0.5855021",
"0.5843978",
"0.58084005",
"0.5736666",
"0.56725204",
"0.5634415",
"0.5488021",
"0.5463469",
"0.54389477",
"0.5358631",
"0.5319242",
"0.5314011",
"0.5306235",
"0.5272069",
"0.5260981",
"0.52550143",
"0.5226039",
"0.5203346",
"0.51672786",
"0.51645917",
"0.5156616",
"0.5100113",
"0.50996995",
"0.5082503"
] | 0.8349606 | 0 |
Subsets and Splits